WP Statistics - Version 12.5.1

Version Description

  • Added: Cache option for support when the cache enabled in the WordPress.
  • Added: Visitor's city name with GeoIP, you can enable the city name in Settings > Externals > GeoIP City
  • Added: WP-Statistics shortcode in the TinyMCE editor. you can use the shortcode easily in the posts and pages.
  • Added: Qwant search engine in the Search Engine Referrals.
  • Added: Referrers to WP-Statistics shortcode attributes. e.g. [wpstatistics stat=referrer time=today top=10]
  • Added: WhichBrowser and CrawlerDetect. These libraries give us more help in identifying user agents. the Browscap library removed.
  • Improved: The Datepicker in the WP-Statistics pages, supported WordPress custom date format.
  • Improved: The pagination class.
  • Improved: The assets and fixed conflict ChartJS issue, when the Hit Statistics Meta box was enabled in posts/pages.
  • Improved: The responsive summary page.
  • Improved: Exclude Ajax requests, now compatible with Related Post by Jetpack.
  • Improved: Some issues.
  • Updated: Chart.js library to v2.7.3
  • Enabled: Hit Statistics in posts/pages. the conflict problem solved.
  • Disabled: The setting menu when the current user doesn't access.
  • Disabled: Baidu search engine by default after installing.
Download this release

Release Info

Developer mostafa.s1990
Plugin Icon 128x128 WP Statistics
Version 12.5.1
Comparing to
See all releases

Code changes from version 12.4.3 to 12.5.1

Files changed (74) hide show
  1. assets/css/admin.css +29 -146
  2. assets/css/log.css +12 -2
  3. assets/images/qwant.png +0 -0
  4. assets/images/veronalabs.svg +19 -0
  5. assets/images/welcome/cache.png +0 -0
  6. assets/images/welcome/country.png +0 -0
  7. assets/images/welcome/gdpr.png +0 -0
  8. assets/images/welcome/icon-love.png +0 -0
  9. assets/images/welcome/shortcode.png +0 -0
  10. assets/images/welcome/whichbrowser.png +0 -0
  11. assets/images/welcome/wp-stats-ip.png +0 -0
  12. assets/js/Chart.bundle.min.js +2 -2
  13. assets/js/Chart.min.js +2 -2
  14. assets/js/tinymce.js +101 -0
  15. composer.json +3 -3
  16. composer.lock +479 -1251
  17. includes/classes/class-wp-statistics-admin-pages.php +118 -30
  18. includes/classes/class-wp-statistics-admin.php +132 -28
  19. includes/classes/class-wp-statistics-ajax.php +10 -10
  20. includes/classes/class-wp-statistics-dashboard.php +17 -14
  21. includes/classes/class-wp-statistics-frontend.php +132 -16
  22. includes/classes/class-wp-statistics-hits.php +390 -346
  23. includes/classes/class-wp-statistics-install.php +3 -0
  24. includes/classes/class-wp-statistics-pagination.php +1 -1
  25. includes/classes/class-wp-statistics-rest.php +121 -0
  26. includes/classes/class-wp-statistics-schedule.php +9 -38
  27. includes/classes/class-wp-statistics-shortcode.php +5 -0
  28. includes/classes/class-wp-statistics-tinymce.php +148 -0
  29. includes/classes/class-wp-statistics-updates.php +112 -157
  30. includes/classes/class-wp-statistics-welcome.php +3 -3
  31. includes/classes/class-wp-statistics-widget.php +6 -6
  32. includes/classes/class-wp-statistics.php +118 -44
  33. includes/functions/functions.php +116 -7
  34. includes/functions/tinymce.php +10 -0
  35. includes/log/last-search.php +81 -50
  36. includes/log/last-visitor.php +83 -55
  37. includes/log/search-statistics.php +1 -0
  38. includes/log/searched-phrases.php +43 -41
  39. includes/log/top-pages.php +20 -15
  40. includes/log/top-visitors.php +3 -3
  41. includes/log/widgets/jqv.map.php +19 -2
  42. includes/log/widgets/pages.php +21 -15
  43. includes/log/widgets/recent.php +66 -35
  44. includes/log/widgets/search.php +1 -0
  45. includes/log/widgets/top.visitors.php +24 -0
  46. includes/log/widgets/words.php +73 -49
  47. includes/optimization/tabs/wps-optimization-resources.php +0 -56
  48. includes/settings/tabs/wps-about.php +1 -1
  49. includes/settings/tabs/wps-exclusions.php +21 -3
  50. includes/settings/tabs/wps-externals.php +24 -103
  51. includes/settings/tabs/wps-general.php +21 -0
  52. includes/settings/tabs/wps-notifications.php +0 -19
  53. includes/settings/tabs/wps-overview-display.php +3 -3
  54. includes/settings/tabs/wps-privacy.php +1 -1
  55. includes/templates/plugins.php +0 -27
  56. includes/templates/welcome.php +163 -0
  57. includes/templates/welcomes/last-version.php +0 -126
  58. includes/vendor/bin/browscap-php +0 -17
  59. includes/vendor/bin/browscap-php.bat +0 -4
  60. includes/vendor/browscap/browscap-php/.gitattributes +0 -13
  61. includes/vendor/browscap/browscap-php/.gitignore +0 -13
  62. includes/vendor/browscap/browscap-php/.php_cs +0 -91
  63. includes/vendor/browscap/browscap-php/.scrutinizer.yml +0 -7
  64. includes/vendor/browscap/browscap-php/.travis-scripts/cache-browscap.sh +0 -9
  65. includes/vendor/browscap/browscap-php/.travis.yml +0 -52
  66. includes/vendor/browscap/browscap-php/LICENSE +0 -20
  67. includes/vendor/browscap/browscap-php/README.md +0 -303
  68. includes/vendor/browscap/browscap-php/bin/browscap-php +0 -41
  69. includes/vendor/browscap/browscap-php/composer.json +0 -55
  70. includes/vendor/browscap/browscap-php/phpcs.xml +0 -14
  71. includes/vendor/browscap/browscap-php/phpunit.xml.dist +0 -30
  72. includes/vendor/browscap/browscap-php/resources/.gitkeep +0 -0
  73. includes/vendor/browscap/browscap-php/src/Browscap.php +0 -251
  74. includes/vendor/browscap/browscap-php/src/BrowscapUpdater.php +0 -414
assets/css/admin.css CHANGED
@@ -55,6 +55,14 @@
55
  float: right;
56
  }
57
 
 
 
 
 
 
 
 
 
58
  @media only screen and (max-width: 1327px) {
59
  .wp-statistics-settings ul.tabs li {
60
  padding: 10px 5px;
@@ -263,157 +271,32 @@
263
  margin: 0 5px;
264
  }
265
 
266
- /** Travod **/
267
- .wp-statistics-travod {
268
- border: 1px solid #e5e5e5;
269
- padding: 11px;
270
- margin: 9px 0 5px 0;
271
- background-color: #ffffff;
272
- display: flow-root;
273
- position: relative;
274
- }
275
-
276
- .wp-statistics-travod .header {
277
- border-bottom: 1px solid #e5e5e5;
278
- display: flow-root;
279
- margin-bottom: 12px;
280
- clear: both;
281
- }
282
-
283
- .wp-statistics-travod .header .left {
284
- float: left;
285
- }
286
-
287
- .wp-statistics-travod .header .right {
288
- float: right;
289
- }
290
-
291
- .wp-statistics-travod .header .right img {
292
- width: 75px;
293
- vertical-align: middle;
294
- }
295
-
296
- .wp-statistics-travod .header p {
297
- margin: 0 17px 0 0;
298
- padding: 6px 4px;
299
- }
300
-
301
- .wp-statistics-travod .column {
302
- float: left;
303
- width: 100%;
304
- }
305
-
306
- .wp-statistics-travod .columns {
307
- float: left;
308
- }
309
-
310
- .wp-statistics-travod .columns.column-1 {
311
- width: 23%;
312
- }
313
-
314
- .wp-statistics-travod .columns.column-2 {
315
- width: 45%;
316
- }
317
-
318
- .wp-statistics-travod .columns.column-3 {
319
- width: 32%;
320
- }
321
-
322
- .wp-statistics-travod .columns.column-1 ul li {
323
- margin-left: 6px;
324
- }
325
-
326
- .wp-statistics-travod table {
327
- border-right: 1px solid #f1f1f1;
328
- margin: 0 auto;
329
- border-top: 1px solid #f1f1f1;
330
- }
331
-
332
- .wp-statistics-travod thead {
333
- background-color: #f7f7f7;
334
- font-weight: bold;
335
- }
336
-
337
- .wp-statistics-travod table tr td {
338
- padding: 9px 9px;
339
- border-left: 1px solid #f1f1f1;
340
- border-bottom: 1px solid #f1f1f1;
341
- }
342
-
343
- .wp-statistics-travod table .dashicons-arrow-up:before {
344
- color: green;
345
- }
346
-
347
- .wp-statistics-travod .columns section {
348
- padding: 0 20px;
349
- }
350
-
351
- .wp-statistics-travod .columns.column-3 section {
352
- background: #f7f7f7;
353
- border: 1px solid #f1f1f1;
354
- height: auto;
355
- padding: 0 14px 20px 14px;
356
- }
357
-
358
- .wp-statistics-travod .columns.column-3 input[type="text"], .wp-statistics-travod .columns.column-3 input[type="email"] {
359
- width: 48%;
360
- }
361
-
362
- .wp-statistics-travod .columns.column-3 p {
363
- margin: 6px 0 8px 0;
364
- font-size: 11px;
365
- }
366
-
367
- .wp-statistics-travod .columns.column-3 input[type="submit"] {
368
- margin: 11px 0 0 0;
369
- }
370
-
371
- .wp-statistics-travod .columns.column-1 h2 {
372
- margin: 0;
373
  }
374
 
375
- .wp-statistics-travod .notice-dismiss {
376
- padding: 14px 9px 15px;
377
  }
378
 
379
- @media only screen and (max-width: 1286px) {
380
- .wp-statistics-travod .columns.column-1 {
381
- width: 23%;
382
- }
383
-
384
- .wp-statistics-travod .columns.column-3 {
385
- width: 32%;
386
- }
 
 
387
  }
388
 
389
- @media only screen and (max-width: 1150px) {
390
- .wp-statistics-travod .columns.column-1 {
391
- width: 30%;
392
- }
393
-
394
- .wp-statistics-travod .columns.column-2 {
395
- width: 70%;
396
- }
397
-
398
- .wp-statistics-travod .columns.column-3 {
399
- width: 100%;
400
- }
401
-
402
- .wp-statistics-travod .columns section {
403
- padding: 0;
404
- }
405
-
406
- .wp-statistics-travod .columns.column-3 section {
407
- margin-top: 11px;
408
- }
409
  }
410
 
411
- @media only screen and (max-width: 782px) {
412
- .wp-statistics-travod .columns.column-1 {
413
- width: 100%;
414
- }
415
-
416
- .wp-statistics-travod .columns.column-2 {
417
- width: 100%;
418
- }
419
- }
55
  float: right;
56
  }
57
 
58
+ .wp-statistics-settings #update_geoip {
59
+ margin-left: 5px;
60
+ margin-top: -5px;
61
+ line-height: 19px;
62
+ font-size: 12px;
63
+ height: 25px;
64
+ }
65
+
66
  @media only screen and (max-width: 1327px) {
67
  .wp-statistics-settings ul.tabs li {
68
  padding: 10px 5px;
271
  margin: 0 5px;
272
  }
273
 
274
+ .wp-statistics-welcome .center-section.logo img {
275
+ width: 150px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  }
277
 
278
+ .wp-statistics-welcome .center-section.logo > a {
279
+ display: inline-block;
280
  }
281
 
282
+ /* button Editor tinymce */
283
+ i.mce-i-icon-statistic {
284
+ font: 400 20px/1 dashicons;
285
+ padding: 0;
286
+ vertical-align: top;
287
+ speak: none;
288
+ -webkit-font-smoothing: antialiased;
289
+ -moz-osx-font-smoothing: grayscale;
290
+ margin-left: -2px;
291
+ padding-right: 2px
292
  }
293
 
294
+ .wp-statistic-mce-desc {
295
+ color: #b1b1b1 !important;
296
+ margin-left: 82px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  }
298
 
299
+ html[dir="rtl"] .wp-statistic-mce-desc {
300
+ text-align: right !important;
301
+ margin: 0 82px 0px 0px !important;
302
+ }
 
 
 
 
 
assets/css/log.css CHANGED
@@ -22,7 +22,7 @@
22
  float: right;
23
  }
24
 
25
- @media screen and (max-width: 960px) {
26
  #wps-postbox-container-1 {
27
  width: 35%;
28
  }
@@ -252,7 +252,8 @@
252
  #wps_summary_postbox,
253
  #wps_browsers_postbox,
254
  #wps_referring_postbox,
255
- #wps_countries_postbox {
 
256
  overflow: hidden;
257
  }
258
 
@@ -344,6 +345,7 @@
344
  border: 0px none;
345
  text-align: left;
346
  }
 
347
  .rtl .table-stats.left-align tr,
348
  .rtl .table-stats.left-align td {
349
  text-align: left !important;
@@ -353,6 +355,14 @@
353
  text-align: right !important;
354
  }
355
 
 
 
 
 
 
 
 
 
356
  .table-stats {
357
  border: 0px none !important;
358
  }
22
  float: right;
23
  }
24
 
25
+ @media screen and (max-width: 998px) {
26
  #wps-postbox-container-1 {
27
  width: 35%;
28
  }
252
  #wps_summary_postbox,
253
  #wps_browsers_postbox,
254
  #wps_referring_postbox,
255
+ #wps_countries_postbox,
256
+ #wps_words_postbox {
257
  overflow: hidden;
258
  }
259
 
345
  border: 0px none;
346
  text-align: left;
347
  }
348
+
349
  .rtl .table-stats.left-align tr,
350
  .rtl .table-stats.left-align td {
351
  text-align: left !important;
355
  text-align: right !important;
356
  }
357
 
358
+ .rtl .table-stats .log-tools {
359
+ float: right;
360
+ }
361
+
362
+ .rtl .table-stats .th-center {
363
+ text-align: center !important;
364
+ }
365
+
366
  .table-stats {
367
  border: 0px none !important;
368
  }
assets/images/qwant.png ADDED
Binary file
assets/images/veronalabs.svg ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 562 135">
2
+ <defs>
3
+ <style>
4
+ .cls-1 { fill:#2f2f2f; }
5
+ .cls-2 { fill:#00bdfe; }
6
+ </style>
7
+ </defs>
8
+
9
+ <g>
10
+ <path class="cls-1" d="M179.69 129.5c-4.83 0-23.26.26-28.07-.06-9-.6-13.68-5.42-14-14.4q-.39-12.48 0-25c.26-9.06 5.29-14.24 14.34-14.67 7-.33 14-.32 21 0 9.63.41 14.51 5.95 14.61 16 .1 10.5-4.57 16.15-14.31 16.72-6 .35-12 0-18 .18-2.57.08-3.17-1-3-3.23a28.46 28.46 0 0 0 0-5c-.24-2.46.82-3.14 3.15-3.07 4.66.14 9.33 0 14 0 3.63 0 6.91-.54 7-5.13s-2.95-5.45-6.72-5.41c-4.83.05-9.66.07-14.5 0-4.29-.07-6.55 1.76-6.5 6.24.07 6.66 0 13.33 0 20 0 3.86 1.77 5.8 5.8 5.75 8.33-.1 16.67.21 25-.13M109 111.89l20.83-53.5c1.51-3.86 9.19-6.66 12.68-4.49 2 1.25.14 2.74-.29 3.84-7 17.77-14 35.48-21.1 53.21-2 5.09-4.33 10.08-6 15.29-1.09 3.45-3.26 3.59-6.1 3.49-2.67-.1-4.91.19-6.25-3.26q-13.42-34.56-27.4-68.91c-1.37-3.48-.37-3.85 2.76-3.87C86 53.64 86 53.53 89 61z"/>
11
+ <path class="cls-2" d="M536.24 129.62h-8.49c-7 0-9-2.78-7.21-9.55.6-2.27 2.2-1.65 3.54-1.66 6.83-.06 13.65-.08 20.48 0 3.62 0 6.9-.3 6.93-5s-3-5.34-6.74-5.25c-4.33.11-8.67.17-13-.05-9.76-.5-14.83-6.19-14.83-16.36s5.07-16 14.81-16.36c7.81-.3 15.65 0 23.47-.13 2.2 0 3.21.42 3.34 3 .45 8.23.57 8.22-7.59 8.22h-17c-2.88 0-5.27.87-5.6 4.37-.37 4 1.41 6 5.34 6.12 4.83.11 9.66-.06 14.48.14 9.47.39 14.28 5.63 14.44 15.45.18 10.78-4.26 16.27-13.94 16.89-4.14.26-8.32 0-12.48 0z"/>
12
+ <path class="cls-1" d="M270.65 102.14c0-7.83.09-15.67-.05-23.5 0-2.56.63-3.47 3.33-3.43 10.5.15 21-.09 31.5.13 9.88.21 15.07 5.46 15.21 15.31.17 11.83 0 23.67.13 35.5 0 2.89-.9 3.6-3.68 3.61-7.52 0-7.52.16-7.52-7.17v-29c0-5.79-1.26-7.06-7-7.13-5.33-.06-10.68.21-16-.09-3.66-.21-4.9.77-4.81 4.64.27 11.49-.19 23 .22 34.49.19 5.12-2.8 4.2-5.66 4.16s-6.05 1.16-5.78-4c.41-7.84.11-15.66.11-23.52zM190.57 108.12c0-5.65-.08-11.31 0-17 .2-10.35 5.4-15.55 15.74-15.88a14.84 14.84 0 0 1 2.49 0c1.9.26 4.93-1.06 5.49.8a22.24 22.24 0 0 1 .15 9.38c-.28 1.85-2.56.91-3.92.94-8.08.2-8.81.88-8.82 8.89 0 10-.13 20 .07 29.92.07 3.3-.54 4.69-4.26 4.56-7-.24-7 0-7-7.2q.06-7.18.06-14.41z"/>
13
+ <path class="cls-2" d="M43.77.57c-.53 1-.78 1.57-1.13 2.09-4.75 7.19-4.72 7.24.56 13.75a41 41 0 0 1 4 5.71c2.06 3.67 1.72 7.25-.74 10.74-3 4.24-7.64 7.37-8.13 13.33-.16 1.92-2.83.74-4.34.93-1.73.22-2.31-.84-2.27-2.44.08-3.54 1.79-6.23 4.12-8.76 7.58-8.2 7.59-8.27.76-17.18-3.47-4.52-5.22-8.78-2-14.53C36.82.2 39.27-.77 43.77.57z"/>
14
+ <path class="cls-2" d="M79.5 123a27.61 27.61 0 0 0-5.22-10.13c-2.57-3.28-4.87-6.85-7.81-9.72-9.69-9.45-11.21-20.61-11.24-34 0-2.8.25-4.32 3.42-4.07 3.65.29 6.41-1.16 6.23-5.27-.17-3.82-2.93-4.73-6.33-4.71q-18.49.09-37 0c-3.46 0-6.21 1-6.39 4.71-.2 4 2.57 5.59 6.25 5.29 3-.24 3.65 1.06 3.56 3.76-.17 5.32-.18 10.66 0 16a10.22 10.22 0 0 1-2.64 7.23c-5.48 6.7-10.77 13.55-16.13 20.35a27 27 0 0 0-6 13c-.94 6.51 1.77 9.8 8.37 9.83 10.49.05 21 0 31.48 0 10 0 20.12.11 30 .11S81.29 130 79.5 123zm-12.08-.09c-1.28 2.8-4.15 2.29-6.6 2.31h-42c-2.31 0-4.94.32-6.15-2.24s.4-4.8 2-6.79c5.53-7.08 10.93-14.28 16.71-21.14a15.05 15.05 0 0 0 3.84-11.35c-.31-5 .19-10-.15-15-.28-4.16 10.36-4.86 10.15-.14-.26 6 0 12-.11 18a9.94 9.94 0 0 0 2.39 6.83c5.91 7.41 11.71 14.92 17.56 22.38 1.66 2.13 3.67 4.23 2.36 7.16z"/>
15
+ <path class="cls-1" d="M266.71 89.92c-.38-8.93-5-14-13.86-14.5a208.27 208.27 0 0 0-21.95 0c-8.18.42-12.86 4.49-13.66 12.49a125.62 125.62 0 0 0 .21 30.34c.95 6.61 5.11 10.38 11.69 11a133.05 133.05 0 0 0 25.41 0c7.11-.68 11.49-5.26 12-12.4.33-4.63.17-9.14.17-13.8.05.02.17-8.81-.01-13.13zm-11.09 12.59V113c0 3.49-1.44 5.36-5 5.36h-17.49c-3.32 0-5-1.73-5-4.9q-.12-11 0-22c0-3.22 1.89-4.93 5-5 5.83-.1 11.66-.13 17.48 0 3.38.08 5.09 2 5 5.5s.01 7.04.01 10.55zM373.63 90.57c-.19-9.81-5.38-14.93-15.27-15.26-1 0-1.92 0-2.88-.06h-27.16a1.29 1.29 0 0 0-1.32 1.29v8.61a1.29 1.29 0 0 0 1.29 1.29h28c3.62 0 6.23 1.2 6.23 5.38v21.49c0 3.5-1.91 5.09-5.37 5.07-5.66 0-11.33-.06-17 0-3.59 0-5.25-1.88-5.23-5.21s2-5.07 5.43-5c5.16.07 10.33-.07 15.49 0 2.22 0 3.51-.41 3.3-3a37.28 37.28 0 0 1 0-5.49c.15-2.27-.94-2.83-3-2.79-6.33.13-12.67-.12-19 .23-8.62.47-13.3 6-13.52 15.39-.24 10.11 4.2 16.15 13.1 16.74a200.25 200.25 0 0 0 23 .12c9-.44 13.64-5.4 13.88-14.37.21-8.1.18-16.27.03-24.43z"/>
16
+ <rect class="cls-2" x="392.48" y="53.6" width="11.13" height="76.05" rx="2.69" ry="2.69"/>
17
+ <path class="cls-2" d="M512.63 89.63c-.23-8.38-4.86-13.48-13.17-14.14a129.71 129.71 0 0 0-19.46-.1l-.12 11.1c4.82-.27 11.1-.09 15.93-.05 3.8 0 5.88 1.76 5.83 5.8q-.12 10.25 0 20.49c0 4-1.9 5.73-5.83 5.66-4.5-.09-9 0-13.5 0-5.67 0-7.54-.44-8.12-3.8V55.8a2.44 2.44 0 0 0-2.44-2.44h-6.49a2.44 2.44 0 0 0-2.44 2.44v58.77c.45 9.89 5.36 14.64 15.41 14.94 7 .21 14 .23 21-.15 8.41-.45 13.14-5.32 13.41-13.76.24-8.6.22-17.32-.01-25.97zM457.62 90.33c-.2-9.34-5.19-14.47-14.52-15-1.34-.07-2.68-.1-4-.11h-25.78a1.55 1.55 0 0 0-1.55 1.55v8.09a1.55 1.55 0 0 0 1.55 1.55h26.92c4.26 0 6.47 1.81 6.36 6.34-.15 6.66-.07 13.33 0 20 0 3.64-1.55 5.64-5.36 5.61-5.66 0-11.33-.06-17 0-3.6 0-5.26-1.86-5.24-5.2s2-5.08 5.45-5c3.83.07 7.66 0 11.49 0 7.91 0 7.81 0 7.35-8-.13-2.36-.87-3.23-3.24-3.17-6.16.14-12.34-.1-18.49.19-8.89.42-13.7 6-13.88 15.59-.18 10.07 4.36 16.05 13.3 16.58 7.47.44 15 .41 22.47.11 9.22-.37 14-5.36 14.17-14.61q.28-12.27 0-24.52z"/>
18
+ </g>
19
+ </svg>
assets/images/welcome/cache.png ADDED
Binary file
assets/images/welcome/country.png ADDED
Binary file
assets/images/welcome/gdpr.png DELETED
Binary file
assets/images/welcome/icon-love.png DELETED
Binary file
assets/images/welcome/shortcode.png ADDED
Binary file
assets/images/welcome/whichbrowser.png ADDED
Binary file
assets/images/welcome/wp-stats-ip.png DELETED
Binary file
assets/js/Chart.bundle.min.js CHANGED
@@ -1,10 +1,10 @@
1
  /*!
2
  * Chart.js
3
  * http://chartjs.org/
4
- * Version: 2.7.2
5
  *
6
  * Copyright 2018 Chart.js Contributors
7
  * Released under the MIT license
8
  * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
9
  */
10
- !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function t(e,i,n){function a(o,s){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[o]={exports:{}};e[o][0].call(d.exports,function(t){var i=e[o][1][t];return a(i||t)},d,d.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(t,e,i){var n=t(5);function a(t){if(t){var e=[0,0,0],i=1,a=t.match(/^#([a-fA-F0-9]{3})$/i);if(a){a=a[1];for(var r=0;r<e.length;r++)e[r]=parseInt(a[r]+a[r],16)}else if(a=t.match(/^#([a-fA-F0-9]{6})$/i)){a=a[1];for(r=0;r<e.length;r++)e[r]=parseInt(a.slice(2*r,2*r+2),16)}else if(a=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(a[r+1]);i=parseFloat(a[4])}else if(a=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(a[r+1]));i=parseFloat(a[4])}else if(a=t.match(/(\w+)/)){if("transparent"==a[1])return[0,0,0,0];if(!(e=n[a[1]]))return}for(r=0;r<e.length;r++)e[r]=d(e[r],0,255);return i=i||0==i?d(i,0,1):1,e[3]=i,e}}function r(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function o(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(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 u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function d(t,e,i){return Math.min(Math.max(e,t),i)}function h(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:a,getHsla:r,getRgb:function(t){var e=a(t);return e&&e.slice(0,3)},getHsl:function(t){var e=r(t);return e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=a(t);{if(e)return e[3];if(e=r(t))return e[3];if(e=o(t))return e[3]}},hexString:function(t){return"#"+h(t[0])+h(t[1])+h(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return s(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:s,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return u(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:u,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 c[t.slice(0,3)]}};var c={};for(var f in n)c[n[f]]=f},{5:5}],2:[function(t,e,i){var n=t(4),a=t(1),r=function(t){return t instanceof r?t:this instanceof r?(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=a.getRgba(t))?this.setValues("rgb",e):(e=a.getHsla(t))?this.setValues("hsl",e):(e=a.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 r(t);var e};r.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 a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.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=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.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,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,a=void 0===e?.5:e,r=2*a-1,o=i.alpha()-n.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*a+n.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new r,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},r.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},r.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},r.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},r.prototype.setValues=function(t,e){var i,a,r=this.values,o=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)r[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)r[t][i]=e[t.charAt(i)];l=e.a}else if(void 0!==e[o[t][0]]){var u=o[t];for(i=0;i<t.length;i++)r[t][i]=e[u[i]];l=e.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===l?r.alpha:l)),"alpha"===t)return!1;for(i=0;i<t.length;i++)a=Math.max(0,Math.min(s[t][i],r[t][i])),r[t][i]=Math.round(a);for(var d in o)d!==t&&(r[d]=n[t][d](r[t]));return!0},r.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},r.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=r),e.exports=r},{1:1,4:4}],3:[function(t,e,i){function n(t){var e,i,n=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+s)/2,[e,100*(s==o?0:i<=.5?l/(s+o):l/(2-s-o)),100*i]}function a(t){var e,i,n=t[0],a=t[1],r=t[2],o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return i=0==s?0:l/s*1e3/10,s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function o(t){var e=t[0],i=t[1],a=t[2];return[n(t)[0],100*(1/255*Math.min(e,Math.min(i,a))),100*(a=1-1/255*Math.max(e,Math.max(i,a)))]}function s(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function l(t){return S[JSON.stringify(t)]}function u(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=u(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function h(t){var e,i,n,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-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0&&n++,n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[u]=255*r;return a}function c(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*n*(1-i),s=255*n*(1-i*r),l=255*n*(1-i*(1-r));n*=255;switch(a){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}}function f(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function m(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function p(t){var e,i,n,a=t[0]/100,r=t[1]/100,o=t[2]/100;return i=-.9689*a+1.8758*r+.0415*o,n=.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:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function y(t){var e,i,n,a,r=t[0],o=t[1],s=t[2];return r<=8?a=(i=100*r/903.3)/100*7.787+16/116:(i=100*Math.pow((r+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function _(t){return p(y(t))}function k(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return M[t]}e.exports={rgb2hsl:n,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:h,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return o(h(t))},hsl2cmyk:function(t){return s(h(t))},hsl2keyword:function(t){return l(h(t))},hsv2rgb:c,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[n,100*(e=(e/=(i=(2-a)*r)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return o(c(t))},hsv2cmyk:function(t){return s(c(t))},hsv2keyword:function(t){return l(c(t))},hwb2rgb:f,hwb2hsl:function(t){return n(f(t))},hwb2hsv:function(t){return a(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:m,cmyk2hsl:function(t){return n(m(t))},cmyk2hsv:function(t){return a(m(t))},cmyk2hwb:function(t){return o(m(t))},cmyk2keyword:function(t){return l(m(t))},keyword2rgb:w,keyword2hsl:function(t){return n(w(t))},keyword2hsv:function(t){return a(w(t))},keyword2hwb:function(t){return o(w(t))},keyword2cmyk:function(t){return s(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return u(w(t))},xyz2rgb:p,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:y,lab2rgb:_,lab2lch:x,lch2lab:k,lch2xyz:function(t){return y(k(t))},lch2rgb:function(t){return _(k(t))}};var M={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]},S={};for(var D in M)S[JSON.stringify(M[D])]=D},{}],4:[function(t,e,i){var n=t(3),a=function(){return new u};for(var r in n){a[r+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(r);var o=/(\w+)2(\w+)/.exec(r),s=o[1],l=o[2];(a[s]=a[s]||{})[l]=a[r]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var a=0;a<i.length;a++)i[a]=Math.round(i[a]);return i}}(r)}var u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=a[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){u.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=a},{3:3}],5:[function(t,e,i){"use strict";e.exports={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]}},{}],6:[function(t,e,i){var n,a;n=this,a=function(){"use strict";var i,n;function a(){return i.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)h(e,i)&&(t[i]=e[i]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e,i,n){return Pe(t,e,i,n,!0).utc()}function g(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function m(t){if(null==t._isValid){var e=g(t),i=n.call(e.parsedDateParts,function(t){return null!=t}),a=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(a=a&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return a;t._isValid=a}return t._isValid}function p(t){var e=f(NaN);return null!=t?c(g(e),t):g(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var v=a.momentProperties=[];function y(t,e){var i,n,a;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=g(e)),s(e._locale)||(t._locale=e._locale),v.length>0)for(i=0;i<v.length;i++)s(a=e[n=v[i]])||(t[n]=a);return t}var b=!1;function x(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=k(e)),i}function M(t,e,i){var n,a=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(n=0;n<a;n++)(i&&t[n]!==e[n]||!i&&w(t[n])!==w(e[n]))&&o++;return o+r}function S(t){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function D(t,e){var i=!0;return c(function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,t),i){for(var n,r=[],o=0;o<arguments.length;o++){if(n="","object"==typeof arguments[o]){for(var s in n+="\n["+o+"] ",arguments[0])n+=s+": "+arguments[0][s]+", ";n=n.slice(0,-2)}else n=arguments[o];r.push(n)}S(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)},e)}var C,P={};function T(t,e){null!=a.deprecationHandler&&a.deprecationHandler(t,e),P[t]||(S(e),P[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function I(t,e){var i,n=c({},t);for(i in e)h(e,i)&&(o(t[i])&&o(e[i])?(n[i]={},c(n[i],t[i]),c(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)h(t,i)&&!h(e,i)&&o(t[i])&&(n[i]=c({},n[i]));return n}function A(t){null!=t&&this.set(t)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,C=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)h(t,e)&&i.push(e);return i};var F={};function R(t,e){var i=t.toLowerCase();F[i]=F[i+"s"]=F[e]=t}function L(t){return"string"==typeof t?F[t]||F[t.toLowerCase()]:void 0}function W(t){var e,i,n={};for(i in t)h(t,i)&&(e=L(i))&&(n[e]=t[i]);return n}var Y={};function N(t,e){Y[t]=e}function z(t,e,i){var n=""+Math.abs(t),a=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},E={};function j(t,e,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),t&&(E[t]=a),e&&(E[e[0]]=function(){return z(a.apply(this,arguments),e[1],e[2])}),i&&(E[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function U(t,e){return t.isValid()?(e=q(e,t.localeData()),B[e]=B[e]||function(t){var e,i,n,a=t.match(H);for(e=0,i=a.length;e<i;e++)E[a[e]]?a[e]=E[a[e]]:a[e]=(n=a[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,r="";for(n=0;n<i;n++)r+=O(a[n])?a[n].call(e,t):a[n];return r}}(e),B[e](t)):t.localeData().invalidDate()}function q(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(V.lastIndex=0;i>=0&&V.test(t);)t=t.replace(V,n),V.lastIndex=0,i-=1;return t}var G=/\d/,Z=/\d\d/,X=/\d{3}/,J=/\d{4}/,K=/[+-]?\d{6}/,$=/\d\d?/,Q=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,it=/\d{1,4}/,nt=/[+-]?\d{1,6}/,at=/\d+/,rt=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,lt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function dt(t,e,i){ut[t]=O(e)?e:function(t,n){return t&&i?i:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ct(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,a){return e||i||n||a})))}function ct(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ft={};function gt(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),l(e)&&(n=function(t,i){i[e]=w(t)}),i=0;i<t.length;i++)ft[t[i]]=n}function mt(t,e){gt(t,function(t,i,n,a){n._w=n._w||{},e(t,n._w,n,a)})}var pt=0,vt=1,yt=2,bt=3,xt=4,_t=5,kt=6,wt=7,Mt=8;function St(t){return Dt(t)?366:365}function Dt(t){return t%4==0&&t%100!=0||t%400==0}j("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),R("year","y"),N("year",1),dt("Y",rt),dt("YY",$,Z),dt("YYYY",it,J),dt("YYYYY",nt,K),dt("YYYYYY",nt,K),gt(["YYYYY","YYYYYY"],pt),gt("YYYY",function(t,e){e[pt]=2===t.length?a.parseTwoDigitYear(t):w(t)}),gt("YY",function(t,e){e[pt]=a.parseTwoDigitYear(t)}),gt("Y",function(t,e){e[pt]=parseInt(t,10)}),a.parseTwoDigitYear=function(t){return w(t)+(w(t)>68?1900:2e3)};var Ct,Pt=Tt("FullYear",!0);function Tt(t,e){return function(i){return null!=i?(It(this,t,i),a.updateOffset(this,e),this):Ot(this,t)}}function Ot(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function It(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&Dt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),At(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function At(t,e){if(isNaN(t)||isNaN(e))return NaN;var i,n=(e%(i=12)+i)%i;return t+=(e-n)/12,1===n?Dt(t)?29:28:31-n%7%2}Ct=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),j("MMMM",0,0,function(t){return this.localeData().months(this,t)}),R("month","M"),N("month",8),dt("M",$),dt("MM",$,Z),dt("MMM",function(t,e){return e.monthsShortRegex(t)}),dt("MMMM",function(t,e){return e.monthsRegex(t)}),gt(["M","MM"],function(t,e){e[vt]=w(t)-1}),gt(["MMM","MMMM"],function(t,e,i,n){var a=i._locale.monthsParse(t,n,i._strict);null!=a?e[vt]=a:g(i).invalidMonth=t});var Ft=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Lt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Wt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!l(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),At(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Yt(t){return null!=t?(Wt(this,t),a.updateOffset(this,!0),this):Ot(this,"Month")}var Nt=lt;var zt=lt;function Ht(){function t(t,e){return e.length-t.length}var e,i,n=[],a=[],r=[];for(e=0;e<12;e++)i=f([2e3,e]),n.push(this.monthsShort(i,"")),a.push(this.months(i,"")),r.push(this.months(i,"")),r.push(this.monthsShort(i,""));for(n.sort(t),a.sort(t),r.sort(t),e=0;e<12;e++)n[e]=ct(n[e]),a[e]=ct(a[e]);for(e=0;e<24;e++)r[e]=ct(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Vt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Bt(t,e,i){var n=7+e-i;return-((7+Vt(t,0,n).getUTCDay()-e)%7)+n-1}function Et(t,e,i,n,a){var r,o,s=1+7*(e-1)+(7+i-n)%7+Bt(t,n,a);return s<=0?o=St(r=t-1)+s:s>St(t)?(r=t+1,o=s-St(t)):(r=t,o=s),{year:r,dayOfYear:o}}function jt(t,e,i){var n,a,r=Bt(t.year(),e,i),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?n=o+Ut(a=t.year()-1,e,i):o>Ut(t.year(),e,i)?(n=o-Ut(t.year(),e,i),a=t.year()+1):(a=t.year(),n=o),{week:n,year:a}}function Ut(t,e,i){var n=Bt(t,e,i),a=Bt(t+1,e,i);return(St(t)-n+a)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),N("week",5),N("isoWeek",5),dt("w",$),dt("ww",$,Z),dt("W",$),dt("WW",$,Z),mt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=w(t)});j("d",0,"do","day"),j("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),j("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),j("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),dt("d",$),dt("e",$),dt("E",$),dt("dd",function(t,e){return e.weekdaysMinRegex(t)}),dt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),dt("dddd",function(t,e){return e.weekdaysRegex(t)}),mt(["dd","ddd","dddd"],function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:g(i).invalidWeekday=t}),mt(["d","e","E"],function(t,e,i,n){e[n]=w(t)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Xt=lt;var Jt=lt;var Kt=lt;function $t(){function t(t,e){return e.length-t.length}var e,i,n,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)i=f([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),r=this.weekdays(i,""),o.push(n),s.push(a),l.push(r),u.push(n),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ct(s[e]),l[e]=ct(l[e]),u[e]=ct(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Qt(){return this.hours()%12||12}function te(t,e){j(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ee(t,e){return e._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Qt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+Qt.apply(this)+z(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Qt.apply(this)+z(this.minutes(),2)+z(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+z(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+z(this.minutes(),2)+z(this.seconds(),2)}),te("a",!0),te("A",!1),R("hour","h"),N("hour",13),dt("a",ee),dt("A",ee),dt("H",$),dt("h",$),dt("k",$),dt("HH",$,Z),dt("hh",$,Z),dt("kk",$,Z),dt("hmm",Q),dt("hmmss",tt),dt("Hmm",Q),dt("Hmmss",tt),gt(["H","HH"],bt),gt(["k","kk"],function(t,e,i){var n=w(t);e[bt]=24===n?0:n}),gt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),gt(["h","hh"],function(t,e,i){e[bt]=w(t),g(i).bigHour=!0}),gt("hmm",function(t,e,i){var n=t.length-2;e[bt]=w(t.substr(0,n)),e[xt]=w(t.substr(n)),g(i).bigHour=!0}),gt("hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[bt]=w(t.substr(0,n)),e[xt]=w(t.substr(n,2)),e[_t]=w(t.substr(a)),g(i).bigHour=!0}),gt("Hmm",function(t,e,i){var n=t.length-2;e[bt]=w(t.substr(0,n)),e[xt]=w(t.substr(n))}),gt("Hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[bt]=w(t.substr(0,n)),e[xt]=w(t.substr(n,2)),e[_t]=w(t.substr(a))});var ie,ne=Tt("Hours",!0),ae={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Rt,monthsShort:Lt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Zt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},re={},oe={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function le(i){var n=null;if(!re[i]&&void 0!==e&&e&&e.exports)try{n=ie._abbr,t("./locale/"+i),ue(n)}catch(t){}return re[i]}function ue(t,e){var i;return t&&(i=s(e)?he(t):de(t,e))&&(ie=i),ie._abbr}function de(t,e){if(null!==e){var i=ae;if(e.abbr=t,null!=re[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=re[t]._config;else if(null!=e.parentLocale){if(null==re[e.parentLocale])return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;i=re[e.parentLocale]._config}return re[t]=new A(I(i,e)),oe[t]&&oe[t].forEach(function(t){de(t.name,t.config)}),ue(t),re[t]}return delete re[t],null}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ie;if(!r(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,i,n,a,r=0;r<t.length;){for(e=(a=se(t[r]).split("-")).length,i=(i=se(t[r+1]))?i.split("-"):null;e>0;){if(n=le(a.slice(0,e).join("-")))return n;if(i&&i.length>=e&&M(a,i,!0)>=e-1)break;e--}r++}return null}(t)}function ce(t){var e,i=t._a;return i&&-2===g(t).overflow&&(e=i[vt]<0||i[vt]>11?vt:i[yt]<1||i[yt]>At(i[pt],i[vt])?yt:i[bt]<0||i[bt]>24||24===i[bt]&&(0!==i[xt]||0!==i[_t]||0!==i[kt])?bt:i[xt]<0||i[xt]>59?xt:i[_t]<0||i[_t]>59?_t:i[kt]<0||i[kt]>999?kt:-1,g(t)._overflowDayOfYear&&(e<pt||e>yt)&&(e=yt),g(t)._overflowWeeks&&-1===e&&(e=wt),g(t)._overflowWeekday&&-1===e&&(e=Mt),g(t).overflow=e),t}function fe(t,e,i){return null!=t?t:null!=e?e:i}function ge(t){var e,i,n,r,o,s=[];if(!t._d){var l,u;for(l=t,u=new Date(a.now()),n=l._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[yt]&&null==t._a[vt]&&function(t){var e,i,n,a,r,o,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,o=4,i=fe(e.GG,t._a[pt],jt(Te(),1,4).year),n=fe(e.W,1),((a=fe(e.E,1))<1||a>7)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var u=jt(Te(),r,o);i=fe(e.gg,t._a[pt],u.year),n=fe(e.w,u.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r}n<1||n>Ut(i,r,o)?g(t)._overflowWeeks=!0:null!=l?g(t)._overflowWeekday=!0:(s=Et(i,n,a,r,o),t._a[pt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=fe(t._a[pt],n[pt]),(t._dayOfYear>St(o)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),i=Vt(o,0,t._dayOfYear),t._a[vt]=i.getUTCMonth(),t._a[yt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[bt]&&0===t._a[xt]&&0===t._a[_t]&&0===t._a[kt]&&(t._nextDay=!0,t._a[bt]=0),t._d=(t._useUTC?Vt:function(t,e,i,n,a,r,o){var s=new Date(t,e,i,n,a,r,o);return t<100&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(g(t).weekdayMismatch=!0)}}var me=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ve=/Z|[+-]\d\d(?::?\d\d)?/,ye=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xe=/^\/?Date\((\-?\d+)/i;function _e(t){var e,i,n,a,r,o,s=t._i,l=me.exec(s)||pe.exec(s);if(l){for(g(t).iso=!0,e=0,i=ye.length;e<i;e++)if(ye[e][1].exec(l[1])){a=ye[e][0],n=!1!==ye[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,i=be.length;e<i;e++)if(be[e][1].exec(l[3])){r=(l[2]||" ")+be[e][0];break}if(null==r)return void(t._isValid=!1)}if(!n&&null!=r)return void(t._isValid=!1);if(l[4]){if(!ve.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),De(t)}else t._isValid=!1}var ke=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function we(t,e,i,n,a,r){var o=[function(t){var e=parseInt(t,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(t),Lt.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(a,10)];return r&&o.push(parseInt(r,10)),o}var Me={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Se(t){var e,i,n,a=ke.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(a){var r=we(a[4],a[3],a[2],a[5],a[6],a[7]);if(e=a[1],i=r,n=t,e&&Gt.indexOf(e)!==new Date(i[0],i[1],i[2]).getDay()&&(g(n).weekdayMismatch=!0,n._isValid=!1,1))return;t._a=r,t._tzm=function(t,e,i){if(t)return Me[t];if(e)return 0;var n=parseInt(i,10),a=n%100;return(n-a)/100*60+a}(a[8],a[9],a[10]),t._d=Vt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),g(t).rfc2822=!0}else t._isValid=!1}function De(t){if(t._f!==a.ISO_8601)if(t._f!==a.RFC_2822){t._a=[],g(t).empty=!0;var e,i,n,r,o,s,l,u,d=""+t._i,c=d.length,f=0;for(n=q(t._f,t._locale).match(H)||[],e=0;e<n.length;e++)r=n[e],(i=(d.match(ht(r,t))||[])[0])&&((o=d.substr(0,d.indexOf(i))).length>0&&g(t).unusedInput.push(o),d=d.slice(d.indexOf(i)+i.length),f+=i.length),E[r]?(i?g(t).empty=!1:g(t).unusedTokens.push(r),s=r,u=t,null!=(l=i)&&h(ft,s)&&ft[s](l,u._a,u,s)):t._strict&&!i&&g(t).unusedTokens.push(r);g(t).charsLeftOver=c-f,d.length>0&&g(t).unusedInput.push(d),t._a[bt]<=12&&!0===g(t).bigHour&&t._a[bt]>0&&(g(t).bigHour=void 0),g(t).parsedDateParts=t._a.slice(0),g(t).meridiem=t._meridiem,t._a[bt]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[bt],t._meridiem),ge(t),ce(t)}else Se(t);else _e(t)}function Ce(t){var e,i,n,h,f=t._i,v=t._f;return t._locale=t._locale||he(t._l),null===f||void 0===v&&""===f?p({nullInput:!0}):("string"==typeof f&&(t._i=f=t._locale.preparse(f)),_(f)?new x(ce(f)):(u(f)?t._d=f:r(v)?function(t){var e,i,n,a,r;if(0===t._f.length)return g(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)r=0,e=y({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],De(e),m(e)&&(r+=g(e).charsLeftOver,r+=10*g(e).unusedTokens.length,g(e).score=r,(null==n||r<n)&&(n=r,i=e));c(t,i||e)}(t):v?De(t):s(i=(e=t)._i)?e._d=new Date(a.now()):u(i)?e._d=new Date(i.valueOf()):"string"==typeof i?(n=e,null===(h=xe.exec(n._i))?(_e(n),!1===n._isValid&&(delete n._isValid,Se(n),!1===n._isValid&&(delete n._isValid,a.createFromInputFallback(n)))):n._d=new Date(+h[1])):r(i)?(e._a=d(i.slice(0),function(t){return parseInt(t,10)}),ge(e)):o(i)?function(t){if(!t._d){var e=W(t._i);t._a=d([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ge(t)}}(e):l(i)?e._d=new Date(i):a.createFromInputFallback(e),m(t)||(t._d=null),t))}function Pe(t,e,i,n,a){var s,l={};return!0!==i&&!1!==i||(n=i,i=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||r(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=i,l._i=t,l._f=e,l._strict=n,(s=new x(ce(Ce(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Te(t,e,i,n){return Pe(t,e,i,n,!1)}a.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),a.ISO_8601=function(){},a.RFC_2822=function(){};var Oe=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Te.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:p()}),Ie=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Te.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:p()});function Ae(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Te();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}var Fe=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Re(t){var e=W(t),i=e.year||0,n=e.quarter||0,a=e.month||0,r=e.week||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Ct.call(Fe,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<Fe.length;++n)if(t[Fe[n]]){if(i)return!1;parseFloat(t[Fe[n]])!==w(t[Fe[n]])&&(i=!0)}return!0}(e),this._milliseconds=+d+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*n+12*i,this._data={},this._locale=he(),this._bubble()}function Le(t){return t instanceof Re}function We(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ye(t,e){j(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+z(~~(t/60),2)+e+z(~~t%60,2)})}Ye("Z",":"),Ye("ZZ",""),dt("Z",st),dt("ZZ",st),gt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ze(st,t)});var Ne=/([\+\-]|\d\d)/gi;function ze(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Ne)||["-",0,0],a=60*n[1]+w(n[2]);return 0===a?0:"+"===n[0]?a:-a}function He(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(_(t)||u(t)?t.valueOf():Te(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),a.updateOffset(i,!1),i):Te(t).local()}function Ve(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Be(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}a.updateOffset=function(){};var Ee=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,je=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ue(t,e){var i,n,a,r=t,o=null;return Le(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(r={},e?r[e]=t:r.milliseconds=t):(o=Ee.exec(t))?(i="-"===o[1]?-1:1,r={y:0,d:w(o[yt])*i,h:w(o[bt])*i,m:w(o[xt])*i,s:w(o[_t])*i,ms:w(We(1e3*o[kt]))*i}):(o=je.exec(t))?(i="-"===o[1]?-1:(o[1],1),r={y:qe(o[2],i),M:qe(o[3],i),w:qe(o[4],i),d:qe(o[5],i),h:qe(o[6],i),m:qe(o[7],i),s:qe(o[8],i)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=function(t,e){var i;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=He(e,t),t.isBefore(e)?i=Ge(t,e):((i=Ge(e,t)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(Te(r.from),Te(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),n=new Re(r),Le(t)&&h(t,"_locale")&&(n._locale=t._locale),n}function qe(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Ge(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ze(t,e){return function(i,n){var a;return null===n||isNaN(+n)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=i,i=n,n=a),Xe(this,Ue(i="string"==typeof i?+i:i,n),t),this}}function Xe(t,e,i,n){var r=e._milliseconds,o=We(e._days),s=We(e._months);t.isValid()&&(n=null==n||n,s&&Wt(t,Ot(t,"Month")+s*i),o&&It(t,"Date",Ot(t,"Date")+o*i),r&&t._d.setTime(t._d.valueOf()+r*i),n&&a.updateOffset(t,o||s))}Ue.fn=Re.prototype,Ue.invalid=function(){return Ue(NaN)};var Je=Ze(1,"add"),Ke=Ze(-1,"subtract");function $e(t,e){var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=he(t))&&(this._locale=e),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ti=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function ei(){return this._locale}function ii(t,e){j(0,[t,t.length],0,e)}function ni(t,e,i,n,a){var r;return null==t?jt(this,n,a).year:(e>(r=Ut(t,n,a))&&(e=r),function(t,e,i,n,a){var r=Et(t,e,i,n,a),o=Vt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,i,n,a))}j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ii("gggg","weekYear"),ii("ggggg","weekYear"),ii("GGGG","isoWeekYear"),ii("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),dt("G",rt),dt("g",rt),dt("GG",$,Z),dt("gg",$,Z),dt("GGGG",it,J),dt("gggg",it,J),dt("GGGGG",nt,K),dt("ggggg",nt,K),mt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=w(t)}),mt(["gg","GG"],function(t,e,i,n){e[n]=a.parseTwoDigitYear(t)}),j("Q",0,"Qo","quarter"),R("quarter","Q"),N("quarter",7),dt("Q",G),gt("Q",function(t,e){e[vt]=3*(w(t)-1)}),j("D",["DD",2],"Do","date"),R("date","D"),N("date",9),dt("D",$),dt("DD",$,Z),dt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),gt(["D","DD"],yt),gt("Do",function(t,e){e[yt]=w(t.match($)[0])});var ai=Tt("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),N("dayOfYear",4),dt("DDD",et),dt("DDDD",X),gt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=w(t)}),j("m",["mm",2],0,"minute"),R("minute","m"),N("minute",14),dt("m",$),dt("mm",$,Z),gt(["m","mm"],xt);var ri=Tt("Minutes",!1);j("s",["ss",2],0,"second"),R("second","s"),N("second",15),dt("s",$),dt("ss",$,Z),gt(["s","ss"],_t);var oi,si=Tt("Seconds",!1);for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),N("millisecond",16),dt("S",et,G),dt("SS",et,Z),dt("SSS",et,X),oi="SSSS";oi.length<=9;oi+="S")dt(oi,at);function li(t,e){e[kt]=w(1e3*("0."+t))}for(oi="S";oi.length<=9;oi+="S")gt(oi,li);var ui=Tt("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var di=x.prototype;function hi(t){return t}di.add=Je,di.calendar=function(t,e){var i=t||Te(),n=He(i,this).startOf("day"),r=a.calendarFormat(this,n)||"sameElse",o=e&&(O(e[r])?e[r].call(this,i):e[r]);return this.format(o||this.localeData().calendar(r,this,Te(i)))},di.clone=function(){return new x(this)},di.diff=function(t,e,i){var n,a,r;if(!this.isValid())return NaN;if(!(n=He(t,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),e=L(e)){case"year":r=$e(this,n)/12;break;case"month":r=$e(this,n);break;case"quarter":r=$e(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-a)/864e5;break;case"week":r=(this-n-a)/6048e5;break;default:r=this-n}return i?r:k(r)},di.endOf=function(t){return void 0===(t=L(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},di.format=function(t){t||(t=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var e=U(this,t);return this.localeData().postformat(e)},di.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Te(t).isValid())?Ue({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},di.fromNow=function(t){return this.from(Te(),t)},di.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||Te(t).isValid())?Ue({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},di.toNow=function(t){return this.to(Te(),t)},di.get=function(t){return O(this[t=L(t)])?this[t]():this},di.invalidAt=function(){return g(this).overflow},di.isAfter=function(t,e){var i=_(t)?t:Te(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(s(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},di.isBefore=function(t,e){var i=_(t)?t:Te(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(s(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},di.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},di.isSame=function(t,e){var i,n=_(t)?t:Te(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=L(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},di.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},di.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},di.isValid=function(){return m(this)},di.lang=ti,di.locale=Qe,di.localeData=ei,di.max=Ie,di.min=Oe,di.parsingFlags=function(){return c({},g(this))},di.set=function(t,e){if("object"==typeof t)for(var i=function(t){var e=[];for(var i in t)e.push({unit:i,priority:Y[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=W(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(O(this[t=L(t)]))return this[t](e);return this},di.startOf=function(t){switch(t=L(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},di.subtract=Ke,di.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},di.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},di.toDate=function(){return new Date(this.valueOf())},di.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?U(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",U(i,"Z")):U(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},di.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+a)},di.toJSON=function(){return this.isValid()?this.toISOString():null},di.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},di.unix=function(){return Math.floor(this.valueOf()/1e3)},di.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},di.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},di.year=Pt,di.isLeapYear=function(){return Dt(this.year())},di.weekYear=function(t){return ni.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},di.isoWeekYear=function(t){return ni.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},di.quarter=di.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},di.month=Yt,di.daysInMonth=function(){return At(this.year(),this.month())},di.week=di.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},di.isoWeek=di.isoWeeks=function(t){var e=jt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},di.weeksInYear=function(){var t=this.localeData()._week;return Ut(this.year(),t.dow,t.doy)},di.isoWeeksInYear=function(){return Ut(this.year(),1,4)},di.date=ai,di.day=di.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,i=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=i.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-n,"d")):n},di.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},di.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=(i=t,n=this.localeData(),"string"==typeof i?n.weekdaysParse(i)%7||7:isNaN(i)?null:i);return this.day(this.day()%7?e:e-7)}return this.day()||7;var i,n},di.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},di.hour=di.hours=ne,di.minute=di.minutes=ri,di.second=di.seconds=si,di.millisecond=di.milliseconds=ui,di.utcOffset=function(t,e,i){var n,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=ze(st,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(n=Ve(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!e||this._changeInProgress?Xe(this,Ue(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Ve(this)},di.utc=function(t){return this.utcOffset(0,t)},di.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ve(this),"m")),this},di.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=ze(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},di.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Te(t).utcOffset():0,(this.utcOffset()-t)%60==0)},di.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},di.isLocal=function(){return!!this.isValid()&&!this._isUTC},di.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},di.isUtc=Be,di.isUTC=Be,di.zoneAbbr=function(){return this._isUTC?"UTC":""},di.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},di.dates=D("dates accessor is deprecated. Use date instead.",ai),di.months=D("months accessor is deprecated. Use month instead",Yt),di.years=D("years accessor is deprecated. Use year instead",Pt),di.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),di.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(y(t,this),(t=Ce(t))._a){var e=t._isUTC?f(t._a):Te(t._a);this._isDSTShifted=this.isValid()&&M(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var ci=A.prototype;function fi(t,e,i,n){var a=he(),r=f().set(n,e);return a[i](r,t)}function gi(t,e,i){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return fi(t,e,i,"month");var n,a=[];for(n=0;n<12;n++)a[n]=fi(t,n,i,"month");return a}function mi(t,e,i,n){"boolean"==typeof t?(l(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,l(e)&&(i=e,e=void 0),e=e||"");var a,r=he(),o=t?r._week.dow:0;if(null!=i)return fi(e,(i+o)%7,n,"day");var s=[];for(a=0;a<7;a++)s[a]=fi(e,(a+o)%7,n,"day");return s}ci.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return O(n)?n.call(e,i):n},ci.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},ci.invalidDate=function(){return this._invalidDate},ci.ordinal=function(t){return this._ordinal.replace("%d",t)},ci.preparse=hi,ci.postformat=hi,ci.relativeTime=function(t,e,i,n){var a=this._relativeTime[i];return O(a)?a(t,e,i,n):a.replace(/%d/i,t)},ci.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return O(i)?i(e):i.replace(/%s/i,e)},ci.set=function(t){var e,i;for(i in t)O(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ci.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Ft).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone},ci.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Ft.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ci.monthsParse=function(t,e,i){var n,a,r;if(this._monthsParseExact)return function(t,e,i){var n,a,r,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(a=Ct.call(this._shortMonthsParse,o))?a:null:-1!==(a=Ct.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=Ct.call(this._shortMonthsParse,o))?a:-1!==(a=Ct.call(this._longMonthsParse,o))?a:null:-1!==(a=Ct.call(this._longMonthsParse,o))?a:-1!==(a=Ct.call(this._shortMonthsParse,o))?a:null}.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=f([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},ci.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Ht.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=zt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},ci.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Ht.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Nt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},ci.week=function(t){return jt(t,this._week.dow,this._week.doy).week},ci.firstDayOfYear=function(){return this._week.doy},ci.firstDayOfWeek=function(){return this._week.dow},ci.weekdays=function(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone},ci.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},ci.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},ci.weekdaysParse=function(t,e,i){var n,a,r;if(this._weekdaysParseExact)return function(t,e,i){var n,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(a=Ct.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=Ct.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Ct.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=Ct.call(this._weekdaysParse,o))?a:-1!==(a=Ct.call(this._shortWeekdaysParse,o))?a:-1!==(a=Ct.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=Ct.call(this._shortWeekdaysParse,o))?a:-1!==(a=Ct.call(this._weekdaysParse,o))?a:-1!==(a=Ct.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Ct.call(this._minWeekdaysParse,o))?a:-1!==(a=Ct.call(this._weekdaysParse,o))?a:-1!==(a=Ct.call(this._shortWeekdaysParse,o))?a:null}.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},ci.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Xt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},ci.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ci.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Kt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ci.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ci.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},ue("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),a.lang=D("moment.lang is deprecated. Use moment.locale instead.",ue),a.langData=D("moment.langData is deprecated. Use moment.localeData instead.",he);var pi=Math.abs;function vi(t,e,i,n){var a=Ue(e,i);return t._milliseconds+=n*a._milliseconds,t._days+=n*a._days,t._months+=n*a._months,t._bubble()}function yi(t){return t<0?Math.floor(t):Math.ceil(t)}function bi(t){return 4800*t/146097}function xi(t){return 146097*t/4800}function _i(t){return function(){return this.as(t)}}var ki=_i("ms"),wi=_i("s"),Mi=_i("m"),Si=_i("h"),Di=_i("d"),Ci=_i("w"),Pi=_i("M"),Ti=_i("y");function Oi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ii=Oi("milliseconds"),Ai=Oi("seconds"),Fi=Oi("minutes"),Ri=Oi("hours"),Li=Oi("days"),Wi=Oi("months"),Yi=Oi("years");var Ni=Math.round,zi={ss:44,s:45,m:45,h:22,d:26,M:11};var Hi=Math.abs;function Vi(t){return(t>0)-(t<0)||+t}function Bi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=Hi(this._milliseconds)/1e3,n=Hi(this._days),a=Hi(this._months);e=k((t=k(i/60))/60),i%=60,t%=60;var r=k(a/12),o=a%=12,s=n,l=e,u=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vi(this._months)!==Vi(h)?"-":"",g=Vi(this._days)!==Vi(h)?"-":"",m=Vi(this._milliseconds)!==Vi(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?g+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var Ei=Re.prototype;return Ei.isValid=function(){return this._isValid},Ei.abs=function(){var t=this._data;return this._milliseconds=pi(this._milliseconds),this._days=pi(this._days),this._months=pi(this._months),t.milliseconds=pi(t.milliseconds),t.seconds=pi(t.seconds),t.minutes=pi(t.minutes),t.hours=pi(t.hours),t.months=pi(t.months),t.years=pi(t.years),this},Ei.add=function(t,e){return vi(this,t,e,1)},Ei.subtract=function(t,e){return vi(this,t,e,-1)},Ei.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=L(t))||"year"===t)return e=this._days+n/864e5,i=this._months+bi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(xi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Ei.asMilliseconds=ki,Ei.asSeconds=wi,Ei.asMinutes=Mi,Ei.asHours=Si,Ei.asDays=Di,Ei.asWeeks=Ci,Ei.asMonths=Pi,Ei.asYears=Ti,Ei.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Ei._bubble=function(){var t,e,i,n,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*yi(xi(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=k(r/1e3),l.seconds=t%60,e=k(t/60),l.minutes=e%60,i=k(e/60),l.hours=i%24,s+=a=k(bi(o+=k(i/24))),o-=yi(xi(a)),n=k(s/12),s%=12,l.days=o,l.months=s,l.years=n,this},Ei.clone=function(){return Ue(this)},Ei.get=function(t){return t=L(t),this.isValid()?this[t+"s"]():NaN},Ei.milliseconds=Ii,Ei.seconds=Ai,Ei.minutes=Fi,Ei.hours=Ri,Ei.days=Li,Ei.weeks=function(){return k(this.days()/7)},Ei.months=Wi,Ei.years=Yi,Ei.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,i,n,a,r,o,s,l,u,d,h,c=this.localeData(),f=(i=!t,n=c,a=Ue(e=this).abs(),r=Ni(a.as("s")),o=Ni(a.as("m")),s=Ni(a.as("h")),l=Ni(a.as("d")),u=Ni(a.as("M")),d=Ni(a.as("y")),(h=r<=zi.ss&&["s",r]||r<zi.s&&["ss",r]||o<=1&&["m"]||o<zi.m&&["mm",o]||s<=1&&["h"]||s<zi.h&&["hh",s]||l<=1&&["d"]||l<zi.d&&["dd",l]||u<=1&&["M"]||u<zi.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=i,h[3]=+e>0,h[4]=n,function(t,e,i,n,a){return a.relativeTime(e||1,!!i,t,n)}.apply(null,h));return t&&(f=c.pastFuture(+this,f)),c.postformat(f)},Ei.toISOString=Bi,Ei.toString=Bi,Ei.toJSON=Bi,Ei.locale=Qe,Ei.localeData=ei,Ei.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Bi),Ei.lang=ti,j("X",0,0,"unix"),j("x",0,0,"valueOf"),dt("x",rt),dt("X",/[+-]?\d+(\.\d{1,3})?/),gt("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),gt("x",function(t,e,i){i._d=new Date(w(t))}),a.version="2.20.1",i=Te,a.fn=di,a.min=function(){return Ae("isBefore",[].slice.call(arguments,0))},a.max=function(){return Ae("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=f,a.unix=function(t){return Te(1e3*t)},a.months=function(t,e){return gi(t,e,"months")},a.isDate=u,a.locale=ue,a.invalid=p,a.duration=Ue,a.isMoment=_,a.weekdays=function(t,e,i){return mi(t,e,i,"weekdays")},a.parseZone=function(){return Te.apply(null,arguments).parseZone()},a.localeData=he,a.isDuration=Le,a.monthsShort=function(t,e){return gi(t,e,"monthsShort")},a.weekdaysMin=function(t,e,i){return mi(t,e,i,"weekdaysMin")},a.defineLocale=de,a.updateLocale=function(t,e){if(null!=e){var i,n,a=ae;null!=(n=le(t))&&(a=n._config),(i=new A(e=I(a,e))).parentLocale=re[t],re[t]=i,ue(t)}else null!=re[t]&&(null!=re[t].parentLocale?re[t]=re[t].parentLocale:null!=re[t]&&delete re[t]);return re[t]},a.locales=function(){return C(re)},a.weekdaysShort=function(t,e,i){return mi(t,e,i,"weekdaysShort")},a.normalizeUnits=L,a.relativeTimeRounding=function(t){return void 0===t?Ni:"function"==typeof t&&(Ni=t,!0)},a.relativeTimeThreshold=function(t,e){return void 0!==zi[t]&&(void 0===e?zi[t]:(zi[t]=e,"s"===t&&(zi.ss=e-1),!0))},a.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},a.prototype=di,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},a},"object"==typeof i&&void 0!==e?e.exports=a():n.moment=a()},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var a=t(49);for(var r in a)a.hasOwnProperty(r)&&n.plugins.register(a[r]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=a.legend._element,n.Title=a.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var e;t.DatasetController.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.chart,o=n.getMeta(),s=n.getDataset(),l=t.custom||{},u=a.options.elements.rectangle;t._xScale=n.getScaleForId(o.xAxisID),t._yScale=n.getScaleForId(o.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:s.label,label:a.data.labels[e],borderSkipped:l.borderSkipped?l.borderSkipped:u.borderSkipped,backgroundColor:l.backgroundColor?l.backgroundColor:r.valueAtIndexOrDefault(s.backgroundColor,e,u.backgroundColor),borderColor:l.borderColor?l.borderColor:r.valueAtIndexOrDefault(s.borderColor,e,u.borderColor),borderWidth:l.borderWidth?l.borderWidth:r.valueAtIndexOrDefault(s.borderWidth,e,u.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,a=t._model,r=n.getValueScale(),o=r.getBasePixel(),s=r.isHorizontal(),l=n._ruler||n.getRuler(),u=n.calculateBarValuePixels(n.index,e),d=n.calculateBarIndexPixels(n.index,e,l);a.horizontal=s,a.base=i?o:u.base,a.x=s?i?o:u.head:d.center,a.y=s?d.center:i?o:u.head,a.height=s?d.size:void 0,a.width=s?void 0:d.size},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())},_getStacks:function(t){var e,i,n=this.chart,a=this.getIndexScale().options.stacked,r=void 0===t?n.data.datasets.length:t+1,o=[];for(e=0;e<r;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===o.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===o.indexOf(i.stack)))&&o.push(i.stack);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this.getIndexScale(),n=this.getStackCount(),a=this.index,o=i.isHorizontal(),s=o?i.left:i.top,l=s+(o?i.width:i.height),u=[];for(t=0,e=this.getMeta().data.length;t<e;++t)u.push(i.getPixelForValue(null,t,a));return{min:r.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,a,r,o=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,r=e.length;a<r;++a)o=Math.min(o,e[a]-e[a-1]);for(a=0,r=s.length;a<r;++a)n=t.getPixelForTick(a),o=a>0?Math.min(o,n-i):o,i=n;return o}(i,u):-1,pixels:u,start:s,end:l,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,r,o,s,l=this.chart,u=this.getMeta(),d=this.getValueScale(),h=l.data.datasets,c=d.getRightValue(h[t].data[e]),f=d.options.stacked,g=u.stack,m=0;if(f||void 0===f&&void 0!==g)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===g&&n.controller.getValueScaleId()===d.id&&l.isDatasetVisible(i)&&(a=d.getRightValue(h[i].data[e]),(c<0&&a<0||c>=0&&a>0)&&(m+=a));return r=d.getPixelForValue(m),{size:s=((o=d.getPixelForValue(m+c))-r)/2,base:r,head:o,center:o+s/2}},calculateBarIndexPixels:function(t,e,i){var n,a,o,s,l,u,d,h,c,f,g,m,p,v,y,b,x,_=i.scale.options,k="flex"===_.barThickness?(c=e,g=_,p=(f=i).pixels,v=p[c],y=c>0?p[c-1]:null,b=c<p.length-1?p[c+1]:null,x=g.categoryPercentage,null===y&&(y=v-(null===b?f.end-v:b-v)),null===b&&(b=v+v-y),m=v-(v-y)/2*x,{chunk:(b-y)/2*x/f.stackCount,ratio:g.barPercentage,start:m}):(n=e,a=i,u=(o=_).barThickness,d=a.stackCount,h=a.pixels[n],r.isNullOrUndef(u)?(s=a.min*o.categoryPercentage,l=o.barPercentage):(s=u*d,l=1),{chunk:s/d,ratio:l,start:h-s/2}),w=this.getStackIndex(t,this.getMeta().stack),M=k.start+k.chunk*w+k.chunk/2,S=Math.min(r.valueOrDefault(_.maxBarThickness,1/0),k.chunk*k.ratio);return{base:M-S/2,head:M+S/2,center:M,size:S}},draw:function(){var t=this.chart,e=this.getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,o=0;for(r.canvas.clipArea(t.ctx,t.chartArea);o<a;++o)isNaN(e.getRightValue(n.data[o]))||i[o].draw();r.canvas.unclipArea(t.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:r.valueAtIndexOrDefault(e.hoverBackgroundColor,i,r.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:r.valueAtIndexOrDefault(e.hoverBorderColor,i,r.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:r.valueAtIndexOrDefault(e.hoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model,o=this.chart.options.elements.rectangle;a.backgroundColor=n.backgroundColor?n.backgroundColor:r.valueAtIndexOrDefault(e.backgroundColor,i,o.backgroundColor),a.borderColor=n.borderColor?n.borderColor:r.valueAtIndexOrDefault(e.borderColor,i,o.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:r.valueAtIndexOrDefault(e.borderWidth,i,o.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);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 i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(t){var e=this,i=e.getMeta().data;r.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.getMeta(),r=t.custom||{},o=n.getScaleForId(a.xAxisID),s=n.getScaleForId(a.yAxisID),l=n._resolveElementOptions(t,e),u=n.getDataset().data[e],d=n.index,h=i?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=i?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,radius:i?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=r.valueOrDefault(i.hoverBackgroundColor,r.getHoverColor(i.backgroundColor)),e.borderColor=r.valueOrDefault(i.hoverBorderColor,r.getHoverColor(i.borderColor)),e.borderWidth=r.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,s=o.data.datasets[this.index],l=t.custom||{},u=o.options.elements.point,d=r.options.resolve,h=s.data[e],c={},f={chart:o,dataIndex:e,dataset:s,datasetIndex:this.index},g=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=g.length;i<n;++i)c[a=g[i]]=d([l[a],s[a],u[a]],f,e);return c.radius=d([l.radius,h?h.r:void 0,s.radius,u.radius],f,e),c}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r<n[0].data.length;++r)e.push('<li><span style="background-color:'+n[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],s=a.data[n],l=s&&s.custom||{},u=r.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:u(o.backgroundColor,n,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(o.borderColor,n,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(o.borderWidth,n,d.borderWidth),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i<n;++i)(a=o.getDatasetMeta(i)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return r.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}}),n._set("pie",r.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:r.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e=this,i=e.chart,n=i.chartArea,a=i.options,o=a.elements.arc,s=n.right-n.left-o.borderWidth,l=n.bottom-n.top-o.borderWidth,u=Math.min(s,l),d={x:0,y:0},h=e.getMeta(),c=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var g=a.rotation%(2*Math.PI),m=(g+=2*Math.PI*(g>=Math.PI?-1:g<-Math.PI?1:0))+f,p=Math.cos(g),v=Math.sin(g),y=Math.cos(m),b=Math.sin(m),x=g<=0&&m>=0||g<=2*Math.PI&&2*Math.PI<=m,_=g<=.5*Math.PI&&.5*Math.PI<=m||g<=2.5*Math.PI&&2.5*Math.PI<=m,k=g<=-Math.PI&&-Math.PI<=m||g<=Math.PI&&Math.PI<=m,w=g<=.5*-Math.PI&&.5*-Math.PI<=m||g<=1.5*Math.PI&&1.5*Math.PI<=m,M=c/100,S=k?-1:Math.min(p*(p<0?1:M),y*(y<0?1:M)),D=w?-1:Math.min(v*(v<0?1:M),b*(b<0?1:M)),C=x?1:Math.max(p*(p>0?1:M),y*(y>0?1:M)),P=_?1:Math.max(v*(v>0?1:M),b*(b>0?1:M)),T=.5*(C-S),O=.5*(P-D);u=Math.min(s/T,l/O),d={x:-.5*(C+S),y:-.5*(P+D)}}i.borderWidth=e.getMaxBorderWidth(h.data),i.outerRadius=Math.max((u-i.borderWidth)/2,0),i.innerRadius=Math.max(c?i.outerRadius/100*c:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=d.x*i.outerRadius,i.offsetY=d.y*i.outerRadius,h.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),r.each(h.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,s=a.options,l=s.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=s.rotation,c=s.rotation,f=n.getDataset(),g=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),m=i&&l.animateScale?0:n.innerRadius,p=i&&l.animateScale?0:n.outerRadius,v=r.valueAtIndexOrDefault;r.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:u+a.offsetX,y:d+a.offsetY,startAngle:h,endAngle:c,circumference:g,outerRadius:p,innerRadius:m,label:v(f.label,e,a.data.labels[e])}});var y=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(y.startAngle=0===e?s.rotation:n.getMeta().data[e-1]._model.endAngle,y.endAngle=y.startAngle+y.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return r.each(i.data,function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,r=t.length,o=0;o<r;o++)e=t[o]._model?t[o]._model.borderWidth:0,n=(i=t[o]._chart?t[o]._chart.config.data.datasets[a].hoverBorderWidth:0)>(n=e>n?e:n)?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);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"}]}}),e.exports=function(t){function e(t,e){return r.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var i,n,a,o=this,s=o.getMeta(),l=s.dataset,u=s.data||[],d=o.chart.options,h=d.elements.line,c=o.getScaleForId(s.yAxisID),f=o.getDataset(),g=e(f,d);for(g&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=c,l._datasetIndex=o.index,l._children=u,l._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:r.valueOrDefault(f.lineTension,h.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||h.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||h.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||h.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||h.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||h.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||h.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||h.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:h.fill,steppedLine:a.steppedLine?a.steppedLine:r.valueOrDefault(f.steppedLine,h.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:r.valueOrDefault(f.cubicInterpolationMode,h.cubicInterpolationMode)},l.pivot()),i=0,n=u.length;i<n;++i)o.updateElement(u[i],i,t);for(g&&0!==l._model.tension&&o.updateBezierControlPoints(),i=0,n=u.length;i<n;++i)u[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),a=t.custom||{};return a.backgroundColor?i=a.backgroundColor:n.pointBackgroundColor?i=r.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),a=t.custom||{};return a.borderColor?i=a.borderColor:n.pointBorderColor?i=r.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(n.pointBorderWidth)||r.isArray(n.pointBorderWidth)?i=r.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=a.borderWidth,i},updateElement:function(t,e,i){var n,a,o=this,s=o.getMeta(),l=t.custom||{},u=o.getDataset(),d=o.index,h=u.data[e],c=o.getScaleForId(s.yAxisID),f=o.getScaleForId(s.xAxisID),g=o.chart.options.elements.point;void 0!==u.radius&&void 0===u.pointRadius&&(u.pointRadius=u.radius),void 0!==u.hitRadius&&void 0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),n=f.getPixelForValue("object"==typeof h?h:NaN,e,d),a=i?c.getBasePixel():o.calculatePointY(h,e,d),t._xScale=f,t._yScale=c,t._datasetIndex=d,t._index=e,t._model={x:n,y:a,skip:l.skip||isNaN(n)||isNaN(a),radius:l.radius||r.valueAtIndexOrDefault(u.pointRadius,e,g.radius),pointStyle:l.pointStyle||r.valueAtIndexOrDefault(u.pointStyle,e,g.pointStyle),backgroundColor:o.getPointBackgroundColor(t,e),borderColor:o.getPointBorderColor(t,e),borderWidth:o.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||r.valueAtIndexOrDefault(u.pointHitRadius,e,g.hitRadius)}},calculatePointY:function(t,e,i){var n,a,r,o=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),u=0,d=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=o.data.datasets[n],"line"===(r=o.getDatasetMeta(n)).type&&r.yAxisID===l.id&&o.isDatasetVisible(n)){var h=Number(l.getRightValue(a.data[e]));h<0?d+=h||0:u+=h||0}var c=Number(l.getRightValue(t));return c<0?l.getPixelForValue(d+c):l.getPixelForValue(u+c)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),o=this.chart.chartArea,s=a.data||[];function l(t,e,i){return Math.max(Math.min(t,i),e)}if(a.dataset._model.spanGaps&&(s=s.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)r.splineCurveMonotone(s);else for(t=0,e=s.length;t<e;++t)i=s[t]._model,n=r.splineCurve(r.previousItem(s,t)._model,i,r.nextItem(s,t)._model,a.dataset._model.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=s.length;t<e;++t)(i=s[t]._model).controlPointPreviousX=l(i.controlPointPreviousX,o.left,o.right),i.controlPointPreviousY=l(i.controlPointPreviousY,o.top,o.bottom),i.controlPointNextX=l(i.controlPointNextX,o.left,o.right),i.controlPointNextY=l(i.controlPointNextY,o.top,o.bottom)},draw:function(){var t=this.chart,i=this.getMeta(),n=i.data||[],a=t.chartArea,o=n.length,s=0;for(r.canvas.clipArea(t.ctx,a),e(this.getDataset(),t.options)&&i.dataset.draw(),r.canvas.unclipArea(t.ctx);s<o;++s)n[s].draw(a)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.radius=n.hoverRadius||r.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor||r.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,r.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor||r.valueAtIndexOrDefault(e.pointHoverBorderColor,i,r.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth||r.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},o=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),o.radius=a.radius||r.valueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),o.backgroundColor=e.getPointBackgroundColor(t,n),o.borderColor=e.getPointBorderColor(t,n),o.borderWidth=e.getPointBorderWidth(t,n)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);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=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r<n[0].data.length;++r)e.push('<li><span style="background-color:'+n[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],s=a.data[n].custom||{},l=r.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:i,fillStyle:s.backgroundColor?s.backgroundColor:l(o.backgroundColor,n,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(o.borderColor,n,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(o.borderWidth,n,u.borderWidth),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i<n;++i)(a=o.getDatasetMeta(i)).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}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:r.noop,update:function(t){var e=this,i=e.chart,n=i.chartArea,a=e.getMeta(),o=i.options,s=o.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-s.borderWidth/2)/2,0),i.innerRadius=Math.max(o.cutoutPercentage?i.outerRadius/100*o.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),e.outerRadius=i.outerRadius-i.radiusLength*e.index,e.innerRadius=e.outerRadius-i.radiusLength,a.count=e.countVisibleElements(),r.each(a.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){for(var n=this,a=n.chart,o=n.getDataset(),s=a.options,l=s.animation,u=a.scale,d=a.data.labels,h=n.calculateCircumference(o.data[e]),c=u.xCenter,f=u.yCenter,g=0,m=n.getMeta(),p=0;p<e;++p)isNaN(o.data[p])||m.data[p].hidden||++g;var v=s.startAngle,y=t.hidden?0:u.getDistanceFromCenterForValue(o.data[e]),b=v+h*g,x=b+(t.hidden?0:h),_=l.animateScale?0:u.getDistanceFromCenterForValue(o.data[e]);r.extend(t,{_datasetIndex:n.index,_index:e,_scale:u,_model:{x:c,y:f,innerRadius:0,outerRadius:i?_:y,startAngle:i&&l.animateRotate?v:b,endAngle:i&&l.animateRotate?v:x,label:r.valueAtIndexOrDefault(d,e,d[e])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return r.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:r.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,a=i.data,o=n.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,u=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),r.extend(i.dataset,{_datasetIndex:e.index,_scale:u,_children:a,_loop:!0,_model:{tension:o.tension?o.tension:r.valueOrDefault(s.lineTension,l.tension),backgroundColor:o.backgroundColor?o.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:s.borderWidth||l.borderWidth,borderColor:o.borderColor?o.borderColor:s.borderColor||l.borderColor,fill:o.fill?o.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:o.borderCapStyle?o.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:o.borderDash?o.borderDash:s.borderDash||l.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),r.each(a,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,a=t.custom||{},o=n.getDataset(),s=n.chart.scale,l=n.chart.options.elements.point,u=s.getPointPositionForValue(e,o.data[e]);void 0!==o.radius&&void 0===o.pointRadius&&(o.pointRadius=o.radius),void 0!==o.hitRadius&&void 0===o.pointHitRadius&&(o.pointHitRadius=o.hitRadius),r.extend(t,{_datasetIndex:n.index,_index:e,_scale:s,_model:{x:i?s.xCenter:u.x,y:i?s.yCenter:u.y,tension:a.tension?a.tension:r.valueOrDefault(o.lineTension,n.chart.options.elements.line.tension),radius:a.radius?a.radius:r.valueAtIndexOrDefault(o.pointRadius,e,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:r.valueAtIndexOrDefault(o.pointBackgroundColor,e,l.backgroundColor),borderColor:a.borderColor?a.borderColor:r.valueAtIndexOrDefault(o.pointBorderColor,e,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:r.valueAtIndexOrDefault(o.pointBorderWidth,e,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:r.valueAtIndexOrDefault(o.pointStyle,e,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:r.valueAtIndexOrDefault(o.pointHitRadius,e,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();r.each(e.data,function(i,n){var a=i._model,o=r.splineCurve(r.previousItem(e.data,n,!0)._model,a,r.nextItem(e.data,n,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(o.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(o.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(o.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(o.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model;a.radius=i.hoverRadius?i.hoverRadius:r.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:r.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,r.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:r.valueAtIndexOrDefault(e.pointHoverBorderColor,n,r.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:r.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model,o=this.chart.options.elements.point;a.radius=i.radius?i.radius:r.valueAtIndexOrDefault(e.pointRadius,n,o.radius),a.backgroundColor=i.backgroundColor?i.backgroundColor:r.valueAtIndexOrDefault(e.pointBackgroundColor,n,o.backgroundColor),a.borderColor=i.borderColor?i.borderColor:r.valueAtIndexOrDefault(e.pointBorderColor,n,o.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:r.valueAtIndexOrDefault(e.pointBorderWidth,n,o.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:r.noop,onComplete:r.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a,r,o=this.animations;for(e.chart=t,n||(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=r.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=r.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,a=0;a<n.length;)i=(e=n[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),r.callback(e.render,[i,e],i),r.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(r.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),a=t(45),r=t(28),o=t(30),s=t(48),l=t(31);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(e,i){var r,o,l=this;(o=(r=(r=i)||{}).data=r.data||{}).datasets=o.datasets||[],o.labels=o.labels||[],r.options=a.configMerge(n.global,n[r.type],r.options||{}),i=r;var u=s.acquireContext(e,i),d=u&&u.canvas,h=d&&d.height,c=d&&d.width;l.id=a.uid(),l.ctx=u,l.canvas=d,l.config=i,l.width=c,l.height=h,l.aspectRatio=h?c/h:null,l.options=i.options,l._bufferedRender=!1,l.chart=l,l.controller=l,t.instances[l.id]=l,Object.defineProperty(l,"data",{get:function(){return l.config.data},set:function(t){l.config.data=t}}),u&&d?(l.initialize(),l.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,r=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(a.getMaximumWidth(n))),s=Math.max(0,Math.floor(r?o/r:a.getMaximumHeight(n)));if((e.width!==o||e.height!==s)&&(n.width=e.width=o,n.height=e.height=s,n.style.width=o+"px",n.style.height=s+"px",a.retinaScale(e,i.devicePixelRatio),!t)){var u={width:o,height:s};l.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var i=this,n=i.options,r=i.scales||{},o=[],s=Object.keys(r).reduce(function(t,e){return t[e]=!1,t},{});n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var o=n.options,l=o.id,u=a.valueOrDefault(o.type,n.dtype);e(o.position)!==e(n.dposition)&&(o.position=n.dposition),s[l]=!0;var d=null;if(l in r&&r[l].type===u)(d=r[l]).options=o,d.ctx=i.ctx,d.chart=i;else{var h=t.scaleService.getScaleConstructor(u);if(!h)return;d=new h({id:l,type:u,options:o,ctx:i.ctx,chart:i}),r[d.id]=d}d.mergeTicksOptions(),n.isDefault&&(i.scale=d)}),a.each(s,function(t,e){t||delete r[e]}),i.scales=r,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return a.each(e.data.datasets,function(a,r){var o=e.getDatasetMeta(r),s=a.type||e.config.type;if(o.type&&o.type!==s&&(e.destroyDatasetMeta(r),o=e.getDatasetMeta(r)),o.type=s,i.push(o.type),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{var l=t.controllers[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(e,r),n.push(o.controller)}},e),n},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var i,n,r=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),n=(i=r).options,a.each(i.scales,function(t){o.removeBox(i,t)}),n=a.configMerge(t.defaults.global,t.defaults[i.config.type],n),i.options=i.config.options=n,i.ensureScalesHaveIDs(),i.buildOrUpdateScales(),i.tooltip._options=n.tooltips,i.tooltip.initialize(),l._invalidate(r),!1!==l.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var s=r.buildOrUpdateControllers();a.each(r.data.datasets,function(t,e){r.getDatasetMeta(e).controller.buildOrUpdateElements()},r),r.updateLayout(),r.options.animation&&r.options.animation.duration&&a.each(s,function(t){t.reset()}),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],l.notify(r,"afterUpdate"),r._bufferedRender?r._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:r.render(e)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(o.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);l.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==l.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),l.notify(this,"afterDatasetUpdate",[i]))},render:function(e){var i=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=e.duration,r=e.lazy;if(!1!==l.notify(i,"beforeRender")){var o=i.options.animation,s=function(t){l.notify(i,"afterRender"),a.callback(o&&o.onComplete,[t],i)};if(o&&(void 0!==n&&0!==n||void 0===n&&0!==o.duration)){var u=new t.Animation({numSteps:(n||o.duration)/16.66,easing:e.easing||o.easing,render:function(t,e){var i=a.easing.effects[e.easing],n=e.currentStep,r=n/e.numSteps;t.draw(i(r),r,n)},onAnimationProgress:o.onProgress,onAnimationComplete:s});t.animationService.addAnimation(i,u,n,r)}else i.draw(),s(new t.Animation({numSteps:0,chart:i}));return i}},draw:function(t){var e=this;e.clear(),a.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(a.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==l.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);l.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==l.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),l.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==l.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),l.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return r.modes.single(this,t)},getElementsAtEvent:function(t){return r.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return r.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=r.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return r.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++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,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var e,i,n=this,r=n.canvas;for(n.stop(),e=0,i=n.data.datasets.length;e<i;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),a.canvas.clear(n),s.releaseContext(n.ctx),n.canvas=null,n.ctx=null),l.notify(n,"destroy"),delete t.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};a.each(t.options.events,function(n){s.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},s.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,a.each(e,function(e,i){s.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,a,r,o=i?"setHoverStyle":"removeHoverStyle";for(a=0,r=t.length;a<r;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[o](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),l.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},r=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,r.mode,r),a.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,r.mode,!1),i.active.length&&r.mode&&i.updateHoverStyle(i.active,r.mode,!0),e=!a.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),t.Controller=t}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=["push","pop","shift","splice","unshift"];function i(t,i){var n=t._chartjs;if(n){var a=n.listeners,r=a.indexOf(i);-1!==r&&a.splice(r,1),a.length>0||(e.forEach(function(e){delete t[e]}),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(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,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.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,a,r=this,o=r.getDataset(),s=o.data||(o.data=[]);r._data!==s&&(r._data&&i(r._data,r),a=r,(t=s)._chartjs?t._chartjs.listeners.push(a):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[a]}}),e.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),a=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),r=a.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),r}})})),r._data=s),r.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],a=t._index,r=t.custom||{},o=n.valueAtIndexOrDefault,s=t._model;s.backgroundColor=r.backgroundColor?r.backgroundColor:o(i.backgroundColor,a,e.backgroundColor),s.borderColor=r.borderColor?r.borderColor:o(i.borderColor,a,e.borderColor),s.borderWidth=r.borderWidth?r.borderWidth:o(i.borderWidth,a,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,a=t.custom||{},r=n.valueAtIndexOrDefault,o=n.getHoverColor,s=t._model;s.backgroundColor=a.hoverBackgroundColor?a.hoverBackgroundColor:r(e.hoverBackgroundColor,i,o(s.backgroundColor)),s.borderColor=a.hoverBorderColor?a.hoverBorderColor:r(e.hoverBorderColor,i,o(s.borderColor)),s.borderWidth=a.hoverBorderWidth?a.hoverBorderWidth:r(e.hoverBorderWidth,i,s.borderWidth)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},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)}}),t.DatasetController.extend=n.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";var n=t(2),a=t(45);var r=function(t){a.extend(this,t),this.initialize.apply(this,arguments)};a.extend(r.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=a.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,a=e._start,r=e._view;return i&&1!==t?(r||(r=e._view={}),a||(a=e._start={}),function(t,e,i,a){var r,o,s,l,u,d,h,c,f,g=Object.keys(i);for(r=0,o=g.length;r<o;++r)if(d=i[s=g[r]],e.hasOwnProperty(s)||(e[s]=d),(l=e[s])!==d&&"_"!==s[0]){if(t.hasOwnProperty(s)||(t[s]=l),(h=typeof d)==typeof(u=t[s]))if("string"===h){if((c=n(u)).valid&&(f=n(d)).valid){e[s]=f.mix(c,a).rgbString();continue}}else if("number"===h&&isFinite(u)&&isFinite(d)){e[s]=u+(d-u)*a;continue}e[s]=d}}(a,r,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return a.isNumber(this._model.x)&&a.isNumber(this._model.y)}}),r.extend=a.inherits,e.exports=r},{2:2,45:45}],27:[function(t,e,i){"use strict";var n=t(2),a=t(25),r=t(45);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return null!=t&&"none"!==t}function o(t,n,a){var r=document.defaultView,o=t.parentNode,s=r.getComputedStyle(t)[n],l=r.getComputedStyle(o)[n],u=i(s),d=i(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?e(s,t,a):h,d?e(l,o,a):h):"none"}r.configMerge=function(){return r.merge(r.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,a){var o=i[e]||{},s=n[e];"scales"===e?i[e]=r.scaleMerge(o,s):"scale"===e?i[e]=r.merge(o,[t.scaleService.getScaleDefaults(s.type),s]):r._merger(e,i,n,a)}})},r.scaleMerge=function(){return r.merge(r.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,a){if("xAxes"===e||"yAxes"===e){var o,s,l,u=n[e].length;for(i[e]||(i[e]=[]),o=0;o<u;++o)l=n[e][o],s=r.valueOrDefault(l.type,"xAxes"===e?"category":"linear"),o>=i[e].length&&i[e].push({}),!i[e][o].type||l.type&&l.type!==i[e][o].type?r.merge(i[e][o],[t.scaleService.getScaleDefaults(s),l]):r.merge(i[e][o],l)}else r._merger(e,i,n,a)}})},r.where=function(t,e){if(r.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return r.each(t,function(t){e(t)&&i.push(t)}),i},r.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},r.findNextWhere=function(t,e,i){r.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},r.findPreviousWhere=function(t,e,i){r.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var a=t[n];if(e(a))return a}},r.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},r.almostEquals=function(t,e,i){return Math.abs(t-e)<i},r.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},r.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},r.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},r.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},r.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},r.toRadians=function(t){return t*(Math.PI/180)},r.toDegrees=function(t){return t*(180/Math.PI)},r.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),r=Math.atan2(n,i);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},r.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},r.aliasPixel=function(t){return t%2==0?0:.5},r.splineCurve=function(t,e,i,n){var a=t.skip?e:t,r=e,o=i.skip?e:i,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=n*(u=isNaN(u)?0:u),c=n*(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)}}},r.EPSILON=Number.EPSILON||1e-14,r.splineCurveMonotone=function(t){var e,i,n,a,o,s,l,u,d,h=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),c=h.length;for(e=0;e<c;++e)if(!(n=h[e]).model.skip){if(i=e>0?h[e-1]:null,(a=e<c-1?h[e+1]:null)&&!a.model.skip){var f=a.model.x-n.model.x;n.deltaK=0!==f?(a.model.y-n.model.y)/f:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<c-1;++e)n=h[e],a=h[e+1],n.model.skip||a.model.skip||(r.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(o=n.mK/n.deltaK,s=a.mK/n.deltaK,(u=Math.pow(o,2)+Math.pow(s,2))<=9||(l=3/Math.sqrt(u),n.mK=o*l*n.deltaK,a.mK=s*l*n.deltaK)));for(e=0;e<c;++e)(n=h[e]).model.skip||(i=e>0?h[e-1]:null,a=e<c-1?h[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),a&&!a.model.skip&&(d=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},r.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},r.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},r.niceNum=function(t,e){var i=Math.floor(r.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},r.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)},r.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.currentTarget||t.srcElement,s=o.getBoundingClientRect(),l=a.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=a.clientX,n=a.clientY);var u=parseFloat(r.getStyle(o,"padding-left")),d=parseFloat(r.getStyle(o,"padding-top")),h=parseFloat(r.getStyle(o,"padding-right")),c=parseFloat(r.getStyle(o,"padding-bottom")),f=s.right-s.left-u-h,g=s.bottom-s.top-d-c;return{x:i=Math.round((i-s.left-u)/f*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-s.top-d)/g*o.height/e.currentDevicePixelRatio)}},r.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},r.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},r.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(r.getStyle(e,"padding-left"),10),n=parseInt(r.getStyle(e,"padding-right"),10),a=e.clientWidth-i-n,o=r.getConstraintWidth(t);return isNaN(o)?a:Math.min(a,o)},r.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(r.getStyle(e,"padding-top"),10),n=parseInt(r.getStyle(e,"padding-bottom"),10),a=e.clientHeight-i-n,o=r.getConstraintHeight(t);return isNaN(o)?a:Math.min(a,o)},r.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},r.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,r=t.width;n.height=a*i,n.width=r*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=r+"px")}},r.fontString=function(t,e,i){return e+" "+t+"px "+i},r.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var s=0;r.each(i,function(e){null!=e&&!0!==r.isArray(e)?s=r.measureText(t,a,o,s,e):r.isArray(e)&&r.each(e,function(e){null==e||r.isArray(e)||(s=r.measureText(t,a,o,s,e))})});var l=o.length/2;if(l>i.length){for(var u=0;u<l;u++)delete a[o[u]];o.splice(0,l)}return s},r.measureText=function(t,e,i,n,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,i.push(a)),r>n&&(n=r),n},r.numberOfLabelLines=function(t){var e=1;return r.each(t,function(t){r.isArray(t)&&t.length>e&&(e=t.length)}),e},r.color=n?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},r.getHoverColor=function(t){return t instanceof CanvasPattern?t:r.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,i){"use strict";var n=t(45);function a(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function r(t,e){var i,n,a,r,o;for(n=0,r=t.data.datasets.length;n<r;++n)if(t.isDatasetVisible(n))for(a=0,o=(i=t.getDatasetMeta(n)).data.length;a<o;++a){var s=i.data[a];s._view.skip||e(s)}}function o(t,e){var i=[];return r(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function s(t,e,i,n){var a=Number.POSITIVE_INFINITY,o=[];return r(t,function(t){if(!i||t.inRange(e.x,e.y)){var r=t.getCenterPoint(),s=n(e,r);s<a?(o=[t],a=s):s===a&&o.push(t)}}),o}function l(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var a=e?Math.abs(t.x-n.x):0,r=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function u(t,e,i){var n=a(e,t);i.axis=i.axis||"x";var r=l(i.axis),u=i.intersect?o(t,n):s(t,n,!1,r),d=[];return u.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[u[0]._index];n&&!n._view.skip&&d.push(n)}}),d):[]}e.exports={modes:{single:function(t,e){var i=a(e,t),n=[];return r(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:u,index:u,dataset:function(t,e,i){var n=a(e,t);i.axis=i.axis||"xy";var r=l(i.axis),u=i.intersect?o(t,n):s(t,n,!1,r);return u.length>0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return u(t,e,{intersect:!1})},point:function(t,e){return o(t,a(e,t))},nearest:function(t,e,i){var n=a(e,t);i.axis=i.axis||"xy";var r=l(i.axis),o=s(t,n,i.intersect,r);return o.length>1&&o.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),o.slice(0,1)},x:function(t,e,i){var n=a(e,t),o=[],s=!1;return r(t,function(t){t.inXRange(n.x)&&o.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(o=[]),o},y:function(t,e,i){var n=a(e,t),o=[],s=!1;return r(t,function(t){t.inYRange(n.y)&&o.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(o=[]),o}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,i){"use strict";var n=t(45);function a(t,e){return n.where(t,function(t){return t.position===e})}function r(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)n=a[o],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var o=t.options.layout||{},s=n.options.toPadding(o.padding),l=s.left,u=s.right,d=s.top,h=s.bottom,c=a(t.boxes,"left"),f=a(t.boxes,"right"),g=a(t.boxes,"top"),m=a(t.boxes,"bottom"),p=a(t.boxes,"chartArea");r(c,!0),r(f,!1),r(g,!0),r(m,!1);var v=e-l-u,y=i-d-h,b=y/2,x=(e-v/2)/(c.length+f.length),_=(i-b)/(g.length+m.length),k=v,w=y,M=[];n.each(c.concat(f,g,m),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?v:k,_),w-=e.height):(e=t.update(x,w),k-=e.width),M.push({horizontal:i,minSize:e,box:t})});var S=0,D=0,C=0,P=0;n.each(g.concat(m),function(t){if(t.getPadding){var e=t.getPadding();S=Math.max(S,e.left),D=Math.max(D,e.right)}}),n.each(c.concat(f),function(t){if(t.getPadding){var e=t.getPadding();C=Math.max(C,e.top),P=Math.max(P,e.bottom)}});var T=l,O=u,I=d,A=h;n.each(c.concat(f),z),n.each(c,function(t){T+=t.width}),n.each(f,function(t){O+=t.width}),n.each(g.concat(m),z),n.each(g,function(t){I+=t.height}),n.each(m,function(t){A+=t.height}),n.each(c.concat(f),function(t){var e=n.findNextWhere(M,function(e){return e.box===t}),i={left:0,right:0,top:I,bottom:A};e&&t.update(e.minSize.width,w,i)}),T=l,O=u,I=d,A=h,n.each(c,function(t){T+=t.width}),n.each(f,function(t){O+=t.width}),n.each(g,function(t){I+=t.height}),n.each(m,function(t){A+=t.height});var F=Math.max(S-T,0);T+=F,O+=Math.max(D-O,0);var R=Math.max(C-I,0);I+=R,A+=Math.max(P-A,0);var L=i-I-A,W=e-T-O;W===k&&L===w||(n.each(c,function(t){t.height=L}),n.each(f,function(t){t.height=L}),n.each(g,function(t){t.fullWidth||(t.width=W)}),n.each(m,function(t){t.fullWidth||(t.width=W)}),w=L,k=W);var Y=l+F,N=d+R;n.each(c.concat(g),H),Y+=k,N+=w,n.each(f,H),n.each(m,H),t.chartArea={left:T,top:I,right:T+k,bottom:I+w},n.each(p,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,w)})}function z(t){var e=n.findNextWhere(M,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(T,S),right:Math.max(O,D),top:0,bottom:0};t.update(t.fullWidth?v:k,y/2,i)}else t.update(e.minSize.width,w)}function H(t){t.isHorizontal()?(t.left=t.fullWidth?l:T,t.right=t.fullWidth?e-u:T+k,t.top=N,t.bottom=N+t.height,N=t.bottom):(t.left=Y,t.right=Y+t.width,t.top=I,t.bottom=I+w,Y=t.right)}}}},{45:45}],31:[function(t,e,i){"use strict";var n=t(25),a=t(45);n._set("global",{plugins:{}}),e.exports={_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 i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,r,o,s,l=this.descriptors(t),u=l.length;for(n=0;n<u;++n)if("function"==typeof(s=(r=(a=l[n]).plugin)[e])&&((o=[t].concat(i||[])).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 i=[],r=[],o=t&&t.config||{},s=o.options&&o.options.plugins||{};return this._plugins.concat(o.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,o=s[e];!1!==o&&(!0===o&&(o=a.clone(n.global.plugins[e])),i.push(t),r.push({plugin:t,options:o||{}}))}}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}}},{25:25,45:45}],32:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=t(34);function s(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function l(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}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:"",lineHeight:1.2,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:o.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,i){return r.isArray(e)?r.longestText(t,i,e):t.measureText(e).width}function i(t){var e=r.valueOrDefault,i=n.global,a=e(t.fontSize,i.defaultFontSize),o=e(t.fontStyle,i.defaultFontStyle),s=e(t.fontFamily,i.defaultFontFamily);return{size:a,style:o,family:s,font:r.fontString(a,o,s)}}function o(t){return r.options.toLineHeight(r.valueOrDefault(t.lineHeight,1.2),r.valueOrDefault(t.fontSize,n.global.defaultFontSize))}t.Scale=a.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){r.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,o,s,l,u,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=r.extend({left:0,right:0,top:0,bottom:0},i),d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),l=d.buildTicks()||[],d.afterBuildTicks(),d.beforeTickToLabelConversion(),o=d.convertTicksToLabels(l)||d.ticks,d.afterTickToLabelConversion(),d.ticks=o,n=0,a=o.length;n<a;++n)s=o[n],(u=l[n])?u.label=s:l.push(u={label:s,major:!1});return d._ticks=l,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){r.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){r.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(){r.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){r.callback(this.options.beforeDataLimits,[this])},determineDataLimits:r.noop,afterDataLimits:function(){r.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){r.callback(this.options.beforeBuildTicks,[this])},buildTicks:r.noop,afterBuildTicks:function(){r.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){r.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){r.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){r.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,a=s(t._ticks),o=i(n);e.font=o.font;var l=n.minRotation||0;if(a.length&&t.options.display&&t.isHorizontal())for(var u,d=r.longestText(e,o.font,a,t.longestTextCache),h=d,c=t.getPixelForTick(1)-t.getPixelForTick(0)-6;h>c&&l<n.maxRotation;){var f=r.toRadians(l);if(u=Math.cos(f),Math.sin(f)*d>t.maxHeight){l--;break}l++,h=u*d}t.labelRotation=l},afterCalculateTickRotation:function(){r.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){r.callback(this.options.beforeFit,[this])},fit:function(){var t=this,n=t.minSize={width:0,height:0},a=s(t._ticks),l=t.options,u=l.ticks,d=l.scaleLabel,h=l.gridLines,c=l.display,f=t.isHorizontal(),g=i(u),m=l.gridLines.tickMarkLength;if(n.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:c&&h.drawTicks?m:0,n.height=f?c&&h.drawTicks?m:0:t.maxHeight,d.display&&c){var p=o(d)+r.options.toPadding(d.padding).height;f?n.height+=p:n.width+=p}if(u.display&&c){var v=r.longestText(t.ctx,g.font,a,t.longestTextCache),y=r.numberOfLabelLines(a),b=.5*g.size,x=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var _=r.toRadians(t.labelRotation),k=Math.cos(_),w=Math.sin(_)*v+g.size*y+b*(y-1)+b;n.height=Math.min(t.maxHeight,n.height+w+x),t.ctx.font=g.font;var M=e(t.ctx,a[0],g.font),S=e(t.ctx,a[a.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?k*M+3:k*b+3,t.paddingRight="bottom"===l.position?k*b+3:k*S+3):(t.paddingLeft=M/2+3,t.paddingRight=S/2+3)}else u.mirror?v=0:v+=x+b,n.width=Math.min(t.maxWidth,n.width+v),t.paddingTop=g.size/2,t.paddingBottom=g.size/2}t.handleMargins(),t.width=n.width,t.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){r.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(r.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:r.noop,getPixelForValue:r.noop,getValueForPixel:r.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},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,i,n,a,o=this,s=o.isHorizontal(),l=o.options.ticks.minor,u=t.length,d=r.toRadians(o.labelRotation),h=Math.cos(d),c=o.longestLabelWidth*h,f=[];for(l.maxTicksLimit&&(a=l.maxTicksLimit),s&&(e=!1,(c+l.autoSkipPadding)*u>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((c+l.autoSkipPadding)*u/(o.width-(o.paddingLeft+o.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),i=0;i<u;i++)n=t[i],(e>1&&i%e>0||i%e==0&&i+e>=u)&&i!==u-1&&delete n.label,f.push(n);return f},draw:function(t){var e=this,a=e.options;if(a.display){var s=e.ctx,u=n.global,d=a.ticks.minor,h=a.ticks.major||d,c=a.gridLines,f=a.scaleLabel,g=0!==e.labelRotation,m=e.isHorizontal(),p=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=r.valueOrDefault(d.fontColor,u.defaultFontColor),y=i(d),b=r.valueOrDefault(h.fontColor,u.defaultFontColor),x=i(h),_=c.drawTicks?c.tickMarkLength:0,k=r.valueOrDefault(f.fontColor,u.defaultFontColor),w=i(f),M=r.options.toPadding(f.padding),S=r.toRadians(e.labelRotation),D=[],C=e.options.gridLines.lineWidth,P="right"===a.position?e.right:e.right-C-_,T="right"===a.position?e.right+_:e.right,O="bottom"===a.position?e.top+C:e.bottom-_-C,I="bottom"===a.position?e.top+C+_:e.bottom+C;if(r.each(p,function(i,n){if(!r.isNullOrUndef(i.label)){var o,s,h,f,v,y,b,x,k,w,M,A,F,R,L=i.label;n===e.zeroLineIndex&&a.offset===c.offsetGridLines?(o=c.zeroLineWidth,s=c.zeroLineColor,h=c.zeroLineBorderDash,f=c.zeroLineBorderDashOffset):(o=r.valueAtIndexOrDefault(c.lineWidth,n),s=r.valueAtIndexOrDefault(c.color,n),h=r.valueOrDefault(c.borderDash,u.borderDash),f=r.valueOrDefault(c.borderDashOffset,u.borderDashOffset));var W="middle",Y="middle",N=d.padding;if(m){var z=_+N;"bottom"===a.position?(Y=g?"middle":"top",W=g?"right":"center",R=e.top+z):(Y=g?"middle":"bottom",W=g?"left":"center",R=e.bottom-z);var H=l(e,n,c.offsetGridLines&&p.length>1);H<e.left&&(s="rgba(0,0,0,0)"),H+=r.aliasPixel(o),F=e.getPixelForTick(n)+d.labelOffset,v=b=k=M=H,y=O,x=I,w=t.top,A=t.bottom+C}else{var V,B="left"===a.position;d.mirror?(W=B?"left":"right",V=N):(W=B?"right":"left",V=_+N),F=B?e.right-V:e.left+V;var E=l(e,n,c.offsetGridLines&&p.length>1);E<e.top&&(s="rgba(0,0,0,0)"),E+=r.aliasPixel(o),R=e.getPixelForTick(n)+d.labelOffset,v=P,b=T,k=t.left,M=t.right+C,y=x=w=A=E}D.push({tx1:v,ty1:y,tx2:b,ty2:x,x1:k,y1:w,x2:M,y2:A,labelX:F,labelY:R,glWidth:o,glColor:s,glBorderDash:h,glBorderDashOffset:f,rotation:-1*S,label:L,major:i.major,textBaseline:Y,textAlign:W})}}),r.each(D,function(t){if(c.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),c.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),c.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),d.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=t.major?x.font:y.font,s.fillStyle=t.major?b:v,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(r.isArray(i))for(var n=i.length,a=1.5*y.size,o=e.isHorizontal()?0:-a*(n-1)/2,l=0;l<n;++l)s.fillText(""+i[l],0,o),o+=a;else s.fillText(i,0,0);s.restore()}}),f.display){var A,F,R=0,L=o(f)/2;if(m)A=e.left+(e.right-e.left)/2,F="bottom"===a.position?e.bottom-L-M.bottom:e.top+L+M.top;else{var W="left"===a.position;A=W?e.left+L+M.top:e.right-L-M.top,F=e.top+(e.bottom-e.top)/2,R=W?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(A,F),s.rotate(R),s.textAlign="center",s.textBaseline="middle",s.fillStyle=k,s.font=w.font,s.fillText(f.labelString,0,0),s.restore()}if(c.drawBorder){s.lineWidth=r.valueAtIndexOrDefault(c.lineWidth,0),s.strokeStyle=r.valueAtIndexOrDefault(c.color,0);var Y=e.left,N=e.right+C,z=e.top,H=e.bottom+C,V=r.aliasPixel(s.lineWidth);m?(z=H="top"===a.position?e.bottom:e.top,z+=V,H+=V):(Y=N="left"===a.position?e.right:e.left,Y+=V,N+=V),s.beginPath(),s.moveTo(Y,z),s.lineTo(N,H),s.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),a=t(45),r=t(30);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=a.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=a.extend(this.defaults[t],e))},addScalesToLayout:function(t){a.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,r.addBox(t,e)})}}}},{25:25,30:30,45:45}],34:[function(t,e,i){"use strict";var n=t(45);e.exports={formatters:{values:function(t){return n.isArray(t)?t:""+t},linear:function(t,e,i){var a=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var r=n.log10(Math.abs(a)),o="";if(0!==t){var s=-1*Math.floor(r);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var a=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);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:r.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(t.length>0){var r=t[0];r.xLabel?i=r.xLabel:a>0&&r.index<a&&(i=n[r.index])}return i},afterTitle:r.noop,beforeBody:r.noop,beforeLabel:r.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:r.noop,afterBody:r.noop,beforeFooter:r.noop,footer:r.noop,afterFooter:r.noop}}}),e.exports=function(t){function e(t,e){var i=r.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(r.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function o(t){var e=n.global,i=r.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(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}}t.Tooltip=a.extend({initialize:function(){this._model=o(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),a=t.afterTitle.apply(this,arguments),r=[];return r=i(r=i(r=i(r,e),n),a)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return r.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,a=n._options.callbacks,o=[];return r.each(t,function(t){var r={before:[],lines:[],after:[]};i(r.before,a.beforeLabel.call(n,t,e)),i(r.lines,a.label.call(n,t,e)),i(r.after,a.afterLabel.call(n,t,e)),o.push(r)}),o},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return r.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),a=t.afterFooter.apply(this,arguments),r=[];return r=i(r=i(r=i(r,e),n),a)},update:function(e){var i,n,a,s,l,u,d,h,c,f,g,m,p,v,y,b,x,_,k,w,M=this,S=M._options,D=M._model,C=M._model=o(S),P=M._active,T=M._data,O={xAlign:D.xAlign,yAlign:D.yAlign},I={x:D.x,y:D.y},A={width:D.width,height:D.height},F={x:D.caretX,y:D.caretY};if(P.length){C.opacity=1;var R=[],L=[];F=t.Tooltip.positioners[S.position].call(M,P,M._eventPosition);var W=[];for(i=0,n=P.length;i<n;++i)W.push((b=P[i],x=void 0,_=void 0,void 0,void 0,x=b._xScale,_=b._yScale||b._scale,k=b._index,w=b._datasetIndex,{xLabel:x?x.getLabelForIndex(k,w):"",yLabel:_?_.getLabelForIndex(k,w):"",index:k,datasetIndex:w,x:b._model.x,y:b._model.y}));S.filter&&(W=W.filter(function(t){return S.filter(t,T)})),S.itemSort&&(W=W.sort(function(t,e){return S.itemSort(t,e,T)})),r.each(W,function(t){R.push(S.callbacks.labelColor.call(M,t,M._chart)),L.push(S.callbacks.labelTextColor.call(M,t,M._chart))}),C.title=M.getTitle(W,T),C.beforeBody=M.getBeforeBody(W,T),C.body=M.getBody(W,T),C.afterBody=M.getAfterBody(W,T),C.footer=M.getFooter(W,T),C.x=Math.round(F.x),C.y=Math.round(F.y),C.caretPadding=S.caretPadding,C.labelColors=R,C.labelTextColors=L,C.dataPoints=W,O=function(t,e){var i,n,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?(i=function(t){return t<=c},n=function(t){return t>c}):(i=function(t){return t<=e.width/2},n=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"},i(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):n(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,A=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,o=e.body,s=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,u=e.footer.length,d=e.titleFontSize,h=e.bodyFontSize,c=e.footerFontSize;n+=l*d,n+=l?(l-1)*e.titleSpacing:0,n+=l?e.titleMarginBottom:0,n+=s*h,n+=s?(s-1)*e.bodySpacing:0,n+=u?e.footerMarginTop:0,n+=u*c,n+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){a=Math.max(a,i.measureText(t).width+f)};return i.font=r.fontString(d,e._titleFontStyle,e._titleFontFamily),r.each(e.title,g),i.font=r.fontString(h,e._bodyFontStyle,e._bodyFontFamily),r.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?h+2:0,r.each(o,function(t){r.each(t.before,g),r.each(t.lines,g),r.each(t.after,g)}),f=0,i.font=r.fontString(c,e._footerFontStyle,e._footerFontFamily),r.each(e.footer,g),{width:a+=2*e.xPadding,height:n}}(this,C)),a=C,s=A,l=O,u=M._chart,d=a.x,h=a.y,c=a.caretSize,f=a.caretPadding,g=a.cornerRadius,m=l.xAlign,p=l.yAlign,v=c+f,y=g+f,"right"===m?d-=s.width:"center"===m&&((d-=s.width/2)+s.width>u.width&&(d=u.width-s.width),d<0&&(d=0)),"top"===p?h+=v:h-="bottom"===p?s.height+v:s.height/2,"center"===p?"left"===m?d+=v:"right"===m&&(d-=v):"left"===m?d-=y:"right"===m&&(d+=y),I={x:d,y:h}}else C.opacity=0;return C.xAlign=O.xAlign,C.yAlign=O.yAlign,C.x=I.x,C.y=I.y,C.width=A.width,C.height=A.height,C.caretX=F.x,C.caretY=F.y,M._model=C,e&&S.custom&&S.custom.call(M,C),M},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,r,o,s,l,u=i.caretSize,d=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,"left"===h?(a=(n=f)-u,r=n,o=s+u,l=s-u):(a=(n=f+m)+u,r=n,o=s-u,l=s+u);else if("left"===h?(n=(a=f+d+u)-u,r=a+u):"right"===h?(n=(a=f+m-d-u)-u,r=a+u):(n=(a=i.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=n,n=v}return{x1:n,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,i,n,a){var o=i.title;if(o.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s,l,u=i.titleFontSize,d=i.titleSpacing;for(n.fillStyle=e(i.titleFontColor,a),n.font=r.fontString(u,i._titleFontStyle,i._titleFontFamily),s=0,l=o.length;s<l;++s)n.fillText(o[s],t.x,t.y),t.y+=u+d,s+1===o.length&&(t.y+=i.titleMarginBottom-d)}},drawBody:function(t,i,n,a){var o=i.bodyFontSize,s=i.bodySpacing,l=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top",n.font=r.fontString(o,i._bodyFontStyle,i._bodyFontFamily);var u=0,d=function(e){n.fillText(e,t.x+u,t.y),t.y+=o+s};n.fillStyle=e(i.bodyFontColor,a),r.each(i.beforeBody,d);var h=i.displayColors;u=h?o+2:0,r.each(l,function(s,l){var u=e(i.labelTextColors[l],a);n.fillStyle=u,r.each(s.before,d),r.each(s.lines,function(r){h&&(n.fillStyle=e(i.legendColorBackground,a),n.fillRect(t.x,t.y,o,o),n.lineWidth=1,n.strokeStyle=e(i.labelColors[l].borderColor,a),n.strokeRect(t.x,t.y,o,o),n.fillStyle=e(i.labelColors[l].backgroundColor,a),n.fillRect(t.x+1,t.y+1,o-2,o-2),n.fillStyle=u),d(r)}),r.each(s.after,d)}),u=0,r.each(i.afterBody,d),t.y-=s},drawFooter:function(t,i,n,a){var o=i.footer;o.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,a),n.font=r.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),r.each(o,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,a,r){n.fillStyle=e(i.backgroundColor,r),n.strokeStyle=e(i.borderColor,r),n.lineWidth=i.borderWidth;var o=i.xAlign,s=i.yAlign,l=t.x,u=t.y,d=a.width,h=a.height,c=i.cornerRadius;n.beginPath(),n.moveTo(l+c,u),"top"===s&&this.drawCaret(t,a),n.lineTo(l+d-c,u),n.quadraticCurveTo(l+d,u,l+d,u+c),"center"===s&&"right"===o&&this.drawCaret(t,a),n.lineTo(l+d,u+h-c),n.quadraticCurveTo(l+d,u+h,l+d-c,u+h),"bottom"===s&&this.drawCaret(t,a),n.lineTo(l+c,u+h),n.quadraticCurveTo(l,u+h,l,u+h-c),"center"===s&&"left"===o&&this.drawCaret(t,a),n.lineTo(l,u+c),n.quadraticCurveTo(l,u,l+c,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={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&&(this.drawBackground(n,e,t,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a))}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!r.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,r=0;for(e=0,i=t.length;e<i;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();n+=s.x,a+=s.y,++r}}return{x:Math.round(n/r),y:Math.round(a/r)}},nearest:function(t,e){var i,n,a,o=e.x,s=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var u=t[i];if(u&&u.hasValue()){var d=u.getCenterPoint(),h=r.distanceBetweenPoints(e,d);h<l&&(l=h,a=u)}}if(a){var c=a.tooltipPosition();o=c.x,s=c.y}return{x:o,y:s}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({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 i=this._view;if(i){for(var n=r.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,o=n.distance,s=i.startAngle,l=i.endAngle;l<s;)l+=2*Math.PI;for(;a>l;)a-=2*Math.PI;for(;a<s;)a+=2*Math.PI;var u=a>=s&&a<=l,d=o>=i.innerRadius&&o<=i.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},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,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:o.defaultColor,borderWidth:3,borderColor:o.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a=this._view,s=this._chart.ctx,l=a.spanGaps,u=this._children.slice(),d=o.elements.line,h=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=a.borderCapStyle||d.borderCapStyle,s.setLineDash&&s.setLineDash(a.borderDash||d.borderDash),s.lineDashOffset=a.borderDashOffset||d.borderDashOffset,s.lineJoin=a.borderJoinStyle||d.borderJoinStyle,s.lineWidth=a.borderWidth||d.borderWidth,s.strokeStyle=a.borderColor||o.defaultColor,s.beginPath(),h=-1,t=0;t<u.length;++t)e=u[t],i=r.previousItem(u,t),n=e._view,0===t?n.skip||(s.moveTo(n.x,n.y),h=t):(i=-1===h?i:u[h],n.skip||(h!==t-1&&!l||-1===h?s.moveTo(n.x,n.y):r.canvas.lineTo(s,i._view,e._view),h=t));s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=n.global.defaultColor;function s(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:o,borderColor:o,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=a.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:s,inXRange:s,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,i=this._model,a=this._chart.ctx,s=e.pointStyle,l=e.radius,u=e.x,d=e.y,h=r.color,c=0;e.skip||(a.strokeStyle=e.borderColor||o,a.lineWidth=r.valueOrDefault(e.borderWidth,n.global.elements.point.borderWidth),a.fillStyle=e.backgroundColor||o,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?c=(u-i.x)/(t.left-i.x):1.01*t.right<i.x?c=(i.x-u)/(i.x-t.right):i.y<t.top?c=(d-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(c=(i.y-d)/(i.y-t.bottom)),c=Math.round(100*c)/100,a.strokeStyle=h(a.strokeStyle).alpha(c).rgbString(),a.fillStyle=h(a.fillStyle).alpha(c).rgbString()),r.canvas.drawPoint(a,s,l,u,d))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";var n=t(25),a=t(26);function r(t){return void 0!==t._view.width}function o(t){var e,i,n,a,o=t._view;if(r(t)){var s=o.width/2;e=o.x-s,i=o.x+s,n=Math.min(o.y,o.base),a=Math.max(o.y,o.base)}else{var l=o.height/2;e=Math.min(o.x,o.base),i=Math.max(o.x,o.base),n=o.y-l,a=o.y+l}return{left:e,top:n,right:i,bottom:a}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a,r,o,s=this._chart.ctx,l=this._view,u=l.borderWidth;if(l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,a=e>t?1:-1,r=1,o=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,i=l.y,a=1,r=(n=l.base)>i?1:-1,o=l.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(t-e),Math.abs(i-n)),h=(u=u>d?d:u)/2,c=t+("left"!==o?h*a:0),f=e+("right"!==o?-h*a:0),g=i+("top"!==o?h*r:0),m=n+("bottom"!==o?-h*r:0);c!==f&&(i=g,n=m),g!==m&&(t=c,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=u;var p=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(o,0);function y(t){return p[(v+t)%4]}-1===v&&(v=0);var b=y(0);s.moveTo(b[0],b[1]);for(var x=1;x<4;x++)b=y(x),s.lineTo(b[0],b[1]);s.fill(),u&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=o(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=o(this);return r(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return r(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,r){if(r){var o=Math.min(r,n/2),s=Math.min(r,a/2);t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+s),t.lineTo(e+n,i+a-s),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-s),t.lineTo(e,i+s),t.quadraticCurveTo(e,i,e+o,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a){var r,o,s,l,u,d;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(o=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-o/2,a+u/3),t.lineTo(n+o/2,a+u/3),t.lineTo(n,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-d,a-d,2*d,2*d),t.strokeRect(n-d,a-d,2*d,2*d);break;case"rectRounded":var h=i/Math.SQRT2,c=n-h,f=a-h,g=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,c,f,g,g,i/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-d,a),t.lineTo(n,a+d),t.lineTo(n+d,a),t.lineTo(n,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,a),t.lineTo(n+i,a),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},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,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,a={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return a.valueOrDefault(a.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var r,o,s;if(a.isArray(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<o;r++)e.call(i,t[r],r);else if(a.isObject(t))for(o=(s=Object.keys(t)).length,r=0;r<o;r++)e.call(i,t[s[r]],s[r])},arrayEquals:function(t,e){var i,n,r,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],o=e[i],r instanceof Array&&o instanceof Array){if(!a.arrayEquals(r,o))return!1}else if(r!==o)return!1;return!0},clone:function(t){if(a.isArray(t))return t.map(a.clone);if(a.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,r=0;r<n;++r)e[i[r]]=a.clone(t[i[r]]);return e}return t},_merger:function(t,e,i,n){var r=e[t],o=i[t];a.isObject(r)&&a.isObject(o)?a.merge(r,o,n):e[t]=a.clone(o)},_mergerIf:function(t,e,i){var n=e[t],r=i[t];a.isObject(n)&&a.isObject(r)?a.mergeIf(n,r):e.hasOwnProperty(t)||(e[t]=a.clone(r))},merge:function(t,e,i){var n,r,o,s,l,u=a.isArray(e)?e:[e],d=u.length;if(!a.isObject(t))return t;for(n=(i=i||{}).merger||a._merger,r=0;r<d;++r)if(e=u[r],a.isObject(e))for(l=0,s=(o=Object.keys(e)).length;l<s;++l)n(o[l],t,e,i);return t},mergeIf:function(t,e){return a.merge(t,e,{merger:a._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;++i)a.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i}};e.exports=a,a.callCallback=a.callback,a.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},a.getValueOrDefault=a.valueOrDefault,a.getValueAtIndexOrDefault=a.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),a={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,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+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-a.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*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},n.easingEffects=a},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,a,r;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,a=+t.bottom||0,r=+t.left||0):e=i=a=r=+t||0,{top:e,right:i,bottom:a,left:r,height:e+a,width:r+i}},resolve:function(t,e,i){var a,r,o;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e)),void 0!==i&&n.isArray(o)&&(o=o[i]),void 0!==o))return o}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";var n=t(45),a="$chartjs",r="chartjs-",o=r+"render-monitor",s=r+"render-animation",l=["animationstart","webkitAnimationStart"],u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function d(t,e){var i=n.getStyle(t,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}var h=!!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 c(t,e,i){t.addEventListener(e,i,h)}function f(t,e,i){t.removeEventListener(e,i,h)}function g(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function m(t,e,i){var u,d,h,f,m,p,v,y,b=t[a]||(t[a]={}),x=b.resizer=function(t){var e=document.createElement("div"),i=r+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],o=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,o.scrollLeft=1e6,o.scrollTop=1e6};var s=function(){e._reset(),t()};return c(a,"scroll",s.bind(a,"expand")),c(o,"scroll",s.bind(o,"shrink")),e}((u=function(){if(b.resizer)return e(g("resize",i))},h=!1,f=[],function(){f=Array.prototype.slice.call(arguments),d=d||this,h||(h=!0,n.requestAnimFrame.call(window,function(){h=!1,u.apply(d,f)}))}));p=function(){if(b.resizer){var e=t.parentNode;e&&e!==x.parentNode&&e.insertBefore(x,e.firstChild),x._reset()}},v=(m=t)[a]||(m[a]={}),y=v.renderProxy=function(t){t.animationName===s&&p()},n.each(l,function(t){c(m,t,y)}),v.reflow=!!m.offsetParent,m.classList.add(o)}function p(t){var e,i,r,s=t[a]||{},u=s.resizer;delete s.resizer,i=(e=t)[a]||{},(r=i.renderProxy)&&(n.each(l,function(t){f(e,t,r)}),delete i.renderProxy),e.classList.remove(o),u&&u.parentNode&&u.parentNode.removeChild(u)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+s+"{"+n+"}@keyframes "+s+"{"+n+"}."+o+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[a]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===r||""===r){var o=d(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=d(t,"height");void 0!==o&&(t.height=s)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[a]){var i=e[a].initial;["height","width"].forEach(function(t){var a=i[t];n.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)}),n.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[a]}},addEventListener:function(t,e,i){var r=t.canvas;if("resize"!==e){var o=i[a]||(i[a]={});c(r,e,(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){var a,r,o,s;i((r=t,o=u[(a=e).type]||a.type,s=n.getRelativePosition(a,r),g(o,r,s.x,s.y,a)))})}else m(r,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var r=((i[a]||{}).proxies||{})[t.id+"_"+e];r&&f(n,e,r)}else p(n)}},n.addEvent=c,n.removeEvent=f},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),a=t(46),r=t(47),o=r._enabled?r:a;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},o)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("global",{plugins:{filler:{propagate:!0}}});var o={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.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,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function s(t,e,i){var n,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(n=parseFloat(r,10),isFinite(n)&&Math.floor(n)===n)return"-"!==r[0]&&"+"!==r[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;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 l(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?r=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?r=i.scaleZero:n.getBasePosition?r=n.getBasePosition():n.getBasePixel&&(r=n.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=n.isHorizontal())?r:null,y:e?null:r}}return null}function u(t,e,i){var n,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function d(t){return t&&!t.skip}function h(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)r.canvas.lineTo(t,e[o-1],e[o]);for(t.lineTo(i[a-1].x,i[a-1].y),o=a-1;o>0;--o)r.canvas.lineTo(t,i[o],i[o-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,r,d,h,c,f,g=(t.data.datasets||[]).length,m=e.propagate,p=[];for(n=0;n<g;++n)d=null,(r=(i=t.getDatasetMeta(n)).dataset)&&r._model&&r instanceof a.Line&&(d={visible:t.isDatasetVisible(n),fill:s(r,n,g),chart:t,el:r}),i.$filler=d,p.push(d);for(n=0;n<g;++n)(d=p[n])&&(d.fill=u(p,n,m),d.boundary=l(d),d.mapper=(void 0,f=void 0,c=(h=d).fill,f="dataset",!1===c?null:(isFinite(c)||(f="boundary"),o[f](h))))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var a=t.ctx,o=i.el,s=o._view,l=o._children||[],u=i.mapper,c=s.backgroundColor||n.global.defaultColor;u&&c&&l.length&&(r.canvas.clipArea(a,t.chartArea),function(t,e,i,n,a,r){var o,s,l,u,c,f,g,m=e.length,p=n.spanGaps,v=[],y=[],b=0,x=0;for(t.beginPath(),o=0,s=m+!!r;o<s;++o)c=i(u=e[l=o%m]._view,l,n),f=d(u),g=d(c),f&&g?(b=v.push(u),x=y.push(c)):b&&x&&(p?(f&&v.push(u),g&&y.push(c)):(h(t,v,y,b,x),b=x=0,v=[],y=[]));h(t,v,y,b,x),t.closePath(),t.fillStyle=a,t.fill()}(a,l,u,s,c,o._loop),r.canvas.unclipArea(a))}}}},{25:25,40:40,45:45}],51:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=t(30),s=r.noop;function l(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}n._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return r.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:r.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var u=a.extend({initialize:function(t){r.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:function(){var t=this,e=t.options.labels||{},i=r.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,e=t.options,i=e.labels,a=e.display,o=t.ctx,s=n.global,u=r.valueOrDefault,d=u(i.fontSize,s.defaultFontSize),h=u(i.fontStyle,s.defaultFontStyle),c=u(i.fontFamily,s.defaultFontFamily),f=r.fontString(d,h,c),g=t.legendHitBoxes=[],m=t.minSize,p=t.isHorizontal();if(p?(m.width=t.maxWidth,m.height=a?10:0):(m.width=a?10:0,m.height=t.maxHeight),a)if(o.font=f,p){var v=t.lineWidths=[0],y=t.legendItems.length?d+i.padding:0;o.textAlign="left",o.textBaseline="top",r.each(t.legendItems,function(e,n){var a=l(i,d)+d/2+o.measureText(e.text).width;v[v.length-1]+a+i.padding>=t.width&&(y+=d+i.padding,v[v.length]=t.left),g[n]={left:0,top:0,width:a,height:d},v[v.length-1]+=a+i.padding}),m.height+=y}else{var b=i.padding,x=t.columnWidths=[],_=i.padding,k=0,w=0,M=d+b;r.each(t.legendItems,function(t,e){var n=l(i,d)+d/2+o.measureText(t.text).width;w+M>m.height&&(_+=k+i.padding,x.push(k),k=0,w=0),k=Math.max(k,n),w+=M,g[e]={left:0,top:0,width:n,height:d}}),_+=k,x.push(k),m.width+=_}t.width=m.width,t.height=m.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,a=n.global,o=a.elements.line,s=t.width,u=t.lineWidths;if(e.display){var d,h=t.ctx,c=r.valueOrDefault,f=c(i.fontColor,a.defaultFontColor),g=c(i.fontSize,a.defaultFontSize),m=c(i.fontStyle,a.defaultFontStyle),p=c(i.fontFamily,a.defaultFontFamily),v=r.fontString(g,m,p);h.textAlign="left",h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=v;var y=l(i,g),b=t.legendHitBoxes,x=t.isHorizontal();d=x?{x:t.left+(s-u[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var _=g+i.padding;r.each(t.legendItems,function(n,l){var f,m,p,v,k,w=h.measureText(n.text).width,M=y+g/2+w,S=d.x,D=d.y;x?S+M>=s&&(D=d.y+=_,d.line++,S=d.x=t.left+(s-u[d.line])/2):D+_>t.bottom&&(S=d.x=S+t.columnWidths[d.line]+i.padding,D=d.y=t.top+i.padding,d.line++),function(t,i,n){if(!(isNaN(y)||y<=0)){h.save(),h.fillStyle=c(n.fillStyle,a.defaultColor),h.lineCap=c(n.lineCap,o.borderCapStyle),h.lineDashOffset=c(n.lineDashOffset,o.borderDashOffset),h.lineJoin=c(n.lineJoin,o.borderJoinStyle),h.lineWidth=c(n.lineWidth,o.borderWidth),h.strokeStyle=c(n.strokeStyle,a.defaultColor);var s=0===c(n.lineWidth,o.borderWidth);if(h.setLineDash&&h.setLineDash(c(n.lineDash,o.borderDash)),e.labels&&e.labels.usePointStyle){var l=g*Math.SQRT2/2,u=l/Math.SQRT2,d=t+u,f=i+u;r.canvas.drawPoint(h,n.pointStyle,l,d,f)}else s||h.strokeRect(t,i,y,g),h.fillRect(t,i,y,g);h.restore()}}(S,D,n),b[l].left=S,b[l].top=D,f=n,m=w,v=y+(p=g/2)+S,k=D+p,h.fillText(f.text,v,k),f.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(v,k),h.lineTo(v+m,k),h.stroke()),x?d.x+=M+i.padding:d.y+=_})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var u=s[l];if(r>=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function d(t,e){var i=new u({ctx:t.ctx,options:e,chart:t});o.configure(t,i,e),o.addBox(t,i),t.legend=i}e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&d(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(r.mergeIf(e,n.global.legend),i?(o.configure(t,i,e),i.options=e):d(t,e)):i&&(o.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=t(30),s=r.noop;n._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var l=a.extend({initialize:function(t){r.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:s,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:s,afterBuildLabels:s,beforeFit:s,fit:function(){var t=r.valueOrDefault,e=this.options,i=e.display,a=t(e.fontSize,n.global.defaultFontSize),o=this.minSize,s=r.isArray(e.text)?e.text.length:1,l=r.options.toLineHeight(e.lineHeight,a),u=i?s*l+2*e.padding:0;this.isHorizontal()?(o.width=this.maxWidth,o.height=u):(o.width=u,o.height=this.maxHeight),this.width=o.width,this.height=o.height},afterFit:s,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=r.valueOrDefault,i=this.options,a=n.global;if(i.display){var o,s,l,u=e(i.fontSize,a.defaultFontSize),d=e(i.fontStyle,a.defaultFontStyle),h=e(i.fontFamily,a.defaultFontFamily),c=r.fontString(u,d,h),f=r.options.toLineHeight(i.lineHeight,u),g=f/2+i.padding,m=0,p=this.top,v=this.left,y=this.bottom,b=this.right;t.fillStyle=e(i.fontColor,a.defaultFontColor),t.font=c,this.isHorizontal()?(s=v+(b-v)/2,l=p+g,o=b-v):(s="left"===i.position?v+g:b-g,l=p+(y-p)/2,o=y-p,m=Math.PI*("left"===i.position?-.5:.5)),t.save(),t.translate(s,l),t.rotate(m),t.textAlign="center",t.textBaseline="middle";var x=i.text;if(r.isArray(x))for(var _=0,k=0;k<x.length;++k)t.fillText(x[k],0,_,o),_+=f;else t.fillText(x,0,0,o);t.restore()}}});function u(t,e){var i=new l({ctx:t.ctx,options:e,chart:t});o.configure(t,i,e),o.addBox(t,i),t.titleBlock=i}e.exports={id:"title",_element:l,beforeInit:function(t){var e=t.options.title;e&&u(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(r.mergeIf(e,n.global.title),i?(o.configure(t,i,e),i.options=e):u(t,e)):i&&(o.removeBox(t,i),delete t.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(t,e,i){"use strict";e.exports=function(t){var e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this.getLabels();this.ticks=0===this.minIndex&&this.maxIndex===t.length-1?t:t.slice(this.minIndex,this.maxIndex+1)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.isHorizontal();return i.yLabels&&!n?this.getRightValue(i.datasets[e].data[t]):this.ticks[t-this.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,r=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var o=n.getLabels().indexOf(t);e=-1!==o?o:e}if(n.isHorizontal()){var s=n.width/r,l=s*(e-n.minIndex);return a&&(l+=s/2),n.left+Math.round(l)}var u=n.height/r,d=u*(e-n.minIndex);return a&&(d+=u/2),n.top+Math.round(d)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this.options.offset,i=Math.max(this._ticks.length-(e?0:1),1),n=this.isHorizontal(),a=(n?this.width:this.height)/i;return t-=n?this.left:this.top,e&&(t-=a/2),(t<=0?0:Math.round(t/a))+this.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],54:[function(t,e,i){"use strict";var n=t(25),a=t(45),r=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:r.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,r=t.isHorizontal();function o(e){return r?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var s=e.stacked;if(void 0===s&&a.each(n,function(t,e){if(!s){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(s=!0)}}),e.stacked||s){var l={};a.each(n,function(n,r){var s=i.getDatasetMeta(r),u=[s.type,void 0===e.stacked&&void 0===s.stack?r:"",s.stack].join(".");void 0===l[u]&&(l[u]={positiveValues:[],negativeValues:[]});var d=l[u].positiveValues,h=l[u].negativeValues;i.isDatasetVisible(r)&&o(s)&&a.each(n.data,function(i,n){var a=+t.getRightValue(i);isNaN(a)||s.data[n].hidden||(d[n]=d[n]||0,h[n]=h[n]||0,e.relativePoints?d[n]=100:a<0?h[n]+=a:d[n]+=a)})}),a.each(l,function(e){var i=e.positiveValues.concat(e.negativeValues),n=a.min(i),r=a.max(i);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?r:Math.max(t.max,r)})}else a.each(n,function(e,n){var r=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(r)&&a.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||r.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=a.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,i=+this.getRightValue(t),n=this.end-e;return this.isHorizontal()?this.left+this.width/n*(i-e):this.bottom-this.height/n*(i-e)},getValueForPixel:function(t){var e=this.isHorizontal(),i=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/i;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],55:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=n.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=n.sign(t.min),a=n.sign(t.max);i<0&&a<0?t.max=0:i>0&&a>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=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)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),a={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,stepSize:n.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var i,a=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var r=n.niceNum(e.max-e.min,!1);i=n.niceNum(r/(t.maxTicks-1),!0)}var o=Math.floor(e.min/i)*i,s=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&n.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(o=t.min,s=t.max);var l=(s-o)/i;l=n.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l);var u=1;i<1&&(u=Math.pow(10,i.toString().length-2),o=Math.round(o*u)/u,s=Math.round(s*u)/u),a.push(void 0!==t.min?t.min:o);for(var d=1;d<l;++d)a.push(Math.round((o+d*i)*u)/u);return a.push(void 0!==t.max?t.max:s),a}(a,t);t.handleDirectionalChanges(),t.max=n.max(r),t.min=n.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(this)}})}},{45:45}],56:[function(t,e,i){"use strict";var n=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,a=i.data.datasets,r=t.isHorizontal();function o(e){return r?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var s=e.stacked;if(void 0===s&&n.each(a,function(t,e){if(!s){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(s=!0)}}),e.stacked||s){var l={};n.each(a,function(a,r){var s=i.getDatasetMeta(r),u=[s.type,void 0===e.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&o(s)&&(void 0===l[u]&&(l[u]=[]),n.each(a.data,function(e,i){var n=l[u],a=+t.getRightValue(e);isNaN(a)||s.data[i].hidden||a<0||(n[i]=n[i]||0,n[i]+=a)}))}),n.each(l,function(e){if(e.length>0){var i=n.min(e),a=n.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?a:Math.max(t.max,a)}})}else n.each(a,function(e,a){var r=i.getDatasetMeta(a);i.isDatasetVisible(a)&&o(r)&&n.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||r.data[i].hidden||n<0||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n),0!==n&&(null===t.minNotZero||n<t.minNotZero)&&(t.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,i=n.valueOrDefault;t.min=i(e.min,t.min),t.max=i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(n.log10(t.min))-1),t.max=Math.pow(10,Math.floor(n.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(n.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(n.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(n.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),a={min:e.min,max:e.max},r=t.ticks=function(t,e){var i,a,r=[],o=n.valueOrDefault,s=o(t.min,Math.pow(10,Math.floor(n.log10(e.min)))),l=Math.floor(n.log10(e.max)),u=Math.ceil(e.max/Math.pow(10,l));0===s?(i=Math.floor(n.log10(e.minNotZero)),a=Math.floor(e.minNotZero/Math.pow(10,i)),r.push(s),s=a*Math.pow(10,i)):(i=Math.floor(n.log10(s)),a=Math.floor(s/Math.pow(10,i)));for(var d=i<0?Math.pow(10,Math.abs(i)):1;r.push(s),10==++a&&(a=1,d=++i>=0?1:d),s=Math.round(a*Math.pow(10,i)*d)/d,i<l||i===l&&a<u;);var h=o(t.max,s);return r.push(h),r}(a,t);t.max=n.max(r),t.min=n.min(r),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(n.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,a,r,o,s,l=this,u=l.options.ticks.reverse,d=n.log10,h=l._getFirstTickValue(l.minNotZero),c=0;return e=+l.getRightValue(e),u?(r=l.end,o=l.start,s=-1):(r=l.start,o=l.end,s=1),l.isHorizontal()?(i=l.width,a=u?l.right:l.left):(i=l.height,s*=-1,a=u?l.top:l.bottom),e!==r&&(0===r&&(i-=c=n.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),r=h),0!==e&&(c+=i/(d(o)-d(r))*(d(e)-d(r))),a+=s*c),a},getValueForPixel:function(e){var i,a,r,o,s=this,l=s.options.ticks.reverse,u=n.log10,d=s._getFirstTickValue(s.minNotZero);if(l?(a=s.end,r=s.start):(a=s.start,r=s.end),s.isHorizontal()?(i=s.width,o=l?s.right-e:e-s.left):(i=s.height,o=l?e-s.top:s.bottom-e),o!==a){if(0===a){var h=n.getValueOrDefault(s.options.ticks.fontSize,t.defaults.global.defaultFontSize);o-=h,i-=h,a=d}o*=u(r)-u(a),o/=i,o=Math.pow(10,u(a)+o)}return o}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(25),a=t(45),r=t(34);e.exports=function(t){var e=n.global,i={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:r.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function o(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function s(t){var i=t.options.pointLabels,n=a.valueOrDefault(i.fontSize,e.defaultFontSize),r=a.valueOrDefault(i.fontStyle,e.defaultFontStyle),o=a.valueOrDefault(i.fontFamily,e.defaultFontFamily);return{size:n,style:r,family:o,font:a.fontString(n,r,o)}}function l(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||t>a?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function u(t,e,i,n){if(a.isArray(e))for(var r=i.y,o=1.5*n,s=0;s<e.length;++s)t.fillText(e[s],i.x,r),r+=o;else t.fillText(e,i.x,i.y)}function d(t){return a.isNumber(t)?t:0}var h=t.LinearScaleBase.extend({setDimensions:function(){var t=this,i=t.options,n=i.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var r=a.min([t.height,t.width]),o=a.valueOrDefault(n.fontSize,e.defaultFontSize);t.drawingArea=i.display?r/2-(o/2+n.backdropPaddingY):r/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;a.each(e.data.datasets,function(r,o){if(e.isDatasetVisible(o)){var s=e.getDatasetMeta(o);a.each(r.data,function(e,a){var r=+t.getRightValue(e);isNaN(r)||s.data[a].hidden||(i=Math.min(r,i),n=Math.max(r,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,i=a.valueOrDefault(t.fontSize,e.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)))},convertTicksToLabels:function(){t.LinearScaleBase.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,r=s(t),u=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=r.font,t._pointLabelSizes=[];var c,f,g,m=o(t);for(e=0;e<m;e++){n=t.getPointPosition(e,u),c=t.ctx,f=r.size,g=t.pointLabels[e]||"",i=a.isArray(g)?{w:a.longestText(c,c.font,g),h:g.length*f+1.5*(g.length-1)*f}:{w:c.measureText(g).width,h:f},t._pointLabelSizes[e]=i;var p=t.getIndexAngle(e),v=a.toDegrees(p)%360,y=l(v,n.x,i.w,0,180),b=l(v,n.y,i.h,90,270);y.start<d.l&&(d.l=y.start,h.l=p),y.end>d.r&&(d.r=y.end,h.r=p),b.start<d.t&&(d.t=b.start,h.t=p),b.end>d.b&&(d.b=b.end,h.b=p)}t.setReductions(u,d,h)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),a=Math.max(e.r-this.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),o=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=d(n),a=d(a),r=d(r),o=d(o),this.drawingArea=Math.min(Math.round(t-(n+a)/2),Math.round(t-(r+o)/2)),this.setCenterPoint(n,a,r,o)},setCenterPoint:function(t,e,i,n){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=i+a.drawingArea,l=a.height-n-a.drawingArea;a.xCenter=Math.round((o+r)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/o(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,i=t.options,n=i.gridLines,r=i.ticks,l=a.valueOrDefault;if(i.display){var d=t.ctx,h=this.getIndexAngle(0),c=l(r.fontSize,e.defaultFontSize),f=l(r.fontStyle,e.defaultFontStyle),g=l(r.fontFamily,e.defaultFontFamily),m=a.fontString(c,f,g);a.each(t.ticks,function(i,s){if(s>0||r.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(n.display&&0!==s&&function(t,e,i,n){var r=t.ctx;if(r.strokeStyle=a.valueAtIndexOrDefault(e.color,n-1),r.lineWidth=a.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),r.closePath(),r.stroke();else{var s=o(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,i);r.moveTo(l.x,l.y);for(var u=1;u<s;u++)l=t.getPointPosition(u,i),r.lineTo(l.x,l.y);r.closePath(),r.stroke()}}(t,n,u,s),r.display){var f=l(r.fontColor,e.defaultFontColor);if(d.font=m,d.save(),d.translate(t.xCenter,t.yCenter),d.rotate(h),r.showLabelBackdrop){var g=d.measureText(i).width;d.fillStyle=r.backdropColor,d.fillRect(-g/2-r.backdropPaddingX,-u-c/2-r.backdropPaddingY,g+2*r.backdropPaddingX,c+2*r.backdropPaddingY)}d.textAlign="center",d.textBaseline="middle",d.fillStyle=f,d.fillText(i,0,-u),d.restore()}}}),(i.angleLines.display||i.pointLabels.display)&&function(t){var i=t.ctx,n=t.options,r=n.angleLines,l=n.pointLabels;i.lineWidth=r.lineWidth,i.strokeStyle=r.color;var d,h,c,f,g=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),m=s(t);i.textBaseline="top";for(var p=o(t)-1;p>=0;p--){if(r.display){var v=t.getPointPosition(p,g);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(v.x,v.y),i.stroke(),i.closePath()}if(l.display){var y=t.getPointPosition(p,g+5),b=a.valueAtIndexOrDefault(l.fontColor,p,e.defaultFontColor);i.font=m.font,i.fillStyle=b;var x=t.getIndexAngle(p),_=a.toDegrees(x);i.textAlign=0===(f=_)||180===f?"center":f<180?"left":"right",d=_,h=t._pointLabelSizes[p],c=y,90===d||270===d?c.y-=h.h/2:(d>270||d<90)&&(c.y-=h.h),u(i,t.pointLabels[p]||"",y,m.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",h,i)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";var n=t(6);n="function"==typeof n?n:window.moment;var a=t(25),r=t(45),o=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},u=Object.keys(l);function d(t,e){return t-e}function h(t){var e,i,n,a={},r=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,r.push(n));return r}function c(t,e,i,n){var a=function(t,e,i){for(var n,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(n=o+s>>1)-1]||null,r=t[n],!a)return{lo:null,hi:r};if(r[e]<i)o=n+1;else{if(!(a[e]>i))return{lo:a,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,i),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?(i-r[e])/s:0,u=(o[n]-r[n])*l;return r[n]+u}function f(t,e){var i=e.parser,a=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof a?n(t,a):(t instanceof n||(t=n(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function g(t,e){if(r.isNullOrUndef(t))return null;var i=e.options.time,n=f(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function m(t){for(var e=u.indexOf(t)+1,i=u.length;e<i;++e)if(l[u[e]].common)return u[e]}function p(t,e,i,a){var o,d=a.time,h=d.unit||function(t,e,i,n){var a,r,o,d=u.length;for(a=u.indexOf(t);a<d-1;++a)if(o=(r=l[u[a]]).steps?r.steps[r.steps.length-1]:s,r.common&&Math.ceil((i-e)/(o*r.size))<=n)return u[a];return u[d-1]}(d.minUnit,t,e,i),c=m(h),f=r.valueOrDefault(d.stepSize,d.unitStepSize),g="week"===h&&d.isoWeekday,p=a.ticks.major.enabled,v=l[h],y=n(t),b=n(e),x=[];for(f||(f=function(t,e,i,n){var a,r,o,s=e-t,u=l[i],d=u.size,h=u.steps;if(!h)return Math.ceil(s/(n*d));for(a=0,r=h.length;a<r&&(o=h[a],!(Math.ceil(s/(d*o))<=n));++a);return o}(t,e,h,i)),g&&(y=y.isoWeekday(g),b=b.isoWeekday(g)),y=y.startOf(g?"day":h),(b=b.startOf(g?"day":h))<e&&b.add(1,h),o=n(y),p&&c&&!g&&!d.round&&(o.startOf(c),o.add(~~((y-o)/(v.size*f))*f,h));o<b;o.add(f,h))x.push(+o);return x.push(+o),x}e.exports=function(t){var e=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this.options;return e.time&&e.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,i,a,l,u,c=this,f=c.chart,m=c.options.time,p=m.unit||"day",v=s,y=o,b=[],x=[],_=[];for(t=0,i=f.data.labels.length;t<i;++t)_.push(g(f.data.labels[t],c));for(t=0,i=(f.data.datasets||[]).length;t<i;++t)if(f.isDatasetVisible(t))if(l=f.data.datasets[t].data,r.isObject(l[0]))for(x[t]=[],e=0,a=l.length;e<a;++e)u=g(l[e],c),b.push(u),x[t][e]=u;else b.push.apply(b,_),x[t]=_.slice(0);else x[t]=[];_.length&&(_=h(_).sort(d),v=Math.min(v,_[0]),y=Math.max(y,_[_.length-1])),b.length&&(b=h(b).sort(d),v=Math.min(v,b[0]),y=Math.max(y,b[b.length-1])),v=g(m.min,c)||v,y=g(m.max,c)||y,v=v===s?+n().startOf(p):v,y=y===o?+n().endOf(p)+1:y,c.min=Math.min(v,y),c.max=Math.max(v+1,y),c._horizontal=c.isHorizontal(),c._table=[],c._timestamps={data:b,datasets:x,labels:_}},buildTicks:function(){var t,e,i,a,r,o,s,d,h,v,y,b,x=this,_=x.min,k=x.max,w=x.options,M=w.time,S=[],D=[];switch(w.ticks.source){case"data":S=x._timestamps.data;break;case"labels":S=x._timestamps.labels;break;case"auto":default:S=p(_,k,x.getLabelCapacity(_),w)}for("ticks"===w.bounds&&S.length&&(_=S[0],k=S[S.length-1]),_=g(M.min,x)||_,k=g(M.max,x)||k,t=0,e=S.length;t<e;++t)(i=S[t])>=_&&i<=k&&D.push(i);return x.min=_,x.max=k,x._unit=M.unit||function(t,e,i,a){var r,o,s=n.duration(n(a).diff(n(i)));for(r=u.length-1;r>=u.indexOf(e);r--)if(o=u[r],l[o].common&&s.as(o)>=t.length)return o;return u[e?u.indexOf(e):0]}(D,M.minUnit,x.min,x.max),x._majorUnit=m(x._unit),x._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,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<i&&d.push(s);for(d.push(i),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}(x._timestamps.data,_,k,w.distribution),x._offsets=(a=x._table,r=D,o=_,s=k,y=0,b=0,(d=w).offset&&r.length&&(d.time.min||(h=r.length>1?r[1]:s,v=r[0],y=(c(a,"time",h,"pos")-c(a,"time",v,"pos"))/2),d.time.max||(h=r[r.length-1],v=r.length>1?r[r.length-2]:o,b=(c(a,"time",h,"pos")-c(a,"time",v,"pos"))/2)),{left:y,right:b}),x._labelFormat=function(t,e){var i,n,a,r=t.length;for(i=0;i<r;i++){if(0!==(n=f(t[i],e)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(a=!0)}return a?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(x._timestamps.data,M),function(t,e){var i,a,r,o,s=[];for(i=0,a=t.length;i<a;++i)r=t[i],o=!!e&&r===+n(r).startOf(e),s.push({value:r,major:o});return s}(D,x._majorUnit)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.options.time,a=i.labels&&t<i.labels.length?i.labels[t]:"",o=i.datasets[e].data[t];return r.isObject(o)&&(a=this.getRightValue(o)),n.tooltipFormat?f(a,n).format(n.tooltipFormat):"string"==typeof a?a:f(a,n).format(this._labelFormat)},tickFormatFunction:function(t,e,i,n){var a=this.options,o=t.valueOf(),s=a.time.displayFormats,l=s[this._unit],u=this._majorUnit,d=s[u],h=t.clone().startOf(u).valueOf(),c=a.ticks.major,f=c.enabled&&u&&d&&o===h,g=t.format(n||(f?d:l)),m=f?c:a.ticks.minor,p=r.valueOrDefault(m.callback,m.userCallback);return p?p(g,e,i):g},convertTicksToLabels:function(t){var e,i,a=[];for(e=0,i=t.length;e<i;++e)a.push(this.tickFormatFunction(n(t[e].value),e,t));return a},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=c(e._table,"time",t,"pos");return n+i*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=g(t,this)),null!==n)return this.getPixelForOffset(n)},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,i=e._horizontal?e.width:e.height,a=e._horizontal?e.left:e.top,r=(i?(t-a)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,o=c(e._table,"pos",r,"time");return n(o)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=r.toRadians(e.maxRotation),o=Math.cos(n),s=Math.sin(n);return i*o+r.valueOrDefault(e.fontSize,a.global.defaultFontSize)*s},getLabelCapacity:function(t){var e=this.options.time.displayFormats.millisecond,i=this.tickFormatFunction(n(t),0,[],e),a=this.getLabelWidth(i),r=this.isHorizontal()?this.width:this.height,o=Math.floor(r/a);return o>0?o:1}});t.scaleService.registerScaleType("time",e,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{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"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{25:25,45:45,6:6}]},{},[7])(7)});
1
  /*!
2
  * Chart.js
3
  * http://chartjs.org/
4
+ * Version: 2.7.3
5
  *
6
  * Copyright 2018 Chart.js Contributors
7
  * Released under the MIT license
8
  * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
9
  */
10
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function r(o,s,l){function u(e,t){if(!s[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var a=s[e]={exports:{}};o[e][0].call(a.exports,function(t){return u(o[e][1][t]||t)},a,a.exports,r,o,s,l)}return s[e].exports}for(var d="function"==typeof require&&require,t=0;t<l.length;t++)u(l[t]);return u}({1:[function(t,e,n){var r=t(5);function i(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3})$/i);if(i){i=i[1];for(var a=0;a<e.length;a++)e[a]=parseInt(i[a]+i[a],16)}else if(i=t.match(/^#([a-fA-F0-9]{6})$/i)){i=i[1];for(a=0;a<e.length;a++)e[a]=parseInt(i.slice(2*a,2*a+2),16)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=parseInt(i[a+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(a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(i[a+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=r[i[1]]))return}for(a=0;a<e.length;a++)e[a]=d(e[a],0,255);return n=n||0==n?d(n,0,1):1,e[3]=n,e}}function a(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[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(n)?1:n,0,1)]}}}function o(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[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(n)?1:n,0,1)]}}}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(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 u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function d(t,e,n){return Math.min(Math.max(e,t),n)}function h(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:i,getHsla:a,getRgb:function(t){var e=i(t);return e&&e.slice(0,3)},getHsl:function(t){var e=a(t);return e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=i(t);{if(e)return e[3];if(e=a(t))return e[3];if(e=o(t))return e[3]}},hexString:function(t){return"#"+h(t[0])+h(t[1])+h(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return s(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:s,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(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:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return u(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:u,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 c[t.slice(0,3)]}};var c={};for(var f in r)c[r[f]]=f},{5:5}],2:[function(t,e,n){var d=t(4),i=t(1),o=function(t){return t instanceof o?t:this instanceof o?(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=i.getRgba(t))?this.setValues("rgb",e):(e=i.getHsla(t))?this.setValues("hsl",e):(e=i.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 o(t);var e};o.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 i.hexString(this.values.rgb)},rgbString:function(){return i.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return i.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return i.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return i.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return i.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return i.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return i.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 n<e?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"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=this,i=t,a=void 0===e?.5:e,r=2*a-1,o=n.alpha()-i.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new o,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}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.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},o.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=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)];s=e.a}else if(void 0!==e[r[t][0]]){var l=r[t];for(n=0;n<t.length;n++)a[t][n]=e[l[n]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"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 u in r)u!==t&&(a[u]=d[t][u](a[t]));return!0},o.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)},o.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{1:1,4:4}],3:[function(t,e,n){function a(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]}function i(t){var e,n,i=t[0],a=t[1],r=t[2],o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return n=0==s?0:l/s*1e3/10,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),[e,n,s/255*1e3/10]}function o(t){var e=t[0],n=t[1],i=t[2];return[a(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]}function s(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]}function l(t){return S[JSON.stringify(t)]}function u(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=.04045<i?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)]}function d(t){var e=u(t),n=e[0],i=e[1],a=e[2];return i/=100,a/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(a=.008856<a?Math.pow(a,1/3):7.787*a+16/116))]}function h(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++,1<i&&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}function c(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));i*=255;switch(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]}}function f(t){var e,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(1<u&&(s/=u,l/=u),i=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(i=1-i),a=s+i*((n=1-l)-s),e){default:case 6:case 0:r=n,g=a,b=s;break;case 1:r=a,g=n,b=s;break;case 2:r=s,g=n,b=a;break;case 3:r=s,g=a,b=n;break;case 4:r=a,g=s,b=n;break;case 5:r=n,g=s,b=a}return[255*r,255*g,255*b]}function m(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))]}function p(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=.0031308<(e=3.2406*a+-1.5372*r+-.4986*o)?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=.0031308<i?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[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))]}function v(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]}function y(t){var e,n,i,a,r=t[0],o=t[1],s=t[2];return a=r<=8?(n=100*r/903.3)/100*7.787+16/116:(n=100*Math.pow((r+16)/116,3),Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),n,i=i/108.883<=.008859?i=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(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]}function _(t){return p(y(t))}function k(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)]}function w(t){return M[t]}e.exports={rgb2hsl:a,rgb2hsv:i,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:h,hsl2hsv:function(t){var e=t[0],n=t[1]/100,i=t[2]/100;return 0!==i?[e,100*(2*(n*=(i*=2)<=1?i:2-i)/(i+n)),100*((i+n)/2)]:[0,0,0]},hsl2hwb:function(t){return o(h(t))},hsl2cmyk:function(t){return s(h(t))},hsl2keyword:function(t){return l(h(t))},hsv2rgb:c,hsv2hsl:function(t){var e,n,i=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[i,100*(e=(e/=(n=(2-a)*r)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return o(c(t))},hsv2cmyk:function(t){return s(c(t))},hsv2keyword:function(t){return l(c(t))},hwb2rgb:f,hwb2hsl:function(t){return a(f(t))},hwb2hsv:function(t){return i(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:m,cmyk2hsl:function(t){return a(m(t))},cmyk2hsv:function(t){return i(m(t))},cmyk2hwb:function(t){return o(m(t))},cmyk2keyword:function(t){return l(m(t))},keyword2rgb:w,keyword2hsl:function(t){return a(w(t))},keyword2hsv:function(t){return i(w(t))},keyword2hwb:function(t){return o(w(t))},keyword2cmyk:function(t){return s(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return u(w(t))},xyz2rgb:p,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:y,lab2rgb:_,lab2lch:x,lch2lab:k,lch2xyz:function(t){return y(k(t))},lch2rgb:function(t){return _(k(t))}};var M={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]},S={};for(var D in M)S[JSON.stringify(M[D])]=D},{}],4:[function(t,e,n){var a=t(3),r=function(){return new u};for(var i in a){r[i+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),a[e](t)}}(i);var o=/(\w+)2(\w+)/.exec(i),s=o[1],l=o[2];(r[s]=r[s]||{})[l]=r[i]=function(i){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var e=a[i](t);if("string"==typeof e||void 0===e)return e;for(var n=0;n<e.length;n++)e[n]=Math.round(e[n]);return e}}(i)}var u=function(){this.convs={}};u.prototype.routeSpace=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))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var n=this.space,i=this.convs[n];e=r[n][t](i),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){u.prototype[e]=function(t){return this.routeSpace(e,arguments)}}),e.exports=r},{3:3}],5:[function(t,e,n){"use strict";e.exports={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]}},{}],6:[function(En,jn,t){var e,n;e=this,n=function(){"use strict";var t,a;function c(){return t.apply(null,arguments)}function s(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function l(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function u(t){return void 0===t}function d(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function h(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function g(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function m(t,e){for(var n in e)g(e,n)&&(t[n]=e[n]);return g(e,"toString")&&(t.toString=e.toString),g(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,n,i){return De(t,e,n,i,!0).utc()}function v(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function b(t){if(null==t._isValid){var e=v(t),n=a.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=p(NaN);return null!=t?m(v(e),t):v(e).userInvalidated=!0,e}a=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var r=c.momentProperties=[];function x(t,e){var n,i,a;if(u(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),u(e._i)||(t._i=e._i),u(e._f)||(t._f=e._f),u(e._l)||(t._l=e._l),u(e._strict)||(t._strict=e._strict),u(e._tzm)||(t._tzm=e._tzm),u(e._isUTC)||(t._isUTC=e._isUTC),u(e._offset)||(t._offset=e._offset),u(e._pf)||(t._pf=v(e)),u(e._locale)||(t._locale=e._locale),0<r.length)for(n=0;n<r.length;n++)u(a=e[i=r[n]])||(t[i]=a);return t}var e=!1;function _(t){x(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===e&&(e=!0,c.updateOffset(this),e=!1)}function k(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function M(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function o(t,e,n){var i,a=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<a;i++)(n&&t[i]!==e[i]||!n&&M(t[i])!==M(e[i]))&&o++;return o+r}function S(t){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function n(a,r){var o=!0;return m(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,a),o){for(var t,e=[],n=0;n<arguments.length;n++){if(t="","object"==typeof arguments[n]){for(var i in t+="\n["+n+"] ",arguments[0])t+=i+": "+arguments[0][i]+", ";t=t.slice(0,-2)}else t=arguments[n];e.push(t)}S(a+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack),o=!1}return r.apply(this,arguments)},r)}var i,D={};function C(t,e){null!=c.deprecationHandler&&c.deprecationHandler(t,e),D[t]||(S(e),D[t]=!0)}function P(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function T(t,e){var n,i=m({},t);for(n in e)g(e,n)&&(l(t[n])&&l(e[n])?(i[n]={},m(i[n],t[n]),m(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)g(t,n)&&!g(e,n)&&l(t[n])&&(i[n]=m({},i[n]));return i}function O(t){null!=t&&this.set(t)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,i=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)g(t,e)&&n.push(e);return n};var I={};function A(t,e){var n=t.toLowerCase();I[n]=I[n+"s"]=I[e]=t}function F(t){return"string"==typeof t?I[t]||I[t.toLowerCase()]:void 0}function R(t){var e,n,i={};for(n in t)g(t,n)&&(e=F(n))&&(i[e]=t[n]);return i}var L={};function Y(t,e){L[t]=e}function W(t,e,n){var i=""+Math.abs(t),a=e-i.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},H={};function B(t,e,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),t&&(H[t]=a),e&&(H[e[0]]=function(){return W(a.apply(this,arguments),e[1],e[2])}),n&&(H[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function E(t,e){return t.isValid()?(e=j(e,t.localeData()),V[e]=V[e]||function(i){var t,a,e,r=i.match(N);for(t=0,a=r.length;t<a;t++)H[r[t]]?r[t]=H[r[t]]:r[t]=(e=r[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(t){var e,n="";for(e=0;e<a;e++)n+=P(r[e])?r[e].call(t,i):r[e];return n}}(e),V[e](t)):t.localeData().invalidDate()}function j(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,i),z.lastIndex=0,n-=1;return t}var U=/\d/,G=/\d\d/,q=/\d{3}/,Z=/\d{4}/,X=/[+-]?\d{6}/,J=/\d\d?/,$=/\d\d\d\d?/,K=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,tt=/\d{1,4}/,et=/[+-]?\d{1,6}/,nt=/\d+/,it=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,rt=/Z|[+-]\d\d(?::?\d\d)?/gi,ot=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,st={};function lt(t,n,i){st[t]=P(n)?n:function(t,e){return t&&i?i:n}}function ut(t,e){return g(st,t)?st[t](e._strict,e._locale):new RegExp(dt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,a){return e||n||i||a})))}function dt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function ct(t,n){var e,i=n;for("string"==typeof t&&(t=[t]),d(n)&&(i=function(t,e){e[n]=M(t)}),e=0;e<t.length;e++)ht[t[e]]=i}function ft(t,a){ct(t,function(t,e,n,i){n._w=n._w||{},a(t,n._w,n,i)})}var gt=0,mt=1,pt=2,vt=3,bt=4,yt=5,xt=6,_t=7,kt=8;function wt(t){return Mt(t)?366:365}function Mt(t){return t%4==0&&t%100!=0||t%400==0}B("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),A("year","y"),Y("year",1),lt("Y",it),lt("YY",J,G),lt("YYYY",tt,Z),lt("YYYYY",et,X),lt("YYYYYY",et,X),ct(["YYYYY","YYYYYY"],gt),ct("YYYY",function(t,e){e[gt]=2===t.length?c.parseTwoDigitYear(t):M(t)}),ct("YY",function(t,e){e[gt]=c.parseTwoDigitYear(t)}),ct("Y",function(t,e){e[gt]=parseInt(t,10)}),c.parseTwoDigitYear=function(t){return M(t)+(68<M(t)?1900:2e3)};var St,Dt=Ct("FullYear",!0);function Ct(e,n){return function(t){return null!=t?(Tt(this,e,t),c.updateOffset(this,n),this):Pt(this,e)}}function Pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Tt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Ot(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Ot(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?Mt(t)?29:28:31-i%7%2}St=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),A("month","M"),Y("month",8),lt("M",J),lt("MM",J,G),lt("MMM",function(t,e){return e.monthsShortRegex(t)}),lt("MMMM",function(t,e){return e.monthsRegex(t)}),ct(["M","MM"],function(t,e){e[mt]=M(t)-1}),ct(["MMM","MMMM"],function(t,e,n,i){var a=n._locale.monthsParse(t,i,n._strict);null!=a?e[mt]=a:v(n).invalidMonth=t});var It=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,At="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Ft="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Rt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=M(e);else if(!d(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Ot(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Lt(t){return null!=t?(Rt(this,t),c.updateOffset(this,!0),this):Pt(this,"Month")}var Yt=ot;var Wt=ot;function Nt(){function t(t,e){return e.length-t.length}var e,n,i=[],a=[],r=[];for(e=0;e<12;e++)n=p([2e3,e]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),a.sort(t),r.sort(t),e=0;e<12;e++)i[e]=dt(i[e]),a[e]=dt(a[e]);for(e=0;e<24;e++)r[e]=dt(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function zt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Vt(t,e,n){var i=7+e-n;return-((7+zt(t,0,i).getUTCDay()-e)%7)+i-1}function Ht(t,e,n,i,a){var r,o,s=1+7*(e-1)+(7+n-i)%7+Vt(t,i,a);return o=s<=0?wt(r=t-1)+s:s>wt(t)?(r=t+1,s-wt(t)):(r=t,s),{year:r,dayOfYear:o}}function Bt(t,e,n){var i,a,r=Vt(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Et(a=t.year()-1,e,n):o>Et(t.year(),e,n)?(i=o-Et(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Et(t,e,n){var i=Vt(t,e,n),a=Vt(t+1,e,n);return(wt(t)-i+a)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),Y("week",5),Y("isoWeek",5),lt("w",J),lt("ww",J,G),lt("W",J),lt("WW",J,G),ft(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=M(t)});B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),lt("d",J),lt("e",J),lt("E",J),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:v(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,i){e[i]=M(t)});var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Gt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qt=ot;var Zt=ot;var Xt=ot;function Jt(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),r=this.weekdays(n,""),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),u[e]=dt(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function $t(){return this.hours()%12||12}function Kt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,$t),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)}),B("hmmss",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),Kt("a",!0),Kt("A",!1),A("hour","h"),Y("hour",13),lt("a",Qt),lt("A",Qt),lt("H",J),lt("h",J),lt("k",J),lt("HH",J,G),lt("hh",J,G),lt("kk",J,G),lt("hmm",$),lt("hmmss",K),lt("Hmm",$),lt("Hmmss",K),ct(["H","HH"],vt),ct(["k","kk"],function(t,e,n){var i=M(t);e[vt]=24===i?0:i}),ct(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ct(["h","hh"],function(t,e,n){e[vt]=M(t),v(n).bigHour=!0}),ct("hmm",function(t,e,n){var i=t.length-2;e[vt]=M(t.substr(0,i)),e[bt]=M(t.substr(i)),v(n).bigHour=!0}),ct("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=M(t.substr(0,i)),e[bt]=M(t.substr(i,2)),e[yt]=M(t.substr(a)),v(n).bigHour=!0}),ct("Hmm",function(t,e,n){var i=t.length-2;e[vt]=M(t.substr(0,i)),e[bt]=M(t.substr(i))}),ct("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=M(t.substr(0,i)),e[bt]=M(t.substr(i,2)),e[yt]=M(t.substr(a))});var te,ee=Ct("Hours",!0),ne={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:jt,weekdaysMin:Gt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},ie={},ae={};function re(t){return t?t.toLowerCase().replace("_","-"):t}function oe(t){var e=null;if(!ie[t]&&void 0!==jn&&jn&&jn.exports)try{e=te._abbr,En("./locale/"+t),se(e)}catch(t){}return ie[t]}function se(t,e){var n;return t&&((n=u(e)?ue(t):le(t,e))?te=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),te._abbr}function le(t,e){if(null===e)return delete ie[t],null;var n,i=ne;if(e.abbr=t,null!=ie[t])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ie[t]._config;else if(null!=e.parentLocale)if(null!=ie[e.parentLocale])i=ie[e.parentLocale]._config;else{if(null==(n=oe(e.parentLocale)))return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;i=n._config}return ie[t]=new O(T(i,e)),ae[t]&&ae[t].forEach(function(t){le(t.name,t.config)}),se(t),ie[t]}function ue(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!s(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r<t.length;){for(e=(a=re(t[r]).split("-")).length,n=(n=re(t[r+1]))?n.split("-"):null;0<e;){if(i=oe(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&o(a,n,!0)>=e-1)break;e--}r++}return te}(t)}function de(t){var e,n=t._a;return n&&-2===v(t).overflow&&(e=n[mt]<0||11<n[mt]?mt:n[pt]<1||n[pt]>Ot(n[gt],n[mt])?pt:n[vt]<0||24<n[vt]||24===n[vt]&&(0!==n[bt]||0!==n[yt]||0!==n[xt])?vt:n[bt]<0||59<n[bt]?bt:n[yt]<0||59<n[yt]?yt:n[xt]<0||999<n[xt]?xt:-1,v(t)._overflowDayOfYear&&(e<gt||pt<e)&&(e=pt),v(t)._overflowWeeks&&-1===e&&(e=_t),v(t)._overflowWeekday&&-1===e&&(e=kt),v(t).overflow=e),t}function he(t,e,n){return null!=t?t:null!=e?e:n}function ce(t){var e,n,i,a,r,o=[];if(!t._d){var s,l;for(s=t,l=new Date(c.now()),i=s._useUTC?[l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()]:[l.getFullYear(),l.getMonth(),l.getDate()],t._w&&null==t._a[pt]&&null==t._a[mt]&&function(t){var e,n,i,a,r,o,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,o=4,n=he(e.GG,t._a[gt],Bt(Ce(),1,4).year),i=he(e.W,1),((a=he(e.E,1))<1||7<a)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var u=Bt(Ce(),r,o);n=he(e.gg,t._a[gt],u.year),i=he(e.w,u.week),null!=e.d?((a=e.d)<0||6<a)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||6<e.e)&&(l=!0)):a=r}i<1||i>Et(n,r,o)?v(t)._overflowWeeks=!0:null!=l?v(t)._overflowWeekday=!0:(s=Ht(n,i,a,r,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(r=he(t._a[gt],i[gt]),(t._dayOfYear>wt(r)||0===t._dayOfYear)&&(v(t)._overflowDayOfYear=!0),n=zt(r,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[pt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=i[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[bt]&&0===t._a[yt]&&0===t._a[xt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?zt:function(t,e,n,i,a,r,o){var s=new Date(t,e,n,i,a,r,o);return t<100&&0<=t&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,o),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(v(t).weekdayMismatch=!0)}}var fe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,pe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],be=/^\/?Date\((\-?\d+)/i;function ye(t){var e,n,i,a,r,o,s=t._i,l=fe.exec(s)||ge.exec(s);if(l){for(v(t).iso=!0,e=0,n=pe.length;e<n;e++)if(pe[e][1].exec(l[1])){a=pe[e][0],i=!1!==pe[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,n=ve.length;e<n;e++)if(ve[e][1].exec(l[3])){r=(l[2]||" ")+ve[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(l[4]){if(!me.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),Me(t)}else t._isValid=!1}var xe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function _e(t,e,n,i,a,r){var o=[function(t){var e=parseInt(t,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(t),Ft.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(a,10)];return r&&o.push(parseInt(r,10)),o}var ke={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function we(t){var e,n,i,a=xe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(a){var r=_e(a[4],a[3],a[2],a[5],a[6],a[7]);if(e=a[1],n=r,i=t,e&&Ut.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(v(i).weekdayMismatch=!0,!(i._isValid=!1)))return;t._a=r,t._tzm=function(t,e,n){if(t)return ke[t];if(e)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}(a[8],a[9],a[10]),t._d=zt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),v(t).rfc2822=!0}else t._isValid=!1}function Me(t){if(t._f!==c.ISO_8601)if(t._f!==c.RFC_2822){t._a=[],v(t).empty=!0;var e,n,i,a,r,o,s,l,u=""+t._i,d=u.length,h=0;for(i=j(t._f,t._locale).match(N)||[],e=0;e<i.length;e++)a=i[e],(n=(u.match(ut(a,t))||[])[0])&&(0<(r=u.substr(0,u.indexOf(n))).length&&v(t).unusedInput.push(r),u=u.slice(u.indexOf(n)+n.length),h+=n.length),H[a]?(n?v(t).empty=!1:v(t).unusedTokens.push(a),o=a,l=t,null!=(s=n)&&g(ht,o)&&ht[o](s,l._a,l,o)):t._strict&&!n&&v(t).unusedTokens.push(a);v(t).charsLeftOver=d-h,0<u.length&&v(t).unusedInput.push(u),t._a[vt]<=12&&!0===v(t).bigHour&&0<t._a[vt]&&(v(t).bigHour=void 0),v(t).parsedDateParts=t._a.slice(0),v(t).meridiem=t._meridiem,t._a[vt]=function(t,e,n){var i;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0)),e)}(t._locale,t._a[vt],t._meridiem),ce(t),de(t)}else we(t);else ye(t)}function Se(t){var e,n,i,a,r=t._i,o=t._f;return t._locale=t._locale||ue(t._l),null===r||void 0===o&&""===r?y({nullInput:!0}):("string"==typeof r&&(t._i=r=t._locale.preparse(r)),k(r)?new _(de(r)):(h(r)?t._d=r:s(o)?function(t){var e,n,i,a,r;if(0===t._f.length)return v(t).invalidFormat=!0,t._d=new Date(NaN);for(a=0;a<t._f.length;a++)r=0,e=x({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],Me(e),b(e)&&(r+=v(e).charsLeftOver,r+=10*v(e).unusedTokens.length,v(e).score=r,(null==i||r<i)&&(i=r,n=e));m(t,n||e)}(t):o?Me(t):u(n=(e=t)._i)?e._d=new Date(c.now()):h(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(i=e,null===(a=be.exec(i._i))?(ye(i),!1===i._isValid&&(delete i._isValid,we(i),!1===i._isValid&&(delete i._isValid,c.createFromInputFallback(i)))):i._d=new Date(+a[1])):s(n)?(e._a=f(n.slice(0),function(t){return parseInt(t,10)}),ce(e)):l(n)?function(t){if(!t._d){var e=R(t._i);t._a=f([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ce(t)}}(e):d(n)?e._d=new Date(n):c.createFromInputFallback(e),b(t)||(t._d=null),t))}function De(t,e,n,i,a){var r,o={};return!0!==n&&!1!==n||(i=n,n=void 0),(l(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||s(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=n,o._i=t,o._f=e,o._strict=i,(r=new _(de(Se(o))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Ce(t,e,n,i){return De(t,e,n,i,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var Pe=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ce.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()}),Te=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ce.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()});function Oe(t,e){var n,i;if(1===e.length&&s(e[0])&&(e=e[0]),!e.length)return Ce();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Ie=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ae(t){var e=R(t),n=e.year||0,i=e.quarter||0,a=e.month||0,r=e.week||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===St.call(Ie,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Ie.length;++i)if(t[Ie[i]]){if(n)return!1;parseFloat(t[Ie[i]])!==M(t[Ie[i]])&&(n=!0)}return!0}(e),this._milliseconds=+d+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=ue(),this._bubble()}function Fe(t){return t instanceof Ae}function Re(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Le(t,n){B(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+W(~~(t/60),2)+n+W(~~t%60,2)})}Le("Z",":"),Le("ZZ",""),lt("Z",rt),lt("ZZ",rt),ct(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=We(rt,t)});var Ye=/([\+\-]|\d\d)/gi;function We(t,e){var n=(e||"").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(Ye)||["-",0,0],a=60*i[1]+M(i[2]);return 0===a?0:"+"===i[0]?a:-a}function Ne(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(k(t)||h(t)?t.valueOf():Ce(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),c.updateOffset(n,!1),n):Ce(t).local()}function ze(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ve(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var He=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Be=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ee(t,e){var n,i,a,r=t,o=null;return Fe(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:d(t)?(r={},e?r[e]=t:r.milliseconds=t):(o=He.exec(t))?(n="-"===o[1]?-1:1,r={y:0,d:M(o[pt])*n,h:M(o[vt])*n,m:M(o[bt])*n,s:M(o[yt])*n,ms:M(Re(1e3*o[xt]))*n}):(o=Be.exec(t))?(n="-"===o[1]?-1:(o[1],1),r={y:je(o[2],n),M:je(o[3],n),w:je(o[4],n),d:je(o[5],n),h:je(o[6],n),m:je(o[7],n),s:je(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=Ne(e,t),t.isBefore(e)?n=Ue(t,e):((n=Ue(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Ce(r.from),Ce(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new Ae(r),Fe(t)&&g(t,"_locale")&&(i._locale=t._locale),i}function je(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ue(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ge(i,a){return function(t,e){var n;return null===e||isNaN(+e)||(C(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=t,t=e,e=n),qe(this,Ee(t="string"==typeof t?+t:t,e),i),this}}function qe(t,e,n,i){var a=e._milliseconds,r=Re(e._days),o=Re(e._months);t.isValid()&&(i=null==i||i,o&&Rt(t,Pt(t,"Month")+o*n),r&&Tt(t,"Date",Pt(t,"Date")+r*n),a&&t._d.setTime(t._d.valueOf()+a*n),i&&c.updateOffset(t,r||o))}Ee.fn=Ae.prototype,Ee.invalid=function(){return Ee(NaN)};var Ze=Ge(1,"add"),Xe=Ge(-1,"subtract");function Je(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function $e(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ue(t))&&(this._locale=e),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ke=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function Qe(){return this._locale}function tn(t,e){B(0,[t,t.length],0,e)}function en(t,e,n,i,a){var r;return null==t?Bt(this,i,a).year:((r=Et(t,i,a))<e&&(e=r),function(t,e,n,i,a){var r=Ht(t,e,n,i,a),o=zt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,i,a))}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),lt("G",it),lt("g",it),lt("GG",J,G),lt("gg",J,G),lt("GGGG",tt,Z),lt("gggg",tt,Z),lt("GGGGG",et,X),lt("ggggg",et,X),ft(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=M(t)}),ft(["gg","GG"],function(t,e,n,i){e[i]=c.parseTwoDigitYear(t)}),B("Q",0,"Qo","quarter"),A("quarter","Q"),Y("quarter",7),lt("Q",U),ct("Q",function(t,e){e[mt]=3*(M(t)-1)}),B("D",["DD",2],"Do","date"),A("date","D"),Y("date",9),lt("D",J),lt("DD",J,G),lt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ct(["D","DD"],pt),ct("Do",function(t,e){e[pt]=M(t.match(J)[0])});var nn=Ct("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),Y("dayOfYear",4),lt("DDD",Q),lt("DDDD",q),ct(["DDD","DDDD"],function(t,e,n){n._dayOfYear=M(t)}),B("m",["mm",2],0,"minute"),A("minute","m"),Y("minute",14),lt("m",J),lt("mm",J,G),ct(["m","mm"],bt);var an=Ct("Minutes",!1);B("s",["ss",2],0,"second"),A("second","s"),Y("second",15),lt("s",J),lt("ss",J,G),ct(["s","ss"],yt);var rn,on=Ct("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),Y("millisecond",16),lt("S",Q,U),lt("SS",Q,G),lt("SSS",Q,q),rn="SSSS";rn.length<=9;rn+="S")lt(rn,nt);function sn(t,e){e[xt]=M(1e3*("0."+t))}for(rn="S";rn.length<=9;rn+="S")ct(rn,sn);var ln=Ct("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var un=_.prototype;function dn(t){return t}un.add=Ze,un.calendar=function(t,e){var n=t||Ce(),i=Ne(n,this).startOf("day"),a=c.calendarFormat(this,i)||"sameElse",r=e&&(P(e[a])?e[a].call(this,n):e[a]);return this.format(r||this.localeData().calendar(a,this,Ce(n)))},un.clone=function(){return new _(this)},un.diff=function(t,e,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=Ne(t,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),e=F(e)){case"year":r=Je(this,i)/12;break;case"month":r=Je(this,i);break;case"quarter":r=Je(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:w(r)},un.endOf=function(t){return void 0===(t=F(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},un.format=function(t){t||(t=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var e=E(this,t);return this.localeData().postformat(e)},un.from=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||Ce(t).isValid())?Ee({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},un.fromNow=function(t){return this.from(Ce(),t)},un.to=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||Ce(t).isValid())?Ee({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},un.toNow=function(t){return this.to(Ce(),t)},un.get=function(t){return P(this[t=F(t)])?this[t]():this},un.invalidAt=function(){return v(this).overflow},un.isAfter=function(t,e){var n=k(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(u(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},un.isBefore=function(t,e){var n=k(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(u(e)?"millisecond":e))?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},un.isBetween=function(t,e,n,i){return("("===(i=i||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))},un.isSame=function(t,e){var n,i=k(t)?t:Ce(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=F(e||"millisecond"))?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},un.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},un.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},un.isValid=function(){return b(this)},un.lang=Ke,un.locale=$e,un.localeData=Qe,un.max=Te,un.min=Pe,un.parsingFlags=function(){return m({},v(this))},un.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:L[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=R(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(P(this[t=F(t)]))return this[t](e);return this},un.startOf=function(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},un.subtract=Xe,un.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},un.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},un.toDate=function(){return new Date(this.valueOf())},un.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?E(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):P(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",E(n,"Z")):E(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},un.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+a)},un.toJSON=function(){return this.isValid()?this.toISOString():null},un.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},un.unix=function(){return Math.floor(this.valueOf()/1e3)},un.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},un.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},un.year=Dt,un.isLeapYear=function(){return Mt(this.year())},un.weekYear=function(t){return en.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},un.isoWeekYear=function(t){return en.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},un.quarter=un.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},un.month=Lt,un.daysInMonth=function(){return Ot(this.year(),this.month())},un.week=un.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},un.isoWeek=un.isoWeeks=function(t){var e=Bt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},un.weeksInYear=function(){var t=this.localeData()._week;return Et(this.year(),t.dow,t.doy)},un.isoWeeksInYear=function(){return Et(this.year(),1,4)},un.date=nn,un.day=un.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,i=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-i,"d")):i},un.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},un.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,i=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?i:i-7)},un.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},un.hour=un.hours=ee,un.minute=un.minutes=an,un.second=un.seconds=on,un.millisecond=un.milliseconds=ln,un.utcOffset=function(t,e,n){var i,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:ze(this);if("string"==typeof t){if(null===(t=We(rt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=ze(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==t&&(!e||this._changeInProgress?qe(this,Ee(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this},un.utc=function(t){return this.utcOffset(0,t)},un.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ze(this),"m")),this},un.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=We(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},un.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ce(t).utcOffset():0,(this.utcOffset()-t)%60==0)},un.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},un.isLocal=function(){return!!this.isValid()&&!this._isUTC},un.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},un.isUtc=Ve,un.isUTC=Ve,un.zoneAbbr=function(){return this._isUTC?"UTC":""},un.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},un.dates=n("dates accessor is deprecated. Use date instead.",nn),un.months=n("months accessor is deprecated. Use month instead",Lt),un.years=n("years accessor is deprecated. Use year instead",Dt),un.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),un.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var t={};if(x(t,this),(t=Se(t))._a){var e=t._isUTC?p(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&0<o(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=O.prototype;function cn(t,e,n,i){var a=ue(),r=p().set(i,e);return a[n](r,t)}function fn(t,e,n){if(d(t)&&(e=t,t=void 0),t=t||"",null!=e)return cn(t,e,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=cn(t,i,n,"month");return a}function gn(t,e,n,i){e=("boolean"==typeof t?d(e)&&(n=e,e=void 0):(e=t,t=!1,d(n=e)&&(n=e,e=void 0)),e||"");var a,r=ue(),o=t?r._week.dow:0;if(null!=n)return cn(e,(n+o)%7,i,"day");var s=[];for(a=0;a<7;a++)s[a]=cn(e,(a+o)%7,i,"day");return s}hn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return P(i)?i.call(e,n):i},hn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(t){return this._ordinal.replace("%d",t)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(t,e,n,i){var a=this._relativeTime[n];return P(a)?a(t,e,n,i):a.replace(/%d/i,t)},hn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return P(n)?n(e):n.replace(/%s/i,e)},hn.set=function(t){var e,n;for(n in t)P(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(t,e){return t?s(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||It).test(e)?"format":"standalone"][t.month()]:s(this._months)?this._months:this._months.standalone},hn.monthsShort=function(t,e){return t?s(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[It.test(e)?"format":"standalone"][t.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(t,e,n){var i,a,r;if(this._monthsParseExact)return function(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(a=St.call(this._shortMonthsParse,o))?a:null:-1!==(a=St.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=St.call(this._shortMonthsParse,o))?a:-1!==(a=St.call(this._longMonthsParse,o))?a:null:-1!==(a=St.call(this._longMonthsParse,o))?a:-1!==(a=St.call(this._shortMonthsParse,o))?a:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},hn.monthsRegex=function(t){return this._monthsParseExact?(g(this,"_monthsRegex")||Nt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(g(this,"_monthsRegex")||(this._monthsRegex=Wt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(t){return this._monthsParseExact?(g(this,"_monthsRegex")||Nt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(g(this,"_monthsShortRegex")||(this._monthsShortRegex=Yt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(t){return Bt(t,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(t,e){return t?s(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:s(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},hn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},hn.weekdaysParse=function(t,e,n){var i,a,r;if(this._weekdaysParseExact)return function(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(a=St.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=St.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=St.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=St.call(this._weekdaysParse,o))?a:-1!==(a=St.call(this._shortWeekdaysParse,o))?a:-1!==(a=St.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=St.call(this._shortWeekdaysParse,o))?a:-1!==(a=St.call(this._weekdaysParse,o))?a:-1!==(a=St.call(this._minWeekdaysParse,o))?a:null:-1!==(a=St.call(this._minWeekdaysParse,o))?a:-1!==(a=St.call(this._weekdaysParse,o))?a:-1!==(a=St.call(this._shortWeekdaysParse,o))?a:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},hn.weekdaysRegex=function(t){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(g(this,"_weekdaysRegex")||(this._weekdaysRegex=qt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(g(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(g(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(g(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},hn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},se("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===M(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",se),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",ue);var mn=Math.abs;function pn(t,e,n,i){var a=Ee(e,n);return t._milliseconds+=i*a._milliseconds,t._days+=i*a._days,t._months+=i*a._months,t._bubble()}function vn(t){return t<0?Math.floor(t):Math.ceil(t)}function bn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function xn(t){return function(){return this.as(t)}}var _n=xn("ms"),kn=xn("s"),wn=xn("m"),Mn=xn("h"),Sn=xn("d"),Dn=xn("w"),Cn=xn("M"),Pn=xn("y");function Tn(t){return function(){return this.isValid()?this._data[t]:NaN}}var On=Tn("milliseconds"),In=Tn("seconds"),An=Tn("minutes"),Fn=Tn("hours"),Rn=Tn("days"),Ln=Tn("months"),Yn=Tn("years");var Wn=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var zn=Math.abs;function Vn(t){return(0<t)-(t<0)||+t}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=zn(this._milliseconds)/1e3,i=zn(this._days),a=zn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var r=w(a/12),o=a%=12,s=i,l=e,u=t,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",g=Vn(this._days)!==Vn(h)?"-":"",m=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?g+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var Bn=Ae.prototype;return Bn.isValid=function(){return this._isValid},Bn.abs=function(){var t=this._data;return this._milliseconds=mn(this._milliseconds),this._days=mn(this._days),this._months=mn(this._months),t.milliseconds=mn(t.milliseconds),t.seconds=mn(t.seconds),t.minutes=mn(t.minutes),t.hours=mn(t.hours),t.months=mn(t.months),t.years=mn(t.years),this},Bn.add=function(t,e){return pn(this,t,e,1)},Bn.subtract=function(t,e){return pn(this,t,e,-1)},Bn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=F(t))||"year"===t)return e=this._days+i/864e5,n=this._months+bn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Bn.asMilliseconds=_n,Bn.asSeconds=kn,Bn.asMinutes=wn,Bn.asHours=Mn,Bn.asDays=Sn,Bn.asWeeks=Dn,Bn.asMonths=Cn,Bn.asYears=Pn,Bn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*M(this._months/12):NaN},Bn._bubble=function(){var t,e,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return 0<=r&&0<=o&&0<=s||r<=0&&o<=0&&s<=0||(r+=864e5*vn(yn(s)+o),s=o=0),l.milliseconds=r%1e3,t=w(r/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,s+=a=w(bn(o+=w(n/24))),o-=vn(yn(a)),i=w(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Bn.clone=function(){return Ee(this)},Bn.get=function(t){return t=F(t),this.isValid()?this[t+"s"]():NaN},Bn.milliseconds=On,Bn.seconds=In,Bn.minutes=An,Bn.hours=Fn,Bn.days=Rn,Bn.weeks=function(){return w(this.days()/7)},Bn.months=Ln,Bn.years=Yn,Bn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,i,a,r,o,s,l,u,d,h,c=this.localeData(),f=(n=!t,i=c,a=Ee(e=this).abs(),r=Wn(a.as("s")),o=Wn(a.as("m")),s=Wn(a.as("h")),l=Wn(a.as("d")),u=Wn(a.as("M")),d=Wn(a.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||o<=1&&["m"]||o<Nn.m&&["mm",o]||s<=1&&["h"]||s<Nn.h&&["hh",s]||l<=1&&["d"]||l<Nn.d&&["dd",l]||u<=1&&["M"]||u<Nn.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+e,h[4]=i,function(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}.apply(null,h));return t&&(f=c.pastFuture(+this,f)),c.postformat(f)},Bn.toISOString=Hn,Bn.toString=Hn,Bn.toJSON=Hn,Bn.locale=$e,Bn.localeData=Qe,Bn.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),Bn.lang=Ke,B("X",0,0,"unix"),B("x",0,0,"valueOf"),lt("x",it),lt("X",/[+-]?\d+(\.\d{1,3})?/),ct("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),ct("x",function(t,e,n){n._d=new Date(M(t))}),c.version="2.22.2",t=Ce,c.fn=un,c.min=function(){return Oe("isBefore",[].slice.call(arguments,0))},c.max=function(){return Oe("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=p,c.unix=function(t){return Ce(1e3*t)},c.months=function(t,e){return fn(t,e,"months")},c.isDate=h,c.locale=se,c.invalid=y,c.duration=Ee,c.isMoment=k,c.weekdays=function(t,e,n){return gn(t,e,n,"weekdays")},c.parseZone=function(){return Ce.apply(null,arguments).parseZone()},c.localeData=ue,c.isDuration=Fe,c.monthsShort=function(t,e){return fn(t,e,"monthsShort")},c.weekdaysMin=function(t,e,n){return gn(t,e,n,"weekdaysMin")},c.defineLocale=le,c.updateLocale=function(t,e){if(null!=e){var n,i,a=ne;null!=(i=oe(t))&&(a=i._config),(n=new O(e=T(a,e))).parentLocale=ie[t],ie[t]=n,se(t)}else null!=ie[t]&&(null!=ie[t].parentLocale?ie[t]=ie[t].parentLocale:null!=ie[t]&&delete ie[t]);return ie[t]},c.locales=function(){return i(ie)},c.weekdaysShort=function(t,e,n){return gn(t,e,n,"weekdaysShort")},c.normalizeUnits=F,c.relativeTimeRounding=function(t){return void 0===t?Wn:"function"==typeof t&&(Wn=t,!0)},c.relativeTimeThreshold=function(t,e){return void 0!==Nn[t]&&(void 0===e?Nn[t]:(Nn[t]=e,"s"===t&&(Nn.ss=e-1),!0))},c.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=un,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c},"object"==typeof t&&void 0!==jn?jn.exports=n():e.moment=n()},{}],7:[function(t,e,n){var i=t(30)();i.helpers=t(46),t(28)(i),i.Animation=t(22),i.animationService=t(23),i.defaults=t(26),i.Element=t(27),i.elements=t(41),i.Interaction=t(29),i.layouts=t(31),i.platform=t(49),i.plugins=t(32),i.Scale=t(33),i.scaleService=t(34),i.Ticks=t(35),i.Tooltip=t(36),t(24)(i),t(25)(i),t(56)(i),t(54)(i),t(55)(i),t(57)(i),t(58)(i),t(59)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(21)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i);var a=t(50);for(var r in a)a.hasOwnProperty(r)&&i.plugins.register(a[r]);i.platform.initialize(),e.exports=i,"undefined"!=typeof window&&(window.Chart=i),i.Legend=a.legend._element,i.Title=a.title._element,i.pluginService=i.plugins,i.PluginBase=i.Element.extend({}),i.canvasHelpers=i.helpers.canvas,i.layoutService=i.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,41:41,46:46,49:49,50:50,54:54,55:55,56:56,57:57,58:58,59:59,8:8,9:9}],8:[function(t,e,n){"use strict";e.exports=function(n){n.Bar=function(t,e){return e.type="bar",new n(t,e)}}},{}],9:[function(t,e,n){"use strict";e.exports=function(n){n.Bubble=function(t,e){return e.type="bubble",new n(t,e)}}},{}],10:[function(t,e,n){"use strict";e.exports=function(n){n.Doughnut=function(t,e){return e.type="doughnut",new n(t,e)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(n){n.Line=function(t,e){return e.type="line",new n(t,e)}}},{}],12:[function(t,e,n){"use strict";e.exports=function(n){n.PolarArea=function(t,e){return e.type="polarArea",new n(t,e)}}},{}],13:[function(t,e,n){"use strict";e.exports=function(n){n.Radar=function(t,e){return e.type="radar",new n(t,e)}}},{}],14:[function(t,e,n){"use strict";e.exports=function(n){n.Scatter=function(t,e){return e.type="scatter",new n(t,e)}}},{}],15:[function(t,e,n){"use strict";var i=t(26),a=t(41),S=t(46);i._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),i._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var n="";return 0<t.length&&(t[0].yLabel?n=t[0].yLabel:0<e.labels.length&&t[0].index<e.labels.length&&(n=e.labels[t[0].index])),n},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(e){e.controllers.bar=e.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var t;e.DatasetController.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},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.chart,r=i.getMeta(),o=i.getDataset(),s=t.custom||{},l=a.options.elements.rectangle;t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={datasetLabel:o.label,label:a.data.labels[e],borderSkipped:s.borderSkipped?s.borderSkipped:l.borderSkipped,backgroundColor:s.backgroundColor?s.backgroundColor:S.valueAtIndexOrDefault(o.backgroundColor,e,l.backgroundColor),borderColor:s.borderColor?s.borderColor:S.valueAtIndexOrDefault(o.borderColor,e,l.borderColor),borderWidth:s.borderWidth?s.borderWidth:S.valueAtIndexOrDefault(o.borderWidth,e,l.borderWidth)},i.updateElementGeometry(t,e,n),t.pivot()},updateElementGeometry:function(t,e,n){var i=this,a=t._model,r=i.getValueScale(),o=r.getBasePixel(),s=r.isHorizontal(),l=i._ruler||i.getRuler(),u=i.calculateBarValuePixels(i.index,e),d=i.calculateBarIndexPixels(i.index,e,l);a.horizontal=s,a.base=n?o:u.base,a.x=s?n?o:u.head:d.center,a.y=s?d.center:n?o:u.head,a.height=s?d.size:void 0,a.width=s?void 0:d.size},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())},_getStacks:function(t){var e,n,i=this.chart,a=this.getIndexScale().options.stacked,r=void 0===t?i.data.datasets.length:t+1,o=[];for(e=0;e<r;++e)(n=i.getDatasetMeta(e)).bar&&i.isDatasetVisible(e)&&(!1===a||!0===a&&-1===o.indexOf(n.stack)||void 0===a&&(void 0===n.stack||-1===o.indexOf(n.stack)))&&o.push(n.stack);return o},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=this.getStackCount(),a=this.index,r=n.isHorizontal(),o=r?n.left:n.top,s=o+(r?n.width:n.height),l=[];for(t=0,e=this.getMeta().data.length;t<e;++t)l.push(n.getPixelForValue(null,t,a));return{min:S.isNullOrUndef(n.options.barThickness)?function(t,e){var n,i,a,r,o=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,r=e.length;a<r;++a)o=Math.min(o,e[a]-e[a-1]);for(a=0,r=s.length;a<r;++a)i=t.getPixelForTick(a),o=0<a?Math.min(o,i-n):o,n=i;return o}(n,l):-1,pixels:l,start:o,end:s,stackCount:i,scale:n}},calculateBarValuePixels:function(t,e){var n,i,a,r,o,s,l=this.chart,u=this.getMeta(),d=this.getValueScale(),h=l.data.datasets,c=d.getRightValue(h[t].data[e]),f=d.options.stacked,g=u.stack,m=0;if(f||void 0===f&&void 0!==g)for(n=0;n<t;++n)(i=l.getDatasetMeta(n)).bar&&i.stack===g&&i.controller.getValueScaleId()===d.id&&l.isDatasetVisible(n)&&(a=d.getRightValue(h[n].data[e]),(c<0&&a<0||0<=c&&0<a)&&(m+=a));return r=d.getPixelForValue(m),{size:s=((o=d.getPixelForValue(m+c))-r)/2,base:r,head:o,center:o+s/2}},calculateBarIndexPixels:function(t,e,n){var i,a,r,o,s,l,u,d,h,c,f,g,m,p,v,b,y,x=n.scale.options,_="flex"===x.barThickness?(h=e,f=x,m=(c=n).pixels,p=m[h],v=0<h?m[h-1]:null,b=h<m.length-1?m[h+1]:null,y=f.categoryPercentage,null===v&&(v=p-(null===b?c.end-p:b-p)),null===b&&(b=p+p-v),g=p-(p-v)/2*y,{chunk:(b-v)/2*y/c.stackCount,ratio:f.barPercentage,start:g}):(i=e,a=n,l=(r=x).barThickness,u=a.stackCount,d=a.pixels[i],s=S.isNullOrUndef(l)?(o=a.min*r.categoryPercentage,r.barPercentage):(o=l*u,1),{chunk:o/u,ratio:s,start:d-o/2}),k=this.getStackIndex(t,this.getMeta().stack),w=_.start+_.chunk*k+_.chunk/2,M=Math.min(S.valueOrDefault(x.maxBarThickness,1/0),_.chunk*_.ratio);return{base:w-M/2,head:w+M/2,center:w,size:M}},draw:function(){var t=this.chart,e=this.getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(S.canvas.clipArea(t.ctx,t.chartArea);r<a;++r)isNaN(e.getRightValue(i.data[r]))||n[r].draw();S.canvas.unclipArea(t.ctx)}}),e.controllers.horizontalBar=e.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{26:26,41:41,46:46}],16:[function(t,e,n){"use strict";var i=t(26),a=t(41),g=t(46);i._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+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(n){var i=this,t=i.getMeta().data;g.each(t,function(t,e){i.updateElement(t,e,n)})},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._resolveElementOptions(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;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=g.valueOrDefault(n.hoverBackgroundColor,g.getHoverColor(n.backgroundColor)),e.borderColor=g.valueOrDefault(n.hoverBorderColor,g.getHoverColor(n.borderColor)),e.borderWidth=g.valueOrDefault(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveElementOptions:function(t,e){var n,i,a,r=this.chart,o=r.data.datasets[this.index],s=t.custom||{},l=r.options.elements.point,u=g.options.resolve,d=o.data[e],h={},c={chart:r,dataIndex:e,dataset:o,datasetIndex:this.index},f=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(n=0,i=f.length;n<i;++n)h[a=f[n]]=u([s[a],o[a],l[a]],c,e);return h.radius=u([s.radius,d?d.r:void 0,o.radius,l.radius],c,e),h}})}},{26:26,41:41,46:46}],17:[function(t,e,n){"use strict";var i=t(26),a=t(41),O=t(46);i._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)e.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(l){var u=l.data;return u.labels.length&&u.datasets.length?u.labels.map(function(t,e){var n=l.getDatasetMeta(0),i=u.datasets[0],a=n.data[e],r=a&&a.custom||{},o=O.valueAtIndexOrDefault,s=l.options.elements.arc;return{text:t,fillStyle:r.backgroundColor?r.backgroundColor:o(i.backgroundColor,e,s.backgroundColor),strokeStyle:r.borderColor?r.borderColor:o(i.borderColor,e,s.borderColor),lineWidth:r.borderWidth?r.borderWidth:o(i.borderWidth,e,s.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},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:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return O.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}}),i._set("pie",O.clone(i.doughnut)),i._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:O.noop,getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(n){var i=this,t=i.chart,e=t.chartArea,a=t.options,r=a.elements.arc,o=e.right-e.left-r.borderWidth,s=e.bottom-e.top-r.borderWidth,l=Math.min(o,s),u={x:0,y:0},d=i.getMeta(),h=a.cutoutPercentage,c=a.circumference;if(c<2*Math.PI){var f=a.rotation%(2*Math.PI),g=(f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0))+c,m=Math.cos(f),p=Math.sin(f),v=Math.cos(g),b=Math.sin(g),y=f<=0&&0<=g||f<=2*Math.PI&&2*Math.PI<=g,x=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,_=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,k=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,M=_?-1:Math.min(m*(m<0?1:w),v*(v<0?1:w)),S=k?-1:Math.min(p*(p<0?1:w),b*(b<0?1:w)),D=y?1:Math.max(m*(0<m?1:w),v*(0<v?1:w)),C=x?1:Math.max(p*(0<p?1:w),b*(0<b?1:w)),P=.5*(D-M),T=.5*(C-S);l=Math.min(o/P,s/T),u={x:-.5*(D+M),y:-.5*(C+S)}}t.borderWidth=i.getMaxBorderWidth(d.data),t.outerRadius=Math.max((l-t.borderWidth)/2,0),t.innerRadius=Math.max(h?t.outerRadius/100*h:0,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),t.offsetX=u.x*t.outerRadius,t.offsetY=u.y*t.outerRadius,d.total=i.calculateTotal(),i.outerRadius=t.outerRadius-t.radiusLength*i.getRingIndex(i.index),i.innerRadius=Math.max(i.outerRadius-t.radiusLength,0),O.each(d.data,function(t,e){i.updateElement(t,e,n)})},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/(2*Math.PI)),g=n&&s.animateScale?0:i.innerRadius,m=n&&s.animateScale?0:i.outerRadius,p=O.valueAtIndexOrDefault;O.extend(t,{_datasetIndex:i.index,_index:e,_model:{x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:m,innerRadius:g,label:p(c.label,e,a.data.labels[e])}});var v=t._model,b=t.custom||{},y=O.valueAtIndexOrDefault,x=this.chart.options.elements.arc;v.backgroundColor=b.backgroundColor?b.backgroundColor:y(c.backgroundColor,e,x.backgroundColor),v.borderColor=b.borderColor?b.borderColor:y(c.borderColor,e,x.borderColor),v.borderWidth=b.borderWidth?b.borderWidth:y(c.borderWidth,e,x.borderWidth),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 n,i=this.getDataset(),t=this.getMeta(),a=0;return O.each(t.data,function(t,e){n=i.data[e],isNaN(n)||t.hidden||(a+=Math.abs(n))}),a},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,a=this.index,r=t.length,o=0;o<r;o++)i=(i=i<(e=t[o]._model?t[o]._model.borderWidth:0)?e:i)<(n=t[o]._chart?t[o]._chart.config.data.datasets[a].hoverBorderWidth:0)?n:i;return i}})}},{26:26,41:41,46:46}],18:[function(t,e,n){"use strict";var i=t(26),a=t(41),g=t(46);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function f(t,e){return g.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var e,n,i,a=this,r=a.getMeta(),o=r.dataset,s=r.data||[],l=a.chart.options,u=l.elements.line,d=a.getScaleForId(r.yAxisID),h=a.getDataset(),c=f(h,l);for(c&&(i=o.custom||{},void 0!==h.tension&&void 0===h.lineTension&&(h.lineTension=h.tension),o._scale=d,o._datasetIndex=a.index,o._children=s,o._model={spanGaps:h.spanGaps?h.spanGaps:l.spanGaps,tension:i.tension?i.tension:g.valueOrDefault(h.lineTension,u.tension),backgroundColor:i.backgroundColor?i.backgroundColor:h.backgroundColor||u.backgroundColor,borderWidth:i.borderWidth?i.borderWidth:h.borderWidth||u.borderWidth,borderColor:i.borderColor?i.borderColor:h.borderColor||u.borderColor,borderCapStyle:i.borderCapStyle?i.borderCapStyle:h.borderCapStyle||u.borderCapStyle,borderDash:i.borderDash?i.borderDash:h.borderDash||u.borderDash,borderDashOffset:i.borderDashOffset?i.borderDashOffset:h.borderDashOffset||u.borderDashOffset,borderJoinStyle:i.borderJoinStyle?i.borderJoinStyle:h.borderJoinStyle||u.borderJoinStyle,fill:i.fill?i.fill:void 0!==h.fill?h.fill:u.fill,steppedLine:i.steppedLine?i.steppedLine:g.valueOrDefault(h.steppedLine,u.stepped),cubicInterpolationMode:i.cubicInterpolationMode?i.cubicInterpolationMode:g.valueOrDefault(h.cubicInterpolationMode,u.cubicInterpolationMode)},o.pivot()),e=0,n=s.length;e<n;++e)a.updateElement(s[e],e,t);for(c&&0!==o._model.tension&&a.updateBezierControlPoints(),e=0,n=s.length;e<n;++e)s[e].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,i=this.getDataset(),a=t.custom||{};return a.backgroundColor?n=a.backgroundColor:i.pointBackgroundColor?n=g.valueAtIndexOrDefault(i.pointBackgroundColor,e,n):i.backgroundColor&&(n=i.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,i=this.getDataset(),a=t.custom||{};return a.borderColor?n=a.borderColor:i.pointBorderColor?n=g.valueAtIndexOrDefault(i.pointBorderColor,e,n):i.borderColor&&(n=i.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,i=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(i.pointBorderWidth)||g.isArray(i.pointBorderWidth)?n=g.valueAtIndexOrDefault(i.pointBorderWidth,e,n):isNaN(i.borderWidth)||(n=i.borderWidth):n=a.borderWidth,n},getPointRotation:function(t,e){var n=this.chart.options.elements.point.rotation,i=this.getDataset(),a=t.custom||{};return isNaN(a.rotation)?isNaN(i.pointRotation)&&!g.isArray(i.pointRotation)||(n=g.valueAtIndexOrDefault(i.pointRotation,e,n)):n=a.rotation,n},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.getScaleForId(o.yAxisID),c=r.getScaleForId(o.xAxisID),f=r.chart.options.elements.point;void 0!==l.radius&&void 0===l.pointRadius&&(l.pointRadius=l.radius),void 0!==l.hitRadius&&void 0===l.pointHitRadius&&(l.pointHitRadius=l.hitRadius),i=c.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=c,t._yScale=h,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:s.radius||g.valueAtIndexOrDefault(l.pointRadius,e,f.radius),pointStyle:s.pointStyle||g.valueAtIndexOrDefault(l.pointStyle,e,f.pointStyle),rotation:r.getPointRotation(t,e),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:o.dataset._model?o.dataset._model.tension:0,steppedLine:!!o.dataset._model&&o.dataset._model.steppedLine,hitRadius:s.hitRadius||g.valueAtIndexOrDefault(l.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,n){var i,a,r,o=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),u=0,d=0;if(l.options.stacked){for(i=0;i<n;i++)if(a=o.data.datasets[i],"line"===(r=o.getDatasetMeta(i)).type&&r.yAxisID===l.id&&o.isDatasetVisible(i)){var h=Number(l.getRightValue(a.data[e]));h<0?d+=h||0:u+=h||0}var c=Number(l.getRightValue(t));return c<0?l.getPixelForValue(d+c):l.getPixelForValue(u+c)}return l.getPixelForValue(t)},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)}if(a.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)g.splineCurveMonotone(o);else for(t=0,e=o.length;t<e;++t)n=o[t]._model,i=g.splineCurve(g.previousItem(o,t)._model,n,g.nextItem(o,t)._model,a.dataset._model.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=o.length;t<e;++t)(n=o[t]._model).controlPointPreviousX=s(n.controlPointPreviousX,r.left,r.right),n.controlPointPreviousY=s(n.controlPointPreviousY,r.top,r.bottom),n.controlPointNextX=s(n.controlPointNextX,r.left,r.right),n.controlPointNextY=s(n.controlPointNextY,r.top,r.bottom)},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=i.length,o=0;for(f(this.getDataset(),e.options)&&(t=(n.dataset._model.borderWidth||0)/2,g.canvas.clipArea(e.ctx,{left:a.left,right:a.right,top:a.top-t,bottom:a.bottom+t}),n.dataset.draw(),g.canvas.unclipArea(e.ctx));o<r;++o)i[o].draw(a)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,radius:a.radius},a.backgroundColor=i.hoverBackgroundColor||g.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,g.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor||g.valueAtIndexOrDefault(e.pointHoverBorderColor,n,g.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth||g.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth),a.radius=i.hoverRadius||g.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius)}})}},{26:26,41:41,46:46}],19:[function(t,e,n){"use strict";var i=t(26),a=t(41),_=t(46);i._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=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)e.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},r=_.valueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor?a.backgroundColor:r(i.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor?a.borderColor:r(i.borderColor,e,o.borderColor),lineWidth:a.borderWidth?a.borderWidth:r(i.borderWidth,e,o.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},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}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:_.noop,update:function(n){var t,e,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[];for(a._updateRadius(),o.count=a.countVisibleElements(),t=0,e=r.data.length;t<e;t++)l[t]=s,i=a._computeAngle(t),s+=u[t]=i;_.each(o.data,function(t,e){a.updateElement(t,e,n)})},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=i.elements.arc,r=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max((r-a.borderWidth/2)/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],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]);_.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{x:d,y:h,innerRadius:0,outerRadius:n?p:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:m,label:_.valueAtIndexOrDefault(u,e,u[e])}});var v=this.chart.options.elements.arc,b=t.custom||{},y=_.valueAtIndexOrDefault,x=t._model;x.backgroundColor=b.backgroundColor?b.backgroundColor:y(r.backgroundColor,e,v.backgroundColor),x.borderColor=b.borderColor?b.borderColor:y(r.borderColor,e,v.borderColor),x.borderWidth=b.borderWidth?b.borderWidth:y(r.borderWidth,e,v.borderWidth),t.pivot()},countVisibleElements:function(){var n=this.getDataset(),t=this.getMeta(),i=0;return _.each(t.data,function(t,e){isNaN(n.data[e])||t.hidden||i++}),i},_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 _.options.resolve([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}})}},{26:26,41:41,46:46}],20:[function(t,e,n){"use strict";var i=t(26),a=t(41),u=t(46);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:u.noop,update:function(n){var i=this,t=i.getMeta(),e=t.dataset,a=t.data,r=e.custom||{},o=i.getDataset(),s=i.chart.options.elements.line,l=i.chart.scale;void 0!==o.tension&&void 0===o.lineTension&&(o.lineTension=o.tension),u.extend(t.dataset,{_datasetIndex:i.index,_scale:l,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:u.valueOrDefault(o.lineTension,s.tension),backgroundColor:r.backgroundColor?r.backgroundColor:o.backgroundColor||s.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:o.borderWidth||s.borderWidth,borderColor:r.borderColor?r.borderColor:o.borderColor||s.borderColor,fill:r.fill?r.fill:void 0!==o.fill?o.fill:s.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:o.borderCapStyle||s.borderCapStyle,borderDash:r.borderDash?r.borderDash:o.borderDash||s.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:o.borderDashOffset||s.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:o.borderJoinStyle||s.borderJoinStyle}}),t.dataset.pivot(),u.each(a,function(t,e){i.updateElement(t,e,n)},i),i.updateBezierControlPoints()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=i.chart.options.elements.point,l=o.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),u.extend(t,{_datasetIndex:i.index,_index:e,_scale:o,_model:{x:n?o.xCenter:l.x,y:n?o.yCenter:l.y,tension:a.tension?a.tension:u.valueOrDefault(r.lineTension,i.chart.options.elements.line.tension),radius:a.radius?a.radius:u.valueAtIndexOrDefault(r.pointRadius,e,s.radius),backgroundColor:a.backgroundColor?a.backgroundColor:u.valueAtIndexOrDefault(r.pointBackgroundColor,e,s.backgroundColor),borderColor:a.borderColor?a.borderColor:u.valueAtIndexOrDefault(r.pointBorderColor,e,s.borderColor),borderWidth:a.borderWidth?a.borderWidth:u.valueAtIndexOrDefault(r.pointBorderWidth,e,s.borderWidth),pointStyle:a.pointStyle?a.pointStyle:u.valueAtIndexOrDefault(r.pointStyle,e,s.pointStyle),rotation:a.rotation?a.rotation:u.valueAtIndexOrDefault(r.pointRotation,e,s.rotation),hitRadius:a.hitRadius?a.hitRadius:u.valueAtIndexOrDefault(r.pointHitRadius,e,s.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,r=this.getMeta();u.each(r.data,function(t,e){var n=t._model,i=u.splineCurve(u.previousItem(r.data,e,!0)._model,n,u.nextItem(r.data,e,!0)._model,n.tension);n.controlPointPreviousX=Math.max(Math.min(i.previous.x,a.right),a.left),n.controlPointPreviousY=Math.max(Math.min(i.previous.y,a.bottom),a.top),n.controlPointNextX=Math.max(Math.min(i.next.x,a.right),a.left),n.controlPointNextY=Math.max(Math.min(i.next.y,a.bottom),a.top),t.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,radius:a.radius},a.radius=n.hoverRadius?n.hoverRadius:u.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:u.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,u.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:u.valueAtIndexOrDefault(e.pointHoverBorderColor,i,u.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:u.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)}})}},{26:26,41:41,46:46}],21:[function(t,e,n){"use strict";t(26)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{26:26}],22:[function(t,e,n){"use strict";var i=t(27);n=e.exports=i.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null});Object.defineProperty(n.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(n.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})},{27:27}],23:[function(t,e,n){"use strict";var i=t(26),r=t(46);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:r.noop,onComplete:r.noop}}),e.exports={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,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(e){var t=r.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=r.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),n=0;1<t.dropFrames&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,0<t.animations.length&&t.requestAnimationFrame()},advance:function(t){for(var e,n,i=this.animations,a=0;a<i.length;)n=(e=i[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),r.callback(e.render,[n,e],n),r.callback(e.onAnimationProgress,[e],n),e.currentStep>=e.numSteps?(r.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}}},{26:26,46:46}],24:[function(t,e,n){"use strict";var s=t(22),l=t(23),h=t(26),c=t(46),a=t(29),r=t(31),f=t(49),g=t(32),m=t(34),i=t(36);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},c.extend(u.prototype,{construct:function(t,e){var n,i,a=this;(i=(n=(n=e)||{}).data=n.data||{}).datasets=i.datasets||[],i.labels=i.labels||[],n.options=c.configMerge(h.global,h[n.type],n.options||{}),e=n;var r=f.acquireContext(t,e),o=r&&r.canvas,s=o&&o.height,l=o&&o.width;a.id=c.uid(),a.ctx=r,a.canvas=o,a.config=e,a.width=l,a.height=s,a.aspectRatio=s?l/s:null,a.options=e.options,a._bufferedRender=!1,(a.chart=a).controller=a,u.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),r&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return g.notify(t,"beforeInit"),c.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),g.notify(t,"afterInit"),t},clear:function(){return c.canvas.clear(this),this},stop:function(){return l.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(c.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:c.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",c.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};g.notify(e,"resize",[s]),e.options.onResize&&e.options.onResize(e,s),e.stop(),e.update({duration:e.options.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;c.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),c.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),c.each(e,function(t){var e=t.options,n=e.id,i=c.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0;var a=null;if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=m.getScaleConstructor(i);if(!r)return;a=new r({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),c.each(l,function(t,e){t||delete s[e]}),o.scales=s,m.addScalesToLayout(this)},buildOrUpdateControllers:function(){var r=this,o=[],s=[];return c.each(r.data.datasets,function(t,e){var n=r.getDatasetMeta(e),i=t.type||r.config.type;if(n.type&&n.type!==i&&(r.destroyDatasetMeta(e),n=r.getDatasetMeta(e)),n.type=i,o.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{var a=u.controllers[n.type];if(void 0===a)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new a(r,e),s.push(n.controller)}},r),s},resetElements:function(){var n=this;c.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},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]}),n=(e=i).options,c.each(e.scales,function(t){r.removeBox(e,t)}),n=c.configMerge(u.defaults.global,u.defaults[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),g._invalidate(i),!1!==g.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();c.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&c.each(a,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],g.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){!1!==g.notify(this,"beforeLayout")&&(r.update(this,this.width,this.height),g.notify(this,"afterScaleUpdate"),g.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==g.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);g.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==g.notify(this,"beforeDatasetUpdate",[n])&&(e.controller.update(),g.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=t.duration,i=t.lazy;if(!1!==g.notify(e,"beforeRender")){var a=e.options.animation,r=function(t){g.notify(e,"afterRender"),c.callback(a&&a.onComplete,[t],e)};if(a&&(void 0!==n&&0!==n||void 0===n&&0!==a.duration)){var o=new s({numSteps:(n||a.duration)/16.66,easing:t.easing||a.easing,render:function(t,e){var n=c.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:a.onProgress,onAnimationComplete:r});l.addAnimation(e,o,n,i)}else e.draw(),r(new s({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),c.isNullOrUndef(t)&&(t=1),e.transition(t),e.width<=0||e.height<=0||!1!==g.notify(e,"beforeDraw",[t])&&(c.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),g.notify(e,"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)},drawDatasets:function(t){var e=this;if(!1!==g.notify(e,"beforeDatasetsDraw",[t])){for(var n=(e.data.datasets||[]).length-1;0<=n;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);g.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this.getDatasetMeta(t),i={meta:n,index:t,easingValue:e};!1!==g.notify(this,"beforeDatasetDraw",[i])&&(n.controller.draw(e),g.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==g.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),g.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return a.modes.single(this,t)},getElementsAtEvent:function(t){return a.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return a.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=a.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return a.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}),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(),c.canvas.clear(n),f.releaseContext(n.ctx),n.canvas=null,n.ctx=null),g.notify(n,"destroy"),delete u.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new i({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,n=e._listeners={},i=function(){e.eventHandler.apply(e,arguments)};c.each(e.options.events,function(t){f.addEventListener(e,t,i),n[t]=i}),e.options.responsive&&(i=function(){e.resize()},f.addEventListener(e,"resize",i),n.resize=i)},unbindEvents:function(){var n=this,t=n._listeners;t&&(delete n._listeners,c.each(t,function(t,e){f.removeEventListener(n,e,t)}))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"setHoverStyle":"removeHoverStyle";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o](i)},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==g.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)),g.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),c.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=!c.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),u.Controller=u}},{22:22,23:23,26:26,29:29,31:31,32:32,34:34,36:36,46:46,49:49}],25:[function(t,e,n){"use strict";var s=t(46);e.exports=function(t){var r=["push","pop","shift","splice","unshift"];function o(e,t){var n=e._chartjs;if(n){var i=n.listeners,a=i.indexOf(t);-1!==a&&i.splice(a,1),0<i.length||(r.forEach(function(t){delete e[t]}),delete e._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},s.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=n.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&o(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 a,t,e=this,n=e.getDataset(),i=n.data||(n.data=[]);e._data!==i&&(e._data&&o(e._data,e),t=e,(a=i)._chartjs?a._chartjs.listeners.push(t):(Object.defineProperty(a,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),r.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=a[t];Object.defineProperty(a,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=i.apply(this,e);return s.each(a._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),t}})})),e._data=i),e.resyncElements()},update:s.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()},removeHoverStyle:function(t){s.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=s.valueAtIndexOrDefault,r=s.getHoverColor,o=t._model;t.$previousStyle={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth},o.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:a(e.hoverBackgroundColor,n,r(o.backgroundColor)),o.borderColor=i.hoverBorderColor?i.hoverBorderColor:a(e.hoverBorderColor,n,r(o.borderColor)),o.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:a(e.hoverBorderWidth,n,o.borderWidth)},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):n<i&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},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)}}),t.DatasetController.extend=s.inherits}},{46:46}],26:[function(t,e,n){"use strict";var i=t(46);e.exports={_set:function(t,e){return i.merge(this[t]||(this[t]={}),e)}}},{46:46}],27:[function(t,e,n){"use strict";var g=t(2),i=t(46);var a=function(t){i.extend(this,t),this.initialize.apply(this,arguments)};i.extend(a.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=i.clone(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=g(l)).valid&&(c=g(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if("number"===d&&isFinite(l)&&isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t)):(e._view=n,e._start=null),e},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return i.isNumber(this._model.x)&&i.isNumber(this._model.y)}}),a.extend=i.inherits,e.exports=a},{2:2,46:46}],28:[function(t,e,n){"use strict";var i=t(2),a=t(26),g=t(46),l=t(34);e.exports=function(){function d(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 h(t){return null!=t&&"none"!==t}function e(t,e,n){var i=document.defaultView,a=g._getParentNode(t),r=i.getComputedStyle(t)[e],o=i.getComputedStyle(a)[e],s=h(r),l=h(o),u=Number.POSITIVE_INFINITY;return s||l?Math.min(s?d(r,t,n):u,l?d(o,a,n):u):"none"}g.configMerge=function(){return g.merge(g.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=g.scaleMerge(a,r):"scale"===t?e[t]=g.merge(a,[l.getScaleDefaults(r.type),r]):g._merger(t,e,n,i)}})},g.scaleMerge=function(){return g.merge(g.clone(arguments[0]),[].slice.call(arguments,1),{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=g.valueOrDefault(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?g.merge(e[t][a],[l.getScaleDefaults(r),o]):g.merge(e[t][a],o)}else g._merger(t,e,n,i)}})},g.where=function(t,e){if(g.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return g.each(t,function(t){e(t)&&n.push(t)}),n},g.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},g.findNextWhere=function(t,e,n){g.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},g.findPreviousWhere=function(t,e,n){g.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;0<=i;i--){var a=t[i];if(e(a))return a}},g.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g.almostEquals=function(t,e,n){return Math.abs(t-e)<n},g.almostWhole=function(t,e){var n=Math.round(t);return n-e<t&&t<n+e},g.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},g.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},g.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},g.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e},g.toRadians=function(t){return t*(Math.PI/180)},g.toDegrees=function(t){return t*(180/Math.PI)},g.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}},g.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},g.aliasPixel=function(t){return t%2==0?0:.5},g.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)}}},g.EPSILON=Number.EPSILON||1e-14,g.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=0<e?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||(g.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=0<e?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))},g.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]},g.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},g.niceNum=function(t,e){var n=Math.floor(g.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)},g.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)},g.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;i=s&&0<s.length?(n=s[0].clientX,s[0].clientY):(n=a.clientX,a.clientY);var l=parseFloat(g.getStyle(r,"padding-left")),u=parseFloat(g.getStyle(r,"padding-top")),d=parseFloat(g.getStyle(r,"padding-right")),h=parseFloat(g.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)}},g.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")},g.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")},g._calculatePadding=function(t,e,n){return-1<(e=g.getStyle(t,e)).indexOf("%")?n/parseInt(e,10):parseInt(e,10)},g._getParentNode=function(t){var e=t.parentNode;return e&&e.host&&(e=e.host),e},g.getMaximumWidth=function(t){var e=g._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-g._calculatePadding(e,"padding-left",n)-g._calculatePadding(e,"padding-right",n),a=g.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},g.getMaximumHeight=function(t){var e=g._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-g._calculatePadding(e,"padding-top",n)-g._calculatePadding(e,"padding-bottom",n),a=g.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},g.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},g.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")}},g.fontString=function(t,e,n){return e+" "+t+"px "+n},g.longestText=function(e,t,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(a=i.data={},r=i.garbageCollect=[],i.font=t),e.font=t;var o=0;g.each(n,function(t){null!=t&&!0!==g.isArray(t)?o=g.measureText(e,a,r,o,t):g.isArray(t)&&g.each(t,function(t){null==t||g.isArray(t)||(o=g.measureText(e,a,r,o,t))})});var s=r.length/2;if(s>n.length){for(var l=0;l<s;l++)delete a[r[l]];r.splice(0,s)}return o},g.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),i<r&&(i=r),i},g.numberOfLabelLines=function(t){var e=1;return g.each(t,function(t){g.isArray(t)&&t.length>e&&(e=t.length)}),e},g.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},g.getHoverColor=function(t){return t instanceof CanvasPattern?t:g.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,26:26,34:34,46:46}],29:[function(t,e,n){"use strict";var i=t(46);function s(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function l(t,e){var n,i,a,r,o;for(i=0,r=t.data.datasets.length;i<r;++i)if(t.isDatasetVisible(i))for(a=0,o=(n=t.getDatasetMeta(i)).data.length;a<o;++a){var s=n.data[a];s._view.skip||e(s)}}function u(t,e){var n=[];return l(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function d(t,i,a,r){var o=Number.POSITIVE_INFINITY,s=[];return l(t,function(t){if(!a||t.inRange(i.x,i.y)){var e=t.getCenterPoint(),n=r(i,e);n<o?(s=[t],o=n):n===o&&s.push(t)}}),s}function h(t){var a=-1!==t.indexOf("x"),r=-1!==t.indexOf("y");return function(t,e){var n=a?Math.abs(t.x-e.x):0,i=r?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function a(i,t,e){var n=s(t,i);e.axis=e.axis||"x";var a=h(e.axis),r=e.intersect?u(i,n):d(i,n,!1,a),o=[];return r.length?(i.data.datasets.forEach(function(t,e){if(i.isDatasetVisible(e)){var n=i.getDatasetMeta(e).data[r[0]._index];n&&!n._view.skip&&o.push(n)}}),o):[]}e.exports={modes:{single:function(t,e){var n=s(e,t),i=[];return l(t,function(t){if(t.inRange(n.x,n.y))return i.push(t),i}),i.slice(0,1)},label:a,index:a,dataset:function(t,e,n){var i=s(e,t);n.axis=n.axis||"xy";var a=h(n.axis),r=n.intersect?u(t,i):d(t,i,!1,a);return 0<r.length&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return a(t,e,{intersect:!1})},point:function(t,e){return u(t,s(e,t))},nearest:function(t,e,n){var i=s(e,t);n.axis=n.axis||"xy";var a=h(n.axis),r=d(t,i,n.intersect,a);return 1<r.length&&r.sort(function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n}),r.slice(0,1)},x:function(t,e,n){var i=s(e,t),a=[],r=!1;return l(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=s(e,t),a=[],r=!1;return l(t,function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(a=[]),a}}}},{46:46}],30:[function(t,e,n){"use strict";t(26)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t}},{26:26}],31:[function(t,e,n){"use strict";var N=t(46);function z(t,e){return N.where(t,function(t){return t.position===e})}function V(t,a){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,e){var n=a?e:t,i=a?t:e;return n.weight===i.weight?n._tmpIndex_-i._tmpIndex_:n.weight-i.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,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(e,n,t){if(e){var i=e.options.layout||{},a=N.options.toPadding(i.padding),r=a.left,o=a.right,s=a.top,l=a.bottom,u=z(e.boxes,"left"),d=z(e.boxes,"right"),h=z(e.boxes,"top"),c=z(e.boxes,"bottom"),f=z(e.boxes,"chartArea");V(u,!0),V(d,!1),V(h,!0),V(c,!1);var g=n-r-o,m=t-s-l,p=m/2,v=(n-g/2)/(u.length+d.length),b=(t-p)/(h.length+c.length),y=g,x=m,_=[];N.each(u.concat(d,h,c),function(t){var e,n=t.isHorizontal();n?(e=t.update(t.fullWidth?g:y,b),x-=e.height):(e=t.update(v,x),y-=e.width),_.push({horizontal:n,minSize:e,box:t})});var k=0,w=0,M=0,S=0;N.each(h.concat(c),function(t){if(t.getPadding){var e=t.getPadding();k=Math.max(k,e.left),w=Math.max(w,e.right)}}),N.each(u.concat(d),function(t){if(t.getPadding){var e=t.getPadding();M=Math.max(M,e.top),S=Math.max(S,e.bottom)}});var D=r,C=o,P=s,T=l;N.each(u.concat(d),Y),N.each(u,function(t){D+=t.width}),N.each(d,function(t){C+=t.width}),N.each(h.concat(c),Y),N.each(h,function(t){P+=t.height}),N.each(c,function(t){T+=t.height}),N.each(u.concat(d),function(e){var t=N.findNextWhere(_,function(t){return t.box===e}),n={left:0,right:0,top:P,bottom:T};t&&e.update(t.minSize.width,x,n)}),D=r,C=o,P=s,T=l,N.each(u,function(t){D+=t.width}),N.each(d,function(t){C+=t.width}),N.each(h,function(t){P+=t.height}),N.each(c,function(t){T+=t.height});var O=Math.max(k-D,0);D+=O,C+=Math.max(w-C,0);var I=Math.max(M-P,0);P+=I,T+=Math.max(S-T,0);var A=t-P-T,F=n-D-C;F===y&&A===x||(N.each(u,function(t){t.height=A}),N.each(d,function(t){t.height=A}),N.each(h,function(t){t.fullWidth||(t.width=F)}),N.each(c,function(t){t.fullWidth||(t.width=F)}),x=A,y=F);var R=r+O,L=s+I;N.each(u.concat(h),W),R+=y,L+=x,N.each(d,W),N.each(c,W),e.chartArea={left:D,top:P,right:D+y,bottom:P+x},N.each(f,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(y,x)})}function Y(e){var t=N.findNextWhere(_,function(t){return t.box===e});if(t)if(e.isHorizontal()){var n={left:Math.max(D,k),right:Math.max(C,w),top:0,bottom:0};e.update(e.fullWidth?g:y,m/2,n)}else e.update(t.minSize.width,x)}function W(t){t.isHorizontal()?(t.left=t.fullWidth?r:D,t.right=t.fullWidth?n-o:D+y,t.top=L,t.bottom=L+t.height,L=t.bottom):(t.left=R,t.right=R+t.width,t.top=P,t.bottom=P+x,R=t.right)}}}},{46:46}],32:[function(t,e,n){"use strict";var o=t(26),s=t(46);o._set("global",{plugins:{}}),e.exports={_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 n=this._plugins;[].concat(t).forEach(function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,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 i=[],a=[],n=t&&t.config||{},r=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,n=r[e];!1!==n&&(!0===n&&(n=s.clone(o.global.plugins[e])),i.push(t),a.push({plugin:t,options:n||{}}))}}),e.descriptors=a,e.id=this._cacheId,a},_invalidate:function(t){delete t.$plugins}}},{26:26,46:46}],33:[function(t,e,n){"use strict";var x=t(26),i=t(27),B=t(46),a=t(35);function _(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(t[e].label);return i}function E(t,e,n){var i=t.getPixelForTick(e);return n&&(i-=0===e?(t.getPixelForTick(1)-i)/2:(i-t.getPixelForTick(e-1))/2),i}function k(t,e,n){return B.isArray(e)?B.longestText(t,n,e):t.measureText(e).width}function w(t){var e=B.valueOrDefault,n=x.global,i=e(t.fontSize,n.defaultFontSize),a=e(t.fontStyle,n.defaultFontStyle),r=e(t.fontFamily,n.defaultFontFamily);return{size:i,style:a,family:r,font:B.fontString(i,a,r)}}function M(t){return B.options.toLineHeight(B.valueOrDefault(t.lineHeight,1.2),B.valueOrDefault(t.fontSize,x.global.defaultFontSize))}x._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:"",lineHeight:1.2,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:a.formatters.values,minor:{},major:{}}}),e.exports=i.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){B.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l,u=this;for(u.beforeUpdate(),u.maxWidth=t,u.maxHeight=e,u.margins=B.extend({left:0,right:0,top:0,bottom:0},n),u.longestTextCache=u.longestTextCache||{},u.beforeSetDimensions(),u.setDimensions(),u.afterSetDimensions(),u.beforeDataLimits(),u.determineDataLimits(),u.afterDataLimits(),u.beforeBuildTicks(),s=u.buildTicks()||[],u.afterBuildTicks(),u.beforeTickToLabelConversion(),r=u.convertTicksToLabels(s)||u.ticks,u.afterTickToLabelConversion(),i=0,a=(u.ticks=r).length;i<a;++i)o=r[i],(l=s[i])?l.label=o:s.push(l={label:o,major:!1});return u._ticks=s,u.beforeCalculateTickRotation(),u.calculateTickRotation(),u.afterCalculateTickRotation(),u.beforeFit(),u.fit(),u.afterFit(),u.afterUpdate(),u.minSize},afterUpdate:function(){B.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){B.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(){B.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){B.callback(this.options.beforeDataLimits,[this])},determineDataLimits:B.noop,afterDataLimits:function(){B.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){B.callback(this.options.beforeBuildTicks,[this])},buildTicks:B.noop,afterBuildTicks:function(){B.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){B.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){B.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){B.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,i=_(t._ticks),a=w(n);e.font=a.font;var r=n.minRotation||0;if(i.length&&t.options.display&&t.isHorizontal())for(var o,s=B.longestText(e,a.font,i,t.longestTextCache),l=s,u=t.getPixelForTick(1)-t.getPixelForTick(0)-6;u<l&&r<n.maxRotation;){var d=B.toRadians(r);if(o=Math.cos(d),Math.sin(d)*s>t.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){B.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){B.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=_(t._ticks),i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=i.display,l=t.isHorizontal(),u=w(a),d=i.gridLines.tickMarkLength;if(e.width=l?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?d:0,e.height=l?s&&o.drawTicks?d:0:t.maxHeight,r.display&&s){var h=M(r)+B.options.toPadding(r.padding).height;l?e.height+=h:e.width+=h}if(a.display&&s){var c=B.longestText(t.ctx,u.font,n,t.longestTextCache),f=B.numberOfLabelLines(n),g=.5*u.size,m=t.options.ticks.padding;if(l){t.longestLabelWidth=c;var p=B.toRadians(t.labelRotation),v=Math.cos(p),b=Math.sin(p)*c+u.size*f+g*(f-1)+g;e.height=Math.min(t.maxHeight,e.height+b+m),t.ctx.font=u.font;var y=k(t.ctx,n[0],u.font),x=k(t.ctx,n[n.length-1],u.font);0!==t.labelRotation?(t.paddingLeft="bottom"===i.position?v*y+3:v*g+3,t.paddingRight="bottom"===i.position?v*g+3:v*x+3):(t.paddingLeft=y/2+3,t.paddingRight=x/2+3)}else a.mirror?c=0:c+=m+g,e.width=Math.min(t.maxWidth,e.width+c),t.paddingTop=u.size/2,t.paddingBottom=u.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){B.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(B.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:B.noop,getPixelForValue:B.noop,getValueForPixel:B.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},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:0<t&&0<e?t:0},_autoSkip:function(t){var e,n,i,a,r=this,o=r.isHorizontal(),s=r.options.ticks.minor,l=t.length,u=B.toRadians(r.labelRotation),d=Math.cos(u),h=r.longestLabelWidth*d,c=[];for(s.maxTicksLimit&&(a=s.maxTicksLimit),o&&(e=!1,(h+s.autoSkipPadding)*l>r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),a&&a<l&&(e=Math.max(e,Math.floor(l/a)))),n=0;n<l;n++)i=t[n],(1<e&&0<n%e||n%e==0&&l<=n+e)&&n!==l-1&&delete i.label,c.push(i);return c},draw:function(S){var D=this,C=D.options;if(C.display){var o=D.ctx,P=x.global,T=C.ticks.minor,t=C.ticks.major||T,O=C.gridLines,e=C.scaleLabel,I=0!==D.labelRotation,A=D.isHorizontal(),F=T.autoSkip?D._autoSkip(D.getTicks()):D.getTicks(),s=B.valueOrDefault(T.fontColor,P.defaultFontColor),l=w(T),u=B.valueOrDefault(t.fontColor,P.defaultFontColor),d=w(t),R=O.drawTicks?O.tickMarkLength:0,n=B.valueOrDefault(e.fontColor,P.defaultFontColor),i=w(e),a=B.options.toPadding(e.padding),L=B.toRadians(D.labelRotation),Y=[],W=D.options.gridLines.lineWidth,N="right"===C.position?D.left:D.right-W-R,z="right"===C.position?D.left+R:D.right,V="bottom"===C.position?D.top+W:D.bottom-R-W,H="bottom"===C.position?D.top+W+R:D.bottom+W;if(B.each(F,function(t,e){if(!B.isNullOrUndef(t.label)){var n,i,a,r,o,s,l,u,d,h,c,f,g,m,p=t.label;r=e===D.zeroLineIndex&&C.offset===O.offsetGridLines?(n=O.zeroLineWidth,i=O.zeroLineColor,a=O.zeroLineBorderDash,O.zeroLineBorderDashOffset):(n=B.valueAtIndexOrDefault(O.lineWidth,e),i=B.valueAtIndexOrDefault(O.color,e),a=B.valueOrDefault(O.borderDash,P.borderDash),B.valueOrDefault(O.borderDashOffset,P.borderDashOffset));var v="middle",b="middle",y=T.padding;if(A){var x=R+y;m="bottom"===C.position?(b=I?"middle":"top",v=I?"right":"center",D.top+x):(b=I?"middle":"bottom",v=I?"left":"center",D.bottom-x);var _=E(D,e,O.offsetGridLines&&1<F.length);_<D.left&&(i="rgba(0,0,0,0)"),_+=B.aliasPixel(n),g=D.getPixelForTick(e)+T.labelOffset,o=l=d=c=_,s=V,u=H,h=S.top,f=S.bottom+W}else{var k,w="left"===C.position;k=T.mirror?(v=w?"left":"right",y):(v=w?"right":"left",R+y),g=w?D.right-k:D.left+k;var M=E(D,e,O.offsetGridLines&&1<F.length);M<D.top&&(i="rgba(0,0,0,0)"),M+=B.aliasPixel(n),m=D.getPixelForTick(e)+T.labelOffset,o=N,l=z,d=S.left,c=S.right+W,s=u=h=f=M}Y.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,labelX:g,labelY:m,glWidth:n,glColor:i,glBorderDash:a,glBorderDashOffset:r,rotation:-1*L,label:p,major:t.major,textBaseline:b,textAlign:v})}}),B.each(Y,function(t){if(O.display&&(o.save(),o.lineWidth=t.glWidth,o.strokeStyle=t.glColor,o.setLineDash&&(o.setLineDash(t.glBorderDash),o.lineDashOffset=t.glBorderDashOffset),o.beginPath(),O.drawTicks&&(o.moveTo(t.tx1,t.ty1),o.lineTo(t.tx2,t.ty2)),O.drawOnChartArea&&(o.moveTo(t.x1,t.y1),o.lineTo(t.x2,t.y2)),o.stroke(),o.restore()),T.display){o.save(),o.translate(t.labelX,t.labelY),o.rotate(t.rotation),o.font=t.major?d.font:l.font,o.fillStyle=t.major?u:s,o.textBaseline=t.textBaseline,o.textAlign=t.textAlign;var e=t.label;if(B.isArray(e))for(var n=e.length,i=1.5*l.size,a=D.isHorizontal()?0:-i*(n-1)/2,r=0;r<n;++r)o.fillText(""+e[r],0,a),a+=i;else o.fillText(e,0,0);o.restore()}}),e.display){var r,h,c=0,f=M(e)/2;if(A)r=D.left+(D.right-D.left)/2,h="bottom"===C.position?D.bottom-f-a.bottom:D.top+f+a.top;else{var g="left"===C.position;r=g?D.left+f+a.top:D.right-f-a.top,h=D.top+(D.bottom-D.top)/2,c=g?-.5*Math.PI:.5*Math.PI}o.save(),o.translate(r,h),o.rotate(c),o.textAlign="center",o.textBaseline="middle",o.fillStyle=n,o.font=i.font,o.fillText(e.labelString,0,0),o.restore()}if(O.drawBorder){o.lineWidth=B.valueAtIndexOrDefault(O.lineWidth,0),o.strokeStyle=B.valueAtIndexOrDefault(O.color,0);var m=D.left,p=D.right+W,v=D.top,b=D.bottom+W,y=B.aliasPixel(o.lineWidth);A?(v=b="top"===C.position?D.bottom:D.top,v+=y,b+=y):(m=p="left"===C.position?D.right:D.left,m+=y,p+=y),o.beginPath(),o.moveTo(m,v),o.lineTo(p,b),o.stroke()}}}})},{26:26,27:27,35:35,46:46}],34:[function(t,e,n){"use strict";var i=t(26),a=t(46),r=t(31);e.exports={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=a.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[i.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=a.extend(this.defaults[t],e))},addScalesToLayout:function(e){a.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,r.addBox(e,t)})}}},{26:26,31:31,46:46}],35:[function(t,e,n){"use strict";var l=t(46);e.exports={formatters:{values:function(t){return l.isArray(t)?t:""+t},linear:function(t,e,n){var i=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(i)&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=l.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=l.log10(Math.abs(t));r=t.toExponential(Math.floor(o)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(l.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}}},{46:46}],36:[function(t,e,n){"use strict";var i=t(26),a=t(27),R=t(46);i._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:R.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(0<t.length){var r=t[0];r.xLabel?n=r.xLabel:0<a&&r.index<a&&(n=i[r.index])}return n},afterTitle:R.noop,beforeBody:R.noop,beforeLabel:R.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),n+=t.yLabel},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:R.noop,afterBody:R.noop,beforeFooter:R.noop,footer:R.noop,afterFooter:R.noop}}});var L={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:Math.round(i/r),y:Math.round(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=R.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 c(t,e){var n=R.color(t);return n.alpha(e*n.alpha()).rgbaString()}function o(t,e){return e&&(R.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function s(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function Y(t){var e=i.global,n=R.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:n(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:n(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:n(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:n(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:n(t.titleFontStyle,e.defaultFontStyle),titleFontSize:n(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:n(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:n(t.footerFontStyle,e.defaultFontStyle),footerFontSize:n(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 r(t){return o([],s(t))}(e.exports=a.extend({initialize:function(){this._model=Y(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),i=t.afterTitle.apply(this,arguments),a=[];return a=o(a=o(a=o(a,s(e)),s(n)),s(i))},getBeforeBody:function(){return r(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,n){var i=this,a=i._options.callbacks,r=[];return R.each(t,function(t){var e={before:[],lines:[],after:[]};o(e.before,s(a.beforeLabel.call(i,t,n))),o(e.lines,a.label.call(i,t,n)),o(e.after,s(a.afterLabel.call(i,t,n))),r.push(e)}),r},getAfterBody:function(){return r(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),a=[];return a=o(a=o(a=o(a,s(e)),s(n)),s(i))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,m,p,v,b,y,x,_=this,k=_._options,w=_._model,M=_._model=Y(k),S=_._active,D=_._data,C={xAlign:w.xAlign,yAlign:w.yAlign},P={x:w.x,y:w.y},T={width:w.width,height:w.height},O={x:w.caretX,y:w.caretY};if(S.length){M.opacity=1;var I=[],A=[];O=L[k.position].call(_,S,_._eventPosition);var F=[];for(e=0,n=S.length;e<n;++e)F.push((p=S[e],b=v=void 0,v=p._xScale,b=p._yScale||p._scale,y=p._index,x=p._datasetIndex,{xLabel:v?v.getLabelForIndex(y,x):"",yLabel:b?b.getLabelForIndex(y,x):"",index:y,datasetIndex:x,x:p._model.x,y:p._model.y}));k.filter&&(F=F.filter(function(t){return k.filter(t,D)})),k.itemSort&&(F=F.sort(function(t,e){return k.itemSort(t,e,D)})),R.each(F,function(t){I.push(k.callbacks.labelColor.call(_,t,_._chart)),A.push(k.callbacks.labelTextColor.call(_,t,_._chart))}),M.title=_.getTitle(F,D),M.beforeBody=_.getBeforeBody(F,D),M.body=_.getBody(F,D),M.afterBody=_.getAfterBody(F,D),M.footer=_.getFooter(F,D),M.x=Math.round(O.x),M.y=Math.round(O.y),M.caretPadding=k.caretPadding,M.labelColors=I,M.labelTextColors=A,M.dataPoints=F,C=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;i="center"===h?(n=function(t){return t<=c},function(t){return c<t}):(n=function(t){return t<=e.width/2},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,T=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=R.fontString(u,e._titleFontStyle,e._titleFontFamily),R.each(e.title,f),n.font=R.fontString(d,e._bodyFontStyle,e._bodyFontFamily),R.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,R.each(r,function(t){R.each(t.before,f),R.each(t.lines,f),R.each(t.after,f)}),c=0,n.font=R.fontString(h,e._footerFontStyle,e._footerFontFamily),R.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,M)),i=M,a=T,r=C,o=_._chart,s=i.x,l=i.y,u=i.caretSize,d=i.caretPadding,h=i.cornerRadius,c=r.xAlign,f=r.yAlign,g=u+d,m=h+d,"right"===c?s-=a.width:"center"===c&&((s-=a.width/2)+a.width>o.width&&(s=o.width-a.width),s<0&&(s=0)),"top"===f?l+=g:l-="bottom"===f?a.height+g:a.height/2,"center"===f?"left"===c?s+=g:"right"===c&&(s-=g):"left"===c?s-=m:"right"===c&&(s+=m),P={x:s,y:l}}else M.opacity=0;return M.xAlign=C.xAlign,M.yAlign=C.yAlign,M.x=P.x,M.y=P.y,M.width=T.width,M.height=T.height,M.caretX=O.x,M.caretY=O.y,_._model=M,t&&k.custom&&k.custom.call(_,M),_},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,m=e.width,p=e.height;if("center"===c)s=g+p/2,l="left"===h?(a=(i=f)-u,r=i,o=s+u,s-u):(a=(i=f+m)+u,r=i,o=s-u,s+u);else if(r=(i="left"===h?(a=f+d+u)-u:"right"===h?(a=f+m-d-u)-u:(a=n.caretX)-u,a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+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,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=c(e.titleFontColor,i),n.font=R.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r<o;++r)n.fillText(a[r],t.x,t.y),t.y+=s+l,r+1===a.length&&(t.y+=e.titleMarginBottom-l)}},drawBody:function(i,a,r,o){var s=a.bodyFontSize,e=a.bodySpacing,t=a.body;r.textAlign=a._bodyAlign,r.textBaseline="top",r.font=R.fontString(s,a._bodyFontStyle,a._bodyFontFamily);var n=0,l=function(t){r.fillText(t,i.x+n,i.y),i.y+=s+e};r.fillStyle=c(a.bodyFontColor,o),R.each(a.beforeBody,l);var u=a.displayColors;n=u?s+2:0,R.each(t,function(t,e){var n=c(a.labelTextColors[e],o);r.fillStyle=n,R.each(t.before,l),R.each(t.lines,function(t){u&&(r.fillStyle=c(a.legendColorBackground,o),r.fillRect(i.x,i.y,s,s),r.lineWidth=1,r.strokeStyle=c(a.labelColors[e].borderColor,o),r.strokeRect(i.x,i.y,s,s),r.fillStyle=c(a.labelColors[e].backgroundColor,o),r.fillRect(i.x+1,i.y+1,s-2,s-2),r.fillStyle=n),l(t)}),R.each(t.after,l)}),n=0,R.each(a.afterBody,l),i.y-=e},drawFooter:function(e,n,i,t){var a=n.footer;a.length&&(e.y+=n.footerMarginTop,i.textAlign=n._footerAlign,i.textBaseline="top",i.fillStyle=c(n.footerFontColor,t),i.font=R.fontString(n.footerFontSize,n._footerFontStyle,n._footerFontFamily),R.each(a,function(t){i.fillText(t,e.x,e.y),e.y+=n.footerFontSize+n.footerSpacing}))},drawBackground:function(t,e,n,i,a){n.fillStyle=c(e.backgroundColor,a),n.strokeStyle=c(e.borderColor,a),n.lineWidth=e.borderWidth;var r=e.xAlign,o=e.yAlign,s=t.x,l=t.y,u=i.width,d=i.height,h=e.cornerRadius;n.beginPath(),n.moveTo(s+h,l),"top"===o&&this.drawCaret(t,i),n.lineTo(s+u-h,l),n.quadraticCurveTo(s+u,l,s+u,l+h),"center"===o&&"right"===r&&this.drawCaret(t,i),n.lineTo(s+u,l+d-h),n.quadraticCurveTo(s+u,l+d,s+u-h,l+d),"bottom"===o&&this.drawCaret(t,i),n.lineTo(s+h,l+d),n.quadraticCurveTo(s,l+d,s,l+d-h),"center"===o&&"left"===r&&this.drawCaret(t,i),n.lineTo(s,l+h),n.quadraticCurveTo(s,l,s+h,l),n.closePath(),n.fill(),0<e.borderWidth&&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&&(this.drawBackground(i,e,t,n,a),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,a),this.drawBody(i,e,t,a),this.drawFooter(i,e,t,a))}},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),(e=!R.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}})).positioners=L},{26:26,27:27,46:46}],37:[function(t,e,n){"use strict";var i=t(26),a=t(27),d=t(46);i._set("global",{elements:{arc:{backgroundColor:i.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({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=d.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=2*Math.PI;for(;s<a;)a-=2*Math.PI;for(;a<o;)a+=2*Math.PI;var l=o<=a&&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=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{26:26,27:27,46:46}],38:[function(t,e,n){"use strict";var i=t(26),a=t(27),d=t(46),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||h.defaultColor,r.beginPath(),u=-1,t=0;t<s.length;++t)e=s[t],n=d.previousItem(s,t),i=e._view,0===t?i.skip||(r.moveTo(i.x,i.y),u=t):(n=-1===u?n:s[u],i.skip||(u!==t-1&&!o||-1===u?r.moveTo(i.x,i.y):d.canvas.lineTo(r,n._view,e._view),u=t));r.stroke(),r.restore()}})},{26:26,27:27,46:46}],39:[function(t,e,n){"use strict";var u=t(26),i=t(27),d=t(46),h=u.global.defaultColor;function a(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}u._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:h,borderColor:h,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=i.extend({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:a,inXRange:a,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._model,i=this._chart.ctx,a=e.pointStyle,r=e.rotation,o=e.radius,s=e.x,l=e.y;e.skip||(void 0===t||n.x>=t.left&&1.01*t.right>=n.x&&n.y>=t.top&&1.01*t.bottom>=n.y)&&(i.strokeStyle=e.borderColor||h,i.lineWidth=d.valueOrDefault(e.borderWidth,u.global.elements.point.borderWidth),i.fillStyle=e.backgroundColor||h,d.canvas.drawPoint(i,a,o,s,l,r))}})},{26:26,27:27,46:46}],40:[function(t,e,n){"use strict";var i=t(26),a=t(27);function l(t){return void 0!==t._view.width}function r(t){var e,n,i,a,r=t._view;if(l(t)){var o=r.width/2;e=r.x-o,n=r.x+o,i=Math.min(r.y,r.base),a=Math.max(r.y,r.base)}else{var s=r.height/2;e=Math.min(r.x,r.base),n=Math.max(r.x,r.base),i=r.y-s,a=r.y+s}return{left:e,top:i,right:n,bottom:a}}i._set("global",{elements:{rectangle:{backgroundColor:i.global.defaultColor,borderColor:i.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a,r,o,s=this._chart.ctx,l=this._view,u=l.borderWidth;if(o=l.horizontal?(t=l.base,e=l.x,n=l.y-l.height/2,i=l.y+l.height/2,a=t<e?1:-1,r=1,l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,a=1,r=(n=l.y)<(i=l.base)?1:-1,l.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(t-e),Math.abs(n-i)),h=(u=d<u?d:u)/2,c=t+("left"!==o?h*a:0),f=e+("right"!==o?-h*a:0),g=n+("top"!==o?h*r:0),m=i+("bottom"!==o?-h*r:0);c!==f&&(n=g,i=m),g!==m&&(t=c,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=u;var p=[[t,i],[t,n],[e,n],[e,i]],v=["bottom","left","top","right"].indexOf(o,0);function b(t){return p[(v+t)%4]}-1===v&&(v=0);var y=b(0);s.moveTo(y[0],y[1]);for(var x=1;x<4;x++)y=b(x),s.lineTo(y[0],y[1]);s.fill(),u&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var i=r(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=r(this);return l(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=r(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=r(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return e=l(this)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{26:26,27:27}],41:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(37),e.exports.Line=t(38),e.exports.Point=t(39),e.exports.Rectangle=t(40)},{37:37,38:38,39:39,40:40}],42:[function(t,e,n){"use strict";var i=t(43);n=e.exports={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-1e-7,i/2-1e-7);t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.arcTo(e+i,n,e+i,n+o,o),t.lineTo(e+i,n+a-o),t.arcTo(e+i,n+a,e+i-o,n+a,o),t.lineTo(e+o,n+a),t.arcTo(e,n+a,e,n+a-o,o),t.lineTo(e,n+o),t.arcTo(e,n,e+o,n,o),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;if(r=r||0,!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(t.save(),t.translate(i,a),t.rotate(r*Math.PI/180),t.beginPath(),e){default:t.arc(0,0,n,0,2*Math.PI),t.closePath();break;case"triangle":d=(s=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(-s/2,d/3),t.lineTo(s/2,d/3),t.lineTo(0,-2*d/3),t.closePath();break;case"rect":h=1/Math.SQRT2*n,t.rect(-h,-h,2*h,2*h);break;case"rectRounded":var c=n/Math.SQRT2,f=-c,g=-c,m=Math.SQRT2*n;this.roundedRect(t,f,g,m,m,.425*n);break;case"rectRot":h=1/Math.SQRT2*n,t.moveTo(-h,0),t.lineTo(0,h),t.lineTo(h,0),t.lineTo(0,-h),t.closePath();break;case"cross":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0);break;case"crossRot":l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"star":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0),l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"line":t.moveTo(-n,0),t.lineTo(n,0);break;case"dash":t.moveTo(0,0),t.lineTo(n,0)}t.fill(),t.stroke(),t.restore()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},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){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);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)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments)}},{43:43}],43:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.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(d.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(d.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(!d.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(d.isArray(t))return t.map(d.clone);if(d.isObject(t)){for(var e={},n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=d.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){var a=e[t],r=n[t];d.isObject(a)&&d.isObject(r)?d.merge(a,r,i):e[t]=d.clone(r)},_mergerIf:function(t,e,n){var i=e[t],a=n[t];d.isObject(i)&&d.isObject(a)?d.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=d.clone(a))},merge:function(t,e,n){var i,a,r,o,s,l=d.isArray(e)?e:[e],u=l.length;if(!d.isObject(t))return t;for(i=(n=n||{}).merger||d._merger,a=0;a<u;++a)if(e=l[a],d.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 d.merge(t,e,{merger:d._mergerIf})},extend:function(n){for(var t=function(t,e){n[e]=t},e=1,i=arguments.length;e<i;++e)d.each(arguments[e],t);return n},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=d.inherits,t&&d.extend(n.prototype,t),n.__super__=e.prototype,n}};(e.exports=d).callCallback=d.callback,d.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},d.getValueOrDefault=d.valueOrDefault,d.getValueAtIndexOrDefault=d.valueAtIndexOrDefault},{}],44:[function(t,e,n){"use strict";var i=t(43),a={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 1<=t?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),e=i<1?(i=1,n/4):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),e=i<1?(i=1,n/4):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),e=i<1?(i=1,n/4):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){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+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-a.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*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},i.easingEffects=a},{43:43}],45:[function(t,e,n){"use strict";var o=t(43);e.exports={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 o.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}},resolve:function(t,e,n){var i,a,r;for(i=0,a=t.length;i<a;++i)if(void 0!==(r=t[i])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==n&&o.isArray(r)&&(r=r[n]),void 0!==r))return r}}},{43:43}],46:[function(t,e,n){"use strict";e.exports=t(43),e.exports.easing=t(44),e.exports.canvas=t(42),e.exports.options=t(45)},{42:42,43:43,44:44,45:45}],47:[function(t,e,n){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],48:[function(t,e,n){"use strict";var f=t(46),g="$chartjs",m="chartjs-",p=m+"render-monitor",v=m+"render-animation",b=["animationstart","webkitAnimationStart"],s={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function l(t,e){var n=f.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var i=!!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 y(t,e,n){t.addEventListener(e,n,i)}function o(t,e,n){t.removeEventListener(e,n,i)}function x(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 a(e,t,n){var i,a,r,o,s,l,u,d,h=e[g]||(e[g]={}),c=h.resizer=function(t){var e=document.createElement("div"),n=m+"size-monitor",i="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=i,e.className=n,e.innerHTML='<div class="'+n+'-expand" style="'+i+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+n+'-shrink" style="'+i+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],r=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var o=function(){e._reset(),t()};return y(a,"scroll",o.bind(a,"expand")),y(r,"scroll",o.bind(r,"shrink")),e}((r=!(i=function(){if(h.resizer)return t(x("resize",n))}),o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,f.requestAnimFrame.call(window,function(){r=!1,i.apply(a,o)}))}));l=function(){if(h.resizer){var t=e.parentNode;t&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset()}},u=(s=e)[g]||(s[g]={}),d=u.renderProxy=function(t){t.animationName===v&&l()},f.each(b,function(t){y(s,t,d)}),u.reflow=!!s.offsetParent,s.classList.add(p)}function r(t){var e,n,i,a=t[g]||{},r=a.resizer;delete a.resizer,n=(e=t)[g]||{},(i=n.renderProxy)&&(f.each(b,function(t){o(e,t,i)}),delete n.renderProxy),e.classList.remove(p),r&&r.parentNode&&r.parentNode.removeChild(r)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n,i="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+i+"}@keyframes "+v+"{"+i+"}."+p+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},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?(function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[g]={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=l(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=l(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var n=t.canvas;if(n[g]){var i=n[g].initial;["height","width"].forEach(function(t){var e=i[t];f.isNullOrUndef(e)?n.removeAttribute(t):n.setAttribute(t,e)}),f.each(i.style||{},function(t,e){n.style[e]=t}),n.width=n.width,delete n[g]}},addEventListener:function(r,t,o){var e=r.canvas;if("resize"!==t){var n=o[g]||(o[g]={});y(e,t,(n.proxies||(n.proxies={}))[r.id+"_"+t]=function(t){var e,n,i,a;o((n=r,i=s[(e=t).type]||e.type,a=f.getRelativePosition(e,n),x(i,n,a.x,a.y,e)))})}else a(e,o,r)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[g]||{}).proxies||{})[t.id+"_"+e];a&&o(i,e,a)}else r(i)}},f.addEvent=y,f.removeEvent=o},{46:46}],49:[function(t,e,n){"use strict";var i=t(46),a=t(47),r=t(48),o=r._enabled?r:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},o)},{46:46,47:47,48:48}],50:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(51),e.exports.legend=t(52),e.exports.title=t(53)},{51:51,52:52,53:53}],51:[function(t,e,n){"use strict";var u=t(26),c=t(41),d=t(46);u._set("global",{plugins:{filler:{propagate:!0}}});var f={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 function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function g(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||n<=i)&&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 m(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.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}function p(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 y(t){return t&&!t.skip}function x(t,e,n,i,a){var r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)d.canvas.lineTo(t,e[r-1],e[r]);for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;0<r;--r)d.canvas.lineTo(t,n[r],n[r-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o,s,l,u=(t.data.datasets||[]).length,d=e.propagate,h=[];for(i=0;i<u;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof c.Line&&(r={visible:t.isDatasetVisible(i),fill:g(a,i,u),chart:t,el:a}),n.$filler=r,h.push(r);for(i=0;i<u;++i)(r=h[i])&&(r.fill=p(h,i,d),r.boundary=m(r),r.mapper=(l=void 0,s=(o=r).fill,!(l="dataset")===s?null:(isFinite(s)||(l="boundary"),f[l](o))))},beforeDatasetDraw:function(t,e){var n=e.meta.$filler;if(n){var i=t.ctx,a=n.el,r=a._view,o=a._children||[],s=n.mapper,l=r.backgroundColor||u.global.defaultColor;s&&l&&o.length&&(d.canvas.clipArea(i,t.chartArea),function(t,e,n,i,a,r){var o,s,l,u,d,h,c,f=e.length,g=i.spanGaps,m=[],p=[],v=0,b=0;for(t.beginPath(),o=0,s=f+!!r;o<s;++o)d=n(u=e[l=o%f]._view,l,i),h=y(u),c=y(d),h&&c?(v=m.push(u),b=p.push(d)):v&&b&&(g?(h&&m.push(u),c&&p.push(d)):(x(t,m,p,v,b),v=b=0,m=[],p=[]));x(t,m,p,v,b),t.closePath(),t.fillStyle=a,t.fill()}(i,o,s,r,l,a._loop),d.canvas.unclipArea(i))}}}},{26:26,41:41,46:46}],52:[function(t,e,n){"use strict";var D=t(26),i=t(27),C=t(46),a=t(31),r=C.noop;function P(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}D._set("global",{legend:{display:!0,position:"top",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,labels:{boxWidth:40,padding:10,generateLabels:function(n){var t=n.data;return C.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:C.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!n.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var n=0;n<t.data.datasets.length;n++)e.push('<li><span style="background-color:'+t.data.datasets[n].backgroundColor+'"></span>'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var o=i.extend({initialize:function(t){C.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:r,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:r,beforeSetDimensions:r,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:r,beforeBuildLabels:r,buildLabels:function(){var e=this,n=e.options.labels||{},t=C.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:r,beforeFit:r,fit:function(){var i=this,t=i.options,a=t.labels,e=t.display,r=i.ctx,n=D.global,o=C.valueOrDefault,s=o(a.fontSize,n.defaultFontSize),l=o(a.fontStyle,n.defaultFontStyle),u=o(a.fontFamily,n.defaultFontFamily),d=C.fontString(s,l,u),h=i.legendHitBoxes=[],c=i.minSize,f=i.isHorizontal();if(c.height=f?(c.width=i.maxWidth,e?10:0):(c.width=e?10:0,i.maxHeight),e)if(r.font=d,f){var g=i.lineWidths=[0],m=i.legendItems.length?s+a.padding:0;r.textAlign="left",r.textBaseline="top",C.each(i.legendItems,function(t,e){var n=P(a,s)+s/2+r.measureText(t.text).width;g[g.length-1]+n+a.padding>=i.width&&(m+=s+a.padding,g[g.length]=i.left),h[e]={left:0,top:0,width:n,height:s},g[g.length-1]+=n+a.padding}),c.height+=m}else{var p=a.padding,v=i.columnWidths=[],b=a.padding,y=0,x=0,_=s+p;C.each(i.legendItems,function(t,e){var n=P(a,s)+s/2+r.measureText(t.text).width;x+_>c.height&&(b+=y+a.padding,v.push(y),x=y=0),y=Math.max(y,n),x+=_,h[e]={left:0,top:0,width:n,height:s}}),b+=y,v.push(y),c.width+=b}i.width=c.width,i.height=c.height},afterFit:r,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var h=this,c=h.options,f=c.labels,g=D.global,m=g.elements.line,p=h.width,v=h.lineWidths;if(c.display){var b,y=h.ctx,x=C.valueOrDefault,t=x(f.fontColor,g.defaultFontColor),_=x(f.fontSize,g.defaultFontSize),e=x(f.fontStyle,g.defaultFontStyle),n=x(f.fontFamily,g.defaultFontFamily),i=C.fontString(_,e,n);y.textAlign="left",y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=t,y.fillStyle=t,y.font=i;var k=P(f,_),w=h.legendHitBoxes,M=h.isHorizontal();b=M?{x:h.left+(p-v[0])/2,y:h.top+f.padding,line:0}:{x:h.left+f.padding,y:h.top+f.padding,line:0};var S=_+f.padding;C.each(h.legendItems,function(t,e){var n,i,a,r,o,s=y.measureText(t.text).width,l=k+_/2+s,u=b.x,d=b.y;M?p<=u+l&&(d=b.y+=S,b.line++,u=b.x=h.left+(p-v[b.line])/2):d+S>h.bottom&&(u=b.x=u+h.columnWidths[b.line]+f.padding,d=b.y=h.top+f.padding,b.line++),function(t,e,n){if(!(isNaN(k)||k<=0)){y.save(),y.fillStyle=x(n.fillStyle,g.defaultColor),y.lineCap=x(n.lineCap,m.borderCapStyle),y.lineDashOffset=x(n.lineDashOffset,m.borderDashOffset),y.lineJoin=x(n.lineJoin,m.borderJoinStyle),y.lineWidth=x(n.lineWidth,m.borderWidth),y.strokeStyle=x(n.strokeStyle,g.defaultColor);var i=0===x(n.lineWidth,m.borderWidth);if(y.setLineDash&&y.setLineDash(x(n.lineDash,m.borderDash)),c.labels&&c.labels.usePointStyle){var a=_*Math.SQRT2/2,r=a/Math.SQRT2,o=t+r,s=e+r;C.canvas.drawPoint(y,n.pointStyle,a,o,s)}else i||y.strokeRect(t,e,k,_),y.fillRect(t,e,k,_);y.restore()}}(u,d,t),w[e].left=u,w[e].top=d,n=t,i=s,r=k+(a=_/2)+u,o=d+a,y.fillText(n.text,r,o),n.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(r,o),y.lineTo(r+i,o),y.stroke()),M?b.x+=l+f.padding:b.y+=S})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var u=s[l];if(r>=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function s(t,e){var n=new o({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:o,beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(C.mergeIf(e,D.global.legend),n?(a.configure(t,n,e),n.options=e):s(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{26:26,27:27,31:31,46:46}],53:[function(t,e,n){"use strict";var _=t(26),i=t(27),k=t(46),a=t(31),r=k.noop;_._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var o=i.extend({initialize:function(t){k.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,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:r,beforeSetDimensions:r,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:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var t=k.valueOrDefault,e=this.options,n=e.display,i=t(e.fontSize,_.global.defaultFontSize),a=this.minSize,r=k.isArray(e.text)?e.text.length:1,o=k.options.toLineHeight(e.lineHeight,i),s=n?r*o+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=s):(a.width=s,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=k.valueOrDefault,n=this.options,i=_.global;if(n.display){var a,r,o,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),d=k.fontString(s,l,u),h=k.options.toLineHeight(n.lineHeight,s),c=h/2+n.padding,f=0,g=this.top,m=this.left,p=this.bottom,v=this.right;t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=d,this.isHorizontal()?(r=m+(v-m)/2,o=g+c,a=v-m):(r="left"===n.position?m+c:v-c,o=g+(p-g)/2,a=p-g,f=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,o),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var b=n.text;if(k.isArray(b))for(var y=0,x=0;x<b.length;++x)t.fillText(b[x],0,y,a),y+=h;else t.fillText(b,0,0,a);t.restore()}}});function s(t,e){var n=new o({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.titleBlock=n}e.exports={id:"title",_element:o,beforeInit:function(t){var e=t.options.title;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(k.mergeIf(e,_.global.title),n?(a.configure(t,n,e),n.options=e):s(t,e)):n&&(a.removeBox(t,n),delete t.titleBlock)}}},{26:26,27:27,31:31,46:46}],54:[function(t,e,n){"use strict";var i=t(33),a=t(34);e.exports=function(){var t=i.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,n=e.getLabels();e.minIndex=0,e.maxIndex=n.length-1,void 0!==e.options.ticks.min&&(t=n.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=n.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=n[e.minIndex],e.max=n[e.maxIndex]},buildTicks:function(){var t=this.getLabels();this.ticks=0===this.minIndex&&this.maxIndex===t.length-1?t:t.slice(this.minIndex,this.maxIndex+1)},getLabelForIndex:function(t,e){var n=this.chart.data,i=this.isHorizontal();return n.yLabels&&!i?this.getRightValue(n.datasets[e].data[t]):this.ticks[t-this.minIndex]},getPixelForValue:function(t,e){var n,i=this,a=i.options.offset,r=Math.max(i.maxIndex+1-i.minIndex-(a?0:1),1);if(null!=t&&(n=i.isHorizontal()?t.x:t.y),void 0!==n||void 0!==t&&isNaN(e)){t=n||t;var o=i.getLabels().indexOf(t);e=-1!==o?o:e}if(i.isHorizontal()){var s=i.width/r,l=s*(e-i.minIndex);return a&&(l+=s/2),i.left+Math.round(l)}var u=i.height/r,d=u*(e-i.minIndex);return a&&(d+=u/2),i.top+Math.round(d)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this.options.offset,n=Math.max(this._ticks.length-(e?0:1),1),i=this.isHorizontal(),a=(i?this.width:this.height)/n;return t-=i?this.left:this.top,e&&(t-=a/2),(t<=0?0:Math.round(t/a))+this.minIndex},getBasePixel:function(){return this.bottom}});a.registerScaleType("category",t,{position:"bottom"})}},{33:33,34:34}],55:[function(t,e,n){"use strict";var i=t(26),h=t(46),a=t(34),r=t(35);e.exports=function(t){var e={position:"left",ticks:{callback:r.formatters.linear}},n=t.LinearScaleBase.extend({determineDataLimits:function(){var o=this,s=o.options,l=o.chart,t=l.data.datasets,e=o.isHorizontal();function u(t){return e?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null;var i=s.stacked;if(void 0===i&&h.each(t,function(t,e){if(!i){var n=l.getDatasetMeta(e);l.isDatasetVisible(e)&&u(n)&&void 0!==n.stack&&(i=!0)}}),s.stacked||i){var d={};h.each(t,function(t,e){var i=l.getDatasetMeta(e),n=[i.type,void 0===s.stacked&&void 0===i.stack?e:"",i.stack].join(".");void 0===d[n]&&(d[n]={positiveValues:[],negativeValues:[]});var a=d[n].positiveValues,r=d[n].negativeValues;l.isDatasetVisible(e)&&u(i)&&h.each(t.data,function(t,e){var n=+o.getRightValue(t);isNaN(n)||i.data[e].hidden||(a[e]=a[e]||0,r[e]=r[e]||0,s.relativePoints?a[e]=100:n<0?r[e]+=n:a[e]+=n)})}),h.each(d,function(t){var e=t.positiveValues.concat(t.negativeValues),n=h.min(e),i=h.max(e);o.min=null===o.min?n:Math.min(o.min,n),o.max=null===o.max?i:Math.max(o.max,i)})}else h.each(t,function(t,e){var i=l.getDatasetMeta(e);l.isDatasetVisible(e)&&u(i)&&h.each(t.data,function(t,e){var n=+o.getRightValue(t);isNaN(n)||i.data[e].hidden||(null===o.min?o.min=n:n<o.min&&(o.min=n),null===o.max?o.max=n:n>o.max&&(o.max=n))})});o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=h.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),i=this.end-e;return this.isHorizontal()?this.left+this.width/i*(n-e):this.bottom-this.height/i*(n-e)},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,i=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*i},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});a.registerScaleType("linear",n,e)}},{26:26,34:34,35:35,46:46}],56:[function(t,e,n){"use strict";var h=t(46),i=t(33);e.exports=function(t){var e=h.noop;t.LinearScaleBase=i.extend({getRightValue:function(t){return"string"==typeof t?+t:i.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:0<n&&0<i&&(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:e,handleDirectionalChanges:e,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=[];if(t.stepSize&&0<t.stepSize)a=t.stepSize;else{var o=h.niceNum(e.max-e.min,!1);a=h.niceNum(o/(t.maxTicks-1),!0),void 0!==(i=t.precision)&&(n=Math.pow(10,i),a=Math.ceil(a*n)/n)}var s=Math.floor(e.min/a)*a,l=Math.ceil(e.max/a)*a;h.isNullOrUndef(t.min)||h.isNullOrUndef(t.max)||!t.stepSize||h.almostWhole((t.max-t.min)/t.stepSize,a/1e3)&&(s=t.min,l=t.max);var u=(l-s)/a;u=h.almostEquals(u,Math.round(u),a/1e3)?Math.round(u):Math.ceil(u),a<(i=1)&&(i=Math.pow(10,1-Math.floor(h.log10(a))),s=Math.round(s*i)/i,l=Math.round(l*i)/i),r.push(void 0!==t.min?t.min:s);for(var d=1;d<u;++d)r.push(Math.round((s+d*a)*i)/i);return r.push(void 0!==t.max?t.max:l),r}(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(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),i.prototype.convertTicksToLabels.call(this)}})}},{33:33,46:46}],57:[function(t,e,n){"use strict";var c=t(46),i=t(33),a=t(34),r=t(35);e.exports=function(h){var t={position:"left",ticks:{callback:r.formatters.logarithmic}},e=i.extend({determineDataLimits:function(){var o=this,n=o.options,s=o.chart,t=s.data.datasets,e=o.isHorizontal();function l(t){return e?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null,o.minNotZero=null;var i=n.stacked;if(void 0===i&&c.each(t,function(t,e){if(!i){var n=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(n)&&void 0!==n.stack&&(i=!0)}}),n.stacked||i){var u={};c.each(t,function(t,e){var a=s.getDatasetMeta(e),r=[a.type,void 0===n.stacked&&void 0===a.stack?e:"",a.stack].join(".");s.isDatasetVisible(e)&&l(a)&&(void 0===u[r]&&(u[r]=[]),c.each(t.data,function(t,e){var n=u[r],i=+o.getRightValue(t);isNaN(i)||a.data[e].hidden||i<0||(n[e]=n[e]||0,n[e]+=i)}))}),c.each(u,function(t){if(0<t.length){var e=c.min(t),n=c.max(t);o.min=null===o.min?e:Math.min(o.min,e),o.max=null===o.max?n:Math.max(o.max,n)}})}else c.each(t,function(t,e){var i=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(i)&&c.each(t.data,function(t,e){var n=+o.getRightValue(t);isNaN(n)||i.data[e].hidden||n<0||(null===o.min?o.min=n:n<o.min&&(o.min=n),null===o.max?o.max=n:n>o.max&&(o.max=n),0!==n&&(null===o.minNotZero||n<o.minNotZero)&&(o.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,n=c.valueOrDefault;t.min=n(e.min,t.min),t.max=n(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(c.log10(t.min))-1),t.max=Math.pow(10,Math.floor(c.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(c.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(c.log10(t.min))+1):10),null===t.minNotZero&&(0<t.min?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(c.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:e.min,max:e.max},a=t.ticks=function(t,e){var n,i,a=[],r=c.valueOrDefault,o=r(t.min,Math.pow(10,Math.floor(c.log10(e.min)))),s=Math.floor(c.log10(e.max)),l=Math.ceil(e.max/Math.pow(10,s));0===o?(n=Math.floor(c.log10(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(o),o=i*Math.pow(10,n)):(n=Math.floor(c.log10(o)),i=Math.floor(o/Math.pow(10,n)));for(var u=n<0?Math.pow(10,Math.abs(n)):1;a.push(o),10==++i&&(i=1,u=0<=++n?1:u),o=Math.round(i*Math.pow(10,n)*u)/u,n<s||n===s&&i<l;);var d=r(t.max,o);return a.push(d),a}(i,t);t.max=c.max(a),t.min=c.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(),i.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(c.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(t){var e,n,i,a,r,o=this,s=o.options.ticks.reverse,l=c.log10,u=o._getFirstTickValue(o.minNotZero),d=0;return t=+o.getRightValue(t),r=s?(i=o.end,a=o.start,-1):(i=o.start,a=o.end,1),n=o.isHorizontal()?(e=o.width,s?o.right:o.left):(e=o.height,r*=-1,s?o.top:o.bottom),t!==i&&(0===i&&(e-=d=c.getValueOrDefault(o.options.ticks.fontSize,h.defaults.global.defaultFontSize),i=u),0!==t&&(d+=e/(l(a)-l(i))*(l(t)-l(i))),n+=r*d),n},getValueForPixel:function(t){var e,n,i,a,r=this,o=r.options.ticks.reverse,s=c.log10,l=r._getFirstTickValue(r.minNotZero);if(i=o?(n=r.end,r.start):(n=r.start,r.end),(a=r.isHorizontal()?(e=r.width,o?r.right-t:t-r.left):(e=r.height,o?t-r.top:r.bottom-t))!==n){if(0===n){var u=c.getValueOrDefault(r.options.ticks.fontSize,h.defaults.global.defaultFontSize);a-=u,e-=u,n=l}a*=s(i)-s(n),a/=e,a=Math.pow(10,s(n)+a)}return a}});a.registerScaleType("logarithmic",e,t)}},{33:33,34:34,35:35,46:46}],58:[function(t,e,n){"use strict";var i=t(26),_=t(46),a=t(34),r=t(35);e.exports=function(t){var v=i.global,e={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:r.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function b(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function y(t){var e=t.options.pointLabels,n=_.valueOrDefault(e.fontSize,v.defaultFontSize),i=_.valueOrDefault(e.fontStyle,v.defaultFontStyle),a=_.valueOrDefault(e.fontFamily,v.defaultFontFamily);return{size:n,style:i,family:a,font:_.fontString(n,i,a)}}function p(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||a<t?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function x(t,e,n,i){if(_.isArray(e))for(var a=n.y,r=1.5*i,o=0;o<e.length;++o)t.fillText(e[o],n.x,a),a+=r;else t.fillText(e,n.x,n.y)}function s(t){return _.isNumber(t)?t:0}var n=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,n=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var i=_.min([t.height,t.width]),a=_.valueOrDefault(n.fontSize,v.defaultFontSize);t.drawingArea=e.display?i/2-(a/2+n.backdropPaddingY):i/2},determineDataLimits:function(){var a=this,n=a.chart,r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;_.each(n.data.datasets,function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e);_.each(t.data,function(t,e){var n=+a.getRightValue(t);isNaN(n)||i.data[e].hidden||(r=Math.min(n,r),o=Math.max(n,o))})}}),a.min=r===Number.POSITIVE_INFINITY?0:r,a.max=o===Number.NEGATIVE_INFINITY?0:o,a.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=_.valueOrDefault(t.fontSize,v.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){t.LinearScaleBase.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,n,i,a=y(t),r=Math.min(t.height/2,t.width/2),o={r:t.width,l:0,t:t.height,b:0},s={};t.ctx.font=a.font,t._pointLabelSizes=[];var l,u,d,h=b(t);for(e=0;e<h;e++){i=t.getPointPosition(e,r),l=t.ctx,u=a.size,d=t.pointLabels[e]||"",n=_.isArray(d)?{w:_.longestText(l,l.font,d),h:d.length*u+1.5*(d.length-1)*u}:{w:l.measureText(d).width,h:u},t._pointLabelSizes[e]=n;var c=t.getIndexAngle(e),f=_.toDegrees(c)%360,g=p(f,i.x,n.w,0,180),m=p(f,i.y,n.h,90,270);g.start<o.l&&(o.l=g.start,s.l=c),g.end>o.r&&(o.r=g.end,s.r=c),m.start<o.t&&(o.t=m.start,s.t=c),m.end>o.b&&(o.b=m.end,s.b=c)}t.setReductions(r,o,s)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),a=Math.max(e.r-this.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),o=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=s(i),a=s(a),r=s(r),o=s(o),this.drawingArea=Math.min(Math.round(t-(i+a)/2),Math.round(t-(r+o)/2)),this.setCenterPoint(i,a,r,o)},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-i-a.drawingArea;a.xCenter=Math.round((o+r)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/b(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0)},draw:function(){var r=this,t=r.options,o=t.gridLines,s=t.ticks,l=_.valueOrDefault;if(t.display){var u=r.ctx,d=this.getIndexAngle(0),h=l(s.fontSize,v.defaultFontSize),e=l(s.fontStyle,v.defaultFontStyle),n=l(s.fontFamily,v.defaultFontFamily),c=_.fontString(h,e,n);_.each(r.ticks,function(t,e){if(0<e||s.reverse){var n=r.getDistanceFromCenterForValue(r.ticksAsNumbers[e]);if(o.display&&0!==e&&function(t,e,n,i){var a=t.ctx;if(a.strokeStyle=_.valueAtIndexOrDefault(e.color,i-1),a.lineWidth=_.valueAtIndexOrDefault(e.lineWidth,i-1),t.options.gridLines.circular)a.beginPath(),a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),a.closePath(),a.stroke();else{var r=b(t);if(0===r)return;a.beginPath();var o=t.getPointPosition(0,n);a.moveTo(o.x,o.y);for(var s=1;s<r;s++)o=t.getPointPosition(s,n),a.lineTo(o.x,o.y);a.closePath(),a.stroke()}}(r,o,n,e),s.display){var i=l(s.fontColor,v.defaultFontColor);if(u.font=c,u.save(),u.translate(r.xCenter,r.yCenter),u.rotate(d),s.showLabelBackdrop){var a=u.measureText(t).width;u.fillStyle=s.backdropColor,u.fillRect(-a/2-s.backdropPaddingX,-n-h/2-s.backdropPaddingY,a+2*s.backdropPaddingX,h+2*s.backdropPaddingY)}u.textAlign="center",u.textBaseline="middle",u.fillStyle=i,u.fillText(t,0,-n),u.restore()}}}),(t.angleLines.display||t.pointLabels.display)&&function(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.pointLabels;e.lineWidth=i.lineWidth,e.strokeStyle=i.color;var r,o,s,l,u=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),d=y(t);e.textBaseline="top";for(var h=b(t)-1;0<=h;h--){if(i.display){var c=t.getPointPosition(h,u);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke(),e.closePath()}if(a.display){var f=t.getPointPosition(h,u+5),g=_.valueAtIndexOrDefault(a.fontColor,h,v.defaultFontColor);e.font=d.font,e.fillStyle=g;var m=t.getIndexAngle(h),p=_.toDegrees(m);e.textAlign=0===(l=p)||180===l?"center":l<180?"left":"right",r=p,o=t._pointLabelSizes[h],s=f,90===r||270===r?s.y-=o.h/2:(270<r||r<90)&&(s.y-=o.h),x(e,t.pointLabels[h]||"",f,d.size)}}}(r)}}});a.registerScaleType("radialLinear",n,e)}},{26:26,34:34,35:35,46:46}],59:[function(t,e,n){"use strict";var y=t(6);y="function"==typeof y?y:window.moment;var o=t(26),p=t(46),i=t(33),a=t(34),m=Number.MIN_SAFE_INTEGER||-9007199254740991,v=Number.MAX_SAFE_INTEGER||9007199254740991,x={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},_=Object.keys(x);function b(t,e){return t-e}function k(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}function w(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;0<=o&&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 M(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?y(t,i):(t instanceof y||(t=y(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function S(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,i=M(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function D(t){for(var e=_.indexOf(t)+1,n=_.length;e<n;++e)if(x[_[e]].common)return _[e]}function C(t,e,n,i){var a,r=i.time,o=r.unit||function(t,e,n,i){var a,r,o,s=_.length;for(a=_.indexOf(t);a<s-1;++a)if(o=(r=x[_[a]]).steps?r.steps[r.steps.length-1]:v,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return _[a];return _[s-1]}(r.minUnit,t,e,n),s=D(o),l=p.valueOrDefault(r.stepSize,r.unitStepSize),u="week"===o&&r.isoWeekday,d=i.ticks.major.enabled,h=x[o],c=y(t),f=y(e),g=[];for(l||(l=function(t,e,n,i){var a,r,o,s=e-t,l=x[n],u=l.size,d=l.steps;if(!d)return Math.ceil(s/(i*u));for(a=0,r=d.length;a<r&&(o=d[a],!(Math.ceil(s/(u*o))<=i));++a);return o}(t,e,o,n)),u&&(c=c.isoWeekday(u),f=f.isoWeekday(u)),c=c.startOf(u?"day":o),(f=f.startOf(u?"day":o))<e&&f.add(1,o),a=y(c),d&&s&&!u&&!r.round&&(a.startOf(s),a.add(~~((c-a)/(h.size*l))*l,o));a<f;a.add(l,o))g.push(+a);return g.push(+a),g}e.exports=function(){var t=i.extend({initialize:function(){if(!y)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),i.prototype.initialize.call(this)},update:function(){var t=this.options;return t.time&&t.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),i.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),i.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.chart,l=o.options.time,u=l.unit||"day",d=v,h=m,c=[],f=[],g=[];for(t=0,n=s.data.labels.length;t<n;++t)g.push(S(s.data.labels[t],o));for(t=0,n=(s.data.datasets||[]).length;t<n;++t)if(s.isDatasetVisible(t))if(a=s.data.datasets[t].data,p.isObject(a[0]))for(f[t]=[],e=0,i=a.length;e<i;++e)r=S(a[e],o),c.push(r),f[t][e]=r;else c.push.apply(c,g),f[t]=g.slice(0);else f[t]=[];g.length&&(g=k(g).sort(b),d=Math.min(d,g[0]),h=Math.max(h,g[g.length-1])),c.length&&(c=k(c).sort(b),d=Math.min(d,c[0]),h=Math.max(h,c[c.length-1])),d=S(l.min,o)||d,h=S(l.max,o)||h,d=d===v?+y().startOf(u):d,h=h===m?+y().endOf(u)+1:h,o.min=Math.min(d,h),o.max=Math.max(d+1,h),o._horizontal=o.isHorizontal(),o._table=[],o._timestamps={data:c,datasets:f,labels:g}},buildTicks:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.min,g=c.max,m=c.options,p=m.time,v=[],b=[];switch(m.ticks.source){case"data":v=c._timestamps.data;break;case"labels":v=c._timestamps.labels;break;case"auto":default:v=C(f,g,c.getLabelCapacity(f),m)}for("ticks"===m.bounds&&v.length&&(f=v[0],g=v[v.length-1]),f=S(p.min,c)||f,g=S(p.max,c)||g,t=0,e=v.length;t<e;++t)f<=(n=v[t])&&n<=g&&b.push(n);return c.min=f,c.max=g,c._unit=p.unit||function(t,e,n,i){var a,r,o=y.duration(y(i).diff(y(n)));for(a=_.length-1;a>=_.indexOf(e);a--)if(r=_[a],x[r].common&&o.as(r)>=t.length)return r;return _[e?_.indexOf(e):0]}(b,p.minUnit,c.min,c.max),c._majorUnit=D(c._unit),c._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)e<(s=t[a])&&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}(c._timestamps.data,f,g,m.distribution),c._offsets=(i=c._table,a=b,r=f,o=g,h=d=0,(s=m).offset&&a.length&&(s.time.min||(l=1<a.length?a[1]:o,u=a[0],d=(w(i,"time",l,"pos")-w(i,"time",u,"pos"))/2),s.time.max||(l=a[a.length-1],u=1<a.length?a[a.length-2]:r,h=(w(i,"time",l,"pos")-w(i,"time",u,"pos"))/2)),{left:d,right:h}),c._labelFormat=function(t,e){var n,i,a,r=t.length;for(n=0;n<r;n++){if(0!==(i=M(t[n],e)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===i.second()&&0===i.minute()&&0===i.hour()||(a=!0)}return a?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(c._timestamps.data,p),function(t,e){var n,i,a,r,o=[];for(n=0,i=t.length;n<i;++n)a=t[n],r=!!e&&a===+y(a).startOf(e),o.push({value:a,major:r});return o}(b,c._majorUnit)},getLabelForIndex:function(t,e){var n=this.chart.data,i=this.options.time,a=n.labels&&t<n.labels.length?n.labels[t]:"",r=n.datasets[e].data[t];return p.isObject(r)&&(a=this.getRightValue(r)),i.tooltipFormat?M(a,i).format(i.tooltipFormat):"string"==typeof a?a:M(a,i).format(this._labelFormat)},tickFormatFunction:function(t,e,n,i){var a=this.options,r=t.valueOf(),o=a.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=t.clone().startOf(l).valueOf(),h=a.ticks.major,c=h.enabled&&l&&u&&r===d,f=t.format(i||(c?u:s)),g=c?h:a.ticks.minor,m=p.valueOrDefault(g.callback,g.userCallback);return m?m(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(y(t[e].value),e,t));return i},getPixelForOffset:function(t){var e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=w(e._table,"time",t,"pos");return i+n*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=S(t,this)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=(n?(t-i)/n:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,r=w(e._table,"pos",a,"time");return y(r)},getLabelWidth:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=p.toRadians(e.maxRotation),a=Math.cos(i),r=Math.sin(i);return n*a+p.valueOrDefault(e.fontSize,o.global.defaultFontSize)*r},getLabelCapacity:function(t){var e=this.options.time.displayFormats.millisecond,n=this.tickFormatFunction(y(t),0,[],e),i=this.getLabelWidth(n),a=this.isHorizontal()?this.width:this.height,r=Math.floor(a/i);return 0<r?r:1}});a.registerScaleType("time",t,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{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"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{26:26,33:33,34:34,46:46,6:6}]},{},[7])(7)});
assets/js/Chart.min.js CHANGED
@@ -1,10 +1,10 @@
1
  /*!
2
  * Chart.js
3
  * http://chartjs.org/
4
- * Version: 2.7.2
5
  *
6
  * Copyright 2018 Chart.js Contributors
7
  * Released under the MIT license
8
  * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
9
  */
10
- !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function t(e,i,n){function a(r,s){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(o)return o(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[r]={exports:{}};e[r][0].call(d.exports,function(t){var i=e[r][1][t];return a(i||t)},d,d.exports,t,e,i,n)}return i[r].exports}for(var o="function"==typeof require&&require,r=0;r<n.length;r++)a(n[r]);return a}({1:[function(t,e,i){},{}],2:[function(t,e,i){var n=t(6);function a(t){if(t){var e=[0,0,0],i=1,a=t.match(/^#([a-fA-F0-9]{3})$/i);if(a){a=a[1];for(var o=0;o<e.length;o++)e[o]=parseInt(a[o]+a[o],16)}else if(a=t.match(/^#([a-fA-F0-9]{6})$/i)){a=a[1];for(o=0;o<e.length;o++)e[o]=parseInt(a.slice(2*o,2*o+2),16)}else if(a=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(a[o+1]);i=parseFloat(a[4])}else if(a=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(a[o+1]));i=parseFloat(a[4])}else if(a=t.match(/(\w+)/)){if("transparent"==a[1])return[0,0,0,0];if(!(e=n[a[1]]))return}for(o=0;o<e.length;o++)e[o]=d(e[o],0,255);return i=i||0==i?d(i,0,1):1,e[3]=i,e}}function o(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function r(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(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 u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function d(t,e,i){return Math.min(Math.max(e,t),i)}function c(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:a,getHsla:o,getRgb:function(t){var e=a(t);return e&&e.slice(0,3)},getHsl:function(t){var e=o(t);return e&&e.slice(0,3)},getHwb:r,getAlpha:function(t){var e=a(t);{if(e)return e[3];if(e=o(t))return e[3];if(e=r(t))return e[3]}},hexString:function(t){return"#"+c(t[0])+c(t[1])+c(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return s(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:s,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return u(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:u,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 h[t.slice(0,3)]}};var h={};for(var f in n)h[n[f]]=f},{6:6}],3:[function(t,e,i){var n=t(5),a=t(2),o=function(t){return t instanceof o?t:this instanceof o?(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=a.getRgba(t))?this.setValues("rgb",e):(e=a.getHsla(t))?this.setValues("hsl",e):(e=a.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 o(t);var e};o.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 a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.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=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.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,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,a=void 0===e?.5:e,o=2*a-1,r=i.alpha()-n.alpha(),s=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*a+n.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new o,n=this.values,a=i.values;for(var r in n)n.hasOwnProperty(r)&&(t=n[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 i}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},o.prototype.setValues=function(t,e){var i,a,o=this.values,r=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)o[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)o[t][i]=e[t.charAt(i)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(i=0;i<t.length;i++)o[t][i]=e[u[i]];l=e.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===l?o.alpha:l)),"alpha"===t)return!1;for(i=0;i<t.length;i++)a=Math.max(0,Math.min(s[t][i],o[t][i])),o[t][i]=Math.round(a);for(var d in r)d!==t&&(o[d]=n[t][d](o[t]));return!0},o.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},o.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{2:2,5:5}],4:[function(t,e,i){function n(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(r+s)/2,[e,100*(s==r?0:i<=.5?l/(s+r):l/(2-s-r)),100*i]}function a(t){var e,i,n=t[0],a=t[1],o=t[2],r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return i=0==s?0:l/s*1e3/10,s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function o(t){var e=t[0],i=t[1],a=t[2];return[n(t)[0],100*(1/255*Math.min(e,Math.min(i,a))),100*(a=1-1/255*Math.max(e,Math.max(i,a)))]}function s(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function l(t){return C[JSON.stringify(t)]}function u(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=u(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function c(t){var e,i,n,a,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(n=r+1/3*-(u-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[u]=255*o;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(a){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function f(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function m(t){var e,i,n,a=t[0]/100,o=t[1]/100,r=t[2]/100;return i=-.9689*a+1.8758*o+.0415*r,n=.0557*a+-.204*o+1.057*r,e=(e=3.2406*a+-1.5372*o+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function x(t){var e,i,n,a,o=t[0],r=t[1],s=t[2];return o<=8?a=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function y(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function k(t){return m(x(t))}function M(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return S[t]}e.exports={rgb2hsl:n,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return y(d(t))},hsl2rgb:c,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return o(c(t))},hsl2cmyk:function(t){return s(c(t))},hsl2keyword:function(t){return l(c(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,o=t[2]/100;return e=a*o,[n,100*(e=(e/=(i=(2-a)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return o(h(t))},hsv2cmyk:function(t){return s(h(t))},hsv2keyword:function(t){return l(h(t))},hwb2rgb:f,hwb2hsl:function(t){return n(f(t))},hwb2hsv:function(t){return a(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return n(p(t))},cmyk2hsv:function(t){return a(p(t))},cmyk2hwb:function(t){return o(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:w,keyword2hsl:function(t){return n(w(t))},keyword2hsv:function(t){return a(w(t))},keyword2hwb:function(t){return o(w(t))},keyword2cmyk:function(t){return s(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return u(w(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return y(v(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:M,lch2xyz:function(t){return x(M(t))},lch2rgb:function(t){return k(M(t))}};var S={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]},C={};for(var _ in S)C[JSON.stringify(S[_])]=_},{}],5:[function(t,e,i){var n=t(4),a=function(){return new u};for(var o in n){a[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(o);var r=/(\w+)2(\w+)/.exec(o),s=r[1],l=r[2];(a[s]=a[s]||{})[l]=a[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var a=0;a<i.length;a++)i[a]=Math.round(i[a]);return i}}(o)}var u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=a[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){u.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=a},{4:4}],6:[function(t,e,i){"use strict";e.exports={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]}},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var a=t(49);for(var o in a)a.hasOwnProperty(o)&&n.plugins.register(a[o]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=a.legend._element,n.Title=a.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var e;t.DatasetController.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.chart,r=n.getMeta(),s=n.getDataset(),l=t.custom||{},u=a.options.elements.rectangle;t._xScale=n.getScaleForId(r.xAxisID),t._yScale=n.getScaleForId(r.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:s.label,label:a.data.labels[e],borderSkipped:l.borderSkipped?l.borderSkipped:u.borderSkipped,backgroundColor:l.backgroundColor?l.backgroundColor:o.valueAtIndexOrDefault(s.backgroundColor,e,u.backgroundColor),borderColor:l.borderColor?l.borderColor:o.valueAtIndexOrDefault(s.borderColor,e,u.borderColor),borderWidth:l.borderWidth?l.borderWidth:o.valueAtIndexOrDefault(s.borderWidth,e,u.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,a=t._model,o=n.getValueScale(),r=o.getBasePixel(),s=o.isHorizontal(),l=n._ruler||n.getRuler(),u=n.calculateBarValuePixels(n.index,e),d=n.calculateBarIndexPixels(n.index,e,l);a.horizontal=s,a.base=i?r:u.base,a.x=s?i?r:u.head:d.center,a.y=s?d.center:i?r:u.head,a.height=s?d.size:void 0,a.width=s?void 0:d.size},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())},_getStacks:function(t){var e,i,n=this.chart,a=this.getIndexScale().options.stacked,o=void 0===t?n.data.datasets.length:t+1,r=[];for(e=0;e<o;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===r.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===r.indexOf(i.stack)))&&r.push(i.stack);return r},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this.getIndexScale(),n=this.getStackCount(),a=this.index,r=i.isHorizontal(),s=r?i.left:i.top,l=s+(r?i.width:i.height),u=[];for(t=0,e=this.getMeta().data.length;t<e;++t)u.push(i.getPixelForValue(null,t,a));return{min:o.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,a,o,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,o=e.length;a<o;++a)r=Math.min(r,e[a]-e[a-1]);for(a=0,o=s.length;a<o;++a)n=t.getPixelForTick(a),r=a>0?Math.min(r,n-i):r,i=n;return r}(i,u):-1,pixels:u,start:s,end:l,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,o,r,s,l=this.chart,u=this.getMeta(),d=this.getValueScale(),c=l.data.datasets,h=d.getRightValue(c[t].data[e]),f=d.options.stacked,g=u.stack,p=0;if(f||void 0===f&&void 0!==g)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===g&&n.controller.getValueScaleId()===d.id&&l.isDatasetVisible(i)&&(a=d.getRightValue(c[i].data[e]),(h<0&&a<0||h>=0&&a>0)&&(p+=a));return o=d.getPixelForValue(p),{size:s=((r=d.getPixelForValue(p+h))-o)/2,base:o,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n,a,r,s,l,u,d,c,h,f,g,p,m,v,b,x,y,k=i.scale.options,M="flex"===k.barThickness?(h=e,g=k,m=(f=i).pixels,v=m[h],b=h>0?m[h-1]:null,x=h<m.length-1?m[h+1]:null,y=g.categoryPercentage,null===b&&(b=v-(null===x?f.end-v:x-v)),null===x&&(x=v+v-b),p=v-(v-b)/2*y,{chunk:(x-b)/2*y/f.stackCount,ratio:g.barPercentage,start:p}):(n=e,a=i,u=(r=k).barThickness,d=a.stackCount,c=a.pixels[n],o.isNullOrUndef(u)?(s=a.min*r.categoryPercentage,l=r.barPercentage):(s=u*d,l=1),{chunk:s/d,ratio:l,start:c-s/2}),w=this.getStackIndex(t,this.getMeta().stack),S=M.start+M.chunk*w+M.chunk/2,C=Math.min(o.valueOrDefault(k.maxBarThickness,1/0),M.chunk*M.ratio);return{base:S-C/2,head:S+C/2,center:S,size:C}},draw:function(){var t=this.chart,e=this.getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,r=0;for(o.canvas.clipArea(t.ctx,t.chartArea);r<a;++r)isNaN(e.getRightValue(n.data[r]))||i[r].draw();o.canvas.unclipArea(t.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.hoverBackgroundColor,i,o.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.hoverBorderColor,i,o.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.hoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model,r=this.chart.options.elements.rectangle;a.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.backgroundColor,i,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.borderColor,i,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.borderWidth,i,r.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);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 i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(t){var e=this,i=e.getMeta().data;o.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=t.custom||{},r=n.getScaleForId(a.xAxisID),s=n.getScaleForId(a.yAxisID),l=n._resolveElementOptions(t,e),u=n.getDataset().data[e],d=n.index,c=i?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof u?u:NaN,e,d),h=i?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=r,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,radius:i?0:l.radius,skip:o.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=o.valueOrDefault(i.hoverBackgroundColor,o.getHoverColor(i.backgroundColor)),e.borderColor=o.valueOrDefault(i.hoverBorderColor,o.getHoverColor(i.borderColor)),e.borderWidth=o.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,a,r=this.chart,s=r.data.datasets[this.index],l=t.custom||{},u=r.options.elements.point,d=o.options.resolve,c=s.data[e],h={},f={chart:r,dataIndex:e,dataset:s,datasetIndex:this.index},g=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=g.length;i<n;++i)h[a=g[i]]=d([l[a],s[a],u[a]],f,e);return h.radius=d([l.radius,c?c.r:void 0,s.radius,u.radius],f,e),h}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),r=e.datasets[0],s=a.data[n],l=s&&s.custom||{},u=o.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,n,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,n,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,n,d.borderWidth),hidden:isNaN(r.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return o.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}}),n._set("pie",o.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e=this,i=e.chart,n=i.chartArea,a=i.options,r=a.elements.arc,s=n.right-n.left-r.borderWidth,l=n.bottom-n.top-r.borderWidth,u=Math.min(s,l),d={x:0,y:0},c=e.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var g=a.rotation%(2*Math.PI),p=(g+=2*Math.PI*(g>=Math.PI?-1:g<-Math.PI?1:0))+f,m=Math.cos(g),v=Math.sin(g),b=Math.cos(p),x=Math.sin(p),y=g<=0&&p>=0||g<=2*Math.PI&&2*Math.PI<=p,k=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,M=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,w=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,S=h/100,C=M?-1:Math.min(m*(m<0?1:S),b*(b<0?1:S)),_=w?-1:Math.min(v*(v<0?1:S),x*(x<0?1:S)),D=y?1:Math.max(m*(m>0?1:S),b*(b>0?1:S)),I=k?1:Math.max(v*(v>0?1:S),x*(x>0?1:S)),P=.5*(D-C),A=.5*(I-_);u=Math.min(s/P,l/A),d={x:-.5*(D+C),y:-.5*(I+_)}}i.borderWidth=e.getMaxBorderWidth(c.data),i.outerRadius=Math.max((u-i.borderWidth)/2,0),i.innerRadius=Math.max(h?i.outerRadius/100*h:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=d.x*i.outerRadius,i.offsetY=d.y*i.outerRadius,c.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),o.each(c.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.chart,r=a.chartArea,s=a.options,l=s.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=s.rotation,h=s.rotation,f=n.getDataset(),g=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),p=i&&l.animateScale?0:n.innerRadius,m=i&&l.animateScale?0:n.outerRadius,v=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:u+a.offsetX,y:d+a.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:m,innerRadius:p,label:v(f.label,e,a.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(b.startAngle=0===e?s.rotation:n.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return o.each(i.data,function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,o=t.length,r=0;r<o;r++)e=t[r]._model?t[r]._model.borderWidth:0,n=(i=t[r]._chart?t[r]._chart.config.data.datasets[a].hoverBorderWidth:0)>(n=e>n?e:n)?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);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"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var i,n,a,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=h,l._datasetIndex=r.index,l._children=u,l._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:o.valueOrDefault(f.lineTension,c.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||c.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||c.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||c.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:c.fill,steppedLine:a.steppedLine?a.steppedLine:o.valueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:o.valueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode)},l.pivot()),i=0,n=u.length;i<n;++i)r.updateElement(u[i],i,t);for(g&&0!==l._model.tension&&r.updateBezierControlPoints(),i=0,n=u.length;i<n;++i)u[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),a=t.custom||{};return a.backgroundColor?i=a.backgroundColor:n.pointBackgroundColor?i=o.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),a=t.custom||{};return a.borderColor?i=a.borderColor:n.pointBorderColor?i=o.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(n.pointBorderWidth)||o.isArray(n.pointBorderWidth)?i=o.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=a.borderWidth,i},updateElement:function(t,e,i){var n,a,r=this,s=r.getMeta(),l=t.custom||{},u=r.getDataset(),d=r.index,c=u.data[e],h=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),g=r.chart.options.elements.point;void 0!==u.radius&&void 0===u.pointRadius&&(u.pointRadius=u.radius),void 0!==u.hitRadius&&void 0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),n=f.getPixelForValue("object"==typeof c?c:NaN,e,d),a=i?h.getBasePixel():r.calculatePointY(c,e,d),t._xScale=f,t._yScale=h,t._datasetIndex=d,t._index=e,t._model={x:n,y:a,skip:l.skip||isNaN(n)||isNaN(a),radius:l.radius||o.valueAtIndexOrDefault(u.pointRadius,e,g.radius),pointStyle:l.pointStyle||o.valueAtIndexOrDefault(u.pointStyle,e,g.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||o.valueAtIndexOrDefault(u.pointHitRadius,e,g.hitRadius)}},calculatePointY:function(t,e,i){var n,a,o,r=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),u=0,d=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=r.data.datasets[n],"line"===(o=r.getDatasetMeta(n)).type&&o.yAxisID===l.id&&r.isDatasetVisible(n)){var c=Number(l.getRightValue(a.data[e]));c<0?d+=c||0:u+=c||0}var h=Number(l.getRightValue(t));return h<0?l.getPixelForValue(d+h):l.getPixelForValue(u+h)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),r=this.chart.chartArea,s=a.data||[];function l(t,e,i){return Math.max(Math.min(t,i),e)}if(a.dataset._model.spanGaps&&(s=s.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)o.splineCurveMonotone(s);else for(t=0,e=s.length;t<e;++t)i=s[t]._model,n=o.splineCurve(o.previousItem(s,t)._model,i,o.nextItem(s,t)._model,a.dataset._model.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=s.length;t<e;++t)(i=s[t]._model).controlPointPreviousX=l(i.controlPointPreviousX,r.left,r.right),i.controlPointPreviousY=l(i.controlPointPreviousY,r.top,r.bottom),i.controlPointNextX=l(i.controlPointNextX,r.left,r.right),i.controlPointNextY=l(i.controlPointNextY,r.top,r.bottom)},draw:function(){var t=this.chart,i=this.getMeta(),n=i.data||[],a=t.chartArea,r=n.length,s=0;for(o.canvas.clipArea(t.ctx,a),e(this.getDataset(),t.options)&&i.dataset.draw(),o.canvas.unclipArea(t.ctx);s<r;++s)n[s].draw(a)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.radius=n.hoverRadius||o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor||o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor||o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth||o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},r=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),r.radius=a.radius||o.valueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,n),r.borderColor=e.getPointBorderColor(t,n),r.borderWidth=e.getPointBorderWidth(t,n)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);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=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),r=e.datasets[0],s=a.data[n].custom||{},l=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:i,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,n,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,n,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,n,u.borderWidth),hidden:isNaN(r.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,update:function(t){var e=this,i=e.chart,n=i.chartArea,a=e.getMeta(),r=i.options,s=r.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-s.borderWidth/2)/2,0),i.innerRadius=Math.max(r.cutoutPercentage?i.outerRadius/100*r.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),e.outerRadius=i.outerRadius-i.radiusLength*e.index,e.innerRadius=e.outerRadius-i.radiusLength,a.count=e.countVisibleElements(),o.each(a.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){for(var n=this,a=n.chart,r=n.getDataset(),s=a.options,l=s.animation,u=a.scale,d=a.data.labels,c=n.calculateCircumference(r.data[e]),h=u.xCenter,f=u.yCenter,g=0,p=n.getMeta(),m=0;m<e;++m)isNaN(r.data[m])||p.data[m].hidden||++g;var v=s.startAngle,b=t.hidden?0:u.getDistanceFromCenterForValue(r.data[e]),x=v+c*g,y=x+(t.hidden?0:c),k=l.animateScale?0:u.getDistanceFromCenterForValue(r.data[e]);o.extend(t,{_datasetIndex:n.index,_index:e,_scale:u,_model:{x:h,y:f,innerRadius:0,outerRadius:i?k:b,startAngle:i&&l.animateRotate?v:x,endAngle:i&&l.animateRotate?v:y,label:o.valueAtIndexOrDefault(d,e,d[e])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return o.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:o.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,a=i.data,r=n.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,u=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),o.extend(i.dataset,{_datasetIndex:e.index,_scale:u,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:o.valueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),o.each(a,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,a=t.custom||{},r=n.getDataset(),s=n.chart.scale,l=n.chart.options.elements.point,u=s.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),o.extend(t,{_datasetIndex:n.index,_index:e,_scale:s,_model:{x:i?s.xCenter:u.x,y:i?s.yCenter:u.y,tension:a.tension?a.tension:o.valueOrDefault(r.lineTension,n.chart.options.elements.line.tension),radius:a.radius?a.radius:o.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:o.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:a.borderColor?a.borderColor:o.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:o.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:o.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:o.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(i,n){var a=i._model,r=o.splineCurve(o.previousItem(e.data,n,!0)._model,a,o.nextItem(e.data,n,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model;a.radius=i.hoverRadius?i.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,o.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,n,o.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=i.radius?i.radius:o.valueAtIndexOrDefault(e.pointRadius,n,r.radius),a.backgroundColor=i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,n,r.backgroundColor),a.borderColor=i.borderColor?i.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,n,r.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,n,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a,o,r=this.animations;for(e.chart=t,n||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=o.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=o.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,a=0;a<n.length;)i=(e=n[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),o.callback(e.render,[i,e],i),o.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(o.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),a=t(45),o=t(28),r=t(30),s=t(48),l=t(31);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(e,i){var o,r,l=this;(r=(o=(o=i)||{}).data=o.data||{}).datasets=r.datasets||[],r.labels=r.labels||[],o.options=a.configMerge(n.global,n[o.type],o.options||{}),i=o;var u=s.acquireContext(e,i),d=u&&u.canvas,c=d&&d.height,h=d&&d.width;l.id=a.uid(),l.ctx=u,l.canvas=d,l.config=i,l.width=h,l.height=c,l.aspectRatio=c?h/c:null,l.options=i.options,l._bufferedRender=!1,l.chart=l,l.controller=l,t.instances[l.id]=l,Object.defineProperty(l,"data",{get:function(){return l.config.data},set:function(t){l.config.data=t}}),u&&d?(l.initialize(),l.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,o=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(n))),s=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(n)));if((e.width!==r||e.height!==s)&&(n.width=e.width=r,n.height=e.height=s,n.style.width=r+"px",n.style.height=s+"px",a.retinaScale(e,i.devicePixelRatio),!t)){var u={width:r,height:s};l.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var i=this,n=i.options,o=i.scales||{},r=[],s=Object.keys(o).reduce(function(t,e){return t[e]=!1,t},{});n.scales&&(r=r.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&r.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(r,function(n){var r=n.options,l=r.id,u=a.valueOrDefault(r.type,n.dtype);e(r.position)!==e(n.dposition)&&(r.position=n.dposition),s[l]=!0;var d=null;if(l in o&&o[l].type===u)(d=o[l]).options=r,d.ctx=i.ctx,d.chart=i;else{var c=t.scaleService.getScaleConstructor(u);if(!c)return;d=new c({id:l,type:u,options:r,ctx:i.ctx,chart:i}),o[d.id]=d}d.mergeTicksOptions(),n.isDefault&&(i.scale=d)}),a.each(s,function(t,e){t||delete o[e]}),i.scales=o,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return a.each(e.data.datasets,function(a,o){var r=e.getDatasetMeta(o),s=a.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(o),r=e.getDatasetMeta(o)),r.type=s,i.push(r.type),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{var l=t.controllers[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(e,o),n.push(r.controller)}},e),n},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var i,n,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),n=(i=o).options,a.each(i.scales,function(t){r.removeBox(i,t)}),n=a.configMerge(t.defaults.global,t.defaults[i.config.type],n),i.options=i.config.options=n,i.ensureScalesHaveIDs(),i.buildOrUpdateScales(),i.tooltip._options=n.tooltips,i.tooltip.initialize(),l._invalidate(o),!1!==l.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var s=o.buildOrUpdateControllers();a.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&a.each(s,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],l.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(r.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);l.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==l.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),l.notify(this,"afterDatasetUpdate",[i]))},render:function(e){var i=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=e.duration,o=e.lazy;if(!1!==l.notify(i,"beforeRender")){var r=i.options.animation,s=function(t){l.notify(i,"afterRender"),a.callback(r&&r.onComplete,[t],i)};if(r&&(void 0!==n&&0!==n||void 0===n&&0!==r.duration)){var u=new t.Animation({numSteps:(n||r.duration)/16.66,easing:e.easing||r.easing,render:function(t,e){var i=a.easing.effects[e.easing],n=e.currentStep,o=n/e.numSteps;t.draw(i(o),o,n)},onAnimationProgress:r.onProgress,onAnimationComplete:s});t.animationService.addAnimation(i,u,n,o)}else i.draw(),s(new t.Animation({numSteps:0,chart:i}));return i}},draw:function(t){var e=this;e.clear(),a.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(a.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==l.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);l.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==l.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),l.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==l.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),l.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=o.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++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,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var e,i,n=this,o=n.canvas;for(n.stop(),e=0,i=n.data.datasets.length;e<i;++e)n.destroyDatasetMeta(e);o&&(n.unbindEvents(),a.canvas.clear(n),s.releaseContext(n.ctx),n.canvas=null,n.ctx=null),l.notify(n,"destroy"),delete t.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};a.each(t.options.events,function(n){s.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},s.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,a.each(e,function(e,i){s.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,a,o,r=i?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),l.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},o=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,o.mode,o),a.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,o.mode,!1),i.active.length&&o.mode&&i.updateHoverStyle(i.active,o.mode,!0),e=!a.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),t.Controller=t}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=["push","pop","shift","splice","unshift"];function i(t,i){var n=t._chartjs;if(n){var a=n.listeners,o=a.indexOf(i);-1!==o&&a.splice(o,1),a.length>0||(e.forEach(function(e){delete t[e]}),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(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,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.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,a,o=this,r=o.getDataset(),s=r.data||(r.data=[]);o._data!==s&&(o._data&&i(o._data,o),a=o,(t=s)._chartjs?t._chartjs.listeners.push(a):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[a]}}),e.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),a=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),o=a.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),o}})})),o._data=s),o.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],a=t._index,o=t.custom||{},r=n.valueAtIndexOrDefault,s=t._model;s.backgroundColor=o.backgroundColor?o.backgroundColor:r(i.backgroundColor,a,e.backgroundColor),s.borderColor=o.borderColor?o.borderColor:r(i.borderColor,a,e.borderColor),s.borderWidth=o.borderWidth?o.borderWidth:r(i.borderWidth,a,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,a=t.custom||{},o=n.valueAtIndexOrDefault,r=n.getHoverColor,s=t._model;s.backgroundColor=a.hoverBackgroundColor?a.hoverBackgroundColor:o(e.hoverBackgroundColor,i,r(s.backgroundColor)),s.borderColor=a.hoverBorderColor?a.hoverBorderColor:o(e.hoverBorderColor,i,r(s.borderColor)),s.borderWidth=a.hoverBorderWidth?a.hoverBorderWidth:o(e.hoverBorderWidth,i,s.borderWidth)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},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)}}),t.DatasetController.extend=n.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";var n=t(3),a=t(45);var o=function(t){a.extend(this,t),this.initialize.apply(this,arguments)};a.extend(o.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=a.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,a=e._start,o=e._view;return i&&1!==t?(o||(o=e._view={}),a||(a=e._start={}),function(t,e,i,a){var o,r,s,l,u,d,c,h,f,g=Object.keys(i);for(o=0,r=g.length;o<r;++o)if(d=i[s=g[o]],e.hasOwnProperty(s)||(e[s]=d),(l=e[s])!==d&&"_"!==s[0]){if(t.hasOwnProperty(s)||(t[s]=l),(c=typeof d)==typeof(u=t[s]))if("string"===c){if((h=n(u)).valid&&(f=n(d)).valid){e[s]=f.mix(h,a).rgbString();continue}}else if("number"===c&&isFinite(u)&&isFinite(d)){e[s]=u+(d-u)*a;continue}e[s]=d}}(a,o,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return a.isNumber(this._model.x)&&a.isNumber(this._model.y)}}),o.extend=a.inherits,e.exports=o},{3:3,45:45}],27:[function(t,e,i){"use strict";var n=t(3),a=t(25),o=t(45);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return null!=t&&"none"!==t}function r(t,n,a){var o=document.defaultView,r=t.parentNode,s=o.getComputedStyle(t)[n],l=o.getComputedStyle(r)[n],u=i(s),d=i(l),c=Number.POSITIVE_INFINITY;return u||d?Math.min(u?e(s,t,a):c,d?e(l,r,a):c):"none"}o.configMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,a){var r=i[e]||{},s=n[e];"scales"===e?i[e]=o.scaleMerge(r,s):"scale"===e?i[e]=o.merge(r,[t.scaleService.getScaleDefaults(s.type),s]):o._merger(e,i,n,a)}})},o.scaleMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,a){if("xAxes"===e||"yAxes"===e){var r,s,l,u=n[e].length;for(i[e]||(i[e]=[]),r=0;r<u;++r)l=n[e][r],s=o.valueOrDefault(l.type,"xAxes"===e?"category":"linear"),r>=i[e].length&&i[e].push({}),!i[e][r].type||l.type&&l.type!==i[e][r].type?o.merge(i[e][r],[t.scaleService.getScaleDefaults(s),l]):o.merge(i[e][r],l)}else o._merger(e,i,n,a)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},o.findNextWhere=function(t,e,i){o.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},o.findPreviousWhere=function(t,e,i){o.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var a=t[n];if(e(a))return a}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)<i},o.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=s/(s+l),d=l/(s+l),c=n*(u=isNaN(u)?0:u),h=n*(d=isNaN(d)?0:d);return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,a,r,s,l,u,d,c=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=c.length;for(e=0;e<h;++e)if(!(n=c[e]).model.skip){if(i=e>0?c[e-1]:null,(a=e<h-1?c[e+1]:null)&&!a.model.skip){var f=a.model.x-n.model.x;n.deltaK=0!==f?(a.model.y-n.model.y)/f:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<h-1;++e)n=c[e],a=c[e+1],n.model.skip||a.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(r=n.mK/n.deltaK,s=a.mK/n.deltaK,(u=Math.pow(r,2)+Math.pow(s,2))<=9||(l=3/Math.sqrt(u),n.mK=r*l*n.deltaK,a.mK=s*l*n.deltaK)));for(e=0;e<h;++e)(n=c[e]).model.skip||(i=e>0?c[e-1]:null,a=e<h-1?c[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),a&&!a.model.skip&&(d=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},o.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var i=Math.floor(o.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},o.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)},o.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=a.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=a.clientX,n=a.clientY);var u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=s.right-s.left-u-c,g=s.bottom-s.top-d-h;return{x:i=Math.round((i-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:n=Math.round((n-s.top-d)/g*r.height/e.currentDevicePixelRatio)}},o.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(o.getStyle(e,"padding-left"),10),n=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-i-n,r=o.getConstraintWidth(t);return isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(o.getStyle(e,"padding-top"),10),n=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-i-n,r=o.getConstraintHeight(t);return isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,o=t.width;n.height=a*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=o+"px")}},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;o.each(i,function(e){null!=e&&!0!==o.isArray(e)?s=o.measureText(t,a,r,s,e):o.isArray(e)&&o.each(e,function(e){null==e||o.isArray(e)||(s=o.measureText(t,a,r,s,e))})});var l=r.length/2;if(l>i.length){for(var u=0;u<l;u++)delete a[r[u]];r.splice(0,l)}return s},o.measureText=function(t,e,i,n,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,i.push(a)),o>n&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=n?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,i){"use strict";var n=t(45);function a(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function o(t,e){var i,n,a,o,r;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(a=0,r=(i=t.getDatasetMeta(n)).data.length;a<r;++a){var s=i.data[a];s._view.skip||e(s)}}function r(t,e){var i=[];return o(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function s(t,e,i,n){var a=Number.POSITIVE_INFINITY,r=[];return o(t,function(t){if(!i||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=n(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}}),r}function l(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var a=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function u(t,e,i){var n=a(e,t);i.axis=i.axis||"x";var o=l(i.axis),u=i.intersect?r(t,n):s(t,n,!1,o),d=[];return u.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[u[0]._index];n&&!n._view.skip&&d.push(n)}}),d):[]}e.exports={modes:{single:function(t,e){var i=a(e,t),n=[];return o(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:u,index:u,dataset:function(t,e,i){var n=a(e,t);i.axis=i.axis||"xy";var o=l(i.axis),u=i.intersect?r(t,n):s(t,n,!1,o);return u.length>0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return u(t,e,{intersect:!1})},point:function(t,e){return r(t,a(e,t))},nearest:function(t,e,i){var n=a(e,t);i.axis=i.axis||"xy";var o=l(i.axis),r=s(t,n,i.intersect,o);return r.length>1&&r.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),r.slice(0,1)},x:function(t,e,i){var n=a(e,t),r=[],s=!1;return o(t,function(t){t.inXRange(n.x)&&r.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(r=[]),r},y:function(t,e,i){var n=a(e,t),r=[],s=!1;return o(t,function(t){t.inYRange(n.y)&&r.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,i){"use strict";var n=t(45);function a(t,e){return n.where(t,function(t){return t.position===e})}function o(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)n=a[r],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var r=t.options.layout||{},s=n.options.toPadding(r.padding),l=s.left,u=s.right,d=s.top,c=s.bottom,h=a(t.boxes,"left"),f=a(t.boxes,"right"),g=a(t.boxes,"top"),p=a(t.boxes,"bottom"),m=a(t.boxes,"chartArea");o(h,!0),o(f,!1),o(g,!0),o(p,!1);var v=e-l-u,b=i-d-c,x=b/2,y=(e-v/2)/(h.length+f.length),k=(i-x)/(g.length+p.length),M=v,w=b,S=[];n.each(h.concat(f,g,p),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?v:M,k),w-=e.height):(e=t.update(y,w),M-=e.width),S.push({horizontal:i,minSize:e,box:t})});var C=0,_=0,D=0,I=0;n.each(g.concat(p),function(t){if(t.getPadding){var e=t.getPadding();C=Math.max(C,e.left),_=Math.max(_,e.right)}}),n.each(h.concat(f),function(t){if(t.getPadding){var e=t.getPadding();D=Math.max(D,e.top),I=Math.max(I,e.bottom)}});var P=l,A=u,T=d,F=c;n.each(h.concat(f),N),n.each(h,function(t){P+=t.width}),n.each(f,function(t){A+=t.width}),n.each(g.concat(p),N),n.each(g,function(t){T+=t.height}),n.each(p,function(t){F+=t.height}),n.each(h.concat(f),function(t){var e=n.findNextWhere(S,function(e){return e.box===t}),i={left:0,right:0,top:T,bottom:F};e&&t.update(e.minSize.width,w,i)}),P=l,A=u,T=d,F=c,n.each(h,function(t){P+=t.width}),n.each(f,function(t){A+=t.width}),n.each(g,function(t){T+=t.height}),n.each(p,function(t){F+=t.height});var O=Math.max(C-P,0);P+=O,A+=Math.max(_-A,0);var R=Math.max(D-T,0);T+=R,F+=Math.max(I-F,0);var L=i-T-F,z=e-P-A;z===M&&L===w||(n.each(h,function(t){t.height=L}),n.each(f,function(t){t.height=L}),n.each(g,function(t){t.fullWidth||(t.width=z)}),n.each(p,function(t){t.fullWidth||(t.width=z)}),w=L,M=z);var B=l+O,W=d+R;n.each(h.concat(g),V),B+=M,W+=w,n.each(f,V),n.each(p,V),t.chartArea={left:P,top:T,right:P+M,bottom:T+w},n.each(m,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(M,w)})}function N(t){var e=n.findNextWhere(S,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(P,C),right:Math.max(A,_),top:0,bottom:0};t.update(t.fullWidth?v:M,b/2,i)}else t.update(e.minSize.width,w)}function V(t){t.isHorizontal()?(t.left=t.fullWidth?l:P,t.right=t.fullWidth?e-u:P+M,t.top=W,t.bottom=W+t.height,W=t.bottom):(t.left=B,t.right=B+t.width,t.top=T,t.bottom=T+w,B=t.right)}}}},{45:45}],31:[function(t,e,i){"use strict";var n=t(25),a=t(45);n._set("global",{plugins:{}}),e.exports={_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 i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,o,r,s,l=this.descriptors(t),u=l.length;for(n=0;n<u;++n)if("function"==typeof(s=(o=(a=l[n]).plugin)[e])&&((r=[t].concat(i||[])).push(a.options),!1===s.apply(o,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],o=[],r=t&&t.config||{},s=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,r=s[e];!1!==r&&(!0===r&&(r=a.clone(n.global.plugins[e])),i.push(t),o.push({plugin:t,options:r||{}}))}}),e.descriptors=o,e.id=this._cacheId,o},_invalidate:function(t){delete t.$plugins}}},{25:25,45:45}],32:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45),r=t(34);function s(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function l(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}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:"",lineHeight:1.2,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:r.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,i){return o.isArray(e)?o.longestText(t,i,e):t.measureText(e).width}function i(t){var e=o.valueOrDefault,i=n.global,a=e(t.fontSize,i.defaultFontSize),r=e(t.fontStyle,i.defaultFontStyle),s=e(t.fontFamily,i.defaultFontFamily);return{size:a,style:r,family:s,font:o.fontString(a,r,s)}}function r(t){return o.options.toLineHeight(o.valueOrDefault(t.lineHeight,1.2),o.valueOrDefault(t.fontSize,n.global.defaultFontSize))}t.Scale=a.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){o.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,r,s,l,u,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=o.extend({left:0,right:0,top:0,bottom:0},i),d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),l=d.buildTicks()||[],d.afterBuildTicks(),d.beforeTickToLabelConversion(),r=d.convertTicksToLabels(l)||d.ticks,d.afterTickToLabelConversion(),d.ticks=r,n=0,a=r.length;n<a;++n)s=r[n],(u=l[n])?u.label=s:l.push(u={label:s,major:!1});return d._ticks=l,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){o.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){o.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(){o.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){o.callback(this.options.beforeDataLimits,[this])},determineDataLimits:o.noop,afterDataLimits:function(){o.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){o.callback(this.options.beforeBuildTicks,[this])},buildTicks:o.noop,afterBuildTicks:function(){o.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){o.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){o.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){o.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,a=s(t._ticks),r=i(n);e.font=r.font;var l=n.minRotation||0;if(a.length&&t.options.display&&t.isHorizontal())for(var u,d=o.longestText(e,r.font,a,t.longestTextCache),c=d,h=t.getPixelForTick(1)-t.getPixelForTick(0)-6;c>h&&l<n.maxRotation;){var f=o.toRadians(l);if(u=Math.cos(f),Math.sin(f)*d>t.maxHeight){l--;break}l++,c=u*d}t.labelRotation=l},afterCalculateTickRotation:function(){o.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){o.callback(this.options.beforeFit,[this])},fit:function(){var t=this,n=t.minSize={width:0,height:0},a=s(t._ticks),l=t.options,u=l.ticks,d=l.scaleLabel,c=l.gridLines,h=l.display,f=t.isHorizontal(),g=i(u),p=l.gridLines.tickMarkLength;if(n.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&c.drawTicks?p:0,n.height=f?h&&c.drawTicks?p:0:t.maxHeight,d.display&&h){var m=r(d)+o.options.toPadding(d.padding).height;f?n.height+=m:n.width+=m}if(u.display&&h){var v=o.longestText(t.ctx,g.font,a,t.longestTextCache),b=o.numberOfLabelLines(a),x=.5*g.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var k=o.toRadians(t.labelRotation),M=Math.cos(k),w=Math.sin(k)*v+g.size*b+x*(b-1)+x;n.height=Math.min(t.maxHeight,n.height+w+y),t.ctx.font=g.font;var S=e(t.ctx,a[0],g.font),C=e(t.ctx,a[a.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?M*S+3:M*x+3,t.paddingRight="bottom"===l.position?M*x+3:M*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else u.mirror?v=0:v+=y+x,n.width=Math.min(t.maxWidth,n.width+v),t.paddingTop=g.size/2,t.paddingBottom=g.size/2}t.handleMargins(),t.width=n.width,t.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){o.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(o.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:o.noop,getPixelForValue:o.noop,getValueForPixel:o.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var o=e.left+Math.round(a);return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},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,i,n,a,r=this,s=r.isHorizontal(),l=r.options.ticks.minor,u=t.length,d=o.toRadians(r.labelRotation),c=Math.cos(d),h=r.longestLabelWidth*c,f=[];for(l.maxTicksLimit&&(a=l.maxTicksLimit),s&&(e=!1,(h+l.autoSkipPadding)*u>r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(r.width-(r.paddingLeft+r.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),i=0;i<u;i++)n=t[i],(e>1&&i%e>0||i%e==0&&i+e>=u)&&i!==u-1&&delete n.label,f.push(n);return f},draw:function(t){var e=this,a=e.options;if(a.display){var s=e.ctx,u=n.global,d=a.ticks.minor,c=a.ticks.major||d,h=a.gridLines,f=a.scaleLabel,g=0!==e.labelRotation,p=e.isHorizontal(),m=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=o.valueOrDefault(d.fontColor,u.defaultFontColor),b=i(d),x=o.valueOrDefault(c.fontColor,u.defaultFontColor),y=i(c),k=h.drawTicks?h.tickMarkLength:0,M=o.valueOrDefault(f.fontColor,u.defaultFontColor),w=i(f),S=o.options.toPadding(f.padding),C=o.toRadians(e.labelRotation),_=[],D=e.options.gridLines.lineWidth,I="right"===a.position?e.right:e.right-D-k,P="right"===a.position?e.right+k:e.right,A="bottom"===a.position?e.top+D:e.bottom-k-D,T="bottom"===a.position?e.top+D+k:e.bottom+D;if(o.each(m,function(i,n){if(!o.isNullOrUndef(i.label)){var r,s,c,f,v,b,x,y,M,w,S,F,O,R,L=i.label;n===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,s=h.zeroLineColor,c=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=o.valueAtIndexOrDefault(h.lineWidth,n),s=o.valueAtIndexOrDefault(h.color,n),c=o.valueOrDefault(h.borderDash,u.borderDash),f=o.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var z="middle",B="middle",W=d.padding;if(p){var N=k+W;"bottom"===a.position?(B=g?"middle":"top",z=g?"right":"center",R=e.top+N):(B=g?"middle":"bottom",z=g?"left":"center",R=e.bottom-N);var V=l(e,n,h.offsetGridLines&&m.length>1);V<e.left&&(s="rgba(0,0,0,0)"),V+=o.aliasPixel(r),O=e.getPixelForTick(n)+d.labelOffset,v=x=M=S=V,b=A,y=T,w=t.top,F=t.bottom+D}else{var E,H="left"===a.position;d.mirror?(z=H?"left":"right",E=W):(z=H?"right":"left",E=k+W),O=H?e.right-E:e.left+E;var j=l(e,n,h.offsetGridLines&&m.length>1);j<e.top&&(s="rgba(0,0,0,0)"),j+=o.aliasPixel(r),R=e.getPixelForTick(n)+d.labelOffset,v=I,x=P,M=t.left,S=t.right+D,b=y=w=F=j}_.push({tx1:v,ty1:b,tx2:x,ty2:y,x1:M,y1:w,x2:S,y2:F,labelX:O,labelY:R,glWidth:r,glColor:s,glBorderDash:c,glBorderDashOffset:f,rotation:-1*C,label:L,major:i.major,textBaseline:B,textAlign:z})}}),o.each(_,function(t){if(h.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),h.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),d.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=t.major?y.font:b.font,s.fillStyle=t.major?x:v,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(o.isArray(i))for(var n=i.length,a=1.5*b.size,r=e.isHorizontal()?0:-a*(n-1)/2,l=0;l<n;++l)s.fillText(""+i[l],0,r),r+=a;else s.fillText(i,0,0);s.restore()}}),f.display){var F,O,R=0,L=r(f)/2;if(p)F=e.left+(e.right-e.left)/2,O="bottom"===a.position?e.bottom-L-S.bottom:e.top+L+S.top;else{var z="left"===a.position;F=z?e.left+L+S.top:e.right-L-S.top,O=e.top+(e.bottom-e.top)/2,R=z?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(F,O),s.rotate(R),s.textAlign="center",s.textBaseline="middle",s.fillStyle=M,s.font=w.font,s.fillText(f.labelString,0,0),s.restore()}if(h.drawBorder){s.lineWidth=o.valueAtIndexOrDefault(h.lineWidth,0),s.strokeStyle=o.valueAtIndexOrDefault(h.color,0);var B=e.left,W=e.right+D,N=e.top,V=e.bottom+D,E=o.aliasPixel(s.lineWidth);p?(N=V="top"===a.position?e.bottom:e.top,N+=E,V+=E):(B=W="left"===a.position?e.right:e.left,B+=E,W+=E),s.beginPath(),s.moveTo(B,N),s.lineTo(W,V),s.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),a=t(45),o=t(30);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=a.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=a.extend(this.defaults[t],e))},addScalesToLayout:function(t){a.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,o.addBox(t,e)})}}}},{25:25,30:30,45:45}],34:[function(t,e,i){"use strict";var n=t(45);e.exports={formatters:{values:function(t){return n.isArray(t)?t:""+t},linear:function(t,e,i){var a=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=n.log10(Math.abs(a)),r="";if(0!==t){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,i){var a=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45);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:o.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(t.length>0){var o=t[0];o.xLabel?i=o.xLabel:a>0&&o.index<a&&(i=n[o.index])}return i},afterTitle:o.noop,beforeBody:o.noop,beforeLabel:o.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:o.noop,afterBody:o.noop,beforeFooter:o.noop,footer:o.noop,afterFooter:o.noop}}}),e.exports=function(t){function e(t,e){var i=o.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(o.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function r(t){var e=n.global,i=o.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(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}}t.Tooltip=a.extend({initialize:function(){this._model=r(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),a=t.afterTitle.apply(this,arguments),o=[];return o=i(o=i(o=i(o,e),n),a)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,a=n._options.callbacks,r=[];return o.each(t,function(t){var o={before:[],lines:[],after:[]};i(o.before,a.beforeLabel.call(n,t,e)),i(o.lines,a.label.call(n,t,e)),i(o.after,a.afterLabel.call(n,t,e)),r.push(o)}),r},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),a=t.afterFooter.apply(this,arguments),o=[];return o=i(o=i(o=i(o,e),n),a)},update:function(e){var i,n,a,s,l,u,d,c,h,f,g,p,m,v,b,x,y,k,M,w,S=this,C=S._options,_=S._model,D=S._model=r(C),I=S._active,P=S._data,A={xAlign:_.xAlign,yAlign:_.yAlign},T={x:_.x,y:_.y},F={width:_.width,height:_.height},O={x:_.caretX,y:_.caretY};if(I.length){D.opacity=1;var R=[],L=[];O=t.Tooltip.positioners[C.position].call(S,I,S._eventPosition);var z=[];for(i=0,n=I.length;i<n;++i)z.push((x=I[i],y=void 0,k=void 0,void 0,void 0,y=x._xScale,k=x._yScale||x._scale,M=x._index,w=x._datasetIndex,{xLabel:y?y.getLabelForIndex(M,w):"",yLabel:k?k.getLabelForIndex(M,w):"",index:M,datasetIndex:w,x:x._model.x,y:x._model.y}));C.filter&&(z=z.filter(function(t){return C.filter(t,P)})),C.itemSort&&(z=z.sort(function(t,e){return C.itemSort(t,e,P)})),o.each(z,function(t){R.push(C.callbacks.labelColor.call(S,t,S._chart)),L.push(C.callbacks.labelTextColor.call(S,t,S._chart))}),D.title=S.getTitle(z,P),D.beforeBody=S.getBeforeBody(z,P),D.body=S.getBody(z,P),D.afterBody=S.getAfterBody(z,P),D.footer=S.getFooter(z,P),D.x=Math.round(O.x),D.y=Math.round(O.y),D.caretPadding=C.caretPadding,D.labelColors=R,D.labelTextColors=L,D.dataPoints=z,A=function(t,e){var i,n,a,o,r,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",c="center";s.y<e.height?c="top":s.y>l.height-e.height&&(c="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===c?(i=function(t){return t<=h},n=function(t){return t>h}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},i(s.x)?(d="left",a(s.x)&&(d="center",c=r(s.y))):n(s.x)&&(d="right",o(s.x)&&(d="center",c=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:c}}(this,F=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,r=e.body,s=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;n+=l*d,n+=l?(l-1)*e.titleSpacing:0,n+=l?e.titleMarginBottom:0,n+=s*c,n+=s?(s-1)*e.bodySpacing:0,n+=u?e.footerMarginTop:0,n+=u*h,n+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){a=Math.max(a,i.measureText(t).width+f)};return i.font=o.fontString(d,e._titleFontStyle,e._titleFontFamily),o.each(e.title,g),i.font=o.fontString(c,e._bodyFontStyle,e._bodyFontFamily),o.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,o.each(r,function(t){o.each(t.before,g),o.each(t.lines,g),o.each(t.after,g)}),f=0,i.font=o.fontString(h,e._footerFontStyle,e._footerFontFamily),o.each(e.footer,g),{width:a+=2*e.xPadding,height:n}}(this,D)),a=D,s=F,l=A,u=S._chart,d=a.x,c=a.y,h=a.caretSize,f=a.caretPadding,g=a.cornerRadius,p=l.xAlign,m=l.yAlign,v=h+f,b=g+f,"right"===p?d-=s.width:"center"===p&&((d-=s.width/2)+s.width>u.width&&(d=u.width-s.width),d<0&&(d=0)),"top"===m?c+=v:c-="bottom"===m?s.height+v:s.height/2,"center"===m?"left"===p?d+=v:"right"===p&&(d-=v):"left"===p?d-=b:"right"===p&&(d+=b),T={x:d,y:c}}else D.opacity=0;return D.xAlign=A.xAlign,D.yAlign=A.yAlign,D.x=T.x,D.y=T.y,D.width=F.width,D.height=F.height,D.caretX=O.x,D.caretY=O.y,S._model=D,e&&C.custom&&C.custom.call(S,D),S},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,o,r,s,l,u=i.caretSize,d=i.cornerRadius,c=i.xAlign,h=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===h)s=g+m/2,"left"===c?(a=(n=f)-u,o=n,r=s+u,l=s-u):(a=(n=f+p)+u,o=n,r=s-u,l=s+u);else if("left"===c?(n=(a=f+d+u)-u,o=a+u):"right"===c?(n=(a=f+p-d-u)-u,o=a+u):(n=(a=i.caretX)-u,o=a+u),"top"===h)s=(r=g)-u,l=r;else{s=(r=g+m)+u,l=r;var v=o;o=n,n=v}return{x1:n,x2:a,x3:o,y1:r,y2:s,y3:l}},drawTitle:function(t,i,n,a){var r=i.title;if(r.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s,l,u=i.titleFontSize,d=i.titleSpacing;for(n.fillStyle=e(i.titleFontColor,a),n.font=o.fontString(u,i._titleFontStyle,i._titleFontFamily),s=0,l=r.length;s<l;++s)n.fillText(r[s],t.x,t.y),t.y+=u+d,s+1===r.length&&(t.y+=i.titleMarginBottom-d)}},drawBody:function(t,i,n,a){var r=i.bodyFontSize,s=i.bodySpacing,l=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top",n.font=o.fontString(r,i._bodyFontStyle,i._bodyFontFamily);var u=0,d=function(e){n.fillText(e,t.x+u,t.y),t.y+=r+s};n.fillStyle=e(i.bodyFontColor,a),o.each(i.beforeBody,d);var c=i.displayColors;u=c?r+2:0,o.each(l,function(s,l){var u=e(i.labelTextColors[l],a);n.fillStyle=u,o.each(s.before,d),o.each(s.lines,function(o){c&&(n.fillStyle=e(i.legendColorBackground,a),n.fillRect(t.x,t.y,r,r),n.lineWidth=1,n.strokeStyle=e(i.labelColors[l].borderColor,a),n.strokeRect(t.x,t.y,r,r),n.fillStyle=e(i.labelColors[l].backgroundColor,a),n.fillRect(t.x+1,t.y+1,r-2,r-2),n.fillStyle=u),d(o)}),o.each(s.after,d)}),u=0,o.each(i.afterBody,d),t.y-=s},drawFooter:function(t,i,n,a){var r=i.footer;r.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,a),n.font=o.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),o.each(r,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,a,o){n.fillStyle=e(i.backgroundColor,o),n.strokeStyle=e(i.borderColor,o),n.lineWidth=i.borderWidth;var r=i.xAlign,s=i.yAlign,l=t.x,u=t.y,d=a.width,c=a.height,h=i.cornerRadius;n.beginPath(),n.moveTo(l+h,u),"top"===s&&this.drawCaret(t,a),n.lineTo(l+d-h,u),n.quadraticCurveTo(l+d,u,l+d,u+h),"center"===s&&"right"===r&&this.drawCaret(t,a),n.lineTo(l+d,u+c-h),n.quadraticCurveTo(l+d,u+c,l+d-h,u+c),"bottom"===s&&this.drawCaret(t,a),n.lineTo(l+h,u+c),n.quadraticCurveTo(l,u+c,l,u+c-h),"center"===s&&"left"===r&&this.drawCaret(t,a),n.lineTo(l,u+h),n.quadraticCurveTo(l,u,l+h,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(n,e,t,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a))}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!o.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,o=0;for(e=0,i=t.length;e<i;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();n+=s.x,a+=s.y,++o}}return{x:Math.round(n/o),y:Math.round(a/o)}},nearest:function(t,e){var i,n,a,r=e.x,s=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var u=t[i];if(u&&u.hasValue()){var d=u.getCenterPoint(),c=o.distanceBetweenPoints(e,d);c<l&&(l=c,a=u)}}if(a){var h=a.tooltipPosition();r=h.x,s=h.y}return{x:r,y:s}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({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 i=this._view;if(i){for(var n=o.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,r=n.distance,s=i.startAngle,l=i.endAngle;l<s;)l+=2*Math.PI;for(;a>l;)a-=2*Math.PI;for(;a<s;)a+=2*Math.PI;var u=a>=s&&a<=l,d=r>=i.innerRadius&&r<=i.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},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,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45),r=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a=this._view,s=this._chart.ctx,l=a.spanGaps,u=this._children.slice(),d=r.elements.line,c=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=a.borderCapStyle||d.borderCapStyle,s.setLineDash&&s.setLineDash(a.borderDash||d.borderDash),s.lineDashOffset=a.borderDashOffset||d.borderDashOffset,s.lineJoin=a.borderJoinStyle||d.borderJoinStyle,s.lineWidth=a.borderWidth||d.borderWidth,s.strokeStyle=a.borderColor||r.defaultColor,s.beginPath(),c=-1,t=0;t<u.length;++t)e=u[t],i=o.previousItem(u,t),n=e._view,0===t?n.skip||(s.moveTo(n.x,n.y),c=t):(i=-1===c?i:u[c],n.skip||(c!==t-1&&!l||-1===c?s.moveTo(n.x,n.y):o.canvas.lineTo(s,i._view,e._view),c=t));s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45),r=n.global.defaultColor;function s(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:r,borderColor:r,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=a.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:s,inXRange:s,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,i=this._model,a=this._chart.ctx,s=e.pointStyle,l=e.radius,u=e.x,d=e.y,c=o.color,h=0;e.skip||(a.strokeStyle=e.borderColor||r,a.lineWidth=o.valueOrDefault(e.borderWidth,n.global.elements.point.borderWidth),a.fillStyle=e.backgroundColor||r,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?h=(u-i.x)/(t.left-i.x):1.01*t.right<i.x?h=(i.x-u)/(i.x-t.right):i.y<t.top?h=(d-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(h=(i.y-d)/(i.y-t.bottom)),h=Math.round(100*h)/100,a.strokeStyle=c(a.strokeStyle).alpha(h).rgbString(),a.fillStyle=c(a.fillStyle).alpha(h).rgbString()),o.canvas.drawPoint(a,s,l,u,d))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";var n=t(25),a=t(26);function o(t){return void 0!==t._view.width}function r(t){var e,i,n,a,r=t._view;if(o(t)){var s=r.width/2;e=r.x-s,i=r.x+s,n=Math.min(r.y,r.base),a=Math.max(r.y,r.base)}else{var l=r.height/2;e=Math.min(r.x,r.base),i=Math.max(r.x,r.base),n=r.y-l,a=r.y+l}return{left:e,top:n,right:i,bottom:a}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a,o,r,s=this._chart.ctx,l=this._view,u=l.borderWidth;if(l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,a=e>t?1:-1,o=1,r=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,i=l.y,a=1,o=(n=l.base)>i?1:-1,r=l.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(t-e),Math.abs(i-n)),c=(u=u>d?d:u)/2,h=t+("left"!==r?c*a:0),f=e+("right"!==r?-c*a:0),g=i+("top"!==r?c*o:0),p=n+("bottom"!==r?-c*o:0);h!==f&&(i=g,n=p),g!==p&&(t=h,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=u;var m=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(r,0);function b(t){return m[(v+t)%4]}-1===v&&(v=0);var x=b(0);s.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=b(y),s.lineTo(x[0],x[1]);s.fill(),u&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=r(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=r(this);return o(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=r(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=r(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return o(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,o){if(o){var r=Math.min(o,n/2),s=Math.min(o,a/2);t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.quadraticCurveTo(e+n,i,e+n,i+s),t.lineTo(e+n,i+a-s),t.quadraticCurveTo(e+n,i+a,e+n-r,i+a),t.lineTo(e+r,i+a),t.quadraticCurveTo(e,i+a,e,i+a-s),t.lineTo(e,i+s),t.quadraticCurveTo(e,i,e+r,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a){var o,r,s,l,u,d;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(r=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-r/2,a+u/3),t.lineTo(n+r/2,a+u/3),t.lineTo(n,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-d,a-d,2*d,2*d),t.strokeRect(n-d,a-d,2*d,2*d);break;case"rectRounded":var c=i/Math.SQRT2,h=n-c,f=a-c,g=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,h,f,g,g,i/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-d,a),t.lineTo(n,a+d),t.lineTo(n+d,a),t.lineTo(n,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,a),t.lineTo(n+i,a),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},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,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,a={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return a.valueOrDefault(a.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var o,r,s;if(a.isArray(t))if(r=t.length,n)for(o=r-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<r;o++)e.call(i,t[o],o);else if(a.isObject(t))for(r=(s=Object.keys(t)).length,o=0;o<r;o++)e.call(i,t[s[o]],s[o])},arrayEquals:function(t,e){var i,n,o,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],r=e[i],o instanceof Array&&r instanceof Array){if(!a.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},clone:function(t){if(a.isArray(t))return t.map(a.clone);if(a.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,o=0;o<n;++o)e[i[o]]=a.clone(t[i[o]]);return e}return t},_merger:function(t,e,i,n){var o=e[t],r=i[t];a.isObject(o)&&a.isObject(r)?a.merge(o,r,n):e[t]=a.clone(r)},_mergerIf:function(t,e,i){var n=e[t],o=i[t];a.isObject(n)&&a.isObject(o)?a.mergeIf(n,o):e.hasOwnProperty(t)||(e[t]=a.clone(o))},merge:function(t,e,i){var n,o,r,s,l,u=a.isArray(e)?e:[e],d=u.length;if(!a.isObject(t))return t;for(n=(i=i||{}).merger||a._merger,o=0;o<d;++o)if(e=u[o],a.isObject(e))for(l=0,s=(r=Object.keys(e)).length;l<s;++l)n(r[l],t,e,i);return t},mergeIf:function(t,e){return a.merge(t,e,{merger:a._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;++i)a.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i}};e.exports=a,a.callCallback=a.callback,a.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},a.getValueOrDefault=a.valueOrDefault,a.getValueAtIndexOrDefault=a.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),a={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,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+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-a.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*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},n.easingEffects=a},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,a,o;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,a=+t.bottom||0,o=+t.left||0):e=i=a=o=+t||0,{top:e,right:i,bottom:a,left:o,height:e+a,width:o+i}},resolve:function(t,e,i){var a,o,r;for(a=0,o=t.length;a<o;++a)if(void 0!==(r=t[a])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==i&&n.isArray(r)&&(r=r[i]),void 0!==r))return r}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";var n=t(45),a="$chartjs",o="chartjs-",r=o+"render-monitor",s=o+"render-animation",l=["animationstart","webkitAnimationStart"],u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function d(t,e){var i=n.getStyle(t,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}var c=!!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 h(t,e,i){t.addEventListener(e,i,c)}function f(t,e,i){t.removeEventListener(e,i,c)}function g(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function p(t,e,i){var u,d,c,f,p,m,v,b,x=t[a]||(t[a]={}),y=x.resizer=function(t){var e=document.createElement("div"),i=o+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],r=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return h(a,"scroll",s.bind(a,"expand")),h(r,"scroll",s.bind(r,"shrink")),e}((u=function(){if(x.resizer)return e(g("resize",i))},c=!1,f=[],function(){f=Array.prototype.slice.call(arguments),d=d||this,c||(c=!0,n.requestAnimFrame.call(window,function(){c=!1,u.apply(d,f)}))}));m=function(){if(x.resizer){var e=t.parentNode;e&&e!==y.parentNode&&e.insertBefore(y,e.firstChild),y._reset()}},v=(p=t)[a]||(p[a]={}),b=v.renderProxy=function(t){t.animationName===s&&m()},n.each(l,function(t){h(p,t,b)}),v.reflow=!!p.offsetParent,p.classList.add(r)}function m(t){var e,i,o,s=t[a]||{},u=s.resizer;delete s.resizer,i=(e=t)[a]||{},(o=i.renderProxy)&&(n.each(l,function(t){f(e,t,o)}),delete i.renderProxy),e.classList.remove(r),u&&u.parentNode&&u.parentNode.removeChild(u)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+s+"{"+n+"}@keyframes "+s+"{"+n+"}."+r+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[a]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===o||""===o){var r=d(t,"width");void 0!==r&&(t.width=r)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=d(t,"height");void 0!==r&&(t.height=s)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[a]){var i=e[a].initial;["height","width"].forEach(function(t){var a=i[t];n.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)}),n.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[a]}},addEventListener:function(t,e,i){var o=t.canvas;if("resize"!==e){var r=i[a]||(i[a]={});h(o,e,(r.proxies||(r.proxies={}))[t.id+"_"+e]=function(e){var a,o,r,s;i((o=t,r=u[(a=e).type]||a.type,s=n.getRelativePosition(a,o),g(r,o,s.x,s.y,a)))})}else p(o,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var o=((i[a]||{}).proxies||{})[t.id+"_"+e];o&&f(n,e,o)}else m(n)}},n.addEvent=h,n.removeEvent=f},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),a=t(46),o=t(47),r=o._enabled?o:a;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,i){"use strict";var n=t(25),a=t(40),o=t(45);n._set("global",{plugins:{filler:{propagate:!0}}});var r={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function s(t,e,i){var n,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function l(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function u(t,e,i){var n,a=t[e].fill,o=[e];if(!i)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;o.push(a),a=n.fill}return!1}function d(t){return t&&!t.skip}function c(t,e,i,n,a){var r;if(n&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<n;++r)o.canvas.lineTo(t,e[r-1],e[r]);for(t.lineTo(i[a-1].x,i[a-1].y),r=a-1;r>0;--r)o.canvas.lineTo(t,i[r],i[r-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,o,d,c,h,f,g=(t.data.datasets||[]).length,p=e.propagate,m=[];for(n=0;n<g;++n)d=null,(o=(i=t.getDatasetMeta(n)).dataset)&&o._model&&o instanceof a.Line&&(d={visible:t.isDatasetVisible(n),fill:s(o,n,g),chart:t,el:o}),i.$filler=d,m.push(d);for(n=0;n<g;++n)(d=m[n])&&(d.fill=u(m,n,p),d.boundary=l(d),d.mapper=(void 0,f=void 0,h=(c=d).fill,f="dataset",!1===h?null:(isFinite(h)||(f="boundary"),r[f](c))))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var a=t.ctx,r=i.el,s=r._view,l=r._children||[],u=i.mapper,h=s.backgroundColor||n.global.defaultColor;u&&h&&l.length&&(o.canvas.clipArea(a,t.chartArea),function(t,e,i,n,a,o){var r,s,l,u,h,f,g,p=e.length,m=n.spanGaps,v=[],b=[],x=0,y=0;for(t.beginPath(),r=0,s=p+!!o;r<s;++r)h=i(u=e[l=r%p]._view,l,n),f=d(u),g=d(h),f&&g?(x=v.push(u),y=b.push(h)):x&&y&&(m?(f&&v.push(u),g&&b.push(h)):(c(t,v,b,x,y),x=y=0,v=[],b=[]));c(t,v,b,x,y),t.closePath(),t.fillStyle=a,t.fill()}(a,l,u,s,h,r._loop),o.canvas.unclipArea(a))}}}},{25:25,40:40,45:45}],51:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45),r=t(30),s=o.noop;function l(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}n._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return o.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:o.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var u=a.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:function(){var t=this,e=t.options.labels||{},i=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,e=t.options,i=e.labels,a=e.display,r=t.ctx,s=n.global,u=o.valueOrDefault,d=u(i.fontSize,s.defaultFontSize),c=u(i.fontStyle,s.defaultFontStyle),h=u(i.fontFamily,s.defaultFontFamily),f=o.fontString(d,c,h),g=t.legendHitBoxes=[],p=t.minSize,m=t.isHorizontal();if(m?(p.width=t.maxWidth,p.height=a?10:0):(p.width=a?10:0,p.height=t.maxHeight),a)if(r.font=f,m){var v=t.lineWidths=[0],b=t.legendItems.length?d+i.padding:0;r.textAlign="left",r.textBaseline="top",o.each(t.legendItems,function(e,n){var a=l(i,d)+d/2+r.measureText(e.text).width;v[v.length-1]+a+i.padding>=t.width&&(b+=d+i.padding,v[v.length]=t.left),g[n]={left:0,top:0,width:a,height:d},v[v.length-1]+=a+i.padding}),p.height+=b}else{var x=i.padding,y=t.columnWidths=[],k=i.padding,M=0,w=0,S=d+x;o.each(t.legendItems,function(t,e){var n=l(i,d)+d/2+r.measureText(t.text).width;w+S>p.height&&(k+=M+i.padding,y.push(M),M=0,w=0),M=Math.max(M,n),w+=S,g[e]={left:0,top:0,width:n,height:d}}),k+=M,y.push(M),p.width+=k}t.width=p.width,t.height=p.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,a=n.global,r=a.elements.line,s=t.width,u=t.lineWidths;if(e.display){var d,c=t.ctx,h=o.valueOrDefault,f=h(i.fontColor,a.defaultFontColor),g=h(i.fontSize,a.defaultFontSize),p=h(i.fontStyle,a.defaultFontStyle),m=h(i.fontFamily,a.defaultFontFamily),v=o.fontString(g,p,m);c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=v;var b=l(i,g),x=t.legendHitBoxes,y=t.isHorizontal();d=y?{x:t.left+(s-u[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var k=g+i.padding;o.each(t.legendItems,function(n,l){var f,p,m,v,M,w=c.measureText(n.text).width,S=b+g/2+w,C=d.x,_=d.y;y?C+S>=s&&(_=d.y+=k,d.line++,C=d.x=t.left+(s-u[d.line])/2):_+k>t.bottom&&(C=d.x=C+t.columnWidths[d.line]+i.padding,_=d.y=t.top+i.padding,d.line++),function(t,i,n){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(n.fillStyle,a.defaultColor),c.lineCap=h(n.lineCap,r.borderCapStyle),c.lineDashOffset=h(n.lineDashOffset,r.borderDashOffset),c.lineJoin=h(n.lineJoin,r.borderJoinStyle),c.lineWidth=h(n.lineWidth,r.borderWidth),c.strokeStyle=h(n.strokeStyle,a.defaultColor);var s=0===h(n.lineWidth,r.borderWidth);if(c.setLineDash&&c.setLineDash(h(n.lineDash,r.borderDash)),e.labels&&e.labels.usePointStyle){var l=g*Math.SQRT2/2,u=l/Math.SQRT2,d=t+u,f=i+u;o.canvas.drawPoint(c,n.pointStyle,l,d,f)}else s||c.strokeRect(t,i,b,g),c.fillRect(t,i,b,g);c.restore()}}(C,_,n),x[l].left=C,x[l].top=_,f=n,p=w,v=b+(m=g/2)+C,M=_+m,c.fillText(f.text,v,M),f.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(v,M),c.lineTo(v+p,M),c.stroke()),y?d.x+=S+i.padding:d.y+=k})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var u=s[l];if(o>=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function d(t,e){var i=new u({ctx:t.ctx,options:e,chart:t});r.configure(t,i,e),r.addBox(t,i),t.legend=i}e.exports={id:"legend",_element:u,beforeInit:function(t){var e=t.options.legend;e&&d(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(o.mergeIf(e,n.global.legend),i?(r.configure(t,i,e),i.options=e):d(t,e)):i&&(r.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,i){"use strict";var n=t(25),a=t(26),o=t(45),r=t(30),s=o.noop;n._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var l=a.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:s,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,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:s,beforeBuildLabels:s,buildLabels:s,afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,e=o.valueOrDefault,i=t.options,a=i.display,r=e(i.fontSize,n.global.defaultFontSize),s=t.minSize,l=o.isArray(i.text)?i.text.length:1,u=o.options.toLineHeight(i.lineHeight,r),d=a?l*u+2*i.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=d):(s.width=d,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:s,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=o.valueOrDefault,a=t.options,r=n.global;if(a.display){var s,l,u,d=i(a.fontSize,r.defaultFontSize),c=i(a.fontStyle,r.defaultFontStyle),h=i(a.fontFamily,r.defaultFontFamily),f=o.fontString(d,c,h),g=o.options.toLineHeight(a.lineHeight,d),p=g/2+a.padding,m=0,v=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=i(a.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=v+p,s=y-b):(l="left"===a.position?b+p:y-p,u=v+(x-v)/2,s=x-v,m=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var k=a.text;if(o.isArray(k))for(var M=0,w=0;w<k.length;++w)e.fillText(k[w],0,M,s),M+=g;else e.fillText(k,0,0,s);e.restore()}}});function u(t,e){var i=new l({ctx:t.ctx,options:e,chart:t});r.configure(t,i,e),r.addBox(t,i),t.titleBlock=i}e.exports={id:"title",_element:l,beforeInit:function(t){var e=t.options.title;e&&u(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(o.mergeIf(e,n.global.title),i?(r.configure(t,i,e),i.options=e):u(t,e)):i&&(r.removeBox(t,i),delete t.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(t,e,i){"use strict";e.exports=function(t){var e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,a=i.isHorizontal();return n.yLabels&&!a?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var r=n.getLabels().indexOf(t);e=-1!==r?r:e}if(n.isHorizontal()){var s=n.width/o,l=s*(e-n.minIndex);return a&&(l+=s/2),n.left+Math.round(l)}var u=n.height/o,d=u*(e-n.minIndex);return a&&(d+=u/2),n.top+Math.round(d)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/n;return t-=a?e.left:e.top,i&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],54:[function(t,e,i){"use strict";var n=t(25),a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,o=t.isHorizontal();function r(e){return o?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var s=e.stacked;if(void 0===s&&a.each(n,function(t,e){if(!s){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&r(n)&&void 0!==n.stack&&(s=!0)}}),e.stacked||s){var l={};a.each(n,function(n,o){var s=i.getDatasetMeta(o),u=[s.type,void 0===e.stacked&&void 0===s.stack?o:"",s.stack].join(".");void 0===l[u]&&(l[u]={positiveValues:[],negativeValues:[]});var d=l[u].positiveValues,c=l[u].negativeValues;i.isDatasetVisible(o)&&r(s)&&a.each(n.data,function(i,n){var a=+t.getRightValue(i);isNaN(a)||s.data[n].hidden||(d[n]=d[n]||0,c[n]=c[n]||0,e.relativePoints?d[n]=100:a<0?c[n]+=a:d[n]+=a)})}),a.each(l,function(e){var i=e.positiveValues.concat(e.negativeValues),n=a.min(i),o=a.max(i);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?o:Math.max(t.max,o)})}else a.each(n,function(e,n){var o=i.getDatasetMeta(n);i.isDatasetVisible(n)&&r(o)&&a.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||o.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=a.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],55:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=n.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=n.sign(t.min),a=n.sign(t.max);i<0&&a<0?t.max=0:i>0&&a>0&&(t.min=0)}var o=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)),o!==r&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),a={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,stepSize:n.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=function(t,e){var i,a=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var o=n.niceNum(e.max-e.min,!1);i=n.niceNum(o/(t.maxTicks-1),!0)}var r=Math.floor(e.min/i)*i,s=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&n.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(r=t.min,s=t.max);var l=(s-r)/i;l=n.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l);var u=1;i<1&&(u=Math.pow(10,i.toString().length-2),r=Math.round(r*u)/u,s=Math.round(s*u)/u),a.push(void 0!==t.min?t.min:r);for(var d=1;d<l;++d)a.push(Math.round((r+d*i)*u)/u);return a.push(void 0!==t.max?t.max:s),a}(a,t);t.handleDirectionalChanges(),t.max=n.max(o),t.min=n.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{45:45}],56:[function(t,e,i){"use strict";var n=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,a=i.data.datasets,o=t.isHorizontal();function r(e){return o?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var s=e.stacked;if(void 0===s&&n.each(a,function(t,e){if(!s){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&r(n)&&void 0!==n.stack&&(s=!0)}}),e.stacked||s){var l={};n.each(a,function(a,o){var s=i.getDatasetMeta(o),u=[s.type,void 0===e.stacked&&void 0===s.stack?o:"",s.stack].join(".");i.isDatasetVisible(o)&&r(s)&&(void 0===l[u]&&(l[u]=[]),n.each(a.data,function(e,i){var n=l[u],a=+t.getRightValue(e);isNaN(a)||s.data[i].hidden||a<0||(n[i]=n[i]||0,n[i]+=a)}))}),n.each(l,function(e){if(e.length>0){var i=n.min(e),a=n.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?a:Math.max(t.max,a)}})}else n.each(a,function(e,a){var o=i.getDatasetMeta(a);i.isDatasetVisible(a)&&r(o)&&n.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||o.data[i].hidden||n<0||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n),0!==n&&(null===t.minNotZero||n<t.minNotZero)&&(t.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,i=n.valueOrDefault;t.min=i(e.min,t.min),t.max=i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(n.log10(t.min))-1),t.max=Math.pow(10,Math.floor(n.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(n.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(n.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(n.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),a={min:e.min,max:e.max},o=t.ticks=function(t,e){var i,a,o=[],r=n.valueOrDefault,s=r(t.min,Math.pow(10,Math.floor(n.log10(e.min)))),l=Math.floor(n.log10(e.max)),u=Math.ceil(e.max/Math.pow(10,l));0===s?(i=Math.floor(n.log10(e.minNotZero)),a=Math.floor(e.minNotZero/Math.pow(10,i)),o.push(s),s=a*Math.pow(10,i)):(i=Math.floor(n.log10(s)),a=Math.floor(s/Math.pow(10,i)));for(var d=i<0?Math.pow(10,Math.abs(i)):1;o.push(s),10==++a&&(a=1,d=++i>=0?1:d),s=Math.round(a*Math.pow(10,i)*d)/d,i<l||i===l&&a<u;);var c=r(t.max,s);return o.push(c),o}(a,t);t.max=n.max(o),t.min=n.min(o),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(n.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,a,o,r,s,l=this,u=l.options.ticks.reverse,d=n.log10,c=l._getFirstTickValue(l.minNotZero),h=0;return e=+l.getRightValue(e),u?(o=l.end,r=l.start,s=-1):(o=l.start,r=l.end,s=1),l.isHorizontal()?(i=l.width,a=u?l.right:l.left):(i=l.height,s*=-1,a=u?l.top:l.bottom),e!==o&&(0===o&&(i-=h=n.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=c),0!==e&&(h+=i/(d(r)-d(o))*(d(e)-d(o))),a+=s*h),a},getValueForPixel:function(e){var i,a,o,r,s=this,l=s.options.ticks.reverse,u=n.log10,d=s._getFirstTickValue(s.minNotZero);if(l?(a=s.end,o=s.start):(a=s.start,o=s.end),s.isHorizontal()?(i=s.width,r=l?s.right-e:e-s.left):(i=s.height,r=l?e-s.top:s.bottom-e),r!==a){if(0===a){var c=n.getValueOrDefault(s.options.ticks.fontSize,t.defaults.global.defaultFontSize);r-=c,i-=c,a=d}r*=u(o)-u(a),r/=i,r=Math.pow(10,u(a)+r)}return r}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(25),a=t(45),o=t(34);e.exports=function(t){var e=n.global,i={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function r(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function s(t){var i=t.options.pointLabels,n=a.valueOrDefault(i.fontSize,e.defaultFontSize),o=a.valueOrDefault(i.fontStyle,e.defaultFontStyle),r=a.valueOrDefault(i.fontFamily,e.defaultFontFamily);return{size:n,style:o,family:r,font:a.fontString(n,o,r)}}function l(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||t>a?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function u(t,e,i,n){if(a.isArray(e))for(var o=i.y,r=1.5*n,s=0;s<e.length;++s)t.fillText(e[s],i.x,o),o+=r;else t.fillText(e,i.x,i.y)}function d(t){return a.isNumber(t)?t:0}var c=t.LinearScaleBase.extend({setDimensions:function(){var t=this,i=t.options,n=i.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var o=a.min([t.height,t.width]),r=a.valueOrDefault(n.fontSize,e.defaultFontSize);t.drawingArea=i.display?o/2-(r/2+n.backdropPaddingY):o/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;a.each(e.data.datasets,function(o,r){if(e.isDatasetVisible(r)){var s=e.getDatasetMeta(r);a.each(o.data,function(e,a){var o=+t.getRightValue(e);isNaN(o)||s.data[a].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,i=a.valueOrDefault(t.fontSize,e.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,o=s(t),u=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},c={};t.ctx.font=o.font,t._pointLabelSizes=[];var h,f,g,p=r(t);for(e=0;e<p;e++){n=t.getPointPosition(e,u),h=t.ctx,f=o.size,g=t.pointLabels[e]||"",i=a.isArray(g)?{w:a.longestText(h,h.font,g),h:g.length*f+1.5*(g.length-1)*f}:{w:h.measureText(g).width,h:f},t._pointLabelSizes[e]=i;var m=t.getIndexAngle(e),v=a.toDegrees(m)%360,b=l(v,n.x,i.w,0,180),x=l(v,n.y,i.h,90,270);b.start<d.l&&(d.l=b.start,c.l=m),b.end>d.r&&(d.r=b.end,c.r=m),x.start<d.t&&(d.t=x.start,c.t=m),x.end>d.b&&(d.b=x.end,c.b=m)}t.setReductions(u,d,c)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),a=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),r=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=d(n),a=d(a),o=d(o),r=d(r),this.drawingArea=Math.min(Math.round(t-(n+a)/2),Math.round(t-(o+r)/2)),this.setCenterPoint(n,a,o,r)},setCenterPoint:function(t,e,i,n){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,s=i+a.drawingArea,l=a.height-n-a.drawingArea;a.xCenter=Math.round((r+o)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/r(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,i=t.options,n=i.gridLines,o=i.ticks,l=a.valueOrDefault;if(i.display){var d=t.ctx,c=this.getIndexAngle(0),h=l(o.fontSize,e.defaultFontSize),f=l(o.fontStyle,e.defaultFontStyle),g=l(o.fontFamily,e.defaultFontFamily),p=a.fontString(h,f,g);a.each(t.ticks,function(i,s){if(s>0||o.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(n.display&&0!==s&&function(t,e,i,n){var o=t.ctx;if(o.strokeStyle=a.valueAtIndexOrDefault(e.color,n-1),o.lineWidth=a.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),o.closePath(),o.stroke();else{var s=r(t);if(0===s)return;o.beginPath();var l=t.getPointPosition(0,i);o.moveTo(l.x,l.y);for(var u=1;u<s;u++)l=t.getPointPosition(u,i),o.lineTo(l.x,l.y);o.closePath(),o.stroke()}}(t,n,u,s),o.display){var f=l(o.fontColor,e.defaultFontColor);if(d.font=p,d.save(),d.translate(t.xCenter,t.yCenter),d.rotate(c),o.showLabelBackdrop){var g=d.measureText(i).width;d.fillStyle=o.backdropColor,d.fillRect(-g/2-o.backdropPaddingX,-u-h/2-o.backdropPaddingY,g+2*o.backdropPaddingX,h+2*o.backdropPaddingY)}d.textAlign="center",d.textBaseline="middle",d.fillStyle=f,d.fillText(i,0,-u),d.restore()}}}),(i.angleLines.display||i.pointLabels.display)&&function(t){var i=t.ctx,n=t.options,o=n.angleLines,l=n.pointLabels;i.lineWidth=o.lineWidth,i.strokeStyle=o.color;var d,c,h,f,g=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),p=s(t);i.textBaseline="top";for(var m=r(t)-1;m>=0;m--){if(o.display){var v=t.getPointPosition(m,g);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(v.x,v.y),i.stroke(),i.closePath()}if(l.display){var b=t.getPointPosition(m,g+5),x=a.valueAtIndexOrDefault(l.fontColor,m,e.defaultFontColor);i.font=p.font,i.fillStyle=x;var y=t.getIndexAngle(m),k=a.toDegrees(y);i.textAlign=0===(f=k)||180===f?"center":f<180?"left":"right",d=k,c=t._pointLabelSizes[m],h=b,90===d||270===d?h.y-=c.h/2:(d>270||d<90)&&(h.y-=c.h),u(i,t.pointLabels[m]||"",b,p.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",c,i)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment;var a=t(25),o=t(45),r=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},u=Object.keys(l);function d(t,e){return t-e}function c(t){var e,i,n,a={},o=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,o.push(n));return o}function h(t,e,i,n){var a=function(t,e,i){for(var n,a,o,r=0,s=t.length-1;r>=0&&r<=s;){if(a=t[(n=r+s>>1)-1]||null,o=t[n],!a)return{lo:null,hi:o};if(o[e]<i)r=n+1;else{if(!(a[e]>i))return{lo:a,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=r[e]-o[e],l=s?(i-o[e])/s:0,u=(r[n]-o[n])*l;return o[n]+u}function f(t,e){var i=e.parser,a=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof a?n(t,a):(t instanceof n||(t=n(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function g(t,e){if(o.isNullOrUndef(t))return null;var i=e.options.time,n=f(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function p(t){for(var e=u.indexOf(t)+1,i=u.length;e<i;++e)if(l[u[e]].common)return u[e]}function m(t,e,i,a){var r,d=a.time,c=d.unit||function(t,e,i,n){var a,o,r,d=u.length;for(a=u.indexOf(t);a<d-1;++a)if(r=(o=l[u[a]]).steps?o.steps[o.steps.length-1]:s,o.common&&Math.ceil((i-e)/(r*o.size))<=n)return u[a];return u[d-1]}(d.minUnit,t,e,i),h=p(c),f=o.valueOrDefault(d.stepSize,d.unitStepSize),g="week"===c&&d.isoWeekday,m=a.ticks.major.enabled,v=l[c],b=n(t),x=n(e),y=[];for(f||(f=function(t,e,i,n){var a,o,r,s=e-t,u=l[i],d=u.size,c=u.steps;if(!c)return Math.ceil(s/(n*d));for(a=0,o=c.length;a<o&&(r=c[a],!(Math.ceil(s/(d*r))<=n));++a);return r}(t,e,c,i)),g&&(b=b.isoWeekday(g),x=x.isoWeekday(g)),b=b.startOf(g?"day":c),(x=x.startOf(g?"day":c))<e&&x.add(1,c),r=n(b),m&&h&&!g&&!d.round&&(r.startOf(h),r.add(~~((b-r)/(v.size*f))*f,c));r<x;r.add(f,c))y.push(+r);return y.push(+r),y}e.exports=function(t){var e=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this.options;return e.time&&e.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,i,a,l,u,h=this,f=h.chart,p=h.options.time,m=p.unit||"day",v=s,b=r,x=[],y=[],k=[];for(t=0,i=f.data.labels.length;t<i;++t)k.push(g(f.data.labels[t],h));for(t=0,i=(f.data.datasets||[]).length;t<i;++t)if(f.isDatasetVisible(t))if(l=f.data.datasets[t].data,o.isObject(l[0]))for(y[t]=[],e=0,a=l.length;e<a;++e)u=g(l[e],h),x.push(u),y[t][e]=u;else x.push.apply(x,k),y[t]=k.slice(0);else y[t]=[];k.length&&(k=c(k).sort(d),v=Math.min(v,k[0]),b=Math.max(b,k[k.length-1])),x.length&&(x=c(x).sort(d),v=Math.min(v,x[0]),b=Math.max(b,x[x.length-1])),v=g(p.min,h)||v,b=g(p.max,h)||b,v=v===s?+n().startOf(m):v,b=b===r?+n().endOf(m)+1:b,h.min=Math.min(v,b),h.max=Math.max(v+1,b),h._horizontal=h.isHorizontal(),h._table=[],h._timestamps={data:x,datasets:y,labels:k}},buildTicks:function(){var t,e,i,a,o,r,s,d,c,v,b,x,y=this,k=y.min,M=y.max,w=y.options,S=w.time,C=[],_=[];switch(w.ticks.source){case"data":C=y._timestamps.data;break;case"labels":C=y._timestamps.labels;break;case"auto":default:C=m(k,M,y.getLabelCapacity(k),w)}for("ticks"===w.bounds&&C.length&&(k=C[0],M=C[C.length-1]),k=g(S.min,y)||k,M=g(S.max,y)||M,t=0,e=C.length;t<e;++t)(i=C[t])>=k&&i<=M&&_.push(i);return y.min=k,y.max=M,y._unit=S.unit||function(t,e,i,a){var o,r,s=n.duration(n(a).diff(n(i)));for(o=u.length-1;o>=u.indexOf(e);o--)if(r=u[o],l[r].common&&s.as(r)>=t.length)return r;return u[e?u.indexOf(e):0]}(_,S.minUnit,y.min,y.max),y._majorUnit=p(y._unit),y._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,u=[],d=[e];for(a=0,o=t.length;a<o;++a)(s=t[a])>e&&s<i&&d.push(s);for(d.push(i),a=0,o=d.length;a<o;++a)l=d[a+1],r=d[a-1],s=d[a],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||u.push({time:s,pos:a/(o-1)});return u}(y._timestamps.data,k,M,w.distribution),y._offsets=(a=y._table,o=_,r=k,s=M,b=0,x=0,(d=w).offset&&o.length&&(d.time.min||(c=o.length>1?o[1]:s,v=o[0],b=(h(a,"time",c,"pos")-h(a,"time",v,"pos"))/2),d.time.max||(c=o[o.length-1],v=o.length>1?o[o.length-2]:r,x=(h(a,"time",c,"pos")-h(a,"time",v,"pos"))/2)),{left:b,right:x}),y._labelFormat=function(t,e){var i,n,a,o=t.length;for(i=0;i<o;i++){if(0!==(n=f(t[i],e)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(a=!0)}return a?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(y._timestamps.data,S),function(t,e){var i,a,o,r,s=[];for(i=0,a=t.length;i<a;++i)o=t[i],r=!!e&&o===+n(o).startOf(e),s.push({value:o,major:r});return s}(_,y._majorUnit)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.options.time,a=i.labels&&t<i.labels.length?i.labels[t]:"",r=i.datasets[e].data[t];return o.isObject(r)&&(a=this.getRightValue(r)),n.tooltipFormat?f(a,n).format(n.tooltipFormat):"string"==typeof a?a:f(a,n).format(this._labelFormat)},tickFormatFunction:function(t,e,i,n){var a=this.options,r=t.valueOf(),s=a.time.displayFormats,l=s[this._unit],u=this._majorUnit,d=s[u],c=t.clone().startOf(u).valueOf(),h=a.ticks.major,f=h.enabled&&u&&d&&r===c,g=t.format(n||(f?d:l)),p=f?h:a.ticks.minor,m=o.valueOrDefault(p.callback,p.userCallback);return m?m(g,e,i):g},convertTicksToLabels:function(t){var e,i,a=[];for(e=0,i=t.length;e<i;++e)a.push(this.tickFormatFunction(n(t[e].value),e,t));return a},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=h(e._table,"time",t,"pos");return n+i*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=g(t,this)),null!==n)return this.getPixelForOffset(n)},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,i=e._horizontal?e.width:e.height,a=e._horizontal?e.left:e.top,o=(i?(t-a)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,r=h(e._table,"pos",o,"time");return n(r)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=o.toRadians(e.maxRotation),r=Math.cos(n),s=Math.sin(n);return i*r+o.valueOrDefault(e.fontSize,a.global.defaultFontSize)*s},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,a=e.tickFormatFunction(n(t),0,[],i),o=e.getLabelWidth(a),r=e.isHorizontal()?e.width:e.height,s=Math.floor(r/o);return s>0?s:1}});t.scaleService.registerScaleType("time",e,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{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"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{1:1,25:25,45:45}]},{},[7])(7)});
1
  /*!
2
  * Chart.js
3
  * http://chartjs.org/
4
+ * Version: 2.7.3
5
  *
6
  * Copyright 2018 Chart.js Contributors
7
  * Released under the MIT license
8
  * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
9
  */
10
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function o(r,s,l){function u(e,t){if(!s[e]){if(!r[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(d)return d(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[e]={exports:{}};r[e][0].call(a.exports,function(t){return u(r[e][1][t]||t)},a,a.exports,o,r,s,l)}return s[e].exports}for(var d="function"==typeof require&&require,t=0;t<l.length;t++)u(l[t]);return u}({1:[function(t,e,i){},{}],2:[function(t,e,i){var o=t(6);function n(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3})$/i);if(n){n=n[1];for(var a=0;a<e.length;a++)e[a]=parseInt(n[a]+n[a],16)}else if(n=t.match(/^#([a-fA-F0-9]{6})$/i)){n=n[1];for(a=0;a<e.length;a++)e[a]=parseInt(n.slice(2*a,2*a+2),16)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=parseInt(n[a+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(n[a+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=o[n[1]]))return}for(a=0;a<e.length;a++)e[a]=d(e[a],0,255);return i=i||0==i?d(i,0,1):1,e[3]=i,e}}function a(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function r(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[d(parseInt(e[1]),0,360),d(parseFloat(e[2]),0,100),d(parseFloat(e[3]),0,100),d(isNaN(i)?1:i,0,1)]}}}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(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 u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function d(t,e,i){return Math.min(Math.max(e,t),i)}function c(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:n,getHsla:a,getRgb:function(t){var e=n(t);return e&&e.slice(0,3)},getHsl:function(t){var e=a(t);return e&&e.slice(0,3)},getHwb:r,getAlpha:function(t){var e=n(t);{if(e)return e[3];if(e=a(t))return e[3];if(e=r(t))return e[3]}},hexString:function(t){return"#"+c(t[0])+c(t[1])+c(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return s(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:s,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return u(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:u,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 h[t.slice(0,3)]}};var h={};for(var f in o)h[o[f]]=f},{6:6}],3:[function(t,e,i){var d=t(5),n=t(2),r=function(t){return t instanceof r?t:this instanceof r?(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=n.getRgba(t))?this.setValues("rgb",e):(e=n.getHsla(t))?this.setValues("hsl",e):(e=n.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 r(t);var e};r.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 n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.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=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return i<e?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"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,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,a=void 0===e?.5:e,o=2*a-1,r=i.alpha()-n.alpha(),s=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*a+n.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new r,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},r.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},r.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},r.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},r.prototype.setValues=function(t,e){var i,n,a=this.values,o=this.spaces,r=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)a[t][i]=e[t.charAt(i)];s=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(i=0;i<t.length;i++)a[t][i]=e[l[i]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(r[t][i],a[t][i])),a[t][i]=Math.round(n);for(var u in o)u!==t&&(a[u]=d[t][u](a[t]));return!0},r.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},r.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:(i===n[e]||(n[e]=i,this.setValues(t,n)),this)},"undefined"!=typeof window&&(window.Color=r),e.exports=r},{2:2,5:5}],4:[function(t,e,i){function a(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(r+s)/2,[e,100*(s==r?0:i<=.5?l/(s+r):l/(2-s-r)),100*i]}function n(t){var e,i,n=t[0],a=t[1],o=t[2],r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return i=0==s?0:l/s*1e3/10,s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function o(t){var e=t[0],i=t[1],n=t[2];return[a(t)[0],100*(1/255*Math.min(e,Math.min(i,n))),100*(n=1-1/255*Math.max(e,Math.max(i,n)))]}function s(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function l(t){return S[JSON.stringify(t)]}function u(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=u(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=.008856<(i/=95.047)?Math.pow(i,1/3):7.787*i+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=.008856<a?Math.pow(a,1/3):7.787*a+16/116))]}function c(t){var e,i,n,a,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(n=r+1/3*-(u-1))<0&&n++,1<n&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[u]=255*o;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(a){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function f(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(1<u&&(s/=u,l/=u),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function m(t){var e,i,n,a=t[0]/100,o=t[1]/100,r=t[2]/100;return i=-.9689*a+1.8758*o+.0415*r,n=.0557*a+-.204*o+1.057*r,e=.0031308<(e=3.2406*a+-1.5372*o+-.4986*r)?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=.0031308<i?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116))]}function x(t){var e,i,n,a,o=t[0],r=t[1],s=t[2];return a=o<=8?(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function y(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function k(t){return m(x(t))}function M(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return C[t]}e.exports={rgb2hsl:a,rgb2hsv:n,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return y(d(t))},hsl2rgb:c,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;return 0!==n?[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]:[0,0,0]},hsl2hwb:function(t){return o(c(t))},hsl2cmyk:function(t){return s(c(t))},hsl2keyword:function(t){return l(c(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,o=t[2]/100;return e=a*o,[n,100*(e=(e/=(i=(2-a)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return o(h(t))},hsv2cmyk:function(t){return s(h(t))},hsv2keyword:function(t){return l(h(t))},hwb2rgb:f,hwb2hsl:function(t){return a(f(t))},hwb2hsv:function(t){return n(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return a(p(t))},cmyk2hsv:function(t){return n(p(t))},cmyk2hwb:function(t){return o(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:w,keyword2hsl:function(t){return a(w(t))},keyword2hsv:function(t){return n(w(t))},keyword2hwb:function(t){return o(w(t))},keyword2cmyk:function(t){return s(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return u(w(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return y(v(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:M,lch2xyz:function(t){return x(M(t))},lch2rgb:function(t){return k(M(t))}};var C={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},S={};for(var _ in C)S[JSON.stringify(C[_])]=_},{}],5:[function(t,e,i){var a=t(4),o=function(){return new u};for(var n in a){o[n+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),a[e](t)}}(n);var r=/(\w+)2(\w+)/.exec(n),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[n]=function(n){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var e=a[n](t);if("string"==typeof e||void 0===e)return e;for(var i=0;i<e.length;i++)e[i]=Math.round(e[i]);return e}}(n)}var u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=o[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){u.prototype[e]=function(t){return this.routeSpace(e,arguments)}}),e.exports=o},{4:4}],6:[function(t,e,i){"use strict";e.exports={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]}},{}],7:[function(t,e,i){var n=t(30)();n.helpers=t(46),t(28)(n),n.Animation=t(22),n.animationService=t(23),n.defaults=t(26),n.Element=t(27),n.elements=t(41),n.Interaction=t(29),n.layouts=t(31),n.platform=t(49),n.plugins=t(32),n.Scale=t(33),n.scaleService=t(34),n.Ticks=t(35),n.Tooltip=t(36),t(24)(n),t(25)(n),t(56)(n),t(54)(n),t(55)(n),t(57)(n),t(58)(n),t(59)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var a=t(50);for(var o in a)a.hasOwnProperty(o)&&n.plugins.register(a[o]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=a.legend._element,n.Title=a.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,41:41,46:46,49:49,50:50,54:54,55:55,56:56,57:57,58:58,59:59,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(i){i.Bar=function(t,e){return e.type="bar",new i(t,e)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(i){i.Bubble=function(t,e){return e.type="bubble",new i(t,e)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(i){i.Doughnut=function(t,e){return e.type="doughnut",new i(t,e)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(i){i.Line=function(t,e){return e.type="line",new i(t,e)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(i){i.PolarArea=function(t,e){return e.type="polarArea",new i(t,e)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(i){i.Radar=function(t,e){return e.type="radar",new i(t,e)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(i){i.Scatter=function(t,e){return e.type="scatter",new i(t,e)}}},{}],15:[function(t,e,i){"use strict";var n=t(26),a=t(41),S=t(46);n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return 0<t.length&&(t[0].yLabel?i=t[0].yLabel:0<e.labels.length&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(e){e.controllers.bar=e.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var t;e.DatasetController.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.chart,o=n.getMeta(),r=n.getDataset(),s=t.custom||{},l=a.options.elements.rectangle;t._xScale=n.getScaleForId(o.xAxisID),t._yScale=n.getScaleForId(o.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:r.label,label:a.data.labels[e],borderSkipped:s.borderSkipped?s.borderSkipped:l.borderSkipped,backgroundColor:s.backgroundColor?s.backgroundColor:S.valueAtIndexOrDefault(r.backgroundColor,e,l.backgroundColor),borderColor:s.borderColor?s.borderColor:S.valueAtIndexOrDefault(r.borderColor,e,l.borderColor),borderWidth:s.borderWidth?s.borderWidth:S.valueAtIndexOrDefault(r.borderWidth,e,l.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,a=t._model,o=n.getValueScale(),r=o.getBasePixel(),s=o.isHorizontal(),l=n._ruler||n.getRuler(),u=n.calculateBarValuePixels(n.index,e),d=n.calculateBarIndexPixels(n.index,e,l);a.horizontal=s,a.base=i?r:u.base,a.x=s?i?r:u.head:d.center,a.y=s?d.center:i?r:u.head,a.height=s?d.size:void 0,a.width=s?void 0:d.size},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())},_getStacks:function(t){var e,i,n=this.chart,a=this.getIndexScale().options.stacked,o=void 0===t?n.data.datasets.length:t+1,r=[];for(e=0;e<o;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===r.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===r.indexOf(i.stack)))&&r.push(i.stack);return r},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this.getIndexScale(),n=this.getStackCount(),a=this.index,o=i.isHorizontal(),r=o?i.left:i.top,s=r+(o?i.width:i.height),l=[];for(t=0,e=this.getMeta().data.length;t<e;++t)l.push(i.getPixelForValue(null,t,a));return{min:S.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,a,o,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,o=e.length;a<o;++a)r=Math.min(r,e[a]-e[a-1]);for(a=0,o=s.length;a<o;++a)n=t.getPixelForTick(a),r=0<a?Math.min(r,n-i):r,i=n;return r}(i,l):-1,pixels:l,start:r,end:s,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,o,r,s,l=this.chart,u=this.getMeta(),d=this.getValueScale(),c=l.data.datasets,h=d.getRightValue(c[t].data[e]),f=d.options.stacked,g=u.stack,p=0;if(f||void 0===f&&void 0!==g)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===g&&n.controller.getValueScaleId()===d.id&&l.isDatasetVisible(i)&&(a=d.getRightValue(c[i].data[e]),(h<0&&a<0||0<=h&&0<a)&&(p+=a));return o=d.getPixelForValue(p),{size:s=((r=d.getPixelForValue(p+h))-o)/2,base:o,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n,a,o,r,s,l,u,d,c,h,f,g,p,m,v,b,x,y=i.scale.options,k="flex"===y.barThickness?(c=e,f=y,p=(h=i).pixels,m=p[c],v=0<c?p[c-1]:null,b=c<p.length-1?p[c+1]:null,x=f.categoryPercentage,null===v&&(v=m-(null===b?h.end-m:b-m)),null===b&&(b=m+m-v),g=m-(m-v)/2*x,{chunk:(b-v)/2*x/h.stackCount,ratio:f.barPercentage,start:g}):(n=e,a=i,l=(o=y).barThickness,u=a.stackCount,d=a.pixels[n],s=S.isNullOrUndef(l)?(r=a.min*o.categoryPercentage,o.barPercentage):(r=l*u,1),{chunk:r/u,ratio:s,start:d-r/2}),M=this.getStackIndex(t,this.getMeta().stack),w=k.start+k.chunk*M+k.chunk/2,C=Math.min(S.valueOrDefault(y.maxBarThickness,1/0),k.chunk*k.ratio);return{base:w-C/2,head:w+C/2,center:w,size:C}},draw:function(){var t=this.chart,e=this.getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,o=0;for(S.canvas.clipArea(t.ctx,t.chartArea);o<a;++o)isNaN(e.getRightValue(n.data[o]))||i[o].draw();S.canvas.unclipArea(t.ctx)}}),e.controllers.horizontalBar=e.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{26:26,41:41,46:46}],16:[function(t,e,i){"use strict";var n=t(26),a=t(41),g=t(46);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 i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(i){var n=this,t=n.getMeta().data;g.each(t,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=t.custom||{},r=n.getScaleForId(a.xAxisID),s=n.getScaleForId(a.yAxisID),l=n._resolveElementOptions(t,e),u=n.getDataset().data[e],d=n.index,c=i?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof u?u:NaN,e,d),h=i?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=r,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:i?0:l.radius,skip:o.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=g.valueOrDefault(i.hoverBackgroundColor,g.getHoverColor(i.backgroundColor)),e.borderColor=g.valueOrDefault(i.hoverBorderColor,g.getHoverColor(i.borderColor)),e.borderWidth=g.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,u=g.options.resolve,d=r.data[e],c={},h={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},f=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(i=0,n=f.length;i<n;++i)c[a=f[i]]=u([s[a],r[a],l[a]],h,e);return c.radius=u([s.radius,d?d.r:void 0,r.radius,l.radius],h,e),c}})}},{26:26,41:41,46:46}],17:[function(t,e,i){"use strict";var n=t(26),a=t(41),A=t(46);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(l){var u=l.data;return u.labels.length&&u.datasets.length?u.labels.map(function(t,e){var i=l.getDatasetMeta(0),n=u.datasets[0],a=i.data[e],o=a&&a.custom||{},r=A.valueAtIndexOrDefault,s=l.options.elements.arc;return{text:t,fillStyle:o.backgroundColor?o.backgroundColor:r(n.backgroundColor,e,s.backgroundColor),strokeStyle:o.borderColor?o.borderColor:r(n.borderColor,e,s.borderColor),lineWidth:o.borderWidth?o.borderWidth:r(n.borderWidth,e,s.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return A.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}}),n._set("pie",A.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:A.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(i){var n=this,t=n.chart,e=t.chartArea,a=t.options,o=a.elements.arc,r=e.right-e.left-o.borderWidth,s=e.bottom-e.top-o.borderWidth,l=Math.min(r,s),u={x:0,y:0},d=n.getMeta(),c=a.cutoutPercentage,h=a.circumference;if(h<2*Math.PI){var f=a.rotation%(2*Math.PI),g=(f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0))+h,p=Math.cos(f),m=Math.sin(f),v=Math.cos(g),b=Math.sin(g),x=f<=0&&0<=g||f<=2*Math.PI&&2*Math.PI<=g,y=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,k=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,M=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,w=c/100,C=k?-1:Math.min(p*(p<0?1:w),v*(v<0?1:w)),S=M?-1:Math.min(m*(m<0?1:w),b*(b<0?1:w)),_=x?1:Math.max(p*(0<p?1:w),v*(0<v?1:w)),D=y?1:Math.max(m*(0<m?1:w),b*(0<b?1:w)),P=.5*(_-C),I=.5*(D-S);l=Math.min(r/P,s/I),u={x:-.5*(_+C),y:-.5*(D+S)}}t.borderWidth=n.getMaxBorderWidth(d.data),t.outerRadius=Math.max((l-t.borderWidth)/2,0),t.innerRadius=Math.max(c?t.outerRadius/100*c:0,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),t.offsetX=u.x*t.outerRadius,t.offsetY=u.y*t.outerRadius,d.total=n.calculateTotal(),n.outerRadius=t.outerRadius-t.radiusLength*n.getRingIndex(n.index),n.innerRadius=Math.max(n.outerRadius-t.radiusLength,0),A.each(d.data,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,r=a.options,s=r.animation,l=(o.left+o.right)/2,u=(o.top+o.bottom)/2,d=r.rotation,c=r.rotation,h=n.getDataset(),f=i&&s.animateRotate?0:t.hidden?0:n.calculateCircumference(h.data[e])*(r.circumference/(2*Math.PI)),g=i&&s.animateScale?0:n.innerRadius,p=i&&s.animateScale?0:n.outerRadius,m=A.valueAtIndexOrDefault;A.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:c,circumference:f,outerRadius:p,innerRadius:g,label:m(h.label,e,a.data.labels[e])}});var v=t._model,b=t.custom||{},x=A.valueAtIndexOrDefault,y=this.chart.options.elements.arc;v.backgroundColor=b.backgroundColor?b.backgroundColor:x(h.backgroundColor,e,y.backgroundColor),v.borderColor=b.borderColor?b.borderColor:x(h.borderColor,e,y.borderColor),v.borderWidth=b.borderWidth?b.borderWidth:x(h.borderWidth,e,y.borderWidth),i&&s.animateRotate||(v.startAngle=0===e?r.rotation:n.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var i,n=this.getDataset(),t=this.getMeta(),a=0;return A.each(t.data,function(t,e){i=n.data[e],isNaN(i)||t.hidden||(a+=Math.abs(i))}),a},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,o=t.length,r=0;r<o;r++)n=(n=n<(e=t[r]._model?t[r]._model.borderWidth:0)?e:n)<(i=t[r]._chart?t[r]._chart.config.data.datasets[a].hoverBorderWidth:0)?i:n;return n}})}},{26:26,41:41,46:46}],18:[function(t,e,i){"use strict";var n=t(26),a=t(41),g=t(46);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"}]}}),e.exports=function(t){function f(t,e){return g.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var e,i,n,a=this,o=a.getMeta(),r=o.dataset,s=o.data||[],l=a.chart.options,u=l.elements.line,d=a.getScaleForId(o.yAxisID),c=a.getDataset(),h=f(c,l);for(h&&(n=r.custom||{},void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),r._scale=d,r._datasetIndex=a.index,r._children=s,r._model={spanGaps:c.spanGaps?c.spanGaps:l.spanGaps,tension:n.tension?n.tension:g.valueOrDefault(c.lineTension,u.tension),backgroundColor:n.backgroundColor?n.backgroundColor:c.backgroundColor||u.backgroundColor,borderWidth:n.borderWidth?n.borderWidth:c.borderWidth||u.borderWidth,borderColor:n.borderColor?n.borderColor:c.borderColor||u.borderColor,borderCapStyle:n.borderCapStyle?n.borderCapStyle:c.borderCapStyle||u.borderCapStyle,borderDash:n.borderDash?n.borderDash:c.borderDash||u.borderDash,borderDashOffset:n.borderDashOffset?n.borderDashOffset:c.borderDashOffset||u.borderDashOffset,borderJoinStyle:n.borderJoinStyle?n.borderJoinStyle:c.borderJoinStyle||u.borderJoinStyle,fill:n.fill?n.fill:void 0!==c.fill?c.fill:u.fill,steppedLine:n.steppedLine?n.steppedLine:g.valueOrDefault(c.steppedLine,u.stepped),cubicInterpolationMode:n.cubicInterpolationMode?n.cubicInterpolationMode:g.valueOrDefault(c.cubicInterpolationMode,u.cubicInterpolationMode)},r.pivot()),e=0,i=s.length;e<i;++e)a.updateElement(s[e],e,t);for(h&&0!==r._model.tension&&a.updateBezierControlPoints(),e=0,i=s.length;e<i;++e)s[e].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),a=t.custom||{};return a.backgroundColor?i=a.backgroundColor:n.pointBackgroundColor?i=g.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),a=t.custom||{};return a.borderColor?i=a.borderColor:n.pointBorderColor?i=g.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(n.pointBorderWidth)||g.isArray(n.pointBorderWidth)?i=g.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=a.borderWidth,i},getPointRotation:function(t,e){var i=this.chart.options.elements.point.rotation,n=this.getDataset(),a=t.custom||{};return isNaN(a.rotation)?isNaN(n.pointRotation)&&!g.isArray(n.pointRotation)||(i=g.valueAtIndexOrDefault(n.pointRotation,e,i)):i=a.rotation,i},updateElement:function(t,e,i){var n,a,o=this,r=o.getMeta(),s=t.custom||{},l=o.getDataset(),u=o.index,d=l.data[e],c=o.getScaleForId(r.yAxisID),h=o.getScaleForId(r.xAxisID),f=o.chart.options.elements.point;void 0!==l.radius&&void 0===l.pointRadius&&(l.pointRadius=l.radius),void 0!==l.hitRadius&&void 0===l.pointHitRadius&&(l.pointHitRadius=l.hitRadius),n=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=i?c.getBasePixel():o.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._datasetIndex=u,t._index=e,t._model={x:n,y:a,skip:s.skip||isNaN(n)||isNaN(a),radius:s.radius||g.valueAtIndexOrDefault(l.pointRadius,e,f.radius),pointStyle:s.pointStyle||g.valueAtIndexOrDefault(l.pointStyle,e,f.pointStyle),rotation:o.getPointRotation(t,e),backgroundColor:o.getPointBackgroundColor(t,e),borderColor:o.getPointBorderColor(t,e),borderWidth:o.getPointBorderWidth(t,e),tension:r.dataset._model?r.dataset._model.tension:0,steppedLine:!!r.dataset._model&&r.dataset._model.steppedLine,hitRadius:s.hitRadius||g.valueAtIndexOrDefault(l.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,a,o,r=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),u=0,d=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=r.data.datasets[n],"line"===(o=r.getDatasetMeta(n)).type&&o.yAxisID===l.id&&r.isDatasetVisible(n)){var c=Number(l.getRightValue(a.data[e]));c<0?d+=c||0:u+=c||0}var h=Number(l.getRightValue(t));return h<0?l.getPixelForValue(d+h):l.getPixelForValue(u+h)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),o=this.chart.chartArea,r=a.data||[];function s(t,e,i){return Math.max(Math.min(t,i),e)}if(a.dataset._model.spanGaps&&(r=r.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)g.splineCurveMonotone(r);else for(t=0,e=r.length;t<e;++t)i=r[t]._model,n=g.splineCurve(g.previousItem(r,t)._model,i,g.nextItem(r,t)._model,a.dataset._model.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=r.length;t<e;++t)(i=r[t]._model).controlPointPreviousX=s(i.controlPointPreviousX,o.left,o.right),i.controlPointPreviousY=s(i.controlPointPreviousY,o.top,o.bottom),i.controlPointNextX=s(i.controlPointNextX,o.left,o.right),i.controlPointNextY=s(i.controlPointNextY,o.top,o.bottom)},draw:function(){var t,e=this.chart,i=this.getMeta(),n=i.data||[],a=e.chartArea,o=n.length,r=0;for(f(this.getDataset(),e.options)&&(t=(i.dataset._model.borderWidth||0)/2,g.canvas.clipArea(e.ctx,{left:a.left,right:a.right,top:a.top-t,bottom:a.bottom+t}),i.dataset.draw(),g.canvas.unclipArea(e.ctx));r<o;++r)n[r].draw(a)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,radius:a.radius},a.backgroundColor=n.hoverBackgroundColor||g.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,g.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor||g.valueAtIndexOrDefault(e.pointHoverBorderColor,i,g.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth||g.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth),a.radius=n.hoverRadius||g.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius)}})}},{26:26,41:41,46:46}],19:[function(t,e,i){"use strict";var n=t(26),a=t(41),k=t(46);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=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=s.getDatasetMeta(0),n=l.datasets[0],a=i.data[e].custom||{},o=k.valueAtIndexOrDefault,r=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor?a.backgroundColor:o(n.backgroundColor,e,r.backgroundColor),strokeStyle:a.borderColor?a.borderColor:o(n.borderColor,e,r.borderColor),lineWidth:a.borderWidth?a.borderWidth:o(n.borderWidth,e,r.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:k.noop,update:function(i){var t,e,n,a=this,o=a.getDataset(),r=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[];for(a._updateRadius(),r.count=a.countVisibleElements(),t=0,e=o.data.length;t<e;t++)l[t]=s,n=a._computeAngle(t),s+=u[t]=n;k.each(r.data,function(t,e){a.updateElement(t,e,i)})},_updateRadius:function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,a=n.elements.arc,o=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max((o-a.borderWidth/2)/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.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,i){var n=this,a=n.chart,o=n.getDataset(),r=a.options,s=r.animation,l=a.scale,u=a.data.labels,d=l.xCenter,c=l.yCenter,h=r.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),g=n._starts[e],p=g+(t.hidden?0:n._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]);k.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{x:d,y:c,innerRadius:0,outerRadius:i?m:f,startAngle:i&&s.animateRotate?h:g,endAngle:i&&s.animateRotate?h:p,label:k.valueAtIndexOrDefault(u,e,u[e])}});var v=this.chart.options.elements.arc,b=t.custom||{},x=k.valueAtIndexOrDefault,y=t._model;y.backgroundColor=b.backgroundColor?b.backgroundColor:x(o.backgroundColor,e,v.backgroundColor),y.borderColor=b.borderColor?b.borderColor:x(o.borderColor,e,v.borderColor),y.borderWidth=b.borderWidth?b.borderWidth:x(o.borderWidth,e,v.borderWidth),t.pivot()},countVisibleElements:function(){var i=this.getDataset(),t=this.getMeta(),n=0;return k.each(t.data,function(t,e){isNaN(i.data[e])||t.hidden||n++}),n},_computeAngle:function(t){var e=this,i=this.getMeta().count,n=e.getDataset(),a=e.getMeta();if(isNaN(n.data[t])||a.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index};return k.options.resolve([e.chart.options.elements.arc.angle,2*Math.PI/i],o,t)}})}},{26:26,41:41,46:46}],20:[function(t,e,i){"use strict";var n=t(26),a=t(41),u=t(46);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:u.noop,update:function(i){var n=this,t=n.getMeta(),e=t.dataset,a=t.data,o=e.custom||{},r=n.getDataset(),s=n.chart.options.elements.line,l=n.chart.scale;void 0!==r.tension&&void 0===r.lineTension&&(r.lineTension=r.tension),u.extend(t.dataset,{_datasetIndex:n.index,_scale:l,_children:a,_loop:!0,_model:{tension:o.tension?o.tension:u.valueOrDefault(r.lineTension,s.tension),backgroundColor:o.backgroundColor?o.backgroundColor:r.backgroundColor||s.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:r.borderWidth||s.borderWidth,borderColor:o.borderColor?o.borderColor:r.borderColor||s.borderColor,fill:o.fill?o.fill:void 0!==r.fill?r.fill:s.fill,borderCapStyle:o.borderCapStyle?o.borderCapStyle:r.borderCapStyle||s.borderCapStyle,borderDash:o.borderDash?o.borderDash:r.borderDash||s.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:r.borderDashOffset||s.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:r.borderJoinStyle||s.borderJoinStyle}}),t.dataset.pivot(),u.each(a,function(t,e){n.updateElement(t,e,i)},n),n.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,a=t.custom||{},o=n.getDataset(),r=n.chart.scale,s=n.chart.options.elements.point,l=r.getPointPositionForValue(e,o.data[e]);void 0!==o.radius&&void 0===o.pointRadius&&(o.pointRadius=o.radius),void 0!==o.hitRadius&&void 0===o.pointHitRadius&&(o.pointHitRadius=o.hitRadius),u.extend(t,{_datasetIndex:n.index,_index:e,_scale:r,_model:{x:i?r.xCenter:l.x,y:i?r.yCenter:l.y,tension:a.tension?a.tension:u.valueOrDefault(o.lineTension,n.chart.options.elements.line.tension),radius:a.radius?a.radius:u.valueAtIndexOrDefault(o.pointRadius,e,s.radius),backgroundColor:a.backgroundColor?a.backgroundColor:u.valueAtIndexOrDefault(o.pointBackgroundColor,e,s.backgroundColor),borderColor:a.borderColor?a.borderColor:u.valueAtIndexOrDefault(o.pointBorderColor,e,s.borderColor),borderWidth:a.borderWidth?a.borderWidth:u.valueAtIndexOrDefault(o.pointBorderWidth,e,s.borderWidth),pointStyle:a.pointStyle?a.pointStyle:u.valueAtIndexOrDefault(o.pointStyle,e,s.pointStyle),rotation:a.rotation?a.rotation:u.valueAtIndexOrDefault(o.pointRotation,e,s.rotation),hitRadius:a.hitRadius?a.hitRadius:u.valueAtIndexOrDefault(o.pointHitRadius,e,s.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,o=this.getMeta();u.each(o.data,function(t,e){var i=t._model,n=u.splineCurve(u.previousItem(o.data,e,!0)._model,i,u.nextItem(o.data,e,!0)._model,i.tension);i.controlPointPreviousX=Math.max(Math.min(n.previous.x,a.right),a.left),i.controlPointPreviousY=Math.max(Math.min(n.previous.y,a.bottom),a.top),i.controlPointNextX=Math.max(Math.min(n.next.x,a.right),a.left),i.controlPointNextY=Math.max(Math.min(n.next.y,a.bottom),a.top),t.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth,radius:a.radius},a.radius=i.hoverRadius?i.hoverRadius:u.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:u.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,u.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:u.valueAtIndexOrDefault(e.pointHoverBorderColor,n,u.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:u.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)}})}},{26:26,41:41,46:46}],21:[function(t,e,i){"use strict";t(26)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{26:26}],22:[function(t,e,i){"use strict";var n=t(27);i=e.exports=n.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null});Object.defineProperty(i.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(i.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})},{27:27}],23:[function(t,e,i){"use strict";var n=t(26),o=t(46);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a,o,r=this.animations;for(e.chart=t,n||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=o.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=o.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;1<t.dropFrames&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,0<t.animations.length&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,a=0;a<n.length;)i=(e=n[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),o.callback(e.render,[i,e],i),o.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(o.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(a,1)):++a}}},{26:26,46:46}],24:[function(t,e,i){"use strict";var s=t(22),l=t(23),c=t(26),h=t(46),a=t(29),o=t(31),f=t(49),g=t(32),p=t(34),n=t(36);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var i,n,a=this;(n=(i=(i=e)||{}).data=i.data||{}).datasets=n.datasets||[],n.labels=n.labels||[],i.options=h.configMerge(c.global,c[i.type],i.options||{}),e=i;var o=f.acquireContext(t,e),r=o&&o.canvas,s=r&&r.height,l=r&&r.width;a.id=h.uid(),a.ctx=o,a.canvas=r,a.config=e,a.width=l,a.height=s,a.aspectRatio=s?l/s:null,a.options=e.options,a._bufferedRender=!1,(a.chart=a).controller=a,u.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),o&&r?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return g.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),g.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return l.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(h.getMaximumWidth(n))),r=Math.max(0,Math.floor(a?o/a:h.getMaximumHeight(n)));if((e.width!==o||e.height!==r)&&(n.width=e.width=o,n.height=e.height=r,n.style.width=o+"px",n.style.height=r+"px",h.retinaScale(e,i.devicePixelRatio),!t)){var s={width:o,height:r};g.notify(e,"resize",[s]),e.options.onResize&&e.options.onResize(e,s),e.stop(),e.update({duration:e.options.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var r=this,t=r.options,s=r.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,i=e.id,n=h.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[i]=!0;var a=null;if(i in s&&s[i].type===n)(a=s[i]).options=e,a.ctx=r.ctx,a.chart=r;else{var o=p.getScaleConstructor(n);if(!o)return;a=new o({id:i,type:n,options:e,ctx:r.ctx,chart:r}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(r.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),r.scales=s,p.addScalesToLayout(this)},buildOrUpdateControllers:function(){var o=this,r=[],s=[];return h.each(o.data.datasets,function(t,e){var i=o.getDatasetMeta(e),n=t.type||o.config.type;if(i.type&&i.type!==n&&(o.destroyDatasetMeta(e),i=o.getDatasetMeta(e)),i.type=n,r.push(i.type),i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var a=u.controllers[i.type];if(void 0===a)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new a(o,e),s.push(i.controller)}},o),s},resetElements:function(){var i=this;h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,h.each(e.scales,function(t){o.removeBox(e,t)}),i=h.configMerge(u.defaults.global,u.defaults[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),g._invalidate(n),!1!==g.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&h.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],g.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==g.notify(this,"beforeLayout")&&(o.update(this,this.width,this.height),g.notify(this,"afterScaleUpdate"),g.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==g.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);g.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==g.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),g.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=t.duration,n=t.lazy;if(!1!==g.notify(e,"beforeRender")){var a=e.options.animation,o=function(t){g.notify(e,"afterRender"),h.callback(a&&a.onComplete,[t],e)};if(a&&(void 0!==i&&0!==i||void 0===i&&0!==a.duration)){var r=new s({numSteps:(i||a.duration)/16.66,easing:t.easing||a.easing,render:function(t,e){var i=h.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:a.onProgress,onAnimationComplete:o});l.addAnimation(e,r,i,n)}else e.draw(),o(new s({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),h.isNullOrUndef(t)&&(t=1),e.transition(t),e.width<=0||e.height<=0||!1!==g.notify(e,"beforeDraw",[t])&&(h.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),g.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==g.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;0<=i;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);g.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==g.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),g.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==g.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),g.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return a.modes.single(this,t)},getElementsAtEvent:function(t){return a.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return a.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=a.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return a.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++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,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),h.canvas.clear(i),f.releaseContext(i.ctx),i.canvas=null,i.ctx=null),g.notify(i,"destroy"),delete u.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new n({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,i=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};h.each(e.options.events,function(t){f.addEventListener(e,t,n),i[t]=n}),e.options.responsive&&(n=function(){e.resize()},f.addEventListener(e,"resize",n),i.resize=n)},unbindEvents:function(){var i=this,t=i._listeners;t&&(delete i._listeners,h.each(t,function(t,e){f.removeEventListener(i,e,t)}))},updateHoverStyle:function(t,e,i){var n,a,o,r=i?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==g.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),g.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!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,i=this,n=i.options||{},a=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,a.mode,a),h.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),e=!h.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),u.Controller=u}},{22:22,23:23,26:26,29:29,31:31,32:32,34:34,36:36,46:46,49:49}],25:[function(t,e,i){"use strict";var s=t(46);e.exports=function(t){var o=["push","pop","shift","splice","unshift"];function r(e,t){var i=e._chartjs;if(i){var n=i.listeners,a=n.indexOf(t);-1!==a&&n.splice(a,1),0<n.length||(o.forEach(function(t){delete e[t]}),delete e._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},s.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&r(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,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.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 a,t,e=this,i=e.getDataset(),n=i.data||(i.data=[]);e._data!==n&&(e._data&&r(e._data,e),t=e,(a=n)._chartjs?a._chartjs.listeners.push(t):(Object.defineProperty(a,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),o.forEach(function(t){var i="onData"+t.charAt(0).toUpperCase()+t.slice(1),n=a[t];Object.defineProperty(a,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=n.apply(this,e);return s.each(a._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),t}})})),e._data=n),e.resyncElements()},update:s.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t){s.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=s.valueAtIndexOrDefault,o=s.getHoverColor,r=t._model;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:a(e.hoverBackgroundColor,i,o(r.backgroundColor)),r.borderColor=n.hoverBorderColor?n.hoverBorderColor:a(e.hoverBorderColor,i,o(r.borderColor)),r.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:a(e.hoverBorderWidth,i,r.borderWidth)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):i<n&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},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)}}),t.DatasetController.extend=s.inherits}},{46:46}],26:[function(t,e,i){"use strict";var n=t(46);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{46:46}],27:[function(t,e,i){"use strict";var g=t(3),n=t(46);var a=function(t){n.extend(this,t),this.initialize.apply(this,arguments)};n.extend(a.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=n.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,n=e._start,a=e._view;return i&&1!==t?(a||(a=e._view={}),n||(n=e._start={}),function(t,e,i,n){var a,o,r,s,l,u,d,c,h,f=Object.keys(i);for(a=0,o=f.length;a<o;++a)if(u=i[r=f[a]],e.hasOwnProperty(r)||(e[r]=u),(s=e[r])!==u&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=s),(d=typeof u)==typeof(l=t[r]))if("string"===d){if((c=g(l)).valid&&(h=g(u)).valid){e[r]=h.mix(c,n).rgbString();continue}}else if("number"===d&&isFinite(l)&&isFinite(u)){e[r]=l+(u-l)*n;continue}e[r]=u}}(n,a,i,t)):(e._view=i,e._start=null),e},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return n.isNumber(this._model.x)&&n.isNumber(this._model.y)}}),a.extend=n.inherits,e.exports=a},{3:3,46:46}],28:[function(t,e,i){"use strict";var n=t(3),a=t(26),g=t(46),l=t(34);e.exports=function(){function d(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function c(t){return null!=t&&"none"!==t}function e(t,e,i){var n=document.defaultView,a=g._getParentNode(t),o=n.getComputedStyle(t)[e],r=n.getComputedStyle(a)[e],s=c(o),l=c(r),u=Number.POSITIVE_INFINITY;return s||l?Math.min(s?d(o,t,i):u,l?d(r,a,i):u):"none"}g.configMerge=function(){return g.merge(g.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,e,i,n){var a=e[t]||{},o=i[t];"scales"===t?e[t]=g.scaleMerge(a,o):"scale"===t?e[t]=g.merge(a,[l.getScaleDefaults(o.type),o]):g._merger(t,e,i,n)}})},g.scaleMerge=function(){return g.merge(g.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var a,o,r,s=i[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)r=i[t][a],o=g.valueOrDefault(r.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?g.merge(e[t][a],[l.getScaleDefaults(o),r]):g.merge(e[t][a],r)}else g._merger(t,e,i,n)}})},g.where=function(t,e){if(g.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return g.each(t,function(t){e(t)&&i.push(t)}),i},g.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},g.findNextWhere=function(t,e,i){g.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},g.findPreviousWhere=function(t,e,i){g.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;0<=n;n--){var a=t[n];if(e(a))return a}},g.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g.almostEquals=function(t,e,i){return Math.abs(t-e)<i},g.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&t<i+e},g.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},g.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},g.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},g.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},g.toRadians=function(t){return t*(Math.PI/180)},g.toDegrees=function(t){return t*(180/Math.PI)},g.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},g.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},g.aliasPixel=function(t){return t%2==0?0:.5},g.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=s/(s+l),d=l/(s+l),c=n*(u=isNaN(u)?0:u),h=n*(d=isNaN(d)?0:d);return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},g.EPSILON=Number.EPSILON||1e-14,g.splineCurveMonotone=function(t){var e,i,n,a,o,r,s,l,u,d=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),c=d.length;for(e=0;e<c;++e)if(!(n=d[e]).model.skip){if(i=0<e?d[e-1]:null,(a=e<c-1?d[e+1]:null)&&!a.model.skip){var h=a.model.x-n.model.x;n.deltaK=0!==h?(a.model.y-n.model.y)/h:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<c-1;++e)n=d[e],a=d[e+1],n.model.skip||a.model.skip||(g.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(o=n.mK/n.deltaK,r=a.mK/n.deltaK,(l=Math.pow(o,2)+Math.pow(r,2))<=9||(s=3/Math.sqrt(l),n.mK=o*s*n.deltaK,a.mK=r*s*n.deltaK)));for(e=0;e<c;++e)(n=d[e]).model.skip||(i=0<e?d[e-1]:null,a=e<c-1?d[e+1]:null,i&&!i.model.skip&&(u=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-u,n.model.controlPointPreviousY=n.model.y-u*n.mK),a&&!a.model.skip&&(u=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+u,n.model.controlPointNextY=n.model.y+u*n.mK))},g.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},g.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},g.niceNum=function(t,e){var i=Math.floor(g.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},g.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)},g.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.target||t.srcElement,r=o.getBoundingClientRect(),s=a.touches;n=s&&0<s.length?(i=s[0].clientX,s[0].clientY):(i=a.clientX,a.clientY);var l=parseFloat(g.getStyle(o,"padding-left")),u=parseFloat(g.getStyle(o,"padding-top")),d=parseFloat(g.getStyle(o,"padding-right")),c=parseFloat(g.getStyle(o,"padding-bottom")),h=r.right-r.left-l-d,f=r.bottom-r.top-u-c;return{x:i=Math.round((i-r.left-l)/h*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-r.top-u)/f*o.height/e.currentDevicePixelRatio)}},g.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")},g.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")},g._calculatePadding=function(t,e,i){return-1<(e=g.getStyle(t,e)).indexOf("%")?i/parseInt(e,10):parseInt(e,10)},g._getParentNode=function(t){var e=t.parentNode;return e&&e.host&&(e=e.host),e},g.getMaximumWidth=function(t){var e=g._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-g._calculatePadding(e,"padding-left",i)-g._calculatePadding(e,"padding-right",i),a=g.getConstraintWidth(t);return isNaN(a)?n:Math.min(n,a)},g.getMaximumHeight=function(t){var e=g._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-g._calculatePadding(e,"padding-top",i)-g._calculatePadding(e,"padding-bottom",i),a=g.getConstraintHeight(t);return isNaN(a)?n:Math.min(n,a)},g.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},g.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,o=t.width;n.height=a*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=o+"px")}},g.fontString=function(t,e,i){return e+" "+t+"px "+i},g.longestText=function(e,t,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(a=n.data={},o=n.garbageCollect=[],n.font=t),e.font=t;var r=0;g.each(i,function(t){null!=t&&!0!==g.isArray(t)?r=g.measureText(e,a,o,r,t):g.isArray(t)&&g.each(t,function(t){null==t||g.isArray(t)||(r=g.measureText(e,a,o,r,t))})});var s=o.length/2;if(s>i.length){for(var l=0;l<s;l++)delete a[o[l]];o.splice(0,s)}return r},g.measureText=function(t,e,i,n,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,i.push(a)),n<o&&(n=o),n},g.numberOfLabelLines=function(t){var e=1;return g.each(t,function(t){g.isArray(t)&&t.length>e&&(e=t.length)}),e},g.color=n?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},g.getHoverColor=function(t){return t instanceof CanvasPattern?t:g.color(t).saturate(.5).darken(.1).rgbString()}}},{26:26,3:3,34:34,46:46}],29:[function(t,e,i){"use strict";var n=t(46);function s(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function l(t,e){var i,n,a,o,r;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(a=0,r=(i=t.getDatasetMeta(n)).data.length;a<r;++a){var s=i.data[a];s._view.skip||e(s)}}function u(t,e){var i=[];return l(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function d(t,n,a,o){var r=Number.POSITIVE_INFINITY,s=[];return l(t,function(t){if(!a||t.inRange(n.x,n.y)){var e=t.getCenterPoint(),i=o(n,e);i<r?(s=[t],r=i):i===r&&s.push(t)}}),s}function c(t){var a=-1!==t.indexOf("x"),o=-1!==t.indexOf("y");return function(t,e){var i=a?Math.abs(t.x-e.x):0,n=o?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(n,2))}}function a(n,t,e){var i=s(t,n);e.axis=e.axis||"x";var a=c(e.axis),o=e.intersect?u(n,i):d(n,i,!1,a),r=[];return o.length?(n.data.datasets.forEach(function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e).data[o[0]._index];i&&!i._view.skip&&r.push(i)}}),r):[]}e.exports={modes:{single:function(t,e){var i=s(e,t),n=[];return l(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:a,index:a,dataset:function(t,e,i){var n=s(e,t);i.axis=i.axis||"xy";var a=c(i.axis),o=i.intersect?u(t,n):d(t,n,!1,a);return 0<o.length&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return a(t,e,{intersect:!1})},point:function(t,e){return u(t,s(e,t))},nearest:function(t,e,i){var n=s(e,t);i.axis=i.axis||"xy";var a=c(i.axis),o=d(t,n,i.intersect,a);return 1<o.length&&o.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),o.slice(0,1)},x:function(t,e,i){var n=s(e,t),a=[],o=!1;return l(t,function(t){t.inXRange(n.x)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a},y:function(t,e,i){var n=s(e,t),a=[],o=!1;return l(t,function(t){t.inYRange(n.y)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a}}}},{46:46}],30:[function(t,e,i){"use strict";t(26)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t}},{26:26}],31:[function(t,e,i){"use strict";var B=t(46);function W(t,e){return B.where(t,function(t){return t.position===e})}function V(t,a){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,e){var i=a?e:t,n=a?t:e;return i.weight===n.weight?i._tmpIndex_-n._tmpIndex_:i.weight-n.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)n=a[r],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(e,i,t){if(e){var n=e.options.layout||{},a=B.options.toPadding(n.padding),o=a.left,r=a.right,s=a.top,l=a.bottom,u=W(e.boxes,"left"),d=W(e.boxes,"right"),c=W(e.boxes,"top"),h=W(e.boxes,"bottom"),f=W(e.boxes,"chartArea");V(u,!0),V(d,!1),V(c,!0),V(h,!1);var g=i-o-r,p=t-s-l,m=p/2,v=(i-g/2)/(u.length+d.length),b=(t-m)/(c.length+h.length),x=g,y=p,k=[];B.each(u.concat(d,c,h),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?g:x,b),y-=e.height):(e=t.update(v,y),x-=e.width),k.push({horizontal:i,minSize:e,box:t})});var M=0,w=0,C=0,S=0;B.each(c.concat(h),function(t){if(t.getPadding){var e=t.getPadding();M=Math.max(M,e.left),w=Math.max(w,e.right)}}),B.each(u.concat(d),function(t){if(t.getPadding){var e=t.getPadding();C=Math.max(C,e.top),S=Math.max(S,e.bottom)}});var _=o,D=r,P=s,I=l;B.each(u.concat(d),z),B.each(u,function(t){_+=t.width}),B.each(d,function(t){D+=t.width}),B.each(c.concat(h),z),B.each(c,function(t){P+=t.height}),B.each(h,function(t){I+=t.height}),B.each(u.concat(d),function(e){var t=B.findNextWhere(k,function(t){return t.box===e}),i={left:0,right:0,top:P,bottom:I};t&&e.update(t.minSize.width,y,i)}),_=o,D=r,P=s,I=l,B.each(u,function(t){_+=t.width}),B.each(d,function(t){D+=t.width}),B.each(c,function(t){P+=t.height}),B.each(h,function(t){I+=t.height});var A=Math.max(M-_,0);_+=A,D+=Math.max(w-D,0);var T=Math.max(C-P,0);P+=T,I+=Math.max(S-I,0);var F=t-P-I,O=i-_-D;O===x&&F===y||(B.each(u,function(t){t.height=F}),B.each(d,function(t){t.height=F}),B.each(c,function(t){t.fullWidth||(t.width=O)}),B.each(h,function(t){t.fullWidth||(t.width=O)}),y=F,x=O);var R=o+A,L=s+T;B.each(u.concat(c),N),R+=x,L+=y,B.each(d,N),B.each(h,N),e.chartArea={left:_,top:P,right:_+x,bottom:P+y},B.each(f,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(x,y)})}function z(e){var t=B.findNextWhere(k,function(t){return t.box===e});if(t)if(e.isHorizontal()){var i={left:Math.max(_,M),right:Math.max(D,w),top:0,bottom:0};e.update(e.fullWidth?g:x,p/2,i)}else e.update(t.minSize.width,y)}function N(t){t.isHorizontal()?(t.left=t.fullWidth?o:_,t.right=t.fullWidth?i-r:_+x,t.top=L,t.bottom=L+t.height,L=t.bottom):(t.left=R,t.right=R+t.width,t.top=P,t.bottom=P+y,R=t.right)}}}},{46:46}],32:[function(t,e,i){"use strict";var r=t(26),s=t(46);r._set("global",{plugins:{}}),e.exports={_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 i=this._plugins;[].concat(t).forEach(function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,o,r,s,l=this.descriptors(t),u=l.length;for(n=0;n<u;++n)if("function"==typeof(s=(o=(a=l[n]).plugin)[e])&&((r=[t].concat(i||[])).push(a.options),!1===s.apply(o,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],a=[],i=t&&t.config||{},o=i.options&&i.options.plugins||{};return this._plugins.concat(i.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,i=o[e];!1!==i&&(!0===i&&(i=s.clone(r.global.plugins[e])),n.push(t),a.push({plugin:t,options:i||{}}))}}),e.descriptors=a,e.id=this._cacheId,a},_invalidate:function(t){delete t.$plugins}}},{26:26,46:46}],33:[function(t,e,i){"use strict";var y=t(26),n=t(27),H=t(46),a=t(35);function k(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function j(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}function M(t,e,i){return H.isArray(e)?H.longestText(t,i,e):t.measureText(e).width}function w(t){var e=H.valueOrDefault,i=y.global,n=e(t.fontSize,i.defaultFontSize),a=e(t.fontStyle,i.defaultFontStyle),o=e(t.fontFamily,i.defaultFontFamily);return{size:n,style:a,family:o,font:H.fontString(n,a,o)}}function C(t){return H.options.toLineHeight(H.valueOrDefault(t.lineHeight,1.2),H.valueOrDefault(t.fontSize,y.global.defaultFontSize))}y._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:"",lineHeight:1.2,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:a.formatters.values,minor:{},major:{}}}),e.exports=n.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,o,r,s,l,u=this;for(u.beforeUpdate(),u.maxWidth=t,u.maxHeight=e,u.margins=H.extend({left:0,right:0,top:0,bottom:0},i),u.longestTextCache=u.longestTextCache||{},u.beforeSetDimensions(),u.setDimensions(),u.afterSetDimensions(),u.beforeDataLimits(),u.determineDataLimits(),u.afterDataLimits(),u.beforeBuildTicks(),s=u.buildTicks()||[],u.afterBuildTicks(),u.beforeTickToLabelConversion(),o=u.convertTicksToLabels(s)||u.ticks,u.afterTickToLabelConversion(),n=0,a=(u.ticks=o).length;n<a;++n)r=o[n],(l=s[n])?l.label=r:s.push(l={label:r,major:!1});return u._ticks=s,u.beforeCalculateTickRotation(),u.calculateTickRotation(),u.afterCalculateTickRotation(),u.beforeFit(),u.fit(),u.afterFit(),u.afterUpdate(),u.minSize},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(){H.callback(this.options.afterBuildTicks,[this])},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=this,e=t.ctx,i=t.options.ticks,n=k(t._ticks),a=w(i);e.font=a.font;var o=i.minRotation||0;if(n.length&&t.options.display&&t.isHorizontal())for(var r,s=H.longestText(e,a.font,n,t.longestTextCache),l=s,u=t.getPixelForTick(1)-t.getPixelForTick(0)-6;u<l&&o<i.maxRotation;){var d=H.toRadians(o);if(r=Math.cos(d),Math.sin(d)*s>t.maxHeight){o--;break}o++,l=r*s}t.labelRotation=o},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},i=k(t._ticks),n=t.options,a=n.ticks,o=n.scaleLabel,r=n.gridLines,s=n.display,l=t.isHorizontal(),u=w(a),d=n.gridLines.tickMarkLength;if(e.width=l?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&r.drawTicks?d:0,e.height=l?s&&r.drawTicks?d:0:t.maxHeight,o.display&&s){var c=C(o)+H.options.toPadding(o.padding).height;l?e.height+=c:e.width+=c}if(a.display&&s){var h=H.longestText(t.ctx,u.font,i,t.longestTextCache),f=H.numberOfLabelLines(i),g=.5*u.size,p=t.options.ticks.padding;if(l){t.longestLabelWidth=h;var m=H.toRadians(t.labelRotation),v=Math.cos(m),b=Math.sin(m)*h+u.size*f+g*(f-1)+g;e.height=Math.min(t.maxHeight,e.height+b+p),t.ctx.font=u.font;var x=M(t.ctx,i[0],u.font),y=M(t.ctx,i[i.length-1],u.font);0!==t.labelRotation?(t.paddingLeft="bottom"===n.position?v*x+3:v*g+3,t.paddingRight="bottom"===n.position?v*g+3:v*y+3):(t.paddingLeft=x/2+3,t.paddingRight=y/2+3)}else a.mirror?h=0:h+=p+g,e.width=Math.min(t.maxWidth,e.width+h),t.paddingTop=u.size/2,t.paddingBottom=u.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(H.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var o=e.left+Math.round(a);return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},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:0<t&&0<e?t:0},_autoSkip:function(t){var e,i,n,a,o=this,r=o.isHorizontal(),s=o.options.ticks.minor,l=t.length,u=H.toRadians(o.labelRotation),d=Math.cos(u),c=o.longestLabelWidth*d,h=[];for(s.maxTicksLimit&&(a=s.maxTicksLimit),r&&(e=!1,(c+s.autoSkipPadding)*l>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((c+s.autoSkipPadding)*l/(o.width-(o.paddingLeft+o.paddingRight)))),a&&a<l&&(e=Math.max(e,Math.floor(l/a)))),i=0;i<l;i++)n=t[i],(1<e&&0<i%e||i%e==0&&l<=i+e)&&i!==l-1&&delete n.label,h.push(n);return h},draw:function(S){var _=this,D=_.options;if(D.display){var r=_.ctx,P=y.global,I=D.ticks.minor,t=D.ticks.major||I,A=D.gridLines,e=D.scaleLabel,T=0!==_.labelRotation,F=_.isHorizontal(),O=I.autoSkip?_._autoSkip(_.getTicks()):_.getTicks(),s=H.valueOrDefault(I.fontColor,P.defaultFontColor),l=w(I),u=H.valueOrDefault(t.fontColor,P.defaultFontColor),d=w(t),R=A.drawTicks?A.tickMarkLength:0,i=H.valueOrDefault(e.fontColor,P.defaultFontColor),n=w(e),a=H.options.toPadding(e.padding),L=H.toRadians(_.labelRotation),z=[],N=_.options.gridLines.lineWidth,B="right"===D.position?_.left:_.right-N-R,W="right"===D.position?_.left+R:_.right,V="bottom"===D.position?_.top+N:_.bottom-R-N,E="bottom"===D.position?_.top+N+R:_.bottom+N;if(H.each(O,function(t,e){if(!H.isNullOrUndef(t.label)){var i,n,a,o,r,s,l,u,d,c,h,f,g,p,m=t.label;o=e===_.zeroLineIndex&&D.offset===A.offsetGridLines?(i=A.zeroLineWidth,n=A.zeroLineColor,a=A.zeroLineBorderDash,A.zeroLineBorderDashOffset):(i=H.valueAtIndexOrDefault(A.lineWidth,e),n=H.valueAtIndexOrDefault(A.color,e),a=H.valueOrDefault(A.borderDash,P.borderDash),H.valueOrDefault(A.borderDashOffset,P.borderDashOffset));var v="middle",b="middle",x=I.padding;if(F){var y=R+x;p="bottom"===D.position?(b=T?"middle":"top",v=T?"right":"center",_.top+y):(b=T?"middle":"bottom",v=T?"left":"center",_.bottom-y);var k=j(_,e,A.offsetGridLines&&1<O.length);k<_.left&&(n="rgba(0,0,0,0)"),k+=H.aliasPixel(i),g=_.getPixelForTick(e)+I.labelOffset,r=l=d=h=k,s=V,u=E,c=S.top,f=S.bottom+N}else{var M,w="left"===D.position;M=I.mirror?(v=w?"left":"right",x):(v=w?"right":"left",R+x),g=w?_.right-M:_.left+M;var C=j(_,e,A.offsetGridLines&&1<O.length);C<_.top&&(n="rgba(0,0,0,0)"),C+=H.aliasPixel(i),p=_.getPixelForTick(e)+I.labelOffset,r=B,l=W,d=S.left,h=S.right+N,s=u=c=f=C}z.push({tx1:r,ty1:s,tx2:l,ty2:u,x1:d,y1:c,x2:h,y2:f,labelX:g,labelY:p,glWidth:i,glColor:n,glBorderDash:a,glBorderDashOffset:o,rotation:-1*L,label:m,major:t.major,textBaseline:b,textAlign:v})}}),H.each(z,function(t){if(A.display&&(r.save(),r.lineWidth=t.glWidth,r.strokeStyle=t.glColor,r.setLineDash&&(r.setLineDash(t.glBorderDash),r.lineDashOffset=t.glBorderDashOffset),r.beginPath(),A.drawTicks&&(r.moveTo(t.tx1,t.ty1),r.lineTo(t.tx2,t.ty2)),A.drawOnChartArea&&(r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2)),r.stroke(),r.restore()),I.display){r.save(),r.translate(t.labelX,t.labelY),r.rotate(t.rotation),r.font=t.major?d.font:l.font,r.fillStyle=t.major?u:s,r.textBaseline=t.textBaseline,r.textAlign=t.textAlign;var e=t.label;if(H.isArray(e))for(var i=e.length,n=1.5*l.size,a=_.isHorizontal()?0:-n*(i-1)/2,o=0;o<i;++o)r.fillText(""+e[o],0,a),a+=n;else r.fillText(e,0,0);r.restore()}}),e.display){var o,c,h=0,f=C(e)/2;if(F)o=_.left+(_.right-_.left)/2,c="bottom"===D.position?_.bottom-f-a.bottom:_.top+f+a.top;else{var g="left"===D.position;o=g?_.left+f+a.top:_.right-f-a.top,c=_.top+(_.bottom-_.top)/2,h=g?-.5*Math.PI:.5*Math.PI}r.save(),r.translate(o,c),r.rotate(h),r.textAlign="center",r.textBaseline="middle",r.fillStyle=i,r.font=n.font,r.fillText(e.labelString,0,0),r.restore()}if(A.drawBorder){r.lineWidth=H.valueAtIndexOrDefault(A.lineWidth,0),r.strokeStyle=H.valueAtIndexOrDefault(A.color,0);var p=_.left,m=_.right+N,v=_.top,b=_.bottom+N,x=H.aliasPixel(r.lineWidth);F?(v=b="top"===D.position?_.bottom:_.top,v+=x,b+=x):(p=m="left"===D.position?_.right:_.left,p+=x,m+=x),r.beginPath(),r.moveTo(p,v),r.lineTo(m,b),r.stroke()}}}})},{26:26,27:27,35:35,46:46}],34:[function(t,e,i){"use strict";var n=t(26),a=t(46),o=t(31);e.exports={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=a.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=a.extend(this.defaults[t],e))},addScalesToLayout:function(e){a.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,o.addBox(e,t)})}}},{26:26,31:31,46:46}],35:[function(t,e,i){"use strict";var l=t(46);e.exports={formatters:{values:function(t){return l.isArray(t)?t:""+t},linear:function(t,e,i){var n=3<i.length?i[2]-i[1]:i[1]-i[0];1<Math.abs(n)&&t!==Math.floor(t)&&(n=t-Math.floor(t));var a=l.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var r=l.log10(Math.abs(t));o=t.toExponential(Math.floor(r)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(l.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}}},{46:46}],36:[function(t,e,i){"use strict";var n=t(26),a=t(27),R=t(46);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:R.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(0<t.length){var o=t[0];o.xLabel?i=o.xLabel:0<a&&o.index<a&&(i=n[o.index])}return i},afterTitle:R.noop,beforeBody:R.noop,beforeLabel:R.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:R.noop,afterBody:R.noop,beforeFooter:R.noop,footer:R.noop,afterFooter:R.noop}}});var L={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,o=0;for(e=0,i=t.length;e<i;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();n+=s.x,a+=s.y,++o}}return{x:Math.round(n/o),y:Math.round(a/o)}},nearest:function(t,e){var i,n,a,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=R.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var c=a.tooltipPosition();o=c.x,r=c.y}return{x:o,y:r}}};function h(t,e){var i=R.color(t);return i.alpha(e*i.alpha()).rgbaString()}function r(t,e){return e&&(R.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function s(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function z(t){var e=n.global,i=R.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(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 o(t){return r([],s(t))}(e.exports=a.extend({initialize:function(){this._model=z(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),a=[];return a=r(a=r(a=r(a,s(e)),s(i)),s(n))},getBeforeBody:function(){return o(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,i){var n=this,a=n._options.callbacks,o=[];return R.each(t,function(t){var e={before:[],lines:[],after:[]};r(e.before,s(a.beforeLabel.call(n,t,i))),r(e.lines,a.label.call(n,t,i)),r(e.after,s(a.afterLabel.call(n,t,i))),o.push(e)}),o},getAfterBody:function(){return o(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),a=[];return a=r(a=r(a=r(a,s(e)),s(i)),s(n))},update:function(t){var e,i,n,a,o,r,s,l,u,d,c,h,f,g,p,m,v,b,x,y,k=this,M=k._options,w=k._model,C=k._model=z(M),S=k._active,_=k._data,D={xAlign:w.xAlign,yAlign:w.yAlign},P={x:w.x,y:w.y},I={width:w.width,height:w.height},A={x:w.caretX,y:w.caretY};if(S.length){C.opacity=1;var T=[],F=[];A=L[M.position].call(k,S,k._eventPosition);var O=[];for(e=0,i=S.length;e<i;++e)O.push((m=S[e],b=v=void 0,v=m._xScale,b=m._yScale||m._scale,x=m._index,y=m._datasetIndex,{xLabel:v?v.getLabelForIndex(x,y):"",yLabel:b?b.getLabelForIndex(x,y):"",index:x,datasetIndex:y,x:m._model.x,y:m._model.y}));M.filter&&(O=O.filter(function(t){return M.filter(t,_)})),M.itemSort&&(O=O.sort(function(t,e){return M.itemSort(t,e,_)})),R.each(O,function(t){T.push(M.callbacks.labelColor.call(k,t,k._chart)),F.push(M.callbacks.labelTextColor.call(k,t,k._chart))}),C.title=k.getTitle(O,_),C.beforeBody=k.getBeforeBody(O,_),C.body=k.getBody(O,_),C.afterBody=k.getAfterBody(O,_),C.footer=k.getFooter(O,_),C.x=Math.round(A.x),C.y=Math.round(A.y),C.caretPadding=M.caretPadding,C.labelColors=T,C.labelTextColors=F,C.dataPoints=O,D=function(t,e){var i,n,a,o,r,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",c="center";s.y<e.height?c="top":s.y>l.height-e.height&&(c="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;n="center"===c?(i=function(t){return t<=h},function(t){return h<t}):(i=function(t){return t<=e.width/2},function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},i(s.x)?(d="left",a(s.x)&&(d="center",c=r(s.y))):n(s.x)&&(d="right",o(s.x)&&(d="center",c=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:c}}(this,I=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,o=e.body,r=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,c=e.footerFontSize;n+=s*u,n+=s?(s-1)*e.titleSpacing:0,n+=s?e.titleMarginBottom:0,n+=r*d,n+=r?(r-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*c,n+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,i.measureText(t).width+h)};return i.font=R.fontString(u,e._titleFontStyle,e._titleFontFamily),R.each(e.title,f),i.font=R.fontString(d,e._bodyFontStyle,e._bodyFontFamily),R.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?d+2:0,R.each(o,function(t){R.each(t.before,f),R.each(t.lines,f),R.each(t.after,f)}),h=0,i.font=R.fontString(c,e._footerFontStyle,e._footerFontFamily),R.each(e.footer,f),{width:a+=2*e.xPadding,height:n}}(this,C)),n=C,a=I,o=D,r=k._chart,s=n.x,l=n.y,u=n.caretSize,d=n.caretPadding,c=n.cornerRadius,h=o.xAlign,f=o.yAlign,g=u+d,p=c+d,"right"===h?s-=a.width:"center"===h&&((s-=a.width/2)+a.width>r.width&&(s=r.width-a.width),s<0&&(s=0)),"top"===f?l+=g:l-="bottom"===f?a.height+g:a.height/2,"center"===f?"left"===h?s+=g:"right"===h&&(s-=g):"left"===h?s-=p:"right"===h&&(s+=p),P={x:s,y:l}}else C.opacity=0;return C.xAlign=D.xAlign,C.yAlign=D.yAlign,C.x=P.x,C.y=P.y,C.width=I.width,C.height=I.height,C.caretX=A.x,C.caretY=A.y,k._model=C,t&&M.custom&&M.custom.call(k,C),k},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,o,r,s,l,u=i.caretSize,d=i.cornerRadius,c=i.xAlign,h=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===h)s=g+m/2,l="left"===c?(a=(n=f)-u,o=n,r=s+u,s-u):(a=(n=f+p)+u,o=n,r=s-u,s+u);else if(o=(n="left"===c?(a=f+d+u)-u:"right"===c?(a=f+p-d-u)-u:(a=i.caretX)-u,a+u),"top"===h)s=(r=g)-u,l=r;else{s=(r=g+m)+u,l=r;var v=o;o=n,n=v}return{x1:n,x2:a,x3:o,y1:r,y2:s,y3:l}},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var o,r,s=e.titleFontSize,l=e.titleSpacing;for(i.fillStyle=h(e.titleFontColor,n),i.font=R.fontString(s,e._titleFontStyle,e._titleFontFamily),o=0,r=a.length;o<r;++o)i.fillText(a[o],t.x,t.y),t.y+=s+l,o+1===a.length&&(t.y+=e.titleMarginBottom-l)}},drawBody:function(n,a,o,r){var s=a.bodyFontSize,e=a.bodySpacing,t=a.body;o.textAlign=a._bodyAlign,o.textBaseline="top",o.font=R.fontString(s,a._bodyFontStyle,a._bodyFontFamily);var i=0,l=function(t){o.fillText(t,n.x+i,n.y),n.y+=s+e};o.fillStyle=h(a.bodyFontColor,r),R.each(a.beforeBody,l);var u=a.displayColors;i=u?s+2:0,R.each(t,function(t,e){var i=h(a.labelTextColors[e],r);o.fillStyle=i,R.each(t.before,l),R.each(t.lines,function(t){u&&(o.fillStyle=h(a.legendColorBackground,r),o.fillRect(n.x,n.y,s,s),o.lineWidth=1,o.strokeStyle=h(a.labelColors[e].borderColor,r),o.strokeRect(n.x,n.y,s,s),o.fillStyle=h(a.labelColors[e].backgroundColor,r),o.fillRect(n.x+1,n.y+1,s-2,s-2),o.fillStyle=i),l(t)}),R.each(t.after,l)}),i=0,R.each(a.afterBody,l),n.y-=e},drawFooter:function(e,i,n,t){var a=i.footer;a.length&&(e.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=h(i.footerFontColor,t),n.font=R.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),R.each(a,function(t){n.fillText(t,e.x,e.y),e.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,e,i,n,a){i.fillStyle=h(e.backgroundColor,a),i.strokeStyle=h(e.borderColor,a),i.lineWidth=e.borderWidth;var o=e.xAlign,r=e.yAlign,s=t.x,l=t.y,u=n.width,d=n.height,c=e.cornerRadius;i.beginPath(),i.moveTo(s+c,l),"top"===r&&this.drawCaret(t,n),i.lineTo(s+u-c,l),i.quadraticCurveTo(s+u,l,s+u,l+c),"center"===r&&"right"===o&&this.drawCaret(t,n),i.lineTo(s+u,l+d-c),i.quadraticCurveTo(s+u,l+d,s+u-c,l+d),"bottom"===r&&this.drawCaret(t,n),i.lineTo(s+c,l+d),i.quadraticCurveTo(s,l+d,s,l+d-c),"center"===r&&"left"===o&&this.drawCaret(t,n),i.lineTo(s,l+c),i.quadraticCurveTo(s,l,s+c,l),i.closePath(),i.fill(),0<e.borderWidth&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(n,e,t,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a))}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!R.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}})).positioners=L},{26:26,27:27,46:46}],37:[function(t,e,i){"use strict";var n=t(26),a=t(27),d=t(46);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({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 i=this._view;if(i){for(var n=d.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,o=n.distance,r=i.startAngle,s=i.endAngle;s<r;)s+=2*Math.PI;for(;s<a;)a-=2*Math.PI;for(;a<r;)a+=2*Math.PI;var l=r<=a&&a<=s,u=o>=i.innerRadius&&o<=i.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},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,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{26:26,27:27,46:46}],38:[function(t,e,i){"use strict";var n=t(26),a=t(27),d=t(46),c=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:c.defaultColor,borderWidth:3,borderColor:c.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a=this._view,o=this._chart.ctx,r=a.spanGaps,s=this._children.slice(),l=c.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),o.save(),o.lineCap=a.borderCapStyle||l.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||l.borderDash),o.lineDashOffset=a.borderDashOffset||l.borderDashOffset,o.lineJoin=a.borderJoinStyle||l.borderJoinStyle,o.lineWidth=a.borderWidth||l.borderWidth,o.strokeStyle=a.borderColor||c.defaultColor,o.beginPath(),u=-1,t=0;t<s.length;++t)e=s[t],i=d.previousItem(s,t),n=e._view,0===t?n.skip||(o.moveTo(n.x,n.y),u=t):(i=-1===u?i:s[u],n.skip||(u!==t-1&&!r||-1===u?o.moveTo(n.x,n.y):d.canvas.lineTo(o,i._view,e._view),u=t));o.stroke(),o.restore()}})},{26:26,27:27,46:46}],39:[function(t,e,i){"use strict";var u=t(26),n=t(27),d=t(46),c=u.global.defaultColor;function a(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}u._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:c,borderColor:c,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=n.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:a,inXRange:a,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,i=this._model,n=this._chart.ctx,a=e.pointStyle,o=e.rotation,r=e.radius,s=e.x,l=e.y;e.skip||(void 0===t||i.x>=t.left&&1.01*t.right>=i.x&&i.y>=t.top&&1.01*t.bottom>=i.y)&&(n.strokeStyle=e.borderColor||c,n.lineWidth=d.valueOrDefault(e.borderWidth,u.global.elements.point.borderWidth),n.fillStyle=e.backgroundColor||c,d.canvas.drawPoint(n,a,r,s,l,o))}})},{26:26,27:27,46:46}],40:[function(t,e,i){"use strict";var n=t(26),a=t(27);function l(t){return void 0!==t._view.width}function o(t){var e,i,n,a,o=t._view;if(l(t)){var r=o.width/2;e=o.x-r,i=o.x+r,n=Math.min(o.y,o.base),a=Math.max(o.y,o.base)}else{var s=o.height/2;e=Math.min(o.x,o.base),i=Math.max(o.x,o.base),n=o.y-s,a=o.y+s}return{left:e,top:n,right:i,bottom:a}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a,o,r,s=this._chart.ctx,l=this._view,u=l.borderWidth;if(r=l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,a=t<e?1:-1,o=1,l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,a=1,o=(i=l.y)<(n=l.base)?1:-1,l.borderSkipped||"bottom"),u){var d=Math.min(Math.abs(t-e),Math.abs(i-n)),c=(u=d<u?d:u)/2,h=t+("left"!==r?c*a:0),f=e+("right"!==r?-c*a:0),g=i+("top"!==r?c*o:0),p=n+("bottom"!==r?-c*o:0);h!==f&&(i=g,n=p),g!==p&&(t=h,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=u;var m=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(r,0);function b(t){return m[(v+t)%4]}-1===v&&(v=0);var x=b(0);s.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=b(y),s.lineTo(x[0],x[1]);s.fill(),u&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=o(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=o(this);return l(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return e=l(this)?(t=i.x,(i.y+i.base)/2):(t=(i.x+i.base)/2,i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{26:26,27:27}],41:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(37),e.exports.Line=t(38),e.exports.Point=t(39),e.exports.Rectangle=t(40)},{37:37,38:38,39:39,40:40}],42:[function(t,e,i){"use strict";var n=t(43);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,o){if(o){var r=Math.min(o,a/2-1e-7,n/2-1e-7);t.moveTo(e+r,i),t.lineTo(e+n-r,i),t.arcTo(e+n,i,e+n,i+r,r),t.lineTo(e+n,i+a-r),t.arcTo(e+n,i+a,e+n-r,i+a,r),t.lineTo(e+r,i+a),t.arcTo(e,i+a,e,i+a-r,r),t.lineTo(e,i+r),t.arcTo(e,i,e+r,i,r),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a,o){var r,s,l,u,d,c;if(o=o||0,!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(t.save(),t.translate(n,a),t.rotate(o*Math.PI/180),t.beginPath(),e){default:t.arc(0,0,i,0,2*Math.PI),t.closePath();break;case"triangle":d=(s=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(-s/2,d/3),t.lineTo(s/2,d/3),t.lineTo(0,-2*d/3),t.closePath();break;case"rect":c=1/Math.SQRT2*i,t.rect(-c,-c,2*c,2*c);break;case"rectRounded":var h=i/Math.SQRT2,f=-h,g=-h,p=Math.SQRT2*i;this.roundedRect(t,f,g,p,p,.425*i);break;case"rectRot":c=1/Math.SQRT2*i,t.moveTo(-c,0),t.lineTo(0,c),t.lineTo(c,0),t.lineTo(0,-c),t.closePath();break;case"cross":t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-i,0),t.lineTo(i,0);break;case"crossRot":l=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"star":t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-i,0),t.lineTo(i,0),l=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"line":t.moveTo(-i,0),t.lineTo(i,0);break;case"dash":t.moveTo(0,0),t.lineTo(i,0)}t.fill(),t.stroke(),t.restore()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},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,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments)}},{43:43}],43:[function(t,e,i){"use strict";var n,d={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return d.valueOrDefault(d.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var a,o,r;if(d.isArray(t))if(o=t.length,n)for(a=o-1;0<=a;a--)e.call(i,t[a],a);else for(a=0;a<o;a++)e.call(i,t[a],a);else if(d.isObject(t))for(o=(r=Object.keys(t)).length,a=0;a<o;a++)e.call(i,t[r[a]],r[a])},arrayEquals:function(t,e){var i,n,a,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(a=t[i],o=e[i],a instanceof Array&&o instanceof Array){if(!d.arrayEquals(a,o))return!1}else if(a!==o)return!1;return!0},clone:function(t){if(d.isArray(t))return t.map(d.clone);if(d.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,a=0;a<n;++a)e[i[a]]=d.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,n){var a=e[t],o=i[t];d.isObject(a)&&d.isObject(o)?d.merge(a,o,n):e[t]=d.clone(o)},_mergerIf:function(t,e,i){var n=e[t],a=i[t];d.isObject(n)&&d.isObject(a)?d.mergeIf(n,a):e.hasOwnProperty(t)||(e[t]=d.clone(a))},merge:function(t,e,i){var n,a,o,r,s,l=d.isArray(e)?e:[e],u=l.length;if(!d.isObject(t))return t;for(n=(i=i||{}).merger||d._merger,a=0;a<u;++a)if(e=l[a],d.isObject(e))for(s=0,r=(o=Object.keys(e)).length;s<r;++s)n(o[s],t,e,i);return t},mergeIf:function(t,e){return d.merge(t,e,{merger:d._mergerIf})},extend:function(i){for(var t=function(t,e){i[e]=t},e=1,n=arguments.length;e<n;++e)d.each(arguments[e],t);return i},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=d.inherits,t&&d.extend(i.prototype,t),i.__super__=e.prototype,i}};(e.exports=d).callCallback=d.callback,d.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},d.getValueOrDefault=d.valueOrDefault,d.getValueAtIndexOrDefault=d.valueAtIndexOrDefault},{}],44:[function(t,e,i){"use strict";var n=t(43),a={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 1<=t?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,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+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-a.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*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},n.easingEffects=a},{43:43}],45:[function(t,e,i){"use strict";var r=t(43);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,a;return r.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,a=+t.left||0):e=i=n=a=+t||0,{top:e,right:i,bottom:n,left:a,height:e+n,width:a+i}},resolve:function(t,e,i){var n,a,o;for(n=0,a=t.length;n<a;++n)if(void 0!==(o=t[n])&&(void 0!==e&&"function"==typeof o&&(o=o(e)),void 0!==i&&r.isArray(o)&&(o=o[i]),void 0!==o))return o}}},{43:43}],46:[function(t,e,i){"use strict";e.exports=t(43),e.exports.easing=t(44),e.exports.canvas=t(42),e.exports.options=t(45)},{42:42,43:43,44:44,45:45}],47:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],48:[function(t,e,i){"use strict";var f=t(46),g="$chartjs",p="chartjs-",m=p+"render-monitor",v=p+"render-animation",b=["animationstart","webkitAnimationStart"],s={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function l(t,e){var i=f.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var n=!!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 x(t,e,i){t.addEventListener(e,i,n)}function r(t,e,i){t.removeEventListener(e,i,n)}function y(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function a(e,t,i){var n,a,o,r,s,l,u,d,c=e[g]||(e[g]={}),h=c.resizer=function(t){var e=document.createElement("div"),i=p+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],o=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,o.scrollLeft=1e6,o.scrollTop=1e6};var r=function(){e._reset(),t()};return x(a,"scroll",r.bind(a,"expand")),x(o,"scroll",r.bind(o,"shrink")),e}((o=!(n=function(){if(c.resizer)return t(y("resize",i))}),r=[],function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,f.requestAnimFrame.call(window,function(){o=!1,n.apply(a,r)}))}));l=function(){if(c.resizer){var t=e.parentNode;t&&t!==h.parentNode&&t.insertBefore(h,t.firstChild),h._reset()}},u=(s=e)[g]||(s[g]={}),d=u.renderProxy=function(t){t.animationName===v&&l()},f.each(b,function(t){x(s,t,d)}),u.reflow=!!s.offsetParent,s.classList.add(m)}function o(t){var e,i,n,a=t[g]||{},o=a.resizer;delete a.resizer,i=(e=t)[g]||{},(n=i.renderProxy)&&(f.each(b,function(t){r(e,t,n)}),delete i.renderProxy),e.classList.remove(m),o&&o.parentNode&&o.parentNode.removeChild(o)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+n+"}@keyframes "+v+"{"+n+"}."+m+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=i).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t[g]={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var o=l(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var r=l(t,"height");void 0!==o&&(t.height=r)}}(t,e),i):null},releaseContext:function(t){var i=t.canvas;if(i[g]){var n=i[g].initial;["height","width"].forEach(function(t){var e=n[t];f.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),f.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[g]}},addEventListener:function(o,t,r){var e=o.canvas;if("resize"!==t){var i=r[g]||(r[g]={});x(e,t,(i.proxies||(i.proxies={}))[o.id+"_"+t]=function(t){var e,i,n,a;r((i=o,n=s[(e=t).type]||e.type,a=f.getRelativePosition(e,i),y(n,i,a.x,a.y,e)))})}else a(e,r,o)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=((i[g]||{}).proxies||{})[t.id+"_"+e];a&&r(n,e,a)}else o(n)}},f.addEvent=x,f.removeEvent=r},{46:46}],49:[function(t,e,i){"use strict";var n=t(46),a=t(47),o=t(48),r=o._enabled?o:a;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{46:46,47:47,48:48}],50:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(51),e.exports.legend=t(52),e.exports.title=t(53)},{51:51,52:52,53:53}],51:[function(t,e,i){"use strict";var u=t(26),h=t(41),d=t(46);u._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function g(t,e,i){var n,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||i<=n)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function p(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function m(t,e,i){var n,a=t[e].fill,o=[e];if(!i)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;o.push(a),a=n.fill}return!1}function x(t){return t&&!t.skip}function y(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)d.canvas.lineTo(t,e[o-1],e[o]);for(t.lineTo(i[a-1].x,i[a-1].y),o=a-1;0<o;--o)d.canvas.lineTo(t,i[o],i[o-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,a,o,r,s,l,u=(t.data.datasets||[]).length,d=e.propagate,c=[];for(n=0;n<u;++n)o=null,(a=(i=t.getDatasetMeta(n)).dataset)&&a._model&&a instanceof h.Line&&(o={visible:t.isDatasetVisible(n),fill:g(a,n,u),chart:t,el:a}),i.$filler=o,c.push(o);for(n=0;n<u;++n)(o=c[n])&&(o.fill=m(c,n,d),o.boundary=p(o),o.mapper=(l=void 0,s=(r=o).fill,!(l="dataset")===s?null:(isFinite(s)||(l="boundary"),f[l](r))))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,a=i.el,o=a._view,r=a._children||[],s=i.mapper,l=o.backgroundColor||u.global.defaultColor;s&&l&&r.length&&(d.canvas.clipArea(n,t.chartArea),function(t,e,i,n,a,o){var r,s,l,u,d,c,h,f=e.length,g=n.spanGaps,p=[],m=[],v=0,b=0;for(t.beginPath(),r=0,s=f+!!o;r<s;++r)d=i(u=e[l=r%f]._view,l,n),c=x(u),h=x(d),c&&h?(v=p.push(u),b=m.push(d)):v&&b&&(g?(c&&p.push(u),h&&m.push(d)):(y(t,p,m,v,b),v=b=0,p=[],m=[]));y(t,p,m,v,b),t.closePath(),t.fillStyle=a,t.fill()}(n,r,s,o,l,a._loop),d.canvas.unclipArea(n))}}}},{26:26,41:41,46:46}],52:[function(t,e,i){"use strict";var _=t(26),n=t(27),D=t(46),a=t(31),o=D.noop;function P(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}_._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(i){var t=i.data;return D.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:D.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!i.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var r=n.extend({initialize:function(t){D.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:o,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:o,beforeSetDimensions:o,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:o,beforeBuildLabels:o,buildLabels:function(){var e=this,i=e.options.labels||{},t=D.callback(i.generateLabels,[e.chart],e)||[];i.filter&&(t=t.filter(function(t){return i.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:o,beforeFit:o,fit:function(){var n=this,t=n.options,a=t.labels,e=t.display,o=n.ctx,i=_.global,r=D.valueOrDefault,s=r(a.fontSize,i.defaultFontSize),l=r(a.fontStyle,i.defaultFontStyle),u=r(a.fontFamily,i.defaultFontFamily),d=D.fontString(s,l,u),c=n.legendHitBoxes=[],h=n.minSize,f=n.isHorizontal();if(h.height=f?(h.width=n.maxWidth,e?10:0):(h.width=e?10:0,n.maxHeight),e)if(o.font=d,f){var g=n.lineWidths=[0],p=n.legendItems.length?s+a.padding:0;o.textAlign="left",o.textBaseline="top",D.each(n.legendItems,function(t,e){var i=P(a,s)+s/2+o.measureText(t.text).width;g[g.length-1]+i+a.padding>=n.width&&(p+=s+a.padding,g[g.length]=n.left),c[e]={left:0,top:0,width:i,height:s},g[g.length-1]+=i+a.padding}),h.height+=p}else{var m=a.padding,v=n.columnWidths=[],b=a.padding,x=0,y=0,k=s+m;D.each(n.legendItems,function(t,e){var i=P(a,s)+s/2+o.measureText(t.text).width;y+k>h.height&&(b+=x+a.padding,v.push(x),y=x=0),x=Math.max(x,i),y+=k,c[e]={left:0,top:0,width:i,height:s}}),b+=x,v.push(x),h.width+=b}n.width=h.width,n.height=h.height},afterFit:o,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c=this,h=c.options,f=h.labels,g=_.global,p=g.elements.line,m=c.width,v=c.lineWidths;if(h.display){var b,x=c.ctx,y=D.valueOrDefault,t=y(f.fontColor,g.defaultFontColor),k=y(f.fontSize,g.defaultFontSize),e=y(f.fontStyle,g.defaultFontStyle),i=y(f.fontFamily,g.defaultFontFamily),n=D.fontString(k,e,i);x.textAlign="left",x.textBaseline="middle",x.lineWidth=.5,x.strokeStyle=t,x.fillStyle=t,x.font=n;var M=P(f,k),w=c.legendHitBoxes,C=c.isHorizontal();b=C?{x:c.left+(m-v[0])/2,y:c.top+f.padding,line:0}:{x:c.left+f.padding,y:c.top+f.padding,line:0};var S=k+f.padding;D.each(c.legendItems,function(t,e){var i,n,a,o,r,s=x.measureText(t.text).width,l=M+k/2+s,u=b.x,d=b.y;C?m<=u+l&&(d=b.y+=S,b.line++,u=b.x=c.left+(m-v[b.line])/2):d+S>c.bottom&&(u=b.x=u+c.columnWidths[b.line]+f.padding,d=b.y=c.top+f.padding,b.line++),function(t,e,i){if(!(isNaN(M)||M<=0)){x.save(),x.fillStyle=y(i.fillStyle,g.defaultColor),x.lineCap=y(i.lineCap,p.borderCapStyle),x.lineDashOffset=y(i.lineDashOffset,p.borderDashOffset),x.lineJoin=y(i.lineJoin,p.borderJoinStyle),x.lineWidth=y(i.lineWidth,p.borderWidth),x.strokeStyle=y(i.strokeStyle,g.defaultColor);var n=0===y(i.lineWidth,p.borderWidth);if(x.setLineDash&&x.setLineDash(y(i.lineDash,p.borderDash)),h.labels&&h.labels.usePointStyle){var a=k*Math.SQRT2/2,o=a/Math.SQRT2,r=t+o,s=e+o;D.canvas.drawPoint(x,i.pointStyle,a,r,s)}else n||x.strokeRect(t,e,M,k),x.fillRect(t,e,M,k);x.restore()}}(u,d,t),w[e].left=u,w[e].top=d,i=t,n=s,o=M+(a=k/2)+u,r=d+a,x.fillText(i.text,o,r),i.hidden&&(x.beginPath(),x.lineWidth=2,x.moveTo(o,r),x.lineTo(o+n,r),x.stroke()),C?b.x+=l+f.padding:b.y+=S})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l<s.length;++l){var u=s[l];if(o>=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function s(t,e){var i=new r({ctx:t.ctx,options:e,chart:t});a.configure(t,i,e),a.addBox(t,i),t.legend=i}e.exports={id:"legend",_element:r,beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(D.mergeIf(e,_.global.legend),i?(a.configure(t,i,e),i.options=e):s(t,e)):i&&(a.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{26:26,27:27,31:31,46:46}],53:[function(t,e,i){"use strict";var M=t(26),n=t(27),w=t(46),a=t(31),o=w.noop;M._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var r=n.extend({initialize:function(t){w.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:o,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:o,beforeSetDimensions:o,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:o,beforeBuildLabels:o,buildLabels:o,afterBuildLabels:o,beforeFit:o,fit:function(){var t=this,e=w.valueOrDefault,i=t.options,n=i.display,a=e(i.fontSize,M.global.defaultFontSize),o=t.minSize,r=w.isArray(i.text)?i.text.length:1,s=w.options.toLineHeight(i.lineHeight,a),l=n?r*s+2*i.padding:0;t.isHorizontal()?(o.width=t.maxWidth,o.height=l):(o.width=l,o.height=t.maxHeight),t.width=o.width,t.height=o.height},afterFit:o,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=w.valueOrDefault,n=t.options,a=M.global;if(n.display){var o,r,s,l=i(n.fontSize,a.defaultFontSize),u=i(n.fontStyle,a.defaultFontStyle),d=i(n.fontFamily,a.defaultFontFamily),c=w.fontString(l,u,d),h=w.options.toLineHeight(n.lineHeight,l),f=h/2+n.padding,g=0,p=t.top,m=t.left,v=t.bottom,b=t.right;e.fillStyle=i(n.fontColor,a.defaultFontColor),e.font=c,t.isHorizontal()?(r=m+(b-m)/2,s=p+f,o=b-m):(r="left"===n.position?m+f:b-f,s=p+(v-p)/2,o=v-p,g=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(r,s),e.rotate(g),e.textAlign="center",e.textBaseline="middle";var x=n.text;if(w.isArray(x))for(var y=0,k=0;k<x.length;++k)e.fillText(x[k],0,y,o),y+=h;else e.fillText(x,0,0,o);e.restore()}}});function s(t,e){var i=new r({ctx:t.ctx,options:e,chart:t});a.configure(t,i,e),a.addBox(t,i),t.titleBlock=i}e.exports={id:"title",_element:r,beforeInit:function(t){var e=t.options.title;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(w.mergeIf(e,M.global.title),i?(a.configure(t,i,e),i.options=e):s(t,e)):i&&(a.removeBox(t,i),delete t.titleBlock)}}},{26:26,27:27,31:31,46:46}],54:[function(t,e,i){"use strict";var n=t(33),a=t(34);e.exports=function(){var t=n.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,a=i.isHorizontal();return n.yLabels&&!a?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var r=n.getLabels().indexOf(t);e=-1!==r?r:e}if(n.isHorizontal()){var s=n.width/o,l=s*(e-n.minIndex);return a&&(l+=s/2),n.left+Math.round(l)}var u=n.height/o,d=u*(e-n.minIndex);return a&&(d+=u/2),n.top+Math.round(d)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/n;return t-=a?e.left:e.top,i&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}});a.registerScaleType("category",t,{position:"bottom"})}},{33:33,34:34}],55:[function(t,e,i){"use strict";var n=t(26),c=t(46),a=t(34),o=t(35);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){var r=this,s=r.options,l=r.chart,t=l.data.datasets,e=r.isHorizontal();function u(t){return e?t.xAxisID===r.id:t.yAxisID===r.id}r.min=null,r.max=null;var n=s.stacked;if(void 0===n&&c.each(t,function(t,e){if(!n){var i=l.getDatasetMeta(e);l.isDatasetVisible(e)&&u(i)&&void 0!==i.stack&&(n=!0)}}),s.stacked||n){var d={};c.each(t,function(t,e){var n=l.getDatasetMeta(e),i=[n.type,void 0===s.stacked&&void 0===n.stack?e:"",n.stack].join(".");void 0===d[i]&&(d[i]={positiveValues:[],negativeValues:[]});var a=d[i].positiveValues,o=d[i].negativeValues;l.isDatasetVisible(e)&&u(n)&&c.each(t.data,function(t,e){var i=+r.getRightValue(t);isNaN(i)||n.data[e].hidden||(a[e]=a[e]||0,o[e]=o[e]||0,s.relativePoints?a[e]=100:i<0?o[e]+=i:a[e]+=i)})}),c.each(d,function(t){var e=t.positiveValues.concat(t.negativeValues),i=c.min(e),n=c.max(e);r.min=null===r.min?i:Math.min(r.min,i),r.max=null===r.max?n:Math.max(r.max,n)})}else c.each(t,function(t,e){var n=l.getDatasetMeta(e);l.isDatasetVisible(e)&&u(n)&&c.each(t.data,function(t,e){var i=+r.getRightValue(t);isNaN(i)||n.data[e].hidden||(null===r.min?r.min=i:i<r.min&&(r.min=i),null===r.max?r.max=i:i>r.max&&(r.max=i))})});r.min=isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=isFinite(r.max)&&!isNaN(r.max)?r.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=c.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});a.registerScaleType("linear",i,e)}},{26:26,34:34,35:35,46:46}],56:[function(t,e,i){"use strict";var c=t(46),n=t(33);e.exports=function(t){var e=c.noop;t.LinearScaleBase=n.extend({getRightValue:function(t){return"string"==typeof t?+t:n.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=c.sign(t.min),n=c.sign(t.max);i<0&&n<0?t.max=0:0<i&&0<n&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,o=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!==o&&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:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:c.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var i,n,a,o=[];if(t.stepSize&&0<t.stepSize)a=t.stepSize;else{var r=c.niceNum(e.max-e.min,!1);a=c.niceNum(r/(t.maxTicks-1),!0),void 0!==(n=t.precision)&&(i=Math.pow(10,n),a=Math.ceil(a*i)/i)}var s=Math.floor(e.min/a)*a,l=Math.ceil(e.max/a)*a;c.isNullOrUndef(t.min)||c.isNullOrUndef(t.max)||!t.stepSize||c.almostWhole((t.max-t.min)/t.stepSize,a/1e3)&&(s=t.min,l=t.max);var u=(l-s)/a;u=c.almostEquals(u,Math.round(u),a/1e3)?Math.round(u):Math.ceil(u),a<(n=1)&&(n=Math.pow(10,1-Math.floor(c.log10(a))),s=Math.round(s*n)/n,l=Math.round(l*n)/n),o.push(void 0!==t.min?t.min:s);for(var d=1;d<u;++d)o.push(Math.round((s+d*a)*n)/n);return o.push(void 0!==t.max?t.max:l),o}(n,t);t.handleDirectionalChanges(),t.max=c.max(a),t.min=c.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),n.prototype.convertTicksToLabels.call(t)}})}},{33:33,46:46}],57:[function(t,e,i){"use strict";var h=t(46),n=t(33),a=t(34),o=t(35);e.exports=function(c){var t={position:"left",ticks:{callback:o.formatters.logarithmic}},e=n.extend({determineDataLimits:function(){var r=this,i=r.options,s=r.chart,t=s.data.datasets,e=r.isHorizontal();function l(t){return e?t.xAxisID===r.id:t.yAxisID===r.id}r.min=null,r.max=null,r.minNotZero=null;var n=i.stacked;if(void 0===n&&h.each(t,function(t,e){if(!n){var i=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(i)&&void 0!==i.stack&&(n=!0)}}),i.stacked||n){var u={};h.each(t,function(t,e){var a=s.getDatasetMeta(e),o=[a.type,void 0===i.stacked&&void 0===a.stack?e:"",a.stack].join(".");s.isDatasetVisible(e)&&l(a)&&(void 0===u[o]&&(u[o]=[]),h.each(t.data,function(t,e){var i=u[o],n=+r.getRightValue(t);isNaN(n)||a.data[e].hidden||n<0||(i[e]=i[e]||0,i[e]+=n)}))}),h.each(u,function(t){if(0<t.length){var e=h.min(t),i=h.max(t);r.min=null===r.min?e:Math.min(r.min,e),r.max=null===r.max?i:Math.max(r.max,i)}})}else h.each(t,function(t,e){var n=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(n)&&h.each(t.data,function(t,e){var i=+r.getRightValue(t);isNaN(i)||n.data[e].hidden||i<0||(null===r.min?r.min=i:i<r.min&&(r.min=i),null===r.max?r.max=i:i>r.max&&(r.max=i),0!==i&&(null===r.minNotZero||i<r.minNotZero)&&(r.minNotZero=i))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,i=h.valueOrDefault;t.min=i(e.min,t.min),t.max=i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(h.log10(t.min))-1),t.max=Math.pow(10,Math.floor(h.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(h.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(h.log10(t.min))+1):10),null===t.minNotZero&&(0<t.min?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(h.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:e.min,max:e.max},a=t.ticks=function(t,e){var i,n,a=[],o=h.valueOrDefault,r=o(t.min,Math.pow(10,Math.floor(h.log10(e.min)))),s=Math.floor(h.log10(e.max)),l=Math.ceil(e.max/Math.pow(10,s));0===r?(i=Math.floor(h.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(r),r=n*Math.pow(10,i)):(i=Math.floor(h.log10(r)),n=Math.floor(r/Math.pow(10,i)));for(var u=i<0?Math.pow(10,Math.abs(i)):1;a.push(r),10==++n&&(n=1,u=0<=++i?1:u),r=Math.round(n*Math.pow(10,i)*u)/u,i<s||i===s&&n<l;);var d=o(t.max,r);return a.push(d),a}(n,t);t.max=h.max(a),t.min=h.min(a),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),n.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(h.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(t){var e,i,n,a,o,r=this,s=r.options.ticks.reverse,l=h.log10,u=r._getFirstTickValue(r.minNotZero),d=0;return t=+r.getRightValue(t),o=s?(n=r.end,a=r.start,-1):(n=r.start,a=r.end,1),i=r.isHorizontal()?(e=r.width,s?r.right:r.left):(e=r.height,o*=-1,s?r.top:r.bottom),t!==n&&(0===n&&(e-=d=h.getValueOrDefault(r.options.ticks.fontSize,c.defaults.global.defaultFontSize),n=u),0!==t&&(d+=e/(l(a)-l(n))*(l(t)-l(n))),i+=o*d),i},getValueForPixel:function(t){var e,i,n,a,o=this,r=o.options.ticks.reverse,s=h.log10,l=o._getFirstTickValue(o.minNotZero);if(n=r?(i=o.end,o.start):(i=o.start,o.end),(a=o.isHorizontal()?(e=o.width,r?o.right-t:t-o.left):(e=o.height,r?t-o.top:o.bottom-t))!==i){if(0===i){var u=h.getValueOrDefault(o.options.ticks.fontSize,c.defaults.global.defaultFontSize);a-=u,e-=u,i=l}a*=s(n)-s(i),a/=e,a=Math.pow(10,s(i)+a)}return a}});a.registerScaleType("logarithmic",e,t)}},{33:33,34:34,35:35,46:46}],58:[function(t,e,i){"use strict";var n=t(26),k=t(46),a=t(34),o=t(35);e.exports=function(e){var v=n.global,t={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function b(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function x(t){var e=t.options.pointLabels,i=k.valueOrDefault(e.fontSize,v.defaultFontSize),n=k.valueOrDefault(e.fontStyle,v.defaultFontStyle),a=k.valueOrDefault(e.fontFamily,v.defaultFontFamily);return{size:i,style:n,family:a,font:k.fontString(i,n,a)}}function m(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||a<t?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function y(t,e,i,n){if(k.isArray(e))for(var a=i.y,o=1.5*n,r=0;r<e.length;++r)t.fillText(e[r],i.x,a),a+=o;else t.fillText(e,i.x,i.y)}function s(t){return k.isNumber(t)?t:0}var i=e.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=k.min([t.height,t.width]),a=k.valueOrDefault(i.fontSize,v.defaultFontSize);t.drawingArea=e.display?n/2-(a/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var a=this,i=a.chart,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;k.each(i.data.datasets,function(t,e){if(i.isDatasetVisible(e)){var n=i.getDatasetMeta(e);k.each(t.data,function(t,e){var i=+a.getRightValue(t);isNaN(i)||n.data[e].hidden||(o=Math.min(i,o),r=Math.max(i,r))})}}),a.min=o===Number.POSITIVE_INFINITY?0:o,a.max=r===Number.NEGATIVE_INFINITY?0:r,a.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=k.valueOrDefault(t.fontSize,v.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var t=this;e.LinearScaleBase.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,a=x(t),o=Math.min(t.height/2,t.width/2),r={r:t.width,l:0,t:t.height,b:0},s={};t.ctx.font=a.font,t._pointLabelSizes=[];var l,u,d,c=b(t);for(e=0;e<c;e++){n=t.getPointPosition(e,o),l=t.ctx,u=a.size,d=t.pointLabels[e]||"",i=k.isArray(d)?{w:k.longestText(l,l.font,d),h:d.length*u+1.5*(d.length-1)*u}:{w:l.measureText(d).width,h:u},t._pointLabelSizes[e]=i;var h=t.getIndexAngle(e),f=k.toDegrees(h)%360,g=m(f,n.x,i.w,0,180),p=m(f,n.y,i.h,90,270);g.start<r.l&&(r.l=g.start,s.l=h),g.end>r.r&&(r.r=g.end,s.r=h),p.start<r.t&&(r.t=p.start,s.t=h),p.end>r.b&&(r.b=p.end,s.b=h)}t.setReductions(o,r,s)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),a=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),r=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=s(n),a=s(a),o=s(o),r=s(r),this.drawingArea=Math.min(Math.round(t-(n+a)/2),Math.round(t-(o+r)/2)),this.setCenterPoint(n,a,o,r)},setCenterPoint:function(t,e,i,n){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,s=i+a.drawingArea,l=a.height-n-a.drawingArea;a.xCenter=Math.round((r+o)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/b(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0)},draw:function(){var o=this,t=o.options,r=t.gridLines,s=t.ticks,l=k.valueOrDefault;if(t.display){var u=o.ctx,d=this.getIndexAngle(0),c=l(s.fontSize,v.defaultFontSize),e=l(s.fontStyle,v.defaultFontStyle),i=l(s.fontFamily,v.defaultFontFamily),h=k.fontString(c,e,i);k.each(o.ticks,function(t,e){if(0<e||s.reverse){var i=o.getDistanceFromCenterForValue(o.ticksAsNumbers[e]);if(r.display&&0!==e&&function(t,e,i,n){var a=t.ctx;if(a.strokeStyle=k.valueAtIndexOrDefault(e.color,n-1),a.lineWidth=k.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)a.beginPath(),a.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),a.closePath(),a.stroke();else{var o=b(t);if(0===o)return;a.beginPath();var r=t.getPointPosition(0,i);a.moveTo(r.x,r.y);for(var s=1;s<o;s++)r=t.getPointPosition(s,i),a.lineTo(r.x,r.y);a.closePath(),a.stroke()}}(o,r,i,e),s.display){var n=l(s.fontColor,v.defaultFontColor);if(u.font=h,u.save(),u.translate(o.xCenter,o.yCenter),u.rotate(d),s.showLabelBackdrop){var a=u.measureText(t).width;u.fillStyle=s.backdropColor,u.fillRect(-a/2-s.backdropPaddingX,-i-c/2-s.backdropPaddingY,a+2*s.backdropPaddingX,c+2*s.backdropPaddingY)}u.textAlign="center",u.textBaseline="middle",u.fillStyle=n,u.fillText(t,0,-i),u.restore()}}}),(t.angleLines.display||t.pointLabels.display)&&function(t){var e=t.ctx,i=t.options,n=i.angleLines,a=i.pointLabels;e.lineWidth=n.lineWidth,e.strokeStyle=n.color;var o,r,s,l,u=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),d=x(t);e.textBaseline="top";for(var c=b(t)-1;0<=c;c--){if(n.display){var h=t.getPointPosition(c,u);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(h.x,h.y),e.stroke(),e.closePath()}if(a.display){var f=t.getPointPosition(c,u+5),g=k.valueAtIndexOrDefault(a.fontColor,c,v.defaultFontColor);e.font=d.font,e.fillStyle=g;var p=t.getIndexAngle(c),m=k.toDegrees(p);e.textAlign=0===(l=m)||180===l?"center":l<180?"left":"right",o=m,r=t._pointLabelSizes[c],s=f,90===o||270===o?s.y-=r.h/2:(270<o||o<90)&&(s.y-=r.h),y(e,t.pointLabels[c]||"",f,d.size)}}}(o)}}});a.registerScaleType("radialLinear",i,t)}},{26:26,34:34,35:35,46:46}],59:[function(t,e,i){"use strict";var x=t(1);x="function"==typeof x?x:window.moment;var r=t(26),m=t(46),n=t(33),a=t(34),p=Number.MIN_SAFE_INTEGER||-9007199254740991,v=Number.MAX_SAFE_INTEGER||9007199254740991,y={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},k=Object.keys(y);function b(t,e){return t-e}function M(t){var e,i,n,a={},o=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,o.push(n));return o}function w(t,e,i,n){var a=function(t,e,i){for(var n,a,o,r=0,s=t.length-1;0<=r&&r<=s;){if(a=t[(n=r+s>>1)-1]||null,o=t[n],!a)return{lo:null,hi:o};if(o[e]<i)r=n+1;else{if(!(a[e]>i))return{lo:a,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=r[e]-o[e],l=s?(i-o[e])/s:0,u=(r[n]-o[n])*l;return o[n]+u}function C(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?x(t,n):(t instanceof x||(t=x(t)),t.isValid()?t:"function"==typeof n?n(t):t)}function S(t,e){if(m.isNullOrUndef(t))return null;var i=e.options.time,n=C(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function _(t){for(var e=k.indexOf(t)+1,i=k.length;e<i;++e)if(y[k[e]].common)return k[e]}function D(t,e,i,n){var a,o=n.time,r=o.unit||function(t,e,i,n){var a,o,r,s=k.length;for(a=k.indexOf(t);a<s-1;++a)if(r=(o=y[k[a]]).steps?o.steps[o.steps.length-1]:v,o.common&&Math.ceil((i-e)/(r*o.size))<=n)return k[a];return k[s-1]}(o.minUnit,t,e,i),s=_(r),l=m.valueOrDefault(o.stepSize,o.unitStepSize),u="week"===r&&o.isoWeekday,d=n.ticks.major.enabled,c=y[r],h=x(t),f=x(e),g=[];for(l||(l=function(t,e,i,n){var a,o,r,s=e-t,l=y[i],u=l.size,d=l.steps;if(!d)return Math.ceil(s/(n*u));for(a=0,o=d.length;a<o&&(r=d[a],!(Math.ceil(s/(u*r))<=n));++a);return r}(t,e,r,i)),u&&(h=h.isoWeekday(u),f=f.isoWeekday(u)),h=h.startOf(u?"day":r),(f=f.startOf(u?"day":r))<e&&f.add(1,r),a=x(h),d&&s&&!u&&!o.round&&(a.startOf(s),a.add(~~((h-a)/(c.size*l))*l,r));a<f;a.add(l,r))g.push(+a);return g.push(+a),g}e.exports=function(){var t=n.extend({initialize:function(){if(!x)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),n.prototype.initialize.call(this)},update:function(){var t=this.options;return t.time&&t.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),n.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),n.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,a,o,r=this,s=r.chart,l=r.options.time,u=l.unit||"day",d=v,c=p,h=[],f=[],g=[];for(t=0,i=s.data.labels.length;t<i;++t)g.push(S(s.data.labels[t],r));for(t=0,i=(s.data.datasets||[]).length;t<i;++t)if(s.isDatasetVisible(t))if(a=s.data.datasets[t].data,m.isObject(a[0]))for(f[t]=[],e=0,n=a.length;e<n;++e)o=S(a[e],r),h.push(o),f[t][e]=o;else h.push.apply(h,g),f[t]=g.slice(0);else f[t]=[];g.length&&(g=M(g).sort(b),d=Math.min(d,g[0]),c=Math.max(c,g[g.length-1])),h.length&&(h=M(h).sort(b),d=Math.min(d,h[0]),c=Math.max(c,h[h.length-1])),d=S(l.min,r)||d,c=S(l.max,r)||c,d=d===v?+x().startOf(u):d,c=c===p?+x().endOf(u)+1:c,r.min=Math.min(d,c),r.max=Math.max(d+1,c),r._horizontal=r.isHorizontal(),r._table=[],r._timestamps={data:h,datasets:f,labels:g}},buildTicks:function(){var t,e,i,n,a,o,r,s,l,u,d,c,h=this,f=h.min,g=h.max,p=h.options,m=p.time,v=[],b=[];switch(p.ticks.source){case"data":v=h._timestamps.data;break;case"labels":v=h._timestamps.labels;break;case"auto":default:v=D(f,g,h.getLabelCapacity(f),p)}for("ticks"===p.bounds&&v.length&&(f=v[0],g=v[v.length-1]),f=S(m.min,h)||f,g=S(m.max,h)||g,t=0,e=v.length;t<e;++t)f<=(i=v[t])&&i<=g&&b.push(i);return h.min=f,h.max=g,h._unit=m.unit||function(t,e,i,n){var a,o,r=x.duration(x(n).diff(x(i)));for(a=k.length-1;a>=k.indexOf(e);a--)if(o=k[a],y[o].common&&r.as(o)>=t.length)return o;return k[e?k.indexOf(e):0]}(b,m.minUnit,h.min,h.max),h._majorUnit=_(h._unit),h._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,u=[],d=[e];for(a=0,o=t.length;a<o;++a)e<(s=t[a])&&s<i&&d.push(s);for(d.push(i),a=0,o=d.length;a<o;++a)l=d[a+1],r=d[a-1],s=d[a],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||u.push({time:s,pos:a/(o-1)});return u}(h._timestamps.data,f,g,p.distribution),h._offsets=(n=h._table,a=b,o=f,r=g,c=d=0,(s=p).offset&&a.length&&(s.time.min||(l=1<a.length?a[1]:r,u=a[0],d=(w(n,"time",l,"pos")-w(n,"time",u,"pos"))/2),s.time.max||(l=a[a.length-1],u=1<a.length?a[a.length-2]:o,c=(w(n,"time",l,"pos")-w(n,"time",u,"pos"))/2)),{left:d,right:c}),h._labelFormat=function(t,e){var i,n,a,o=t.length;for(i=0;i<o;i++){if(0!==(n=C(t[i],e)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(a=!0)}return a?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(h._timestamps.data,m),function(t,e){var i,n,a,o,r=[];for(i=0,n=t.length;i<n;++i)a=t[i],o=!!e&&a===+x(a).startOf(e),r.push({value:a,major:o});return r}(b,h._majorUnit)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.options.time,a=i.labels&&t<i.labels.length?i.labels[t]:"",o=i.datasets[e].data[t];return m.isObject(o)&&(a=this.getRightValue(o)),n.tooltipFormat?C(a,n).format(n.tooltipFormat):"string"==typeof a?a:C(a,n).format(this._labelFormat)},tickFormatFunction:function(t,e,i,n){var a=this.options,o=t.valueOf(),r=a.time.displayFormats,s=r[this._unit],l=this._majorUnit,u=r[l],d=t.clone().startOf(l).valueOf(),c=a.ticks.major,h=c.enabled&&l&&u&&o===d,f=t.format(n||(h?u:s)),g=h?c:a.ticks.minor,p=m.valueOrDefault(g.callback,g.userCallback);return p?p(f,e,i):f},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(x(t[e].value),e,t));return n},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=w(e._table,"time",t,"pos");return n+i*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=S(t,this)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=(i?(t-n)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,o=w(e._table,"pos",a,"time");return x(o)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=m.toRadians(e.maxRotation),a=Math.cos(n),o=Math.sin(n);return i*a+m.valueOrDefault(e.fontSize,r.global.defaultFontSize)*o},getLabelCapacity:function(t){var e=this.options.time.displayFormats.millisecond,i=this.tickFormatFunction(x(t),0,[],e),n=this.getLabelWidth(i),a=this.isHorizontal()?this.width:this.height,o=Math.floor(a/n);return 0<o?o:1}});a.registerScaleType("time",t,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{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"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{1:1,26:26,33:33,34:34,46:46}]},{},[7])(7)});
assets/js/tinymce.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ jQuery( document ).on( 'tinymce-editor-setup', function( event, editor ) {
3
+ editor.addButton( 'wp_statistic_tc_button', {
4
+ text: '',
5
+ tooltip: editor.getLang('wp_statistic_tinymce_plugin.insert'),
6
+ icon: 'icon-statistic dashicons-chart-pie',
7
+ onclick: function() {
8
+ editor.windowManager.open({
9
+ title: editor.getLang('wp_statistic_tinymce_plugin.insert'),
10
+ minWidth: 500,
11
+ minHeight: 480,
12
+ body: [
13
+ {
14
+ type: 'listbox',
15
+ name: 'stat',
16
+ label: editor.getLang('wp_statistic_tinymce_plugin.stat'),
17
+ 'values': [
18
+ {text: editor.getLang('wp_statistic_tinymce_plugin.usersonline'), value: 'usersonline'},
19
+ {text: editor.getLang('wp_statistic_tinymce_plugin.visits'), value: 'visits'},
20
+ {text: editor.getLang('wp_statistic_tinymce_plugin.visitors'), value: 'visitors'},
21
+ {text: editor.getLang('wp_statistic_tinymce_plugin.pagevisits'), value: 'pagevisits'},
22
+ {text: editor.getLang('wp_statistic_tinymce_plugin.searches'), value: 'searches'},
23
+ {text: editor.getLang('wp_statistic_tinymce_plugin.postcount'), value: 'postcount'},
24
+ {text: editor.getLang('wp_statistic_tinymce_plugin.pagecount'), value: 'pagecount'},
25
+ {text: editor.getLang('wp_statistic_tinymce_plugin.commentcount'), value: 'commentcount'},
26
+ {text: editor.getLang('wp_statistic_tinymce_plugin.spamcount'), value: 'spamcount'},
27
+ {text: editor.getLang('wp_statistic_tinymce_plugin.usercount'), value: 'usercount'},
28
+ {text: editor.getLang('wp_statistic_tinymce_plugin.postaverage'), value: 'postaverage'},
29
+ {text: editor.getLang('wp_statistic_tinymce_plugin.commentaverage'), value: 'commentaverage'},
30
+ {text: editor.getLang('wp_statistic_tinymce_plugin.useraverage'), value: 'useraverage'},
31
+ {text: editor.getLang('wp_statistic_tinymce_plugin.lpd'), value: 'lpd'},
32
+ {text: editor.getLang('wp_statistic_tinymce_plugin.referrer'), value: 'referrer'},
33
+ ]
34
+ },
35
+ {
36
+ type : 'container',
37
+ html : '<div class="wp-statistic-mce-desc">' + editor.getLang('wp_statistic_tinymce_plugin.help_stat') + ' </div>'
38
+ },
39
+ {
40
+ type: 'listbox',
41
+ name: 'time',
42
+ label: editor.getLang('wp_statistic_tinymce_plugin.time'),
43
+ 'values': [
44
+ {text: editor.getLang('wp_statistic_tinymce_plugin.se'), value: '0'},
45
+ {text: editor.getLang('wp_statistic_tinymce_plugin.today'), value: 'today'},
46
+ {text: editor.getLang('wp_statistic_tinymce_plugin.yesterday'), value: 'yesterday'},
47
+ {text: editor.getLang('wp_statistic_tinymce_plugin.week'), value: 'week'},
48
+ {text: editor.getLang('wp_statistic_tinymce_plugin.month'), value: 'month'},
49
+ {text: editor.getLang('wp_statistic_tinymce_plugin.year'), value: 'year'},
50
+ {text: editor.getLang('wp_statistic_tinymce_plugin.total'), value: 'total'}
51
+ ]
52
+ },
53
+ {
54
+ type : 'container',
55
+ html : '<div class="wp-statistic-mce-desc">' + editor.getLang('wp_statistic_tinymce_plugin.help_time') + '</div>'
56
+ },
57
+ {
58
+ type: 'textbox',
59
+ name: 'provider',
60
+ label: editor.getLang('wp_statistic_tinymce_plugin.provider'),
61
+ },
62
+ {
63
+ type : 'container',
64
+ html : '<div class="wp-statistic-mce-desc">' + editor.getLang('wp_statistic_tinymce_plugin.help_provider') + '</div>'
65
+ },
66
+ {
67
+ type: 'textbox',
68
+ name: 'format',
69
+ label: editor.getLang('wp_statistic_tinymce_plugin.format'),
70
+ },
71
+ {
72
+ type : 'container',
73
+ html : '<div class="wp-statistic-mce-desc">' + editor.getLang('wp_statistic_tinymce_plugin.help_format') + '</div>'
74
+ },
75
+ {
76
+ type: 'textbox',
77
+ name: 'id',
78
+ label: editor.getLang('wp_statistic_tinymce_plugin.id'),
79
+ },
80
+ {
81
+ type : 'container',
82
+ html : '<div class="wp-statistic-mce-desc">' + editor.getLang('wp_statistic_tinymce_plugin.help_id') + '</div>'
83
+ },
84
+ ],
85
+ onsubmit: function( e ) {
86
+ var wp_statistice_shortcode = '[wpstatistics stat=' + e.data.stat;
87
+ if(e.data.time !=='0') {wp_statistice_shortcode +=' time=' + e.data.time;}
88
+ var wp_statistic_type = ["provider", "format", "id"];
89
+ wp_statistic_type.forEach(function(entry) {
90
+ if(e.data[entry] !=='') {
91
+ wp_statistice_shortcode +=' ' + entry + '=' + e.data[entry];
92
+ }
93
+ });
94
+ wp_statistice_shortcode +=']';
95
+ editor.insertContent(wp_statistice_shortcode);
96
+ }
97
+ });
98
+ }
99
+ });
100
+ });
101
+ })();
composer.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
  "require": {
3
- "geoip2/geoip2": "^2.7.0",
4
  "s1lentium/iptools": "^1.1.0",
5
- "donatj/phpuseragentparser": "^0.9.0",
6
- "browscap/browscap-php": "3.1.0",
7
  "erusev/parsedown": "^1.6"
8
  },
9
  "config": {
1
  {
2
  "require": {
3
+ "geoip2/geoip2": "^2.9.0",
4
  "s1lentium/iptools": "^1.1.0",
5
+ "whichbrowser/parser": "2.0.37",
6
+ "jaybizzle/crawler-detect": "1.2.69",
7
  "erusev/parsedown": "^1.6"
8
  },
9
  "config": {
composer.lock CHANGED
@@ -1,1251 +1,479 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
- "This file is @generated automatically"
6
- ],
7
- "content-hash": "a78ff495b1ab570d41df716b5cd5526f",
8
- "packages": [
9
- {
10
- "name": "browscap/browscap-php",
11
- "version": "3.1.0",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/browscap/browscap-php.git",
15
- "reference": "d46c0cf6d0a3d7dea895dc2c97a0ec374a89bbd9"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/browscap/browscap-php/zipball/d46c0cf6d0a3d7dea895dc2c97a0ec374a89bbd9",
20
- "reference": "d46c0cf6d0a3d7dea895dc2c97a0ec374a89bbd9",
21
- "shasum": ""
22
- },
23
- "require": {
24
- "guzzlehttp/guzzle": "^6.2",
25
- "mimmi20/wurflcache": "^1.3",
26
- "monolog/monolog": "^1.7",
27
- "php": "^5.6 || ^7.0",
28
- "symfony/console": "^2.6 || ^3.0",
29
- "symfony/filesystem": "^2.6 || ^3.0",
30
- "symfony/finder": "^2.6 || ^3.0"
31
- },
32
- "require-dev": {
33
- "friendsofphp/php-cs-fixer": "^1.11",
34
- "mikey179/vfsstream": "^1.6",
35
- "phpunit/phpunit": "^5.3",
36
- "squizlabs/php_codesniffer": "^2.5"
37
- },
38
- "suggest": {
39
- "ext-curl": "to use curl requests to get the ini file"
40
- },
41
- "bin": [
42
- "bin/browscap-php"
43
- ],
44
- "type": "library",
45
- "autoload": {
46
- "psr-4": {
47
- "BrowscapPHP\\": "src/"
48
- }
49
- },
50
- "notification-url": "https://packagist.org/downloads/",
51
- "license": [
52
- "MIT"
53
- ],
54
- "authors": [
55
- {
56
- "name": "Jonathan Stoppani",
57
- "email": "jonathan.stoppani@gmail.com"
58
- },
59
- {
60
- "name": "Thomas Mueller",
61
- "email": "t_mueller_stolzenhain@yahoo.de"
62
- },
63
- {
64
- "name": "James Titcumb",
65
- "email": "james@asgrim.com"
66
- }
67
- ],
68
- "description": "Standalone replacement for php's native get_browser() function",
69
- "homepage": "https://github.com/browscap/browscap-php",
70
- "keywords": [
71
- "browser",
72
- "capabilities",
73
- "get_browser",
74
- "user agent"
75
- ],
76
- "time": "2017-03-28T13:29:55+00:00"
77
- },
78
- {
79
- "name": "composer/ca-bundle",
80
- "version": "1.1.2",
81
- "source": {
82
- "type": "git",
83
- "url": "https://github.com/composer/ca-bundle.git",
84
- "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0"
85
- },
86
- "dist": {
87
- "type": "zip",
88
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0",
89
- "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0",
90
- "shasum": ""
91
- },
92
- "require": {
93
- "ext-openssl": "*",
94
- "ext-pcre": "*",
95
- "php": "^5.3.2 || ^7.0"
96
- },
97
- "require-dev": {
98
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
99
- "psr/log": "^1.0",
100
- "symfony/process": "^2.5 || ^3.0 || ^4.0"
101
- },
102
- "type": "library",
103
- "extra": {
104
- "branch-alias": {
105
- "dev-master": "1.x-dev"
106
- }
107
- },
108
- "autoload": {
109
- "psr-4": {
110
- "Composer\\CaBundle\\": "src"
111
- }
112
- },
113
- "notification-url": "https://packagist.org/downloads/",
114
- "license": [
115
- "MIT"
116
- ],
117
- "authors": [
118
- {
119
- "name": "Jordi Boggiano",
120
- "email": "j.boggiano@seld.be",
121
- "homepage": "http://seld.be"
122
- }
123
- ],
124
- "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
125
- "keywords": [
126
- "cabundle",
127
- "cacert",
128
- "certificate",
129
- "ssl",
130
- "tls"
131
- ],
132
- "time": "2018-08-08T08:57:40+00:00"
133
- },
134
- {
135
- "name": "donatj/phpuseragentparser",
136
- "version": "v0.9.0",
137
- "source": {
138
- "type": "git",
139
- "url": "https://github.com/donatj/PhpUserAgent.git",
140
- "reference": "ea79de6a18e52285e62cd75cf1cebe276ecaf503"
141
- },
142
- "dist": {
143
- "type": "zip",
144
- "url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/ea79de6a18e52285e62cd75cf1cebe276ecaf503",
145
- "reference": "ea79de6a18e52285e62cd75cf1cebe276ecaf503",
146
- "shasum": ""
147
- },
148
- "require": {
149
- "php": ">=5.3.0"
150
- },
151
- "require-dev": {
152
- "camspiers/json-pretty": "0.1.*",
153
- "donatj/drop": "*",
154
- "phpunit/phpunit": "~4.8"
155
- },
156
- "type": "library",
157
- "autoload": {
158
- "files": [
159
- "Source/UserAgentParser.php"
160
- ]
161
- },
162
- "notification-url": "https://packagist.org/downloads/",
163
- "license": [
164
- "MIT"
165
- ],
166
- "authors": [
167
- {
168
- "name": "Jesse G. Donat",
169
- "email": "donatj@gmail.com",
170
- "homepage": "http://donatstudios.com",
171
- "role": "Developer"
172
- }
173
- ],
174
- "description": "Simple, streamlined PHP user-agent parser",
175
- "homepage": "http://donatstudios.com/PHP-Parser-HTTP_USER_AGENT",
176
- "keywords": [
177
- "browser",
178
- "browser detection",
179
- "parser",
180
- "user agent",
181
- "useragent"
182
- ],
183
- "time": "2017-10-23T16:52:52+00:00"
184
- },
185
- {
186
- "name": "erusev/parsedown",
187
- "version": "1.7.1",
188
- "source": {
189
- "type": "git",
190
- "url": "https://github.com/erusev/parsedown.git",
191
- "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1"
192
- },
193
- "dist": {
194
- "type": "zip",
195
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
196
- "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
197
- "shasum": ""
198
- },
199
- "require": {
200
- "ext-mbstring": "*",
201
- "php": ">=5.3.0"
202
- },
203
- "require-dev": {
204
- "phpunit/phpunit": "^4.8.35"
205
- },
206
- "type": "library",
207
- "autoload": {
208
- "psr-0": {
209
- "Parsedown": ""
210
- }
211
- },
212
- "notification-url": "https://packagist.org/downloads/",
213
- "license": [
214
- "MIT"
215
- ],
216
- "authors": [
217
- {
218
- "name": "Emanuil Rusev",
219
- "email": "hello@erusev.com",
220
- "homepage": "http://erusev.com"
221
- }
222
- ],
223
- "description": "Parser for Markdown.",
224
- "homepage": "http://parsedown.org",
225
- "keywords": [
226
- "markdown",
227
- "parser"
228
- ],
229
- "time": "2018-03-08T01:11:30+00:00"
230
- },
231
- {
232
- "name": "geoip2/geoip2",
233
- "version": "v2.9.0",
234
- "source": {
235
- "type": "git",
236
- "url": "https://github.com/maxmind/GeoIP2-php.git",
237
- "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77"
238
- },
239
- "dist": {
240
- "type": "zip",
241
- "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/a807fbf65212eef5d8d2db1a1b31082b53633d77",
242
- "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77",
243
- "shasum": ""
244
- },
245
- "require": {
246
- "maxmind-db/reader": "~1.0",
247
- "maxmind/web-service-common": "~0.5",
248
- "php": ">=5.4"
249
- },
250
- "require-dev": {
251
- "friendsofphp/php-cs-fixer": "2.*",
252
- "phpunit/phpunit": "4.*",
253
- "squizlabs/php_codesniffer": "3.*"
254
- },
255
- "type": "library",
256
- "autoload": {
257
- "psr-4": {
258
- "GeoIp2\\": "src"
259
- }
260
- },
261
- "notification-url": "https://packagist.org/downloads/",
262
- "license": [
263
- "Apache-2.0"
264
- ],
265
- "authors": [
266
- {
267
- "name": "Gregory J. Oschwald",
268
- "email": "goschwald@maxmind.com",
269
- "homepage": "http://www.maxmind.com/"
270
- }
271
- ],
272
- "description": "MaxMind GeoIP2 PHP API",
273
- "homepage": "https://github.com/maxmind/GeoIP2-php",
274
- "keywords": [
275
- "IP",
276
- "geoip",
277
- "geoip2",
278
- "geolocation",
279
- "maxmind"
280
- ],
281
- "time": "2018-04-10T15:32:59+00:00"
282
- },
283
- {
284
- "name": "guzzlehttp/guzzle",
285
- "version": "6.3.3",
286
- "source": {
287
- "type": "git",
288
- "url": "https://github.com/guzzle/guzzle.git",
289
- "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
290
- },
291
- "dist": {
292
- "type": "zip",
293
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
294
- "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
295
- "shasum": ""
296
- },
297
- "require": {
298
- "guzzlehttp/promises": "^1.0",
299
- "guzzlehttp/psr7": "^1.4",
300
- "php": ">=5.5"
301
- },
302
- "require-dev": {
303
- "ext-curl": "*",
304
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
305
- "psr/log": "^1.0"
306
- },
307
- "suggest": {
308
- "psr/log": "Required for using the Log middleware"
309
- },
310
- "type": "library",
311
- "extra": {
312
- "branch-alias": {
313
- "dev-master": "6.3-dev"
314
- }
315
- },
316
- "autoload": {
317
- "files": [
318
- "src/functions_include.php"
319
- ],
320
- "psr-4": {
321
- "GuzzleHttp\\": "src/"
322
- }
323
- },
324
- "notification-url": "https://packagist.org/downloads/",
325
- "license": [
326
- "MIT"
327
- ],
328
- "authors": [
329
- {
330
- "name": "Michael Dowling",
331
- "email": "mtdowling@gmail.com",
332
- "homepage": "https://github.com/mtdowling"
333
- }
334
- ],
335
- "description": "Guzzle is a PHP HTTP client library",
336
- "homepage": "http://guzzlephp.org/",
337
- "keywords": [
338
- "client",
339
- "curl",
340
- "framework",
341
- "http",
342
- "http client",
343
- "rest",
344
- "web service"
345
- ],
346
- "time": "2018-04-22T15:46:56+00:00"
347
- },
348
- {
349
- "name": "guzzlehttp/promises",
350
- "version": "v1.3.1",
351
- "source": {
352
- "type": "git",
353
- "url": "https://github.com/guzzle/promises.git",
354
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
355
- },
356
- "dist": {
357
- "type": "zip",
358
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
359
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
360
- "shasum": ""
361
- },
362
- "require": {
363
- "php": ">=5.5.0"
364
- },
365
- "require-dev": {
366
- "phpunit/phpunit": "^4.0"
367
- },
368
- "type": "library",
369
- "extra": {
370
- "branch-alias": {
371
- "dev-master": "1.4-dev"
372
- }
373
- },
374
- "autoload": {
375
- "psr-4": {
376
- "GuzzleHttp\\Promise\\": "src/"
377
- },
378
- "files": [
379
- "src/functions_include.php"
380
- ]
381
- },
382
- "notification-url": "https://packagist.org/downloads/",
383
- "license": [
384
- "MIT"
385
- ],
386
- "authors": [
387
- {
388
- "name": "Michael Dowling",
389
- "email": "mtdowling@gmail.com",
390
- "homepage": "https://github.com/mtdowling"
391
- }
392
- ],
393
- "description": "Guzzle promises library",
394
- "keywords": [
395
- "promise"
396
- ],
397
- "time": "2016-12-20T10:07:11+00:00"
398
- },
399
- {
400
- "name": "guzzlehttp/psr7",
401
- "version": "1.4.2",
402
- "source": {
403
- "type": "git",
404
- "url": "https://github.com/guzzle/psr7.git",
405
- "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
406
- },
407
- "dist": {
408
- "type": "zip",
409
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
410
- "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
411
- "shasum": ""
412
- },
413
- "require": {
414
- "php": ">=5.4.0",
415
- "psr/http-message": "~1.0"
416
- },
417
- "provide": {
418
- "psr/http-message-implementation": "1.0"
419
- },
420
- "require-dev": {
421
- "phpunit/phpunit": "~4.0"
422
- },
423
- "type": "library",
424
- "extra": {
425
- "branch-alias": {
426
- "dev-master": "1.4-dev"
427
- }
428
- },
429
- "autoload": {
430
- "psr-4": {
431
- "GuzzleHttp\\Psr7\\": "src/"
432
- },
433
- "files": [
434
- "src/functions_include.php"
435
- ]
436
- },
437
- "notification-url": "https://packagist.org/downloads/",
438
- "license": [
439
- "MIT"
440
- ],
441
- "authors": [
442
- {
443
- "name": "Michael Dowling",
444
- "email": "mtdowling@gmail.com",
445
- "homepage": "https://github.com/mtdowling"
446
- },
447
- {
448
- "name": "Tobias Schultze",
449
- "homepage": "https://github.com/Tobion"
450
- }
451
- ],
452
- "description": "PSR-7 message implementation that also provides common utility methods",
453
- "keywords": [
454
- "http",
455
- "message",
456
- "request",
457
- "response",
458
- "stream",
459
- "uri",
460
- "url"
461
- ],
462
- "time": "2017-03-20T17:10:46+00:00"
463
- },
464
- {
465
- "name": "maxmind-db/reader",
466
- "version": "v1.3.0",
467
- "source": {
468
- "type": "git",
469
- "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
470
- "reference": "e042b4f8a2dff41e19019faf16427178b07fbd58"
471
- },
472
- "dist": {
473
- "type": "zip",
474
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/e042b4f8a2dff41e19019faf16427178b07fbd58",
475
- "reference": "e042b4f8a2dff41e19019faf16427178b07fbd58",
476
- "shasum": ""
477
- },
478
- "require": {
479
- "php": ">=5.4"
480
- },
481
- "require-dev": {
482
- "friendsofphp/php-cs-fixer": "2.*",
483
- "phpunit/phpunit": "4.* || 5.*",
484
- "satooshi/php-coveralls": "1.0.*",
485
- "squizlabs/php_codesniffer": "3.*"
486
- },
487
- "suggest": {
488
- "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
489
- "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
490
- "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
491
- },
492
- "type": "library",
493
- "autoload": {
494
- "psr-4": {
495
- "MaxMind\\Db\\": "src/MaxMind/Db"
496
- }
497
- },
498
- "notification-url": "https://packagist.org/downloads/",
499
- "license": [
500
- "Apache-2.0"
501
- ],
502
- "authors": [
503
- {
504
- "name": "Gregory J. Oschwald",
505
- "email": "goschwald@maxmind.com",
506
- "homepage": "http://www.maxmind.com/"
507
- }
508
- ],
509
- "description": "MaxMind DB Reader API",
510
- "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
511
- "keywords": [
512
- "database",
513
- "geoip",
514
- "geoip2",
515
- "geolocation",
516
- "maxmind"
517
- ],
518
- "time": "2018-02-21T21:23:33+00:00"
519
- },
520
- {
521
- "name": "maxmind/web-service-common",
522
- "version": "v0.5.0",
523
- "source": {
524
- "type": "git",
525
- "url": "https://github.com/maxmind/web-service-common-php.git",
526
- "reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b"
527
- },
528
- "dist": {
529
- "type": "zip",
530
- "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/61a9836fa3bb1743ab89752bae5005d71e78c73b",
531
- "reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b",
532
- "shasum": ""
533
- },
534
- "require": {
535
- "composer/ca-bundle": "^1.0.3",
536
- "ext-curl": "*",
537
- "ext-json": "*",
538
- "php": ">=5.4"
539
- },
540
- "require-dev": {
541
- "friendsofphp/php-cs-fixer": "2.*",
542
- "phpunit/phpunit": "4.*",
543
- "squizlabs/php_codesniffer": "3.*"
544
- },
545
- "type": "library",
546
- "autoload": {
547
- "psr-4": {
548
- "MaxMind\\Exception\\": "src/Exception",
549
- "MaxMind\\WebService\\": "src/WebService"
550
- }
551
- },
552
- "notification-url": "https://packagist.org/downloads/",
553
- "license": [
554
- "Apache-2.0"
555
- ],
556
- "authors": [
557
- {
558
- "name": "Gregory Oschwald",
559
- "email": "goschwald@maxmind.com"
560
- }
561
- ],
562
- "description": "Internal MaxMind Web Service API",
563
- "homepage": "https://github.com/maxmind/web-service-common-php",
564
- "time": "2018-02-12T22:31:54+00:00"
565
- },
566
- {
567
- "name": "mimmi20/wurfl-constants",
568
- "version": "1.7.1.1",
569
- "source": {
570
- "type": "git",
571
- "url": "https://github.com/mimmi20/wurfl-constants.git",
572
- "reference": "d0bd0154120cb833dbdf8a8075d5f14bcc521e42"
573
- },
574
- "dist": {
575
- "type": "zip",
576
- "url": "https://api.github.com/repos/mimmi20/wurfl-constants/zipball/d0bd0154120cb833dbdf8a8075d5f14bcc521e42",
577
- "reference": "d0bd0154120cb833dbdf8a8075d5f14bcc521e42",
578
- "shasum": ""
579
- },
580
- "require": {
581
- "php": ">=5.3.3"
582
- },
583
- "require-dev": {
584
- "fabpot/php-cs-fixer": "^1.11",
585
- "phpunit/phpunit": "^4.8|^5.0",
586
- "squizlabs/php_codesniffer": "^2.5"
587
- },
588
- "type": "library",
589
- "autoload": {
590
- "psr-4": {
591
- "Wurfl\\": "src/"
592
- }
593
- },
594
- "notification-url": "https://packagist.org/downloads/",
595
- "license": [
596
- "LGPL-2.1"
597
- ],
598
- "description": "the Constants extracted from Wurfl for PHP 5.3",
599
- "homepage": "https://github.com/mimmi20/wurfl-constants",
600
- "keywords": [
601
- "Wurfl",
602
- "browser",
603
- "http",
604
- "parser",
605
- "user agent",
606
- "user-agent"
607
- ],
608
- "abandoned": true,
609
- "time": "2016-04-23T18:18:10+00:00"
610
- },
611
- {
612
- "name": "mimmi20/wurflcache",
613
- "version": "1.7.1.1",
614
- "source": {
615
- "type": "git",
616
- "url": "https://github.com/mimmi20/WurflCache.git",
617
- "reference": "9fc307df74f782a879f4604ab99bf61ecfc165d4"
618
- },
619
- "dist": {
620
- "type": "zip",
621
- "url": "https://api.github.com/repos/mimmi20/WurflCache/zipball/9fc307df74f782a879f4604ab99bf61ecfc165d4",
622
- "reference": "9fc307df74f782a879f4604ab99bf61ecfc165d4",
623
- "shasum": ""
624
- },
625
- "require": {
626
- "mimmi20/wurfl-constants": "^1.7",
627
- "php": ">=5.3.3",
628
- "symfony/filesystem": "^2.8|^3.0"
629
- },
630
- "require-dev": {
631
- "desarrolla2/cache": "^1.8",
632
- "doctrine/cache": "^1.5",
633
- "fabpot/php-cs-fixer": "^1.11",
634
- "mikey179/vfsstream": "^1.3",
635
- "phpunit/phpunit": "^4.8 || ^5.0",
636
- "squizlabs/php_codesniffer": "^2.0",
637
- "zendframework/zend-cache": "^2.5",
638
- "zetacomponents/cache": "dev-master"
639
- },
640
- "suggest": {
641
- "desarrolla2/cache": "to use other caches handled by desarrolla",
642
- "doctrine/cache": "to use other caches handled by doctrine",
643
- "zendframework/zend-cache": "to use other caches handled by zend",
644
- "zetacomponents/cache": "to use other caches handled by zeta"
645
- },
646
- "type": "library",
647
- "autoload": {
648
- "psr-4": {
649
- "WurflCache\\": "src/"
650
- }
651
- },
652
- "notification-url": "https://packagist.org/downloads/",
653
- "license": [
654
- "MIT"
655
- ],
656
- "authors": [
657
- {
658
- "name": "Thomas Müller",
659
- "homepage": "https://github.com/mimmi20",
660
- "role": "Developer"
661
- },
662
- {
663
- "name": "Contributors",
664
- "homepage": "https://github.com/mimmi20/WurflCache/graphs/contributors"
665
- }
666
- ],
667
- "description": "the Cache Classes for the Wurfl PHP Library for PHP 5.3",
668
- "homepage": "https://github.com/mimmi20/WurflCache",
669
- "keywords": [
670
- "Wurfl",
671
- "cache"
672
- ],
673
- "abandoned": true,
674
- "time": "2016-08-06T11:25:21+00:00"
675
- },
676
- {
677
- "name": "monolog/monolog",
678
- "version": "1.23.0",
679
- "source": {
680
- "type": "git",
681
- "url": "https://github.com/Seldaek/monolog.git",
682
- "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
683
- },
684
- "dist": {
685
- "type": "zip",
686
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
687
- "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
688
- "shasum": ""
689
- },
690
- "require": {
691
- "php": ">=5.3.0",
692
- "psr/log": "~1.0"
693
- },
694
- "provide": {
695
- "psr/log-implementation": "1.0.0"
696
- },
697
- "require-dev": {
698
- "aws/aws-sdk-php": "^2.4.9 || ^3.0",
699
- "doctrine/couchdb": "~1.0@dev",
700
- "graylog2/gelf-php": "~1.0",
701
- "jakub-onderka/php-parallel-lint": "0.9",
702
- "php-amqplib/php-amqplib": "~2.4",
703
- "php-console/php-console": "^3.1.3",
704
- "phpunit/phpunit": "~4.5",
705
- "phpunit/phpunit-mock-objects": "2.3.0",
706
- "ruflin/elastica": ">=0.90 <3.0",
707
- "sentry/sentry": "^0.13",
708
- "swiftmailer/swiftmailer": "^5.3|^6.0"
709
- },
710
- "suggest": {
711
- "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
712
- "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
713
- "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
714
- "ext-mongo": "Allow sending log messages to a MongoDB server",
715
- "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
716
- "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
717
- "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
718
- "php-console/php-console": "Allow sending log messages to Google Chrome",
719
- "rollbar/rollbar": "Allow sending log messages to Rollbar",
720
- "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
721
- "sentry/sentry": "Allow sending log messages to a Sentry server"
722
- },
723
- "type": "library",
724
- "extra": {
725
- "branch-alias": {
726
- "dev-master": "2.0.x-dev"
727
- }
728
- },
729
- "autoload": {
730
- "psr-4": {
731
- "Monolog\\": "src/Monolog"
732
- }
733
- },
734
- "notification-url": "https://packagist.org/downloads/",
735
- "license": [
736
- "MIT"
737
- ],
738
- "authors": [
739
- {
740
- "name": "Jordi Boggiano",
741
- "email": "j.boggiano@seld.be",
742
- "homepage": "http://seld.be"
743
- }
744
- ],
745
- "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
746
- "homepage": "http://github.com/Seldaek/monolog",
747
- "keywords": [
748
- "log",
749
- "logging",
750
- "psr-3"
751
- ],
752
- "time": "2017-06-19T01:22:40+00:00"
753
- },
754
- {
755
- "name": "psr/http-message",
756
- "version": "1.0.1",
757
- "source": {
758
- "type": "git",
759
- "url": "https://github.com/php-fig/http-message.git",
760
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
761
- },
762
- "dist": {
763
- "type": "zip",
764
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
765
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
766
- "shasum": ""
767
- },
768
- "require": {
769
- "php": ">=5.3.0"
770
- },
771
- "type": "library",
772
- "extra": {
773
- "branch-alias": {
774
- "dev-master": "1.0.x-dev"
775
- }
776
- },
777
- "autoload": {
778
- "psr-4": {
779
- "Psr\\Http\\Message\\": "src/"
780
- }
781
- },
782
- "notification-url": "https://packagist.org/downloads/",
783
- "license": [
784
- "MIT"
785
- ],
786
- "authors": [
787
- {
788
- "name": "PHP-FIG",
789
- "homepage": "http://www.php-fig.org/"
790
- }
791
- ],
792
- "description": "Common interface for HTTP messages",
793
- "homepage": "https://github.com/php-fig/http-message",
794
- "keywords": [
795
- "http",
796
- "http-message",
797
- "psr",
798
- "psr-7",
799
- "request",
800
- "response"
801
- ],
802
- "time": "2016-08-06T14:39:51+00:00"
803
- },
804
- {
805
- "name": "psr/log",
806
- "version": "1.0.2",
807
- "source": {
808
- "type": "git",
809
- "url": "https://github.com/php-fig/log.git",
810
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
811
- },
812
- "dist": {
813
- "type": "zip",
814
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
815
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
816
- "shasum": ""
817
- },
818
- "require": {
819
- "php": ">=5.3.0"
820
- },
821
- "type": "library",
822
- "extra": {
823
- "branch-alias": {
824
- "dev-master": "1.0.x-dev"
825
- }
826
- },
827
- "autoload": {
828
- "psr-4": {
829
- "Psr\\Log\\": "Psr/Log/"
830
- }
831
- },
832
- "notification-url": "https://packagist.org/downloads/",
833
- "license": [
834
- "MIT"
835
- ],
836
- "authors": [
837
- {
838
- "name": "PHP-FIG",
839
- "homepage": "http://www.php-fig.org/"
840
- }
841
- ],
842
- "description": "Common interface for logging libraries",
843
- "homepage": "https://github.com/php-fig/log",
844
- "keywords": [
845
- "log",
846
- "psr",
847
- "psr-3"
848
- ],
849
- "time": "2016-10-10T12:19:37+00:00"
850
- },
851
- {
852
- "name": "s1lentium/iptools",
853
- "version": "v1.1.0",
854
- "source": {
855
- "type": "git",
856
- "url": "https://github.com/S1lentium/IPTools.git",
857
- "reference": "cb4843d4077872643b5d38d18b8591b4aaf605ea"
858
- },
859
- "dist": {
860
- "type": "zip",
861
- "url": "https://api.github.com/repos/S1lentium/IPTools/zipball/cb4843d4077872643b5d38d18b8591b4aaf605ea",
862
- "reference": "cb4843d4077872643b5d38d18b8591b4aaf605ea",
863
- "shasum": ""
864
- },
865
- "require": {
866
- "ext-bcmath": "*",
867
- "php": ">=5.4.0"
868
- },
869
- "require-dev": {
870
- "satooshi/php-coveralls": "~1.0"
871
- },
872
- "type": "library",
873
- "autoload": {
874
- "psr-4": {
875
- "IPTools\\": "src/"
876
- }
877
- },
878
- "notification-url": "https://packagist.org/downloads/",
879
- "license": [
880
- "MIT"
881
- ],
882
- "authors": [
883
- {
884
- "name": "Safarov Alisher",
885
- "email": "alisher.safarov@outlook.com",
886
- "homepage": "https://github.com/S1lentium"
887
- }
888
- ],
889
- "description": "PHP Library for manipulating network addresses (IPv4 and IPv6)",
890
- "keywords": [
891
- "IP",
892
- "IP-Tools",
893
- "cidr",
894
- "ipv4",
895
- "ipv6",
896
- "network",
897
- "subnet"
898
- ],
899
- "time": "2016-08-21T15:57:09+00:00"
900
- },
901
- {
902
- "name": "symfony/console",
903
- "version": "v3.4.15",
904
- "source": {
905
- "type": "git",
906
- "url": "https://github.com/symfony/console.git",
907
- "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73"
908
- },
909
- "dist": {
910
- "type": "zip",
911
- "url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73",
912
- "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73",
913
- "shasum": ""
914
- },
915
- "require": {
916
- "php": "^5.5.9|>=7.0.8",
917
- "symfony/debug": "~2.8|~3.0|~4.0",
918
- "symfony/polyfill-mbstring": "~1.0"
919
- },
920
- "conflict": {
921
- "symfony/dependency-injection": "<3.4",
922
- "symfony/process": "<3.3"
923
- },
924
- "require-dev": {
925
- "psr/log": "~1.0",
926
- "symfony/config": "~3.3|~4.0",
927
- "symfony/dependency-injection": "~3.4|~4.0",
928
- "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
929
- "symfony/lock": "~3.4|~4.0",
930
- "symfony/process": "~3.3|~4.0"
931
- },
932
- "suggest": {
933
- "psr/log-implementation": "For using the console logger",
934
- "symfony/event-dispatcher": "",
935
- "symfony/lock": "",
936
- "symfony/process": ""
937
- },
938
- "type": "library",
939
- "extra": {
940
- "branch-alias": {
941
- "dev-master": "3.4-dev"
942
- }
943
- },
944
- "autoload": {
945
- "psr-4": {
946
- "Symfony\\Component\\Console\\": ""
947
- },
948
- "exclude-from-classmap": [
949
- "/Tests/"
950
- ]
951
- },
952
- "notification-url": "https://packagist.org/downloads/",
953
- "license": [
954
- "MIT"
955
- ],
956
- "authors": [
957
- {
958
- "name": "Fabien Potencier",
959
- "email": "fabien@symfony.com"
960
- },
961
- {
962
- "name": "Symfony Community",
963
- "homepage": "https://symfony.com/contributors"
964
- }
965
- ],
966
- "description": "Symfony Console Component",
967
- "homepage": "https://symfony.com",
968
- "time": "2018-07-26T11:19:56+00:00"
969
- },
970
- {
971
- "name": "symfony/debug",
972
- "version": "v3.4.15",
973
- "source": {
974
- "type": "git",
975
- "url": "https://github.com/symfony/debug.git",
976
- "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd"
977
- },
978
- "dist": {
979
- "type": "zip",
980
- "url": "https://api.github.com/repos/symfony/debug/zipball/c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
981
- "reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd",
982
- "shasum": ""
983
- },
984
- "require": {
985
- "php": "^5.5.9|>=7.0.8",
986
- "psr/log": "~1.0"
987
- },
988
- "conflict": {
989
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
990
- },
991
- "require-dev": {
992
- "symfony/http-kernel": "~2.8|~3.0|~4.0"
993
- },
994
- "type": "library",
995
- "extra": {
996
- "branch-alias": {
997
- "dev-master": "3.4-dev"
998
- }
999
- },
1000
- "autoload": {
1001
- "psr-4": {
1002
- "Symfony\\Component\\Debug\\": ""
1003
- },
1004
- "exclude-from-classmap": [
1005
- "/Tests/"
1006
- ]
1007
- },
1008
- "notification-url": "https://packagist.org/downloads/",
1009
- "license": [
1010
- "MIT"
1011
- ],
1012
- "authors": [
1013
- {
1014
- "name": "Fabien Potencier",
1015
- "email": "fabien@symfony.com"
1016
- },
1017
- {
1018
- "name": "Symfony Community",
1019
- "homepage": "https://symfony.com/contributors"
1020
- }
1021
- ],
1022
- "description": "Symfony Debug Component",
1023
- "homepage": "https://symfony.com",
1024
- "time": "2018-08-03T10:42:44+00:00"
1025
- },
1026
- {
1027
- "name": "symfony/filesystem",
1028
- "version": "v3.4.15",
1029
- "source": {
1030
- "type": "git",
1031
- "url": "https://github.com/symfony/filesystem.git",
1032
- "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c"
1033
- },
1034
- "dist": {
1035
- "type": "zip",
1036
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1037
- "reference": "285ce5005cb01a0aeaa5b0cf590bd0cc40bb631c",
1038
- "shasum": ""
1039
- },
1040
- "require": {
1041
- "php": "^5.5.9|>=7.0.8",
1042
- "symfony/polyfill-ctype": "~1.8"
1043
- },
1044
- "type": "library",
1045
- "extra": {
1046
- "branch-alias": {
1047
- "dev-master": "3.4-dev"
1048
- }
1049
- },
1050
- "autoload": {
1051
- "psr-4": {
1052
- "Symfony\\Component\\Filesystem\\": ""
1053
- },
1054
- "exclude-from-classmap": [
1055
- "/Tests/"
1056
- ]
1057
- },
1058
- "notification-url": "https://packagist.org/downloads/",
1059
- "license": [
1060
- "MIT"
1061
- ],
1062
- "authors": [
1063
- {
1064
- "name": "Fabien Potencier",
1065
- "email": "fabien@symfony.com"
1066
- },
1067
- {
1068
- "name": "Symfony Community",
1069
- "homepage": "https://symfony.com/contributors"
1070
- }
1071
- ],
1072
- "description": "Symfony Filesystem Component",
1073
- "homepage": "https://symfony.com",
1074
- "time": "2018-08-10T07:29:05+00:00"
1075
- },
1076
- {
1077
- "name": "symfony/finder",
1078
- "version": "v3.4.15",
1079
- "source": {
1080
- "type": "git",
1081
- "url": "https://github.com/symfony/finder.git",
1082
- "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a"
1083
- },
1084
- "dist": {
1085
- "type": "zip",
1086
- "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1087
- "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a",
1088
- "shasum": ""
1089
- },
1090
- "require": {
1091
- "php": "^5.5.9|>=7.0.8"
1092
- },
1093
- "type": "library",
1094
- "extra": {
1095
- "branch-alias": {
1096
- "dev-master": "3.4-dev"
1097
- }
1098
- },
1099
- "autoload": {
1100
- "psr-4": {
1101
- "Symfony\\Component\\Finder\\": ""
1102
- },
1103
- "exclude-from-classmap": [
1104
- "/Tests/"
1105
- ]
1106
- },
1107
- "notification-url": "https://packagist.org/downloads/",
1108
- "license": [
1109
- "MIT"
1110
- ],
1111
- "authors": [
1112
- {
1113
- "name": "Fabien Potencier",
1114
- "email": "fabien@symfony.com"
1115
- },
1116
- {
1117
- "name": "Symfony Community",
1118
- "homepage": "https://symfony.com/contributors"
1119
- }
1120
- ],
1121
- "description": "Symfony Finder Component",
1122
- "homepage": "https://symfony.com",
1123
- "time": "2018-07-26T11:19:56+00:00"
1124
- },
1125
- {
1126
- "name": "symfony/polyfill-ctype",
1127
- "version": "v1.9.0",
1128
- "source": {
1129
- "type": "git",
1130
- "url": "https://github.com/symfony/polyfill-ctype.git",
1131
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
1132
- },
1133
- "dist": {
1134
- "type": "zip",
1135
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
1136
- "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
1137
- "shasum": ""
1138
- },
1139
- "require": {
1140
- "php": ">=5.3.3"
1141
- },
1142
- "suggest": {
1143
- "ext-ctype": "For best performance"
1144
- },
1145
- "type": "library",
1146
- "extra": {
1147
- "branch-alias": {
1148
- "dev-master": "1.9-dev"
1149
- }
1150
- },
1151
- "autoload": {
1152
- "psr-4": {
1153
- "Symfony\\Polyfill\\Ctype\\": ""
1154
- },
1155
- "files": [
1156
- "bootstrap.php"
1157
- ]
1158
- },
1159
- "notification-url": "https://packagist.org/downloads/",
1160
- "license": [
1161
- "MIT"
1162
- ],
1163
- "authors": [
1164
- {
1165
- "name": "Symfony Community",
1166
- "homepage": "https://symfony.com/contributors"
1167
- },
1168
- {
1169
- "name": "Gert de Pagter",
1170
- "email": "BackEndTea@gmail.com"
1171
- }
1172
- ],
1173
- "description": "Symfony polyfill for ctype functions",
1174
- "homepage": "https://symfony.com",
1175
- "keywords": [
1176
- "compatibility",
1177
- "ctype",
1178
- "polyfill",
1179
- "portable"
1180
- ],
1181
- "time": "2018-08-06T14:22:27+00:00"
1182
- },
1183
- {
1184
- "name": "symfony/polyfill-mbstring",
1185
- "version": "v1.9.0",
1186
- "source": {
1187
- "type": "git",
1188
- "url": "https://github.com/symfony/polyfill-mbstring.git",
1189
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
1190
- },
1191
- "dist": {
1192
- "type": "zip",
1193
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
1194
- "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
1195
- "shasum": ""
1196
- },
1197
- "require": {
1198
- "php": ">=5.3.3"
1199
- },
1200
- "suggest": {
1201
- "ext-mbstring": "For best performance"
1202
- },
1203
- "type": "library",
1204
- "extra": {
1205
- "branch-alias": {
1206
- "dev-master": "1.9-dev"
1207
- }
1208
- },
1209
- "autoload": {
1210
- "psr-4": {
1211
- "Symfony\\Polyfill\\Mbstring\\": ""
1212
- },
1213
- "files": [
1214
- "bootstrap.php"
1215
- ]
1216
- },
1217
- "notification-url": "https://packagist.org/downloads/",
1218
- "license": [
1219
- "MIT"
1220
- ],
1221
- "authors": [
1222
- {
1223
- "name": "Nicolas Grekas",
1224
- "email": "p@tchwork.com"
1225
- },
1226
- {
1227
- "name": "Symfony Community",
1228
- "homepage": "https://symfony.com/contributors"
1229
- }
1230
- ],
1231
- "description": "Symfony polyfill for the Mbstring extension",
1232
- "homepage": "https://symfony.com",
1233
- "keywords": [
1234
- "compatibility",
1235
- "mbstring",
1236
- "polyfill",
1237
- "portable",
1238
- "shim"
1239
- ],
1240
- "time": "2018-08-06T14:22:27+00:00"
1241
- }
1242
- ],
1243
- "packages-dev": [],
1244
- "aliases": [],
1245
- "minimum-stability": "stable",
1246
- "stability-flags": [],
1247
- "prefer-stable": false,
1248
- "prefer-lowest": false,
1249
- "platform": [],
1250
- "platform-dev": []
1251
- }
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "028957797cec9c077f0e55e20e35f244",
8
+ "packages": [
9
+ {
10
+ "name": "composer/ca-bundle",
11
+ "version": "1.1.3",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/composer/ca-bundle.git",
15
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
20
+ "reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
21
+ "shasum": ""
22
+ },
23
+ "require": {
24
+ "ext-openssl": "*",
25
+ "ext-pcre": "*",
26
+ "php": "^5.3.2 || ^7.0"
27
+ },
28
+ "require-dev": {
29
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
30
+ "psr/log": "^1.0",
31
+ "symfony/process": "^2.5 || ^3.0 || ^4.0"
32
+ },
33
+ "type": "library",
34
+ "extra": {
35
+ "branch-alias": {
36
+ "dev-master": "1.x-dev"
37
+ }
38
+ },
39
+ "autoload": {
40
+ "psr-4": {
41
+ "Composer\\CaBundle\\": "src"
42
+ }
43
+ },
44
+ "notification-url": "https://packagist.org/downloads/",
45
+ "license": [
46
+ "MIT"
47
+ ],
48
+ "authors": [
49
+ {
50
+ "name": "Jordi Boggiano",
51
+ "email": "j.boggiano@seld.be",
52
+ "homepage": "http://seld.be"
53
+ }
54
+ ],
55
+ "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
56
+ "keywords": [
57
+ "cabundle",
58
+ "cacert",
59
+ "certificate",
60
+ "ssl",
61
+ "tls"
62
+ ],
63
+ "time": "2018-10-18T06:09:13+00:00"
64
+ },
65
+ {
66
+ "name": "erusev/parsedown",
67
+ "version": "1.7.1",
68
+ "source": {
69
+ "type": "git",
70
+ "url": "https://github.com/erusev/parsedown.git",
71
+ "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1"
72
+ },
73
+ "dist": {
74
+ "type": "zip",
75
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
76
+ "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
77
+ "shasum": ""
78
+ },
79
+ "require": {
80
+ "ext-mbstring": "*",
81
+ "php": ">=5.3.0"
82
+ },
83
+ "require-dev": {
84
+ "phpunit/phpunit": "^4.8.35"
85
+ },
86
+ "type": "library",
87
+ "autoload": {
88
+ "psr-0": {
89
+ "Parsedown": ""
90
+ }
91
+ },
92
+ "notification-url": "https://packagist.org/downloads/",
93
+ "license": [
94
+ "MIT"
95
+ ],
96
+ "authors": [
97
+ {
98
+ "name": "Emanuil Rusev",
99
+ "email": "hello@erusev.com",
100
+ "homepage": "http://erusev.com"
101
+ }
102
+ ],
103
+ "description": "Parser for Markdown.",
104
+ "homepage": "http://parsedown.org",
105
+ "keywords": [
106
+ "markdown",
107
+ "parser"
108
+ ],
109
+ "time": "2018-03-08T01:11:30+00:00"
110
+ },
111
+ {
112
+ "name": "geoip2/geoip2",
113
+ "version": "v2.9.0",
114
+ "source": {
115
+ "type": "git",
116
+ "url": "https://github.com/maxmind/GeoIP2-php.git",
117
+ "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77"
118
+ },
119
+ "dist": {
120
+ "type": "zip",
121
+ "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/a807fbf65212eef5d8d2db1a1b31082b53633d77",
122
+ "reference": "a807fbf65212eef5d8d2db1a1b31082b53633d77",
123
+ "shasum": ""
124
+ },
125
+ "require": {
126
+ "maxmind-db/reader": "~1.0",
127
+ "maxmind/web-service-common": "~0.5",
128
+ "php": ">=5.4"
129
+ },
130
+ "require-dev": {
131
+ "friendsofphp/php-cs-fixer": "2.*",
132
+ "phpunit/phpunit": "4.*",
133
+ "squizlabs/php_codesniffer": "3.*"
134
+ },
135
+ "type": "library",
136
+ "autoload": {
137
+ "psr-4": {
138
+ "GeoIp2\\": "src"
139
+ }
140
+ },
141
+ "notification-url": "https://packagist.org/downloads/",
142
+ "license": [
143
+ "Apache-2.0"
144
+ ],
145
+ "authors": [
146
+ {
147
+ "name": "Gregory J. Oschwald",
148
+ "email": "goschwald@maxmind.com",
149
+ "homepage": "http://www.maxmind.com/"
150
+ }
151
+ ],
152
+ "description": "MaxMind GeoIP2 PHP API",
153
+ "homepage": "https://github.com/maxmind/GeoIP2-php",
154
+ "keywords": [
155
+ "IP",
156
+ "geoip",
157
+ "geoip2",
158
+ "geolocation",
159
+ "maxmind"
160
+ ],
161
+ "time": "2018-04-10T15:32:59+00:00"
162
+ },
163
+ {
164
+ "name": "jaybizzle/crawler-detect",
165
+ "version": "v1.2.69",
166
+ "source": {
167
+ "type": "git",
168
+ "url": "https://github.com/JayBizzle/Crawler-Detect.git",
169
+ "reference": "bac5e3f342f22477e74c5ba5daf3c3f84370bf20"
170
+ },
171
+ "dist": {
172
+ "type": "zip",
173
+ "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/bac5e3f342f22477e74c5ba5daf3c3f84370bf20",
174
+ "reference": "bac5e3f342f22477e74c5ba5daf3c3f84370bf20",
175
+ "shasum": ""
176
+ },
177
+ "require": {
178
+ "php": ">=5.3.0"
179
+ },
180
+ "require-dev": {
181
+ "phpunit/phpunit": "^4.8|^5.5|^6.5",
182
+ "satooshi/php-coveralls": "1.*"
183
+ },
184
+ "type": "library",
185
+ "autoload": {
186
+ "psr-4": {
187
+ "Jaybizzle\\CrawlerDetect\\": "src/"
188
+ }
189
+ },
190
+ "notification-url": "https://packagist.org/downloads/",
191
+ "license": [
192
+ "MIT"
193
+ ],
194
+ "authors": [
195
+ {
196
+ "name": "Mark Beech",
197
+ "email": "m@rkbee.ch",
198
+ "role": "Developer"
199
+ }
200
+ ],
201
+ "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent",
202
+ "homepage": "https://github.com/JayBizzle/Crawler-Detect/",
203
+ "keywords": [
204
+ "crawler",
205
+ "crawler detect",
206
+ "crawler detector",
207
+ "crawlerdetect",
208
+ "php crawler detect"
209
+ ],
210
+ "time": "2018-10-03T08:53:34+00:00"
211
+ },
212
+ {
213
+ "name": "maxmind-db/reader",
214
+ "version": "v1.3.0",
215
+ "source": {
216
+ "type": "git",
217
+ "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
218
+ "reference": "e042b4f8a2dff41e19019faf16427178b07fbd58"
219
+ },
220
+ "dist": {
221
+ "type": "zip",
222
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/e042b4f8a2dff41e19019faf16427178b07fbd58",
223
+ "reference": "e042b4f8a2dff41e19019faf16427178b07fbd58",
224
+ "shasum": ""
225
+ },
226
+ "require": {
227
+ "php": ">=5.4"
228
+ },
229
+ "require-dev": {
230
+ "friendsofphp/php-cs-fixer": "2.*",
231
+ "phpunit/phpunit": "4.* || 5.*",
232
+ "satooshi/php-coveralls": "1.0.*",
233
+ "squizlabs/php_codesniffer": "3.*"
234
+ },
235
+ "suggest": {
236
+ "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
237
+ "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
238
+ "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
239
+ },
240
+ "type": "library",
241
+ "autoload": {
242
+ "psr-4": {
243
+ "MaxMind\\Db\\": "src/MaxMind/Db"
244
+ }
245
+ },
246
+ "notification-url": "https://packagist.org/downloads/",
247
+ "license": [
248
+ "Apache-2.0"
249
+ ],
250
+ "authors": [
251
+ {
252
+ "name": "Gregory J. Oschwald",
253
+ "email": "goschwald@maxmind.com",
254
+ "homepage": "http://www.maxmind.com/"
255
+ }
256
+ ],
257
+ "description": "MaxMind DB Reader API",
258
+ "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
259
+ "keywords": [
260
+ "database",
261
+ "geoip",
262
+ "geoip2",
263
+ "geolocation",
264
+ "maxmind"
265
+ ],
266
+ "time": "2018-02-21T21:23:33+00:00"
267
+ },
268
+ {
269
+ "name": "maxmind/web-service-common",
270
+ "version": "v0.5.0",
271
+ "source": {
272
+ "type": "git",
273
+ "url": "https://github.com/maxmind/web-service-common-php.git",
274
+ "reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b"
275
+ },
276
+ "dist": {
277
+ "type": "zip",
278
+ "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/61a9836fa3bb1743ab89752bae5005d71e78c73b",
279
+ "reference": "61a9836fa3bb1743ab89752bae5005d71e78c73b",
280
+ "shasum": ""
281
+ },
282
+ "require": {
283
+ "composer/ca-bundle": "^1.0.3",
284
+ "ext-curl": "*",
285
+ "ext-json": "*",
286
+ "php": ">=5.4"
287
+ },
288
+ "require-dev": {
289
+ "friendsofphp/php-cs-fixer": "2.*",
290
+ "phpunit/phpunit": "4.*",
291
+ "squizlabs/php_codesniffer": "3.*"
292
+ },
293
+ "type": "library",
294
+ "autoload": {
295
+ "psr-4": {
296
+ "MaxMind\\Exception\\": "src/Exception",
297
+ "MaxMind\\WebService\\": "src/WebService"
298
+ }
299
+ },
300
+ "notification-url": "https://packagist.org/downloads/",
301
+ "license": [
302
+ "Apache-2.0"
303
+ ],
304
+ "authors": [
305
+ {
306
+ "name": "Gregory Oschwald",
307
+ "email": "goschwald@maxmind.com"
308
+ }
309
+ ],
310
+ "description": "Internal MaxMind Web Service API",
311
+ "homepage": "https://github.com/maxmind/web-service-common-php",
312
+ "time": "2018-02-12T22:31:54+00:00"
313
+ },
314
+ {
315
+ "name": "psr/cache",
316
+ "version": "1.0.1",
317
+ "source": {
318
+ "type": "git",
319
+ "url": "https://github.com/php-fig/cache.git",
320
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
321
+ },
322
+ "dist": {
323
+ "type": "zip",
324
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
325
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
326
+ "shasum": ""
327
+ },
328
+ "require": {
329
+ "php": ">=5.3.0"
330
+ },
331
+ "type": "library",
332
+ "extra": {
333
+ "branch-alias": {
334
+ "dev-master": "1.0.x-dev"
335
+ }
336
+ },
337
+ "autoload": {
338
+ "psr-4": {
339
+ "Psr\\Cache\\": "src/"
340
+ }
341
+ },
342
+ "notification-url": "https://packagist.org/downloads/",
343
+ "license": [
344
+ "MIT"
345
+ ],
346
+ "authors": [
347
+ {
348
+ "name": "PHP-FIG",
349
+ "homepage": "http://www.php-fig.org/"
350
+ }
351
+ ],
352
+ "description": "Common interface for caching libraries",
353
+ "keywords": [
354
+ "cache",
355
+ "psr",
356
+ "psr-6"
357
+ ],
358
+ "time": "2016-08-06T20:24:11+00:00"
359
+ },
360
+ {
361
+ "name": "s1lentium/iptools",
362
+ "version": "v1.1.1",
363
+ "source": {
364
+ "type": "git",
365
+ "url": "https://github.com/S1lentium/IPTools.git",
366
+ "reference": "f6f8ab6132ca7443bd7cced1681f5066d725fd5f"
367
+ },
368
+ "dist": {
369
+ "type": "zip",
370
+ "url": "https://api.github.com/repos/S1lentium/IPTools/zipball/f6f8ab6132ca7443bd7cced1681f5066d725fd5f",
371
+ "reference": "f6f8ab6132ca7443bd7cced1681f5066d725fd5f",
372
+ "shasum": ""
373
+ },
374
+ "require": {
375
+ "ext-bcmath": "*",
376
+ "php": ">=5.4.0"
377
+ },
378
+ "require-dev": {
379
+ "phpunit/phpunit": "~4.0",
380
+ "satooshi/php-coveralls": "~1.0"
381
+ },
382
+ "type": "library",
383
+ "autoload": {
384
+ "psr-4": {
385
+ "IPTools\\": "src/"
386
+ }
387
+ },
388
+ "notification-url": "https://packagist.org/downloads/",
389
+ "license": [
390
+ "MIT"
391
+ ],
392
+ "authors": [
393
+ {
394
+ "name": "Safarov Alisher",
395
+ "email": "alisher.safarov@outlook.com",
396
+ "homepage": "https://github.com/S1lentium"
397
+ }
398
+ ],
399
+ "description": "PHP Library for manipulating network addresses (IPv4 and IPv6)",
400
+ "keywords": [
401
+ "IP",
402
+ "IP-Tools",
403
+ "cidr",
404
+ "ipv4",
405
+ "ipv6",
406
+ "network",
407
+ "subnet"
408
+ ],
409
+ "time": "2018-09-19T06:15:53+00:00"
410
+ },
411
+ {
412
+ "name": "whichbrowser/parser",
413
+ "version": "v2.0.37",
414
+ "source": {
415
+ "type": "git",
416
+ "url": "https://github.com/WhichBrowser/Parser-PHP.git",
417
+ "reference": "9c6ad8eadc23294b1c66d92876c11f13c5d4cf48"
418
+ },
419
+ "dist": {
420
+ "type": "zip",
421
+ "url": "https://api.github.com/repos/WhichBrowser/Parser-PHP/zipball/9c6ad8eadc23294b1c66d92876c11f13c5d4cf48",
422
+ "reference": "9c6ad8eadc23294b1c66d92876c11f13c5d4cf48",
423
+ "shasum": ""
424
+ },
425
+ "require": {
426
+ "php": ">=5.4.0",
427
+ "psr/cache": "^1.0"
428
+ },
429
+ "require-dev": {
430
+ "icomefromthenet/reverse-regex": "0.0.6.3",
431
+ "phpunit/php-code-coverage": "^2.2|^3.0",
432
+ "phpunit/phpunit": "^4.0|^5.0",
433
+ "satooshi/php-coveralls": "^1.0",
434
+ "squizlabs/php_codesniffer": "2.5.*",
435
+ "symfony/yaml": ">=2.8"
436
+ },
437
+ "suggest": {
438
+ "cache/array-adapter": "Allows testing of the caching functionality"
439
+ },
440
+ "type": "library",
441
+ "autoload": {
442
+ "psr-4": {
443
+ "WhichBrowser\\": [
444
+ "src/",
445
+ "tests/src/"
446
+ ]
447
+ }
448
+ },
449
+ "notification-url": "https://packagist.org/downloads/",
450
+ "license": [
451
+ "MIT"
452
+ ],
453
+ "authors": [
454
+ {
455
+ "name": "Niels Leenheer",
456
+ "email": "niels@leenheer.nl",
457
+ "role": "Developer"
458
+ }
459
+ ],
460
+ "description": "Useragent sniffing library for PHP",
461
+ "homepage": "http://whichbrowser.net",
462
+ "keywords": [
463
+ "browser",
464
+ "sniffing",
465
+ "ua",
466
+ "useragent"
467
+ ],
468
+ "time": "2018-10-02T09:26:41+00:00"
469
+ }
470
+ ],
471
+ "packages-dev": [],
472
+ "aliases": [],
473
+ "minimum-stability": "stable",
474
+ "stability-flags": [],
475
+ "prefer-stable": false,
476
+ "prefer-lowest": false,
477
+ "platform": [],
478
+ "platform-dev": []
479
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/class-wp-statistics-admin-pages.php CHANGED
@@ -5,6 +5,11 @@
5
  */
6
  class WP_Statistics_Admin_Pages {
7
 
 
 
 
 
 
8
  /**
9
  * Load Overview Page
10
  */
@@ -44,7 +49,7 @@ class WP_Statistics_Admin_Pages {
44
  array( 'widget' => 'search' )
45
  );
46
  add_meta_box(
47
- 'wps_words_postbox',
48
  __( 'Top Searched Phrases (30 Days)', 'wp-statistics' ),
49
  'wp_statistics_generate_overview_postbox_contents',
50
  $WP_Statistics->menu_slugs['overview'],
@@ -138,6 +143,18 @@ class WP_Statistics_Admin_Pages {
138
  );
139
  }
140
  }
 
 
 
 
 
 
 
 
 
 
 
 
141
  }
142
 
143
  /**
@@ -277,12 +294,6 @@ class WP_Statistics_Admin_Pages {
277
  wp_enqueue_style( 'rtl-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/rtl.css', true, '1.1' );
278
  }
279
 
280
- // We could let the download happen at the end of the page, but this way we get to give some
281
- // feedback to the users about the result.
282
- if ( $WP_Statistics->get_option( 'update_geoip' ) == true ) {
283
- echo WP_Statistics_Updates::download_geoip();
284
- }
285
-
286
  // Check admin notices.
287
  if ( $WP_Statistics->get_option( 'admin_notices' ) == true ) {
288
  $WP_Statistics->update_option( 'disable_donation_nag', false );
@@ -290,6 +301,81 @@ class WP_Statistics_Admin_Pages {
290
  }
291
 
292
  include WP_Statistics::$reg['plugin-dir'] . "includes/settings/wps-settings.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
294
 
295
  /**
@@ -526,29 +612,31 @@ class WP_Statistics_Admin_Pages {
526
 
527
  break;
528
  default:
529
- wp_enqueue_style(
530
- 'wpstatistics-jqvmap-css',
531
- WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jqvmap.css',
532
- true,
533
- '1.5.1'
534
- );
535
- wp_enqueue_script(
536
- 'wpstatistics-jquery-vmap',
537
- WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jquery.vmap.js',
538
- true,
539
- '1.5.1'
540
- );
541
- wp_enqueue_script(
542
- 'wpstatistics-jquery-vmap-world',
543
- WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/maps/jquery.vmap.world.js',
544
- true,
545
- '1.5.1'
546
- );
547
-
548
- // Load our custom widgets handling javascript.
549
- wp_enqueue_script( 'wp_statistics_log', WP_Statistics::$reg['plugin-url'] . 'assets/js/log.js' );
550
-
551
- include WP_Statistics::$reg['plugin-dir'] . 'includes/log/log.php';
 
 
552
 
553
  break;
554
  }
5
  */
6
  class WP_Statistics_Admin_Pages {
7
 
8
+
9
+ //Transient For Show Notice Setting
10
+ public static $setting_notice = '_show_notice_wp_statistics';
11
+
12
+
13
  /**
14
  * Load Overview Page
15
  */
49
  array( 'widget' => 'search' )
50
  );
51
  add_meta_box(
52
+ 'wps_searched_phrases_postbox',
53
  __( 'Top Searched Phrases (30 Days)', 'wp-statistics' ),
54
  'wp_statistics_generate_overview_postbox_contents',
55
  $WP_Statistics->menu_slugs['overview'],
143
  );
144
  }
145
  }
146
+
147
+ //Set Default Hidden MetaBox
148
+ add_filter( 'default_hidden_meta_boxes', array( self::class, 'default_hide_meta_box' ) );
149
+ }
150
+
151
+ /*
152
+ * Default Hidden Meta Box
153
+ */
154
+ static public function default_hide_meta_box($hidden)
155
+ {
156
+ $hidden[] = 'wps_top_search_phrases_words_postbox';
157
+ return $hidden;
158
  }
159
 
160
  /**
294
  wp_enqueue_style( 'rtl-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/rtl.css', true, '1.1' );
295
  }
296
 
 
 
 
 
 
 
297
  // Check admin notices.
298
  if ( $WP_Statistics->get_option( 'admin_notices' ) == true ) {
299
  $WP_Statistics->update_option( 'disable_donation_nag', false );
301
  }
302
 
303
  include WP_Statistics::$reg['plugin-dir'] . "includes/settings/wps-settings.php";
304
+
305
+ // We could let the download happen at the end of the page, but this way we get to give some
306
+ // feedback to the users about the result.
307
+ if ( $WP_Statistics->get_option( 'geoip' ) and isset($_POST['update_geoip']) and isset($_POST['geoip_name']) ) {
308
+
309
+ //Check Geo ip Exist in Database
310
+ if( isset( WP_Statistics_Updates::$geoip[$_POST['geoip_name']] )) {
311
+ $result = WP_Statistics_Updates::download_geoip($_POST['geoip_name'], "update");
312
+
313
+ if(isset($result['status']) and $result['status'] === false) {
314
+ add_filter("wp_statistics_redirect_setting", function($redirect) { $redirect = true; return $redirect; });
315
+ } else {
316
+ echo $result['notice'];
317
+ }
318
+ }
319
+
320
+ }
321
+
322
+ //Enabled Geo ip Country Or City And download
323
+ foreach (array("geoip" => "country", "geoip_city" => "city") as $geo_opt => $geo_name) {
324
+ if( !isset($_POST['update_geoip']) and isset($_POST['wps_'.$geo_opt]) ) {
325
+
326
+ //Check File Not Exist
327
+ $file = wp_upload_dir()['basedir'] . '/wp-statistics/'.WP_Statistics_Updates::$geoip[$geo_name]['file'].'.mmdb';
328
+ if ( !file_exists($file) ) {
329
+ $result = WP_Statistics_Updates::download_geoip($geo_name);
330
+ if(isset($result['status']) and $result['status'] === false) {
331
+ add_filter("wp_statistics_redirect_setting", function($redirect) { $redirect = true; return $redirect; });
332
+ } else {
333
+ echo $result['notice'];
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ //Redirect Set Setting
340
+ self::wp_statistics_redirect_setting();
341
+ }
342
+
343
+ /**
344
+ * Set Transient Notice
345
+ */
346
+ public static function set_admin_notice( $text, $type = 'error' ) {
347
+ $get = get_transient( WP_Statistics_Admin_Pages::$setting_notice );
348
+ if ( $get !=false) {
349
+ $results = $get;
350
+ }
351
+ delete_transient( WP_Statistics_Admin_Pages::$setting_notice );
352
+ $results[] = array("text" => $text, "type" => $type);
353
+ set_transient( WP_Statistics_Admin_Pages::$setting_notice, $results, 1 * HOUR_IN_SECONDS );
354
+ }
355
+
356
+
357
+ /**
358
+ * Notification Setting
359
+ */
360
+ public static function wp_statistics_notice_setting( ) {
361
+ $get = get_transient( WP_Statistics_Admin_Pages::$setting_notice );
362
+ if ( $get !=false) {
363
+ foreach ($get as $item) {
364
+ wp_statistics_admin_notice_result( $item['type'], $item['text'] );
365
+ }
366
+ delete_transient( WP_Statistics_Admin_Pages::$setting_notice );
367
+ }
368
+ }
369
+
370
+
371
+ /**
372
+ * Redirect Jquery
373
+ */
374
+ public static function wp_statistics_redirect_setting( $redirect = false ) {
375
+ $redirect = apply_filters( 'wp_statistics_redirect_setting', $redirect );
376
+ if($redirect ===true) {
377
+ echo '<script>window.location.replace("'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]".'");</script>';
378
+ }
379
  }
380
 
381
  /**
612
 
613
  break;
614
  default:
615
+ if (get_current_screen()->parent_base ==WP_Statistics::$page['overview']) {
616
+ wp_enqueue_style(
617
+ 'wpstatistics-jqvmap-css',
618
+ WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jqvmap.css',
619
+ true,
620
+ '1.5.1'
621
+ );
622
+ wp_enqueue_script(
623
+ 'wpstatistics-jquery-vmap',
624
+ WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jquery.vmap.js',
625
+ true,
626
+ '1.5.1'
627
+ );
628
+ wp_enqueue_script(
629
+ 'wpstatistics-jquery-vmap-world',
630
+ WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/maps/jquery.vmap.world.js',
631
+ true,
632
+ '1.5.1'
633
+ );
634
+
635
+ // Load our custom widgets handling javascript.
636
+ wp_enqueue_script('wp_statistics_log', WP_Statistics::$reg['plugin-url'] . 'assets/js/log.js');
637
+
638
+ include WP_Statistics::$reg['plugin-dir'] . 'includes/log/log.php';
639
+ }
640
 
641
  break;
642
  }
includes/classes/class-wp-statistics-admin.php CHANGED
@@ -68,11 +68,20 @@ class WP_Statistics_Admin {
68
 
69
  // WP-Statistics welcome page hooks
70
  add_action( 'admin_menu', 'WP_Statistics_Welcome::menu' );
71
- //add_action( 'upgrader_process_complete', 'WP_Statistics_Welcome::do_welcome', 10, 2 );
72
  add_action( 'admin_init', 'WP_Statistics_Welcome::init' );
73
-
74
  // Runs some scripts at the end of the admin panel inside the body tag
75
  add_action( 'admin_footer', array( $this, 'admin_footer_scripts' ) );
 
 
 
 
 
 
 
 
 
76
  }
77
 
78
  /**
@@ -202,6 +211,107 @@ class WP_Statistics_Admin {
202
  }
203
  }
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  /**
206
  * Add a settings link to the plugin list.
207
  *
@@ -538,7 +648,7 @@ class WP_Statistics_Admin {
538
  WP_Statistics::$page['overview'],
539
  __( 'Settings', 'wp-statistics' ),
540
  __( 'Settings', 'wp-statistics' ),
541
- $read_cap,
542
  WP_Statistics::$page['settings'],
543
  'WP_Statistics_Admin_Pages::settings'
544
  );
@@ -570,6 +680,7 @@ class WP_Statistics_Admin {
570
  * @param string $hook Not Used
571
  */
572
  static function enqueue_scripts( $hook ) {
 
573
 
574
  // Load our CSS to be used.
575
  wp_enqueue_style(
@@ -583,10 +694,12 @@ class WP_Statistics_Admin {
583
  wp_enqueue_style( 'rtl-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/rtl.css', true, WP_Statistics::$reg['version'] );
584
  }
585
 
586
- if ( ! isset( $_GET['page'] ) ) {
587
- return;
588
- }
589
 
 
 
 
 
 
590
  $pages_required_chart = array(
591
  'wps_overview_page',
592
  'wps_browsers_page',
@@ -597,31 +710,25 @@ class WP_Statistics_Admin {
597
  'wps_authors_page',
598
  'wps_searches_page',
599
  );
 
 
 
600
 
601
- if ( array_search( $_GET['page'], $pages_required_chart ) !== false ) {
602
- $load_in_footer = true;
603
- $pages_required_load_in_head = array(
604
- 'wps_browsers_page',
605
- 'wps_hits_page',
606
- 'wps_pages_page',
607
- 'wps_categories_page',
608
- 'wps_tags_page',
609
- 'wps_authors_page',
610
- 'wps_searches_page',
611
- );
612
-
613
- if ( array_search( $_GET['page'], $pages_required_load_in_head ) !== false ) {
614
- $load_in_footer = false;
615
- }
616
 
 
617
  wp_enqueue_script(
618
  'wp-statistics-chart-js',
619
  WP_Statistics::$reg['plugin-url'] . 'assets/js/Chart.bundle.min.js',
620
  false,
621
- '2.7.0',
622
  $load_in_footer
623
  );
624
  }
 
625
  }
626
 
627
  /**
@@ -630,14 +737,11 @@ class WP_Statistics_Admin {
630
  public function admin_footer_scripts() {
631
  global $WP_Statistics;
632
 
633
- // Check to see if the browscap database needs to be downloaded and do so if required.
634
- if ( $WP_Statistics->get_option( 'update_browscap' ) ) {
635
- echo WP_Statistics_Updates::download_browscap();
636
- }
637
-
638
  // Check to see if the GeoIP database needs to be downloaded and do so if required.
639
  if ( $WP_Statistics->get_option( 'update_geoip' ) ) {
640
- echo WP_Statistics_Updates::download_geoip();
 
 
641
  }
642
 
643
  // Check to see if the referrer spam database needs to be downloaded and do so if required.
68
 
69
  // WP-Statistics welcome page hooks
70
  add_action( 'admin_menu', 'WP_Statistics_Welcome::menu' );
71
+ add_action( 'upgrader_process_complete', 'WP_Statistics_Welcome::do_welcome', 10, 2 );
72
  add_action( 'admin_init', 'WP_Statistics_Welcome::init' );
73
+
74
  // Runs some scripts at the end of the admin panel inside the body tag
75
  add_action( 'admin_footer', array( $this, 'admin_footer_scripts' ) );
76
+
77
+ //Load TinyMce Function
78
+ WP_Statistics_TinyMCE::init();
79
+
80
+ //Add Notice Use cache plugin
81
+ add_action( 'admin_notices', array( $this, 'notification_use_cache_plugin' ) );
82
+
83
+ //Admin Notice Setting
84
+ add_action( 'admin_notices', 'WP_Statistics_Admin_Pages::wp_statistics_notice_setting' );
85
  }
86
 
87
  /**
211
  }
212
  }
213
 
214
+ /*
215
+ * Check User Active A cache Plugin in Wordpress
216
+ */
217
+ static public function user_is_use_cache_plugin() {
218
+ $use = array( 'status' => false, 'plugin' => '' );
219
+
220
+ /* Wordpress core */
221
+ if ( defined( 'WP_CACHE' ) && WP_CACHE ) {
222
+ return array( 'status' => true, 'plugin' => 'core' );
223
+ }
224
+
225
+ /* WP Rocket */
226
+ if ( function_exists( 'get_rocket_cdn_url' ) ) {
227
+ return array( 'status' => true, 'plugin' => 'WP Rocket' );
228
+ }
229
+
230
+ /* WP Super Cache */
231
+ if ( function_exists( 'wpsc_init' ) ) {
232
+ return array( 'status' => true, 'plugin' => 'WP Super Cache' );
233
+ }
234
+
235
+ /* Comet Cache */
236
+ if ( function_exists( '___wp_php_rv_initialize' ) ) {
237
+ return array( 'status' => true, 'plugin' => 'Comet Cache' );
238
+ }
239
+
240
+ /* WP Fastest Cache */
241
+ if ( class_exists( 'WpFastestCache' ) ) {
242
+ return array( 'status' => true, 'plugin' => 'WP Fastest Cache' );
243
+ }
244
+
245
+ /* Cache Enabler */
246
+ if ( defined( 'CE_MIN_WP' ) ) {
247
+ return array( 'status' => true, 'plugin' => 'Cache Enabler' );
248
+ }
249
+
250
+ /* W3 Total Cache */
251
+ if ( defined( 'W3TC' ) ) {
252
+ return array( 'status' => true, 'plugin' => 'W3 Total Cache' );
253
+ }
254
+
255
+ return $use;
256
+ }
257
+
258
+
259
+ /*
260
+ * Show Notification Cache Plugin
261
+ */
262
+ static public function notification_use_cache_plugin() {
263
+ global $WP_Statistics;
264
+
265
+ $screen = get_current_screen();
266
+ if ( $screen->id != "statistics_page_" . WP_Statistics::$page['settings'] ) {
267
+ $plugin = self::user_is_use_cache_plugin();
268
+ if ( ! $WP_Statistics->get_option( 'use_cache_plugin' ) and $plugin['status'] === true ) {
269
+ echo '<div class="notice notice-warning is-dismissible"><p>';
270
+
271
+ $alert = sprintf( __( 'You Are Using %s Plugin in WordPress', 'wp-statistics' ), $plugin['plugin'] );
272
+ if ( $plugin['plugin'] == "core" ) {
273
+ $alert = __( 'WP_CACHE is Enable in Your WordPress', 'wp-statistics' );
274
+ }
275
+
276
+ echo $alert . ", " . sprintf(
277
+ __( 'Please enable %1$sCache Setting%2$s in WP Statistics.', 'wp-statistics' ),
278
+ '<a href="' . esc_url( admin_url( add_query_arg( 'page', WP_Statistics::$page['settings'], 'admin.php' ) ) ) . '">', '</a>'
279
+ );
280
+
281
+ echo '</p></div>';
282
+ }
283
+ }
284
+
285
+ // Test Rest Api is Active for Cache
286
+ if ( $WP_Statistics->use_cache and $screen->id == "statistics_page_" . WP_Statistics::$page['settings'] ) {
287
+
288
+ if ( false === ( $check_rest_api = get_transient( '_check_rest_api_wp_statistics' ) ) ) {
289
+
290
+ $set_transient = true;
291
+ $alert = '<div class="notice notice-warning is-dismissible"><p>' . __( 'Please Activate WordPress Rest Api for performancing WP-Statistics Plugin Cache', 'wp-statistics' ) . '</div>';
292
+ $request = wp_remote_post( path_join( get_rest_url(), WP_Statistics_Rest::route . '/' . WP_Statistics_Rest::func ), array(
293
+ 'method' => 'POST',
294
+ 'body' => array( 'rest-api-wp-statistics' => 'wp-statistics' )
295
+ ) );
296
+ if ( is_wp_error( $request ) ) {
297
+ echo $alert;
298
+ $set_transient = false;
299
+ }
300
+ $body = wp_remote_retrieve_body( $request );
301
+ $data = json_decode( $body, true );
302
+ if ( ! isset( $data['rest-api-wp-statistics'] ) ) {
303
+ echo $alert;
304
+ $set_transient = false;
305
+ }
306
+
307
+ if ( $set_transient === true ) {
308
+ set_transient( '_check_rest_api_wp_statistics', array( "rest-api-wp-statistics" => "OK" ), 2 * HOUR_IN_SECONDS );
309
+ }
310
+ }
311
+
312
+ }
313
+ }
314
+
315
  /**
316
  * Add a settings link to the plugin list.
317
  *
648
  WP_Statistics::$page['overview'],
649
  __( 'Settings', 'wp-statistics' ),
650
  __( 'Settings', 'wp-statistics' ),
651
+ $manage_cap,
652
  WP_Statistics::$page['settings'],
653
  'WP_Statistics_Admin_Pages::settings'
654
  );
680
  * @param string $hook Not Used
681
  */
682
  static function enqueue_scripts( $hook ) {
683
+ global $pagenow;
684
 
685
  // Load our CSS to be used.
686
  wp_enqueue_style(
694
  wp_enqueue_style( 'rtl-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/rtl.css', true, WP_Statistics::$reg['version'] );
695
  }
696
 
 
 
 
697
 
698
+ //Load Chart Js
699
+ $load_in_footer = false;
700
+ $load_chart = false;
701
+
702
+ //Load in Setting Page
703
  $pages_required_chart = array(
704
  'wps_overview_page',
705
  'wps_browsers_page',
710
  'wps_authors_page',
711
  'wps_searches_page',
712
  );
713
+ if ( isset( $_GET['page'] ) and array_search( $_GET['page'], $pages_required_chart ) !== false ) {
714
+ $load_chart = true;
715
+ }
716
 
717
+ //Load in Post Page
718
+ if ( $pagenow == "post.php" ) {
719
+ $load_chart = true;
720
+ }
 
 
 
 
 
 
 
 
 
 
 
721
 
722
+ if ( $load_chart === true ) {
723
  wp_enqueue_script(
724
  'wp-statistics-chart-js',
725
  WP_Statistics::$reg['plugin-url'] . 'assets/js/Chart.bundle.min.js',
726
  false,
727
+ '2.7.3',
728
  $load_in_footer
729
  );
730
  }
731
+
732
  }
733
 
734
  /**
737
  public function admin_footer_scripts() {
738
  global $WP_Statistics;
739
 
 
 
 
 
 
740
  // Check to see if the GeoIP database needs to be downloaded and do so if required.
741
  if ( $WP_Statistics->get_option( 'update_geoip' ) ) {
742
+ foreach ( WP_Statistics_Updates::$geoip as $geoip_name => $geoip_array ) {
743
+ WP_Statistics_Updates::download_geoip( $geoip_name, "update" );
744
+ }
745
  }
746
 
747
  // Check to see if the referrer spam database needs to be downloaded and do so if required.
includes/classes/class-wp-statistics-ajax.php CHANGED
@@ -330,6 +330,14 @@ class WP_Statistics_Ajax {
330
  }
331
  }
332
 
 
 
 
 
 
 
 
 
333
  if ( 'map' == $widget || 'hitsmap' == $widget ) {
334
  $widget = 'jqv.map';
335
  }
@@ -387,18 +395,10 @@ class WP_Statistics_Ajax {
387
 
388
  break;
389
  case 'page':
390
- _e( 'This feature temporarily disabled.', 'wp-statistics' );
391
-
392
  if ( array_key_exists( 'page-id', $_POST ) ) {
393
  $pageid = (int) $_POST['page-id'];
394
- echo '&nbsp;';
395
- echo sprintf(
396
- __( '<a href="%s">Click here</a> to see page stats.', 'wp-statistics' ),
397
- 'admin.php?page=wps_pages_page&page-id=' . $pageid
398
- );
399
-
400
- // This feature temporarily disabled because there is conflicts.
401
- //wp_statistics_generate_page_postbox_content( null, $pageid );
402
  }
403
 
404
  break;
330
  }
331
  }
332
 
333
+ if ( $_POST['widget'] == "top_visitors" ) {
334
+ $widget = 'top.visitors';
335
+ }
336
+
337
+ if ( $_POST['widget'] == "searched_phrases" ) {
338
+ $widget = 'searched.phrases';
339
+ }
340
+
341
  if ( 'map' == $widget || 'hitsmap' == $widget ) {
342
  $widget = 'jqv.map';
343
  }
395
 
396
  break;
397
  case 'page':
 
 
398
  if ( array_key_exists( 'page-id', $_POST ) ) {
399
  $pageid = (int) $_POST['page-id'];
400
+
401
+ wp_statistics_generate_page_postbox_content( null, $pageid );
 
 
 
 
 
 
402
  }
403
 
404
  break;
includes/classes/class-wp-statistics-dashboard.php CHANGED
@@ -208,19 +208,21 @@ class WP_Statistics_Dashboard {
208
  }
209
 
210
  // Load the map code.
211
- wp_enqueue_style( 'jqvmap-css', WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jqvmap.css', true, '1.5.1' );
212
- wp_enqueue_script(
213
- 'jquery-vmap',
214
- WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jquery.vmap.js',
215
- true,
216
- '1.5.1'
217
- );
218
- wp_enqueue_script(
219
- 'jquery-vmap-world',
220
- WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/maps/jquery.vmap.world.js',
221
- true,
222
- '1.5.1'
223
- );
 
 
224
 
225
  // Load chart library
226
  if ( ! isset( $_GET['post'] ) ) {
@@ -228,7 +230,8 @@ class WP_Statistics_Dashboard {
228
  'wp-statistics-chart-js',
229
  WP_Statistics::$reg['plugin-url'] . 'assets/js/Chart.bundle.min.js',
230
  false,
231
- '2.7.0'
 
232
  );
233
  }
234
 
208
  }
209
 
210
  // Load the map code.
211
+ if (!$WP_Statistics->get_option( 'disable_dashboard' )) {
212
+ wp_enqueue_style('jqvmap-css', WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jqvmap.css', true, '1.5.1');
213
+ wp_enqueue_script(
214
+ 'jquery-vmap',
215
+ WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/jquery.vmap.js',
216
+ true,
217
+ '1.5.1'
218
+ );
219
+ wp_enqueue_script(
220
+ 'jquery-vmap-world',
221
+ WP_Statistics::$reg['plugin-url'] . 'assets/jqvmap/maps/jquery.vmap.world.js',
222
+ true,
223
+ '1.5.1'
224
+ );
225
+ }
226
 
227
  // Load chart library
228
  if ( ! isset( $_GET['post'] ) ) {
230
  'wp-statistics-chart-js',
231
  WP_Statistics::$reg['plugin-url'] . 'assets/js/Chart.bundle.min.js',
232
  false,
233
+ '2.7.3',
234
+ false
235
  );
236
  }
237
 
includes/classes/class-wp-statistics-frontend.php CHANGED
@@ -21,8 +21,25 @@ class WP_Statistics_Frontend {
21
  // We can wait until the very end of the page to process the statistics,
22
  // that way the page loads and displays quickly.
23
  add_action( 'wp', 'WP_Statistics_Frontend::init' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
 
26
  /**
27
  * Footer Action
28
  */
@@ -40,10 +57,105 @@ class WP_Statistics_Frontend {
40
  * @param string $hook Not Used
41
  */
42
  static function enqueue_scripts( $hook ) {
 
 
43
  // Load our CSS to be used.
44
  wp_enqueue_style( 'wpstatistics-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/frontend.css', true, WP_Statistics::$reg['version'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
 
47
  /**
48
  * Shutdown Action
49
  */
@@ -56,26 +168,30 @@ class WP_Statistics_Frontend {
56
  return;
57
  }
58
 
59
- $h = new WP_Statistics_GEO_IP_Hits;
 
60
 
61
- // Call the online users tracking code.
62
- if ( $WP_Statistics->get_option( 'useronline' ) ) {
63
- $h->Check_online();
64
- }
65
 
66
- // Call the visitor tracking code.
67
- if ( $WP_Statistics->get_option( 'visitors' ) ) {
68
- $h->Visitors();
69
- }
70
 
71
- // Call the visit tracking code.
72
- if ( $WP_Statistics->get_option( 'visits' ) ) {
73
- $h->Visits();
74
- }
 
 
 
 
 
75
 
76
- // Call the page tracking code.
77
- if ( $WP_Statistics->get_option( 'pages' ) ) {
78
- $h->Pages();
 
79
  }
80
 
81
  // Check to show hits in posts/pages
21
  // We can wait until the very end of the page to process the statistics,
22
  // that way the page loads and displays quickly.
23
  add_action( 'wp', 'WP_Statistics_Frontend::init' );
24
+
25
+ //Add inline Rest Request
26
+ add_action( 'wp_footer', 'WP_Statistics_Frontend::add_inline_rest_js' );
27
+
28
+ //Add Html Comment in head
29
+ if ( $WP_Statistics->use_cache ) {
30
+ add_action( 'wp_head', 'WP_Statistics_Frontend::html_comment' );
31
+ }
32
+ }
33
+
34
+
35
+ /*
36
+ * Create Comment support Wappalyzer
37
+ */
38
+ static public function html_comment() {
39
+ echo '<!-- Analytics by WP-Statistics v' . WP_Statistics::$reg['version'] . ' - ' . WP_Statistics::$reg['plugin-data']['PluginURI'] . ' -->' . "\n";
40
  }
41
 
42
+
43
  /**
44
  * Footer Action
45
  */
57
  * @param string $hook Not Used
58
  */
59
  static function enqueue_scripts( $hook ) {
60
+ global $WP_Statistics;
61
+
62
  // Load our CSS to be used.
63
  wp_enqueue_style( 'wpstatistics-css', WP_Statistics::$reg['plugin-url'] . 'assets/css/frontend.css', true, WP_Statistics::$reg['version'] );
64
+
65
+ if ( $WP_Statistics->use_cache ) {
66
+ //Load Jquery
67
+ wp_enqueue_script( 'jquery' );
68
+ }
69
+ }
70
+
71
+ /*
72
+ * Inline Js
73
+ */
74
+ static public function add_inline_rest_js() {
75
+ global $WP_Statistics;
76
+
77
+ if ( $WP_Statistics->use_cache ) {
78
+ self::html_comment();
79
+ echo '<script>jQuery(document).ready(function($){jQuery.ajax({type:\'POST\',cache:false,url:\'' . path_join( get_rest_url(), WP_Statistics_Rest::route . '/' . WP_Statistics_Rest::func ) . '\',data: ' . self::set_default_params() . ',beforeSend: function(xhr){xhr.setRequestHeader(\'X-Ajax-Wp-Statistics\',\'true\');},});});</script>' . "\n";
80
+ }
81
+ }
82
+
83
+ /*
84
+ * Set Default Params Rest Api
85
+ */
86
+ static public function set_default_params() {
87
+ global $wpdb, $wp_query, $WP_Statistics;
88
+
89
+ /*
90
+ * Load Rest Api JavaScript
91
+ */
92
+ $params = array();
93
+
94
+ //Set Url
95
+ $params['base'] = rtrim( get_rest_url(), "/" );
96
+
97
+ //Set Browser
98
+ $result = $WP_Statistics->get_UserAgent();
99
+ $params['browser'] = $result['browser'];
100
+ $params['platform'] = $result['platform'];
101
+ $params['version'] = $result['version'];
102
+
103
+ //set referred
104
+ $params['referred'] = $WP_Statistics->get_Referred();
105
+
106
+ //set prefix Rest
107
+ $params['api'] = rtrim( rest_get_url_prefix(), "/" );
108
+
109
+ //Set ip
110
+ $params['ip'] = $WP_Statistics->get_IP();
111
+
112
+ //set hash ip
113
+ $params['hash_ip'] = $WP_Statistics->get_hash_string();
114
+
115
+ //exclude
116
+ $check_exclude = new WP_Statistics_Hits();
117
+ $params['exclude'] = $check_exclude->exclusion_match;
118
+ $params['exclude_reason'] = $check_exclude->exclusion_reason;
119
+
120
+ //User Agent String
121
+ $params['ua'] = '';
122
+ if ( array_key_exists( 'HTTP_USER_AGENT', $_SERVER ) ) {
123
+ $params['ua'] = $_SERVER['HTTP_USER_AGENT'];
124
+ }
125
+
126
+ //track all page
127
+ $params['track_all'] = 0;
128
+ if ( WP_Statistics_Hits::is_track_all_page() === true ) {
129
+ $params['track_all'] = 1;
130
+ }
131
+
132
+ //timestamp
133
+ $params['timestamp'] = $WP_Statistics->current_date( 'U' );
134
+
135
+ //Wp_query
136
+ $params['is_object_wp_query'] = 'false';
137
+ if ( is_object( $wp_query ) ) {
138
+ $params['is_object_wp_query'] = 'true';
139
+ $params['current_page_id'] = $wp_query->get_queried_object_id();
140
+ }
141
+
142
+ //page url
143
+ $params['page_uri'] = wp_statistics_get_uri();
144
+
145
+ foreach ( (array) $params as $key => $value ) {
146
+ if ( ! is_scalar( $value ) ) {
147
+ continue;
148
+ }
149
+ $params[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
150
+ }
151
+
152
+ $array = array();
153
+ $array[ WP_Statistics_Rest::_POST ] = $params;
154
+
155
+ return wp_json_encode( $array );
156
  }
157
 
158
+
159
  /**
160
  * Shutdown Action
161
  */
168
  return;
169
  }
170
 
171
+ //Disable if User Active cache Plugin
172
+ if ( $WP_Statistics->use_cache === false ) {
173
 
174
+ $h = new WP_Statistics_GEO_IP_Hits;
 
 
 
175
 
176
+ // Call the online users tracking code.
177
+ if ( $WP_Statistics->get_option( 'useronline' ) ) {
178
+ $h->Check_online();
179
+ }
180
 
181
+ // Call the visitor tracking code.
182
+ if ( $WP_Statistics->get_option( 'visitors' ) ) {
183
+ $h->Visitors();
184
+ }
185
+
186
+ // Call the visit tracking code.
187
+ if ( $WP_Statistics->get_option( 'visits' ) ) {
188
+ $h->Visits();
189
+ }
190
 
191
+ // Call the page tracking code.
192
+ if ( $WP_Statistics->get_option( 'pages' ) ) {
193
+ $h->Pages();
194
+ }
195
  }
196
 
197
  // Check to show hits in posts/pages
includes/classes/class-wp-statistics-hits.php CHANGED
@@ -4,8 +4,7 @@
4
  This class handles; visits, visitors and pages.
5
  */
6
 
7
- use BrowscapPHP\Browscap;
8
- use WurflCache\Adapter\File;
9
  use IPTools\IP;
10
  use IPTools\Network;
11
  use IPTools\Range;
@@ -16,343 +15,341 @@ class WP_Statistics_Hits {
16
  public $result = null;
17
 
18
  protected $location = '000';
19
- protected $exclusion_match = false;
20
- protected $exclusion_reason = '';
21
 
22
- private $exclusion_record = false;
23
  private $timestamp;
24
  private $second;
25
  private $current_page_id;
26
 
27
  // Construction function.
28
- public function __construct() {
29
- global $wp_version, $WP_Statistics;
30
-
31
- // Set the timestamp value.
32
- $this->timestamp = $WP_Statistics->current_date( 'U' );
33
-
34
- // Set the default seconds a user needs to visit the site before they are considered offline.
35
- $this->second = 30;
36
-
37
- // Get the user set value for seconds to check for users online.
38
- if ( $WP_Statistics->get_option( 'check_online' ) ) {
39
- $this->second = $WP_Statistics->get_option( 'check_online' );
40
- }
41
-
42
- // Check to see if the user wants us to record why we're excluding hits.
43
- if ( $WP_Statistics->get_option( 'record_exclusions' ) ) {
44
- $this->exclusion_record = true;
45
- }
46
-
47
- // Create a IP Tools instance from the current IP address for use later.
48
- // Fall back to the localhost if it can't be parsed.
49
- try {
50
- $ip = new IP( $WP_Statistics->ip );
51
- } catch ( Exception $e ) {
52
- $ip = new IP( '127.0.0.1' );
53
- }
54
-
55
- // Let's check to see if our subnet matches a private IP address range, if so go ahead and set the location information now.
56
- if ( $WP_Statistics->get_option( 'private_country_code' ) != '000' &&
57
- $WP_Statistics->get_option( 'private_country_code' ) != ''
58
- ) {
59
- $private_subnets = array( '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.1/24', 'fc00::/7' );
60
-
61
- foreach ( $private_subnets as $psub ) {
62
- $contains_ip = false;
63
-
64
- try {
65
- $contains_ip = Range::parse( $psub )->contains( $ip );
66
- } catch ( Exception $e ) {
67
- $contains_ip = false;
68
- }
69
-
70
- if ( $contains_ip ) {
71
- $this->location = $WP_Statistics->get_option( 'private_country_code' );
72
- break;
73
- }
74
- }
75
- }
76
-
77
- /*
78
- * The follow exclusion checks are done during the class construction so we don't have to execute them twice if we're tracking visits and visitors.
79
- *
80
- * Order of exclusion checks is:
81
- * 1 - AJAX calls
82
- * 2 - CronJob
83
- * 3 - Robots
84
- * 4 - IP/Subnets
85
- * 5 - Self Referrals, Referrer Spam & login page
86
- * 6 - User roles
87
- * 7 - Host name list
88
- *
89
- * The GoeIP exclusions will be processed in the GeoIP hits class constructor.
90
- *
91
- * Note that we stop processing as soon as a match is made by executing a `return` from the function constructor.
92
- *
93
- */
94
-
95
- // Detect if we're running an ajax request.
96
- $page_uri = wp_statistics_get_uri();
97
- $ajax_string = 'admin-ajax.php';
98
-
99
- if ( strpos( $page_uri, $ajax_string ) !== false ) {
100
- $this->exclusion_match = true;
101
- $this->exclusion_reason = 'ajax';
102
-
103
- return;
104
- }
105
-
106
- if ( ( defined( 'DOING_CRON' ) && DOING_CRON === true ) || ( function_exists( 'wp_doing_cron' ) && wp_doing_cron() === true ) ) {
107
- $this->exclusion_match = true;
108
- $this->exclusion_reason = 'cronjob';
109
-
110
- return;
111
- }
112
-
113
- // Detect if the user is a crawler.
114
- $crawler = false;
115
- $ua_string = '';
116
-
117
- if ( array_key_exists( 'HTTP_USER_AGENT', $_SERVER ) ) {
118
- $ua_string = $_SERVER['HTTP_USER_AGENT'];
119
- }
120
-
121
- if ( $WP_Statistics->get_option( 'last_browscap_dl' ) > 1 && $WP_Statistics->get_option( 'browscap' ) ) {
122
- // Get the upload directory from WordPress.
123
- $upload_dir = wp_upload_dir();
124
-
125
- $adapter = new File( array( File::DIR => $upload_dir['basedir'] . '/wp-statistics' ) );
126
-
127
- // Get the Browser Capabilities use Browscap.
128
- try {
129
- $browscap = new Browscap();
130
- $browscap->setCache( $adapter );
131
- $current_browser = $browscap->getBrowser();
132
-
133
- // Make sure we got an object back and it has the Crawler property before accessing it.
134
- if ( isset( $current_browser->Crawler ) ) {
135
- $crawler = $current_browser->Crawler;
136
- } else {
137
- $crawler = false;
138
- }
139
- } catch ( Exception $e ) {
140
- $crawler = false;
141
- }
142
- } else {
143
- $WP_Statistics->update_option( 'update_browscap', true );
144
- }
145
-
146
- // If we're a crawler as per browscap, exclude us, otherwise double check based on the WP Statistics robot list.
147
- if ( $crawler == true ) {
148
- $this->exclusion_match = true;
149
- $this->exclusion_reason = 'browscap';
150
-
151
- return;
152
- } else {
153
- // Pull the robots from the database.
154
- $robots = explode( "\n", $WP_Statistics->get_option( 'robotlist' ) );
155
-
156
- // Check to see if we match any of the robots.
157
- foreach ( $robots as $robot ) {
158
- $robot = trim( $robot );
159
-
160
- // If the match case is less than 4 characters long, it might match too much so don't execute it.
161
- if ( strlen( $robot ) > 3 ) {
162
- if ( stripos( $ua_string, $robot ) !== false ) {
163
- $this->exclusion_match = true;
164
- $this->exclusion_reason = 'robot';
165
-
166
- return;
167
- }
168
- }
169
- }
170
-
171
- // Finally check to see if we have corrupt header information.
172
- if ( ! $this->exclusion_match && $WP_Statistics->get_option( 'corrupt_browser_info' ) ) {
173
- if ( $ua_string == '' || $WP_Statistics->ip == '' ) {
174
- $this->exclusion_match = true;
175
- $this->exclusion_reason = 'robot';
176
-
177
- return;
178
- }
179
- }
180
- }
181
-
182
- // If we didn't match a robot, check ip subnets.
183
-
184
- // Pull the subnets from the database.
185
- $subnets = explode( "\n", $WP_Statistics->get_option( 'exclude_ip' ) );
186
-
187
- // Check to see if we match any of the excluded addresses.
188
- foreach ( $subnets as $subnet ) {
189
- $subnet = trim( $subnet );
190
-
191
- // The shortest ip address is 1.1.1.1, anything less must be a malformed entry.
192
- if ( strlen( $subnet ) > 6 ) {
193
- $range_prased = false;
194
-
195
- try {
196
- $range_prased = Range::parse( $subnet )->contains( $ip );
197
- } catch ( Exception $e ) {
198
- $range_parased = false;
199
- }
200
-
201
- if ( $range_prased ) {
202
- $this->exclusion_match = true;
203
- $this->exclusion_reason = 'ip match';
204
-
205
- return;
206
- }
207
- }
208
- }
209
-
210
- // Check to see if we are being referred to ourselves.
211
- if ( $ua_string == 'WordPress/' . $wp_version . '; ' . get_home_url( null, '/' ) ||
212
- $ua_string == 'WordPress/' . $wp_version . '; ' . get_home_url()
213
- ) {
214
- $this->exclusion_match = true;
215
- $this->exclusion_reason = 'self referral';
216
-
217
- return;
218
- }
219
-
220
- // Check to see if we're excluding the login page.
221
- if ( $WP_Statistics->get_option( 'exclude_loginpage' ) ) {
222
- $protocol = strpos( strtolower( $_SERVER['SERVER_PROTOCOL'] ), 'https' ) === false ? 'http' : 'https';
223
- $host = $_SERVER['HTTP_HOST'];
224
- $script = $_SERVER['SCRIPT_NAME'];
225
-
226
- $currentURL = $protocol . '://' . $host . $script;
227
- $loginURL = wp_login_url();
228
-
229
- if ( $currentURL == $loginURL ) {
230
- $this->exclusion_match = true;
231
- $this->exclusion_reason = 'login page';
232
-
233
- return;
234
- }
235
- }
236
-
237
- // Check to see if we're excluding referrer spam.
238
- if ( $WP_Statistics->get_option( 'referrerspam' ) ) {
239
- $referrer = $WP_Statistics->get_Referred();
240
-
241
- // Pull the referrer spam list from the database.
242
- $referrerspamlist = explode( "\n", $WP_Statistics->get_option( 'referrerspamlist' ) );
243
-
244
- // Check to see if we match any of the robots.
245
- foreach ( $referrerspamlist as $item ) {
246
- $item = trim( $item );
247
-
248
- // If the match case is less than 4 characters long, it might match too much so don't execute it.
249
- if ( strlen( $item ) > 3 ) {
250
- if ( stripos( $referrer, $item ) !== false ) {
251
- $this->exclusion_match = true;
252
- $this->exclusion_reason = 'referrer_spam';
253
-
254
- return;
255
- }
256
- }
257
- }
258
- }
259
-
260
- // Check to see if we're excluding RSS feeds.
261
- if ( $WP_Statistics->get_option( 'exclude_feeds' ) ) {
262
- if ( is_feed() ) {
263
- $this->exclusion_match = true;
264
- $this->exclusion_reason = 'feed';
265
-
266
- return;
267
- }
268
- }
269
-
270
- // Check to see if we're excluding 404 pages.
271
- if ( $WP_Statistics->get_option( 'exclude_404s' ) ) {
272
- if ( is_404() ) {
273
- $this->exclusion_match = true;
274
- $this->exclusion_reason = '404';
275
-
276
- return;
277
- }
278
- }
279
-
280
- // Check to see if we're excluding the current page url.
281
- if ( $WP_Statistics->get_option( 'excluded_urls' ) ) {
282
- $script = $_SERVER['REQUEST_URI'];
283
- $delimiter = strpos( $script, '?' );
284
- if ( $delimiter > 0 ) {
285
- $script = substr( $script, 0, $delimiter );
286
- }
287
-
288
- $excluded_urls = explode( "\n", $WP_Statistics->get_option( 'excluded_urls' ) );
289
-
290
- foreach ( $excluded_urls as $url ) {
291
- $this_url = trim( $url );
292
-
293
- if ( strlen( $this_url ) > 2 ) {
294
- if ( stripos( $script, $this_url ) === 0 ) {
295
- $this->exclusion_match = true;
296
- $this->exclusion_reason = 'excluded url';
297
-
298
- return;
299
- }
300
- }
301
- }
302
- }
303
-
304
- // Check to see if we are excluding based on the user role.
305
- if ( is_user_logged_in() ) {
306
- $current_user = wp_get_current_user();
307
-
308
- foreach ( $current_user->roles as $role ) {
309
- $option_name = 'exclude_' . str_replace( ' ', '_', strtolower( $role ) );
310
- if ( $WP_Statistics->get_option( $option_name ) == true ) {
311
- $this->exclusion_match = true;
312
- $this->exclusion_reason = 'user role';
313
-
314
- return;
315
- }
316
- }
317
- }
318
-
319
- // Check to see if we are excluded by the host name.
320
- if ( ! $this->exclusion_match ) {
321
- $excluded_host = explode( "\n", $WP_Statistics->get_option( 'excluded_hosts' ) );
322
-
323
- // If there's nothing in the excluded host list, don't do anything.
324
- if ( count( $excluded_host ) > 0 ) {
325
- $transient_name = 'wps_excluded_hostname_to_ip_cache';
326
-
327
- // Get the transient with the hostname cache.
328
- $hostname_cache = get_transient( $transient_name );
329
-
330
- // If the transient has expired (or has never been set), create one now.
331
- if ( $hostname_cache === false ) {
332
- // Flush the failed cache variable.
333
- $hostname_cache = array();
334
-
335
- // Loop through the list of hosts and look them up.
336
- foreach ( $excluded_host as $host ) {
337
- if ( strpos( $host, '.' ) > 0 ) {
338
- // We add the extra period to the end of the host name to make sure we don't append the local dns suffix to the resolution cycle.
339
- $hostname_cache[ $host ] = gethostbyname( $host . '.' );
340
- }
341
- }
342
-
343
- // Set the transient and store it for 1 hour.
344
- set_transient( $transient_name, $hostname_cache, 360 );
345
- }
346
-
347
- // Check if the current IP address matches one of the ones in the excluded hosts list.
348
- if ( in_array( $WP_Statistics->ip, $hostname_cache ) ) {
349
- $this->exclusion_match = true;
350
- $this->exclusion_reason = 'hostname';
351
-
352
- return;
353
- }
354
- }
355
- }
356
  }
357
 
358
  // This function records visits to the site.
@@ -401,10 +398,18 @@ class WP_Statistics_Hits {
401
  public function Visitors() {
402
  global $wpdb, $wp_query, $WP_Statistics;
403
 
404
- // Get the pages or posts ID if it exists.
405
- if ( is_object( $wp_query ) ) {
406
- $this->current_page_id = $wp_query->get_queried_object_id();
407
- }
 
 
 
 
 
 
 
 
408
 
409
  if ( $WP_Statistics->get_option( 'use_honeypot' ) &&
410
  $WP_Statistics->get_option( 'honeypot_postid' ) > 0 &&
@@ -442,7 +447,11 @@ class WP_Statistics_Hits {
442
 
443
  // If we've been told to store the entire user agent, do so.
444
  if ( $WP_Statistics->get_option( 'store_ua' ) == true ) {
445
- $ua = $_SERVER['HTTP_USER_AGENT'];
 
 
 
 
446
  } else {
447
  $ua = '';
448
  }
@@ -472,7 +481,11 @@ class WP_Statistics_Hits {
472
  if ( $WP_Statistics->get_option( 'search_converted' ) && $wpdb->insert_id ) {
473
 
474
  $search_engines = wp_statistics_searchengine_list();
475
- $referred = $WP_Statistics->get_Referred();
 
 
 
 
476
 
477
  // Parse the URL in to it's component parts.
478
  $parts = parse_url( $referred );
@@ -552,6 +565,17 @@ class WP_Statistics_Hits {
552
  }
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
 
555
  // This function records page hits.
556
  public function Pages() {
557
  global $wpdb, $wp_query, $WP_Statistics;
@@ -559,12 +583,28 @@ class WP_Statistics_Hits {
559
  // If we're a web crawler or referral from ourselves or an excluded address don't record the page hit.
560
  if ( ! $this->exclusion_match ) {
561
 
562
- // Don't track anything but actual pages and posts, unless we've been told to.
563
- if ( $WP_Statistics->get_option( 'track_all_pages' ) || is_page() || is_single() || is_front_page() ) {
 
 
 
 
 
 
 
 
 
 
564
  // Get the pages or posts ID if it exists and we haven't set it in the visitors code.
565
- if ( ! $this->current_page_id && is_object( $wp_query ) ) {
566
- $this->current_page_id = $wp_query->get_queried_object_id();
567
- }
 
 
 
 
 
 
568
 
569
  // If we didn't find a page id, we don't have anything else to do.
570
  if ( ! $this->current_page_id ) {
@@ -572,7 +612,11 @@ class WP_Statistics_Hits {
572
  }
573
 
574
  // Get the current page URI.
575
- $page_uri = wp_statistics_get_uri();
 
 
 
 
576
 
577
  if ( $WP_Statistics->get_option( 'strip_uri_parameters' ) ) {
578
  $temp = explode( '?', $page_uri );
@@ -585,7 +629,7 @@ class WP_Statistics_Hits {
585
  $page_uri = substr( $page_uri, 0, 255 );
586
 
587
  // If we have already been to this page today (a likely scenario), just update the count on the record.
588
- $sql = $wpdb->prepare(
589
  "UPDATE {$wpdb->prefix}statistics_pages SET `count` = `count` + 1 WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' AND `uri` = %s",
590
  $page_uri
591
  );
4
  This class handles; visits, visitors and pages.
5
  */
6
 
7
+ use Jaybizzle\CrawlerDetect\CrawlerDetect;
 
8
  use IPTools\IP;
9
  use IPTools\Network;
10
  use IPTools\Range;
15
  public $result = null;
16
 
17
  protected $location = '000';
18
+ public $exclusion_match = false;
19
+ public $exclusion_reason = '';
20
 
21
+ public $exclusion_record = false;
22
  private $timestamp;
23
  private $second;
24
  private $current_page_id;
25
 
26
  // Construction function.
27
+ public function __construct()
28
+ {
29
+ global $wp_version, $WP_Statistics;
30
+
31
+ // Set the timestamp value.
32
+ $this->timestamp = $WP_Statistics->current_date('U');
33
+ if (WP_Statistics_Rest::is_rest()) { $this->timestamp = WP_Statistics_Rest::params('timestamp'); }
34
+
35
+ // Set the default seconds a user needs to visit the site before they are considered offline.
36
+ $this->second = 30;
37
+
38
+ // Get the user set value for seconds to check for users online.
39
+ if ($WP_Statistics->get_option('check_online')) {
40
+ $this->second = $WP_Statistics->get_option('check_online');
41
+ }
42
+
43
+ // Check to see if the user wants us to record why we're excluding hits.
44
+ if ($WP_Statistics->get_option('record_exclusions')) {
45
+ $this->exclusion_record = true;
46
+ }
47
+
48
+ // Create a IP Tools instance from the current IP address for use later.
49
+ // Fall back to the localhost if it can't be parsed.
50
+ try {
51
+ $ip = new IP($WP_Statistics->ip);
52
+ } catch (Exception $e) {
53
+ $ip = new IP('127.0.0.1');
54
+ }
55
+
56
+ // Let's check to see if our subnet matches a private IP address range, if so go ahead and set the location information now.
57
+ if ($WP_Statistics->get_option('private_country_code') != '000' &&
58
+ $WP_Statistics->get_option('private_country_code') != ''
59
+ ) {
60
+ $private_subnets = array('10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '127.0.0.1/24', 'fc00::/7');
61
+
62
+ foreach ($private_subnets as $psub) {
63
+ $contains_ip = false;
64
+
65
+ try {
66
+ $contains_ip = Range::parse($psub)->contains($ip);
67
+ } catch (Exception $e) {
68
+ $contains_ip = false;
69
+ }
70
+
71
+ if ($contains_ip) {
72
+ $this->location = $WP_Statistics->get_option('private_country_code');
73
+ break;
74
+ }
75
+ }
76
+ }
77
+
78
+ /*
79
+ * The follow exclusion checks are done during the class construction so we don't have to execute them twice if we're tracking visits and visitors.
80
+ *
81
+ * Order of exclusion checks is:
82
+ * 1 - AJAX calls
83
+ * 2 - CronJob
84
+ * 3 - Robots
85
+ * 4 - IP/Subnets
86
+ * 5 - Self Referrals, Referrer Spam & login page
87
+ * 6 - User roles
88
+ * 7 - Host name list
89
+ *
90
+ * The GoeIP exclusions will be processed in the GeoIP hits class constructor.
91
+ *
92
+ * Note that we stop processing as soon as a match is made by executing a `return` from the function constructor.
93
+ *
94
+ */
95
+ if (WP_Statistics_Rest::is_rest()) {
96
+ $this->exclusion_match = (WP_Statistics_Rest::params('exclude') ==1 ? true : false);
97
+ $this->exclusion_reason = WP_Statistics_Rest::params('exclude_reason');
98
+
99
+ if ($this->exclusion_match ===true) return;
100
+ } else {
101
+
102
+ // Detect if we're running an ajax request.
103
+ if (defined('DOING_AJAX') && DOING_AJAX) {
104
+ $this->exclusion_match = true;
105
+ $this->exclusion_reason = 'ajax';
106
+
107
+ return;
108
+ }
109
+
110
+ if ((defined('DOING_CRON') && DOING_CRON === true) || (function_exists('wp_doing_cron') && wp_doing_cron() === true)) {
111
+ $this->exclusion_match = true;
112
+ $this->exclusion_reason = 'cronjob';
113
+
114
+ return;
115
+ }
116
+
117
+ $crawler = false;
118
+ $ua_string = '';
119
+
120
+ if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) {
121
+ $ua_string = $_SERVER['HTTP_USER_AGENT'];
122
+ }
123
+
124
+ /*
125
+ * Check Is robot
126
+ */
127
+ $CrawlerDetect = new CrawlerDetect;
128
+ if ($CrawlerDetect->isCrawler()) {
129
+ $crawler = true;
130
+ }
131
+
132
+ // If we're a crawler as per whichbrowser, exclude us, otherwise double check based on the WP Statistics robot list.
133
+ if ($crawler == true) {
134
+ $this->exclusion_match = true;
135
+ $this->exclusion_reason = 'CrawlerDetect';
136
+
137
+ return;
138
+ } else {
139
+ // Pull the robots from the database.
140
+ $robots = explode("\n", $WP_Statistics->get_option('robotlist'));
141
+
142
+ // Check to see if we match any of the robots.
143
+ foreach ($robots as $robot) {
144
+ $robot = trim($robot);
145
+
146
+ // If the match case is less than 4 characters long, it might match too much so don't execute it.
147
+ if (strlen($robot) > 3) {
148
+ if (stripos($ua_string, $robot) !== false) {
149
+ $this->exclusion_match = true;
150
+ $this->exclusion_reason = 'robot';
151
+
152
+ return;
153
+ }
154
+ }
155
+ }
156
+
157
+ // Finally check to see if we have corrupt header information.
158
+ if (!$this->exclusion_match && $WP_Statistics->get_option('corrupt_browser_info')) {
159
+ if ($ua_string == '' || $WP_Statistics->ip == '') {
160
+ $this->exclusion_match = true;
161
+ $this->exclusion_reason = 'robot';
162
+
163
+ return;
164
+ }
165
+ }
166
+ }
167
+
168
+ // If we didn't match a robot, check ip subnets.
169
+
170
+ // Pull the subnets from the database.
171
+ $subnets = explode("\n", $WP_Statistics->get_option('exclude_ip'));
172
+
173
+ // Check to see if we match any of the excluded addresses.
174
+ foreach ($subnets as $subnet) {
175
+ $subnet = trim($subnet);
176
+
177
+ // The shortest ip address is 1.1.1.1, anything less must be a malformed entry.
178
+ if (strlen($subnet) > 6) {
179
+ $range_prased = false;
180
+
181
+ try {
182
+ $range_prased = Range::parse($subnet)->contains($ip);
183
+ } catch (Exception $e) {
184
+ $range_parased = false;
185
+ }
186
+
187
+ if ($range_prased) {
188
+ $this->exclusion_match = true;
189
+ $this->exclusion_reason = 'ip match';
190
+
191
+ return;
192
+ }
193
+ }
194
+ }
195
+
196
+ // Check to see if we are being referred to ourselves.
197
+ if ($ua_string == 'WordPress/' . $wp_version . '; ' . get_home_url(null, '/') ||
198
+ $ua_string == 'WordPress/' . $wp_version . '; ' . get_home_url()
199
+ ) {
200
+ $this->exclusion_match = true;
201
+ $this->exclusion_reason = 'self referral';
202
+
203
+ return;
204
+ }
205
+
206
+ // Check to see if we're excluding the login page.
207
+ if ($WP_Statistics->get_option('exclude_loginpage')) {
208
+ $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']), 'https') === false ? 'http' : 'https';
209
+ $host = $_SERVER['HTTP_HOST'];
210
+ $script = $_SERVER['SCRIPT_NAME'];
211
+
212
+ $currentURL = $protocol . '://' . $host . $script;
213
+ $loginURL = wp_login_url();
214
+
215
+ if ($currentURL == $loginURL) {
216
+ $this->exclusion_match = true;
217
+ $this->exclusion_reason = 'login page';
218
+
219
+ return;
220
+ }
221
+ }
222
+
223
+ // Check to see if we're excluding the Admin page.
224
+ if ($WP_Statistics->get_option('exclude_adminpage')) {
225
+ if (stristr($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], "wp-admin")) {
226
+ $this->exclusion_match = true;
227
+ $this->exclusion_reason = 'admin page';
228
+
229
+ return;
230
+ }
231
+ }
232
+
233
+ // Check to see if we're excluding referrer spam.
234
+ if ($WP_Statistics->get_option('referrerspam')) {
235
+ $referrer = $WP_Statistics->get_Referred();
236
+
237
+ // Pull the referrer spam list from the database.
238
+ $referrerspamlist = explode("\n", $WP_Statistics->get_option('referrerspamlist'));
239
+
240
+ // Check to see if we match any of the robots.
241
+ foreach ($referrerspamlist as $item) {
242
+ $item = trim($item);
243
+
244
+ // If the match case is less than 4 characters long, it might match too much so don't execute it.
245
+ if (strlen($item) > 3) {
246
+ if (stripos($referrer, $item) !== false) {
247
+ $this->exclusion_match = true;
248
+ $this->exclusion_reason = 'referrer_spam';
249
+
250
+ return;
251
+ }
252
+ }
253
+ }
254
+ }
255
+
256
+ // Check to see if we're excluding RSS feeds.
257
+ if ($WP_Statistics->get_option('exclude_feeds')) {
258
+ if (is_feed()) {
259
+ $this->exclusion_match = true;
260
+ $this->exclusion_reason = 'feed';
261
+
262
+ return;
263
+ }
264
+ }
265
+
266
+ // Check to see if we're excluding 404 pages.
267
+ if ($WP_Statistics->get_option('exclude_404s')) {
268
+ if (is_404()) {
269
+ $this->exclusion_match = true;
270
+ $this->exclusion_reason = '404';
271
+
272
+ return;
273
+ }
274
+ }
275
+
276
+ // Check to see if we're excluding the current page url.
277
+ if ($WP_Statistics->get_option('excluded_urls')) {
278
+ $script = $_SERVER['REQUEST_URI'];
279
+ $delimiter = strpos($script, '?');
280
+ if ($delimiter > 0) {
281
+ $script = substr($script, 0, $delimiter);
282
+ }
283
+
284
+ $excluded_urls = explode("\n", $WP_Statistics->get_option('excluded_urls'));
285
+
286
+ foreach ($excluded_urls as $url) {
287
+ $this_url = trim($url);
288
+
289
+ if (strlen($this_url) > 2) {
290
+ if (stripos($script, $this_url) === 0) {
291
+ $this->exclusion_match = true;
292
+ $this->exclusion_reason = 'excluded url';
293
+
294
+ return;
295
+ }
296
+ }
297
+ }
298
+ }
299
+
300
+ // Check to see if we are excluding based on the user role.
301
+ if (is_user_logged_in()) {
302
+ $current_user = wp_get_current_user();
303
+
304
+ foreach ($current_user->roles as $role) {
305
+ $option_name = 'exclude_' . str_replace(' ', '_', strtolower($role));
306
+ if ($WP_Statistics->get_option($option_name) == true) {
307
+ $this->exclusion_match = true;
308
+ $this->exclusion_reason = 'user role';
309
+
310
+ return;
311
+ }
312
+ }
313
+ }
314
+
315
+ // Check to see if we are excluded by the host name.
316
+ if (!$this->exclusion_match) {
317
+ $excluded_host = explode("\n", $WP_Statistics->get_option('excluded_hosts'));
318
+
319
+ // If there's nothing in the excluded host list, don't do anything.
320
+ if (count($excluded_host) > 0) {
321
+ $transient_name = 'wps_excluded_hostname_to_ip_cache';
322
+
323
+ // Get the transient with the hostname cache.
324
+ $hostname_cache = get_transient($transient_name);
325
+
326
+ // If the transient has expired (or has never been set), create one now.
327
+ if ($hostname_cache === false) {
328
+ // Flush the failed cache variable.
329
+ $hostname_cache = array();
330
+
331
+ // Loop through the list of hosts and look them up.
332
+ foreach ($excluded_host as $host) {
333
+ if (strpos($host, '.') > 0) {
334
+ // We add the extra period to the end of the host name to make sure we don't append the local dns suffix to the resolution cycle.
335
+ $hostname_cache[$host] = gethostbyname($host . '.');
336
+ }
337
+ }
338
+
339
+ // Set the transient and store it for 1 hour.
340
+ set_transient($transient_name, $hostname_cache, 360);
341
+ }
342
+
343
+ // Check if the current IP address matches one of the ones in the excluded hosts list.
344
+ if (in_array($WP_Statistics->ip, $hostname_cache)) {
345
+ $this->exclusion_match = true;
346
+ $this->exclusion_reason = 'hostname';
347
+
348
+ return;
349
+ }
350
+ }
351
+ }
352
+ }
 
 
353
  }
354
 
355
  // This function records visits to the site.
398
  public function Visitors() {
399
  global $wpdb, $wp_query, $WP_Statistics;
400
 
401
+ //Check If Rest Request
402
+ if( WP_Statistics_Rest::is_rest() ) {
403
+ // Get the pages or posts ID if it exists.
404
+ if ( WP_Statistics_Rest::params('is_object_wp_query') =="true" ) {
405
+ $this->current_page_id = WP_Statistics_Rest::params('current_page_id');
406
+ }
407
+ } else {
408
+ // Get the pages or posts ID if it exists.
409
+ if ( is_object( $wp_query ) ) {
410
+ $this->current_page_id = $wp_query->get_queried_object_id();
411
+ }
412
+ }
413
 
414
  if ( $WP_Statistics->get_option( 'use_honeypot' ) &&
415
  $WP_Statistics->get_option( 'honeypot_postid' ) > 0 &&
447
 
448
  // If we've been told to store the entire user agent, do so.
449
  if ( $WP_Statistics->get_option( 'store_ua' ) == true ) {
450
+ if( WP_Statistics_Rest::is_rest() ) {
451
+ $ua = WP_Statistics_Rest::params('ua');
452
+ } else {
453
+ $ua = $_SERVER['HTTP_USER_AGENT'];
454
+ }
455
  } else {
456
  $ua = '';
457
  }
481
  if ( $WP_Statistics->get_option( 'search_converted' ) && $wpdb->insert_id ) {
482
 
483
  $search_engines = wp_statistics_searchengine_list();
484
+ if( WP_Statistics_Rest::is_rest() ) {
485
+ $referred = WP_Statistics_Rest::params('referred');
486
+ } else {
487
+ $referred = $WP_Statistics->get_Referred();
488
+ }
489
 
490
  // Parse the URL in to it's component parts.
491
  $parts = parse_url( $referred );
565
  }
566
  }
567
 
568
+ // Check is Track All Page
569
+ static public function is_track_all_page()
570
+ {
571
+ global $WP_Statistics;
572
+ if ( $WP_Statistics->get_option( 'track_all_pages' ) || is_page() || is_single() || is_front_page() ) {
573
+ return true;
574
+ }
575
+
576
+ return false;
577
+ }
578
+
579
  // This function records page hits.
580
  public function Pages() {
581
  global $wpdb, $wp_query, $WP_Statistics;
583
  // If we're a web crawler or referral from ourselves or an excluded address don't record the page hit.
584
  if ( ! $this->exclusion_match ) {
585
 
586
+ // Don't track anything but actual pages and posts, unless we've been told to.
587
+ $is_track_all = false;
588
+ if( WP_Statistics_Rest::is_rest() ) {
589
+ if(WP_Statistics_Rest::params('track_all') ==1) $is_track_all = true;
590
+ } else {
591
+ if ( self::is_track_all_page() ) {
592
+ $is_track_all = true;
593
+ }
594
+ }
595
+
596
+ if ( $is_track_all ===true ) {
597
+
598
  // Get the pages or posts ID if it exists and we haven't set it in the visitors code.
599
+ if( WP_Statistics_Rest::is_rest() ) {
600
+ if ( ! $this->current_page_id ) {
601
+ $this->current_page_id = WP_Statistics_Rest::params('current_page_id');
602
+ }
603
+ } else {
604
+ if ( ! $this->current_page_id && is_object( $wp_query ) ) {
605
+ $this->current_page_id = $wp_query->get_queried_object_id();
606
+ }
607
+ }
608
 
609
  // If we didn't find a page id, we don't have anything else to do.
610
  if ( ! $this->current_page_id ) {
612
  }
613
 
614
  // Get the current page URI.
615
+ if( WP_Statistics_Rest::is_rest() ) {
616
+ $page_uri = WP_Statistics_Rest::params('page_uri');
617
+ } else {
618
+ $page_uri = wp_statistics_get_uri();
619
+ }
620
 
621
  if ( $WP_Statistics->get_option( 'strip_uri_parameters' ) ) {
622
  $temp = explode( '?', $page_uri );
629
  $page_uri = substr( $page_uri, 0, 255 );
630
 
631
  // If we have already been to this page today (a likely scenario), just update the count on the record.
632
+ $sql = $wpdb->prepare(
633
  "UPDATE {$wpdb->prefix}statistics_pages SET `count` = `count` + 1 WHERE `date` = '{$WP_Statistics->Current_Date( 'Y-m-d' )}' AND `uri` = %s",
634
  $page_uri
635
  );
includes/classes/class-wp-statistics-install.php CHANGED
@@ -258,6 +258,8 @@ class WP_Statistics_Install {
258
  'wps_coefficient',
259
  'wps_pages',
260
  'wps_track_all_pages',
 
 
261
  'wps_disable_column',
262
  'wps_menu_bar',
263
  'wps_hide_notices',
@@ -272,6 +274,7 @@ class WP_Statistics_Install {
272
  'wps_robotlist',
273
  'wps_exclude_ip',
274
  'wps_exclude_loginpage',
 
275
  );
276
  $var_options = array( 'wps_disable_se_%', 'wps_exclude_%' );
277
  $widget_options = array(
258
  'wps_coefficient',
259
  'wps_pages',
260
  'wps_track_all_pages',
261
+ 'wps_use_cache_plugin',
262
+ 'wps_geoip_city',
263
  'wps_disable_column',
264
  'wps_menu_bar',
265
  'wps_hide_notices',
274
  'wps_robotlist',
275
  'wps_exclude_ip',
276
  'wps_exclude_loginpage',
277
+ 'wps_exclude_adminpage',
278
  );
279
  $var_options = array( 'wps_disable_se_%', 'wps_exclude_%' );
280
  $widget_options = array(
includes/classes/class-wp-statistics-pagination.php CHANGED
@@ -461,7 +461,7 @@ if ( ! class_exists( "WP_Statistics_Pagination" ) ): // Prevent multiple clas
461
 
462
  $varName = $this->_getPOSTVarName();
463
 
464
- if ( count( $this->_displayOptions ) > 1 ) // If more than 1 display option
465
  {
466
  $value = $this->_displayOptions[0]; // Default is first selection
467
 
461
 
462
  $varName = $this->_getPOSTVarName();
463
 
464
+ if ( is_array( $this->_displayOptions ) and count( $this->_displayOptions ) > 1 ) // If more than 1 display option
465
  {
466
  $value = $this->_displayOptions[0]; // Default is first selection
467
 
includes/classes/class-wp-statistics-rest.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WP_Statistics_Rest
5
+ */
6
+ class WP_Statistics_Rest {
7
+
8
+ // Set Default namespace
9
+ const route = 'wpstatistics/v1';
10
+
11
+ // Set Default Statistic Save method
12
+ const func = 'hit';
13
+
14
+ // Set Default POST Name
15
+ const _POST = 'wp_statistics_hit';
16
+
17
+ /**
18
+ * Setup an Wordpress REst Api action.
19
+ */
20
+ public function __construct() {
21
+ global $WP_Statistics;
22
+
23
+ /*
24
+ * add Router Rest Api
25
+ */
26
+ if ( $WP_Statistics->use_cache ) {
27
+ add_action( 'rest_api_init', array( $this, 'register_routes' ) );
28
+ }
29
+ }
30
+
31
+ /*
32
+ * Add Endpoint Route
33
+ */
34
+ public function register_routes() {
35
+ // Get Hit
36
+ register_rest_route( self::route, '/' . self::func, array(
37
+ 'methods' => 'POST',
38
+ 'callback' => array( $this, 'hit' ),
39
+ ) );
40
+ }
41
+
42
+ /*
43
+ * Hit callback
44
+ */
45
+ public function hit() {
46
+ global $WP_Statistics;
47
+
48
+ /*
49
+ * Check Is Test Service Request
50
+ */
51
+ if ( isset( $_POST['rest-api-wp-statistics'] ) ) {
52
+
53
+ return array( "rest-api-wp-statistics" => "OK" );
54
+ }
55
+
56
+ /*
57
+ * Check Security Referer Only This Domain Access
58
+ */
59
+ $header = $WP_Statistics::getAllHeader();
60
+
61
+ //Check Auth Key Request
62
+ if ( ! isset( $header['X-Ajax-Wp-Statistics'] ) ) {
63
+ return new WP_Error( 'error', 'You have no right to access', array( 'status' => 403 ) );
64
+ }
65
+
66
+ // If something has gone horribly wrong and $WP_Statistics isn't an object, bail out.
67
+ // This seems to happen sometimes with WP Cron calls.
68
+ if ( ! is_object( $WP_Statistics ) ) {
69
+ return;
70
+ }
71
+
72
+ $h = new WP_Statistics_GEO_IP_Hits;
73
+
74
+ // Call the online users tracking code.
75
+ if ( $WP_Statistics->get_option( 'useronline' ) ) {
76
+ $h->Check_online();
77
+ }
78
+
79
+ // Call the visitor tracking code.
80
+ if ( $WP_Statistics->get_option( 'visitors' ) ) {
81
+ $h->Visitors();
82
+ }
83
+
84
+ // Call the visit tracking code.
85
+ if ( $WP_Statistics->get_option( 'visits' ) ) {
86
+ $h->Visits();
87
+ }
88
+
89
+ // Call the page tracking code.
90
+ if ( $WP_Statistics->get_option( 'pages' ) ) {
91
+ $h->Pages();
92
+ }
93
+ }
94
+
95
+ /*
96
+ * Check is Rest Request
97
+ */
98
+ static public function is_rest() {
99
+ global $WP_Statistics;
100
+
101
+ if ( $WP_Statistics->use_cache === true ) {
102
+ $header = $WP_Statistics::getAllHeader();
103
+ if ( isset( $header['X-Ajax-Wp-Statistics'] ) and isset( $_POST[ self::_POST ] ) ) {
104
+ return true;
105
+ }
106
+ }
107
+
108
+ return false;
109
+ }
110
+
111
+ /*
112
+ * Get Params Request
113
+ */
114
+ static public function params( $params ) {
115
+ if ( isset( $_POST[ self::_POST ][ $params ] ) ) {
116
+ return $_POST[ self::_POST ][ $params ];
117
+ }
118
+
119
+ return false;
120
+ }
121
+ }
includes/classes/class-wp-statistics-schedule.php CHANGED
@@ -45,18 +45,6 @@ class WP_Statistics_Schedule {
45
  wp_unschedule_event( wp_next_scheduled( 'wp_statistics_geoip_hook' ), 'wp_statistics_geoip_hook' );
46
  }
47
 
48
- // Add the browscap update schedule if it doesn't exist and it should be.
49
- if ( ! wp_next_scheduled( 'wp_statistics_browscap_hook' ) && $WP_Statistics->get_option( 'schedule_browscap' ) ) {
50
-
51
- wp_schedule_event( time(), 'weekly', 'wp_statistics_browscap_hook' );
52
- }
53
-
54
- // Remove the browscap update schedule if it does exist and it should shouldn't.
55
- if ( wp_next_scheduled( 'wp_statistics_browscap_hook' ) && ! $WP_Statistics->get_option( 'schedule_browscap' ) ) {
56
-
57
- wp_unschedule_event( wp_next_scheduled( 'wp_statistics_browscap_hook' ), 'wp_statistics_browscap_hook' );
58
- }
59
-
60
  // Add the referrerspam update schedule if it doesn't exist and it should be.
61
  if ( ! wp_next_scheduled( 'wp_statistics_referrerspam_hook' ) &&
62
  $WP_Statistics->get_option( 'schedule_referrerspam' )
@@ -122,8 +110,6 @@ class WP_Statistics_Schedule {
122
  //after construct
123
  add_action( 'wp_statistics_add_visit_hook', 'WP_Statistics_Schedule::add_visit_event' );
124
  add_action( 'wp_statistics_geoip_hook', 'WP_Statistics_Schedule::geoip_event' );
125
- add_action( 'wp_statistics_browscap_hook', 'WP_Statistics_Schedule::browscap_event' );
126
- add_action( 'wp_statistics_referrerspam_hook', 'WP_Statistics_Schedule::referrerspam_event' );
127
  add_action( 'wp_statistics_dbmaint_hook', 'WP_Statistics_Schedule::dbmaint_event' );
128
  add_action( 'wp_statistics_dbmaint_visitor_hook', 'WP_Statistics_Schedule::dbmaint_visitor_event' );
129
  add_action( 'report_hook', 'WP_Statistics_Schedule::send_report' );
@@ -196,9 +182,16 @@ class WP_Statistics_Schedule {
196
 
197
  // We're also going to look to see if our filesize is to small, this means the plugin stub still exists and should
198
  // be replaced with a proper file.
199
- $dbsize = filesize( $upload_dir['basedir'] . '/wp-statistics/GeoLite2-Country.mmdb' );
 
 
 
 
 
 
 
200
 
201
- if ( $lastupdate < $thisupdate || $dbsize < 1024 ) {
202
 
203
  // We can't fire the download function directly here as we rely on some functions that haven't been loaded yet
204
  // in WordPress, so instead just set the flag in the options table and the shutdown hook will take care of the
@@ -207,28 +200,6 @@ class WP_Statistics_Schedule {
207
  }
208
  }
209
 
210
- /**
211
- * Updates the browscap database.
212
- */
213
- static function browscap_event() {
214
-
215
- GLOBAL $WP_Statistics;
216
-
217
- // Check for a new browscap once a week
218
- $WP_Statistics->update_option( 'update_browscap', true );
219
- }
220
-
221
- /**
222
- * Updates the browscap database.
223
- */
224
- static function referrerspam_event() {
225
-
226
- GLOBAL $WP_Statistics;
227
-
228
- // Check for a new referrerspam once a week
229
- $WP_Statistics->update_option( 'update_referrerspam', true );
230
- }
231
-
232
  /**
233
  * Purges old records on a schedule based on age.
234
  */
45
  wp_unschedule_event( wp_next_scheduled( 'wp_statistics_geoip_hook' ), 'wp_statistics_geoip_hook' );
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  // Add the referrerspam update schedule if it doesn't exist and it should be.
49
  if ( ! wp_next_scheduled( 'wp_statistics_referrerspam_hook' ) &&
50
  $WP_Statistics->get_option( 'schedule_referrerspam' )
110
  //after construct
111
  add_action( 'wp_statistics_add_visit_hook', 'WP_Statistics_Schedule::add_visit_event' );
112
  add_action( 'wp_statistics_geoip_hook', 'WP_Statistics_Schedule::geoip_event' );
 
 
113
  add_action( 'wp_statistics_dbmaint_hook', 'WP_Statistics_Schedule::dbmaint_event' );
114
  add_action( 'wp_statistics_dbmaint_visitor_hook', 'WP_Statistics_Schedule::dbmaint_visitor_event' );
115
  add_action( 'report_hook', 'WP_Statistics_Schedule::send_report' );
182
 
183
  // We're also going to look to see if our filesize is to small, this means the plugin stub still exists and should
184
  // be replaced with a proper file.
185
+ $is_require_update = false;
186
+ foreach (WP_Statistics_Updates::$geoip as $geoip_name => $geoip_array) {
187
+ $dbsize = filesize( $upload_dir['basedir'] . '/wp-statistics/'.WP_Statistics_Updates::$geoip[$geoip_name]['file'].'.mmdb' );
188
+ if ( $lastupdate < $thisupdate || $dbsize < 1024 ) {
189
+ $is_require_update = true;
190
+ }
191
+ }
192
+
193
 
194
+ if ( $is_require_update ===true ) {
195
 
196
  // We can't fire the download function directly here as we rely on some functions that haven't been loaded yet
197
  // in WordPress, so instead just set the flag in the options table and the shutdown hook will take care of the
200
  }
201
  }
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  /**
204
  * Purges old records on a schedule based on age.
205
  */
includes/classes/class-wp-statistics-shortcode.php CHANGED
@@ -63,6 +63,10 @@ class WP_Statistics_Shortcode {
63
  $result = wp_statistics_searchengine( $atts['provider'], $atts['time'] );
64
  break;
65
 
 
 
 
 
66
  case 'postcount':
67
  $result = wp_statistics_countposts();
68
  break;
@@ -168,6 +172,7 @@ class WP_Statistics_Shortcode {
168
  'commentaverage' => __( 'Comment Average', 'wp-statistics' ),
169
  'useraverage' => __( 'User Average', 'wp-statistics' ),
170
  'lpd' => __( 'Last Post Date', 'wp-statistics' ),
 
171
  ),
172
  ),
173
  array(
63
  $result = wp_statistics_searchengine( $atts['provider'], $atts['time'] );
64
  break;
65
 
66
+ case 'referrer':
67
+ $result = wp_statistics_referrer( $atts['time'] );
68
+ break;
69
+
70
  case 'postcount':
71
  $result = wp_statistics_countposts();
72
  break;
172
  'commentaverage' => __( 'Comment Average', 'wp-statistics' ),
173
  'useraverage' => __( 'User Average', 'wp-statistics' ),
174
  'lpd' => __( 'Last Post Date', 'wp-statistics' ),
175
+ 'referrer' => __( 'Referrer', 'wp-statistics' ),
176
  ),
177
  ),
178
  array(
includes/classes/class-wp-statistics-tinymce.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class WP_Statistics_TinyMCE
5
+ */
6
+ class WP_Statistics_TinyMCE {
7
+
8
+ /**
9
+ * Setup an TinyMCE action to close the notice on the overview page.
10
+ */
11
+ static function init() {
12
+
13
+ //Add Filter TinyMce Editor
14
+ add_action('admin_head', array(self::class, 'wp_statistic_add_my_tc_button'));
15
+
16
+ //Load Text Widget Button
17
+ add_action( 'admin_enqueue_scripts', array(self::class, 'load_tinymcejs_widget_wp_admin_style') );
18
+
19
+ //Add TextLang
20
+ add_action( 'admin_footer-widgets.php', array(self::class, 'my_post_edit_page_footer'), 999 );
21
+
22
+ }
23
+
24
+ /*
25
+ * Language List Text Domain
26
+ */
27
+ static public function lang()
28
+ {
29
+ if ( ! class_exists( '_WP_Editors' ) )
30
+ require( ABSPATH . WPINC . '/class-wp-editor.php' );
31
+
32
+ $strings = array(
33
+ 'insert' => __('WP Statistics Shortcodes', 'wp-statistics'),
34
+ 'stat' => __('Stat', 'wp-statistics'),
35
+ 'usersonline' => __('Online Users', 'wp-statistics'),
36
+ 'visits' => __('Visits', 'wp-statistics'),
37
+ 'visitors' => __('Visitors', 'wp-statistics'),
38
+ 'pagevisits' => __('Page Visits', 'wp-statistics'),
39
+ 'searches' => __('Searches', 'wp-statistics'),
40
+ 'postcount' => __('Post Count', 'wp-statistics'),
41
+ 'pagecount' => __('Page Count', 'wp-statistics'),
42
+ 'commentcount' => __('Comment Count', 'wp-statistics'),
43
+ 'spamcount' => __('Spam Count', 'wp-statistics'),
44
+ 'usercount' => __('User Count', 'wp-statistics'),
45
+ 'postaverage' => __('Post Average', 'wp-statistics'),
46
+ 'commentaverage' => __('Comment Average', 'wp-statistics'),
47
+ 'useraverage' => __('User Average', 'wp-statistics'),
48
+ 'lpd' => __('Last Post Date', 'wp-statistics'),
49
+ 'referrer' => __('Referrer', 'wp-statistics'),
50
+ 'help_stat' => __('The statistics you want, see the next table for available options.', 'wp-statistics'),
51
+ 'time' => __('Time', 'wp-statistics'),
52
+ 'se' => __('Select item ...', 'wp-statistics'),
53
+ 'today' => __('Today', 'wp-statistics'),
54
+ 'yesterday' => __('Yesterday', 'wp-statistics'),
55
+ 'week' => __('Week', 'wp-statistics'),
56
+ 'month' => __('Month', 'wp-statistics'),
57
+ 'year' => __('Year', 'wp-statistics'),
58
+ 'total' => __('Total', 'wp-statistics'),
59
+ 'help_time' => __('Is the time frame (time periods) for the statistic', 'wp-statistics'),
60
+ 'provider' => __('Provider', 'wp-statistics'),
61
+ 'help_provider' => __( 'The search provider to get statistics on.', 'wp-statistics' ),
62
+ 'format' => __('Format', 'wp-statistics'),
63
+ 'help_format' => __('The format to display numbers in: i18n, english, none.', 'wp-statistics'),
64
+ 'id' => __('ID', 'wp-statistics'),
65
+ 'help_id' => __('The post/page ID to get page statistics on.', 'wp-statistics'),
66
+ );
67
+
68
+ $locale = _WP_Editors::$mce_locale;
69
+ $translated = 'tinyMCE.addI18n("' . $locale . '.wp_statistic_tinymce_plugin", ' . json_encode( $strings ) . ");\n";
70
+
71
+ return array('locale' => $locale, 'translate' => $translated);
72
+ }
73
+
74
+ /*
75
+ * Add Filter TinyMCE
76
+ */
77
+ static public function wp_statistic_add_my_tc_button()
78
+ {
79
+ global $typenow;
80
+
81
+ // check user permissions
82
+ if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') ) {
83
+ return;
84
+ }
85
+
86
+ // verify the post type
87
+ if( ! in_array( $typenow, array( 'post', 'page' ) ) )
88
+ return;
89
+
90
+ // check if WYSIWYG is enabled
91
+ if ( get_user_option('rich_editing') == 'true') {
92
+ add_filter("mce_external_plugins", array(self::class, "wp_statistic_add_tinymce_plugin"));
93
+ add_filter('mce_buttons', array(self::class, 'wp_statistic_register_my_tc_button'));
94
+ add_filter('mce_external_languages', array(self::class, 'wp_statistic_tinymce_plugin_add_locale'));
95
+ }
96
+ }
97
+
98
+ /*
99
+ * Add Js Bottun to Editor
100
+ */
101
+ static function wp_statistic_add_tinymce_plugin($plugin_array) {
102
+ $plugin_array['wp_statistic_tc_button'] = WP_Statistics::$reg['plugin-url'].'assets/js/tinymce.js';
103
+ return $plugin_array;
104
+ }
105
+
106
+ /*
107
+ * Push Button to TinyMCE Advance
108
+ */
109
+ static function wp_statistic_register_my_tc_button($buttons) {
110
+ array_push($buttons, "wp_statistic_tc_button");
111
+ return $buttons;
112
+ }
113
+
114
+ /*
115
+ * Add Lang Text Domain
116
+ */
117
+ static function wp_statistic_tinymce_plugin_add_locale($locales) {
118
+ $locales ['wp-statistic-tinymce-plugin'] = WP_Statistics::$reg['plugin-dir'].'includes/functions/tinymce.php';
119
+ return $locales;
120
+ }
121
+
122
+ /*
123
+ * Add Button For Text Widget
124
+ */
125
+ static function load_tinymcejs_widget_wp_admin_style(){
126
+ global $pagenow;
127
+ if($pagenow =="widgets.php") {
128
+ wp_enqueue_script( 'add_wp_statistic_button_for_widget_text', WP_Statistics::$reg['plugin-url'].'assets/js/tinymce.js' );
129
+ }
130
+ }
131
+
132
+ /*
133
+ * Add Lang for Text Widget
134
+ */
135
+ static function my_post_edit_page_footer(){
136
+ echo '
137
+ <script type="text/javascript">
138
+ jQuery( document ).on( \'tinymce-editor-setup\', function( event, editor ) {
139
+ editor.settings.toolbar1 += \',wp_statistic_tc_button\';
140
+ });
141
+ ';
142
+ echo self::lang()['translate'];
143
+ echo '
144
+ tinyMCEPreInit.load_ext("'.rtrim( WP_Statistics::$reg['plugin-url'], "/").'", "'.self::lang()['locale'].'");
145
+ </script>
146
+ ';
147
+ }
148
+ }
includes/classes/class-wp-statistics-updates.php CHANGED
@@ -1,15 +1,29 @@
1
  <?php
2
 
3
- use BrowscapPHP\Browscap;
4
- use BrowscapPHP\BrowscapUpdater;
5
- use BrowscapPHP\Helper\IniLoader;
6
- use WurflCache\Adapter\File;
7
  use GeoIp2\Database\Reader;
8
 
9
  /**
10
  * Class WP_Statistics_Updates
11
  */
12
  class WP_Statistics_Updates {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  /**
14
  * Update option process.
15
  */
@@ -25,11 +39,17 @@ class WP_Statistics_Updates {
25
  /**
26
  * This function downloads the GeoIP database from MaxMind.
27
  *
 
 
 
28
  * @return string
29
  */
30
- static function download_geoip() {
31
  GLOBAL $WP_Statistics;
32
 
 
 
 
33
  // We need the download_url() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
34
  if ( ! function_exists( 'download_url' ) ) {
35
  include( ABSPATH . 'wp-admin/includes/file.php' );
@@ -43,62 +63,63 @@ class WP_Statistics_Updates {
43
  // We need the gzopen() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
44
  // Also stop trying to update the database as it just won't work :)
45
  if ( false === function_exists( 'gzopen' ) ) {
46
- $WP_Statistics->update_option( 'update_geoip', false );
47
 
48
- $result = "<div class='updated settings-error'><p><strong>" .
49
- __( 'Error the gzopen() function do not exist!', 'wp-statistics' ) .
50
- "</strong></p></div>";
51
 
52
  return $result;
53
  }
54
 
55
  // If GeoIP is disabled, bail out.
56
- if ( $WP_Statistics->get_option( 'geoip' ) == false ) {
57
  return '';
58
  }
59
 
60
  // This is the location of the file to download.
61
- $download_url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz';
62
  $response = wp_remote_get( $download_url );
63
 
64
  // Change download url if the maxmind.com doesn't response.
65
  if ( wp_remote_retrieve_response_code( $response ) != '200' ) {
66
- $download_url = 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-Country/master/GeoLite2-Country.mmdb.gz';
67
  }
68
 
69
  // Get the upload directory from WordPress.
70
  $upload_dir = wp_upload_dir();
71
 
72
  // Create a variable with the name of the database file to download.
73
- $DBFile = $upload_dir['basedir'] . '/wp-statistics/GeoLite2-Country.mmdb';
74
 
75
  // Check to see if the subdirectory we're going to upload to exists, if not create it.
76
  if ( ! file_exists( $upload_dir['basedir'] . '/wp-statistics' ) ) {
77
  if ( ! @mkdir( $upload_dir['basedir'] . '/wp-statistics', 0755 ) ) {
78
- $WP_Statistics->update_option( 'update_geoip', false );
79
 
80
- $result = "<div class='updated settings-error'><p><strong>" . sprintf(
81
  __(
82
  'Error creating GeoIP database directory, make sure your web server has permissions to create directories in: %s',
83
  'wp-statistics'
84
  ),
85
  $upload_dir['basedir']
86
- ) . "</strong></p></div>";
 
87
 
88
  return $result;
89
  }
90
  }
91
 
92
  if ( ! is_writable( $upload_dir['basedir'] . '/wp-statistics' ) ) {
93
- $WP_Statistics->update_option( 'update_geoip', false );
94
 
95
- $result = "<div class='updated settings-error'><p><strong>" . sprintf(
96
  __(
97
  'Error setting permissions of the GeoIP database directory, make sure your web server has permissions to write to directories in : %s',
98
  'wp-statistics'
99
  ),
100
  $upload_dir['basedir']
101
- ) . "</strong></p></div>";
 
102
 
103
  return $result;
104
  }
@@ -108,71 +129,81 @@ class WP_Statistics_Updates {
108
 
109
  // If we failed, through a message, otherwise proceed.
110
  if ( is_wp_error( $TempFile ) ) {
111
- $WP_Statistics->update_option( 'update_geoip', false );
112
 
113
- $result = "<div class='updated settings-error'><p><strong>" . sprintf(
114
  __( 'Error downloading GeoIP database from: %s - %s', 'wp-statistics' ),
115
  $download_url,
116
  $TempFile->get_error_message()
117
- ) . "</strong></p></div>";
 
118
  } else {
119
- // Open the downloaded file to unzip it.
120
- $ZipHandle = gzopen( $TempFile, 'rb' );
121
-
122
- // Create th new file to unzip to.
123
- $DBfh = fopen( $DBFile, 'wb' );
124
-
125
- // If we failed to open the downloaded file, through an error and remove the temporary file. Otherwise do the actual unzip.
126
- if ( ! $ZipHandle ) {
127
- $WP_Statistics->update_option( 'update_geoip', false );
128
-
129
- $result = "<div class='updated settings-error'><p><strong>" . sprintf(
130
- __( 'Error could not open downloaded GeoIP database for reading: %s', 'wp-statistics' ),
131
- $TempFile
132
- ) . "</strong></p></div>";
133
-
134
- unlink( $TempFile );
135
- } else {
136
- // If we failed to open the new file, throw and error and remove the temporary file. Otherwise actually do the unzip.
137
- if ( ! $DBfh ) {
138
- $WP_Statistics->update_option( 'update_geoip', false );
139
-
140
- $result = "<div class='updated settings-error'><p><strong>" . sprintf(
141
- __( 'Error could not open destination GeoIP database for writing %s', 'wp-statistics' ),
142
- $DBFile
143
- ) . "</strong></p></div>";
144
- unlink( $TempFile );
145
- } else {
146
- while ( ( $data = gzread( $ZipHandle, 4096 ) ) != false ) {
147
- fwrite( $DBfh, $data );
148
- }
149
-
150
- // Close the files.
151
- gzclose( $ZipHandle );
152
- fclose( $DBfh );
153
-
154
- // Delete the temporary file.
155
- unlink( $TempFile );
156
-
157
- // Display the success message.
158
- $result = "<div class='updated settings-error'><p><strong>" .
159
- __( 'GeoIP Database updated successfully!', 'wp-statistics' ) .
160
- "</strong></p></div>";
161
-
162
- // Update the options to reflect the new download.
163
- $WP_Statistics->update_option( 'last_geoip_dl', time() );
164
- $WP_Statistics->update_option( 'update_geoip', false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
 
166
- // Populate any missing GeoIP information if the user has selected the option.
167
- if ( $WP_Statistics->get_option( 'geoip' ) &&
168
- wp_statistics_geoip_supported() &&
169
- $WP_Statistics->get_option( 'auto_pop' )
170
- ) {
171
- $result .= WP_Statistics_Updates::populate_geoip_info();
172
- }
173
- }
174
- }
175
- }
176
 
177
  if ( $WP_Statistics->get_option( 'geoip_report' ) == true ) {
178
  $blogname = get_bloginfo( 'name' );
@@ -189,85 +220,11 @@ class WP_Statistics_Updates {
189
  wp_mail(
190
  $WP_Statistics->get_option( 'email_list' ),
191
  __( 'GeoIP update on', 'wp-statistics' ) . ' ' . $blogname,
192
- $result,
193
- $headers
194
- );
195
- }
196
-
197
- // All of the messages displayed above are stored in a string, now it's time to actually output the messages.
198
- return $result;
199
- }
200
-
201
- /**
202
- * This function downloads the browscap database from browscap.org.
203
- *
204
- * @return string
205
- */
206
- static function download_browscap() {
207
- global $WP_Statistics;
208
-
209
- // Changing PHP memory limits
210
- ini_set('memory_limit', '256M');
211
-
212
- // We need the download_url() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
213
- if ( ! function_exists( 'download_url' ) ) {
214
- include( ABSPATH . 'wp-admin/includes/file.php' );
215
- }
216
-
217
- // If browscap is disabled, bail out.
218
- if ( $WP_Statistics->get_option( 'browscap' ) == false ) {
219
- return '';
220
- }
221
-
222
- // Get the upload directory from WordPress.
223
- $upload_dir = wp_upload_dir();
224
-
225
- // Check to see if the subdirectory we're going to upload to exists, if not create it.
226
- if ( ! file_exists( $upload_dir['basedir'] . '/wp-statistics' ) ) {
227
- mkdir( $upload_dir['basedir'] . '/wp-statistics' );
228
- }
229
-
230
- // First if all update the option to reflect the new download.
231
- $WP_Statistics->update_option( 'update_browscap', false );
232
-
233
- $adapter = new File( array( File::DIR => $upload_dir['basedir'] . '/wp-statistics' ) );
234
-
235
- try {
236
- $browscap_updater = new BrowscapUpdater();
237
- $browscap_updater->setCache( $adapter );
238
- $browscap_updater->update( IniLoader::PHP_INI );
239
-
240
- // Update browscap last download time
241
- $WP_Statistics->update_option( 'last_browscap_dl', time() );
242
-
243
- $message = __( 'Browscap database updated successfully!', 'wp-statistics' );
244
- } catch ( Exception $e ) {
245
- $message = sprintf( __( 'Browscap database updated failed! %s', 'wp-statistics' ), $e->getMessage() );
246
- }
247
-
248
- if ( $WP_Statistics->get_option( 'browscap_report' ) == true ) {
249
- $blogname = get_bloginfo( 'name' );
250
- $blogemail = get_bloginfo( 'admin_email' );
251
-
252
- $headers[] = "From: $blogname <$blogemail>";
253
- $headers[] = "MIME-Version: 1.0";
254
- $headers[] = "Content-type: text/html; charset=utf-8";
255
-
256
- if ( $WP_Statistics->get_option( 'email_list' ) == '' ) {
257
- $WP_Statistics->update_option( 'email_list', $blogemail );
258
- }
259
-
260
- wp_mail(
261
- $WP_Statistics->get_option( 'email_list' ),
262
- __( 'Browscap.ini update on', 'wp-statistics' ) . ' ' . $blogname,
263
- $message,
264
  $headers
265
  );
266
  }
267
 
268
- // Generate admin notice message
269
- $result = "<div class='updated settings-error'><p><strong>" . $message . "</strong></p></div>";
270
-
271
  // All of the messages displayed above are stored in a string, now it's time to actually output the messages.
272
  return $result;
273
  }
@@ -324,10 +281,8 @@ class WP_Statistics_Updates {
324
  $upload_dir = wp_upload_dir();
325
  $reader = new Reader( $upload_dir['basedir'] . '/wp-statistics/GeoLite2-Country.mmdb' );
326
  } catch ( Exception $e ) {
327
- return "<div class='updated settings-error'><p><strong>" . __(
328
- 'Unable to load the GeoIP database, make sure you have downloaded it in the settings page.',
329
- 'wp-statistics'
330
- ) . "</strong></p></div>";
331
  }
332
 
333
  $count = 0;
1
  <?php
2
 
 
 
 
 
3
  use GeoIp2\Database\Reader;
4
 
5
  /**
6
  * Class WP_Statistics_Updates
7
  */
8
  class WP_Statistics_Updates {
9
+
10
+ //List Geo ip Library
11
+ public static $geoip = array (
12
+ 'country' => array(
13
+ 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz',
14
+ 'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-Country/master/GeoLite2-Country.mmdb.gz',
15
+ 'file' => 'GeoLite2-Country',
16
+ 'opt' => 'geoip'
17
+ ),
18
+ 'city' => array(
19
+ 'cdn' => 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz',
20
+ 'github' => 'https://raw.githubusercontent.com/wp-statistics/GeoLite2-City/master/GeoLite2-City.mmdb.gz',
21
+ 'file' => 'GeoLite2-City',
22
+ 'opt' => 'geoip_city'
23
+ )
24
+ );
25
+
26
+
27
  /**
28
  * Update option process.
29
  */
39
  /**
40
  * This function downloads the GeoIP database from MaxMind.
41
  *
42
+ * @param $pack
43
+ * @param string $type
44
+ *
45
  * @return string
46
  */
47
+ static function download_geoip($pack, $type = "enable") {
48
  GLOBAL $WP_Statistics;
49
 
50
+ //Create Empty Return Function
51
+ $result["status"] = false;
52
+
53
  // We need the download_url() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
54
  if ( ! function_exists( 'download_url' ) ) {
55
  include( ABSPATH . 'wp-admin/includes/file.php' );
63
  // We need the gzopen() function, it should exists on virtually all installs of PHP, but if it doesn't for some reason, bail out.
64
  // Also stop trying to update the database as it just won't work :)
65
  if ( false === function_exists( 'gzopen' ) ) {
66
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
67
 
68
+ $result["notice"] = __( 'Error the gzopen() function do not exist!', 'wp-statistics' );
69
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
 
70
 
71
  return $result;
72
  }
73
 
74
  // If GeoIP is disabled, bail out.
75
+ if($type =="update" and $WP_Statistics->get_option( WP_Statistics_Updates::$geoip[$pack]['opt'] ) == '') {
76
  return '';
77
  }
78
 
79
  // This is the location of the file to download.
80
+ $download_url = WP_Statistics_Updates::$geoip[$pack]['cdn'];
81
  $response = wp_remote_get( $download_url );
82
 
83
  // Change download url if the maxmind.com doesn't response.
84
  if ( wp_remote_retrieve_response_code( $response ) != '200' ) {
85
+ $download_url = WP_Statistics_Updates::$geoip[$pack]['github'];
86
  }
87
 
88
  // Get the upload directory from WordPress.
89
  $upload_dir = wp_upload_dir();
90
 
91
  // Create a variable with the name of the database file to download.
92
+ $DBFile = $upload_dir['basedir'] . '/wp-statistics/'. WP_Statistics_Updates::$geoip[$pack]['file'].'.mmdb';
93
 
94
  // Check to see if the subdirectory we're going to upload to exists, if not create it.
95
  if ( ! file_exists( $upload_dir['basedir'] . '/wp-statistics' ) ) {
96
  if ( ! @mkdir( $upload_dir['basedir'] . '/wp-statistics', 0755 ) ) {
97
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
98
 
99
+ $result["notice"] = sprintf(
100
  __(
101
  'Error creating GeoIP database directory, make sure your web server has permissions to create directories in: %s',
102
  'wp-statistics'
103
  ),
104
  $upload_dir['basedir']
105
+ );
106
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
107
 
108
  return $result;
109
  }
110
  }
111
 
112
  if ( ! is_writable( $upload_dir['basedir'] . '/wp-statistics' ) ) {
113
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
114
 
115
+ $result["notice"] = sprintf(
116
  __(
117
  'Error setting permissions of the GeoIP database directory, make sure your web server has permissions to write to directories in : %s',
118
  'wp-statistics'
119
  ),
120
  $upload_dir['basedir']
121
+ );
122
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
123
 
124
  return $result;
125
  }
129
 
130
  // If we failed, through a message, otherwise proceed.
131
  if ( is_wp_error( $TempFile ) ) {
132
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
133
 
134
+ $result["notice"] = sprintf(
135
  __( 'Error downloading GeoIP database from: %s - %s', 'wp-statistics' ),
136
  $download_url,
137
  $TempFile->get_error_message()
138
+ );
139
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
140
  } else {
141
+ // Open the downloaded file to unzip it.
142
+ $ZipHandle = gzopen($TempFile, 'rb');
143
+
144
+ // Create th new file to unzip to.
145
+ $DBfh = fopen($DBFile, 'wb');
146
+
147
+ // If we failed to open the downloaded file, through an error and remove the temporary file. Otherwise do the actual unzip.
148
+ if (!$ZipHandle) {
149
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
150
+
151
+ $result["notice"] = sprintf(
152
+ __('Error could not open downloaded GeoIP database for reading: %s', 'wp-statistics'),
153
+ $TempFile
154
+ ) ;
155
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
156
+
157
+ unlink($TempFile);
158
+ } else {
159
+ // If we failed to open the new file, throw and error and remove the temporary file. Otherwise actually do the unzip.
160
+ if (!$DBfh) {
161
+ if($type =="enable") $WP_Statistics->update_option( WP_Statistics_Updates::$geoip[$pack]['opt'] , '' );
162
+
163
+ $result["notice"] = sprintf(
164
+ __('Error could not open destination GeoIP database for writing %s', 'wp-statistics'),
165
+ $DBFile
166
+ );
167
+ WP_Statistics_Admin_Pages::set_admin_notice( $result["notice"], $type = 'error' );
168
+
169
+ unlink($TempFile);
170
+ } else {
171
+ while (($data = gzread($ZipHandle, 4096)) != false) {
172
+ fwrite($DBfh, $data);
173
+ }
174
+
175
+ // Close the files.
176
+ gzclose($ZipHandle);
177
+ fclose($DBfh);
178
+
179
+ // Delete the temporary file.
180
+ unlink($TempFile);
181
+
182
+ // Display the success message.
183
+ $result["status"] = true;
184
+ $result["notice"] = "<div class='updated settings-error'><p><strong>" .
185
+ __( 'GeoIP Database updated successfully!', 'wp-statistics' ) .
186
+ "</strong></p></div>";
187
+
188
+ // Update the options to reflect the new download.
189
+ if($type =="update") {
190
+ $WP_Statistics->update_option('last_geoip_dl', time());
191
+ $WP_Statistics->update_option('update_geoip', false);
192
+ }
193
+
194
+ // Populate any missing GeoIP information if the user has selected the option.
195
+ if($pack =="country") {
196
+ if ($WP_Statistics->get_option('geoip') &&
197
+ wp_statistics_geoip_supported() &&
198
+ $WP_Statistics->get_option('auto_pop')
199
+ ) {
200
+ WP_Statistics_Updates::populate_geoip_info();
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
 
 
 
 
 
 
 
 
 
 
 
207
 
208
  if ( $WP_Statistics->get_option( 'geoip_report' ) == true ) {
209
  $blogname = get_bloginfo( 'name' );
220
  wp_mail(
221
  $WP_Statistics->get_option( 'email_list' ),
222
  __( 'GeoIP update on', 'wp-statistics' ) . ' ' . $blogname,
223
+ $result['notice'],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  $headers
225
  );
226
  }
227
 
 
 
 
228
  // All of the messages displayed above are stored in a string, now it's time to actually output the messages.
229
  return $result;
230
  }
281
  $upload_dir = wp_upload_dir();
282
  $reader = new Reader( $upload_dir['basedir'] . '/wp-statistics/GeoLite2-Country.mmdb' );
283
  } catch ( Exception $e ) {
284
+ $text_error = __( 'Unable to load the GeoIP database, make sure you have downloaded it in the settings page.', 'wp-statistics' );
285
+ WP_Statistics_Admin_Pages::set_admin_notice( $text_error, $type = 'error' );
 
 
286
  }
287
 
288
  $count = 0;
includes/classes/class-wp-statistics-welcome.php CHANGED
@@ -39,10 +39,10 @@ class WP_Statistics_Welcome {
39
  'wp-statistics-admin-js',
40
  WP_Statistics::$reg['plugin-url'] . 'assets/js/admin.js',
41
  array( 'jquery' ),
42
- WP_Statistics::$reg['version']
43
  );
44
 
45
- include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/welcomes/last-version.php" );
46
  }
47
 
48
  /**
@@ -52,7 +52,7 @@ class WP_Statistics_Welcome {
52
  public static function do_welcome( $upgrader_object, $options ) {
53
  $current_plugin_path_name = 'wp-statistics/wp-statistics.php';
54
 
55
- if ( $options['action'] == 'update' and $options['type'] == 'plugin' and isset($options['plugins']) ) {
56
  foreach ( $options['plugins'] as $each_plugin ) {
57
  if ( $each_plugin == $current_plugin_path_name ) {
58
  global $WP_Statistics;
39
  'wp-statistics-admin-js',
40
  WP_Statistics::$reg['plugin-url'] . 'assets/js/admin.js',
41
  array( 'jquery' ),
42
+ WP_Statistics::$reg['version']
43
  );
44
 
45
+ include( WP_Statistics::$reg['plugin-dir'] . "includes/templates/welcome.php" );
46
  }
47
 
48
  /**
52
  public static function do_welcome( $upgrader_object, $options ) {
53
  $current_plugin_path_name = 'wp-statistics/wp-statistics.php';
54
 
55
+ if ( isset( $options['action'] ) and $options['action'] == 'update' and isset( $options['type'] ) and $options['type'] == 'plugin' and isset( $options['plugins'] ) ) {
56
  foreach ( $options['plugins'] as $each_plugin ) {
57
  if ( $each_plugin == $current_plugin_path_name ) {
58
  global $WP_Statistics;
includes/classes/class-wp-statistics-widget.php CHANGED
@@ -150,21 +150,21 @@ class WP_Statistics_Widget extends WP_Widget {
150
 
151
  if ( $widget_options['ap_widget'] ) {
152
  echo '<li>';
153
- echo '<label>' . __( 'Average Posts', 'wp-statistics' ) . ': </label>';
154
  echo number_format_i18n( wp_statistics_average_post() );
155
  echo '</li>';
156
  }
157
 
158
  if ( $widget_options['ac_widget'] ) {
159
  echo '<li>';
160
- echo '<label>' . __( 'Average Comments', 'wp-statistics' ) . ': </label>';
161
  echo number_format_i18n( wp_statistics_average_comment() );
162
  echo '</li>';
163
  }
164
 
165
  if ( $widget_options['au_widget'] ) {
166
  echo '<li>';
167
- echo '<label>' . __( 'Average Users', 'wp-statistics' ) . ': </label>';
168
  echo number_format_i18n( wp_statistics_average_registeruser() );
169
  echo '</li>';
170
  }
@@ -403,21 +403,21 @@ class WP_Statistics_Widget extends WP_Widget {
403
  'on',
404
  $widget_options['ap_widget']
405
  ); ?>/>
406
- <label for="<?php echo esc_attr( $this->get_field_id( 'ap_widget' ) ); ?>"><?php _e( 'Average Posts', 'wp-statistics' ); ?></label>
407
  </li>
408
  <li>
409
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'ac_widget' ) ); ?>" name="ac_widget" <?php checked(
410
  'on',
411
  $widget_options['ac_widget']
412
  ); ?>/>
413
- <label for="<?php echo esc_attr( $this->get_field_id( 'ac_widget' ) ); ?>"><?php _e( 'Average Comments', 'wp-statistics' ); ?></label>
414
  </li>
415
  <li>
416
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'au_widget' ) ); ?>" name="au_widget" <?php checked(
417
  'on',
418
  $widget_options['au_widget']
419
  ); ?>/>
420
- <label for="<?php echo esc_attr( $this->get_field_id( 'au_widget' ) ); ?>"><?php _e( 'Average Users', 'wp-statistics' ); ?></label>
421
  </li>
422
  <li>
423
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'lpd_widget' ) ); ?>" class="lpd_widget" name="lpd_widget" <?php checked(
150
 
151
  if ( $widget_options['ap_widget'] ) {
152
  echo '<li>';
153
+ echo '<label>' . __( 'Post Average', 'wp-statistics' ) . ': </label>';
154
  echo number_format_i18n( wp_statistics_average_post() );
155
  echo '</li>';
156
  }
157
 
158
  if ( $widget_options['ac_widget'] ) {
159
  echo '<li>';
160
+ echo '<label>' . __( 'Comment Average', 'wp-statistics' ) . ': </label>';
161
  echo number_format_i18n( wp_statistics_average_comment() );
162
  echo '</li>';
163
  }
164
 
165
  if ( $widget_options['au_widget'] ) {
166
  echo '<li>';
167
+ echo '<label>' . __( 'User Average', 'wp-statistics' ) . ': </label>';
168
  echo number_format_i18n( wp_statistics_average_registeruser() );
169
  echo '</li>';
170
  }
403
  'on',
404
  $widget_options['ap_widget']
405
  ); ?>/>
406
+ <label for="<?php echo esc_attr( $this->get_field_id( 'ap_widget' ) ); ?>"><?php _e( 'Post Average', 'wp-statistics' ); ?></label>
407
  </li>
408
  <li>
409
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'ac_widget' ) ); ?>" name="ac_widget" <?php checked(
410
  'on',
411
  $widget_options['ac_widget']
412
  ); ?>/>
413
+ <label for="<?php echo esc_attr( $this->get_field_id( 'ac_widget' ) ); ?>"><?php _e( 'Comment Average', 'wp-statistics' ); ?></label>
414
  </li>
415
  <li>
416
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'au_widget' ) ); ?>" name="au_widget" <?php checked(
417
  'on',
418
  $widget_options['au_widget']
419
  ); ?>/>
420
+ <label for="<?php echo esc_attr( $this->get_field_id( 'au_widget' ) ); ?>"><?php _e( 'User Average', 'wp-statistics' ); ?></label>
421
  </li>
422
  <li>
423
  <input type="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'lpd_widget' ) ); ?>" class="lpd_widget" name="lpd_widget" <?php checked(
includes/classes/class-wp-statistics.php CHANGED
@@ -120,13 +120,24 @@ class WP_Statistics {
120
  * @var array
121
  */
122
  public static $page = array();
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  /**
125
  * __construct
126
  * WP_Statistics constructor.
127
  */
128
  public function __construct() {
129
-
130
  if ( ! isset( WP_Statistics::$reg['plugin-url'] ) ) {
131
  /**
132
  * Plugin URL
@@ -174,8 +185,27 @@ class WP_Statistics {
174
  return;
175
  }
176
 
 
 
 
 
 
 
 
177
  $this->set_timezone();
 
 
178
  $this->load_options();
 
 
 
 
 
 
 
 
 
 
179
  $this->get_IP();
180
 
181
  // Check if the has IP is enabled.
@@ -183,14 +213,9 @@ class WP_Statistics {
183
  $this->ip_hash = $this->get_hash_string();
184
  }
185
 
 
186
  $this->set_pages();
187
 
188
- // Autoload composer
189
- require( WP_Statistics::$reg['plugin-dir'] . 'includes/vendor/autoload.php' );
190
-
191
- // define an autoload method to automatically load classes in /includes/classes
192
- spl_autoload_register( array( $this, 'autoload' ) );
193
-
194
  // Add init actions.
195
  // For the main init we're going to set our priority to 9 to execute before most plugins
196
  // so we can export data before and set the headers without
@@ -249,6 +274,13 @@ class WP_Statistics {
249
  load_plugin_textdomain( 'wp-statistics', false, WP_Statistics::$reg['plugin-dir'] . 'languages' );
250
  }
251
 
 
 
 
 
 
 
 
252
  /**
253
  * Set Time Zone
254
  */
@@ -386,7 +418,12 @@ class WP_Statistics {
386
  /**
387
  * Generate hash string
388
  */
389
- private function get_hash_string() {
 
 
 
 
 
390
  return '#hash#' . sha1( $this->ip . $_SERVER['HTTP_USER_AGENT'] );
391
  }
392
 
@@ -408,6 +445,26 @@ class WP_Statistics {
408
  register_widget( 'WP_Statistics_Widget' );
409
  }
410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  /**
412
  * Loads the user options from WordPress.
413
  * It is NOT called during the class constructor.
@@ -695,7 +752,6 @@ class WP_Statistics {
695
  // If this is a first time install or an upgrade and we've added options, set some intelligent defaults.
696
  $options['anonymize_ips'] = false;
697
  $options['geoip'] = false;
698
- $options['browscap'] = false;
699
  $options['useronline'] = true;
700
  $options['visits'] = true;
701
  $options['visitors'] = true;
@@ -712,6 +768,8 @@ class WP_Statistics {
712
  $options['robotlist'] = $wps_robotslist;
713
  $options['exclude_administrator'] = true;
714
  $options['disable_se_clearch'] = true;
 
 
715
  $options['disable_se_ask'] = true;
716
  $options['map_type'] = 'jqvmap';
717
 
@@ -780,6 +838,13 @@ class WP_Statistics {
780
  */
781
  public function get_IP() {
782
 
 
 
 
 
 
 
 
783
  // Check to see if we've already retrieved the IP address and if so return the last result.
784
  if ( $this->ip !== false ) {
785
  return $this->ip;
@@ -830,8 +895,8 @@ class WP_Statistics {
830
 
831
  // If the anonymize IP enabled for GDPR.
832
  if ( $this->get_option( 'anonymize_ips' ) == true ) {
833
- $this->ip = substr($this->ip, 0, strrpos($this->ip, '.')).'.000';
834
- }
835
 
836
  return $this->ip;
837
  }
@@ -858,33 +923,21 @@ class WP_Statistics {
858
  */
859
  public function get_UserAgent() {
860
 
861
- // Parse the agent string.
862
- try {
863
- $agent = parse_user_agent();
864
- } catch ( Exception $e ) {
865
- $agent = array(
866
- 'browser' => _x( 'Unknown', 'Browser', 'wp-statistics' ),
867
- 'platform' => _x( 'Unknown', 'Platform', 'wp-statistics' ),
868
- 'version' => _x( 'Unknown', 'Version', 'wp-statistics' ),
869
  );
870
  }
871
 
872
- // null isn't a very good default, so set it to Unknown instead.
873
- if ( $agent['browser'] == null ) {
874
- $agent['browser'] = _x( 'Unknown', 'Browser', 'wp-statistics' );
875
- }
876
- if ( $agent['platform'] == null ) {
877
- $agent['platform'] = _x( 'Unknown', 'Platform', 'wp-statistics' );
878
- }
879
- if ( $agent['version'] == null ) {
880
- $agent['version'] = _x( 'Unknown', 'Version', 'wp-statistics' );
881
- }
882
-
883
- // Uncommon browsers often have some extra cruft, like brackets, http:// and other strings that we can strip out.
884
- $strip_strings = array( '"', "'", '(', ')', ';', ':', '/', '[', ']', '{', '}', 'http' );
885
- foreach ( $agent as $key => $value ) {
886
- $agent[ $key ] = str_replace( $strip_strings, '', $agent[ $key ] );
887
- }
888
 
889
  return $agent;
890
  }
@@ -897,6 +950,14 @@ class WP_Statistics {
897
  * @return array|bool|string|void
898
  */
899
  public function get_Referred( $default_referrer = false ) {
 
 
 
 
 
 
 
 
900
  if ( $this->referrer !== false ) {
901
  return $this->referrer;
902
  }
@@ -1361,15 +1422,8 @@ class WP_Statistics {
1361
  *
1362
  * @return string
1363
  */
1364
- public function get_referrer_link( $referrer, $length = - 1 ) {
1365
  $html_referrer = $this->html_sanitize_referrer( $referrer );
1366
- if ( $length > 0 && strlen( $referrer ) > $length ) {
1367
- $html_referrer_limited = $this->html_sanitize_referrer( $referrer, $length );
1368
- $eplises = '[...]';
1369
- } else {
1370
- $html_referrer_limited = $html_referrer;
1371
- $eplises = '';
1372
- }
1373
 
1374
  if ( substr( $html_referrer, 0, 7 ) !== 'http://' and substr( $html_referrer, 0, 8 ) !== 'https://' ) {
1375
  // relative address, use '//' to adapt both http and https
@@ -1378,7 +1432,27 @@ class WP_Statistics {
1378
  $html_nr_referrer = $html_referrer;
1379
  }
1380
 
1381
- return "<a href='{$html_nr_referrer}'><div class='dashicons dashicons-admin-links'></div>{$html_referrer_limited}{$eplises}</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1382
  }
1383
 
1384
  /**
120
  * @var array
121
  */
122
  public static $page = array();
123
+ /**
124
+ * Rest Api init
125
+ *
126
+ * @var array
127
+ */
128
+ public $restapi;
129
+ /**
130
+ * Check Plugin Cache is enabled
131
+ *
132
+ * @var bool|string
133
+ */
134
+ public $use_cache = false;
135
 
136
  /**
137
  * __construct
138
  * WP_Statistics constructor.
139
  */
140
  public function __construct() {
 
141
  if ( ! isset( WP_Statistics::$reg['plugin-url'] ) ) {
142
  /**
143
  * Plugin URL
185
  return;
186
  }
187
 
188
+ // Autoload composer
189
+ require( WP_Statistics::$reg['plugin-dir'] . 'includes/vendor/autoload.php' );
190
+
191
+ // Define an autoload method to automatically load classes in /includes/classes
192
+ spl_autoload_register( array( $this, 'autoload' ) );
193
+
194
+ //Set TimeZone
195
  $this->set_timezone();
196
+
197
+ //Set Options
198
  $this->load_options();
199
+
200
+ // Check the cache option is enabled.
201
+ if ( $this->get_option( 'use_cache_plugin' ) == true ) {
202
+ $this->use_cache = 1;
203
+ }
204
+
205
+ //Load Rest Api
206
+ $this->init_rest_api();
207
+
208
+ //Get user Ip
209
  $this->get_IP();
210
 
211
  // Check if the has IP is enabled.
213
  $this->ip_hash = $this->get_hash_string();
214
  }
215
 
216
+ //Set Pages
217
  $this->set_pages();
218
 
 
 
 
 
 
 
219
  // Add init actions.
220
  // For the main init we're going to set our priority to 9 to execute before most plugins
221
  // so we can export data before and set the headers without
274
  load_plugin_textdomain( 'wp-statistics', false, WP_Statistics::$reg['plugin-dir'] . 'languages' );
275
  }
276
 
277
+ /**
278
+ * Check the REST API
279
+ */
280
+ public function init_rest_api() {
281
+ $this->restapi = new WP_Statistics_Rest();
282
+ }
283
+
284
  /**
285
  * Set Time Zone
286
  */
418
  /**
419
  * Generate hash string
420
  */
421
+ public function get_hash_string() {
422
+ //Check If Rest Request
423
+ if ( $this->restapi->is_rest() ) {
424
+ return $this->restapi->params( 'hash_ip' );
425
+ }
426
+
427
  return '#hash#' . sha1( $this->ip . $_SERVER['HTTP_USER_AGENT'] );
428
  }
429
 
445
  register_widget( 'WP_Statistics_Widget' );
446
  }
447
 
448
+ /**
449
+ * geo ip Loader
450
+ * @throws \MaxMind\Db\Reader\InvalidDatabaseException
451
+ */
452
+ static function geoip_loader( $pack ) {
453
+
454
+ $geoip = wp_upload_dir()['basedir'] . '/wp-statistics/' . WP_Statistics_Updates::$geoip[ $pack ]['file'] . '.mmdb';
455
+ if ( file_exists( $geoip ) ) {
456
+ try {
457
+ $reader = new GeoIp2\Database\Reader( $geoip );
458
+ } catch ( \MaxMind\Db\Reader\InvalidDatabaseException $e ) {
459
+ return false;
460
+ }
461
+ } else {
462
+ return false;
463
+ }
464
+
465
+ return $reader;
466
+ }
467
+
468
  /**
469
  * Loads the user options from WordPress.
470
  * It is NOT called during the class constructor.
752
  // If this is a first time install or an upgrade and we've added options, set some intelligent defaults.
753
  $options['anonymize_ips'] = false;
754
  $options['geoip'] = false;
 
755
  $options['useronline'] = true;
756
  $options['visits'] = true;
757
  $options['visitors'] = true;
768
  $options['robotlist'] = $wps_robotslist;
769
  $options['exclude_administrator'] = true;
770
  $options['disable_se_clearch'] = true;
771
+ $options['disable_se_qwant'] = true;
772
+ $options['disable_se_baidu'] = true;
773
  $options['disable_se_ask'] = true;
774
  $options['map_type'] = 'jqvmap';
775
 
838
  */
839
  public function get_IP() {
840
 
841
+ //Check If Rest Request
842
+ if ( $this->restapi->is_rest() ) {
843
+ $this->ip = $this->restapi->params( 'ip' );
844
+
845
+ return $this->ip;
846
+ }
847
+
848
  // Check to see if we've already retrieved the IP address and if so return the last result.
849
  if ( $this->ip !== false ) {
850
  return $this->ip;
895
 
896
  // If the anonymize IP enabled for GDPR.
897
  if ( $this->get_option( 'anonymize_ips' ) == true ) {
898
+ $this->ip = substr( $this->ip, 0, strrpos( $this->ip, '.' ) ) . '.000';
899
+ }
900
 
901
  return $this->ip;
902
  }
923
  */
924
  public function get_UserAgent() {
925
 
926
+ //Check If Rest Request
927
+ if ( $this->restapi->is_rest() ) {
928
+ return array(
929
+ 'browser' => $this->restapi->params( 'browser' ),
930
+ 'platform' => $this->restapi->params( 'platform' ),
931
+ 'version' => $this->restapi->params( 'version' )
 
 
932
  );
933
  }
934
 
935
+ $result = new WhichBrowser\Parser( self::getAllHeader() );
936
+ $agent = array(
937
+ 'browser' => ( isset( $result->browser->name ) ) ? $result->browser->name : _x( 'Unknown', 'Browser', 'wp-statistics' ),
938
+ 'platform' => ( isset( $result->os->name ) ) ? $result->os->name : _x( 'Unknown', 'Platform', 'wp-statistics' ),
939
+ 'version' => ( isset( $result->os->version->value ) ) ? $result->os->version->value : _x( 'Unknown', 'Version', 'wp-statistics' ),
940
+ );
 
 
 
 
 
 
 
 
 
 
941
 
942
  return $agent;
943
  }
950
  * @return array|bool|string|void
951
  */
952
  public function get_Referred( $default_referrer = false ) {
953
+
954
+ //Check If Rest Request
955
+ if ( $this->restapi->is_rest() ) {
956
+ $this->referrer = $this->restapi->params( 'referred' );
957
+
958
+ return $this->referrer;
959
+ }
960
+
961
  if ( $this->referrer !== false ) {
962
  return $this->referrer;
963
  }
1422
  *
1423
  * @return string
1424
  */
1425
+ public function get_referrer_link( $referrer ) {
1426
  $html_referrer = $this->html_sanitize_referrer( $referrer );
 
 
 
 
 
 
 
1427
 
1428
  if ( substr( $html_referrer, 0, 7 ) !== 'http://' and substr( $html_referrer, 0, 8 ) !== 'https://' ) {
1429
  // relative address, use '//' to adapt both http and https
1432
  $html_nr_referrer = $html_referrer;
1433
  }
1434
 
1435
+ $base_url = parse_url( $html_nr_referrer );
1436
+
1437
+ return "<a href='{$html_nr_referrer}' title='{$html_nr_referrer}'>{$base_url['host']}</a>";
1438
+ }
1439
+
1440
+ /*
1441
+ * Get All Headers
1442
+ */
1443
+ public static function getAllHeader() {
1444
+ if ( ! function_exists( 'getallheaders' ) ) {
1445
+ $headers = [];
1446
+ foreach ( $_SERVER as $name => $value ) {
1447
+ if ( substr( $name, 0, 5 ) == 'HTTP_' ) {
1448
+ $headers[ str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $name, 5 ) ) ) ) ) ] = $value;
1449
+ }
1450
+ }
1451
+ } else {
1452
+ $headers = getallheaders();
1453
+ }
1454
+
1455
+ return $headers;
1456
  }
1457
 
1458
  /**
includes/functions/functions.php CHANGED
@@ -645,6 +645,15 @@ function wp_statistics_searchengine_list( $all = false ) {
645
  'querykey' => 'text',
646
  'image' => 'yandex.png',
647
  ),
 
 
 
 
 
 
 
 
 
648
  );
649
 
650
  if ( $all == false ) {
@@ -896,6 +905,42 @@ function wp_statistics_searchengine( $search_engine = 'all', $time = 'total' ) {
896
  return $result;
897
  }
898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
899
  // This function will return the statistics for a given search engine for a given time frame.
900
  function wp_statistics_searchword( $search_engine = 'all', $time = 'total' ) {
901
 
@@ -1218,16 +1263,16 @@ function wp_statistics_date_range_selector( $page, $current, $range = array(), $
1218
  $today = $WP_Statistics->Current_Date( 'm/d/Y' );
1219
 
1220
  // Re-create the range start/end strings from our utime's to make sure we get ride of any cruft and have them in the format we want.
1221
- $rangestart = $WP_Statistics->Local_Date( 'm/d/Y', $rangestart_utime );
1222
- $rangeend = $WP_Statistics->Local_Date( 'm/d/Y', $rangeend_utime );
1223
 
1224
  // If the rangeend isn't today OR it is but not one of the standard range values, then it's a custom selected value and we need to flag it as such.
1225
  if ( $rangeend != $today || ( $rangeend == $today && ! in_array( $current, $range ) ) ) {
1226
  $current = - 1;
1227
  } else {
1228
  // If on the other hand we are a standard range, let's reset the custom range selector to match it.
1229
- $rangestart = $WP_Statistics->Current_Date( 'm/d/Y', '-' . $current );
1230
- $rangeend = $WP_Statistics->Current_Date( 'm/d/Y' );
1231
  }
1232
 
1233
  echo '<form method="get"><ul class="subsubsub wp-statistics-sub-fullwidth">' . "\r\n";
@@ -1279,13 +1324,13 @@ function wp_statistics_date_range_selector( $page, $current, $range = array(), $
1279
  echo '<input type="text" size="10" name="rangestart" id="datestartpicker" value="' .
1280
  $rangestart .
1281
  '" placeholder="' .
1282
- __( 'MM/DD/YYYY', 'wp-statistics' ) .
1283
  '"> ' .
1284
  __( 'to', 'wp-statistics' ) .
1285
  ' <input type="text" size="10" name="rangeend" id="dateendpicker" value="' .
1286
  $rangeend .
1287
  '" placeholder="' .
1288
- __( 'MM/DD/YYYY', 'wp-statistics' ) .
1289
  '"> <input type="submit" value="' .
1290
  __( 'Go', 'wp-statistics' ) .
1291
  '" class="button-primary">' .
@@ -1296,10 +1341,74 @@ function wp_statistics_date_range_selector( $page, $current, $range = array(), $
1296
 
1297
  echo '</form>' . "\r\n";
1298
 
1299
- echo '<script>jQuery(function() { jQuery( "#datestartpicker" ).datepicker(); jQuery( "#dateendpicker" ).datepicker(); });</script>' .
1300
  "\r\n";
1301
  }
1302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1303
  // This function is used to calculate the number of days and thier respective unix timestamps.
1304
  function wp_statistics_date_range_calculator( $days, $start, $end ) {
1305
  GLOBAL $WP_Statistics;
645
  'querykey' => 'text',
646
  'image' => 'yandex.png',
647
  ),
648
+ 'qwant' => array(
649
+ 'name' => 'Qwant',
650
+ 'translated' => __( 'Qwant', 'wp-statistics' ),
651
+ 'tag' => 'qwant',
652
+ 'sqlpattern' => '%qwant.com%',
653
+ 'regexpattern' => 'qwant\.com',
654
+ 'querykey' => 'q',
655
+ 'image' => 'qwant.png',
656
+ )
657
  );
658
 
659
  if ( $all == false ) {
905
  return $result;
906
  }
907
 
908
+ //This Function will return the referrer list
909
+ function wp_statistics_referrer($time = null) {
910
+ global $wpdb, $WP_Statistics;
911
+
912
+ $timezone = array(
913
+ 'today' => 0,
914
+ 'yesterday' => -1,
915
+ 'week' => -7,
916
+ 'month' => -30,
917
+ 'year' => -365,
918
+ 'total' => 'ALL',
919
+ );
920
+ $sql = "SELECT `referred` FROM `".$wpdb->prefix."statistics_visitor` WHERE referred <> ''";
921
+ if (array_key_exists($time,$timezone)) {
922
+ if($time !="total") {
923
+ $sql .= " AND (`last_counter` = '{$WP_Statistics->Current_Date( 'Y-m-d', $timezone[$time] )}')";
924
+ }
925
+ } else {
926
+ //Set Default
927
+ $sql .= " AND (`last_counter` = '{$WP_Statistics->Current_Date( 'Y-m-d', $time )}')";
928
+ }
929
+ $result = $wpdb->get_results($sql);
930
+
931
+ $urls = array();
932
+ foreach ( $result as $item ) {
933
+ $url = parse_url( $item->referred );
934
+ if ( empty( $url['host'] ) || stristr( get_bloginfo( 'url' ), $url['host'] ) ) {
935
+ continue;
936
+ }
937
+ $urls[] = $url['scheme'] . '://' . $url['host'];
938
+ }
939
+ $get_urls = array_count_values( $urls );
940
+
941
+ return count( $get_urls );
942
+ }
943
+
944
  // This function will return the statistics for a given search engine for a given time frame.
945
  function wp_statistics_searchword( $search_engine = 'all', $time = 'total' ) {
946
 
1263
  $today = $WP_Statistics->Current_Date( 'm/d/Y' );
1264
 
1265
  // Re-create the range start/end strings from our utime's to make sure we get ride of any cruft and have them in the format we want.
1266
+ $rangestart = $WP_Statistics->Local_Date( get_option("date_format"), $rangestart_utime );
1267
+ $rangeend = $WP_Statistics->Local_Date( get_option("date_format"), $rangeend_utime );
1268
 
1269
  // If the rangeend isn't today OR it is but not one of the standard range values, then it's a custom selected value and we need to flag it as such.
1270
  if ( $rangeend != $today || ( $rangeend == $today && ! in_array( $current, $range ) ) ) {
1271
  $current = - 1;
1272
  } else {
1273
  // If on the other hand we are a standard range, let's reset the custom range selector to match it.
1274
+ $rangestart = $WP_Statistics->Current_Date( get_option("date_format"), '-' . $current );
1275
+ $rangeend = $WP_Statistics->Current_Date( get_option("date_format") );
1276
  }
1277
 
1278
  echo '<form method="get"><ul class="subsubsub wp-statistics-sub-fullwidth">' . "\r\n";
1324
  echo '<input type="text" size="10" name="rangestart" id="datestartpicker" value="' .
1325
  $rangestart .
1326
  '" placeholder="' .
1327
+ __( wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")), 'wp-statistics' ) .
1328
  '"> ' .
1329
  __( 'to', 'wp-statistics' ) .
1330
  ' <input type="text" size="10" name="rangeend" id="dateendpicker" value="' .
1331
  $rangeend .
1332
  '" placeholder="' .
1333
+ __( wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")), 'wp-statistics' ) .
1334
  '"> <input type="submit" value="' .
1335
  __( 'Go', 'wp-statistics' ) .
1336
  '" class="button-primary">' .
1341
 
1342
  echo '</form>' . "\r\n";
1343
 
1344
+ echo '<script>jQuery(function() { jQuery( "#datestartpicker" ).datepicker({dateFormat: \''.wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")).'\'}); jQuery( "#dateendpicker" ).datepicker({dateFormat: \''.wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")).'\'}); });</script>' .
1345
  "\r\n";
1346
  }
1347
 
1348
+ /*
1349
+ * Convert php dateformat to Jquery Ui
1350
+ */
1351
+ function wp_statistics_dateformat_php_to_jqueryui($php_format)
1352
+ {
1353
+ $SYMBOLS_MATCHING = array(
1354
+ // Day
1355
+ 'd' => 'dd',
1356
+ 'D' => 'D',
1357
+ 'j' => 'd',
1358
+ 'l' => 'DD',
1359
+ 'N' => '',
1360
+ 'S' => '',
1361
+ 'w' => '',
1362
+ 'z' => 'o',
1363
+ // Week
1364
+ 'W' => '',
1365
+ // Month
1366
+ 'F' => 'MM',
1367
+ 'm' => 'mm',
1368
+ 'M' => 'M',
1369
+ 'n' => 'm',
1370
+ 't' => '',
1371
+ // Year
1372
+ 'L' => '',
1373
+ 'o' => '',
1374
+ 'Y' => 'yy',
1375
+ 'y' => 'y',
1376
+ // Time
1377
+ 'a' => '',
1378
+ 'A' => '',
1379
+ 'B' => '',
1380
+ 'g' => '',
1381
+ 'G' => '',
1382
+ 'h' => '',
1383
+ 'H' => '',
1384
+ 'i' => '',
1385
+ 's' => '',
1386
+ 'u' => ''
1387
+ );
1388
+ $jqueryui_format = "";
1389
+ $escaping = false;
1390
+ for($i = 0; $i < strlen($php_format); $i++)
1391
+ {
1392
+ $char = $php_format[$i];
1393
+ if($char === '\\')
1394
+ {
1395
+ $i++;
1396
+ if($escaping) $jqueryui_format .= $php_format[$i];
1397
+ else $jqueryui_format .= '\'' . $php_format[$i];
1398
+ $escaping = true;
1399
+ }
1400
+ else
1401
+ {
1402
+ if($escaping) { $jqueryui_format .= "'"; $escaping = false; }
1403
+ if(isset($SYMBOLS_MATCHING[$char]))
1404
+ $jqueryui_format .= $SYMBOLS_MATCHING[$char];
1405
+ else
1406
+ $jqueryui_format .= $char;
1407
+ }
1408
+ }
1409
+ return $jqueryui_format;
1410
+ }
1411
+
1412
  // This function is used to calculate the number of days and thier respective unix timestamps.
1413
  function wp_statistics_date_range_calculator( $days, $start, $end ) {
1414
  GLOBAL $WP_Statistics;
includes/functions/tinymce.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit;
4
+
5
+ function wp_statistic_tinymce_plugin_translation() {
6
+ $lang = WP_Statistics_TinyMCE::lang();
7
+ $translated = $lang['translate'];
8
+ return $translated;
9
+ }
10
+ $strings = wp_statistic_tinymce_plugin_translation();
includes/log/last-search.php CHANGED
@@ -26,7 +26,7 @@ $total = $search_result[ $referred ];
26
  ?>
27
  <div class="wrap">
28
  <h2><?php _e( 'Latest Search Words', 'wp-statistics' ); ?></h2>
29
- <?php do_action( 'wp_statistics_after_title' ); ?>
30
 
31
  <ul class="subsubsub">
32
  <?php
@@ -126,60 +126,46 @@ $total = $search_result[ $referred ];
126
 
127
  $dash_icon = wp_statistics_icons( 'dashicons-location-alt', 'map' );
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  foreach ( $result as $items ) {
 
130
  if ( ! $WP_Statistics->Search_Engine_QueryString( $items->referred ) ) {
131
  continue;
132
  }
133
 
134
- if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
135
- $ip_string = __( '#hash#', 'wp-statistics' );
136
- $map_string = "";
137
- } else {
138
- $ip_string
139
- = "<a href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank'>{$items->ip}</a>";
140
- $map_string
141
- = "<a class='show-map' href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank' title='" .
142
- __( 'Map', 'wp-statistics' ) .
143
- "'>{$dash_icon}</a>";
144
- }
145
-
146
  if ( $WP_Statistics->get_option( 'search_converted' ) ) {
147
- $this_search_engine = $WP_Statistics->Search_Engine_Info_By_Engine(
148
- $items->engine
149
- );
150
  $words = $items->words;
151
  } else {
152
  $this_search_engine = $WP_Statistics->Search_Engine_Info( $items->referred );
153
- $words = $WP_Statistics->Search_Engine_QueryString(
154
- $items->referred
155
- );
156
  }
157
 
158
- echo "<div class='log-item'>";
159
- echo "<div class='log-referred'>" . $words . "</div>";
160
- echo "<div class='log-ip'>" .
161
- date( get_option( 'date_format' ), strtotime( $items->last_counter ) ) .
162
- " - {$ip_string}</div>";
163
- echo "<div class='clear'></div>";
164
- echo "<div class='log-url'>";
165
- echo $map_string;
166
-
167
- if ( $WP_Statistics->get_option( 'geoip' ) ) {
168
- echo "<img src='" .
169
- plugins_url(
170
- 'wp-statistics/assets/images/flags/' . $items->location . '.png'
171
- ) .
172
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
173
- }
174
-
175
- echo "<a href='?page=" .
176
- WP_Statistics::$page['overview'] .
177
- "&type=last-all-search&referred={$this_search_engine['tag']}'><img src='" .
178
- plugins_url( 'wp-statistics/assets/images/' . $this_search_engine['image'] ) .
179
- "' class='log-tools' title='" .
180
- __( $this_search_engine['name'], 'wp-statistics' ) .
181
- "'/></a>";
182
-
183
  if ( array_search(
184
  strtolower( $items->agent ),
185
  array(
@@ -198,19 +184,64 @@ $total = $search_result[ $referred ];
198
  } else {
199
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
200
  }
201
-
202
  echo "<a href='?page=" .
203
  WP_Statistics::$page['overview'] .
204
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
 
206
- echo $WP_Statistics->get_referrer_link( $items->referred );
 
 
 
 
 
 
 
 
207
 
208
- echo "</div>";
209
- echo "</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  }
211
- }
212
 
213
- echo "</div>";
 
214
  ?>
215
  </div>
216
  </div>
26
  ?>
27
  <div class="wrap">
28
  <h2><?php _e( 'Latest Search Words', 'wp-statistics' ); ?></h2>
29
+ <?php do_action( 'wp_statistics_after_title' ); ?>
30
 
31
  <ul class="subsubsub">
32
  <?php
126
 
127
  $dash_icon = wp_statistics_icons( 'dashicons-location-alt', 'map' );
128
 
129
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
130
+ <tr>";
131
+ echo "<td>" . __( 'Word', 'wp-statistics' ) . "</td>";
132
+ echo "<td>" . __( 'Browser', 'wp-statistics' ) . "</td>";
133
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
134
+ echo "<td>" . __( 'Country', 'wp-statistics' ) . "</td>";
135
+ }
136
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
137
+ echo "<td>" . __( 'City', 'wp-statistics' ) . "</td>";
138
+ }
139
+ echo "<td>" . __( 'Date', 'wp-statistics' ) . "</td>";
140
+ echo "<td>" . __( 'IP', 'wp-statistics' ) . "</td>";
141
+ echo "<td>" . __( 'Referrer', 'wp-statistics' ) . "</td>";
142
+ echo "</tr>";
143
+
144
+ // Load city name
145
+ $geoip_reader = false;
146
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
147
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
148
+ }
149
+
150
  foreach ( $result as $items ) {
151
+
152
  if ( ! $WP_Statistics->Search_Engine_QueryString( $items->referred ) ) {
153
  continue;
154
  }
155
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  if ( $WP_Statistics->get_option( 'search_converted' ) ) {
157
+ $this_search_engine = $WP_Statistics->Search_Engine_Info_By_Engine( $items->engine );
 
 
158
  $words = $items->words;
159
  } else {
160
  $this_search_engine = $WP_Statistics->Search_Engine_Info( $items->referred );
161
+ $words = $WP_Statistics->Search_Engine_QueryString( $items->referred );
 
 
162
  }
163
 
164
+ echo "<tr>";
165
+ echo "<td style=\"text-align: left\">";
166
+ echo $words;
167
+ echo "</td>";
168
+ echo "<td style=\"text-align: left\">";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  if ( array_search(
170
  strtolower( $items->agent ),
171
  array(
184
  } else {
185
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
186
  }
 
187
  echo "<a href='?page=" .
188
  WP_Statistics::$page['overview'] .
189
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
190
+ echo "</td>";
191
+ $city = '';
192
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
193
+ if ( $geoip_reader != false ) {
194
+ try {
195
+ $reader = $geoip_reader->city( $items->ip );
196
+ $city = $reader->city->name;
197
+ } catch ( Exception $e ) {
198
+ $city = __( 'Unknown', 'wp-statistics' );
199
+ }
200
+
201
+ if ( ! $city ) {
202
+ $city = __( 'Unknown', 'wp-statistics' );
203
+ }
204
+ }
205
+ }
206
+
207
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
208
+ echo "<td style=\"text-align: left\">";
209
+ echo "<img src='" .
210
+ plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
211
+ "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
212
+ echo "</td>";
213
+ }
214
 
215
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
216
+ echo "<td style=\"text-align: left\">";
217
+ echo $city;
218
+ echo "</td>";
219
+ }
220
+
221
+ echo "<td style=\"text-align: left\">";
222
+ echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
223
+ echo "</td>";
224
 
225
+ echo "<td style=\"text-align: left\">";
226
+ if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
227
+ $ip_string = __( '#hash#', 'wp-statistics' );
228
+ } else {
229
+ $ip_string = "<a href='admin.php?page=" .
230
+ WP_Statistics::$page['visitors'] .
231
+ "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
232
+ }
233
+ echo $ip_string;
234
+ echo "</td>";
235
+
236
+ echo "<td style=\"text-align: left\">";
237
+ echo "<td style=\"text-align: left\">" . $WP_Statistics->get_referrer_link( $items->referred ) . "</td>";
238
+ echo "</td>";
239
+
240
+ echo "</tr>";
241
  }
 
242
 
243
+ echo "</table>";
244
+ }
245
  ?>
246
  </div>
247
  </div>
includes/log/last-visitor.php CHANGED
@@ -36,7 +36,7 @@ if ( $_get != '%' ) {
36
  ?>
37
  <div class="wrap">
38
  <h2><?php _e( 'Recent Visitors', 'wp-statistics' ); ?></h2>
39
- <?php do_action( 'wp_statistics_after_title' ); ?>
40
 
41
  <ul class="subsubsub">
42
  <li class="all"><a <?php if ( $_get == '%' ) {
@@ -148,44 +148,29 @@ if ( $_get != '%' ) {
148
  );
149
  }
150
 
151
- // Check to see if User Agent logging is enabled.
152
- $DisplayUA = $WP_Statistics->get_option( "store_ua" );
153
-
154
- echo "<div class='log-latest'>";
 
 
 
 
 
 
 
 
 
155
 
156
- $dash_icon = wp_statistics_icons( 'dashicons-visibility', 'visibility' );
 
 
 
 
157
 
158
  foreach ( $result as $items ) {
159
- if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
160
- $ip_string = __( '#hash#', 'wp-statistics' );
161
- $map_string = "";
162
- } else {
163
- $ip_string = "<a href='?page=" .
164
- WP_Statistics::$page['visitors'] .
165
- "&ip={$items->ip}'>{$dash_icon}{$items->ip}</a>";
166
- $map_string
167
- = "<a class='show-map' href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank' title='" .
168
- __( 'Map', 'wp-statistics' ) .
169
- "'>" .
170
- wp_statistics_icons( 'dashicons-location-alt', 'map' ) .
171
- "</a>";
172
- }
173
-
174
- echo "<div class='log-item'>";
175
- echo "<div class='log-referred'>{$ip_string}</div>";
176
- echo "<div class='log-ip'>" .
177
- date( get_option( 'date_format' ), strtotime( $items->last_counter ) ) .
178
- "</div>";
179
- echo "<div class='clear'></div>";
180
- echo "<div class='log-url'>";
181
- echo $map_string;
182
-
183
- if ( $WP_Statistics->get_option( 'geoip' ) ) {
184
- echo "<img src='" .
185
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
186
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
187
- }
188
-
189
  if ( array_search(
190
  strtolower( $items->agent ),
191
  array(
@@ -204,31 +189,74 @@ if ( $_get != '%' ) {
204
  } else {
205
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
206
  }
207
-
208
  echo "<a href='?page=" .
209
- WP_Statistics::$page['visitors'] .
210
- "&agent={$items->agent}'>{$agent}</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
- echo $WP_Statistics->get_referrer_link( $items->referred );
 
 
213
 
214
- echo "</div>";
215
- echo "</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
 
218
- echo "</div>";
219
  ?>
220
- </div>
221
- </div>
222
 
223
- <div class="pagination-log">
224
- <?php echo $Pagination->display(); ?>
225
- <p id="result-log"><?php printf(
226
- __( 'Page %1$s of %2$s', 'wp-statistics' ),
227
- $Pagination->getCurrentPage(),
228
- $Pagination->getTotalPages()
229
- ); ?></p>
 
 
230
  </div>
231
  </div>
232
- </div>
233
- </div>
234
- </div>
36
  ?>
37
  <div class="wrap">
38
  <h2><?php _e( 'Recent Visitors', 'wp-statistics' ); ?></h2>
39
+ <?php do_action( 'wp_statistics_after_title' ); ?>
40
 
41
  <ul class="subsubsub">
42
  <li class="all"><a <?php if ( $_get == '%' ) {
148
  );
149
  }
150
 
151
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
152
+ <tr>";
153
+ echo "<td>" . __( 'Browser', 'wp-statistics' ) . "</td>";
154
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
155
+ echo "<td>" . __( 'Country', 'wp-statistics' ) . "</td>";
156
+ }
157
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
158
+ echo "<td>" . __( 'City', 'wp-statistics' ) . "</td>";
159
+ }
160
+ echo "<td>" . __( 'Date', 'wp-statistics' ) . "</td>";
161
+ echo "<td>" . __( 'IP', 'wp-statistics' ) . "</td>";
162
+ echo "<td>" . __( 'Referrer', 'wp-statistics' ) . "</td>";
163
+ echo "</tr>";
164
 
165
+ // Load city name
166
+ $geoip_reader = false;
167
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
168
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
169
+ }
170
 
171
  foreach ( $result as $items ) {
172
+ echo "<tr>";
173
+ echo "<td style=\"text-align: left\">";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  if ( array_search(
175
  strtolower( $items->agent ),
176
  array(
189
  } else {
190
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
191
  }
 
192
  echo "<a href='?page=" .
193
+ WP_Statistics::$page['overview'] .
194
+ "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
195
+ echo "</td>";
196
+ $city = '';
197
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
198
+ if ( $geoip_reader != false ) {
199
+ try {
200
+ $reader = $geoip_reader->city( $items->ip );
201
+ $city = $reader->city->name;
202
+ } catch ( Exception $e ) {
203
+ $city = __( 'Unknown', 'wp-statistics' );
204
+ }
205
+
206
+ if ( ! $city ) {
207
+ $city = __( 'Unknown', 'wp-statistics' );
208
+ }
209
+ }
210
+ }
211
+
212
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
213
+ echo "<td style=\"text-align: left\">";
214
+ echo "<img src='" .
215
+ plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
216
+ "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
217
+ echo "</td>";
218
+ }
219
+
220
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
221
+ echo "<td style=\"text-align: left\">";
222
+ echo $city;
223
+ echo "</td>";
224
+ }
225
 
226
+ echo "<td style=\"text-align: left\">";
227
+ echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
228
+ echo "</td>";
229
 
230
+ echo "<td style=\"text-align: left\">";
231
+ if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
232
+ $ip_string = __( '#hash#', 'wp-statistics' );
233
+ } else {
234
+ $ip_string = "<a href='admin.php?page=" .
235
+ WP_Statistics::$page['visitors'] .
236
+ "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
237
+ }
238
+ echo $ip_string;
239
+ echo "</td>";
240
+
241
+ echo "<td style=\"text-align: left\">";
242
+ echo "<td style=\"text-align: left\">" . $WP_Statistics->get_referrer_link( $items->referred ) . "</td>";
243
+ echo "</td>";
244
+
245
+ echo "</tr>";
246
  }
247
 
248
+ echo "</table>";
249
  ?>
 
 
250
 
251
+ <div class="pagination-log">
252
+ <?php echo $Pagination->display(); ?>
253
+ <p id="result-log"><?php printf(
254
+ __( 'Page %1$s of %2$s', 'wp-statistics' ),
255
+ $Pagination->getCurrentPage(),
256
+ $Pagination->getTotalPages()
257
+ ); ?></p>
258
+ </div>
259
+ </div>
260
  </div>
261
  </div>
262
+ </div>
 
 
includes/log/search-statistics.php CHANGED
@@ -81,6 +81,7 @@ for ( $i = $daysToDisplay; $i >= 0; $i -- ) {
81
  colors['yandex'] = ['rgba(255, 219, 77, 0.2)', 'rgba(255, 219, 77, 1)'];
82
  colors['ask'] = ['rgba(205, 0, 0, 0.2)', 'rgba(205, 0, 0, 1)'];
83
  colors['clearch'] = ['rgba(13, 0, 76, 0.2)', 'rgba(13, 0, 76, 1)'];
 
84
 
85
  var ctx = document.getElementById("search-stats").getContext('2d');
86
  var ChartJs = new Chart(ctx, {
81
  colors['yandex'] = ['rgba(255, 219, 77, 0.2)', 'rgba(255, 219, 77, 1)'];
82
  colors['ask'] = ['rgba(205, 0, 0, 0.2)', 'rgba(205, 0, 0, 1)'];
83
  colors['clearch'] = ['rgba(13, 0, 76, 0.2)', 'rgba(13, 0, 76, 1)'];
84
+ colors['qwant'] = ['rgba(53, 60, 82, 0.2)', 'rgba(53, 60, 82, 1)'];
85
 
86
  var ctx = document.getElementById("search-stats").getContext('2d');
87
  var ChartJs = new Chart(ctx, {
includes/log/searched-phrases.php CHANGED
@@ -72,7 +72,7 @@ if ( $phrase ) {
72
  ?>
73
  <div class="wrap">
74
  <h2><?php _e( 'Top Searched Phrases', 'wp-statistics' ); ?></h2>
75
- <?php do_action( 'wp_statistics_after_title' ); ?>
76
 
77
  <div><?php wp_statistics_date_range_selector(
78
  WP_Statistics::$page['searched-phrases'],
@@ -131,48 +131,50 @@ if ( $phrase ) {
131
  <h2 class="hndle"><span><?php echo $paneltitle; ?></h2>
132
 
133
  <div class="inside">
134
- <div class="log-latest">
135
- <?php
136
-
137
- if ( $total > 0 ) {
138
- // Initiate pagination object with appropriate arguments
139
- $pagesPerSection = 10;
140
- $options = array( 25, "All" );
141
- $stylePageOff = "pageOff";
142
- $stylePageOn = "pageOn";
143
- $styleErrors = "paginationErrors";
144
- $styleSelect = "paginationSelect";
145
-
146
- $Pagination = new WP_Statistics_Pagination(
147
- $total,
148
- $pagesPerSection,
149
- $options,
150
- false,
151
- $stylePageOff,
152
- $stylePageOn,
153
- $styleErrors,
154
- $styleSelect
155
- );
156
-
157
- $start = $Pagination->getEntryStart();
158
- $end = $Pagination->getEntryEnd();
159
-
160
- if ( $result ) {
161
- $result = array_slice( $result, $start, $end );
162
- $i = $start;
163
- foreach ( $result as $item ) {
164
- $i ++;
165
- echo "<div class='log-item'>";
166
- echo "<div class='log-referred'>{$i} - {$item->words}</div>";
167
- echo "<div class='clear'></div>";
168
- echo "<div class='log-url'>{$item->count}</div>";
169
- echo "</div>";
170
- }
171
- }
 
 
 
172
  }
173
-
174
  ?>
175
- </div>
176
  </div>
177
  </div>
178
 
72
  ?>
73
  <div class="wrap">
74
  <h2><?php _e( 'Top Searched Phrases', 'wp-statistics' ); ?></h2>
75
+ <?php do_action( 'wp_statistics_after_title' ); ?>
76
 
77
  <div><?php wp_statistics_date_range_selector(
78
  WP_Statistics::$page['searched-phrases'],
131
  <h2 class="hndle"><span><?php echo $paneltitle; ?></h2>
132
 
133
  <div class="inside">
134
+ <?php
135
+
136
+ if ( $total > 0 ) {
137
+ // Initiate pagination object with appropriate arguments
138
+ $pagesPerSection = 10;
139
+ $options = array( 25, "All" );
140
+ $stylePageOff = "pageOff";
141
+ $stylePageOn = "pageOn";
142
+ $styleErrors = "paginationErrors";
143
+ $styleSelect = "paginationSelect";
144
+
145
+ $Pagination = new WP_Statistics_Pagination(
146
+ $total,
147
+ $pagesPerSection,
148
+ $options,
149
+ false,
150
+ $stylePageOff,
151
+ $stylePageOn,
152
+ $styleErrors,
153
+ $styleSelect
154
+ );
155
+
156
+ $start = $Pagination->getEntryStart();
157
+ $end = $Pagination->getEntryEnd();
158
+
159
+ if ( $result ) {
160
+ $result = array_slice( $result, $start, $end );
161
+ $i = $start; ?>
162
+ <table width="100%" class="widefat table-stats" id="searched-phrases">
163
+ <tr>
164
+ <td width="90%"><?php _e( 'Phrase', 'wp-statistics' ); ?></td>
165
+ <td width="10%"><?php _e( 'Count', 'wp-statistics' ); ?></td>
166
+ </tr>
167
+ <?php foreach ( $result as $item ) {
168
+ $i ++;
169
+ echo "<tr>";
170
+ echo "<td>{$item->words}</td>";
171
+ echo "<td>{$item->count}</td>";
172
+ echo "</tr>";
173
+ }
174
+ }
175
  }
 
176
  ?>
177
+ </table>
178
  </div>
179
  </div>
180
 
includes/log/top-pages.php CHANGED
@@ -51,7 +51,7 @@ for ( $i = $daysToDisplay; $i >= 0; $i -- ) {
51
  ?>
52
  <div class="wrap">
53
  <h2><?php _e( 'Top Pages', 'wp-statistics' ); ?></h2>
54
- <?php do_action( 'wp_statistics_after_title' ); ?>
55
 
56
  <?php wp_statistics_date_range_selector( WP_Statistics::$page['pages'], $daysToDisplay ); ?>
57
  <div class="postbox-container" id="last-log">
@@ -160,37 +160,42 @@ for ( $i = $daysToDisplay; $i >= 0; $i -- ) {
160
 
161
  $site_url = site_url();
162
 
163
- echo "<div class='log-latest'>";
164
  $count = 0;
165
 
 
 
 
 
 
 
 
 
166
  foreach ( $uris as $uri ) {
167
  $count ++;
168
 
169
  if ( $count >= $start ) {
170
- echo "<div class='log-item'>";
171
 
172
  if ( $uri[3] == '' ) {
173
  $uri[3] = '[' .
174
  htmlentities( __( 'No page title found', 'wp-statistics' ), ENT_QUOTES ) .
175
  ']';
176
  }
 
 
 
177
 
178
- echo "<div class='log-page-title'>{$count} - {$uri[3]}</div>";
179
- echo "<div class='right-div'>" .
180
- __( 'Visits', 'wp-statistics' ) .
181
- ": <a href='?page=" .
 
 
182
  WP_Statistics::$page['pages'] .
183
  '&page-uri=' .
184
  htmlentities( $uri[0], ENT_QUOTES ) .
185
  "'>" .
186
  number_format_i18n( $uri[1] ) .
187
- "</a></div>";
188
- echo "<div class='left-div'><a dir='ltr' href='" .
189
- htmlentities( $site_url . $uri[0], ENT_QUOTES ) .
190
- "'>" .
191
- htmlentities( urldecode( $uri[0] ), ENT_QUOTES ) .
192
- "</a></div>";
193
- echo "</div>";
194
  }
195
 
196
  if ( $count == $start + 10 ) {
@@ -199,7 +204,7 @@ for ( $i = $daysToDisplay; $i >= 0; $i -- ) {
199
 
200
  }
201
 
202
- echo "</div>";
203
  }
204
  ?>
205
  </div>
51
  ?>
52
  <div class="wrap">
53
  <h2><?php _e( 'Top Pages', 'wp-statistics' ); ?></h2>
54
+ <?php do_action( 'wp_statistics_after_title' ); ?>
55
 
56
  <?php wp_statistics_date_range_selector( WP_Statistics::$page['pages'], $daysToDisplay ); ?>
57
  <div class="postbox-container" id="last-log">
160
 
161
  $site_url = site_url();
162
 
 
163
  $count = 0;
164
 
165
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
166
+ <tr>";
167
+ echo "<td width='10%'>" . __( 'ID', 'wp-statistics' ) . "</td>";
168
+ echo "<td width='40%'>" . __( 'Title', 'wp-statistics' ) . "</td>";
169
+ echo "<td width='40%'>" . __( 'Link', 'wp-statistics' ) . "</td>";
170
+ echo "<td width='10%'>" . __( 'Visits', 'wp-statistics' ) . "</td>";
171
+ echo "</tr>";
172
+
173
  foreach ( $uris as $uri ) {
174
  $count ++;
175
 
176
  if ( $count >= $start ) {
 
177
 
178
  if ( $uri[3] == '' ) {
179
  $uri[3] = '[' .
180
  htmlentities( __( 'No page title found', 'wp-statistics' ), ENT_QUOTES ) .
181
  ']';
182
  }
183
+ echo "<tr>";
184
+ echo "<td style=\"text-align: left\">" . $count . "</td>";
185
+ echo "<td style=\"text-align: left\">" . $uri[3] . "</td>";
186
 
187
+ echo "<td style=\"text-align: left\"><a dir='ltr' href='" .
188
+ htmlentities( $site_url . $uri[0], ENT_QUOTES ) .
189
+ "'>" .
190
+ htmlentities( urldecode( $uri[0] ), ENT_QUOTES ) .
191
+ "</a></td>";
192
+ echo "<td style=\"text-align: left\"><a href='?page=" .
193
  WP_Statistics::$page['pages'] .
194
  '&page-uri=' .
195
  htmlentities( $uri[0], ENT_QUOTES ) .
196
  "'>" .
197
  number_format_i18n( $uri[1] ) .
198
+ "</a></td>";
 
 
 
 
 
 
199
  }
200
 
201
  if ( $count == $start + 10 ) {
204
 
205
  }
206
 
207
+ echo "</table>";
208
  }
209
  ?>
210
  </div>
includes/log/top-visitors.php CHANGED
@@ -21,7 +21,7 @@ include( WP_Statistics::$reg['plugin-dir'] . 'includes/log/widgets/top.visitors.
21
 
22
  $current = 0;
23
 
24
- $statsdate = $WP_Statistics->Current_Date( 'm/d/Y', '-' . $current );
25
 
26
  if ( array_key_exists( 'statsdate', $_GET ) ) {
27
  $statsdate = $_GET['statsdate'];
@@ -35,7 +35,7 @@ include( WP_Statistics::$reg['plugin-dir'] . 'includes/log/widgets/top.visitors.
35
  echo '<input type="text" size="10" name="statsdate" id="statsdate" value="' .
36
  htmlentities( $statsdate, ENT_QUOTES ) .
37
  '" placeholder="' .
38
- __( 'MM/DD/YYYY', 'wp-statistics' ) .
39
  '"> <input type="submit" value="' .
40
  __( 'Go', 'wp-statistics' ) .
41
  '" class="button-primary">' .
@@ -43,7 +43,7 @@ include( WP_Statistics::$reg['plugin-dir'] . 'includes/log/widgets/top.visitors.
43
 
44
  echo '</form>' . "\r\n";
45
 
46
- echo '<script>jQuery(function() { jQuery( "#statsdate" ).datepicker(); } );</script>' . "\r\n";
47
 
48
  ?>
49
  <div class="postbox-container" id="last-log" style="width: 100%;">
21
 
22
  $current = 0;
23
 
24
+ $statsdate = $WP_Statistics->Current_Date( get_option("date_format"), '-' . $current );
25
 
26
  if ( array_key_exists( 'statsdate', $_GET ) ) {
27
  $statsdate = $_GET['statsdate'];
35
  echo '<input type="text" size="10" name="statsdate" id="statsdate" value="' .
36
  htmlentities( $statsdate, ENT_QUOTES ) .
37
  '" placeholder="' .
38
+ __( wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")), 'wp-statistics' ) .
39
  '"> <input type="submit" value="' .
40
  __( 'Go', 'wp-statistics' ) .
41
  '" class="button-primary">' .
43
 
44
  echo '</form>' . "\r\n";
45
 
46
+ echo '<script>jQuery(function() { jQuery( "#statsdate" ).datepicker({dateFormat: \''.wp_statistics_dateformat_php_to_jqueryui(get_option("date_format")).'\'}); } );</script>' . "\r\n";
47
 
48
  ?>
49
  <div class="postbox-container" id="last-log" style="width: 100%;">
includes/log/widgets/jqv.map.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- function wp_statistics_generate_map_postbox_content( $ISOCountryCode ) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
@@ -20,6 +20,12 @@ function wp_statistics_generate_map_postbox_content( $ISOCountryCode ) {
20
  $final_result = array();
21
  $final_result['000'] = array();
22
 
 
 
 
 
 
 
23
  if ( $result ) {
24
  foreach ( $result as $new_r ) {
25
  $new_r->location = strtolower( $new_r->location );
@@ -67,7 +73,18 @@ function wp_statistics_generate_map_postbox_content( $ISOCountryCode ) {
67
  $markets['ip'] = __( '#hash#', 'wp-statistics' );
68
  }
69
 
70
- $get_ipp[ $markets['location'] ][] = "<p>{$agent} {$markets['ip']}</p>";
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  $market_total = count( $get_ipp[ $markets['location'] ] );
1
  <?php
2
+ function wp_statistics_generate_map_postbox_content($ISOCountryCode ) {
3
 
4
  global $wpdb, $WP_Statistics;
5
 
20
  $final_result = array();
21
  $final_result['000'] = array();
22
 
23
+ //Load City Geoip
24
+ $geoip_reader = false;
25
+ if( $WP_Statistics->get_option( 'geoip_city' ) ) {
26
+ $geoip_reader = $WP_Statistics::geoip_loader('city');
27
+ }
28
+
29
  if ( $result ) {
30
  foreach ( $result as $new_r ) {
31
  $new_r->location = strtolower( $new_r->location );
73
  $markets['ip'] = __( '#hash#', 'wp-statistics' );
74
  }
75
 
76
+ $city = '';
77
+ if($geoip_reader !=false) {
78
+ try {
79
+ $reader = $geoip_reader->city($markets['ip']);
80
+ $city = $reader->city->name;
81
+ } catch ( Exception $e ) {
82
+ $city = __( 'Unknown' , 'wp-statistics' );
83
+ }
84
+ }
85
+ if($city !="") $city = ' - '.$city;
86
+
87
+ $get_ipp[ $markets['location'] ][] = "<p>{$agent} {$markets['ip']} {$city}</p>";
88
  }
89
 
90
  $market_total = count( $get_ipp[ $markets['location'] ] );
includes/log/widgets/pages.php CHANGED
@@ -16,10 +16,16 @@ function wp_statistics_generate_pages_postbox_content() {
16
  );
17
  $site_url = site_url();
18
  $counter = 0;
19
- echo '<div class="log-latest">';
 
 
 
 
 
 
 
20
  foreach ( $result as $item ) {
21
  $counter += 1;
22
- echo '<div class="log-item">';
23
  // Lookup the post title.
24
  $post = get_post( $item->id );
25
  if ( is_object( $post ) ) {
@@ -28,26 +34,26 @@ function wp_statistics_generate_pages_postbox_content() {
28
  if ( $item->uri == '/' ) {
29
  $title = get_bloginfo();
30
  } else {
31
- $title = '[' . __( 'No page title found', 'wp-statistics' ) . ']';
32
  }
33
  }
34
- echo "<div class=\"log-page-title\">{$counter} - {$title}</div>";
35
- echo '<div class="right-div">' .
36
- __( 'Visits', 'wp-statistics' ) .
37
- ': <a href="?page=' .
 
 
 
 
 
38
  WP_Statistics::$page['pages'] .
39
  '&page-uri=' .
40
  htmlentities( $item->uri, ENT_QUOTES ) .
41
  '">' .
42
  number_format_i18n( $item->count_sum ) .
43
- '</a></div>';
44
- echo '<div><a href="' .
45
- htmlentities( $site_url . $item->uri, ENT_QUOTES ) .
46
- '">' .
47
- htmlentities( urldecode( $item->uri ), ENT_QUOTES ) .
48
- '</a></div>';
49
- echo '</div>';
50
 
51
  }
52
- echo '</div>';
53
  }
16
  );
17
  $site_url = site_url();
18
  $counter = 0;
19
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
20
+ <tr>";
21
+ echo "<td width='10%'>" . __( 'ID', 'wp-statistics' ) . "</td>";
22
+ echo "<td width='40%'>" . __( 'Title', 'wp-statistics' ) . "</td>";
23
+ echo "<td width='40%'>" . __( 'Link', 'wp-statistics' ) . "</td>";
24
+ echo "<td width='10%'>" . __( 'Visits', 'wp-statistics' ) . "</td>";
25
+ echo "</tr>";
26
+
27
  foreach ( $result as $item ) {
28
  $counter += 1;
 
29
  // Lookup the post title.
30
  $post = get_post( $item->id );
31
  if ( is_object( $post ) ) {
34
  if ( $item->uri == '/' ) {
35
  $title = get_bloginfo();
36
  } else {
37
+ $title = __( 'No page title found', 'wp-statistics' );
38
  }
39
  }
40
+ echo "<tr>";
41
+ echo "<td style=\"text-align: left\">" . $counter . "</td>";
42
+ echo "<td style=\"text-align: left\">" . $title . "</td>";
43
+ echo '<td style="text-align: left"><a href="' .
44
+ htmlentities( $site_url . $item->uri, ENT_QUOTES ) .
45
+ '">' .
46
+ htmlentities( urldecode( $item->uri ), ENT_QUOTES ) .
47
+ '</a></td>';
48
+ echo '<td style="text-align: left"><a href="?page=' .
49
  WP_Statistics::$page['pages'] .
50
  '&page-uri=' .
51
  htmlentities( $item->uri, ENT_QUOTES ) .
52
  '">' .
53
  number_format_i18n( $item->count_sum ) .
54
+ '</a></td>';
55
+ echo '</tr>';
 
 
 
 
 
56
 
57
  }
58
+ echo '</table>';
59
  }
includes/log/widgets/recent.php CHANGED
@@ -6,39 +6,29 @@ function wp_statistics_generate_recent_postbox_content( $ISOCountryCode, $count
6
  "SELECT * FROM `{$wpdb->prefix}statistics_visitor` ORDER BY `{$wpdb->prefix}statistics_visitor`.`ID` DESC LIMIT 0, {$count}"
7
  );
8
 
9
- echo "<div class='log-latest'>";
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- $dash_icon = wp_statistics_icons( 'dashicons-visibility', 'visibility' );
 
 
 
 
12
 
13
  foreach ( $result as $items ) {
14
- if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
15
- $ip_string = __( '#hash#', 'wp-statistics' );
16
- $map_string = "";
17
- } else {
18
- $ip_string = "<a href='admin.php?page=" .
19
- WP_Statistics::$page['visitors'] .
20
- "&type=last-all-visitor&ip={$items->ip}'>{$dash_icon}{$items->ip}</a>";
21
- $map_string
22
- = "<a class='show-map' href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank' title='" .
23
- __( 'Map', 'wp-statistics' ) .
24
- "'>" .
25
- wp_statistics_icons( 'dashicons-location-alt', 'map' ) .
26
- "</a>";
27
- }
28
-
29
- echo "<div class='log-item'>";
30
- echo "<div class='log-referred'>{$ip_string}</div>";
31
- echo "<div class='log-ip'>" . date( get_option( 'date_format' ), strtotime( $items->last_counter ) ) . "</div>";
32
- echo "<div class='clear'></div>";
33
- echo "<div class='log-url'>";
34
- echo $map_string;
35
-
36
- if ( $WP_Statistics->get_option( 'geoip' ) ) {
37
- echo "<img src='" .
38
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
39
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
40
- }
41
-
42
  if ( array_search(
43
  strtolower( $items->agent ),
44
  array(
@@ -57,16 +47,57 @@ function wp_statistics_generate_recent_postbox_content( $ISOCountryCode, $count
57
  } else {
58
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
59
  }
60
-
61
  echo "<a href='?page=" .
62
  WP_Statistics::$page['overview'] .
63
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
- echo $WP_Statistics->get_referrer_link( $items->referred );
 
 
66
 
67
- echo "</div>";
68
- echo "</div>";
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
- echo "</div>";
72
  }
6
  "SELECT * FROM `{$wpdb->prefix}statistics_visitor` ORDER BY `{$wpdb->prefix}statistics_visitor`.`ID` DESC LIMIT 0, {$count}"
7
  );
8
 
9
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
10
+ <tr>";
11
+ echo "<td>" . __( 'Browser', 'wp-statistics' ) . "</td>";
12
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
13
+ echo "<td>" . __( 'Country', 'wp-statistics' ) . "</td>";
14
+ }
15
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
16
+ echo "<td>" . __( 'City', 'wp-statistics' ) . "</td>";
17
+ }
18
+ echo "<td>" . __( 'Date', 'wp-statistics' ) . "</td>";
19
+ echo "<td>" . __( 'IP', 'wp-statistics' ) . "</td>";
20
+ echo "<td>" . __( 'Referrer', 'wp-statistics' ) . "</td>";
21
+ echo "</tr>";
22
 
23
+ // Load city name
24
+ $geoip_reader = false;
25
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
26
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
27
+ }
28
 
29
  foreach ( $result as $items ) {
30
+ echo "<tr>";
31
+ echo "<td style=\"text-align: left\">";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  if ( array_search(
33
  strtolower( $items->agent ),
34
  array(
47
  } else {
48
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
49
  }
 
50
  echo "<a href='?page=" .
51
  WP_Statistics::$page['overview'] .
52
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
53
+ echo "</td>";
54
+ $city = '';
55
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
56
+ if ( $geoip_reader != false ) {
57
+ try {
58
+ $reader = $geoip_reader->city( $items->ip );
59
+ $city = $reader->city->name;
60
+ } catch ( Exception $e ) {
61
+ $city = __( 'Unknown', 'wp-statistics' );
62
+ }
63
+
64
+ if ( ! $city ) {
65
+ $city = __( 'Unknown', 'wp-statistics' );
66
+ }
67
+ }
68
+ }
69
+
70
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
71
+ echo "<td style=\"text-align: left\">";
72
+ echo "<img src='" .
73
+ plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
74
+ "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
75
+ echo "</td>";
76
+ }
77
+
78
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
79
+ echo "<td style=\"text-align: left\">";
80
+ echo $city;
81
+ echo "</td>";
82
+ }
83
 
84
+ echo "<td style=\"text-align: left\">";
85
+ echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
86
+ echo "</td>";
87
 
88
+ echo "<td style=\"text-align: left\">";
89
+ if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
90
+ $ip_string = __( '#hash#', 'wp-statistics' );
91
+ } else {
92
+ $ip_string = "<a href='admin.php?page=" .
93
+ WP_Statistics::$page['visitors'] .
94
+ "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
95
+ }
96
+ echo $ip_string;
97
+ echo "</td>";
98
+ echo "<td style=\"text-align: left\">" . $WP_Statistics->get_referrer_link( $items->referred ) . "</td>";
99
+ echo "</tr>";
100
  }
101
 
102
+ echo "</table>";
103
  }
includes/log/widgets/search.php CHANGED
@@ -34,6 +34,7 @@ function wp_statistics_generate_search_postbox_content( $search_engines, $size =
34
  colors['yandex'] = ['rgba(255, 219, 77, 0.2)', 'rgba(255, 219, 77, 1)'];
35
  colors['ask'] = ['rgba(205, 0, 0, 0.2)', 'rgba(205, 0, 0, 1)'];
36
  colors['clearch'] = ['rgba(13, 0, 76, 0.2)', 'rgba(13, 0, 76, 1)'];
 
37
 
38
  var ctx = document.getElementById("<?php echo $id; ?>").getContext('2d');
39
  var ChartJs = new Chart(ctx, {
34
  colors['yandex'] = ['rgba(255, 219, 77, 0.2)', 'rgba(255, 219, 77, 1)'];
35
  colors['ask'] = ['rgba(205, 0, 0, 0.2)', 'rgba(205, 0, 0, 1)'];
36
  colors['clearch'] = ['rgba(13, 0, 76, 0.2)', 'rgba(13, 0, 76, 1)'];
37
+ colors['qwant'] = ['rgba(53, 60, 82, 0.2)', 'rgba(53, 60, 82, 1)'];
38
 
39
  var ctx = document.getElementById("<?php echo $id; ?>").getContext('2d');
40
  var ChartJs = new Chart(ctx, {
includes/log/widgets/top.visitors.php CHANGED
@@ -14,6 +14,12 @@ function wp_statistics_generate_top_visitors_postbox_content(
14
  $sql_time = date( 'Y-m-d', strtotime( $day ) );
15
  }
16
 
 
 
 
 
 
 
17
  ?>
18
  <table width="100%" class="widefat table-stats" id="last-referrer">
19
  <tr>
@@ -21,6 +27,9 @@ function wp_statistics_generate_top_visitors_postbox_content(
21
  <td><?php _e( 'Hits', 'wp-statistics' ); ?></td>
22
  <td><?php _e( 'Flag', 'wp-statistics' ); ?></td>
23
  <td><?php _e( 'Country', 'wp-statistics' ); ?></td>
 
 
 
24
  <td><?php _e( 'IP', 'wp-statistics' ); ?></td>
25
  <?php if ( $compact == false ) { ?>
26
  <td><?php _e( 'Agent', 'wp-statistics' ); ?></td>
@@ -41,6 +50,18 @@ function wp_statistics_generate_top_visitors_postbox_content(
41
 
42
  $item = strtoupper( $visitor->location );
43
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  echo "<tr>";
45
  echo "<td>$i</td>";
46
  echo "<td>" . (int) $visitor->hits . "</td>";
@@ -48,6 +69,9 @@ function wp_statistics_generate_top_visitors_postbox_content(
48
  plugins_url( 'wp-statistics/assets/images/flags/' . $item . '.png' ) .
49
  "' title='{$ISOCountryCode[$item]}'/></td>";
50
  echo "<td>{$ISOCountryCode[$item]}</td>";
 
 
 
51
  echo "<td>{$visitor->ip}</td>";
52
 
53
  if ( $compact == false ) {
14
  $sql_time = date( 'Y-m-d', strtotime( $day ) );
15
  }
16
 
17
+ //Load City Geoip
18
+ $geoip_reader = false;
19
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
20
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
21
+ }
22
+
23
  ?>
24
  <table width="100%" class="widefat table-stats" id="last-referrer">
25
  <tr>
27
  <td><?php _e( 'Hits', 'wp-statistics' ); ?></td>
28
  <td><?php _e( 'Flag', 'wp-statistics' ); ?></td>
29
  <td><?php _e( 'Country', 'wp-statistics' ); ?></td>
30
+ <?php if ( $geoip_reader != false ) {
31
+ echo '<td>' . __( 'City', 'wp-statistics' ) . '</td>';
32
+ } ?>
33
  <td><?php _e( 'IP', 'wp-statistics' ); ?></td>
34
  <?php if ( $compact == false ) { ?>
35
  <td><?php _e( 'Agent', 'wp-statistics' ); ?></td>
50
 
51
  $item = strtoupper( $visitor->location );
52
 
53
+ if ( $geoip_reader != false ) {
54
+ try {
55
+ $reader = $geoip_reader->city( $visitor->ip );
56
+ $city = $reader->city->name;
57
+ } catch ( Exception $e ) {
58
+ $city = __( 'Unknown', 'wp-statistics' );
59
+ }
60
+ if ( ! $city ) {
61
+ $city = __( 'Unknown', 'wp-statistics' );
62
+ }
63
+ }
64
+
65
  echo "<tr>";
66
  echo "<td>$i</td>";
67
  echo "<td>" . (int) $visitor->hits . "</td>";
69
  plugins_url( 'wp-statistics/assets/images/flags/' . $item . '.png' ) .
70
  "' title='{$ISOCountryCode[$item]}'/></td>";
71
  echo "<td>{$ISOCountryCode[$item]}</td>";
72
+ if ( $geoip_reader != false ) {
73
+ echo "<td>{$city}</td>";
74
+ }
75
  echo "<td>{$visitor->ip}</td>";
76
 
77
  if ( $compact == false ) {
includes/log/widgets/words.php CHANGED
@@ -23,19 +23,33 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
23
  }
24
 
25
  if ( sizeof( $result ) > 0 ) {
26
- echo "<div class='log-latest'>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  foreach ( $result as $items ) {
 
29
  if ( ! $WP_Statistics->Search_Engine_QueryString( $items->referred ) ) {
30
  continue;
31
  }
32
 
33
- if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
34
- $ip_string = __( '#hash#', 'wp-statistics' );
35
- } else {
36
- $ip_string = "<a href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank'>{$items->ip}</a>";
37
- }
38
-
39
  if ( $WP_Statistics->get_option( 'search_converted' ) ) {
40
  $this_search_engine = $WP_Statistics->Search_Engine_Info_By_Engine( $items->engine );
41
  $words = $items->words;
@@ -44,34 +58,11 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
44
  $words = $WP_Statistics->Search_Engine_QueryString( $items->referred );
45
  }
46
 
47
- echo "<div class='log-item'>";
48
- echo "<div class='log-referred'>" . $words . "</div>";
49
- echo "<div class='log-ip'>" .
50
- date( get_option( 'date_format' ), strtotime( $items->last_counter ) ) .
51
- " - {$ip_string}</div>";
52
- echo "<div class='clear'></div>";
53
- echo "<div class='log-url'>";
54
- echo "<a class='show-map' href='http://www.geoiptool.com/en/?IP={$items->ip}' target='_blank' title='" .
55
- __( 'Map', 'wp-statistics' ) .
56
- "'>" .
57
- wp_statistics_icons( 'dashicons-location-alt', 'map' ) .
58
- "</a>";
59
-
60
- if ( $WP_Statistics->get_option( 'geoip' ) ) {
61
- echo "<img src='" .
62
- plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
63
- "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
64
- }
65
-
66
- $this_search_engine = $WP_Statistics->Search_Engine_Info( $items->referred );
67
- echo "<a href='?page=" .
68
- WP_Statistics::$page['overview'] .
69
- "&type=last-all-search&referred={$this_search_engine['tag']}'><img src='" .
70
- plugins_url( 'wp-statistics/assets/images/' . $this_search_engine['image'] ) .
71
- "' class='log-tools' title='" .
72
- $this_search_engine['translated'] .
73
- "'/></a>";
74
-
75
  if ( array_search(
76
  strtolower( $items->agent ),
77
  array(
@@ -90,26 +81,59 @@ function wp_statistics_generate_words_postbox_content( $ISOCountryCode, $count =
90
  } else {
91
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
92
  }
93
-
94
  echo "<a href='?page=" .
95
  WP_Statistics::$page['overview'] .
96
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
- $referrer_html = $WP_Statistics->html_sanitize_referrer( $items->referred );
99
-
100
- echo "<a href='" .
101
- $referrer_html .
102
- "' title='" .
103
- $referrer_html .
104
- "'>" .
105
- wp_statistics_icons( 'dashicons-admin-links', 'link' ) .
106
- " " .
107
- $referrer_html .
108
- "</a></div>";
109
- echo "</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
111
 
112
- echo "</div>";
113
  }
114
  }
115
 
23
  }
24
 
25
  if ( sizeof( $result ) > 0 ) {
26
+ echo "<table width=\"100%\" class=\"widefat table-stats\" id=\"last-referrer\">
27
+ <tr>";
28
+ echo "<td>" . __( 'Word', 'wp-statistics' ) . "</td>";
29
+ echo "<td>" . __( 'Browser', 'wp-statistics' ) . "</td>";
30
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
31
+ echo "<td>" . __( 'Country', 'wp-statistics' ) . "</td>";
32
+ }
33
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
34
+ echo "<td>" . __( 'City', 'wp-statistics' ) . "</td>";
35
+ }
36
+ echo "<td>" . __( 'Date', 'wp-statistics' ) . "</td>";
37
+ echo "<td>" . __( 'IP', 'wp-statistics' ) . "</td>";
38
+ echo "<td>" . __( 'Referrer', 'wp-statistics' ) . "</td>";
39
+ echo "</tr>";
40
+
41
+ // Load city name
42
+ $geoip_reader = false;
43
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
44
+ $geoip_reader = $WP_Statistics::geoip_loader( 'city' );
45
+ }
46
 
47
  foreach ( $result as $items ) {
48
+
49
  if ( ! $WP_Statistics->Search_Engine_QueryString( $items->referred ) ) {
50
  continue;
51
  }
52
 
 
 
 
 
 
 
53
  if ( $WP_Statistics->get_option( 'search_converted' ) ) {
54
  $this_search_engine = $WP_Statistics->Search_Engine_Info_By_Engine( $items->engine );
55
  $words = $items->words;
58
  $words = $WP_Statistics->Search_Engine_QueryString( $items->referred );
59
  }
60
 
61
+ echo "<tr>";
62
+ echo "<td style=\"text-align: left\">";
63
+ echo $words;
64
+ echo "</td>";
65
+ echo "<td style=\"text-align: left\">";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  if ( array_search(
67
  strtolower( $items->agent ),
68
  array(
81
  } else {
82
  $agent = wp_statistics_icons( 'dashicons-editor-help', 'unknown' );
83
  }
 
84
  echo "<a href='?page=" .
85
  WP_Statistics::$page['overview'] .
86
  "&type=last-all-visitor&agent={$items->agent}'>{$agent}</a>";
87
+ echo "</td>";
88
+ $city = '';
89
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
90
+ if ( $geoip_reader != false ) {
91
+ try {
92
+ $reader = $geoip_reader->city( $items->ip );
93
+ $city = $reader->city->name;
94
+ } catch ( Exception $e ) {
95
+ $city = __( 'Unknown', 'wp-statistics' );
96
+ }
97
+
98
+ if ( ! $city ) {
99
+ $city = __( 'Unknown', 'wp-statistics' );
100
+ }
101
+ }
102
+ }
103
 
104
+ if ( $WP_Statistics->get_option( 'geoip' ) ) {
105
+ echo "<td style=\"text-align: left\">";
106
+ echo "<img src='" .
107
+ plugins_url( 'wp-statistics/assets/images/flags/' . $items->location . '.png' ) .
108
+ "' title='{$ISOCountryCode[$items->location]}' class='log-tools'/>";
109
+ echo "</td>";
110
+ }
111
+
112
+ if ( $WP_Statistics->get_option( 'geoip_city' ) ) {
113
+ echo "<td style=\"text-align: left\">";
114
+ echo $city;
115
+ echo "</td>";
116
+ }
117
+
118
+ echo "<td style=\"text-align: left\">";
119
+ echo date( get_option( 'date_format' ), strtotime( $items->last_counter ) );
120
+ echo "</td>";
121
+
122
+ echo "<td style=\"text-align: left\">";
123
+ if ( substr( $items->ip, 0, 6 ) == '#hash#' ) {
124
+ $ip_string = __( '#hash#', 'wp-statistics' );
125
+ } else {
126
+ $ip_string = "<a href='admin.php?page=" .
127
+ WP_Statistics::$page['visitors'] .
128
+ "&type=last-all-visitor&ip={$items->ip}'>{$items->ip}</a>";
129
+ }
130
+ echo $ip_string;
131
+ echo "</td>";
132
+ echo "<td style=\"text-align: left\">" . $WP_Statistics->get_referrer_link( $items->referred ) . "</td>";;
133
+ echo "</tr>";
134
  }
135
 
136
+ echo "</table>";
137
  }
138
  }
139
 
includes/optimization/tabs/wps-optimization-resources.php CHANGED
@@ -396,62 +396,6 @@ function formatSize( $size ) {
396
  </td>
397
  </tr>
398
 
399
- <tr valign="top">
400
- <th scope="row">
401
- <?php _e( 'browscap.ini File', 'wp-statistics' ); ?>:
402
- </th>
403
-
404
- <td>
405
- <strong><?php
406
- $browscap_filename = $upload_dir['basedir'] . '/wp-statistics/browscap.ini';
407
- $browscap_filedate = @filemtime( $browscap_filename );
408
-
409
- if ( $browscap_filedate === false ) {
410
- _e( 'browscap.ini file does not exist.', 'wp-statistics' );
411
- } else {
412
- echo formatSize( @filesize( $browscap_filename ) ) .
413
- __( ', created on ', 'wp-statistics' ) .
414
- date_i18n(
415
- get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ),
416
- $browscap_filedate
417
- );
418
- } ?></strong>
419
-
420
- <p class="description"><?php _e(
421
- 'The file size and date of the browscap.ini file.',
422
- 'wp-statistics'
423
- ); ?></p>
424
- </td>
425
- </tr>
426
-
427
- <tr valign="top">
428
- <th scope="row">
429
- <?php _e( 'Browscap Cache File', 'wp-statistics' ); ?>:
430
- </th>
431
-
432
- <td>
433
- <strong><?php
434
- $browscap_filename = $upload_dir['basedir'] . '/wp-statistics/cache.php';
435
- $browscap_filedate = @filemtime( $browscap_filename );
436
-
437
- if ( $browscap_filedate === false ) {
438
- _e( 'Browscap cache file does not exist.', 'wp-statistics' );
439
- } else {
440
- echo formatSize( @filesize( $browscap_filename ) ) .
441
- __( ', created on ', 'wp-statistics' ) .
442
- date_i18n(
443
- get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ),
444
- $browscap_filedate
445
- );
446
- } ?></strong>
447
-
448
- <p class="description"><?php _e(
449
- 'The file size and date of the Browscap cache file.',
450
- 'wp-statistics'
451
- ); ?></p>
452
- </td>
453
- </tr>
454
-
455
  <tr valign="top">
456
  <th scope="row" colspan="2"><h3><?php _e( 'Client Info', 'wp-statistics' ); ?></h3></th>
457
  </tr>
396
  </td>
397
  </tr>
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  <tr valign="top">
400
  <th scope="row" colspan="2"><h3><?php _e( 'Client Info', 'wp-statistics' ); ?></h3></th>
401
  </tr>
includes/settings/tabs/wps-about.php CHANGED
@@ -33,7 +33,7 @@
33
  <tr valign="top">
34
  <td scope="row" colspan="2"><?php echo sprintf(
35
  __(
36
- 'Fell like showing us how much you enjoy WP Statistics? Drop by our %sdonation%s page and show us some love!',
37
  'wp-statistics'
38
  ),
39
  '<a href="http://wp-statistics.com/donate" target="_blank">',
33
  <tr valign="top">
34
  <td scope="row" colspan="2"><?php echo sprintf(
35
  __(
36
+ 'Feel like showing us how much you enjoy WP Statistics? Drop by our %sdonation%s page and show us some love!',
37
  'wp-statistics'
38
  ),
39
  '<a href="http://wp-statistics.com/donate" target="_blank">',
includes/settings/tabs/wps-exclusions.php CHANGED
@@ -41,6 +41,7 @@ if ( $wps_nonce_valid ) {
41
  'wps_robotlist',
42
  'wps_exclude_ip',
43
  'wps_exclude_loginpage',
 
44
  'wps_force_robot_update',
45
  'wps_excluded_countries',
46
  'wps_included_countries',
@@ -303,7 +304,7 @@ if ( $wps_nonce_valid ) {
303
  ) . ' ' . __(
304
  'Use "000" (three zeros) to exclude unknown countries.',
305
  'wp-statistics'
306
- ); ?></p>
307
  </td>
308
  </tr>
309
 
@@ -317,12 +318,12 @@ if ( $wps_nonce_valid ) {
317
  ); ?></textarea>
318
 
319
  <p class="description"><?php echo __(
320
- 'A list of country codes (one per line, two letters each) to include in statistics collection, if this list is not empty, only visitors from the included countries will be recorded.',
321
  'wp-statistics'
322
  ) . ' ' . __(
323
  'Use "000" (three zeros) to exclude unknown countries.',
324
  'wp-statistics'
325
- ); ?></p>
326
  </td>
327
  </tr>
328
 
@@ -372,6 +373,23 @@ if ( $wps_nonce_valid ) {
372
  ); ?></p>
373
  </td>
374
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  <tr valign="top">
376
  <th scope="row"><?php _e( 'Excluded RSS feeds:', 'wp-statistics' ); ?></th>
377
  <td>
41
  'wps_robotlist',
42
  'wps_exclude_ip',
43
  'wps_exclude_loginpage',
44
+ 'wps_exclude_adminpage',
45
  'wps_force_robot_update',
46
  'wps_excluded_countries',
47
  'wps_included_countries',
304
  ) . ' ' . __(
305
  'Use "000" (three zeros) to exclude unknown countries.',
306
  'wp-statistics'
307
+ ).' '.sprintf(__( '(%1$sISO 3166 Country Codes%2$s)', 'wp-statistics' ), '<a href="' . esc_url( 'https://dev.maxmind.com/geoip/legacy/codes/iso3166/' ) . '" target="_blank">','</a>' ); ?></p>
308
  </td>
309
  </tr>
310
 
318
  ); ?></textarea>
319
 
320
  <p class="description"><?php echo __(
321
+ 'A list of country codes (one per line, two letters each) to include in statistics collection, if this list is not empty, only visitors from the included countries will be recorded',
322
  'wp-statistics'
323
  ) . ' ' . __(
324
  'Use "000" (three zeros) to exclude unknown countries.',
325
  'wp-statistics'
326
+ ).' '.sprintf(__( '(%1$sISO 3166 Country Codes%2$s)', 'wp-statistics' ), '<a href="' . esc_url( 'https://dev.maxmind.com/geoip/legacy/codes/iso3166/' ) . '" target="_blank">','</a>' ); ?></p>
327
  </td>
328
  </tr>
329
 
373
  ); ?></p>
374
  </td>
375
  </tr>
376
+ <tr valign="top">
377
+ <th scope="row"><?php _e( 'Excluded Admin page:', 'wp-statistics' ); ?></th>
378
+ <td>
379
+ <input id="wps-exclude-adminpage" type="checkbox" value="1"
380
+ name="wps_exclude_adminpage" <?php echo $WP_Statistics->get_option( 'exclude_adminpage' ) == true
381
+ ? "checked='checked'" : ''; ?>><label for="wps-exclude-adminpage"><?php _e(
382
+ 'Exclude',
383
+ 'wp-statistics'
384
+ ); ?></label>
385
+
386
+ <p class="description"><?php _e(
387
+ 'Exclude any call to the WordPress Admin pages.',
388
+ 'wp-statistics'
389
+ ); ?></p>
390
+ </td>
391
+ </tr>
392
+
393
  <tr valign="top">
394
  <th scope="row"><?php _e( 'Excluded RSS feeds:', 'wp-statistics' ); ?></th>
395
  <td>
includes/settings/tabs/wps-externals.php CHANGED
@@ -5,14 +5,9 @@ if ( $wps_nonce_valid ) {
5
  'wps_geoip',
6
  'wps_update_geoip',
7
  'wps_schedule_geoip',
 
8
  'wps_auto_pop',
9
  'wps_private_country_code',
10
- 'wps_browscap',
11
- 'wps_update_browscap',
12
- 'wps_schedule_browscap',
13
- 'wps_referrerspam',
14
- 'wps_update_referrerspam',
15
- 'wps_schedule_referrerspam',
16
  );
17
 
18
  // For country codes we always use upper case, otherwise default to 000 which is 'unknown'.
@@ -36,10 +31,6 @@ if ( $wps_nonce_valid ) {
36
  $WP_Statistics->store_option( $new_option, $value );
37
  }
38
 
39
- // If we're focing the download of the browscap.ini file, make sure to flush the last download time from the options.
40
- if ( array_key_exists( 'wps_update_browscap', $_POST ) ) {
41
- $WP_Statistics->store_option( 'last_browscap_dl', 0 );
42
- }
43
  }
44
 
45
  ?>
@@ -52,7 +43,7 @@ if ( $wps_nonce_valid ) {
52
  <tr valign="top">
53
  <th scope="row" colspan="2">
54
  <?php echo sprintf(
55
- __( 'IP location services provided by data created by %s.', 'wp-statistics' ),
56
  '<a href="http://www.maxmind.com" target=_blank>MaxMind</a>'
57
  ); ?>
58
  </th>
@@ -67,13 +58,17 @@ if ( $wps_nonce_valid ) {
67
  </th>
68
 
69
  <td>
70
- <input id="geoip-enable" type="checkbox" name="wps_geoip" <?php echo $WP_Statistics->get_option(
71
- 'geoip'
72
- ) == true ? "checked='checked'" : ''; ?>>
73
- <label for="geoip-enable"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
 
 
 
 
74
 
75
  <p class="description"><?php _e(
76
- 'For get more information and location (country) from visitor, enable this feature.',
77
  'wp-statistics'
78
  ); ?></p>
79
  </td>
@@ -81,19 +76,24 @@ if ( $wps_nonce_valid ) {
81
 
82
  <tr valign="top">
83
  <th scope="row">
84
- <label for="geoip-update"><?php _e( 'Update GeoIP Info:', 'wp-statistics' ); ?></label>
85
  </th>
86
 
87
  <td>
88
- <input id="geoip-update" type="checkbox"
89
- name="wps_update_geoip" <?php echo $WP_Statistics->get_option( 'update_geoip' ) == true
90
- ? "checked='checked'" : ''; ?>>
91
- <label for="geoip-update"><?php _e( 'Download GeoIP Database', 'wp-statistics' ); ?></label>
 
 
 
 
 
92
 
93
  <p class="description"><?php _e(
94
- 'Save changes on this page to download the update.',
95
- 'wp-statistics'
96
- ); ?></p>
97
  </td>
98
  </tr>
99
 
@@ -229,86 +229,7 @@ if ( $wps_nonce_valid ) {
229
  <?php
230
  } ?>
231
 
232
- <tr valign="top">
233
- <th scope="row" colspan="2"><h3><?php _e( 'Browscap settings', 'wp-statistics' ); ?></h3></th>
234
- </tr>
235
-
236
- <tr valign="top">
237
- <th scope="row">
238
- <label for="browscap-enable"><?php _e( 'Browscap usage:', 'wp-statistics' ); ?></label>
239
- </th>
240
-
241
- <td>
242
- <input id="browscap-enable" type="checkbox" name="wps_browscap" <?php echo $WP_Statistics->get_option(
243
- 'browscap'
244
- ) == true ? "checked='checked'" : ''; ?>>
245
- <label for="browscap-enable"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
246
-
247
- <p class="description"><?php _e(
248
- 'The Browscap database will be downloaded and used to detect robots.',
249
- 'wp-statistics'
250
- ); ?></p>
251
- </td>
252
- </tr>
253
-
254
- <tr valign="top">
255
- <th scope="row">
256
- <label for="browscap-update"><?php _e( 'Update Browscap Info:', 'wp-statistics' ); ?></label>
257
- </th>
258
-
259
- <td>
260
- <input id="browscap-update" type="checkbox"
261
- name="wps_update_browscap" <?php echo $WP_Statistics->get_option( 'update_browscap' ) == true
262
- ? "checked='checked'" : ''; ?>>
263
- <label for="browscap-update"><?php _e( 'Download Browscap Database', 'wp-statistics' ); ?></label>
264
-
265
- <p class="description"><?php _e(
266
- 'Save changes on this page to download the update.',
267
- 'wp-statistics'
268
- ); ?></p>
269
- </td>
270
- </tr>
271
 
272
- <tr valign="top">
273
- <th scope="row">
274
- <label for="browscap-schedule"><?php _e( 'Schedule weekly update of browscap DB:', 'wp-statistics' ); ?></label>
275
- </th>
276
-
277
- <td>
278
- <input id="browscap-schedule" type="checkbox"
279
- name="wps_schedule_browscap" <?php echo $WP_Statistics->get_option( 'schedule_browscap' ) == true
280
- ? "checked='checked'" : ''; ?>>
281
- <label for="browscap-schedule"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
282
- <?php
283
- if ( $WP_Statistics->get_option( 'schedule_browscap' ) ) {
284
- echo '<p class="description">' . __( 'Next update will be', 'wp-statistics' ) . ': <code>';
285
- $last_update = $WP_Statistics->get_option( 'last_browscap_dl' );
286
- if ( $last_update == 0 ) {
287
- $last_update = time();
288
- }
289
- $next_update = $last_update + ( 86400 * 7 );
290
-
291
- $next_schedule = wp_next_scheduled( 'wp_statistics_browscap_hook' );
292
-
293
- if ( $next_schedule ) {
294
- echo date( get_option( 'date_format' ), $next_schedule ) .
295
- ' @ ' .
296
- date( get_option( 'time_format' ), $next_schedule );
297
- } else {
298
- echo date( get_option( 'date_format' ), $next_update ) .
299
- ' @ ' .
300
- date( get_option( 'time_format' ), time() );
301
- }
302
-
303
- echo '</code></p>';
304
- }
305
- ?>
306
- <p class="description"><?php _e(
307
- 'Download of the Browscap database will be scheduled for once a week.',
308
- 'wp-statistics'
309
- ); ?></p>
310
- </td>
311
- </tr>
312
 
313
  <tr valign="top">
314
  <th scope="row" colspan="2">
5
  'wps_geoip',
6
  'wps_update_geoip',
7
  'wps_schedule_geoip',
8
+ 'wps_geoip_city',
9
  'wps_auto_pop',
10
  'wps_private_country_code',
 
 
 
 
 
 
11
  );
12
 
13
  // For country codes we always use upper case, otherwise default to 000 which is 'unknown'.
31
  $WP_Statistics->store_option( $new_option, $value );
32
  }
33
 
 
 
 
 
34
  }
35
 
36
  ?>
43
  <tr valign="top">
44
  <th scope="row" colspan="2">
45
  <?php echo sprintf(
46
+ __( 'IP location services are provided by data created by %s.', 'wp-statistics' ),
47
  '<a href="http://www.maxmind.com" target=_blank>MaxMind</a>'
48
  ); ?>
49
  </th>
58
  </th>
59
 
60
  <td>
61
+ <input id="geoip-enable" type="checkbox" name="wps_geoip" <?php echo ($WP_Statistics->get_option( 'geoip' ) === 'on' ? "checked='checked'" : ''); ?>>
62
+ <label for="geoip-enable">
63
+ <?php _e( 'Enable', 'wp-statistics' ); ?>
64
+ <form action="" method="post" style="display: inline;">
65
+ <input type="hidden" name="geoip_name" value="country">
66
+ <?php submit_button(__("Update Database", 'wp-statistics' ), "secondary", "update_geoip", false); ?>
67
+ </form>
68
+ </label>
69
 
70
  <p class="description"><?php _e(
71
+ 'For getting more information and location (country) from visitor, enable this feature.',
72
  'wp-statistics'
73
  ); ?></p>
74
  </td>
76
 
77
  <tr valign="top">
78
  <th scope="row">
79
+ <label for="geoip-city"><?php _e( 'GeoIP City:', 'wp-statistics' ); ?></label>
80
  </th>
81
 
82
  <td>
83
+ <input id="geoip-city" type="checkbox"
84
+ name="wps_geoip_city" <?php echo ($WP_Statistics->get_option( 'geoip_city' ) == 'on' ? "checked='checked'" : ''); ?>>
85
+ <label for="geoip-city">
86
+ <?php _e( 'Enable', 'wp-statistics' ); ?>
87
+ <form action="" method="post" style="display: inline;">
88
+ <input type="hidden" name="geoip_name" value="city">
89
+ <?php submit_button(__("Update Database", 'wp-statistics' ), "secondary", "update_geoip", false); ?>
90
+ </form>
91
+ </label>
92
 
93
  <p class="description"><?php _e(
94
+ 'See Visitor\'s City Name',
95
+ 'wp-statistics'
96
+ ); ?></p>
97
  </td>
98
  </tr>
99
 
229
  <?php
230
  } ?>
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
  <tr valign="top">
235
  <th scope="row" colspan="2">
includes/settings/tabs/wps-general.php CHANGED
@@ -26,6 +26,7 @@ if ( $wps_nonce_valid ) {
26
  'wps_visitors',
27
  'wps_pages',
28
  'wps_track_all_pages',
 
29
  'wps_disable_column',
30
  'wps_show_hits',
31
  'wps_display_hits_position',
@@ -292,6 +293,26 @@ if ( $wps_nonce_valid ) {
292
  </td>
293
  </tr>
294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  <tr valign="top">
296
  <th scope="row" colspan="2"><h3><?php _e( 'Miscellaneous', 'wp-statistics' ); ?></h3></th>
297
  </tr>
26
  'wps_visitors',
27
  'wps_pages',
28
  'wps_track_all_pages',
29
+ 'wps_use_cache_plugin',
30
  'wps_disable_column',
31
  'wps_show_hits',
32
  'wps_display_hits_position',
293
  </td>
294
  </tr>
295
 
296
+ <tr valign="top">
297
+ <th scope="row" colspan="2"><h3><?php _e( 'Cache Plugin', 'wp-statistics' ); ?></h3></th>
298
+ </tr>
299
+
300
+ <tr valign="top">
301
+ <th scope="row">
302
+ <label for="all_pages"><?php _e( 'Use Cache Plugin:', 'wp-statistics' ); ?></label>
303
+ </th>
304
+
305
+ <td>
306
+ <input id="use_cache_plugin" type="checkbox" value="1"
307
+ name="wps_use_cache_plugin" <?php echo $WP_Statistics->get_option( 'use_cache_plugin' ) == true
308
+ ? "checked='checked'" : ''; ?>>
309
+ <label for="use_cache_plugin"><?php _e( 'Yes', 'wp-statistics' ); ?></label>
310
+
311
+ <p class="description"><?php _e( 'If you use WordPress Cache Plugins, enable this option.', 'wp-statistics' ); ?></p>
312
+ </td>
313
+ </tr>
314
+
315
+
316
  <tr valign="top">
317
  <th scope="row" colspan="2"><h3><?php _e( 'Miscellaneous', 'wp-statistics' ); ?></h3></th>
318
  </tr>
includes/settings/tabs/wps-notifications.php CHANGED
@@ -24,7 +24,6 @@ if ( $wps_nonce_valid ) {
24
  "wps_send_report",
25
  "wps_content_report",
26
  "wps_email_list",
27
- "wps_browscap_report",
28
  "wps_geoip_report",
29
  "wps_prune_report",
30
  "wps_upgrade_report",
@@ -82,24 +81,6 @@ if ( $wps_nonce_valid ) {
82
  <th scope="row" colspan="2"><h3><?php _e( 'Update Reports', 'wp-statistics' ); ?></h3></th>
83
  </tr>
84
 
85
- <tr valign="top">
86
- <td scope="row">
87
- <label for="browscap-report"><?php _e( 'Browscap:', 'wp-statistics' ); ?></label>
88
- </td>
89
-
90
- <td>
91
- <input id="browscap-report" type="checkbox" value="1"
92
- name="wps_browscap_report" <?php echo $WP_Statistics->get_option( 'browscap_report' ) == true
93
- ? "checked='checked'" : ''; ?>>
94
- <label for="browscap-report"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
95
-
96
- <p class="description"><?php _e(
97
- 'Send a report whenever the browscap.ini is updated.',
98
- 'wp-statistics'
99
- ); ?></p>
100
- </td>
101
- </tr>
102
-
103
  <tr valign="top">
104
  <td scope="row">
105
  <label for="geoip-report"><?php _e( 'GeoIP:', 'wp-statistics' ); ?></label>
24
  "wps_send_report",
25
  "wps_content_report",
26
  "wps_email_list",
 
27
  "wps_geoip_report",
28
  "wps_prune_report",
29
  "wps_upgrade_report",
81
  <th scope="row" colspan="2"><h3><?php _e( 'Update Reports', 'wp-statistics' ); ?></h3></th>
82
  </tr>
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  <tr valign="top">
85
  <td scope="row">
86
  <label for="geoip-report"><?php _e( 'GeoIP:', 'wp-statistics' ); ?></label>
includes/settings/tabs/wps-overview-display.php CHANGED
@@ -40,7 +40,7 @@ if ( $wps_admin ) {
40
  <input id="disable-dashboard" type="checkbox" value="1"
41
  name="wps_disable_dashboard" <?php echo $WP_Statistics->get_option( 'disable_dashboard' ) == true
42
  ? "checked='checked'" : ''; ?>>
43
- <label for="disable-dashboard"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
44
 
45
  <p class="description"><?php _e( 'Disable the dashboard widgets.', 'wp-statistics' ); ?></p>
46
  </td>
@@ -66,7 +66,7 @@ if ( $wps_admin ) {
66
  <input id="disable-editor" type="checkbox" value="1"
67
  name="wps_disable_editor" <?php echo $WP_Statistics->get_option( 'disable_editor' ) == true
68
  ? "checked='checked'" : ''; ?>>
69
- <label for="disable-editor"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
70
 
71
  <p class="description"><?php _e( 'Disable the page/post editor widget.', 'wp-statistics' ); ?></p>
72
  </td>
@@ -92,7 +92,7 @@ if ( $wps_admin ) {
92
  <input id="disable-map" type="checkbox" value="1"
93
  name="wps_disable_map" <?php echo $WP_Statistics->get_option( 'disable_map' ) == true
94
  ? "checked='checked'" : ''; ?>>
95
- <label for="disable-map"><?php _e( 'Enable', 'wp-statistics' ); ?></label>
96
 
97
  <p class="description"><?php _e( 'Disable the map display', 'wp-statistics' ); ?></p>
98
  </td>
40
  <input id="disable-dashboard" type="checkbox" value="1"
41
  name="wps_disable_dashboard" <?php echo $WP_Statistics->get_option( 'disable_dashboard' ) == true
42
  ? "checked='checked'" : ''; ?>>
43
+ <label for="disable-dashboard"><?php _e( 'Disable', 'wp-statistics' ); ?></label>
44
 
45
  <p class="description"><?php _e( 'Disable the dashboard widgets.', 'wp-statistics' ); ?></p>
46
  </td>
66
  <input id="disable-editor" type="checkbox" value="1"
67
  name="wps_disable_editor" <?php echo $WP_Statistics->get_option( 'disable_editor' ) == true
68
  ? "checked='checked'" : ''; ?>>
69
+ <label for="disable-editor"><?php _e( 'Disable', 'wp-statistics' ); ?></label>
70
 
71
  <p class="description"><?php _e( 'Disable the page/post editor widget.', 'wp-statistics' ); ?></p>
72
  </td>
92
  <input id="disable-map" type="checkbox" value="1"
93
  name="wps_disable_map" <?php echo $WP_Statistics->get_option( 'disable_map' ) == true
94
  ? "checked='checked'" : ''; ?>>
95
+ <label for="disable-map"><?php _e( 'Disable', 'wp-statistics' ); ?></label>
96
 
97
  <p class="description"><?php _e( 'Disable the map display', 'wp-statistics' ); ?></p>
98
  </td>
includes/settings/tabs/wps-privacy.php CHANGED
@@ -31,7 +31,7 @@ if ( $wps_nonce_valid ) {
31
 
32
  <tr valign="top">
33
  <td scope="row"
34
- colspan="2"><?php echo __( sprintf( 'If you want to delete visitor data, Please <a href="%s">click here</a>.', admin_url( 'admin.php?page=wps_optimization_page&tab=purging' ) ), 'wp-statistics' ); ?></td>
35
  </tr>
36
 
37
  <tr valign="top">
31
 
32
  <tr valign="top">
33
  <td scope="row"
34
+ colspan="2"><?php echo sprintf( __( 'If you want to delete visitor data, please <a href="%s">click here</a>.', 'wp-statistics' ), admin_url( 'admin.php?page=wps_optimization_page&tab=purging' ) ); ?></td>
35
  </tr>
36
 
37
  <tr valign="top">
includes/templates/plugins.php CHANGED
@@ -73,33 +73,6 @@
73
  <?php endforeach; ?>
74
  </div>
75
  </div>
76
-
77
- <div id="postbox-container-1" class="postbox-container">
78
- <div class="meta-box-sortables ui-sortable">
79
- <div id="wps-plugins-support" class="postbox">
80
- <?php $paneltitle = __( 'Join to Market!', 'wp-statistics' ); ?>
81
- <button class="handlediv" type="button" aria-expanded="true">
82
- <span class="screen-reader-text"><?php printf(
83
- __( 'Toggle panel: %s', 'wp-statistics' ),
84
- $paneltitle
85
- ); ?></span>
86
- <span class="toggle-indicator" aria-hidden="true"></span>
87
- </button>
88
- <h2 class="hndle"><span><?php echo $paneltitle; ?></span></h2>
89
-
90
- <div class="inside">
91
- <p><?php _e(
92
- 'We welcome practical extensions for the WP-Statistics plugin. In case you\'re a WordPress programmer and developer and plan to sell extension in this page, please contact us through the following link.',
93
- 'wp-statistics'
94
- ); ?></p>
95
- <a href="http://wp-statistics.com/add-ons/submit" target="_blank" class="button"><?php _e(
96
- 'Submit Add-on',
97
- 'wp-statistics'
98
- ); ?></a>
99
- </div>
100
- </div>
101
- </div>
102
- </div>
103
  </div>
104
  </div>
105
  </div>
73
  <?php endforeach; ?>
74
  </div>
75
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  </div>
77
  </div>
78
  </div>
includes/templates/welcome.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap about-wrap full-width-layout">
2
+ <div class="wp-statistics-welcome">
3
+ <h1><?php printf( __( 'Welcome to WP-Statistics&nbsp;%s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></h1>
4
+
5
+ <p class="about-text">
6
+ <?php printf(
7
+ __(
8
+ 'Thank you for updating to the latest version! We encourage you to submit a %srating and review%s over at WordPress.org. Your feedback is greatly appreciated!',
9
+ 'wp-statistics'
10
+ ),
11
+ '<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank">',
12
+ '</a>'
13
+ ); ?>
14
+
15
+ <?php _e( 'Submit your rating:', 'wp-statistics' ); ?>
16
+ <a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/stars.png' ); ?>"/></a>
17
+ </p>
18
+
19
+ <div class="wp-badge"><?php printf( __( 'Version %s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></div>
20
+
21
+ <h2 class="nav-tab-wrapper wp-clearfix">
22
+ <a href="#" class="nav-tab nav-tab-active"
23
+ data-tab="whats-news"><?php _e( 'What&#8217;s New', 'wp-statistics' ); ?></a>
24
+ <a href="#" class="nav-tab" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
25
+ <a href="#" class="nav-tab" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
26
+ </h2>
27
+
28
+ <div data-content="whats-news" class="tab-content current">
29
+ <section class="normal-section">
30
+ <div class="right">
31
+ <div class="content-padding">
32
+ <h2><?php _e( 'Showing the cities of your website visitors', 'wp-statistics' ); ?></h2>
33
+ <h4><?php _e( 'Enable this feature to know the cities of the people who visit your website.', 'wp-statistics' ); ?></h4>
34
+ </div>
35
+ </div>
36
+
37
+ <div class="left text-center">
38
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/country.png' ); ?>"/>
39
+ </div>
40
+ </section>
41
+
42
+ <section class="normal-section">
43
+ <div class="left">
44
+ <div class="content-padding">
45
+ <h2><?php _e( 'The plugin’s Short Codes in the editor', 'wp-statistics' ); ?></h2>
46
+ <h4><?php _e( 'All the plugin’s shortcodes are readily available.', 'wp-statistics' ); ?></h4>
47
+ </div>
48
+ </div>
49
+
50
+ <div class="right text-center">
51
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/shortcode.png' ); ?>"/>
52
+ </div>
53
+ </section>
54
+
55
+ <section class="normal-section">
56
+ <div class="right">
57
+ <div class="content-padding">
58
+ <h2><?php _e( 'Support Cache, Updated!', 'wp-statistics' ); ?></h2>
59
+ <h4><?php _e( 'If your WordPress cache is enabled, you should enable the cache in the plugin\'s setting, too.', 'wp-statistics' ); ?></h4>
60
+ </div>
61
+ </div>
62
+
63
+ <div class="left text-center">
64
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/cache.png' ); ?>"/>
65
+ </div>
66
+ </section>
67
+
68
+ <section class="normal-section">
69
+ <div class="left">
70
+ <div class="content-padding">
71
+ <h2><?php _e( 'Improved recognition of crawlers', 'wp-statistics' ); ?></h2>
72
+ <h4><?php _e( 'To better recognize crawlers, we used WhichBrowser to make your website’s statistics more accurate.', 'wp-statistics' ); ?></h4>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="right text-center">
77
+ <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/whichbrowser.png' ); ?>"/>
78
+ </div>
79
+ </section>
80
+
81
+ <section class="normal-section">
82
+ <div class="right">
83
+ <div class="content-padding">
84
+ <h2><?php _e( 'Add-Ons!', 'wp-statistics' ); ?></h2>
85
+ <h4><?php _e( 'These extensions add more functionality to your WP-Statistics Plugin.', 'wp-statistics' ); ?></h4>
86
+ </div>
87
+ </div>
88
+
89
+ <div class="right text-center addons-item">
90
+ <a href="https://wp-statistics.com/downloads/wp-statistics-widgets/" title="Widgets" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-widgets.png' ); ?>"/></a>
91
+ <a href="https://wp-statistics.com/downloads/wp-statistics-mini-chart/" title="Mini Chart" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-mini-chart.png' ); ?>"/></a>
92
+ <a href="https://wp-statistics.com/downloads/wp-statistics-advanced-reporting/" title="Advanced Reporting" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-advanced-reporting.png' ); ?>"/></a>
93
+ <a href="https://wp-statistics.com/downloads/wp-statistics-realtime-stats/" title="Realtime stats" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-realtime-stats.png' ); ?>"/></a>
94
+ </div>
95
+ </section>
96
+
97
+ <section class="center-section logo">
98
+ <a href="https://veronalabs.com" target="_blank" title="WordPress Solutions and Services"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/veronalabs.svg' ); ?>"/></a>
99
+ <p><?php echo __( 'WP-Statistics is one of the VeronaLabs.com projects.', 'wp-statistics' ); ?></p>
100
+ <h4><?php echo sprintf( __( 'To help us, you can make <a href="%s" target="_blank">donate</a> or <a href="%s" target="_blank">purchase</a> Add-Ons. 😊', 'wp-statistics' ), 'https://wp-statistics.com/donate/', 'https://wp-statistics.com/add-ons/' ); ?></h4>
101
+ </section>
102
+ </div>
103
+
104
+ <div data-content="credit" class="tab-content">
105
+ <div class="about-wrap-content">
106
+ <p class="about-description"><?php echo sprintf( __( 'WP-Statistics is created by some people and is one of the <a href="%s" target="_blank">VeronaLabs.com</a> projects.', 'wp-statistics' ), 'http://veronalabs.com' ); ?></p>
107
+ <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
108
+ <ul class="wp-people-group ">
109
+ <li class="wp-person">
110
+ <a href="https://profiles.wordpress.org/mostafas1990"
111
+ class="web"><?php echo get_avatar( 'mst404@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mostafa Soufi', 'wp-statistics' ); ?></a>
112
+ <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
113
+ </li>
114
+ </ul>
115
+ <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
116
+ <ul class="wp-people-group">
117
+ <li class="wp-person">
118
+ <a href="https://profiles.wordpress.org/mehrshaddarzi"
119
+ class="web"><?php echo get_avatar( 'mehrshad198@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mehrshad Darzi', 'wp-statistics' ); ?></a>
120
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
121
+ </li>
122
+ <li class="wp-person">
123
+ <a href="https://profiles.wordpress.org/ghasemi71ir"
124
+ class="web"><?php echo get_avatar( 'ghasemi71ir@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mohammad Ghasemi', 'wp-statistics' ); ?></a>
125
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
126
+ </li>
127
+ <li class="wp-person">
128
+ <a href="https://profiles.wordpress.org/gregross"
129
+ class="web"><?php echo get_avatar( 'greg@toolstack.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Greg Ross', 'wp-statistics' ); ?></a>
130
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
131
+ </li>
132
+ <li class="wp-person">
133
+ <a href="https://profiles.wordpress.org/dedidata"
134
+ class="web"><?php echo get_avatar( 'dedidata.com@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Farhad Sakhaei', 'wp-statistics' ); ?></a>
135
+ <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
136
+ </li>
137
+ <li class="wp-person">
138
+ <a href="https://profiles.wordpress.org/pedromendonca"
139
+ class="web"><?php echo get_avatar( 'ped.gaspar@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Pedro Mendonça', 'wp-statistics' ); ?></a>
140
+ <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
141
+ </li>
142
+ </ul>
143
+
144
+ <p class="clear"><?php echo sprintf( __( 'WP-Statistics is being developed on GitHub, if you’re interested in contributing to the plugin, please look at the <a href="%s" target="_blank">GitHub page</a>.', 'wp-statistics' ), 'https://github.com/wp-statistics/wp-statistics' ); ?></p>
145
+ <h3 class="wp-people-group"><?php _e( 'External Libraries', 'wp-statistics' ); ?></h3>
146
+ <p class="wp-credits-list">
147
+ <a target="_blank" href="https://maxmind.com/">MaxMind</a>,
148
+ <a target="_blank" href="https://www.chartjs.org/">Chart.js</a>,
149
+ <a target="_blank" href="https://whichbrowser.net/">WhichBrowser</a>.</p>
150
+ </div>
151
+ </div>
152
+
153
+ <div data-content="changelog" class="one-col tab-content">
154
+ <?php WP_Statistics_Welcome::show_change_log(); ?>
155
+ </div>
156
+
157
+ <hr>
158
+
159
+ <div class="return-to-dashboard">
160
+ <a href="<?php echo admin_url( 'admin.php?page=wps_overview_page' ); ?>"><?php _e( 'Go to Statistics &rarr; Overview', 'wp-statistics' ); ?></a>
161
+ </div>
162
+ </div>
163
+ </div>
includes/templates/welcomes/last-version.php DELETED
@@ -1,126 +0,0 @@
1
- <div class="wrap about-wrap full-width-layout">
2
- <div class="wp-statistics-welcome">
3
- <h1><?php printf( __( 'Welcome to WP-Statistics&nbsp;%s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></h1>
4
-
5
- <p class="about-text">
6
- <?php printf(
7
- __(
8
- 'Thank you for updating to the latest version! We encourage you to submit a %srating and review%s over at WordPress.org. Your feedback is greatly appreciated!',
9
- 'wp-statistics'
10
- ),
11
- '<a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank">',
12
- '</a>'
13
- ); ?>
14
-
15
- <?php _e( 'Submit your rating:', 'wp-statistics' ); ?> <a href="https://wordpress.org/support/plugin/wp-statistics/reviews/?rate=5#new-post" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/stars.png' ); ?>"/></a>
16
- </p>
17
-
18
- <div class="wp-badge"><?php printf( __( 'Version %s', 'wp-statistics' ), WP_Statistics::$reg['version'] ); ?></div>
19
-
20
- <h2 class="nav-tab-wrapper wp-clearfix">
21
- <a href="#" class="nav-tab nav-tab-active"
22
- data-tab="whats-news"><?php _e( 'What&#8217;s New', 'wp-statistics' ); ?></a>
23
- <a href="#" class="nav-tab" data-tab="credit"><?php _e( 'Credits', 'wp-statistics' ); ?></a>
24
- <a href="#" class="nav-tab" data-tab="changelog"><?php _e( 'Changelog', 'wp-statistics' ); ?></a>
25
- </h2>
26
-
27
- <div data-content="whats-news" class="tab-content current">
28
- <section class="normal-section">
29
- <div class="right">
30
- <div class="content-padding">
31
- <h2><?php _e( 'GDPR compliance, Updated!', 'wp-statistics' ); ?></h2>
32
- <h4><?php echo sprintf( __( 'We implement GDPR into the WP-Statistics. for more information read <a href="%s" target="_blank">the blog post</a>.', 'wp-statistics' ), 'https://wp-statistics.com/2018/08/16/wp-statistics-gdpr' ); ?></h4>
33
- <h4><?php _e( '<span style="color:red;">Important:</span> with this update, Opt-out feature is removed.', 'wp-statistics' ); ?></h4>
34
- </div>
35
- </div>
36
-
37
- <div class="left text-center">
38
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/gdpr.png' ); ?>"/>
39
- </div>
40
- </section>
41
-
42
- <section class="normal-section">
43
- <div class="left">
44
- <div class="content-padding">
45
- <h2><?php _e( 'Anonymize IP addresses', 'wp-statistics' ); ?></h2>
46
- <h4><?php _e( 'This option anonymizes the user IP address for GDPR compliance.', 'wp-statistics' ); ?></h4>
47
- </div>
48
- </div>
49
-
50
- <div class="right text-center">
51
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/wp-stats-ip.png' ); ?>"/>
52
- </div>
53
- </section>
54
-
55
- <section class="normal-section">
56
- <div class="right">
57
- <div class="content-padding">
58
- <h2><?php _e( 'Add-Ons!', 'wp-statistics' ); ?></h2>
59
- <h4><?php _e( 'These extensions add functionality to your WP-Statistics.', 'wp-statistics' ); ?></h4>
60
- </div>
61
- </div>
62
-
63
- <div class="right text-center addons-item">
64
- <a href="https://wp-statistics.com/downloads/wp-statistics-widgets/" title="Widgets" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-widgets.png' ); ?>"/></a>
65
- <a href="https://wp-statistics.com/downloads/wp-statistics-mini-chart/" title="Mini Chart" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-mini-chart.png' ); ?>"/></a>
66
- <a href="https://wp-statistics.com/downloads/wp-statistics-advanced-reporting/" title="Advanced Reporting" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-advanced-reporting.png' ); ?>"/></a>
67
- <a href="https://wp-statistics.com/downloads/wp-statistics-realtime-stats/" title="Realtime stats" target="_blank"><img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/add-on-realtime-stats.png' ); ?>"/></a>
68
- </div>
69
- </section>
70
-
71
- <section class="center-section">
72
- <img src="<?php echo plugins_url( 'wp-statistics/assets/images/welcome/icon-love.png' ); ?>"/>
73
- <h4><?php echo sprintf( __( 'To help us, you can make <a href="%s" target="_blank">donate</a> or <a href="%s" target="_blank">purchase</a> Add-Ons. 😊', 'wp-statistics' ), 'https://wp-statistics.com/donate/', 'https://wp-statistics.com/add-ons/' ); ?></h4>
74
- </section>
75
- </div>
76
-
77
- <div data-content="credit" class="tab-content">
78
- <div class="about-wrap-content">
79
- <p class="about-description"><?php echo sprintf( __( 'WP-Statistics is created by some people and is one of the <a href="%s" target="_blank">VeronaLabs.com</a> projects.', 'wp-statistics' ), 'http://veronalabs.com' ); ?></p>
80
- <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'wp-statistics' ); ?></h3>
81
- <ul class="wp-people-group ">
82
- <li class="wp-person">
83
- <a href="https://profiles.wordpress.org/mostafas1990/"
84
- class="web"><?php echo get_avatar( 'mst404@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Mostafa Soufi', 'wp-statistics' ); ?></a>
85
- <span class="title"><?php _e( 'Original Author', 'wp-statistics' ); ?></span>
86
- </li>
87
- </ul>
88
- <h3 class="wp-people-group"><?php _e( 'Other Contributors', 'wp-statistics' ); ?></h3>
89
- <ul class="wp-people-group">
90
- <li class="wp-person">
91
- <a href="https://profiles.wordpress.org/gregross/"
92
- class="web"><?php echo get_avatar( 'greg@toolstack.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Greg Ross', 'wp-statistics' ); ?></a>
93
- <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
94
- </li>
95
- <li class="wp-person">
96
- <a href="https://profiles.wordpress.org/dedidata/"
97
- class="web"><?php echo get_avatar( 'dedidata.com@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Farhad Sakhaei', 'wp-statistics' ); ?></a>
98
- <span class="title"><?php _e( 'Core Contributor', 'wp-statistics' ); ?></span>
99
- </li>
100
- <li class="wp-person">
101
- <a href="https://profiles.wordpress.org/pedromendonca/"
102
- class="web"><?php echo get_avatar( 'ped.gaspar@gmail.com', 62, '', '', array( 'class' => 'gravatar' ) ); ?><?php _e( 'Pedro Mendonça', 'wp-statistics' ); ?></a>
103
- <span class="title"><?php _e( 'Language Contributor', 'wp-statistics' ); ?></span>
104
- </li>
105
- </ul>
106
-
107
- <p class="clear"><?php echo sprintf( __( 'WP-Statistics is being developed on GitHub, if you’re interested in contributing to the plugin, please look at the <a href="%s" target="_blank">GitHub page</a>.', 'wp-statistics' ), 'https://github.com/wp-statistics/wp-statistics' ); ?></p>
108
- <h3 class="wp-people-group"><?php _e( 'External Libraries', 'wp-statistics' ); ?></h3>
109
- <p class="wp-credits-list">
110
- <a href="http://www.maxmind.com/">MaxMind</a>,
111
- <a href="https://browscap.org/">Browscap</a>,
112
- <a href="http://www.chartjs.org/">Chart.js</a>.</p>
113
- </div>
114
- </div>
115
-
116
- <div data-content="changelog" class="one-col tab-content">
117
- <?php WP_Statistics_Welcome::show_change_log(); ?>
118
- </div>
119
-
120
- <hr>
121
-
122
- <div class="return-to-dashboard">
123
- <a href="<?php echo admin_url( 'admin.php?page=wps_overview_page' ); ?>"><?php _e( 'Go to Statistics &rarr; Overview', 'wp-statistics' ); ?></a>
124
- </div>
125
- </div>
126
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/bin/browscap-php DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env sh
2
-
3
- dir=$(d=${0%[/\\]*}; cd "$d" > /dev/null; cd "../browscap/browscap-php/bin" && pwd)
4
-
5
- # See if we are running in Cygwin by checking for cygpath program
6
- if command -v 'cygpath' >/dev/null 2>&1; then
7
- # Cygwin paths start with /cygdrive/ which will break windows PHP,
8
- # so we need to translate the dir path to windows format. However
9
- # we could be using cygwin PHP which does not require this, so we
10
- # test if the path to PHP starts with /cygdrive/ rather than /usr/bin
11
- if [[ $(which php) == /cygdrive/* ]]; then
12
- dir=$(cygpath -m "$dir");
13
- fi
14
- fi
15
-
16
- dir=$(echo $dir | sed 's/ /\ /g')
17
- "${dir}/browscap-php" "$@"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/bin/browscap-php.bat DELETED
@@ -1,4 +0,0 @@
1
- @ECHO OFF
2
- setlocal DISABLEDELAYEDEXPANSION
3
- SET BIN_TARGET=%~dp0/../browscap/browscap-php/bin/browscap-php
4
- php "%BIN_TARGET%" %*
 
 
 
 
includes/vendor/browscap/browscap-php/.gitattributes DELETED
@@ -1,13 +0,0 @@
1
- #Ensure the markdown uses lf
2
- *.markdown text eol=lf
3
- *.js text eol=lf
4
- *.json text eol=lf
5
- *.lock text eol=lf
6
- *.md text eol=lf
7
- *.html text eol=lf
8
- *.php text eol=lf
9
- *.yml text eol=lf
10
- *.xml text eol=lf
11
- *.dist text eol=lf
12
- .gitattributes text eol=lf
13
- .gitignore text eol=lf
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- vendor/
2
- .idea/
3
- .buildpath
4
- .settings
5
- .project
6
- composer.phar
7
- composer.lock
8
- resources/*
9
- !resources/.gitkeep
10
- PHP_BrowscapINI
11
- ergebnis.txt
12
- tests/data/*
13
- !tests/data/.gitkeep
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/.php_cs DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- $finder = Symfony\CS\Finder\DefaultFinder::create()
3
- ->files()
4
- ->name('*.php')
5
- ->in(__DIR__ . '/src')
6
- ->in(__DIR__ . '/tests')
7
- ;
8
-
9
- ini_set('memory_limit', '-1');
10
-
11
- return Symfony\CS\Config\Config::create()
12
- ->level(\Symfony\CS\FixerInterface::PSR2_LEVEL)
13
- ->fixers(
14
- array(
15
- 'unalign_double_arrow',
16
- 'double_arrow_multiline_whitespaces',
17
- 'align_equals',
18
- 'braces',
19
- 'concat_with_spaces',
20
- 'duplicate_semicolon',
21
- 'elseif',
22
- 'encoding',
23
- 'eof_ending',
24
- 'extra_empty_lines',
25
- 'function_call_space',
26
- 'function_declaration',
27
- 'indentation',
28
- 'join_function',
29
- 'line_after_namespace',
30
- 'linefeed',
31
- 'list_commas',
32
- 'lowercase_constants',
33
- 'lowercase_keywords',
34
- 'method_argument_space',
35
- 'multiple_use',
36
- 'namespace_no_leading_whitespace',
37
- 'no_blank_lines_after_class_opening',
38
- 'parenthesis',
39
- 'php_closing_tag',
40
- 'phpdoc_indent',
41
- 'phpdoc_no_access',
42
- 'phpdoc_no_empty_return',
43
- 'phpdoc_no_package',
44
- 'phpdoc_params',
45
- 'phpdoc_scalar',
46
- 'phpdoc_trim',
47
- 'phpdoc_types',
48
- 'phpdoc_var_without_name',
49
- 'remove_lines_between_uses',
50
- 'return',
51
- 'self_accessor',
52
- 'short_array_syntax',
53
- 'short_tag',
54
- 'single_line_after_imports',
55
- 'single_quote',
56
- 'spaces_before_semicolon',
57
- 'spaces_cast',
58
- 'ternary_spaces',
59
- 'trailing_spaces',
60
- 'trim_array_spaces',
61
- 'unused_use',
62
- 'visibility',
63
- 'whitespacy_lines',
64
- 'psr0',
65
- 'array_element_no_space_before_comma',
66
- 'array_element_white_space_after_comma',
67
- 'blankline_after_open_tag',
68
- 'function_typehint_space',
69
- 'include',
70
- 'multiline_array_trailing_comma',
71
- 'new_with_braces',
72
- 'object_operator',
73
- 'operators_spaces',
74
- 'phpdoc_inline_tag',
75
- 'pre_increment',
76
- 'print_to_echo',
77
- 'remove_leading_slash_use',
78
- 'short_bool_cast',
79
- 'single_array_no_trailing_comma',
80
- 'single_blank_line_before_namespace',
81
- 'standardize_not_equal',
82
- 'ereg_to_preg',
83
- 'multiline_spaces_before_semicolon',
84
- 'newline_after_open_tag',
85
- 'ordered_use',
86
- 'phpdoc_order',
87
- 'short_echo_tag',
88
- 'strict',
89
- )
90
- )
91
- ->finder($finder);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/.scrutinizer.yml DELETED
@@ -1,7 +0,0 @@
1
- inherit: true
2
-
3
- tools:
4
- external_code_coverage:
5
- enabled: true
6
- timeout: 1800 # 30 minutes
7
- runs: 1
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/.travis-scripts/cache-browscap.sh DELETED
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- if [ ! -f "$TRAVIS_BUILD_DIR/resources/browscap.ini" ]; then
5
- mkdir -p $TRAVIS_BUILD_DIR/resources
6
- wget http://browscap.org/stream?q=Full_PHP_BrowsCapINI -O $TRAVIS_BUILD_DIR/resources/browscap.ini
7
- else
8
- echo "Using cached browscap.ini"
9
- fi
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/.travis.yml DELETED
@@ -1,52 +0,0 @@
1
- language: php
2
- sudo: false
3
-
4
- php:
5
- - 5.6
6
- - 7.0
7
- - 7.1
8
- - nightly
9
-
10
- os:
11
- - linux
12
-
13
- env:
14
- - COMPOSER_FLAGS="--prefer-lowest"
15
- - COMPOSER_FLAGS=""
16
-
17
- matrix:
18
- include:
19
- - php: 7.0
20
- env: COVERAGE=yes
21
- - php: 7.0
22
- env: EXECUTE_CS_CHECK=yes
23
- - php: 7.1
24
- env: COMPARE=yes
25
- allow_failures:
26
- - php: nightly
27
-
28
- cache:
29
- directories:
30
- - $TRAVIS_BUILD_DIR/resources
31
- - $HOME/.composer/cache
32
-
33
- before_install:
34
- - .travis-scripts/cache-browscap.sh
35
- - if [[ $TRAVIS_PHP_VERSION != nightly && $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini; fi
36
- - echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
37
- - echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
38
- - travis_retry composer self-update
39
-
40
- install:
41
- - travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS
42
-
43
- script:
44
- - if [[ $COVERAGE == yes ]]; then php -d browscap=$TRAVIS_BUILD_DIR/resources/browscap.ini vendor/bin/phpunit --exclude-group compare --coverage-text --coverage-clover=coverage.clover; fi
45
- - if [[ $COVERAGE != yes && $COMPARE != yes ]]; then php -d browscap=$TRAVIS_BUILD_DIR/resources/browscap.ini vendor/bin/phpunit --no-coverage --exclude-group compare; fi
46
- - if [[ $COMPARE == yes ]]; then php -d browscap=$TRAVIS_BUILD_DIR/resources/browscap.ini vendor/bin/phpunit --no-coverage --group compare; fi
47
- - if [[ $EXECUTE_CS_CHECK == yes ]]; then php -n -d memory_limit=768M vendor/bin/phpcs; fi
48
- - if [[ $EXECUTE_CS_CHECK == yes ]]; then php -n -d memory_limit=768M vendor/bin/php-cs-fixer fix --dry-run -vv; fi
49
-
50
- after_script:
51
- - if [[ $COVERAGE = yes ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 1998-2015 Browser Capabilities Project
2
- Copyright (c) 2007-2014 Jonathan Stoppani <jonathan.stoppani@gmail.com>
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in
12
- all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/README.md DELETED
@@ -1,303 +0,0 @@
1
- Browser Capabilities PHP Project
2
- ================================
3
-
4
- This is a userland replacement for PHP's native `get_browser()` function, which is _officially supported_ by the Browser Capabilities Project.
5
-
6
- **Note that you are currently viewing the 3.x series. If you're looking for any 2.x version, please read the documentation for that branch [here](https://github.com/browscap/browscap-php/tree/2.x).**
7
-
8
- [![Build Status](https://secure.travis-ci.org/browscap/browscap-php.png?branch=master)](http://travis-ci.org/browscap/browscap-php) [![Code Coverage](https://scrutinizer-ci.com/g/browscap/browscap-php/badges/coverage.png?s=61cb32ca83d2053ed9b140690b6e18dfa00e4639)](https://scrutinizer-ci.com/g/browscap/browscap-php/) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/browscap/browscap-php/badges/quality-score.png?s=db1cc1699b1cb6ac6ae46754ef9612217eba5526)](https://scrutinizer-ci.com/g/browscap/browscap-php/)
9
-
10
- Installation
11
- ------------
12
-
13
- Run the command below to install via Composer
14
-
15
- ```shell
16
- composer require browscap/browscap-php
17
- ```
18
-
19
- Then you may identify the current user agent this way:
20
-
21
- ```php
22
- use BrowscapPHP\Browscap;
23
-
24
- $browscap = new Browscap();
25
- $info = $browscap->getBrowser();
26
- ```
27
-
28
- Recommended Setup
29
- -----------------
30
-
31
- Before you can start, you have to download the browscap.ini file and convert it into a cache. There are two ways.
32
-
33
- a. Download the file and convert it in two steps. The downloaded file will be stored in a local file, but there is no check
34
- if the remote file has changed. If your cache gets corrupted you only need to rerun the `convert` command.
35
-
36
- ```php
37
- vendor/bin/browscap-php browscap:fetch
38
- vendor/bin/browscap-php browscap:convert
39
- ```
40
-
41
- b. Download the file and convert it in one step. The downloaded file will not be stored in a local file, but there is a check
42
- if the remote file has changed. If your cache gets corrupted you have clean the cache and restart the process.
43
-
44
- ```php
45
- vendor/bin/browscap-php browscap:update
46
- ```
47
-
48
- If you want to autoupdate the used cache, we recommend a separate cron job that calls the command listed above.
49
-
50
- What's changed in version 3.x
51
- -----------------------------
52
-
53
- ## Changes
54
-
55
- * the namespace was changed to `BrowscapPHP`
56
- * the `Browscap` class was split into pieces
57
- * for caching the [WurflCache](https://github.com/mimmi20/WurflCache) package is used
58
- * for downloading the browscap.ini the [Guzzle HTTP](https://github.com/guzzle/guzzle) package is used
59
-
60
- ## Removed features
61
-
62
- * the autoupdate function was removed
63
- * all public properties were removed
64
-
65
- ## New features
66
-
67
- * now it is possible to use other caches than the file cache (see the [WurflCache](https://github.com/mimmi20/WurflCache) package formore information)
68
- * now it is possible to write your own formatter to change the output format
69
- * now it is possbile to set a PSR-3 compatible logger
70
-
71
- Setup Examples
72
- --------------
73
-
74
- ## Update your setup to version 3.x
75
-
76
- This is the base setup in version 2.x.
77
- ```php
78
- // setup in version 2.x
79
- $bc = new \phpbrowscap\Browscap($cacheDir);
80
- $result = $bc->getBrowser();
81
- ```
82
-
83
- Change this to the base setup for version 3.x. to use the v2 cache directory
84
- ```php
85
- $bc = new \BrowscapPHP\Browscap();
86
- $adapter = new \WurflCache\Adapter\File([\WurflCache\Adapter\File::DIR => $cacheDir]);
87
- $bc->setCache($adapter);
88
- $result = $bc->getBrowser();
89
- ```
90
-
91
- Note: In version 2.x a cache directory was required, but version 3.x has a default directory.
92
- If you don't require a specific cache directory, the setup becomes more simple.
93
- ```php
94
- $result = (new \BrowscapPHP\Browscap())->getBrowser();
95
- ```
96
-
97
- ## Setting up a logger
98
-
99
- If you want to log something that happens with the detector you may set an logger.
100
- This logger has to implement the PSR3 logger interface from [Psr\Log](https://github.com/php-fig/log)
101
-
102
- ```php
103
- $bc = new \BrowscapPHP\Browscap();
104
- $logger = new \Monolog\Logger('name');
105
- $bc->setLogger($logger);
106
- ```
107
-
108
- ## Setting up a Memcache
109
-
110
- If you don't want to use a file cache, you may change the cache adapter.
111
- This cache adapter has to implement the adapter interface from WurflCache\Adapter\AdapterInterface
112
- ```php
113
- $memcacheConfiguration = [
114
- 'host' => '127.0.0.1', // optional, defaults to '127.0.0.1'
115
- 'port' => 11211, // optional, defaults to 11211
116
- 'namespace' => 'wurfl', // optional, defaults to 'wurfl'
117
- 'cacheExpiration' => 0, // optional, defaults to 0 (cache does not expire), expiration time in seconds
118
- 'cacheVersion' => '1234', // optional, default value may change in external library
119
- ];
120
- $adapter = new \WurflCache\Adapter\Memcached($memcacheConfiguration);
121
- $bc = new \BrowscapPHP\Browscap();
122
- $bc->setCache($adapter);
123
- ```
124
-
125
- NOTE: Please look into the [WurflCache](https://github.com/mimmi20/WurflCache) package for infomation about the other cache adapters.
126
-
127
- ## Using the full browscap.ini file
128
-
129
- ```php
130
- $bc = new \BrowscapPHP\BrowscapUpdater();
131
- $bc->update(\BrowscapPHP\Helper\IniLoader::PHP_INI_FULL);
132
- ```
133
-
134
- ## Setting up a proxy configuration
135
-
136
- If you are behind a proxy or need a spcific configuration, you have to set up a client instance.
137
- See into the [Guzzle documentation](http://docs.guzzlephp.org/en/latest/) for more information about this.
138
-
139
- ```php
140
- $proxyConfig = [
141
- 'proxy' => [
142
- 'http' => 'tcp://localhost:8125',
143
- 'https' => 'tcp://localhost:8124',
144
- ],
145
- ];
146
- $client = new \GuzzleHttp\Client($proxyConfig);
147
- $bcu = new BrowscapUpdater();
148
- $bcu->setClient($client);
149
- ```
150
-
151
- Usage Examples
152
- --------------
153
-
154
- ## Taking the user agent from the global $_SERVER variable
155
-
156
- ```php
157
- $bc = new \BrowscapPHP\Browscap();
158
- $current_browser = $bc->getBrowser();
159
- ```
160
-
161
- ## Using a sample useragent
162
-
163
- ```php
164
- $bc = new \BrowscapPHP\Browscap();
165
- $current_browser = $bc->getBrowser($the_user_agent);
166
- ```
167
-
168
- the CLI commands
169
- ----------------
170
-
171
- In version 3 some CLI commands were added.
172
-
173
- NOTE: If you don't want to use a file cache, you could not use the CLI commands. It is not possible to use other caches there at the moment.
174
- NOTE: Each operation (fetch, update, check-update) which fetches data from the remote host browscap.org may run into the
175
- rate limit of that site. If this happens an Exception is thrown.
176
-
177
- ## check-update
178
-
179
- If you only want to check if a new version of the browscap.ini is available, you can use the `check-update` command.
180
-
181
- ```php
182
- vendor/bin/browscap-php browscap:check-update
183
- ```
184
-
185
- ###options
186
-
187
- - `debug` (optional) if set more messages are printed to the console
188
- - `cache` (optional) the relative path to your cache directory
189
-
190
- ## fetch
191
-
192
- The `fetch` command downloads an ini file from browscap.org.
193
-
194
- ```php
195
- vendor/bin/browscap-php browscap:fetch
196
- ```
197
-
198
- ###options
199
-
200
- - `debug` (optional) if set more messages are printed to the console
201
- - `remote-file` (optional) only required if you dont want to download the standerd file, possible values are
202
- - `PHP_BrowscapINI` downloads the standard file (default)
203
- - `Lite_PHP_BrowscapINI` downloads the lite file
204
- - `Full_PHP_BrowscapINI` downloads the full file
205
- - `file` (optional) the relative path to the local file where the remote content is stored
206
-
207
- ## convert
208
-
209
- The `convert` command reads a local stored browscap.ini file and writes the contents into a cache.
210
-
211
- ```php
212
- vendor/bin/browscap-php browscap:convert
213
- ```
214
-
215
- ###options
216
-
217
- - `file` (optional) the relative path to the local file where the remote content is stored, this should be the same file as in the fetch command
218
- - `debug` (optional) if set more messages are printed to the console
219
- - `cache` (optional) the relative path to your cache directory
220
-
221
- ## update
222
-
223
- The `update` command downloads an ini file from browscap.org and writes the contents into a cache. No local files are created.
224
-
225
- ```php
226
- vendor/bin/browscap-php browscap:update
227
- ```
228
-
229
- ###options
230
-
231
- - `debug` (optional) if set more messages are printed to the console
232
- - `remote-file`(optional) only required if you dont want to download the standerd file, possible values are
233
- - `PHP_BrowscapINI` downloads the standard file (default)
234
- - `Lite_PHP_BrowscapINI` downloads the lite file
235
- - `Full_PHP_BrowscapINI` downloads the full file
236
- - `cache` (optional) the relative path to your cache directory
237
-
238
- ## parse
239
-
240
- The `parse` command parses a given user agent and writes the result to the console.
241
-
242
- ```php
243
- vendor/bin/browscap-php browscap:parse
244
- ```
245
-
246
- ###options
247
-
248
- - `user-agent` (required) the user agent which should be parsed
249
- - `debug` (optional) if set more messages are printed to the console
250
- - `cache` (optional) the relative path to your cache directory
251
-
252
- ## log
253
-
254
- The `log` command parses a single access log file or a directory with access log files and writes the results into an output file.
255
-
256
- ```php
257
- vendor/bin/browscap-php browscap:log
258
- ```
259
-
260
- ###options
261
-
262
- - `output` (required) the path to a log file where the results are stored
263
- - `debug` (optional) if set more messages are printed to the console
264
- - `cache` (optional) the relative path to your cache directory
265
- - `log-file` (optional) the relative path to an access log file
266
- - `log-dir` (optional) the relative path to directory with the log files
267
- - `include` (optional) a glob compatible list of files which should be included, only used in comination with the `log-dir` option
268
- - `exclude` (optional) a glob compatible list of files which should be excluded from parsing, only used in comination with the `log-dir` option
269
-
270
- NOTE: One of both options `log-file` and `log-dir` is required.
271
- NOTE: At the moment only Apache access logs are supported.
272
-
273
- CLI Examples
274
- ------------
275
-
276
- ## Updating the cache using the full browscap.ini file
277
-
278
- Note: Both ways to create/update the cache will use the `standard` mode file as default.
279
- If you want more detailed information you may change this with the `remote-file` option.
280
- Please use the help function this parameter.
281
-
282
- ```php
283
- vendor/bin/browscap-php browscap:update --remote-file Full_PHP_BrowscapINI
284
- ```
285
-
286
- ## Updating a custom cache dir
287
-
288
- Each operation expect fetch uses a cache inside the `resources` directory inside the project. If you update this library with
289
- composer, the cache is cleared also. If you want to avoid this and want to set your own cache folder,
290
- you can use the `cache` option. If you do this, you have to set a Cache Instance for this this path.
291
-
292
- ```php
293
- vendor/bin/browscap-php browscap:update --cache ./browscap-cache
294
- ```
295
-
296
- Issues and feature requests
297
- ---------------------------
298
-
299
- Please report your issues and ask for new features on the GitHub Issue Tracker
300
- at https://github.com/browscap/browscap-php/issues
301
-
302
- Please report incorrectly identified User Agents and browser detect in the browscap.ini
303
- file here: https://github.com/browscap/browscap/issues
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/bin/browscap-php DELETED
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env php
2
- <?php
3
-
4
- $baseDir = dirname(__DIR__);
5
-
6
- $autoloadPaths = array(
7
- $baseDir . '/vendor/autoload.php',
8
- $baseDir . '/../../autoload.php',
9
- );
10
-
11
- $foundVendorAutoload = false;
12
- foreach ($autoloadPaths as $path) {
13
- if (file_exists($path)) {
14
- require $path;
15
- $foundVendorAutoload = true;
16
- break;
17
- }
18
- }
19
-
20
- if (!$foundVendorAutoload) {
21
- throw new \Exception('Could not find autoload path in any of the searched locations');
22
- }
23
-
24
- use BrowscapPHP\Exception;
25
- use Symfony\Component\Console\Application;
26
- use BrowscapPHP\Command;
27
-
28
- $cacheDirectory = $baseDir . '/resources/';
29
- $defaultIniFile = $baseDir . '/resources/browscap.ini';
30
-
31
- $application = new Application('browscap.php');
32
- $application->add(new Command\ConvertCommand($cacheDirectory, $defaultIniFile));
33
- $application->add(new Command\UpdateCommand($cacheDirectory));
34
- $application->add(new Command\ParserCommand($cacheDirectory));
35
- $application->add(new Command\LogfileCommand($cacheDirectory));
36
- $application->add(new Command\FetchCommand($defaultIniFile));
37
- $application->add(new Command\CheckUpdateCommand($cacheDirectory));
38
-
39
- ini_set('memory_limit', '512M');
40
-
41
- $application->run();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/composer.json DELETED
@@ -1,55 +0,0 @@
1
- {
2
- "name": "browscap/browscap-php",
3
- "type": "library",
4
- "description": "Standalone replacement for php's native get_browser() function",
5
- "keywords": ["get_browser", "browser", "capabilities", "user agent"],
6
- "homepage": "https://github.com/browscap/browscap-php",
7
- "license": "MIT",
8
- "authors": [
9
- {
10
- "name": "Jonathan Stoppani",
11
- "email": "jonathan.stoppani@gmail.com"
12
- },
13
- {
14
- "name": "James Titcumb",
15
- "email": "james@asgrim.com"
16
- },
17
- {
18
- "name": "Thomas Mueller",
19
- "email": "t_mueller_stolzenhain@yahoo.de"
20
- }
21
- ],
22
- "support": {
23
- "issues": "https://github.com/browscap/browscap-php/issues",
24
- "source": "https://github.com/browscap/browscap-php"
25
- },
26
- "require": {
27
- "php": "^5.6 || ^7.0",
28
- "mimmi20/wurflcache": "^1.3",
29
- "guzzlehttp/guzzle": "^6.2",
30
- "symfony/filesystem": "^2.6 || ^3.0",
31
- "symfony/finder": "^2.6 || ^3.0",
32
- "symfony/console": "^2.6 || ^3.0",
33
- "monolog/monolog": "^1.7"
34
- },
35
- "require-dev": {
36
- "phpunit/phpunit": "^5.3",
37
- "mikey179/vfsStream": "^1.6",
38
- "squizlabs/php_codesniffer": "^2.5",
39
- "friendsofphp/php-cs-fixer": "^1.11"
40
- },
41
- "suggest": {
42
- "ext-curl": "to use curl requests to get the ini file"
43
- },
44
- "autoload": {
45
- "psr-4": {
46
- "BrowscapPHP\\": "src/"
47
- }
48
- },
49
- "autoload-dev": {
50
- "psr-4": {
51
- "BrowscapPHPTest\\": "tests/"
52
- }
53
- },
54
- "bin": ["bin/browscap-php"]
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/phpcs.xml DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0"?>
2
- <ruleset name="PHP_CodeSniffer">
3
- <description>browscap-php</description>
4
-
5
- <file>src</file>
6
- <file>tests</file>
7
-
8
- <exclude-pattern>*/temp/*</exclude-pattern>
9
-
10
- <arg name="report" value="full" />
11
- <arg value="np" />
12
-
13
- <rule ref="PSR2" />
14
- </ruleset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/phpunit.xml.dist DELETED
@@ -1,30 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
-
3
- <phpunit
4
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
- xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.3/phpunit.xsd"
6
- beStrictAboutOutputDuringTests="true"
7
- beStrictAboutTestsThatDoNotTestAnything="true"
8
- beStrictAboutTodoAnnotatedTests="true"
9
- verbose="true"
10
- colors="auto"
11
- bootstrap="vendor/autoload.php"
12
- >
13
- <php>
14
- <ini name="error_reporting" value="-1"/>
15
- <ini name="memory_limit" value="-1"/>
16
- <ini name="date.timezone" value="UTC"/>
17
- </php>
18
-
19
- <testsuites>
20
- <testsuite name="BrowscapPHP Test Suite">
21
- <directory>tests/</directory>
22
- </testsuite>
23
- </testsuites>
24
-
25
- <filter>
26
- <whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
27
- <directory suffix=".php">src/</directory>
28
- </whitelist>
29
- </filter>
30
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/resources/.gitkeep DELETED
File without changes
includes/vendor/browscap/browscap-php/src/Browscap.php DELETED
@@ -1,251 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 1998-2015 Browser Capabilities Project
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a
6
- * copy of this software and associated documentation files (the "Software"),
7
- * to deal in the Software without restriction, including without limitation
8
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
- * and/or sell copies of the Software, and to permit persons to whom the
10
- * Software is furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included
13
- * in all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- *
23
- * @category Browscap-PHP
24
- * @copyright 1998-2015 Browser Capabilities Project
25
- * @license http://www.opensource.org/licenses/MIT MIT License
26
- * @link https://github.com/browscap/browscap-php/
27
- */
28
-
29
- namespace BrowscapPHP;
30
-
31
- use BrowscapPHP\Cache\BrowscapCache;
32
- use BrowscapPHP\Cache\BrowscapCacheInterface;
33
- use BrowscapPHP\Helper\Quoter;
34
- use BrowscapPHP\Parser\ParserInterface;
35
- use Psr\Log\LoggerInterface;
36
- use Psr\Log\NullLogger;
37
- use WurflCache\Adapter\AdapterInterface;
38
- use WurflCache\Adapter\File;
39
-
40
- /**
41
- * Browscap.ini parsing class with caching and update capabilities
42
- *
43
- * @category Browscap-PHP
44
- * @author Jonathan Stoppani <jonathan@stoppani.name>
45
- * @author Vítor Brandão <noisebleed@noiselabs.org>
46
- * @author Mikołaj Misiurewicz <quentin389+phpb@gmail.com>
47
- * @author Christoph Ziegenberg <christoph@ziegenberg.com>
48
- * @author Thomas Müller <t_mueller_stolzenhain@yahoo.de>
49
- * @copyright Copyright (c) 1998-2015 Browser Capabilities Project
50
- * @version 3.0
51
- * @license http://www.opensource.org/licenses/MIT MIT License
52
- * @link https://github.com/browscap/browscap-php/
53
- */
54
- class Browscap
55
- {
56
- /**
57
- * Parser to use
58
- *
59
- * @var \BrowscapPHP\Parser\ParserInterface
60
- */
61
- private $parser = null;
62
-
63
- /**
64
- * Formatter to use
65
- *
66
- * @var \BrowscapPHP\Formatter\FormatterInterface
67
- */
68
- private $formatter = null;
69
-
70
- /**
71
- * The cache instance
72
- *
73
- * @var \BrowscapPHP\Cache\BrowscapCacheInterface
74
- */
75
- private $cache = null;
76
-
77
- /**
78
- * @var @var \Psr\Log\LoggerInterface
79
- */
80
- private $logger = null;
81
-
82
- /**
83
- * Set theformatter instance to use for the getBrowser() result
84
- *
85
- * @param \BrowscapPHP\Formatter\FormatterInterface $formatter
86
- *
87
- * @return \BrowscapPHP\Browscap
88
- */
89
- public function setFormatter(Formatter\FormatterInterface $formatter)
90
- {
91
- $this->formatter = $formatter;
92
-
93
- return $this;
94
- }
95
-
96
- /**
97
- * @return \BrowscapPHP\Formatter\FormatterInterface
98
- */
99
- public function getFormatter()
100
- {
101
- if (null === $this->formatter) {
102
- $this->setFormatter(new Formatter\PhpGetBrowser());
103
- }
104
-
105
- return $this->formatter;
106
- }
107
-
108
- /**
109
- * Gets a cache instance
110
- *
111
- * @return \BrowscapPHP\Cache\BrowscapCacheInterface
112
- */
113
- public function getCache()
114
- {
115
- if (null === $this->cache) {
116
- $cacheDirectory = __DIR__ . '/../resources/';
117
-
118
- $cacheAdapter = new File(
119
- [File::DIR => $cacheDirectory]
120
- );
121
-
122
- $this->cache = new BrowscapCache($cacheAdapter);
123
- }
124
-
125
- return $this->cache;
126
- }
127
-
128
- /**
129
- * Sets a cache instance
130
- *
131
- * @param \BrowscapPHP\Cache\BrowscapCacheInterface|\WurflCache\Adapter\AdapterInterface $cache
132
- *
133
- * @throws \BrowscapPHP\Exception
134
- * @return \BrowscapPHP\Browscap
135
- */
136
- public function setCache($cache)
137
- {
138
- if ($cache instanceof BrowscapCacheInterface) {
139
- $this->cache = $cache;
140
- } elseif ($cache instanceof AdapterInterface) {
141
- $this->cache = new BrowscapCache($cache);
142
- } else {
143
- throw new Exception(
144
- 'the cache has to be an instance of \BrowscapPHP\Cache\BrowscapCacheInterface or '
145
- . 'an instanceof of \WurflCache\Adapter\AdapterInterface',
146
- Exception::CACHE_INCOMPATIBLE
147
- );
148
- }
149
-
150
- return $this;
151
- }
152
-
153
- /**
154
- * Sets the parser instance to use
155
- *
156
- * @param \BrowscapPHP\Parser\ParserInterface $parser
157
- *
158
- * @return \BrowscapPHP\Browscap
159
- */
160
- public function setParser(ParserInterface $parser)
161
- {
162
- $this->parser = $parser;
163
-
164
- return $this;
165
- }
166
-
167
- /**
168
- * returns an instance of the used parser class
169
- *
170
- * @return \BrowscapPHP\Parser\ParserInterface
171
- */
172
- public function getParser()
173
- {
174
- if (null === $this->parser) {
175
- $cache = $this->getCache();
176
- $logger = $this->getLogger();
177
- $quoter = new Quoter();
178
-
179
- $patternHelper = new Parser\Helper\GetPattern($cache, $logger);
180
- $dataHelper = new Parser\Helper\GetData($cache, $logger, $quoter);
181
-
182
- $this->parser = new Parser\Ini($patternHelper, $dataHelper, $this->getFormatter());
183
- }
184
-
185
- return $this->parser;
186
- }
187
-
188
- /**
189
- * Sets a logger instance
190
- *
191
- * @param \Psr\Log\LoggerInterface $logger
192
- *
193
- * @return \BrowscapPHP\Browscap
194
- */
195
- public function setLogger(LoggerInterface $logger)
196
- {
197
- $this->logger = $logger;
198
-
199
- return $this;
200
- }
201
-
202
- /**
203
- * returns a logger instance
204
- *
205
- * @return \Psr\Log\LoggerInterface
206
- */
207
- public function getLogger()
208
- {
209
- if (null === $this->logger) {
210
- $this->logger = new NullLogger();
211
- }
212
-
213
- return $this->logger;
214
- }
215
-
216
- /**
217
- * parses the given user agent to get the information about the browser
218
- *
219
- * if no user agent is given, it uses {@see \BrowscapPHP\Helper\Support} to get it
220
- *
221
- * @param string $userAgent the user agent string
222
- *
223
- * @throws \BrowscapPHP\Exception
224
- * @return \stdClass the object containing the browsers details. Array if
225
- * $return_array is set to true.
226
- */
227
- public function getBrowser($userAgent = null)
228
- {
229
- if (null === $this->getCache()->getVersion()) {
230
- // there is no active/warm cache available
231
- throw new Exception('there is no active cache available, please run the update command');
232
- }
233
-
234
- // Automatically detect the useragent
235
- if (!isset($userAgent)) {
236
- $support = new Helper\Support($_SERVER);
237
- $userAgent = $support->getUserAgent();
238
- }
239
-
240
- // try to get browser data
241
- $formatter = $this->getParser()->getBrowser($userAgent);
242
-
243
- // if return is still NULL, updates are disabled... in this
244
- // case we return an empty formatter instance
245
- if ($formatter === null) {
246
- return $this->getFormatter()->getData();
247
- }
248
-
249
- return $formatter->getData();
250
- }
251
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/vendor/browscap/browscap-php/src/BrowscapUpdater.php DELETED
@@ -1,431 +0,0 @@
1
- <?php
2
- /**
3
- * Copyright (c) 1998-2015 Browser Capabilities Project
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a
6
- * copy of this software and associated documentation files (the "Software"),
7
- * to deal in the Software without restriction, including without limitation
8
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
- * and/or sell copies of the Software, and to permit persons to whom the
10
- * Software is furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included
13
- * in all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- *
23
- * @category Browscap-PHP
24
- * @copyright 1998-2015 Browser Capabilities Project
25
- * @license http://www.opensource.org/licenses/MIT MIT License
26
- * @link https://github.com/browscap/browscap-php/
27
- */
28
-
29
- namespace BrowscapPHP;
30
-
31
- use BrowscapPHP\Cache\BrowscapCache;
32
- use BrowscapPHP\Cache\BrowscapCacheInterface;
33
- use BrowscapPHP\Exception\FetcherException;
34
- use BrowscapPHP\Helper\Converter;
35
- use BrowscapPHP\Helper\Filesystem;
36
- use BrowscapPHP\Helper\IniLoader;
37
- use GuzzleHttp\Client;
38
- use Psr\Log\LoggerInterface;
39
- use Psr\Log\NullLogger;
40
- use WurflCache\Adapter\AdapterInterface;
41
- use WurflCache\Adapter\File;
42
-
43
- /**
44
- * Browscap.ini parsing class with caching and update capabilities
45
- *
46
- * @category Browscap-PHP
47
- * @author Jonathan Stoppani <jonathan@stoppani.name>
48
- * @author Vítor Brandão <noisebleed@noiselabs.org>
49
- * @author Mikołaj Misiurewicz <quentin389+phpb@gmail.com>
50
- * @author Christoph Ziegenberg <christoph@ziegenberg.com>
51
- * @author Thomas Müller <t_mueller_stolzenhain@yahoo.de>
52
- * @copyright Copyright (c) 1998-2015 Browser Capabilities Project
53
- * @version 3.0
54
- * @license http://www.opensource.org/licenses/MIT MIT License
55
- * @link https://github.com/browscap/browscap-php/
56
- */
57
- class BrowscapUpdater
58
- {
59
- /**
60
- * The cache instance
61
- *
62
- * @var \BrowscapPHP\Cache\BrowscapCacheInterface
63
- */
64
- private $cache = null;
65
-
66
- /**
67
- * @var @var \Psr\Log\LoggerInterface
68
- */
69
- private $logger = null;
70
-
71
- /**
72
- * @var \GuzzleHttp\Client
73
- */
74
- private $client = null;
75
-
76
- /**
77
- * Curl connect timeout in seconds
78
- *
79
- * @var int
80
- */
81
- private $connectTimeout = 5;
82
-
83
- /**
84
- * Gets a cache instance
85
- *
86
- * @return \BrowscapPHP\Cache\BrowscapCacheInterface
87
- */
88
- public function getCache()
89
- {
90
- if (null === $this->cache) {
91
- $cacheDirectory = __DIR__ . '/../resources/';
92
-
93
- $cacheAdapter = new File(
94
- [File::DIR => $cacheDirectory]
95
- );
96
-
97
- $this->cache = new BrowscapCache($cacheAdapter);
98
- }
99
-
100
- return $this->cache;
101
- }
102
-
103
- /**
104
- * Sets a cache instance
105
- *
106
- * @param \BrowscapPHP\Cache\BrowscapCacheInterface|\WurflCache\Adapter\AdapterInterface $cache
107
- *
108
- * @throws \BrowscapPHP\Exception
109
- *
110
- * @return self
111
- */
112
- public function setCache($cache)
113
- {
114
- if ($cache instanceof BrowscapCacheInterface) {
115
- $this->cache = $cache;
116
- } elseif ($cache instanceof AdapterInterface) {
117
- $this->cache = new BrowscapCache($cache);
118
- } else {
119
- throw new Exception(
120
- 'the cache has to be an instance of \BrowscapPHP\Cache\BrowscapCacheInterface or '
121
- . 'an instanceof of \WurflCache\Adapter\AdapterInterface',
122
- Exception::CACHE_INCOMPATIBLE
123
- );
124
- }
125
-
126
- return $this;
127
- }
128
-
129
- /**
130
- * Sets a logger instance
131
- *
132
- * @param \Psr\Log\LoggerInterface $logger
133
- *
134
- * @return self
135
- */
136
- public function setLogger(LoggerInterface $logger)
137
- {
138
- $this->logger = $logger;
139
-
140
- return $this;
141
- }
142
-
143
- /**
144
- * returns a logger instance
145
- *
146
- * @return \Psr\Log\LoggerInterface
147
- */
148
- public function getLogger()
149
- {
150
- if (null === $this->logger) {
151
- $this->logger = new NullLogger();
152
- }
153
-
154
- return $this->logger;
155
- }
156
-
157
- /**
158
- * Sets the Connection Timeout
159
- *
160
- * @param int $connectTimeout
161
- */
162
- public function setConnectTimeout($connectTimeout)
163
- {
164
- $this->connectTimeout = (int) $connectTimeout;
165
- }
166
-
167
- /**
168
- * @return \GuzzleHttp\Client
169
- */
170
- public function getClient()
171
- {
172
- if (null === $this->client) {
173
- $this->client = new Client();
174
- }
175
-
176
- return $this->client;
177
- }
178
-
179
- /**
180
- * @param \GuzzleHttp\Client $client
181
- */
182
- public function setClient(Client $client)
183
- {
184
- $this->client = $client;
185
- }
186
-
187
- /**
188
- * reads and parses an ini file and writes the results into the cache
189
- *
190
- * @param string $iniFile
191
- *
192
- * @throws \BrowscapPHP\Exception
193
- */
194
- public function convertFile($iniFile)
195
- {
196
- if (empty($iniFile)) {
197
- throw new Exception('the file name can not be empty');
198
- }
199
-
200
- if (!is_readable($iniFile)) {
201
- throw new Exception('it was not possible to read the local file ' . $iniFile);
202
- }
203
-
204
- try {
205
- $iniString = file_get_contents($iniFile);
206
- } catch (Helper\Exception $e) {
207
- throw new Exception('an error occured while converting the local file into the cache', 0, $e);
208
- }
209
-
210
- $this->convertString($iniString);
211
- }
212
-
213
- /**
214
- * reads and parses an ini string and writes the results into the cache
215
- *
216
- * @param string $iniString
217
- */
218
- public function convertString($iniString)
219
- {
220
- $cachedVersion = $this->getCache()->getItem('browscap.version', false, $success);
221
- $converter = new Converter($this->getLogger(), $this->getCache());
222
-
223
- $this->storeContent($converter, $iniString, $cachedVersion);
224
- }
225
-
226
- /**
227
- * fetches a remote file and stores it into a local folder
228
- *
229
- * @param string $file The name of the file where to store the remote content
230
- * @param string $remoteFile The code for the remote file to load
231
- *
232
- * @throws \BrowscapPHP\Exception\FetcherException
233
- * @throws \BrowscapPHP\Helper\Exception
234
- */
235
- public function fetch($file, $remoteFile = IniLoader::PHP_INI)
236
- {
237
- if (null === ($cachedVersion = $this->checkUpdate())) {
238
- // no newer version available
239
- return;
240
- }
241
-
242
- $this->getLogger()->debug('started fetching remote file');
243
-
244
- $uri = (new IniLoader())->setRemoteFilename($remoteFile)->getRemoteIniUrl();
245
-
246
- /** @var \Psr\Http\Message\ResponseInterface $response */
247
- $response = $this->getClient()->get($uri, ['connect_timeout' => $this->connectTimeout]);
248
-
249
- if ($response->getStatusCode() !== 200) {
250
- throw new FetcherException(
251
- 'an error occured while fetching remote data from URI ' . $uri . ': StatusCode was '
252
- . $response->getStatusCode()
253
- );
254
- }
255
-
256
- try {
257
- $content = $response->getBody()->getContents();
258
- } catch (\Exception $e) {
259
- throw new FetcherException('an error occured while fetching remote data', 0, $e);
260
- }
261
-
262
- if (empty($content)) {
263
- $error = error_get_last();
264
- throw FetcherException::httpError($uri, $error['message']);
265
- }
266
-
267
- $this->getLogger()->debug('finished fetching remote file');
268
- $this->getLogger()->debug('started storing remote file into local file');
269
-
270
- $content = $this->sanitizeContent($content);
271
-
272
- $converter = new Converter($this->getLogger(), $this->getCache());
273
- $iniVersion = $converter->getIniVersion($content);
274
-
275
- if ($iniVersion > $cachedVersion) {
276
- $fs = new Filesystem();
277
- $fs->dumpFile($file, $content);
278
- }
279
-
280
- $this->getLogger()->debug('finished storing remote file into local file');
281
- }
282
-
283
- /**
284
- * fetches a remote file, parses it and writes the result into the cache
285
- *
286
- * if the local stored information are in the same version as the remote data no actions are
287
- * taken
288
- *
289
- * @param string $remoteFile The code for the remote file to load
290
- *
291
- * @throws \BrowscapPHP\Exception\FileNotFoundException
292
- * @throws \BrowscapPHP\Helper\Exception
293
- * @throws \BrowscapPHP\Exception\FetcherException
294
- */
295
- public function update($remoteFile = IniLoader::PHP_INI)
296
- {
297
- $this->getLogger()->debug('started fetching remote file');
298
-
299
- if (null === ($cachedVersion = $this->checkUpdate())) {
300
- // no newer version available
301
- return;
302
- }
303
-
304
- $uri = (new IniLoader())->setRemoteFilename($remoteFile)->getRemoteIniUrl();
305
-
306
- /** @var \Psr\Http\Message\ResponseInterface $response */
307
- $response = $this->getClient()->get($uri, ['connect_timeout' => $this->connectTimeout]);
308
-
309
- if ($response->getStatusCode() !== 200) {
310
- throw new FetcherException(
311
- 'an error occured while fetching remote data from URI ' . $uri . ': StatusCode was '
312
- . $response->getStatusCode()
313
- );
314
- }
315
-
316
- try {
317
- $content = $response->getBody()->getContents();
318
- } catch (\Exception $e) {
319
- throw new FetcherException('an error occured while fetching remote data', 0, $e);
320
- }
321
-
322
- if (empty($content)) {
323
- $error = error_get_last();
324
-
325
- throw FetcherException::httpError($uri, $error['message']);
326
- }
327
-
328
- $this->getLogger()->debug('finished fetching remote file');
329
-
330
- $converter = new Converter($this->getLogger(), $this->getCache());
331
-
332
- $this->storeContent($converter, $content, $cachedVersion);
333
- }
334
-
335
- /**
336
- * checks if an update on a remote location for the local file or the cache
337
- *
338
- * @throws \BrowscapPHP\Helper\Exception
339
- * @throws \BrowscapPHP\Exception\FetcherException
340
- * @return int|null The actual cached version if a newer version is available, null otherwise
341
- * @return int|null The actual cached version if a newer version is available, null otherwise
342
- */
343
- public function checkUpdate()
344
- {
345
- $success = null;
346
- $cachedVersion = $this->getCache()->getItem('browscap.version', false, $success);
347
-
348
- if (!$cachedVersion) {
349
- // could not load version from cache
350
- $this->getLogger()->info('there is no cached version available, please update from remote');
351
-
352
- return 0;
353
- }
354
-
355
- $uri = (new IniLoader())->getRemoteVersionUrl();
356
-
357
- /** @var \Psr\Http\Message\ResponseInterface $response */
358
- $response = $this->getClient()->get($uri, ['connect_timeout' => $this->connectTimeout]);
359
-
360
- if ($response->getStatusCode() !== 200) {
361
- throw new FetcherException(
362
- 'an error occured while fetching version data from URI ' . $uri . ': StatusCode was '
363
- . $response->getStatusCode()
364
- );
365
- }
366
-
367
- try {
368
- $remoteVersion = $response->getBody()->getContents();
369
- } catch (\Exception $e) {
370
- throw new FetcherException(
371
- 'an error occured while fetching version data from URI ' . $uri . ': StatusCode was '
372
- . $response->getStatusCode(),
373
- 0,
374
- $e
375
- );
376
- }
377
-
378
- if (!$remoteVersion) {
379
- // could not load remote version
380
- $this->getLogger()->info('could not load version from remote location');
381
-
382
- return 0;
383
- }
384
-
385
- if ($cachedVersion && $remoteVersion && $remoteVersion <= $cachedVersion) {
386
- // no newer version available
387
- $this->getLogger()->info('there is no newer version available');
388
-
389
- return null;
390
- }
391
-
392
- $this->getLogger()->info(
393
- 'a newer version is available, local version: ' . $cachedVersion . ', remote version: ' . $remoteVersion
394
- );
395
-
396
- return (int) $cachedVersion;
397
- }
398
-
399
- /**
400
- * @param string $content
401
- *
402
- * @return mixed
403
- */
404
- private function sanitizeContent($content)
405
- {
406
- // replace everything between opening and closing php and asp tags
407
- $content = preg_replace('/<[?%].*[?%]>/', '', $content);
408
-
409
- // replace opening and closing php and asp tags
410
- return str_replace(['<?', '<%', '?>', '%>'], '', $content);
411
- }
412
-
413
- /**
414
-