From ff42b388cbe9ef62debd63246a14528eb65536f0 Mon Sep 17 00:00:00 2001 From: agoujot Date: Fri, 27 Jun 2025 09:25:31 +0200 Subject: [PATCH 01/60] + prp quality changes pie chart in ec generalstats --- assets/css/editcounter.scss | 4 +++ assets/js/editcounter.js | 2 +- i18n/en.json | 6 ++++ i18n/qqq.json | 6 ++++ .../{app.da10c09b.css => app.6bb9be5d.css} | 2 +- public/build/app.898cd840.js | 2 ++ ...ICENSE.txt => app.898cd840.js.LICENSE.txt} | 0 public/build/app.a7d89f5a.js | 2 -- public/build/entrypoints.json | 4 +-- public/build/manifest.json | 4 +-- src/Model/EditCounter.php | 33 +++++++++++++++++++ src/Model/Project.php | 10 ++++++ src/Repository/EditCounterRepository.php | 32 ++++++++++++++---- templates/editCounter/general_stats.html.twig | 25 +++++++++++++- templates/macros/pieChart.html.twig | 4 +-- 15 files changed, 118 insertions(+), 18 deletions(-) rename public/build/{app.da10c09b.css => app.6bb9be5d.css} (76%) create mode 100644 public/build/app.898cd840.js rename public/build/{app.a7d89f5a.js.LICENSE.txt => app.898cd840.js.LICENSE.txt} (100%) delete mode 100644 public/build/app.a7d89f5a.js diff --git a/assets/css/editcounter.scss b/assets/css/editcounter.scss index 6ff435d3f..5fac49b8f 100644 --- a/assets/css/editcounter.scss +++ b/assets/css/editcounter.scss @@ -30,6 +30,10 @@ height: auto; width: auto; } + + div.chart-wrapper.qualitychangechart { + float:none; + } .top-project-edit-counts td { white-space: nowrap; diff --git a/assets/js/editcounter.js b/assets/js/editcounter.js index cdd848fc4..9c6d1fc30 100644 --- a/assets/js/editcounter.js +++ b/assets/js/editcounter.js @@ -316,7 +316,7 @@ xtools.editcounter.setupMonthYearChart = function (id, datasets, labels, maxTota xtools.editcounter.setupSizeHistogram = function (data, colors, barLabels) { let bars = 11; // First sanitize input, to get array. - let total = Object.keys(data).length - 3; // -3 to exclude small edits, large edits and average + let total = Object.keys(data).length; data.length = total; data = Array.from(data) // Then make datasets diff --git a/i18n/en.json b/i18n/en.json index eca7cd4d7..fa9e6804c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -345,6 +345,12 @@ "priority": "Priority", "project": "Project", "projects": "Projects", + "proofreadpage-qualitychanges": "Proportions of ProofreadPage quality changes", + "proofreadpage-quality0": "Without text", + "proofreadpage-quality1": "Not proofread", + "proofreadpage-quality2": "Problematic", + "proofreadpage-quality3": "Proofread", + "proofreadpage-quality4": "Validated", "prose": "Prose", "protect": "Protect", "proxy-check": "Proxy check", diff --git a/i18n/qqq.json b/i18n/qqq.json index d78373d1d..0640a58d4 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -364,6 +364,12 @@ "priority": "Label for the priority of a 'bug' in a wiki page that needs fixing.\n{{Identical|Priority}}", "project": "Header for the part of the interface that lets the user select which project they want to view statistics for.\n{{Identical|Project}}", "projects": "Label for a number of projects.\n{{Identical|Projects}}", + "proofreadpage-qualitychanges": "Label for a chart of the proportions of the different quality changes.", + "proofreadpage-quality0": "Label for the ProofreadPage category 0.\n{{Identical|MediaWiki:Proofreadpage quality0 category}}", + "proofreadpage-quality1": "Label for the ProofreadPage category 1.\n{{Identical|MediaWiki:Proofreadpage quality1 category}}", + "proofreadpage-quality2": "Label for the ProofreadPage category 2.\n{{Identical|MediaWiki:Proofreadpage quality2 category}}", + "proofreadpage-quality3": "Label for the ProofreadPage category 3.\n{{Identical|MediaWiki:Proofreadpage quality3 category}}", + "proofreadpage-quality4": "Label for the ProofreadPage category 4.\n{{Identical|MediaWiki:Proofreadpage quality4 category}}", "prose": "Term used to describe the text content of an article.", "protect": "Name of the MediaWiki log action 'protect', as in page protection.\n{{Identical|Protect}}", "proxy-check": "Label for link to the Proxy Check tool on Toolforge. The tool can tell you if the given IP address is a proxy or not.", diff --git a/public/build/app.da10c09b.css b/public/build/app.6bb9be5d.css similarity index 76% rename from public/build/app.da10c09b.css rename to public/build/app.6bb9be5d.css index d09ac6343..0ca8f85c4 100644 --- a/public/build/app.da10c09b.css +++ b/public/build/app.6bb9be5d.css @@ -1 +1 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file +@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/app.898cd840.js b/public/build/app.898cd840.js new file mode 100644 index 000000000..b4e577af2 --- /dev/null +++ b/public/build/app.898cd840.js @@ -0,0 +1,2 @@ +/*! For license information please see app.898cd840.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})})}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.a7d89f5a.js.LICENSE.txt b/public/build/app.898cd840.js.LICENSE.txt similarity index 100% rename from public/build/app.a7d89f5a.js.LICENSE.txt rename to public/build/app.898cd840.js.LICENSE.txt diff --git a/public/build/app.a7d89f5a.js b/public/build/app.a7d89f5a.js deleted file mode 100644 index 803b5b965..000000000 --- a/public/build/app.a7d89f5a.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.a7d89f5a.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})})}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 8877468e1..b0241656e 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -4,10 +4,10 @@ "js": [ "/build/runtime.c217f8c4.js", "/build/95.7a87ed1a.js", - "/build/app.a7d89f5a.js" + "/build/app.898cd840.js" ], "css": [ - "/build/app.da10c09b.css" + "/build/app.6bb9be5d.css" ] } } diff --git a/public/build/manifest.json b/public/build/manifest.json index 827a70b89..7f105d509 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,6 +1,6 @@ { - "build/app.css": "/build/app.da10c09b.css", - "build/app.js": "/build/app.a7d89f5a.js", + "build/app.css": "/build/app.6bb9be5d.css", + "build/app.js": "/build/app.898cd840.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", "build/images/VPS-badge.svg": "/build/images/VPS-badge.svg", diff --git a/src/Model/EditCounter.php b/src/Model/EditCounter.php index 099ad4698..8a9e2f126 100644 --- a/src/Model/EditCounter.php +++ b/src/Model/EditCounter.php @@ -1056,6 +1056,39 @@ public function countLargeEdits(): int return isset($editSizeData['large_edits']) ? (int) $editSizeData['large_edits'] : 0; } + /** + * Get the ProofreadPage tagged quality changes in the last 5000 edits. + * @return int[] With keys 0, 1, 2, 3, 4, and 'total'. + */ + public function countQualityChanges(): array + { + $tagLists = $this->getEditSizeData()['tag_lists']; + $res = [ + 0 => 0, + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 'total' => 0, + ]; + foreach ($tagLists as $list) { + if (null !== $list) { + $found = false; + foreach ($list as $tag) { + if (preg_match('/^proofreadpage\-quality[0-4]$/', $tag)) { + $res[intval(substr($tag, -1))] += 1; + $found = true; + break; + } + } + if ($found) { + $res['total'] += 1; + } + } + } + return $res; + } + /** * Get the average size of the user's past 5000 edits. * @return float Size in bytes. diff --git a/src/Model/Project.php b/src/Model/Project.php index 6fe86081e..28861bee9 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -273,6 +273,16 @@ public function hasPageTriage() : bool return in_array('PageTriage', $extensions); } + /** + * Get if this Wiki has the ProofreadPage extension. + * @return bool + */ + public function hasProofreadPage(): bool + { + $extensions = $this->getInstalledExtensions(); + return in_array('ProofreadPage', $extensions); + } + /** * Whether the project has temporary accounts enabled. * @return bool diff --git a/src/Repository/EditCounterRepository.php b/src/Repository/EditCounterRepository.php index b339cfd3b..b7886ea4c 100644 --- a/src/Repository/EditCounterRepository.php +++ b/src/Repository/EditCounterRepository.php @@ -558,7 +558,8 @@ public function getTimeCard(Project $project, User $user): array * Will cache the result for 10 minutes. * @param Project $project The project. * @param User $user The user. - * @return string[] With keys 'average_size', 'small_edits' and 'large_edits' + * @return string[] With keys 'sizes, 'average_size', + * 'small_edits', 'large_edits', and 'tag_lists' */ public function getEditSizeData(Project $project, User $user): array { @@ -571,6 +572,8 @@ public function getEditSizeData(Project $project, User $user): array // Prepare the queries and execute them. $revisionTable = $project->getTableName('revision'); $pageTable = $project->getTableName('page'); + $ctTable = $project->getTableName('change_tag'); + $ctdTable = $project->getTableName('change_tag_def'); $ipcJoin = ''; $whereClause = 'revs.rev_actor = :actorId'; $params = ['actorId' => $user->getActorId($project)]; @@ -582,20 +585,35 @@ public function getEditSizeData(Project $project, User $user): array $whereClause = 'ipc_hex BETWEEN :startIp AND :endIp'; } - $sql = "SELECT (CAST(revs.rev_len AS SIGNED) - IFNULL(parentrevs.rev_len, 0)) AS size + $sql = "SELECT JSON_ARRAYAGG(data.size) as sizes, + JSON_ARRAYAGG(data.tags) as tag_lists + FROM ( + SELECT CAST(revs.rev_len AS SIGNED) - IFNULL(parentrevs.rev_len, 0) AS size, + ( + SELECT JSON_ARRAYAGG(ctd_name) + FROM $ctTable + JOIN $ctdTable + ON ct_tag_id = ctd_id + WHERE ct_rev_id = revs.rev_id + ) as tags FROM $revisionTable AS revs JOIN $pageTable ON revs.rev_page = page_id $ipcJoin LEFT JOIN $revisionTable AS parentrevs ON (revs.rev_parent_id = parentrevs.rev_id) WHERE $whereClause ORDER BY revs.rev_timestamp DESC - LIMIT 5000"; - $results = $this->executeProjectsQuery($project, $sql, $params)->fetchFirstColumn(); - $results['average_size'] = count($results) > 0 ? array_sum($results)/count($results) : 0; + LIMIT 5000 + ) data"; + $results = $this->executeProjectsQuery($project, $sql, $params)->fetchAssociative(); + $results['tag_lists'] = json_decode($results['tag_lists']); + $results['sizes'] = json_decode($results['sizes']); + $results['average_size'] = count($results['sizes']) > 0 + ? array_sum($results['sizes'])/count($results['sizes']) + : 0; $isSmall = fn($n) => abs(intval($n)) < 20; $isLarge = fn($n) => abs(intval($n)) > 1000; - $results['small_edits'] = count(array_filter($results, $isSmall)); - $results['large_edits'] = count(array_filter($results, $isLarge)); + $results['small_edits'] = count(array_filter($results['sizes'], $isSmall)); + $results['large_edits'] = count(array_filter($results['sizes'], $isLarge)); // Cache and return. return $this->setCache($cacheKey, $results); diff --git a/templates/editCounter/general_stats.html.twig b/templates/editCounter/general_stats.html.twig index 29bf41da3..fd31a0243 100644 --- a/templates/editCounter/general_stats.html.twig +++ b/templates/editCounter/general_stats.html.twig @@ -498,6 +498,7 @@ {% if ec.countLiveRevisions %}
    + {### Deleted edits ###} {% if not(user.isIpRange) %} {{ chart.pie_chart('deleted_edits', @@ -514,6 +515,7 @@ ) }} {% endif %} + {### Edit size histogram ###}
    {{ msg('num-edits-size-interval') }}*
    @@ -522,12 +524,33 @@ + {### ProofreadPage quality changes ###} + {% if project.hasProofreadPage %} + {% set qualityChanges = ec.countQualityChanges %} + {% if qualityChanges.total > 1 %} +
    + {{ msg('proofreadpage-qualitychanges') }}* + {{ + chart.pie_chart('prp_qualitychanges', + [0, 1, 2, 3, 4]|map((i) => { + label: msg('proofreadpage-quality' ~ i), + value: qualityChanges[i], + percentage: ((qualityChanges[i] / qualityChanges.total) * 100), + color: color([11, 0, 4, 2, 1][i]) + }), + true, + 'qualitychangechart' + ) + }} +
    + {% endif %} + {% endif %}
    * {{ msg('data-limit', [5000, 5000|num_format]) }}
    diff --git a/templates/macros/pieChart.html.twig b/templates/macros/pieChart.html.twig index 727ab2601..ad9298072 100644 --- a/templates/macros/pieChart.html.twig +++ b/templates/macros/pieChart.html.twig @@ -9,10 +9,10 @@ {% for entry in data %} {% set labels = labels | merge([entry.label]) %} {% set values = values | merge([entry.value]) %} - {% set colors = colors | merge([chartColor(loop.index0)]) %} + {% set colors = colors | merge([entry.color ?? chartColor(loop.index0)]) %} {% if legend %}
    - + {{ entry.label }} · From 5fbe22d960f0fdbeba73e28b2990bf047a71adeb Mon Sep 17 00:00:00 2001 From: agoujot Date: Mon, 14 Jul 2025 21:03:25 +0200 Subject: [PATCH 02/60] compile --- public/build/app.0e7e0420.js | 2 + ...ICENSE.txt => app.0e7e0420.js.LICENSE.txt} | 0 public/build/app.5f60f318.js | 2 - public/build/app.898cd840.js | 2 - public/build/app.898cd840.js.LICENSE.txt | 67 ------------------- public/build/entrypoints.json | 2 +- public/build/manifest.json | 2 +- 7 files changed, 4 insertions(+), 73 deletions(-) create mode 100644 public/build/app.0e7e0420.js rename public/build/{app.5f60f318.js.LICENSE.txt => app.0e7e0420.js.LICENSE.txt} (100%) delete mode 100644 public/build/app.5f60f318.js delete mode 100644 public/build/app.898cd840.js delete mode 100644 public/build/app.898cd840.js.LICENSE.txt diff --git a/public/build/app.0e7e0420.js b/public/build/app.0e7e0420.js new file mode 100644 index 000000000..1eacf1e74 --- /dev/null +++ b/public/build/app.0e7e0420.js @@ -0,0 +1,2 @@ +/*! For license information please see app.0e7e0420.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.5f60f318.js.LICENSE.txt b/public/build/app.0e7e0420.js.LICENSE.txt similarity index 100% rename from public/build/app.5f60f318.js.LICENSE.txt rename to public/build/app.0e7e0420.js.LICENSE.txt diff --git a/public/build/app.5f60f318.js b/public/build/app.5f60f318.js deleted file mode 100644 index 68d75b717..000000000 --- a/public/build/app.5f60f318.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.5f60f318.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.898cd840.js b/public/build/app.898cd840.js deleted file mode 100644 index b4e577af2..000000000 --- a/public/build/app.898cd840.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.898cd840.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})})}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.898cd840.js.LICENSE.txt b/public/build/app.898cd840.js.LICENSE.txt deleted file mode 100644 index f8a2a02bd..000000000 --- a/public/build/app.898cd840.js.LICENSE.txt +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Chart.js - * http://chartjs.org/ - * Version: 2.7.0 - * - * Copyright 2017 Nick Downie - * Released under the MIT license - * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - Message Store - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index b0241656e..51e352bfa 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -4,7 +4,7 @@ "js": [ "/build/runtime.c217f8c4.js", "/build/95.7a87ed1a.js", - "/build/app.898cd840.js" + "/build/app.0e7e0420.js" ], "css": [ "/build/app.6bb9be5d.css" diff --git a/public/build/manifest.json b/public/build/manifest.json index 7f105d509..01c1c8716 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,6 +1,6 @@ { "build/app.css": "/build/app.6bb9be5d.css", - "build/app.js": "/build/app.898cd840.js", + "build/app.js": "/build/app.0e7e0420.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", "build/images/VPS-badge.svg": "/build/images/VPS-badge.svg", From 6e737bcd9c7ff256ee83f37a824b8db67f0de28f Mon Sep 17 00:00:00 2001 From: agoujot Date: Fri, 18 Jul 2025 00:18:57 +0200 Subject: [PATCH 03/60] compile --- public/build/app.0e7e0420.js | 2 - public/build/app.27cd0c82.js | 2 - public/build/app.27cd0c82.js.LICENSE.txt | 67 ------------------- public/build/app.4520e7a1.js | 2 + ...ICENSE.txt => app.4520e7a1.js.LICENSE.txt} | 0 public/build/entrypoints.json | 2 +- public/build/manifest.json | 2 +- 7 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 public/build/app.0e7e0420.js delete mode 100644 public/build/app.27cd0c82.js delete mode 100644 public/build/app.27cd0c82.js.LICENSE.txt create mode 100644 public/build/app.4520e7a1.js rename public/build/{app.0e7e0420.js.LICENSE.txt => app.4520e7a1.js.LICENSE.txt} (100%) diff --git a/public/build/app.0e7e0420.js b/public/build/app.0e7e0420.js deleted file mode 100644 index 1eacf1e74..000000000 --- a/public/build/app.0e7e0420.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.0e7e0420.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.27cd0c82.js b/public/build/app.27cd0c82.js deleted file mode 100644 index b5233c0ba..000000000 --- a/public/build/app.27cd0c82.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.27cd0c82.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.27cd0c82.js.LICENSE.txt b/public/build/app.27cd0c82.js.LICENSE.txt deleted file mode 100644 index f8a2a02bd..000000000 --- a/public/build/app.27cd0c82.js.LICENSE.txt +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Chart.js - * http://chartjs.org/ - * Version: 2.7.0 - * - * Copyright 2017 Nick Downie - * Released under the MIT license - * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - Message Store - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ diff --git a/public/build/app.4520e7a1.js b/public/build/app.4520e7a1.js new file mode 100644 index 000000000..ddea35270 --- /dev/null +++ b/public/build/app.4520e7a1.js @@ -0,0 +1,2 @@ +/*! For license information please see app.4520e7a1.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.0e7e0420.js.LICENSE.txt b/public/build/app.4520e7a1.js.LICENSE.txt similarity index 100% rename from public/build/app.0e7e0420.js.LICENSE.txt rename to public/build/app.4520e7a1.js.LICENSE.txt diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 51e352bfa..8a3b0877e 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -4,7 +4,7 @@ "js": [ "/build/runtime.c217f8c4.js", "/build/95.7a87ed1a.js", - "/build/app.0e7e0420.js" + "/build/app.4520e7a1.js" ], "css": [ "/build/app.6bb9be5d.css" diff --git a/public/build/manifest.json b/public/build/manifest.json index 01c1c8716..5eb1f2412 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,6 +1,6 @@ { "build/app.css": "/build/app.6bb9be5d.css", - "build/app.js": "/build/app.0e7e0420.js", + "build/app.js": "/build/app.4520e7a1.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", "build/images/VPS-badge.svg": "/build/images/VPS-badge.svg", From fc4cd544bdd7c6a20ce9f1b2c0e097865cbff38b Mon Sep 17 00:00:00 2001 From: agoujot Date: Mon, 21 Jul 2025 11:46:43 +0200 Subject: [PATCH 04/60] compile --- public/build/app.4520e7a1.js | 2 - public/build/app.65582b0e.js | 2 - public/build/app.65582b0e.js.LICENSE.txt | 67 ------------------- public/build/app.f4fc5d0a.js | 2 + ...ICENSE.txt => app.f4fc5d0a.js.LICENSE.txt} | 0 public/build/entrypoints.json | 2 +- public/build/manifest.json | 2 +- 7 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 public/build/app.4520e7a1.js delete mode 100644 public/build/app.65582b0e.js delete mode 100644 public/build/app.65582b0e.js.LICENSE.txt create mode 100644 public/build/app.f4fc5d0a.js rename public/build/{app.4520e7a1.js.LICENSE.txt => app.f4fc5d0a.js.LICENSE.txt} (100%) diff --git a/public/build/app.4520e7a1.js b/public/build/app.4520e7a1.js deleted file mode 100644 index ddea35270..000000000 --- a/public/build/app.4520e7a1.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.4520e7a1.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.score(),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e),$(".contributions--prev-text").text($.i18n("pager-newer-n",e).capitalize()),$(".contributions--next-text").text($.i18n("pager-older-n",e).capitalize())}))}},9143:(t,e,n)=>{n(7136),n(173),n(17),n(5086),n(9693),n(5852),n(4913),String.prototype.descore=function(){return this.replace(/_/g," ")},String.prototype.score=function(){return this.replace(/ /g,"_")},String.prototype.escape=function(){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,(function(e){return t[e]}))},Array.prototype.unique=function(){return this.filter((function(t,e,n){return n.indexOf(t)===e}))},Object.defineProperty(String.prototype,"capitalize",{value:function(){return this.charAt(0).toUpperCase()+this.slice(1)},enumerable:!1})},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(9143),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.65582b0e.js b/public/build/app.65582b0e.js deleted file mode 100644 index 797ea7883..000000000 --- a/public/build/app.65582b0e.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.65582b0e.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),n(4913),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e);var n=function(t){return t[0].toUpperCase()+t.slice(1)};$(".contributions--prev-text").text(n($.i18n("pager-newer-n",e))),$(".contributions--next-text").text(n($.i18n("pager-older-n",e)))}))}},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.65582b0e.js.LICENSE.txt b/public/build/app.65582b0e.js.LICENSE.txt deleted file mode 100644 index f8a2a02bd..000000000 --- a/public/build/app.65582b0e.js.LICENSE.txt +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Chart.js - * http://chartjs.org/ - * Version: 2.7.0 - * - * Copyright 2017 Nick Downie - * Released under the MIT license - * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - Message Store - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ diff --git a/public/build/app.f4fc5d0a.js b/public/build/app.f4fc5d0a.js new file mode 100644 index 000000000..63524e92c --- /dev/null +++ b/public/build/app.f4fc5d0a.js @@ -0,0 +1,2 @@ +/*! For license information please see app.f4fc5d0a.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),n(4913),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e);var n=function(t){return t[0].toUpperCase()+t.slice(1)};$(".contributions--prev-text").text(n($.i18n("pager-newer-n",e))),$(".contributions--next-text").text(n($.i18n("pager-older-n",e)))}))}},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.4520e7a1.js.LICENSE.txt b/public/build/app.f4fc5d0a.js.LICENSE.txt similarity index 100% rename from public/build/app.4520e7a1.js.LICENSE.txt rename to public/build/app.f4fc5d0a.js.LICENSE.txt diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 8a3b0877e..4a256c0d3 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -4,7 +4,7 @@ "js": [ "/build/runtime.c217f8c4.js", "/build/95.7a87ed1a.js", - "/build/app.4520e7a1.js" + "/build/app.f4fc5d0a.js" ], "css": [ "/build/app.6bb9be5d.css" diff --git a/public/build/manifest.json b/public/build/manifest.json index 5eb1f2412..b4da5f3e2 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,6 +1,6 @@ { "build/app.css": "/build/app.6bb9be5d.css", - "build/app.js": "/build/app.4520e7a1.js", + "build/app.js": "/build/app.f4fc5d0a.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", "build/images/VPS-badge.svg": "/build/images/VPS-badge.svg", From c434248f324b7105c6ae86237b31587e11a1cb01 Mon Sep 17 00:00:00 2001 From: agoujot Date: Wed, 6 Aug 2025 15:04:49 +0200 Subject: [PATCH 05/60] compile --- public/build/app.6bb9be5d.css | 1 - public/build/{app.b59bcd25.css => app.ce4f7eb0.css} | 2 +- public/build/entrypoints.json | 2 +- public/build/manifest.json | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 public/build/app.6bb9be5d.css rename public/build/{app.b59bcd25.css => app.ce4f7eb0.css} (76%) diff --git a/public/build/app.6bb9be5d.css b/public/build/app.6bb9be5d.css deleted file mode 100644 index 0ca8f85c4..000000000 --- a/public/build/app.6bb9be5d.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/app.b59bcd25.css b/public/build/app.ce4f7eb0.css similarity index 76% rename from public/build/app.b59bcd25.css rename to public/build/app.ce4f7eb0.css index 0c507376d..458a1411b 100644 --- a/public/build/app.b59bcd25.css +++ b/public/build/app.ce4f7eb0.css @@ -1 +1 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;vertical-align:top}.side-to-side{clear:both}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file +@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;vertical-align:top}.side-to-side{clear:both}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 4a256c0d3..970d6c1ff 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -7,7 +7,7 @@ "/build/app.f4fc5d0a.js" ], "css": [ - "/build/app.6bb9be5d.css" + "/build/app.ce4f7eb0.css" ] } } diff --git a/public/build/manifest.json b/public/build/manifest.json index b4da5f3e2..039d655b7 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,5 +1,5 @@ { - "build/app.css": "/build/app.6bb9be5d.css", + "build/app.css": "/build/app.ce4f7eb0.css", "build/app.js": "/build/app.f4fc5d0a.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", From 6ee93c75516573f44c653fc6aa0d98c6c771731f Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 00:20:44 +0200 Subject: [PATCH 06/60] add column in pages; take quality changes from the api; (and other things) --- assets/css/_darkmode.scss | 19 +++++++ assets/css/application.scss | 21 ++++++++ i18n/en.json | 6 +-- i18n/qqq.json | 6 +-- .../{app.ce4f7eb0.css => app.9c0698b8.css} | 2 +- public/build/entrypoints.json | 2 +- public/build/manifest.json | 2 +- src/Model/Pages.php | 19 +++++++ src/Model/Project.php | 41 ++++++++++++++++ src/Repository/PagesRepository.php | 47 +++++++++++++++--- src/Repository/ProjectRepository.php | 49 +++++++++++++++++-- templates/editCounter/general_stats.html.twig | 3 +- templates/pages/_pages_list.html.twig | 15 ++++++ 13 files changed, 207 insertions(+), 25 deletions(-) rename public/build/{app.ce4f7eb0.css => app.9c0698b8.css} (61%) diff --git a/assets/css/_darkmode.scss b/assets/css/_darkmode.scss index b9672a09d..af4640de0 100644 --- a/assets/css/_darkmode.scss +++ b/assets/css/_darkmode.scss @@ -328,4 +328,23 @@ $tooltip-shadow: #333; filter:invert(1) hue-rotate(180deg); } + .prp-qualitytext { + color:white; /* needed to have enough contrast */ + } + .prp-quality0 { + background-color:#55585e; + } + .prp-quality1 { + background-color:#971602; + } + .prp-quality2 { + background-color:#40408c; + } + .prp-quality3 { + background-color:#5C5C00; + } + .prp-quality4 { + background-color:#00662e; + } + } diff --git a/assets/css/application.scss b/assets/css/application.scss index 85218391e..9cee7bc4c 100644 --- a/assets/css/application.scss +++ b/assets/css/application.scss @@ -739,3 +739,24 @@ a.help-icon { .side-to-side { clear: both; } + +.prp-qualitytext { + border-radius: 3px; + padding: 0 2px; +} + +.prp-quality0 { + background-color:#ddd; +} +.prp-quality1 { + background-color:#ffabab; +} +.prp-quality2 { + background-color:#bbbbff; +} +.prp-quality3 { + background-color:#ffe867; +} +.prp-quality4 { + background-color:#90ff90; +} diff --git a/i18n/en.json b/i18n/en.json index a434ea5e5..fad95f672 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -345,12 +345,8 @@ "priority": "Priority", "project": "Project", "projects": "Projects", + "proofreadpage-quality": "Page status", "proofreadpage-qualitychanges": "Proportions of ProofreadPage quality changes", - "proofreadpage-quality0": "Without text", - "proofreadpage-quality1": "Not proofread", - "proofreadpage-quality2": "Problematic", - "proofreadpage-quality3": "Proofread", - "proofreadpage-quality4": "Validated", "prose": "Prose", "protect": "Protect", "proxy-check": "Proxy check", diff --git a/i18n/qqq.json b/i18n/qqq.json index 2c949f41a..63b90e6eb 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -364,12 +364,8 @@ "priority": "Label for the priority of a 'bug' in a wiki page that needs fixing.\n{{Identical|Priority}}", "project": "Header for the part of the interface that lets the user select which project they want to view statistics for.\n{{Identical|Project}}", "projects": "Label for a number of projects.\n{{Identical|Projects}}", + "proofreadpage-quality": "Label for the transcription status of a page, as recorded by Extension:ProofreadPage.", "proofreadpage-qualitychanges": "Label for a chart of the proportions of the different quality changes.", - "proofreadpage-quality0": "Label for the ProofreadPage category 0.\n{{Identical|MediaWiki:Proofreadpage quality0 category}}", - "proofreadpage-quality1": "Label for the ProofreadPage category 1.\n{{Identical|MediaWiki:Proofreadpage quality1 category}}", - "proofreadpage-quality2": "Label for the ProofreadPage category 2.\n{{Identical|MediaWiki:Proofreadpage quality2 category}}", - "proofreadpage-quality3": "Label for the ProofreadPage category 3.\n{{Identical|MediaWiki:Proofreadpage quality3 category}}", - "proofreadpage-quality4": "Label for the ProofreadPage category 4.\n{{Identical|MediaWiki:Proofreadpage quality4 category}}", "prose": "Term used to describe the text content of an article.", "protect": "Name of the MediaWiki log action 'protect', as in page protection.\n{{Identical|Protect}}", "proxy-check": "Label for link to the Proxy Check tool on Toolforge. The tool can tell you if the given IP address is a proxy or not.", diff --git a/public/build/app.ce4f7eb0.css b/public/build/app.9c0698b8.css similarity index 61% rename from public/build/app.ce4f7eb0.css rename to public/build/app.9c0698b8.css index 458a1411b..abbf2118f 100644 --- a/public/build/app.ce4f7eb0.css +++ b/public/build/app.9c0698b8.css @@ -1 +1 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;vertical-align:top}.side-to-side{clear:both}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file +@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;vertical-align:top}.side-to-side{clear:both}.prp-qualitytext{border-radius:3px;padding:0 2px}.prp-quality0{background-color:#ddd}.prp-quality1{background-color:#ffabab}.prp-quality2{background-color:#bbf}.prp-quality3{background-color:#ffe867}.prp-quality4{background-color:#90ff90}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}.prp-qualitytext{color:#fff}.prp-quality0{background-color:#55585e}.prp-quality1{background-color:#971602}.prp-quality2{background-color:#40408c}.prp-quality3{background-color:#5c5c00}.prp-quality4{background-color:#00662e}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 970d6c1ff..765596401 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -7,7 +7,7 @@ "/build/app.f4fc5d0a.js" ], "css": [ - "/build/app.ce4f7eb0.css" + "/build/app.9c0698b8.css" ] } } diff --git a/public/build/manifest.json b/public/build/manifest.json index 039d655b7..e34e9f624 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,5 +1,5 @@ { - "build/app.css": "/build/app.ce4f7eb0.css", + "build/app.css": "/build/app.9c0698b8.css", "build/app.js": "/build/app.f4fc5d0a.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/95.7a87ed1a.js": "/build/95.7a87ed1a.js", diff --git a/src/Model/Pages.php b/src/Model/Pages.php index d30b42074..3a4470a05 100644 --- a/src/Model/Pages.php +++ b/src/Model/Pages.php @@ -404,6 +404,21 @@ public function getDeletionSummary(int $namespace, string $pageTitle, string $of return "$timestampStr ({$ret['actor_name']}): $summary"; } + /** + * Check if a namespace is the PRP Page namespace. + * Sadly, we don't have a clean way of knowing that + * and the namespace ID varies between wikis, + * so we have to just look at the data and check + * if the first row has a quality set. + * @param int $namespace Namespace ID. + * @return bool + */ + public function isProofreadPage(int $namespace): bool + { + return $this->pages[$namespace][0] && + array_key_exists('prp_quality', $this->pages[$namespace][0]); + } + /** * Run the query to get pages created by the user with options. * This is ran independently for each namespace if $this->namespace is 'all'. @@ -491,6 +506,10 @@ private function formatPages(array $pages): array 'projects' => json_decode($row['pap_project_title'] ?? '[]'), ]; } + + if (array_key_exists('prp_quality', $row)) { + $pageData['prp_quality'] = (int)$row['prp_quality']; + } $results[$row['namespace']][] = $pageData; } diff --git a/src/Model/Project.php b/src/Model/Project.php index 28861bee9..22e2f770e 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -68,6 +68,31 @@ public function hasPageAssessments($nsId = null): bool } } + /** + * Whether or not this namespace is the Page namespace (of ProofreadPage). + * Or true if it is 'all'. + * @param int|string $namespace Namespace ID, or 'all'. + * @return bool + */ + public function isPrpPage($namespace): bool + { + return $this->hasProofreadPage() && + ( + !is_numeric($namespace) || + 'Page' === $this->getCanonicalNamespace($namespace) + ); + } + + /** + * Get the list of the names of each ProofreadPage + * quality level. Keys are 0, 1, 2, 3, and 4. + * @return string[] + */ + public function getPrpQualityNames(): array + { + return $this->repository->getPrpQualityNames($this); + } + /** * Unique identifier this Project, to be used in cache keys. * @see Repository::getCacheKey() @@ -238,6 +263,22 @@ public function getNamespaces(): array return $metadata['namespaces']; } + /** + * Get the canonical namespace name for a namespace ID. + * Or '' if the namespace does not exist. + * @param int $namespace + * @return string + */ + public function getCanonicalNamespace($namespace): string + { + $canonicalNamespaces = $this->getMetadata()['canonical_namespaces']; + if (array_key_exists($namespace, $canonicalNamespaces)) { + return $canonicalNamespaces[$namespace]; + } else { + return ''; + } + } + /** * Get the title of the Main Page. * @return string diff --git a/src/Repository/PagesRepository.php b/src/Repository/PagesRepository.php index 8c8e7c777..de77cb3e4 100644 --- a/src/Repository/PagesRepository.php +++ b/src/Repository/PagesRepository.php @@ -49,17 +49,26 @@ public function countPagesCreated( $conditions = array_merge( $conditions, $this->getNamespaceRedirectAndDeletedPagesConditions($namespace, $redirects), - $this->getUserConditions('' !== $start.$end) + $this->getUserConditions('' !== $start.$end), + $this->getPrpConditions($namespace, $project) ); $wasRedirect = $this->getWasRedirectClause($redirects, $deleted); $summation = Pages::DEL_NONE !== $deleted ? 'redirect OR was_redirect' : 'redirect'; + $prpSelect = ''; + if ($project->isPrpPage($namespace)) { + foreach ([0, 1, 2, 3, 4] as $level) { + $prpSelect .= ", SUM(IF(`prp_quality` = $level, 1, 0)) AS `prp_quality$level`"; + } + } + $sql = "SELECT `namespace`, COUNT(page_title) AS `count`, SUM(IF(type = 'arc', 1, 0)) AS `deleted`, SUM($summation) AS `redirects`, SUM(rev_length) AS `total_length` + $prpSelect FROM (" . $this->getPagesCreatedInnerSql($project, $conditions, $deleted, $start, $end, false, true)." ) a ". @@ -112,7 +121,8 @@ public function getPagesCreated( $conditions = array_merge( $conditions, $this->getNamespaceRedirectAndDeletedPagesConditions($namespace, $redirects), - $this->getUserConditions('' !== $start.$end) + $this->getUserConditions('' !== $start.$end), + $this->getPrpConditions($namespace, $project) ); $hasPageAssessments = $this->isWMF && $project->hasPageAssessments($namespace); @@ -132,7 +142,7 @@ public function getPagesCreated( ON pa_project_id = pap_project_id WHERE pa_page_id = page_id ) AS pap_project_title"; - $conditions['paSelectsArchive'] = ', NULL AS pa_class, NULL as pap_project_title'; + $conditions['paSelectsArchive'] = ', NULL AS pa_class, NULL AS pap_project_title'; $conditions['revPageGroupBy'] = 'GROUP BY rev_page'; } @@ -193,6 +203,29 @@ private function getNamespaceRedirectAndDeletedPagesConditions($namespace, strin return $conditions; } + /** + * Get SQL fragments for ProofreadPage quality. + * @param int|string $namespace + * @param Project $project + * @return string[] With keys 'prpSelect', 'prpArSelect' and 'prpJoin' + */ + private function getPrpConditions($namespace, $project): array + { + $conditions = [ + 'prpSelect' => '', + 'prpArSelect' => '', + 'prpJoin' => '' + ]; + if ($project->isPrpPage($namespace)) { + $pagePropsTable = $project->getTableName('page_props', ''); + $conditions['prpSelect'] = ", pp_value AS `prp_quality`"; + $conditions['prpArSelect'] = ", NULL AS `prp_quality`"; + $conditions['prpJoin'] = "LEFT OUTER JOIN $pagePropsTable + ON (pp_page, pp_propname) = (page_id, 'proofread_page_quality_level')"; + } + return $conditions; + } + /** * Inner SQL for getting or counting pages created by the user. * @param Project $project @@ -221,7 +254,7 @@ private function getPagesCreatedInnerSql( $logTable = $project->getTableName('logging', 'logindex'); // Only SELECT things that are needed, based on whether or not we're doing a COUNT. - $revSelects = "DISTINCT page_namespace AS `namespace`, 'rev' AS `type`, page_title, " + $revSelects = "page_namespace AS `namespace`, 'rev' AS `type`, page_title, " . "page_is_redirect AS `redirect`, rev_len AS `rev_length`"; if (!$count) { $revSelects .= ", page_len AS `length`, rev_timestamp AS `timestamp`, " @@ -235,10 +268,11 @@ private function getPagesCreatedInnerSql( $tagDefTable = $project->getTableName('change_tag_def'); $revisionsSelect = " - SELECT $revSelects ".$conditions['paSelects'].", + SELECT $revSelects ".$conditions['paSelects'].$conditions['prpSelect'].", NULL AS was_redirect FROM $pageTable JOIN $revisionTable ON page_id = rev_page + ".$conditions['prpJoin']." WHERE ".$conditions['whereRev']." AND rev_parent_id = '0'". $conditions['namespaceRev']. @@ -249,6 +283,7 @@ private function getPagesCreatedInnerSql( // Only SELECT things that are needed, based on whether or not we're doing a COUNT. $arSelects = "ar_namespace AS `namespace`, 'arc' AS `type`, ar_title AS `page_title`, " . "'0' AS `redirect`, ar_len AS `rev_length`"; + if (!$count) { $arSelects .= ", NULL AS `length`, MIN(ar_timestamp) AS `timestamp`, ". "ar_rev_id AS `rev_id`, EXISTS( @@ -259,7 +294,7 @@ private function getPagesCreatedInnerSql( } $archiveSelect = " - SELECT $arSelects ".$conditions['paSelectsArchive'].", + SELECT $arSelects ".$conditions['paSelectsArchive'].$conditions['prpArSelect'].", ( SELECT 1 FROM $tagTable diff --git a/src/Repository/ProjectRepository.php b/src/Repository/ProjectRepository.php index 48ddfe5b4..564639a35 100644 --- a/src/Repository/ProjectRepository.php +++ b/src/Repository/ProjectRepository.php @@ -275,6 +275,7 @@ public function getMetadata(string $projectUrl): ?array $metadata = [ 'general' => [], 'namespaces' => [], + 'canonical_namespaces' => [], 'tempAccountPatterns' => $res['query']['autocreatetempuser']['matchPatterns'] ?? null, ]; @@ -305,7 +306,7 @@ public function getMetadata(string $projectUrl): ?array /** * Set the namespaces on the given $metadata. * @param array $res As produced by meta=siteinfo API. - * @param array &$metadata The metadata array to modify. + * @param array $metadata The metadata array to modify. */ private function setNamespaces(array $res, array &$metadata): void { @@ -323,10 +324,13 @@ private function setNamespaces(array $res, array &$metadata): void } elseif (isset($namespace['*'])) { $name = $namespace['*']; } else { - continue; + $name = null; } - $metadata['namespaces'][$namespace['id']] = $name; + if (null !== $name ) { + $metadata['namespaces'][$namespace['id']] = $name; + } + $metadata['canonical_namespaces'][$namespace['id']] = $namespace['canonical'] ?? ''; } } @@ -378,6 +382,11 @@ public function pageHasContent(Project $project, int $namespaceId, string $pageT */ public function getInstalledExtensions(Project $project): array { + $cacheKey = $this->getCacheKey(func_get_args(), "project_extensions"); + if ($this->cache->hasItem($cacheKey)) { + return $this->cache->getItem($cacheKey)->get(); + } + $res = json_decode($this->guzzle->request('GET', $project->getApiUrl(), ['query' => [ 'action' => 'query', 'meta' => 'siteinfo', @@ -386,9 +395,39 @@ public function getInstalledExtensions(Project $project): array ]])->getBody()->getContents(), true); $extensions = $res['query']['extensions'] ?? []; - return array_map(function ($extension) { + + // Cache for one hour and return. + return $this->setCache($cacheKey, array_map(function ($extension) { return $extension['name']; - }, $extensions); + }, $extensions), 'PT1H'); + } + + /** + * Get the list of the names for each ProofreadPage quality + * on this wiki. Keys are 0, 1, 2, 3, and 4. + * @param Project $project + * @return string[] + */ + public function getPrpQualityNames(Project $project): array + { + $cacheKey = $this->getCacheKey(func_get_args(), "project_prp_levels"); + if ($this->cache->hasItem($cacheKey)) { + return $this->cache->getItem($cacheKey)->get(); + } + + $res = json_decode($this->guzzle->request('GET', $project->getApiUrl(), ['query' => [ + 'action' => 'query', + 'meta' => 'proofreadinfo', + 'prpiprop' => 'qualitylevels', + 'format' => 'json', + ]])->getBody()->getContents(), true); + + $qualityLevels = $res['query']['proofreadqualitylevels'] ?? []; + + // Cache for one week (will change extremely rarely) and return. + return $this->setCache($cacheKey, array_map(function ($level) { + return $level['category']; + }, $qualityLevels), 'P1W'); } /** diff --git a/templates/editCounter/general_stats.html.twig b/templates/editCounter/general_stats.html.twig index fd31a0243..82093e2fc 100644 --- a/templates/editCounter/general_stats.html.twig +++ b/templates/editCounter/general_stats.html.twig @@ -533,13 +533,14 @@ {### ProofreadPage quality changes ###} {% if project.hasProofreadPage %} {% set qualityChanges = ec.countQualityChanges %} + {% set qualityNames = project.prpQualityNames %} {% if qualityChanges.total > 1 %}
    {{ msg('proofreadpage-qualitychanges') }}* {{ chart.pie_chart('prp_qualitychanges', [0, 1, 2, 3, 4]|map((i) => { - label: msg('proofreadpage-quality' ~ i), + label: qualityNames[i], value: qualityChanges[i], percentage: ((qualityChanges[i] / qualityChanges.total) * 100), color: color([11, 0, 4, 2, 1][i]) diff --git a/templates/pages/_pages_list.html.twig b/templates/pages/_pages_list.html.twig index 360c1bf9d..51334fde3 100644 --- a/templates/pages/_pages_list.html.twig +++ b/templates/pages/_pages_list.html.twig @@ -35,6 +35,10 @@ {% if project.hasPageAssessments(ns) and pages.deleted != 'deleted' %} {% set columns = columns|merge(['assessment']) %} {% endif %} + {% if pages.isProofreadPage(ns) %} + {% set columns = columns|merge(['proofreadpage-quality']) %} + {% set qualityNames = project.prpQualityNames %} + {% endif %} {% for thKey in columns %} @@ -102,6 +106,17 @@ {% endif %} {% endif %} + {% if page.prp_quality is defined %} + + {% if page.deleted %} + {{ msg('na') }} + {% else %} + + {{ qualityNames[page.prp_quality] }} + + {% endif %} + + {% endif %} {% endif %} {{ wiki.pageLogLinkRaw(pagename, project) }} From dde54746a902c9b2c425fb02e0c0949c1116e810 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 00:24:33 +0200 Subject: [PATCH 07/60] commpile --- public/build/app.4f451c82.js | 2 - public/build/app.9880f65a.js | 2 + ...ICENSE.txt => app.9880f65a.js.LICENSE.txt} | 0 public/build/app.9c0698b8.css | 1 - public/build/app.f4fc5d0a.js | 2 - public/build/app.f4fc5d0a.js.LICENSE.txt | 67 ------------------- .../{app.a18ea92e.css => app.fb116d63.css} | 2 +- public/build/entrypoints.json | 6 +- public/build/manifest.json | 4 +- 9 files changed, 8 insertions(+), 78 deletions(-) delete mode 100644 public/build/app.4f451c82.js create mode 100644 public/build/app.9880f65a.js rename public/build/{app.4f451c82.js.LICENSE.txt => app.9880f65a.js.LICENSE.txt} (100%) delete mode 100644 public/build/app.9c0698b8.css delete mode 100644 public/build/app.f4fc5d0a.js delete mode 100644 public/build/app.f4fc5d0a.js.LICENSE.txt rename public/build/{app.a18ea92e.css => app.fb116d63.css} (61%) diff --git a/public/build/app.4f451c82.js b/public/build/app.4f451c82.js deleted file mode 100644 index 9ff67646b..000000000 --- a/public/build/app.4f451c82.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.4f451c82.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(){var t=Date.now();return setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}function s(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" "),i=r()}))}function l(){clearInterval(i),loaingTimerId=null;var t=$("#submit_timer").parent()[0];$(t).html(t.initialtext),$(t).removeClass("link-loading")}function u(t){t?l():$("a").filter((function(t,e){return""==e.className&&e.href.startsWith(document.location.origin)&&new URL(e.href).pathname.replaceAll(/[^\/]/g,"").length>1&&"_blank"!=e.target&&e.href.split("#")[0]!=document.location.href})).on("click",(function(t){var e=$(t.target);e.prop("initialtext",e.html()),e.html($.i18n("loading")+" "),e.addClass("link-loading"),i&&l(),i=r()}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),n(4989),n(460),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),s(),u(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&(s(!0),u(!0))}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),n(4913),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e);var n=function(t){return t[0].toUpperCase()+t.slice(1)};$(".contributions--prev-text").text(n($.i18n("pager-newer-n",e))),$(".contributions--next-text").text(n($.i18n("pager-older-n",e)))}))}},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[852],(()=>(e(2811),e(7852),e(6108),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.9880f65a.js b/public/build/app.9880f65a.js new file mode 100644 index 000000000..8f10b0698 --- /dev/null +++ b/public/build/app.9880f65a.js @@ -0,0 +1,2 @@ +/*! For license information please see app.9880f65a.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(){var t=Date.now();return setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}function s(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" "),i=r()}))}function l(){clearInterval(i),loaingTimerId=null;var t=$("#submit_timer").parent()[0];$(t).html(t.initialtext),$(t).removeClass("link-loading")}function u(t){t?l():$("a").filter((function(t,e){return""==e.className&&e.href.startsWith(document.location.origin)&&new URL(e.href).pathname.replaceAll(/[^\/]/g,"").length>1&&"_blank"!=e.target&&e.href.split("#")[0]!=document.location.href})).on("click",(function(t){var e=$(t.target);e.prop("initialtext",e.html()),e.html($.i18n("loading")+" "),e.addClass("link-loading"),i&&l(),i=r()}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),n(4989),n(460),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),s(),u(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&(s(!0),u(!0))}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),n(4913),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e);var n=function(t){return t[0].toUpperCase()+t.slice(1)};$(".contributions--prev-text").text(n($.i18n("pager-newer-n",e))),$(".contributions--next-text").text(n($.i18n("pager-older-n",e)))}))}},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[852],(()=>(e(2811),e(7852),e(6108),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.4f451c82.js.LICENSE.txt b/public/build/app.9880f65a.js.LICENSE.txt similarity index 100% rename from public/build/app.4f451c82.js.LICENSE.txt rename to public/build/app.9880f65a.js.LICENSE.txt diff --git a/public/build/app.9c0698b8.css b/public/build/app.9c0698b8.css deleted file mode 100644 index abbf2118f..000000000 --- a/public/build/app.9c0698b8.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;vertical-align:top}.side-to-side{clear:both}.prp-qualitytext{border-radius:3px;padding:0 2px}.prp-quality0{background-color:#ddd}.prp-quality1{background-color:#ffabab}.prp-quality2{background-color:#bbf}.prp-quality3{background-color:#ffe867}.prp-quality4{background-color:#90ff90}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}.prp-qualitytext{color:#fff}.prp-quality0{background-color:#55585e}.prp-quality1{background-color:#971602}.prp-quality2{background-color:#40408c}.prp-quality3{background-color:#5c5c00}.prp-quality4{background-color:#00662e}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/app.f4fc5d0a.js b/public/build/app.f4fc5d0a.js deleted file mode 100644 index 63524e92c..000000000 --- a/public/build/app.f4fc5d0a.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.f4fc5d0a.js.LICENSE.txt */ -(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("")}function o(){var t=$("#page_input"),e=$("#user_input"),n=$("#namespace_select");if(t[0]||e[0]||$("#project_input")[0]){t.data("typeahead")&&t.data("typeahead").destroy(),e.data("typeahead")&&e.data("typeahead").destroy(),xtools.application.vars.apiPath||(xtools.application.vars.apiPath=$("#page_input").data("api")||$("#user_input").data("api"));var a={url:xtools.application.vars.apiPath,timeout:200,triggerLength:1,method:"get",preDispatch:null,preProcess:null};t[0]&&t.typeahead({ajax:Object.assign(a,{preDispatch:function(t){n[0]&&"0"!==n.val()&&(t=n.find("option:selected").text().trim()+":"+t);return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){var e="";return n[0]&&"0"!==n.val()&&(e=n.find("option:selected").text().trim()),t.query.prefixsearch.map((function(t){return t.title.replace(new RegExp("^"+e+":"),"")}))}})}),e[0]&&e.typeahead({ajax:Object.assign(a,{preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:"User:"+t}},preProcess:function(t){return t.query.prefixsearch.map((function(t){return t.title.split("/")[0].substr(t.title.indexOf(":")+1)})).filter((function(t,e,n){return n.indexOf(t)===e}))}})});var o=function(t){"&"==t.key&&$(t.target).blur().focus()};t.on("keydown",o),e.on("keydown",o)}}var i;function r(t){t?($(".form-control").prop("readonly",!1),$(".form-submit").prop("disabled",!1),$(".form-submit").text($.i18n("submit")).prop("disabled",!1),i&&(clearInterval(i),i=null)):$("#content form").on("submit",(function(){document.activeElement.blur(),$(".form-control").prop("readonly",!0),$(".form-submit").prop("disabled",!0).html($.i18n("loading")+" ");var t=Date.now();i=setInterval((function(){var e=Math.round((Date.now()-t)/1e3),n=Math.floor(e/60),a=("00"+(e-60*n)).slice(-2);$("#submit_timer").text(n+":"+a)}),1e3)}))}n(8665),n(5086),n(9979),n(4602),n(789),n(933),n(9218),n(2231),n(8636),n(5231),n(6088),n(8476),n(8379),n(7899),n(4189),n(8329),n(9581),n(7136),n(173),n(9073),n(6048),n(9693),n(17),n(9560),n(9389),n(8772),n(4913),xtools={},xtools.application={},xtools.application.vars={sectionOffset:{}},xtools.application.chartGridColor="rgba(0, 0, 0, 0.1)",window.matchMedia("(prefers-color-scheme: dark)").matches&&(Chart.defaults.global.defaultFontColor="#AAA",xtools.application.chartGridColor="#333"),$.i18n({locale:i18nLang}).load(i18nPaths),$((function(){$(document).ready((function(){if($(".xt-hide").on("click",(function(){$(this).hide(),$(this).siblings(".xt-show").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").hide():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").hide()})),$(".xt-show").on("click",(function(){$(this).hide(),$(this).siblings(".xt-hide").show(),$(this).parents(".panel-heading").length?$(this).parents(".panel-heading").siblings(".panel-body").show():$(this).parents(".xt-show-hide--parent").next(".xt-show-hide--target").show()})),function(){var t=$(window).width(),e=$(".tool-links").outerWidth(),n=$(".nav-buttons").outerWidth();if(t<768)return;e+n>t&&$(".tool-links--more").removeClass("hidden");var a=$(".tool-links--entry").length;for(;a>0&&e+n>t;){var o=$(".tool-links--nav > .tool-links--entry:not(.active)").last().remove();$(".tool-links--more .dropdown-menu").append(o),e=$(".tool-links").outerWidth(),a--}}(),xtools.application.setupColumnSorting(),function(){var t=$(".xt-toc");if(!t||!t[0])return;xtools.application.vars.tocHeight=t.height();var e=function(){$(".xt-toc").find("a").off("click").on("click",(function(t){document.activeElement.blur();var e=$("#"+$(t.target).data("section"));$(window).scrollTop(e.offset().top-xtools.application.vars.tocHeight),$(this).parents(".xt-toc").find("a").removeClass("bold"),n(),xtools.application.vars.$tocClone.addClass("bold")}))};xtools.application.setupTocListeners=e;var n=function(){xtools.application.vars.$tocClone||(xtools.application.vars.$tocClone=t.clone(),xtools.application.vars.$tocClone.addClass("fixed"),t.after(xtools.application.vars.$tocClone),e())};xtools.application.buildSectionOffsets=function(){$.each(t.find("a"),(function(t,e){var n=$(e).data("section");xtools.application.vars.sectionOffset[n]=$("#"+n).offset().top}))},$(".xt-show, .xt-hide").on("click",xtools.application.buildSectionOffsets),xtools.application.buildSectionOffsets(),e();var a=t.offset().top;$(window).on("scroll.toc",(function(t){var e,o=$(t.target).scrollTop(),i=o>a;i?(xtools.application.vars.$tocClone||n(),Object.keys(xtools.application.vars.sectionOffset).forEach((function(t){o>xtools.application.vars.sectionOffset[t]-xtools.application.vars.tocHeight-1&&(e=xtools.application.vars.$tocClone.find('a[data-section="'+t+'"]'))})),xtools.application.vars.$tocClone.find("a").removeClass("bold"),e&&e.addClass("bold")):!i&&xtools.application.vars.$tocClone&&(xtools.application.vars.$tocClone.remove(),xtools.application.vars.$tocClone=null)}))}(),function(){var t=$(".table-sticky-header");if(!t||!t[0])return;var e,n=t.find("thead tr").eq(0),a=function(){e||(e=n.clone(),n.addClass("sticky-heading"),n.before(e),n.find("th").each((function(t){$(this).css("width",e.find("th").eq(t).outerWidth())})),n.css("width",e.outerWidth()+1))},o=t.offset().top;$(window).on("scroll.stickyHeader",(function(i){var r=$(i.target).scrollTop()>o;r&&!e?a():!r&&e?(n.removeClass("sticky-heading"),e.remove(),e=null):e&&n.css("top",$(window).scrollTop()-t.offset().top)}))}(),function(){var t=$("#project_input");if(!t)return;t.length&&$("#namespace_select").length?(xtools.application.vars.lastProject=$("#project_input").val(),$("#project_input").off("change").on("change",(function(){$("#namespace_select").prop("disabled",!0);var t=this.value;$.get(xtBaseUrl+"api/project/namespaces/"+t).done((function(e){var n=$('#namespace_select option[value="all"]').eq(0).clone();for(var a in $("#namespace_select").html(n),xtools.application.vars.apiPath=e.api,e.namespaces)if(e.namespaces.hasOwnProperty(a)){var i=0===parseInt(a,10)?$.i18n("mainspace"):e.namespaces[a];$("#namespace_select").append("")}$("#namespace_select").val(0),xtools.application.vars.lastProject=t,o()})).fail(a.bind(this,t)).always((function(){$("#namespace_select").prop("disabled",!1)}))})),$("#namespace_select").on("change",o)):($("#user_input")[0]||$("#page_input")[0])&&(xtools.application.vars.lastProject=t.val(),t.on("change",(function(){var e=this.value;$.get(xtBaseUrl+"api/project/normalize/"+e).done((function(n){xtools.application.vars.apiPath=n.api,xtools.application.vars.lastProject=e,o(),t.trigger("xtools.projectLoaded",n)})).fail(a.bind(this,e))})))}(),o(),r(),"function"==typeof URL){var t=new URL(window.location.href).searchParams.get("focus");t&&$("[name=".concat(t,"]")).focus()}})),window.onpageshow=function(t){t.persisted&&r(!0)}})),xtools.application.setupToggleTable=function(t,e,n,a){var o;$(".toggle-table").on("click",".toggle-table--toggle",(function(){o||(o=Object.assign({},t));var i=$(this).data("index"),r=$(this).data("key");"true"===$(this).attr("data-disabled")?(o[r]=t[r],e&&(e.data.datasets[0].data[i]=parseInt(n?o[r][n]:o[r],10)),$(this).attr("data-disabled","false")):(delete o[r],e&&(e.data.datasets[0].data[i]=null),$(this).attr("data-disabled","true")),$(this).parents("tr").toggleClass("excluded"),$(this).find(".glyphicon").toggleClass("glyphicon-remove").toggleClass("glyphicon-plus"),a(o,r,i),e&&e.update()}))},xtools.application.setupColumnSorting=function(){var t,e;$(".sort-link").on("click",(function(){t=e===$(this).data("column")?-t:1,$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var n=1===t?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(this).find(".glyphicon").addClass(n).removeClass("glyphicon-sort"),e=$(this).data("column");var a=$(this).parents("table"),o=a.find(".sort-entry--"+e).parent();o.length&&(o.sort((function(n,a){var o=$(n).find(".sort-entry--"+e).data("value")||0,i=$(a).find(".sort-entry--"+e).data("value")||0;return isNaN(o)||(o=parseFloat(o)||0),isNaN(i)||(i=parseFloat(i)||0),oi?-t:0})),$(".sort-entry--rank").length>0&&$.each(o,(function(t,e){$(e).find(".sort-entry--rank").text(t+1)})),a.find("tbody").html(o))}))},xtools.application.setupMultiSelectListeners=function(){var t=$(".multi-select--body:not(.hidden) .multi-select--option");t.on("change",(function(){$(".multi-select--all").prop("checked",$(".multi-select--body:not(.hidden) .multi-select--option:checked").length===t.length)})),$(".multi-select--all").on("click",(function(){t.prop("checked",$(this).prop("checked"))}))}},6618:(t,e,n)=>{function a(){xtools.application.vars.offset||(xtools.application.vars.initialOffset=$(".contributions-container").data("offset"),xtools.application.vars.offset=xtools.application.vars.initialOffset)}n(9218),n(2231),n(8665),n(5086),n(9979),n(4602),n(933),n(7136),n(785),n(9389),n(6048),n(9073),n(173),n(4913),Object.assign(xtools.application.vars,{initialOffset:"",offset:"",prevOffsets:[],initialLoad:!1}),xtools.application.loadContributions=function(t,e){a();var n=$(".contributions-container"),o=$(".contributions-loading"),i=n.data(),r=t(i),s=parseInt(i.limit,10)||50,l=new URLSearchParams(window.location.search),u=xtBaseUrl+r+"/"+xtools.application.vars.offset,c=location.pathname.split("/")[1],d=u.split("/")[1];n.addClass("contributions-container--loading"),o.show(),l.set("limit",s.toString()),l.append("htmlonly","yes"),$.ajax({url:u+"?"+l.toString(),timeout:6e4}).always((function(){n.removeClass("contributions-container--loading"),o.hide()})).done((function(a){if(n.html(a).show(),xtools.application.setupContributionsNavListeners(t,e),xtools.application.vars.initialOffset||(xtools.application.vars.initialOffset=$(".contribs-row-date").first().data("value"),xtools.application.vars.initialLoad=!0),c!==d){var o=new RegExp("^/".concat(d,"/(.*)/"));u=u.replace(o,"/".concat(c,"/$1/"))}xtools.application.vars.initialLoad?xtools.application.vars.initialLoad=!1:(l.delete("htmlonly"),window.history.replaceState(null,document.title,u+"?"+l.toString()),n.parents(".panel")[0].scrollIntoView()),xtools.application.vars.offset"+i+"")).show()}))},xtools.application.setupContributionsNavListeners=function(t,e){a(),$(".contributions--prev").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset=xtools.application.vars.prevOffsets.pop()||xtools.application.vars.initialOffset,xtools.application.loadContributions(t,e)})),$(".contributions--next").off("click").one("click",(function(n){n.preventDefault(),xtools.application.vars.offset&&xtools.application.vars.prevOffsets.push(xtools.application.vars.offset),xtools.application.vars.offset=$(".contribs-row-date").last().data("value"),xtools.application.loadContributions(t,e)})),$("#contributions_limit").on("change",(function(t){var e=parseInt(t.target.value,10);$(".contributions-container").data("limit",e);var n=function(t){return t[0].toUpperCase()+t.slice(1)};$(".contributions--prev-text").text(n($.i18n("pager-newer-n",e))),$(".contributions--next-text").text(n($.i18n("pager-older-n",e)))}))}},9307:(t,e,n)=>{function a(t,e){var n=0,a=[];Object.keys(t).forEach((function(e){var o=parseInt(t[e],10);a.push(o),n+=o}));var i=Object.keys(t).length;$(".namespaces--namespaces").text(i.toLocaleString(i18nLang)+" "+$.i18n("num-namespaces",i)),$(".namespaces--count").text(n.toLocaleString(i18nLang)),a.forEach((function(t){var e=r(t,n);$(".namespaces-table .sort-entry--count[data-value="+t+"]").text(t.toLocaleString(i18nLang)+" ("+e+")")})),["year","month"].forEach((function(t){var n=window[t+"countsChart"],a=window.namespaces[e]||$.i18n("mainspace");if(n){var i=0;n.data.datasets.forEach((function(t,e){t.label===a&&(i=e)}));var r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,r.hidden?xtools.editcounter.excludedNamespaces.push(a):xtools.editcounter.excludedNamespaces=xtools.editcounter.excludedNamespaces.filter((function(t){return t!==a})),window[t+"countsChart"].config.data.labels=o(t,n.data.datasets),n.update()}}))}function o(t,e){var n=i(t,e);return Object.keys(n).map((function(e){var a=n[e].toString().length,o=2*(xtools.editcounter.maxDigits[t]-a);return e+Array(o+5).join("\t")+n[e].toLocaleString(i18nLang,{useGrouping:!1})}))}function i(t,e){var n={};return e.forEach((function(e){-1===xtools.editcounter.excludedNamespaces.indexOf(e.label)&&e.data.forEach((function(e,a){n[xtools.editcounter.chartLabels[t][a]]||(n[xtools.editcounter.chartLabels[t][a]]=0),n[xtools.editcounter.chartLabels[t][a]]+=e}))})),n}function r(t,e){return(t/e).toLocaleString(i18nLang,{style:"percent"})}n(8476),n(5086),n(8379),n(7899),n(2231),n(17),n(9581),n(9389),n(6048),n(475),n(9693),n(7136),n(173),n(5195),n(9979),n(2982),n(115),n(1128),n(5843),n(533),n(8825),n(6088),xtools.editcounter={},xtools.editcounter.excludedNamespaces=[],xtools.editcounter.chartLabels={},xtools.editcounter.maxDigits={},$((function(){0!==$("body.editcounter").length&&(xtools.application.setupMultiSelectListeners(),$(".chart-wrapper").each((function(){var t=$(this).data("chart-type");if(void 0===t)return!1;var e=$(this).data("chart-data"),n=$(this).data("chart-labels"),a=$("canvas",$(this));new Chart(a,{type:t,data:{labels:n,datasets:[{data:e}]}})})),xtools.application.setupToggleTable(window.namespaceTotals,window.namespaceChart,null,a))})),xtools.editcounter.setupMonthYearChart=function(t,e,n,a){var s=e.map((function(t){return t.label}));xtools.editcounter.maxDigits[t]=a.toString().length,xtools.editcounter.chartLabels[t]=n;var l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"linear";return window[t+"countsChart"]=new Chart($("#"+t+"counts-canvas"),{type:"horizontalBar",data:{labels:o(t,e),datasets:e},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(n){var a=i(t,e),o=Object.keys(a).map((function(t){return a[t]})),s=o[n.index],l=r(n.xLabel,s);return n.xLabel.toLocaleString(i18nLang)+" ("+l+")"},title:function(t){return t[0].yLabel.replace(/\t.*/,"")+" - "+s[t[0].datasetIndex]}}},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{type:n,stacked:!0,ticks:{beginAtZero:!0,min:"logarithmic"==n?1:0,reverse:i18nRTL,callback:function(t){if(Math.floor(t)===t)return t.toLocaleString(i18nLang)}},gridLines:{color:xtools.application.chartGridColor},afterBuildTicks:function(t){if("logarithmic"==n){var e=[];t.ticks.forEach((function(t,n){(0==n||1.5*e[e.length-1]"+u[11].toLocaleString(i18nLang)),window.sizeHistogramChart=new Chart($("#sizechart-canvas"),{type:"bar",data:{labels:c,datasets:[s,l,i]},options:{tooltips:{mode:"nearest",intersect:!0,callbacks:{label:function(t){return percentage=r(Math.abs(t.yLabel),o),Math.abs(t.yLabel).toLocaleString(i18nLang)+" ("+percentage+")"}}},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{yAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor},ticks:{callback:function(t){return Math.abs(t).toLocaleString(i18nLang)}}}],xAxes:[{stacked:!0,gridLines:{color:xtools.application.chartGridColor}}]}}})},xtools.editcounter.setupTimecard=function(t,e){var n=(new Date).getTimezoneOffset()/60;t=t.map((function(t){return t.backgroundColor=new Array(t.data.length).fill(t.backgroundColor),t})),window.chart=new Chart($("#timecard-bubble-chart"),{type:"bubble",data:{datasets:t},options:{responsive:!0,legend:{display:!1},layout:{padding:{right:0}},elements:{point:{radius:function(t){var e=t.dataIndex,n=t.dataset.data[e],a=(t.chart.height-20)/9/2;return n.scale/20*a},hitRadius:8}},scales:{yAxes:[{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(t,n){return e[n]}},position:i18nRTL?"right":"left",gridLines:{color:xtools.application.chartGridColor}},{ticks:{min:0,max:8,stepSize:1,padding:25,callback:function(e,n){return 0===n||n>7?"":(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.y==8-n})).reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang)}},position:i18nRTL?"left":"right"}],xAxes:[{ticks:{beginAtZero:!0,min:0,max:24,stepSize:1,reverse:i18nRTL,padding:0,callback:function(e,n,a,o){if(24===e)return"";var i=[];if($("#timecard-bubble-chart").attr("width")>=1e3){var r=(window.chart?window.chart.data.datasets:t).map((function(t){return t.data})).flat().filter((function(t){return t.x==e}));i.push(r.reduce((function(t,e){return t+parseInt(e.value,10)}),0).toLocaleString(i18nLang))}return e%2==0&&i.push(e+":00"),i}},gridLines:{color:xtools.application.chartGridColor},position:"bottom"}]},tooltips:{displayColors:!1,callbacks:{title:function(t){return e[7-t[0].yLabel+1]+" "+parseInt(t[0].xLabel)+":"+String(t[0].xLabel%1*60).padStart(2,"0")},label:function(e){var n=[t[e.datasetIndex].data[e.index].value];return"".concat(n.toLocaleString(i18nLang)," ").concat($.i18n("num-edits",[n]))}}}}}),$((function(){$(".use-local-time").prop("checked",!1).on("click",(function(){var t=$(this).is(":checked")?n:-n,e=new Array(7);chart.data.datasets.forEach((function(t){return e[t.data[0].day_of_week-1]=t.backgroundColor[0]})),chart.data.datasets=chart.data.datasets.map((function(n){var a=[];return n.data=n.data.map((function(n){var o=parseFloat(n.hour)-t,i=parseInt(n.day_of_week,10);return o<0?(o=24+o,(i-=1)<1&&(i=7+i)):o>=24&&(o-=24,(i+=1)>7&&(i-=7)),n.hour=o.toString(),n.x=o.toString(),n.day_of_week=i.toString(),n.y=(8-i).toString(),a.push(e[i-1]),n})),n.backgroundColor=a,n})),$(this).is(":checked"),chart.update()}))}))}},6730:(t,e,n)=>{n(115),xtools.globalcontribs={},$((function(){0!==$("body.globalcontribs").length&&xtools.application.setupContributionsNavListeners((function(t){return"globalcontribs/".concat(t.username,"/").concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),"globalcontribs")}))},1680:(t,e,n)=>{n(7136),n(173),xtools.pageinfo={},$((function(){if($("body.pageinfo").length){var t=function(){xtools.application.setupToggleTable(window.textshares,window.textsharesChart,"percentage",$.noop)},e=$(".textshares-container");if(e[0]){var n=xtBaseUrl+"authorship/"+e.data("project")+"/"+e.data("page")+"/"+(xtools.pageinfo.endDate?xtools.pageinfo.endDate+"/":"");n="".concat(n.replace(/\/$/,""),"?htmlonly=yes"),$.ajax({url:n,timeout:3e4}).done((function(n){e.replaceWith(n),xtools.application.buildSectionOffsets(),xtools.application.setupTocListeners(),xtools.application.setupColumnSorting(),t()})).fail((function(t,n,a){e.replaceWith($.i18n("api-error","Authorship API: "+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,a=t,o=void 0===e?.5:e,i=2*o-1,r=n.alpha()-a.alpha(),s=((i*r==-1?i:(i+r)/(1+i*r))+1)/2,l=1-s;return this.rgb(s*n.red()+l*a.red(),s*n.green()+l*a.green(),s*n.blue()+l*a.blue()).alpha(n.alpha()*o+a.alpha()*(1-o))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new i,a=this.values,o=n.values;for(var r in a)a.hasOwnProperty(r)&&(t=a[r],"[object Array]"===(e={}.toString.call(t))?o[r]=t.slice(0):"[object Number]"===e?o[r]=t:console.error("unexpected color value:",t));return n}},i.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},i.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i.prototype.getValues=function(t){for(var e=this.values,n={},a=0;a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)),100*(.2126*e+.7152*n+.0722*a),100*(.0193*e+.1192*n+.9505*a)]}function c(t){var e=u(t),n=e[0],a=e[1],o=e[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function d(t){var e,n,a,o,i,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[i=255*l,i,i];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var u=0;u<3;u++)(a=r+1/3*-(u-1))<0&&a++,a>1&&a--,i=6*a<1?e+6*(n-e)*a:2*a<1?n:3*a<2?e+(n-e)*(2/3-a)*6:e,o[u]=255*i;return o}function h(t){var e=t[0]/60,n=t[1]/100,a=t[2]/100,o=Math.floor(e)%6,i=e-Math.floor(e),r=255*a*(1-n),s=255*a*(1-n*i),l=255*a*(1-n*(1-i));switch(a*=255,o){case 0:return[a,l,r];case 1:return[s,a,r];case 2:return[r,a,l];case 3:return[r,s,a];case 4:return[l,r,a];case 5:return[a,r,s]}}function f(t){var e,n,a,o,i=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),a=6*i-(e=Math.floor(6*i)),!!(1&e)&&(a=1-a),o=s+a*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,a=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o))]}function v(t){var e,n,a,o=t[0]/100,i=t[1]/100,r=t[2]/100;return n=-.9689*o+1.8758*i+.0415*r,a=.0557*o+-.204*i+1.057*r,e=(e=3.2406*o+-1.5372*i+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(a=Math.min(Math.max(0,a),1))]}function m(t){var e=t[0],n=t[1],a=t[2];return n/=100,a/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function x(t){var e,n,a,o,i=t[0],r=t[1],s=t[2];return i<=8?o=(n=100*i/903.3)/100*7.787+16/116:(n=100*Math.pow((i+16)/116,3),o=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+o-16/116)/7.787:95.047*Math.pow(r/500+o,3),n,a=a/108.883<=.008859?a=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function y(t){var e,n=t[0],a=t[1],o=t[2];return(e=360*Math.atan2(o,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+o*o),e]}function k(t){return v(x(t))}function w(t){var e,n=t[0],a=t[1];return e=t[2]/360*2*Math.PI,[n,a*Math.cos(e),a*Math.sin(e)]}function C(t){return S[t]}e.exports={rgb2hsl:a,rgb2hsv:o,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:u,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],n=t[1]/100,a=t[2]/100;return 0===a?[0,0,0]:[e,2*(n*=(a*=2)<=1?a:2-a)/(a+n)*100,(a+n)/2*100]},hsl2hwb:function(t){return i(d(t))},hsl2cmyk:function(t){return s(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,a=t[0],o=t[1]/100,i=t[2]/100;return e=o*i,[a,100*(e=(e/=(n=(2-o)*i)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(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 o(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 o(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return o(C(t))},keyword2hwb:function(t){return i(C(t))},keyword2cmyk:function(t){return s(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return u(C(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(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]},M={};for(var _ in S)M[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var a=t(4),o=function(){return new u};for(var i in a){o[i+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(i);var r=/(\w+)2(\w+)/.exec(i),s=r[1],l=r[2];(o[s]=o[s]||{})[l]=o[i]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=a[t](e);if("string"==typeof n||void 0===n)return n;for(var o=0;o0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&o>0)&&(v+=o));return i=d.getPixelForValue(v),{size:s=((r=d.getPixelForValue(v+f))-i)/2,base:i,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,n){var a,o,r,s,l,u=n.scale.options,c=this.getStackIndex(t),d=n.pixels,h=d[e],f=d.length,p=n.start,g=n.end;return 1===f?(a=h>p?h-p:g-h,o=h0&&(a=(h-d[e-1])/2,e===f-1&&(o=a)),e');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a],l=s&&s.custom||{},u=i.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(r.backgroundColor,a,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(r.borderColor,a,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(r.borderWidth,a,c.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,v={x:Math.cos(p),y:Math.sin(p)},m={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,x=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,k=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,C={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},M={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};u=Math.min(s/M.width,l/M.height),c={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}n.borderWidth=e.getMaxBorderWidth(d.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=c.x*n.outerRadius,n.offsetY=c.y*n.outerRadius,d.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),i.each(d.data,(function(n,a){e.updateElement(n,a,t)}))},updateElement:function(t,e,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,u=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=a.getDataset(),p=n&&l.animateRotate||t.hidden?0:a.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,v=n&&l.animateScale?0:a.outerRadius,m=i.valueAtIndexOrDefault;i.extend(t,{_datasetIndex:a.index,_index:e,_model:{x:u+o.offsetX,y:c+o.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:v,innerRadius:g,label:m(f.label,e,o.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(b.startAngle=0===e?s.rotation:a.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(),n=this.getMeta(),a=0;return i.each(n.data,(function(n,o){t=e.data[o],isNaN(t)||n.hidden||(a+=Math.abs(t))})),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,a=0,o=this.index,i=t.length,r=0;r(a=e>a?e:a)?n:a;return a}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._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 i.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,u=s.data||[],c=r.chart.options,d=c.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,c);for(p&&(o=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:c.spanGaps,tension:o.tension?o.tension:i.valueOrDefault(f.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.valueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.valueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),n=0,a=u.length;n');var n=t.data,a=n.datasets,o=n.labels;if(a.length)for(var i=0;i'),o[i]&&e.push(o[i]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,a){var o=t.getDatasetMeta(0),r=e.datasets[0],s=o.data[a].custom||{},l=i.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(r.backgroundColor,a,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(r.borderColor,a,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}})):[]}},onClick:function(t,e){var n,a,o,i=e.index,r=this.chart;for(n=0,a=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:o.Line,dataElementType:o.Point,linkScales:i.noop,update:function(t){var e=this,n=e.getMeta(),a=n.dataset,o=n.data,r=a.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),i.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:i.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}}),n.dataset.pivot(),i.each(o,(function(n,a){e.updateElement(n,a,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.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),i.extend(t,{_datasetIndex:a.index,_index:e,_scale:s,_model:{x:n?s.xCenter:u.x,y:n?s.yCenter:u.y,tension:o.tension?o.tension:i.valueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:i.valueAtIndexOrDefault(r.pointRadius,e,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:i.valueAtIndexOrDefault(r.pointBackgroundColor,e,l.backgroundColor),borderColor:o.borderColor?o.borderColor:i.valueAtIndexOrDefault(r.pointBorderColor,e,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:i.valueAtIndexOrDefault(r.pointBorderWidth,e,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:i.valueAtIndexOrDefault(r.pointStyle,e,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:i.valueAtIndexOrDefault(r.pointHitRadius,e,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();i.each(e.data,(function(n,a){var o=n._model,r=i.splineCurve(i.previousItem(e.data,a,!0)._model,o,i.nextItem(e.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:i.valueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:i.valueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:i.valueAtIndexOrDefault(e.pointHoverBorderColor,a,i.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:i.valueAtIndexOrDefault(e.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:i.valueAtIndexOrDefault(e.pointRadius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:i.valueAtIndexOrDefault(e.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:i.valueAtIndexOrDefault(e.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:i.valueAtIndexOrDefault(e.pointBorderWidth,a,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"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,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:i.noop,onComplete:i.noop}}),e.exports=function(t){t.Animation=o.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,n,a){var o,i,r=this.animations;for(e.chart=t,a||(t.animating=!0),o=0,i=r.length;o1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var a=Date.now();t.dropFrames+=(a-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,a=this.animations,o=0;o=e.numSteps?(i.callback(e.onAnimationComplete,[e],n),n.animating=!1,a.splice(o,1)):++o}},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,n){"use strict";var a=t(25),o=t(45),i=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=o.configMerge(a.global,a[t.type],t.options||{}),t}function n(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(n,a){var i=this;a=e(a);var s=r.acquireContext(n,a),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;i.id=o.uid(),i.ctx=s,i.canvas=l,i.config=a,i.width=c,i.height=u,i.aspectRatio=u?c/u:null,i.options=a.options,i._bufferedRender=!1,i.chart=i,i.controller=i,t.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),s&&l?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,a=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(a))),l=Math.max(0,Math.floor(i?r/i:o.getMaximumHeight(a)));if((e.width!==r||e.height!==l)&&(a.width=e.width=r,a.height=e.height=l,a.style.width=r+"px",a.style.height=l+"px",o.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.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||{},n=t.scale;o.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),o.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,a=e.options,i=e.scales={},r=[];a.scales&&(r=r.concat((a.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(a.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),a.scale&&r.push({options:a.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(r,(function(a){var r=a.options,s=o.valueOrDefault(r.type,a.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(r.position)!==n(a.dposition)&&(r.position=a.dposition);var u=new l({id:r.id,options:r,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),a.isDefault&&(e.scale=u)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],a=[];return o.each(e.data.datasets,(function(o,i){var r=e.getDatasetMeta(i),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,n.push(r.type),r.controller)r.controller.updateIndex(i);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,i),a.push(r.controller)}}),e),a},resetElements:function(){var t=this;o.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==l(t)||(t={duration:t,lazy:arguments[1]}),function(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach((function(e){t.scales[e.id].options=e})),t.tooltip._options=e.tooltips}(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),o.each(n,(function(t){t.reset()})),e.updateDatasets(),s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,a=n.getDatasetMeta(t),o={meta:a,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[o])&&(a.controller.draw(e),s.notify(n,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return i.modes.single(this,t)},getElementsAtEvent:function(t){return i.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return i.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var a=i.modes[e];return"function"==typeof a?a(this,t,n):[]},getDatasetAtEvent:function(t){return i.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var a=n._meta[e.id];return a||(a=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(o.forEach((function(e){delete t[e]})),delete t._chartjs)}}var o=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},a.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(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&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,a=n.getMeta(),o=n.getDataset().data||[],i=a.data;for(t=0,e=o.length;ta&&t.insertElements(a,o-a)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][r].type||l.type&&l.type!==n[e][r].type?i.merge(n[e][r],[t.scaleService.getScaleDefaults(s),l]):i.merge(n[e][r],l)}else i._merger(e,n,a,o)}})},i.where=function(t,e){if(i.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return i.each(t,(function(t){e(t)&&n.push(t)})),n},i.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 a=0,o=t.length;a=0;a--){var o=t[a];if(e(o))return o}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n},i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.almostEquals=function(t,e,n){return Math.abs(t-e)t},i.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},i.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},i.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},i.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},i.toRadians=function(t){return t*(Math.PI/180)},i.toDegrees=function(t){return t*(180/Math.PI)},i.getAngleFromPoint=function(t,e){var n=e.x-t.x,a=e.y-t.y,o=Math.sqrt(n*n+a*a),i=Math.atan2(a,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},i.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.aliasPixel=function(t){return t%2==0?0:.5},i.splineCurve=function(t,e,n,a){var o=t.skip?e:t,i=e,r=n.skip?e:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2)),u=s/(s+l),c=l/(s+l),d=a*(u=isNaN(u)?0:u),h=a*(c=isNaN(c)?0:c);return{previous:{x:i.x-d*(r.x-o.x),y:i.y-d*(r.y-o.y)},next:{x:i.x+h*(r.x-o.x),y:i.y+h*(r.y-o.y)}}},i.EPSILON=Number.EPSILON||1e-14,i.splineCurveMonotone=function(t){var e,n,a,o,r,s,l,u,c,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(o=e0?d[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},i.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},i.niceNum=function(t,e){var n=Math.floor(i.log10(t)),a=t/Math.pow(10,n);return(e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10)*Math.pow(10,n)},i.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)},i.getRelativePosition=function(t,e){var n,a,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(n=l[0].clientX,a=l[0].clientY):(n=o.clientX,a=o.clientY);var u=parseFloat(i.getStyle(r,"padding-left")),c=parseFloat(i.getStyle(r,"padding-top")),d=parseFloat(i.getStyle(r,"padding-right")),h=parseFloat(i.getStyle(r,"padding-bottom")),f=s.right-s.left-u-d,p=s.bottom-s.top-c-h;return{x:n=Math.round((n-s.left-u)/f*r.width/e.currentDevicePixelRatio),y:a=Math.round((a-s.top-c)/p*r.height/e.currentDevicePixelRatio)}},i.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},i.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},i.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(i.getStyle(e,"padding-left"),10),a=parseInt(i.getStyle(e,"padding-right"),10),o=e.clientWidth-n-a,r=i.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},i.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(i.getStyle(e,"padding-top"),10),a=parseInt(i.getStyle(e,"padding-bottom"),10),o=e.clientHeight-n-a,r=i.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},i.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var a=t.canvas,o=t.height,i=t.width;a.height=o*n,a.width=i*n,t.ctx.scale(n,n),a.style.height=o+"px",a.style.width=i+"px"}},i.fontString=function(t,e,n){return e+" "+t+"px "+n},i.longestText=function(t,e,n,a){var o=(a=a||{}).data=a.data||{},r=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(o=a.data={},r=a.garbageCollect=[],a.font=e),t.font=e;var s=0;i.each(n,(function(e){null!=e&&!0!==i.isArray(e)?s=i.measureText(t,o,r,s,e):i.isArray(e)&&i.each(e,(function(e){null==e||i.isArray(e)||(s=i.measureText(t,o,r,s,e))}))}));var l=r.length/2;if(l>n.length){for(var u=0;ua&&(a=i),a},i.numberOfLabelLines=function(t){var e=1;return i.each(t,(function(t){i.isArray(t)&&t.length>e&&(e=t.length)})),e},i.color=a?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),a(t)}:function(t){return console.error("Color.js not found!"),t},i.getHoverColor=function(t){return t instanceof CanvasPattern?t:i.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function a(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,a,o,i,r;for(a=0,i=t.data.datasets.length;a0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return l(t,e,{intersect:!0})},point:function(t,e){return i(t,a(e,t))},nearest:function(t,e,n){var o=a(e,t);n.axis=n.axis||"xy";var i=s(n.axis),l=r(t,o,n.intersect,i);return l.length>1&&l.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),l.slice(0,1)},x:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(t,e,n){var i=a(e,t),r=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"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,n){"use strict";var a=t(45);e.exports=function(t){function e(t,e){return a.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var a=e?n:t,o=e?t:n;return a.weight===o.weight?a._tmpIndex_-o._tmpIndex_:a.weight-o.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={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 a,o=["fullWidth","position","weight"],i=o.length,r=0;rh&&lt.maxHeight){l--;break}l++,d=u*c}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},i=a(t._ticks),r=t.options,u=r.ticks,c=r.scaleLabel,d=r.gridLines,h=r.display,f=t.isHorizontal(),p=n(u),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?g:0,o.height=f?h&&d.drawTicks?g:0:t.maxHeight,c.display&&h){var v=l(c)+s.options.toPadding(c.padding).height;f?o.height+=v:o.width+=v}if(u.display&&h){var m=s.longestText(t.ctx,p.font,i,t.longestTextCache),b=s.numberOfLabelLines(i),x=.5*p.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=s.toRadians(t.labelRotation),w=Math.cos(k),C=Math.sin(k)*m+p.size*b+x*(b-1)+x;o.height=Math.min(t.maxHeight,o.height+C+y),t.ctx.font=p.font;var S=e(t.ctx,i[0],p.font),M=e(t.ctx,i[i.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*M+3):(t.paddingLeft=S/2+3,t.paddingRight=M/2+3)}else u.mirror?m=0:m+=y+x,o.width=Math.min(t.maxWidth,o.width+m),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.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(){s.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(s.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:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=a*t+e.paddingLeft;return n&&(o+=a/2),e.left+Math.round(o)+(e.isFullWidth()?e.margins.left:0)}var i=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(i/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+Math.round(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,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,a,o,i=this,r=i.isHorizontal(),l=i.options.ticks.minor,u=t.length,c=s.toRadians(i.labelRotation),d=Math.cos(c),h=i.longestLabelWidth*d,f=[];for(l.maxTicksLimit&&(o=l.maxTicksLimit),r&&(e=!1,(h+l.autoSkipPadding)*u>i.width-(i.paddingLeft+i.paddingRight)&&(e=1+Math.floor((h+l.autoSkipPadding)*u/(i.width-(i.paddingLeft+i.paddingRight)))),o&&u>o&&(e=Math.max(e,Math.floor(u/o)))),n=0;n1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1||s.isNullOrUndef(a.label))&&delete a.label,f.push(a);return f},draw:function(t){var e=this,a=e.options;if(a.display){var r=e.ctx,u=i.global,c=a.ticks.minor,d=a.ticks.major||c,h=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),v=c.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=s.valueOrDefault(c.fontColor,u.defaultFontColor),b=n(c),x=s.valueOrDefault(d.fontColor,u.defaultFontColor),y=n(d),k=h.drawTicks?h.tickMarkLength:0,w=s.valueOrDefault(f.fontColor,u.defaultFontColor),C=n(f),S=s.options.toPadding(f.padding),M=s.toRadians(e.labelRotation),_=[],I="right"===a.position?e.left:e.right-k,D="right"===a.position?e.left+k:e.right,P="bottom"===a.position?e.top:e.bottom-k,A="bottom"===a.position?e.top+k:e.bottom;if(s.each(v,(function(n,i){if(void 0!==n.label){var r,l,d,f,m=n.label;i===e.zeroLineIndex&&a.offset===h.offsetGridLines?(r=h.zeroLineWidth,l=h.zeroLineColor,d=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=s.valueAtIndexOrDefault(h.lineWidth,i),l=s.valueAtIndexOrDefault(h.color,i),d=s.valueOrDefault(h.borderDash,u.borderDash),f=s.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,C,S,T,L,F,$,O="middle",z="middle",R=c.padding;if(g){var j=k+R;"bottom"===a.position?(z=p?"middle":"top",O=p?"right":"center",$=e.top+j):(z=p?"middle":"bottom",O=p?"left":"center",$=e.bottom-j);var B=o(e,i,h.offsetGridLines&&v.length>1);B1);E0)n=t.stepSize;else{var i=a.niceNum(e.max-e.min,!1);n=a.niceNum(i/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&a.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,s=t.max);var l=(s-r)/n;l=a.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),o.push(void 0!==t.min?t.min:r);for(var u=1;u3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var i=a.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(i);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor(a.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._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:i.noop,title:function(t,e){var n="",a=e.labels,o=a?a.length:0;if(t.length>0){var i=t[0];i.xLabel?n=i.xLabel:o>0&&i.indexa.height-e.height&&(r="bottom");var s,l,u,c,d,h=(o.left+o.right)/2,f=(o.top+o.bottom)/2;"center"===r?(s=function(t){return t<=h},l=function(t){return t>h}):(s=function(t){return t<=e.width/2},l=function(t){return t>=a.width-e.width/2}),u=function(t){return t+e.width>a.width},c=function(t){return t-e.width<0},d=function(t){return t<=f?"top":"bottom"},s(n.x)?(i="left",u(n.x)&&(i="center",r=d(n.y))):l(n.x)&&(i="right",c(n.x)&&(i="center",r=d(n.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:i,yAlign:p.yAlign?p.yAlign:r}}(this,g))}else c.opacity=0;return c.xAlign=f.xAlign,c.yAlign=f.yAlign,c.x=p.x,c.y=p.y,c.width=g.width,c.height=g.height,c.caretX=v.x,c.caretY=v.y,o._model=c,e&&l.custom&&l.custom.call(o,c),o},drawCaret:function(t,e){var n=this._chart.ctx,a=this._view,o=this.getCaretPosition(t,e,a);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var a,o,i,r,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,v=e.height;if("center"===h)s=p+v/2,"left"===d?(o=(a=f)-u,i=a,r=s+u,l=s-u):(o=(a=f+g)+u,i=a,r=s-u,l=s+u);else if("left"===d?(a=(o=f+c+u)-u,i=o+u):"right"===d?(a=(o=f+g-c-u)-u,i=o+u):(a=(o=f+g/2)-u,i=o+u),"top"===h)s=(r=p)-u,l=r;else{s=(r=p+v)+u,l=r;var m=i;i=a,a=m}return{x1:a,x2:o,x3:i,y1:r,y2:s,y3:l}},drawTitle:function(t,n,a,o){var r=n.title;if(r.length){a.textAlign=n._titleAlign,a.textBaseline="top";var s,l,u=n.titleFontSize,c=n.titleSpacing;for(a.fillStyle=e(n.titleFontColor,o),a.font=i.fontString(u,n._titleFontStyle,n._titleFontFamily),s=0,l=r.length;s0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},a={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,i=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&i&&(this.drawBackground(a,e,t,n,o),a.x+=e.xPadding,a.y+=e.yPadding,this.drawTitle(a,e,t,o),this.drawBody(a,e,t,o),this.drawFooter(a,e,t,o))}},handleEvent:function(t){var e=this,n=e._options,a=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(a=!i.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var o=e._model;e.update(!0),e.pivot(),a|=o.x!==e._model.x||o.y!==e._model.y}return a}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,a=0,o=0,i=0;for(e=0,n=t.length;el;)o-=2*Math.PI;for(;o=s&&o<=l,c=r>=n.innerRadius&&r<=n.outerRadius;return u&&c}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,a=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,a),t.arc(e.x,e.y,e.innerRadius,a,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()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45),r=a.global;a._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=o.extend({draw:function(){var t,e,n,a,o=this,s=o._view,l=o._chart.ctx,u=s.spanGaps,c=o._children.slice(),d=r.elements.line,h=-1;for(o._loop&&c.length&&c.push(c[0]),l.save(),l.lineCap=s.borderCapStyle||d.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||d.borderDash),l.lineDashOffset=s.borderDashOffset||d.borderDashOffset,l.lineJoin=s.borderJoinStyle||d.borderJoinStyle,l.lineWidth=s.borderWidth||d.borderWidth,l.strokeStyle=s.borderColor||r.defaultColor,l.beginPath(),h=-1,t=0;te?1:-1,r=1,s=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,a=u.y,i=1,r=(o=u.base)>a?1:-1,s=u.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(e-n),Math.abs(a-o)),h=(c=c>d?d:c)/2,f=e+("left"!==s?h*i:0),p=n+("right"!==s?-h*i:0),g=a+("top"!==s?h*r:0),v=o+("bottom"!==s?-h*r:0);f!==p&&(a=g,o=v),g!==v&&(e=f,n=p)}l.beginPath(),l.fillStyle=u.backgroundColor,l.strokeStyle=u.borderColor,l.lineWidth=c;var m=[[e,o],[e,a],[n,a],[n,o]],b=["bottom","left","top","right"].indexOf(s,0);-1===b&&(b=0);var x=t(0);l.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),l.lineTo(x[0],x[1]);l.fill(),c&&l.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var a=o(this);n=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=o(n);return a(n)?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,n=this._view;return a(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return 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,n){"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,n){"use strict";var a=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,a,o,i){if(i){var r=Math.min(i,a/2),s=Math.min(i,o/2);t.moveTo(e+r,n),t.lineTo(e+a-r,n),t.quadraticCurveTo(e+a,n,e+a,n+s),t.lineTo(e+a,n+o-s),t.quadraticCurveTo(e+a,n+o,e+a-r,n+o),t.lineTo(e+r,n+o),t.quadraticCurveTo(e,n+o,e,n+o-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,a,o)},drawPoint:function(t,e,n,a,o){var i,r,s,u,c,d;if("object"!=l(e)||"[object HTMLImageElement]"!==(i=e.toString())&&"[object HTMLCanvasElement]"!==i){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(a,o,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(a-r/2,o+c/3),t.lineTo(a+r/2,o+c/3),t.lineTo(a,o-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(a-d,o-d,2*d,2*d),t.strokeRect(a-d,o-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=a-h,p=o-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,f,p,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(a-d,o),t.lineTo(a,o+d),t.lineTo(a+d,o),t.lineTo(a,o-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"star":t.beginPath(),t.moveTo(a,o+n),t.lineTo(a,o-n),t.moveTo(a-n,o),t.lineTo(a+n,o),s=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(a-s,o-u),t.lineTo(a+s,o+u),t.moveTo(a-s,o+u),t.lineTo(a+s,o-u),t.closePath();break;case"line":t.beginPath(),t.moveTo(a-n,o),t.lineTo(a+n,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(a,o),t.lineTo(a+n,o),t.closePath()}t.stroke()}}else t.drawImage(e,a-e.width/2,o-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,a){if(n.steppedLine)return"after"===n.steppedLine&&!a||"after"!==n.steppedLine&&a?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(a?e.controlPointPreviousX:e.controlPointNextX,a?e.controlPointPreviousY:e.controlPointNextY,a?n.controlPointNextX:n.controlPointPreviousX,a?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},a.clear=n.clear,a.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var a={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),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 a.valueOrDefault(a.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,o){var i,r,s;if(a.isArray(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:1===t?1:(n||(n=.3),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,a=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),a<1?(a=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.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*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},a.easingEffects=o},{42:42}],44:[function(t,e,n){"use strict";var a=t(42);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,o,i;return a.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,i=+t.left||0):e=n=o=i=+t||0,{top:e,right:n,bottom:o,left:i,height:e+o,width:i+n}},resolve:function(t,e,n){var o,i,r;for(o=0,i=t.length;o
    ';var i=e.childNodes[0],r=e.childNodes[1];e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return o(i,"scroll",s.bind(i,"expand")),o(r,"scroll",s.bind(r,"shrink")),e}(function(t,e){var n=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,u.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,a)})))}}((function(){if(a.resizer)return e(r("resize",n))})));!function(t,e){var n=(t[c]||(t[c]={})).renderProxy=function(t){t.animationName===f&&e()};u.each(p,(function(e){o(t,e,n)})),t.classList.add(h)}(t,(function(){if(a.resizer){var e=t.parentNode;e&&e!==i.parentNode&&e.insertBefore(i,e.firstChild),i._reset()}}))}function l(t){var e=t[c]||{},n=e.resizer;delete e.resizer,function(t){var e=t[c]||{},n=e.renderProxy;n&&(u.each(p,(function(e){i(t,e,n)})),delete e.renderProxy),t.classList.remove(h)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var u=t(45),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],g={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},v=!!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};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+f+"{"+t+"}@keyframes "+f+"{"+t+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}")},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,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[c]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var r=a(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=a(t,"height");void 0!==r&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach((function(t){var a=n[t];u.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),u.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var i=n[c]||(n[c]={});o(a,e,(i.proxies||(i.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=g[t.type]||t.type,a=u.getRelativePosition(t,e);return r(n,e,a.x,a.y,t)}(e,t))})}else s(a,n,t)},removeEventListener:function(t,e,n){var a=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&i(a,e,o)}else l(a)}},u.addEvent=o,u.removeEvent=i},{45:45}],48:[function(t,e,n){"use strict";var a=t(45),o=t(46),i=t(47),r=i._enabled?i:o;e.exports=a.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var a=t(25),o=t(40),i=t(45);a._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var a,o=t._model||{},i=o.fill;if(void 0===i&&(i=!!o.backgroundColor),!1===i||null===i)return!1;if(!0===i)return"origin";if(a=parseFloat(i,10),isFinite(a)&&Math.floor(a)===a)return"-"!==i[0]&&"+"!==i[0]||(a=e+a),!(a===e||a<0||a>=n)&&a;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function e(t){var e,n=t.el._model||{},a=t.el._scale||{},o=t.fill,i=null;if(isFinite(o))return null;if("start"===o?i=void 0===n.scaleBottom?a.bottom:n.scaleBottom:"end"===o?i=void 0===n.scaleTop?a.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:a.getBasePosition?i=a.getBasePosition():a.getBasePixel&&(i=a.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if("number"==typeof i&&isFinite(i))return{x:(e=a.isHorizontal())?i:null,y:e?null:i}}return null}function n(t,e,n){var a,o=t[e].fill,i=[e];if(!n)return o;for(;!1!==o&&-1===i.indexOf(o);){if(!isFinite(o))return o;if(!(a=t[o]))return!1;if(a.visible)return o;i.push(o),o=a.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),c[n](t))}function s(t){return t&&!t.skip}function l(t,e,n,a,o){var r;if(a&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r0;--r)i.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,a,o,i){var r,u,c,d,h,f,p,g=e.length,v=a.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=g+!!i;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var a=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,a,n),r.addBox(e,a),e.legend=a}var r=t.layoutService,s=i.noop;return t.Legend=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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||{},n=i.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:s,beforeFit:s,fit:function(){var t=this,n=t.options,o=n.labels,r=n.display,s=t.ctx,l=a.global,u=i.valueOrDefault,c=u(o.fontSize,l.defaultFontSize),d=u(o.fontStyle,l.defaultFontStyle),h=u(o.fontFamily,l.defaultFontFamily),f=i.fontString(c,d,h),p=t.legendHitBoxes=[],g=t.minSize,v=t.isHorizontal();if(v?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?c+o.padding:0;s.textAlign="left",s.textBaseline="top",i.each(t.legendItems,(function(n,a){var i=e(o,c)+c/2+s.measureText(n.text).width;m[m.length-1]+i+o.padding>=t.width&&(b+=c+o.padding,m[m.length]=t.left),p[a]={left:0,top:0,width:i,height:c},m[m.length-1]+=i+o.padding})),g.height+=b}else{var x=o.padding,y=t.columnWidths=[],k=o.padding,w=0,C=0,S=c+x;i.each(t.legendItems,(function(t,n){var a=e(o,c)+c/2+s.measureText(t.text).width;C+S>g.height&&(k+=w+o.padding,y.push(w),w=0,C=0),w=Math.max(w,a),C+=S,p[n]={left:0,top:0,width:a,height:c}})),k+=w,y.push(w),g.width+=k}t.width=g.width,t.height=g.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,o=n.labels,r=a.global,s=r.elements.line,l=t.width,u=t.lineWidths;if(n.display){var c,d=t.ctx,h=i.valueOrDefault,f=h(o.fontColor,r.defaultFontColor),p=h(o.fontSize,r.defaultFontSize),g=h(o.fontStyle,r.defaultFontStyle),v=h(o.fontFamily,r.defaultFontFamily),m=i.fontString(p,g,v);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=m;var b=e(o,p),x=t.legendHitBoxes,y=function(t,e,a){if(!(isNaN(b)||b<=0)){d.save(),d.fillStyle=h(a.fillStyle,r.defaultColor),d.lineCap=h(a.lineCap,s.borderCapStyle),d.lineDashOffset=h(a.lineDashOffset,s.borderDashOffset),d.lineJoin=h(a.lineJoin,s.borderJoinStyle),d.lineWidth=h(a.lineWidth,s.borderWidth),d.strokeStyle=h(a.strokeStyle,r.defaultColor);var o=0===h(a.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(h(a.lineDash,s.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=e+u;i.canvas.drawPoint(d,a.pointStyle,l,c,f)}else o||d.strokeRect(t,e,b,p),d.fillRect(t,e,b,p);d.restore()}},k=t.isHorizontal();c=k?{x:t.left+(l-u[0])/2,y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+o.padding,line:0};var w=p+o.padding;i.each(t.legendItems,(function(e,n){var a=d.measureText(e.text).width,i=b+p/2+a,r=c.x,s=c.y;k?r+i>=l&&(s=c.y+=w,c.line++,r=c.x=t.left+(l-u[c.line])/2):s+w>t.bottom&&(r=c.x=r+t.columnWidths[c.line]+o.padding,s=c.y=t.top+o.padding,c.line++),y(r,s,e),x[n].left=r,x[n].top=s,function(t,e,n,a){var o=p/2,i=b+o+t,r=e+o;d.fillText(n.text,i,r),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,r),d.lineTo(i+a,r),d.stroke())}(r,s,e,a),k?c.x+=i+o.padding:c.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,a="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var i=t.x,r=t.y;if(i>=e.left&&i<=e.right&&r>=e.top&&r<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&i<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===a){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===a){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(i.mergeIf(e,a.global.legend),o?(r.configure(t,o,e),o.options=e):n(t,e)):o&&(r.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var a=t(25),o=t(26),i=t(45);a._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,a){var o=new t.Title({ctx:e.ctx,options:a,chart:e});n.configure(e,o,a),n.addBox(e,o),e.titleBlock=o}var n=t.layoutService,r=i.noop;return t.Title=o.extend({initialize:function(t){i.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a.margins=n,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.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=this,e=i.valueOrDefault,n=t.options,o=n.display,r=e(n.fontSize,a.global.defaultFontSize),s=t.minSize,l=i.isArray(n.text)?n.text.length:1,u=i.options.toLineHeight(n.lineHeight,r),c=o?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=i.valueOrDefault,o=t.options,r=a.global;if(o.display){var s,l,u,c=n(o.fontSize,r.defaultFontSize),d=n(o.fontStyle,r.defaultFontStyle),h=n(o.fontFamily,r.defaultFontFamily),f=i.fontString(c,d,h),p=i.options.toLineHeight(o.lineHeight,c),g=p/2+o.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(o.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(y-b)/2,u=m+g,s=y-b):(l="left"===o.position?b+g:y-g,u=m+(x-m)/2,s=x-m,v=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=o.text;if(i.isArray(k))for(var w=0,C=0;Ce.max)&&(e.max=a))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var i=o.valueOrDefault(n.fontSize,a.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.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,n=this,a=n.start,o=+n.getRightValue(t),i=n.end-a;return n.isHorizontal()?(e=n.left+n.width/i*(o-a),Math.round(e)):(e=n.bottom-n.height/i*(o-a),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),a=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/a;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e=a.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 n=a.sign(t.min),o=a.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var i=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)),i!==r&&t.min>=t.max&&(i?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,stepSize:a.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=o.generators.linear(i,t);t.handleDirectionalChanges(),t.max=a.max(r),t.min=a.min(r),e.reverse?(r.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)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,o=n.ticks,i=e.chart,r=i.data.datasets,s=a.valueOrDefault,l=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&a.each(r,(function(e,n){if(!u){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(u=!0)}})),n.stacked||u){var c={};a.each(r,(function(o,r){var s=i.getDatasetMeta(r),l=[s.type,void 0===n.stacked&&void 0===s.stack?r:"",s.stack].join(".");i.isDatasetVisible(r)&&t(s)&&(void 0===c[l]&&(c[l]=[]),a.each(o.data,(function(t,a){var o=c[l],i=+e.getRightValue(t);isNaN(i)||s.data[a].hidden||(o[a]=o[a]||0,n.relativePoints?o[a]=100:o[a]+=i)})))})),a.each(c,(function(t){var n=a.min(t),o=a.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)}))}else a.each(r,(function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,(function(t,n){var a=+e.getRightValue(t);isNaN(a)||r.data[n].hidden||((null===e.min||ae.max)&&(e.max=a),0!==a&&(null===e.minNotZero||ao?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function u(t,e,n,a){if(o.isArray(e))for(var i=n.y,r=1.5*a,s=0;s270||t<90)&&(n.y-=e.h)}function d(t){var a=t.ctx,i=o.valueOrDefault,r=t.options,s=r.angleLines,d=r.pointLabels;a.lineWidth=s.lineWidth,a.strokeStyle=s.color;var h=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);a.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(s.display){var v=t.getPointPosition(g,h);a.beginPath(),a.moveTo(t.xCenter,t.yCenter),a.lineTo(v.x,v.y),a.stroke(),a.closePath()}if(d.display){var m=t.getPointPosition(g,h+5),b=i(d.fontColor,p.defaultFontColor);a.font=f.font,a.fillStyle=b;var x=t.getIndexAngle(g),y=o.toDegrees(x);a.textAlign=l(y),c(y,t._pointLabelSizes[g],m),u(a,t.pointLabels[g]||"",m,f.size)}}}function h(t,n,a,i){var r=t.ctx;if(r.strokeStyle=o.valueAtIndexOrDefault(n.color,i-1),r.lineWidth=o.valueAtIndexOrDefault(n.lineWidth,i-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,a,0,2*Math.PI),r.closePath(),r.stroke();else{var s=e(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,a);r.moveTo(l.x,l.y);for(var u=1;ud.r&&(d.r=v.end,h.r=p),m.startd.b&&(d.b=m.end,h.b=p)}t.setReductions(c,d,h)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var a=this,o=e.l/Math.sin(n.l),i=Math.max(e.r-a.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),s=-Math.max(e.b-a.height,0)/Math.cos(n.b);o=f(o),i=f(i),r=f(r),s=f(s),a.drawingArea=Math.min(Math.round(t-(o+i)/2),Math.round(t-(r+s)/2)),a.setCenterPoint(o,i,r,s)},setCenterPoint:function(t,e,n,a){var o=this,i=o.width-e-o.drawingArea,r=t+o.drawingArea,s=n+o.drawingArea,l=o.height-a-o.drawingArea;o.xCenter=Math.round((r+i)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,a=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(a)*e)+n.xCenter,y:Math.round(Math.sin(a)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,a=e.ticks,i=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=i(a.fontSize,p.defaultFontSize),u=i(a.fontStyle,p.defaultFontStyle),c=i(a.fontFamily,p.defaultFontFamily),f=o.fontString(l,u,c);o.each(t.ticks,(function(e,o){if(o>0||a.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(n.display&&0!==o&&h(t,n,u,o),a.display){var c=i(a.fontColor,p.defaultFontColor);if(r.font=f,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),a.showLabelBackdrop){var d=r.measureText(e).width;r.fillStyle=a.backdropColor,r.fillRect(-d/2-a.backdropPaddingX,-u-l/2-a.backdropPaddingY,d+2*a.backdropPaddingX,l+2*a.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=c,r.fillText(e,0,-u),r.restore()}}})),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",v,g)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function a(t,e){return t-e}function o(t){var e,n,a,o={},i=[];for(e=0,n=t.length;e=0&&r<=s;){if(o=t[(a=r+s>>1)-1]||null,i=t[a],!o)return{lo:null,hi:i};if(i[e]n))return{lo:o,hi:i};s=a-1}}return{lo:i,hi:null}}(t,e,n),i=o.lo?o.hi?o.lo:t[t.length-2]:t[0],r=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=r[e]-i[e],l=s?(n-i[e])/s:0,u=(r[a]-i[a])*l;return i[a]+u}function r(t,e){var n=e.parser,a=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof a?h(t,a):(t instanceof h||(t=h(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function s(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,a=r(e.getRightValue(t),n);return a.isValid()?(n.round&&a.startOf(n.round),a.valueOf()):null}function l(t,e,n,a){var o,i,r,s=b.length;for(o=b.indexOf(t);o1?e[1]:a,s=e[0],l=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2),o.time.max||(r=e[e.length-1],s=e.length>1?e[e.length-2]:n,u=(i(t,"time",r,"pos")-i(t,"time",s,"pos"))/2)),{left:l,right:u}}function d(t,e){var n,a,o,i,r=[];for(n=0,a=t.length;n=o&&n<=i&&y.push(n);return a.min=o,a.max=i,a._unit=g,a._majorUnit=v,a._minorFormat=f[g],a._majorFormat=f[v],a._table=function(t,e,n,a){if("linear"===a||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,i,r,s,l,u=[],c=[e];for(o=0,i=t.length;oe&&s=0&&t{function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}n(8636),n(5086),n(8329),n(8772),n(4913),n(9693),n(115),n(7136),n(173),n(9073),n(6048),n(9581),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e=function(e,n){t.fn.typeahead.defaults;n.scrollBar&&(n.items=100,n.menu='');var a=this;if(a.$element=t(e),a.options=t.extend({},t.fn.typeahead.defaults,n),a.$menu=t(a.options.menu).insertAfter(a.$element),a.eventSupported=a.options.eventSupported||a.eventSupported,a.grepper=a.options.grepper||a.grepper,a.highlighter=a.options.highlighter||a.highlighter,a.lookup=a.options.lookup||a.lookup,a.matcher=a.options.matcher||a.matcher,a.render=a.options.render||a.render,a.onSelect=a.options.onSelect||null,a.sorter=a.options.sorter||a.sorter,a.source=a.options.source||a.source,a.displayField=a.options.displayField||a.displayField,a.valueField=a.options.valueField||a.valueField,a.options.ajax){var o=a.options.ajax;"string"==typeof o?a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,{url:o}):("string"==typeof o.displayField&&(a.displayField=a.options.displayField=o.displayField),"string"==typeof o.valueField&&(a.valueField=a.options.valueField=o.valueField),a.ajax=t.extend({},t.fn.typeahead.defaults.ajax,o)),a.ajax.url||(a.ajax=null),a.query=""}else a.source=a.options.source,a.ajax=null;a.shown=!1,a.listen()};e.prototype={constructor:e,eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},select:function(){var t=this.$menu.find(".active").attr("data-value"),e=this.$menu.find(".active a").text();return this.options.onSelect&&this.options.onSelect({value:t,text:e}),this.$element.val(this.updater(e)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});if(this.$menu.css({top:e.top+e.height,left:e.left}),this.options.alignWidth){var n=t(this.$element[0]).outerWidth();this.$menu.css({width:n})}return this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},ajaxLookup:function(){var e=t.trim(this.$element.val());if(e===this.query)return this;if(this.query=e,this.ajax.timerId&&(clearTimeout(this.ajax.timerId),this.ajax.timerId=null),!e||e.length"+e+""}))},render:function(e){var n,o=this,i="string"==typeof o.options.displayField;return(e=t(e).map((function(e,r){return"object"===a(r)?(n=i?r[o.options.displayField]:o.options.displayField(r),e=t(o.options.item).attr("data-value",r[o.options.valueField])):(n=r,e=t(o.options.item).attr("data-value",r)),e.find("a").html(o.highlighter(n)),e[0]}))).first().addClass("active"),this.$menu.html(e),this},grepper:function(e){var n,a,o=this,i="string"==typeof o.options.displayField;if(!(i&&e&&e.length))return null;if(e[0].hasOwnProperty(o.options.displayField))n=t.grep(e,(function(t){return a=i?t[o.options.displayField]:o.options.displayField(t),o.matcher(a)}));else{if("string"!=typeof e[0])return null;n=t.grep(e,(function(t){return o.matcher(t)}))}return this.sorter(n)},next:function(e){var n=this.$menu.find(".active").removeClass("active").next();if(n.length||(n=t(this.$menu.find("li")[0])),this.options.scrollBar){var a=this.$menu.children("li").index(n);a%8==0&&this.$menu.scrollTop(26*a)}n.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active").prev();if(e.length||(e=this.$menu.find("li").last()),this.options.scrollBar){var n=this.$menu.children("li"),a=n.length-1,o=n.index(e);(a-o)%8==0&&this.$menu.scrollTop(26*(o-7))}e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.ajax?this.ajaxLookup():this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},destroy:function(){this.$element.off("focus",t.proxy(this.focus,this)).off("blur",t.proxy(this.blur,this)).off("keypress",t.proxy(this.keypress,this)).off("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.off("keydown",t.proxy(this.keydown,this)),this.$menu.off("click",t.proxy(this.click,this)).off("mouseenter","li",t.proxy(this.mouseenter,this)).off("mouseleave","li",t.proxy(this.mouseleave,this)),this.$element.removeData("typeahead")}},t.fn.typeahead=function(n){return this.each((function(){var o=t(this),i=o.data("typeahead"),r="object"===a(n)&&n;i||o.data("typeahead",i=new e(this,r)),"string"==typeof n&&i[n]()}))},t.fn.typeahead.defaults={source:[],items:10,scrollBar:!1,alignWidth:!0,menu:'',item:'
  • ',valueField:"id",displayField:"name",onSelect:function(){},ajax:{url:null,timeout:300,method:"get",triggerLength:1,loadingClass:null,preDispatch:null,preProcess:null}},t.fn.typeahead.Constructor=e,t((function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(e){var n=t(this);n.data("typeahead")||(e.preventDefault(),n.typeahead(n.data()))}))}))}(window.jQuery)},2811:function(t,e,n){var a,o;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n(4913),n(475),n(115),n(9693),n(8636),n(5086),n(7136),n(173),n(2231),n(6255),n(9389),n(6048),n(9581),n(6088),n(9073),n(3534),n(590),n(4216),n(8665),n(9979),n(4602),function(t){"use strict";var e,n,a=Array.prototype.slice;(n=function(e){this.options=t.extend({},n.defaults,e),this.parser=this.options.parser,this.locale=this.options.locale,this.messageStore=this.options.messageStore,this.languages={},this.init()}).prototype={init:function(){var e=this;String.locale=e.locale,String.prototype.toLocaleString=function(){var n,a,o,i,r,s,l;for(o=this.valueOf(),i=e.locale,r=0;i;){a=(n=i.split("-")).length;do{if(s=n.slice(0,a).join("-"),l=e.messageStore.get(s,o))return l;a--}while(a);if("en"===i)break;i=t.i18n.fallbacks[e.locale]&&t.i18n.fallbacks[e.locale][r]||e.options.fallbackLocale,t.i18n.log("Trying fallback locale for "+e.locale+": "+i),r++}return""}},destroy:function(){t.removeData(document,"i18n")},load:function(e,n){var a,o,i,r={};if(e||n||(e="i18n/"+t.i18n().locale+".json",n=t.i18n().locale),"string"==typeof e&&"json"!==e.split(".").pop()){for(o in r[n]=e+"/"+n+".json",a=(t.i18n.fallbacks[n]||[]).concat(this.options.fallbackLocale))r[i=a[o]]=e+"/"+i+".json";return this.load(r)}return this.messageStore.load(e,n)},parse:function(e,n){var a=e.toLocaleString();return this.parser.language=t.i18n.languages[t.i18n().locale]||t.i18n.languages.default,""===a&&(a=e),this.parser.parse(a,n)}},t.i18n=function(e,o){var r,s=t.data(document,"i18n"),l="object"===i(e)&&e;return l&&l.locale&&s&&s.locale!==l.locale&&(String.locale=s.locale=l.locale),s||(s=new n(l),t.data(document,"i18n",s)),"string"==typeof e?(r=void 0!==o?a.call(arguments,1):[],s.parse(e,r)):s},t.fn.i18n=function(){var e=t.data(document,"i18n");return e||(e=new n,t.data(document,"i18n",e)),String.locale=e.locale,this.each((function(){var n,a,o,i,r=t(this),s=r.data("i18n");s?(n=s.indexOf("["),a=s.indexOf("]"),-1!==n&&-1!==a&&n1?["CONCAT"].concat(t):t[0]}function P(){var t=w([h,n,I]);return null===t?null:[t[0],t[2]]}function A(){var t=w([h,n,v]);return null===t?null:[t[0],t[2]]}function T(){var t=w([f,d,p]);return null===t?null:t[1]}if(e=S("|"),n=S(":"),a=S("\\"),o=M(/^./),i=S("$"),r=M(/^\d+/),s=M(/^[^{}\[\]$\\]/),l=M(/^[^{}\[\]$\\|]/),k([_,M(/^[^{}\[\]$\s]/)]),u=k([_,l]),c=k([_,s]),b=M(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),x=function(t){return t.toString()},h=function(){var t=b();return null===t?null:x(t)},d=k([function(){var t=w([k([P,A]),C(0,D)]);return null===t?null:t[0].concat(t[1])},function(){var t=w([h,C(0,D)]);return null===t?null:[t[0]].concat(t[1])}]),f=S("{{"),p=S("}}"),g=k([T,I,function(){var t=C(1,c)();return null===t?null:t.join("")}]),v=k([T,I,function(){var t=C(1,u)();return null===t?null:t.join("")}]),null===(m=function(){var t=C(0,g)();return null===t?null:["CONCAT"].concat(t)}())||y!==t.length)throw new Error("Parse error at position "+y.toString()+" in input: "+t);return m}},t.extend(t.i18n.parser,new e)}(jQuery),function(t){"use strict";var e=function(){this.language=t.i18n.languages[String.locale]||t.i18n.languages.default};e.prototype={constructor:e,emit:function(e,n){var a,o,r,s=this;switch(i(e)){case"string":case"number":a=e;break;case"object":if(o=t.map(e.slice(1),(function(t){return s.emit(t,n)})),r=e[0].toLowerCase(),"function"!=typeof s[r])throw new Error('unknown operation "'+r+'"');a=s[r](o,n);break;case"undefined":a="";break;default:throw new Error("unexpected type in AST: "+i(e))}return a},concat:function(e){var n="";return t.each(e,(function(t,e){n+=e})),n},replace:function(t,e){var n=parseInt(t[0],10);return n=parseInt(t[0],10)&&e[0]{},1536:()=>{},2559:()=>{},2553:()=>{},5264:()=>{},6387:()=>{},5985:()=>{},63:()=>{},3888:()=>{},7278:()=>{},3704:()=>{}},t=>{var e=e=>t(t.s=e);t.O(0,[95],(()=>(e(2811),e(7852),e(6108),e(5779),e(6618),e(3441),e(1680),e(9654),e(5611),e(3600),e(514),e(9307),e(6730),e(1595),e(1223),e(9662),e(63),e(1536),e(2559),e(2553),e(5264),e(6387),e(5985),e(3888),e(3704),e(7278))));t.O()}]); \ No newline at end of file diff --git a/public/build/app.f4fc5d0a.js.LICENSE.txt b/public/build/app.f4fc5d0a.js.LICENSE.txt deleted file mode 100644 index f8a2a02bd..000000000 --- a/public/build/app.f4fc5d0a.js.LICENSE.txt +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Chart.js - * http://chartjs.org/ - * Version: 2.7.0 - * - * Copyright 2017 Nick Downie - * Released under the MIT license - * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do - * anything special to choose one license or the other and you don't have to - * notify anyone which license you are using. You are free to use - * UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ - -/*! - * jQuery Internationalization library - Message Store - * - * Copyright (C) 2012 Santhosh Thottingal - * - * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to - * choose one license or the other and you don't have to notify anyone which license you are using. - * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright - * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details. - * - * @licence GNU General Public Licence 2.0 or later - * @licence MIT License - */ diff --git a/public/build/app.a18ea92e.css b/public/build/app.fb116d63.css similarity index 61% rename from public/build/app.a18ea92e.css rename to public/build/app.fb116d63.css index a0d3251d8..2fc3d6b62 100644 --- a/public/build/app.a18ea92e.css +++ b/public/build/app.fb116d63.css @@ -1 +1 @@ -@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}body.rtl .side-to-side>div{margin:0 0 15px 10px}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;margin:0 10px 15px 0;vertical-align:top}.side-to-side{clear:both}.link-loading{font-style:italic;pointer-events:none}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file +@charset "UTF-8";.contributions-nav{margin-bottom:10px}.contributions-nav:last-child{margin-bottom:0}.contributions-limit--wrapper{-webkit-transform:translateY(-5px);-moz-transform:translateY(-5px);-ms-transform:translateY(-5px);-o-transform:translateY(-5px);transform:translateY(-5px)}.contributions-limit--wrapper label{font-weight:400}.contributions-loading{display:none;float:left}.contributions-container--loading{opacity:.3}.contributions-container--loading .contributions-nav{visibility:hidden}.contributions-container--loading .contributions-loading{display:block}html{height:100%}body{background:url(/build/images/gradient.bc9a6010.png);min-height:100%;position:relative}body:after{content:"";display:block;min-height:148px}body.rtl{direction:rtl}body.rtl .tool-links{float:right;padding-right:0!important}body.rtl .tool-links .nav{padding-right:0}body.rtl .tool-links .nav li{float:right}body.rtl .lang-group ul{left:0;right:auto;text-align:right}body.rtl .nav-buttons{float:left!important;margin-left:8px;margin-right:0}body.rtl .navbar-toggle{float:right!important}body.rtl .back-to-search{left:auto;right:0}body.rtl .back-to-search .glyphicon-chevron-left{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}@media (max-width:767px){body.rtl .tool-links li{float:none!important}}body.rtl .form-row:first-child>:first-child{border-top-left-radius:0;border-top-right-radius:4px}body.rtl .form-row:first-child>:last-child{border-top-left-radius:4px;border-top-right-radius:0}body.rtl .input-group-addon:first-child{border-left:0;border-right:1px solid #ccc}body.rtl .form-row:last-child>:first-child{border-bottom-left-radius:0;border-bottom-right-radius:4px}body.rtl .form-row:last-child>:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:0}body.rtl .input-group-addon:last-child{border-left:1px solid #ccc;border-right:0}body.rtl .form-label{text-align:right}body.rtl .form-label .tooltipcss{float:left!important}body.rtl .tooltip-body{margin-left:0;margin-right:28px;text-align:right}body.rtl .tooltip-body:after,body.rtl .tooltip-body:before{left:100%;right:auto}body.rtl .tooltip-body:before{border-color:transparent transparent transparent #dca}body.rtl .tooltip-body:after{border-color:transparent transparent transparent #fffaf0}body.rtl .typeahead{text-align:right}body.rtl .app-footer .footer-about{padding-right:15px}body.rtl .app-footer .footer-branding{float:left!important}body.rtl .table td,body.rtl .table th{text-align:right}@media (min-width:1200px){body.rtl .stat-list{float:right!important}}body.rtl .stat-list>.table td:first-child,body.rtl .stat-list>.table th:first-child{text-align:left}body.rtl .stat-list>.table td:last-child,body.rtl .stat-list>.table th:last-child{text-align:right}@media (max-width:767px){body.rtl .stat-list>.table td:first-child{text-align:right}}body.rtl .panel{text-align:right}body.rtl .toggle-table{float:right}body.rtl .toggle-table--chart{float:right;margin-left:0!important;margin-right:100px!important}body.rtl .chart-legend{margin-left:0;margin-right:15px}body.rtl .chart-legend .color-icon{margin-left:5px;margin-right:0}body.rtl .chart-wrapper{float:right;margin-left:50px;margin-right:0}body.rtl .xt-panel-description{float:left!important}body.rtl .dropdown-menu-right{left:0;right:auto;text-align:right}body.rtl .times-in-utc{float:right}body.rtl.pageinfo .legend-body{text-align:right}body.rtl.pageinfo .sort-entry--assessment,body.rtl.pageinfo .sort-entry--importance{text-align:center}body.rtl.pageinfo .date-range{left:30px;right:auto}body.rtl .rm-inline-margin{margin-left:-4px;margin-right:0}body.rtl .diff-pos:before{display:none}body.rtl .diff-pos:after{color:#006400;content:"+"}body.rtl .side-to-side>div{margin:0 0 15px 10px}.strong{font-weight:700}#wrapper{background:#fff;border-radius:5px;margin:15px}.site-notice{margin:0 15px}.navbar-top{border-top:0;min-height:51px;padding:0}.navbar-top li:last-child{padding-right:0}.tool-links{float:left;padding:0}.tool-links.in{position:relative;top:8px}.tool-links .nav{margin:0}.nav-buttons{left:1px;margin-right:8px;position:relative;top:8px}.nav-buttons li{padding:0 2px}.navbar-nav>li>a{height:50px;line-height:50px;padding:0 10px}.home-link{bottom:1px;padding:0 12px;position:relative}.home-link:after{background:#e7e7e7;bottom:0;content:"";display:inline-block;height:80%;left:100%;margin:auto;position:absolute;top:3px;width:1px}.home-link img{height:32px}.navbar-toggle{left:5px;margin:0;position:relative;top:9px}.lang-group .dropdown-menu{max-height:194px;overflow-y:scroll}.lang-group .btn{padding-left:30px}.lang-group svg{height:17px;left:8px;position:absolute;top:8px;width:17px}.login-btn .glyphicon-user{padding-right:2px;top:2px}.xt-page-title>small:before{content:"•";margin-right:10px}.tooltipcss{position:static;text-decoration:none}.tooltipcss .tooltip-body{background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:5px 5px 8px #ccc;color:#111;display:none;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:16px;margin-left:28px;max-width:350px;min-width:200px;padding:14px 20px;text-align:left;white-space:normal;z-index:10}.tooltip-body:after,.tooltip-body:before,.tooltipcss .tooltip-body{position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.tooltip-body:after,.tooltip-body:before{border-style:solid;color:transparent;content:"";display:block;height:0;right:100%;width:0}.tooltip-body:before{border-color:transparent #ddd transparent transparent;border-width:11px}.tooltip-body:after{border-color:transparent #fff transparent transparent;border-width:10px}.tooltipcss:hover .tooltip-body{display:block}.callout{border:0;left:-12px;position:absolute;top:30px;z-index:20}.form-label{min-width:15em;text-align:left;white-space:normal}.xt-heading-top{font-size:1.8em;margin-bottom:0;padding-bottom:0;position:relative}.xt-heading-subtitle{margin-top:3px}.back-to-search{font-size:16px;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.back-to-search:hover{text-decoration:none}.date-range{font-size:70%;position:absolute;right:30px;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}@media (max-width:767px){.date-range{display:block;left:0;position:relative;top:0;transform:none}}.xt-toc{background:#fff;font-size:110%;margin-top:20px;padding:10px;width:100%;z-index:100}.xt-toc span:after{content:" • "}.xt-toc span:last-child:after{content:""}.xt-toc .bold{font-weight:700}.xt-toc.fixed{box-shadow:5px 5px 8px #ccc;left:50%;margin:0;position:fixed;top:0;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap;width:auto}.table-sticky-header{position:relative}.table-sticky-header .sticky-heading{background:#fff;left:0;position:absolute;top:0}.xt-alert{margin:0;padding:10px;text-align:center}.xt-alert:not(:first-child){margin-top:10px}.xt-alert .close{opacity:.8;right:0;top:0}.xt-error-alert{margin-top:20px}.xt-error-alert:only-child{margin:0}.panel-primary>.panel-heading a{color:#fff}section>.panel-body{overflow-x:auto}.panel-body .alert:last-child,.panel-body .table:only-child{margin-bottom:0}.xt-panel-body table{clear:both;white-space:nowrap}.xt-panel-body .panel-body{width:100%}.xt-table>tbody>tr>td{padding-bottom:1px;padding-top:1px;vertical-align:top}.xt-table>tbody>tr>th{font-weight:400;padding:5px 2px;white-space:nowrap}.xt-show{display:none}.xt-hide,.xt-show{bottom:2px;cursor:pointer;position:relative}.xt-hide:hover,.xt-show:hover{text-decoration:underline}.xt-panel-description{font-size:80%;font-weight:400;line-height:normal;margin-left:8px}.inline-block{display:inline-block}.table .show-more-row td{border:0}.xt-pagination{margin:0}.panel-danger,.panel-default,.panel-primary{margin-bottom:0}.panel-default{margin-top:20px;text-align:left}.panel-default>.panel-heading{padding:5px 10px}.login{background-image:linear-gradient(transparent,transparent),url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTMuODM3Ij48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImUiPjxzdG9wIG9mZnNldD0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIwIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzNiNzRiYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzJkNTk5MCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJjIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjOWM5YzkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYSI+PHN0b3Agb2Zmc2V0PSIwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZjRkOWIxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZGY5NzI1Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgeDE9IjMwLjkzNiIgeTE9IjI5LjU1MyIgeDI9IjMwLjkzNiIgeTI9IjM1LjgwMyIgaWQ9ImgiIHhsaW5rOmhyZWY9IiNjIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIvPjxsaW5lYXJHcmFkaWVudCB4MT0iMjAuNjYyIiB5MT0iMzUuODE4IiB4Mj0iMjIuNjI3IiB5Mj0iMzYuMjE4IiBpZD0iayIgeGxpbms6aHJlZj0iI2UiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDEwLjQ5IDE3LjU2MSAzMi42MykiLz48bGluZWFyR3JhZGllbnQgeDE9IjIyLjY4NyIgeTE9IjM2LjM5IiB4Mj0iMjEuNDA4IiB5Mj0iMzUuNzQiIGlkPSJsIiB4bGluazpocmVmPSIjZSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLS45NzggLjIxIC4yMSAuOTc4IDU1LjExIC0zLjk0NSkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJmIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI4LjA5IiBjeT0iMjcuMjAzIiByPSIxMy41NjUiIGZ4PSIyOC4wOSIgZnk9IjI3LjIwMyIgaWQ9ImciIHhsaW5rOmhyZWY9IiNiIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjI5OCAwIDAgLjg4NSAtOC4zNTkgNC45NCkiLz48cmFkaWFsR3JhZGllbnQgY3g9IjMxLjExMyIgY3k9IjE5LjAwOSIgcj0iOC42NjIiIGZ4PSIzMS4xMTMiIGZ5PSIxOS4wMDkiIGlkPSJpIiB4bGluazpocmVmPSIjYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiLz48cmFkaWFsR3JhZGllbnQgY3g9IjI5LjM0NSIgY3k9IjE3LjA2NCIgcj0iOS4xNjIiIGZ4PSIyOS4zNDUiIGZ5PSIxNy4wNjQiIGlkPSJqIiB4bGluazpocmVmPSIjZCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoLjc4OCAwIDAgLjc4OCA2LjIyMSAzLjYxOCkiLz48L2RlZnM+PGcgY29sb3I9IiMwMDAiPjxwYXRoIGQ9Ik0zOS43NzUgMTkuMDA5YTguNjYyIDguNjYyIDAgMSAxLTE3LjMyNCAwIDguNjYyIDguNjYyIDAgMSAxIDE3LjMyNCAweiIgdHJhbnNmb3JtPSJtYXRyaXgoLjY5MyAwIDAgLjM3NCAtMTUuNTQ4IDMuNDgxKSIgZmlsbD0idXJsKCNmKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvdmVyZmxvdz0idmlzaWJsZSIvPjxwYXRoIGQ9Ik00LjA0NiAxMi4zOThoNC4xMzdjMS4xNzIgMCAyLjMzMi0uNDMgMi43NTgtMS42NTUuNDA0LTEuMTYzLjA2OS0zLjM3OC0yLjU1MS01LjE3MUgzLjQ5NUMuODc1IDcuMjI3LjU0OCA5LjQ4OSAxLjE1MSAxMC44MTJjLjYxNCAxLjM0NyAxLjY1NSAxLjU4NiAyLjg5NiAxLjU4NnoiIGZpbGw9InVybCgjZykiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMjA0YTg3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBzdHJva2Utd2lkdGg9Ii4zOSIvPjxwYXRoIGQ9Ik00LjMyMSA2LjE5M2MxLjI0MSAxLjEwMyAxLjc5MyA1LjEwMiAxLjc5MyA1LjEwMnMuNTUyLTMuOTk5IDEuNTE3LTUuMTcxbC0zLjMwOS4wNjl6IiBmaWxsPSJ1cmwoI2gpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTUuMjEgNi42MDdzLS44MzkuNjQ4LS43NjcgMS40MjhjLS43OTYtLjcwMi0uODE5LTIuMDQ4LS44MTktMi4wNDhsMS41ODYuNjJ6IiBmaWxsPSIjNzI5ZmNmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0ibTQuMDE4IDExLjk5MiA0LjA5Mi0uMDA5YzEuMDI5IDAgMi4wNDktLjM3NyAyLjQyMi0xLjQ1My4zNTUtMS4wMjItLjAzNy0yLjk2Ny0yLjMzOC00LjU0MmwtNC40OTUtLjA5NUMxLjM5OCA3LjM0Ni45NTIgOS4zMzQgMS40OTEgMTAuNTljLjUzOCAxLjI1NiAxLjMyNCAxLjM5MyAyLjUyNiAxLjQwMXoiIG9wYWNpdHk9Ii4yMTUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIuMzkiLz48cGF0aCBkPSJNNi45NDEgNi42MDdzLjgzOS42NDguNzY3IDEuNDI4Yy43OTYtLjcwMi44MTktMi4wNDguODE5LTIuMDQ4bC0xLjU4Ni42MnoiIGZpbGw9IiM3MjlmY2YiIGZpbGwtcnVsZT0iZXZlbm9kZCIgb3ZlcmZsb3c9InZpc2libGUiLz48cGF0aCBkPSJNMzkuNzc1IDE5LjAwOWE4LjY2MiA4LjY2MiAwIDEgMS0xNy4zMjQgMCA4LjY2MiA4LjY2MiAwIDEgMSAxNy4zMjQgMHoiIHRyYW5zZm9ybT0ibWF0cml4KC4zOSAwIDAgLjM5IC02LjEzOCAtMi40NzUpIiBmaWxsPSJ1cmwoI2kpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTM5Ljc3NSAxOS4wMDlhOC42NjIgOC42NjIgMCAxIDEtMTcuMzI0IDAgOC42NjIgOC42NjIgMCAxIDEgMTcuMzI0IDB6IiBmaWxsPSJ1cmwoI2opIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI2MxN2QxMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvdmVyZmxvdz0idmlzaWJsZSIgdHJhbnNmb3JtPSJtYXRyaXgoLjM5IDAgMCAuMzkgLTYuMDg5IC0zLjg0KSIvPjxwYXRoIGQ9Ik05LjAwNSAzLjU3MmEyLjk2MiAyLjk2MiAwIDEgMS01LjkyNSAwIDIuOTYyIDIuOTYyIDAgMSAxIDUuOTI1IDB6IiBvcGFjaXR5PSIuMTk2IiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iLjM4OTg4IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG92ZXJmbG93PSJ2aXNpYmxlIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIuNDMzIDEyLjA2MmMtLjQ4Ny0uMjEzLS43MDQtLjcyNS0uNzA0LS43MjVDMi4wNTcgOS43NSAzLjE4IDguNTg5IDMuMTggOC41ODlzLS44ODkgMi41LS43NDYgMy40NzN6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2spIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PHBhdGggZD0iTTkuODA2IDExLjcyOGMuNDgtLjIyNy43MDQtLjc4MS43MDQtLjc4MS0uMzc0LTEuNTc3LTEuNTUxLTIuNjY5LTEuNTUxLTIuNjY5cy45NjEgMi40NzQuODQ3IDMuNDV6IiBvcGFjaXR5PSIuMjI4IiBmaWxsPSJ1cmwoI2wpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9nPjwvc3ZnPg==);background-position:0;background-repeat:no-repeat;line-height:1.125em;margin-top:.5em;padding-left:15px!important;white-space:nowrap}.app-footer{bottom:0;left:0;margin-top:30px;min-height:148px;padding:15px;position:absolute;width:100%}.app-footer hr{margin-bottom:0}.footer-content{padding-top:20px}.footer-about{display:inline;max-width:calc(100% - 200px)}.footer-branding,.footer-quote{white-space:nowrap}.footer-quote{display:inline-block;font-style:italic;max-width:100%;overflow-x:hidden;position:relative;text-overflow:ellipsis;top:8px}.lang-dropdown .dropdown-menu{height:194px;overflow-y:scroll}.navbar-default{background:transparent}.form-fieldset{margin-bottom:15px}.form-fieldset .checkbox{margin-bottom:0}.form-fieldset:nth-child(2){margin-top:-15px}.form-submit{margin-bottom:20px}.form-row>*{border-radius:0}.form-row .input-group-addon label{font-weight:400;margin:0}.form-row:first-child>:first-child{border-top-left-radius:4px}.form-row:first-child>:last-child{border-top-right-radius:4px}.form-row:last-child>:first-child{border-bottom-left-radius:4px}.form-row:last-child>.form-control:last-of-type{border-bottom-right-radius:4px}.form-control[disabled],.form-control[readonly]{background-color:transparent;cursor:not-allowed;opacity:.8}.stat-list{margin-bottom:20px}.stat-list caption{text-align:center}.panel-body .stat-list:only-child{margin-bottom:0}.stat-list>.table td,.stat-list>.table th{border:0;padding-bottom:0;padding-top:0;white-space:normal}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer),.stat-list>.table th:first-child:not(.non-label,.stat-list--footer){font-weight:700;text-align:right}.stat-list>.table td:first-child:not(.non-label,.stat-list--footer):after,.stat-list>.table th:first-child:not(.non-label,.stat-list--footer):after{content:":"}.stat-list--new-group{padding-top:10px!important}.stat-list tr:first-child>td.stat-list--new-group{padding-top:0!important}.stat-list--group{border-top:0!important}.stat-list--group>tr:first-child>td{border-bottom:1px solid #eee!important;padding-top:15px!important;text-align:center!important}.stat-list--group>tr:nth-child(2)>td{padding-top:5px!important}.color-icon{border-radius:100%;display:inline-block;height:15px;vertical-align:-2px;width:15px}.diff-pos{color:#006400}.diff-pos:before{color:#006400;content:"+"}.diff-neg{color:#8b0000}.diff-zero{color:#a2a9b1}.sort-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.sort-link .glyphicon{top:2px;visibility:hidden}.sort-link .glyphicon-sort-by-alphabet,.sort-link .glyphicon-sort-by-alphabet-alt,.sort-link:hover .glyphicon-sort{visibility:visible}.assessment-badge{height:20px;width:20px}.rm-inline-margin{margin-right:-4px}.rm-inline-margin-left{margin-left:-4px}.toggle-table{float:left}.toggle-table .toggle-table--toggle{cursor:pointer;margin-right:4px;position:relative}.toggle-table tr:hover .toggle-table--toggle .color-icon{visibility:hidden}.toggle-table tr:hover .toggle-table--toggle .glyphicon{display:block}.toggle-table tr.excluded td.linked a,.toggle-table tr.excluded td:not(.linked){opacity:.5;text-decoration:line-through}.toggle-table tr.excluded .color-icon{opacity:.5}.toggle-table td .glyphicon{display:none;left:1px;position:absolute}.toggle-table--chart{float:left;margin-left:100px;margin-top:20px;max-width:500px}.toggle-table--chart canvas{height:400px;width:400px}.basic-info-charts{clear:both;display:block;padding-top:20px;position:relative}.basic-info-charts canvas:not(#sizechart-canvas){max-width:150px}.basic-info-charts .sizechart-container{height:200px;min-width:650px;position:relative}.basic-info-charts .chart-wrapper{display:flex;float:left;margin-right:50px}.basic-info-charts .chart-legend{align-self:center;margin-left:15px}.basic-info-charts .chart-legend .color-icon{vertical-align:-4px}.display-title *{font-size:inherit!important}.error-wrapper{font-size:18px}.error-wrapper p{margin-bottom:30px}.error-mascot{margin-right:30px;max-width:100%;width:300px}.times-in-utc{margin-top:15px}.download-dropdown{bottom:5px}.download-dropdown .glyphicon-download-alt{top:2px}.multi-select{height:auto}.multi-select .checkbox{display:inline-block;float:left;margin-top:3px;width:33.3333333333%}.user-group-icon{height:18px}a.help-icon{font-size:25px;position:relative;text-decoration:none;top:5px}.help-text{cursor:help;text-decoration:underline dotted}.reverted-edit{background:#fcf8e3!important}.side-to-side>div{display:inline-block;margin:0 10px 15px 0;vertical-align:top}.side-to-side{clear:both}.prp-qualitytext{border-radius:3px;padding:0 2px}.prp-quality0{background-color:#ddd}.prp-quality1{background-color:#ffabab}.prp-quality2{background-color:#bbf}.prp-quality3{background-color:#ffe867}.prp-quality4{background-color:#90ff90}.link-loading{font-style:italic;pointer-events:none}.pageinfo .top-editors-charts{display:block;margin-bottom:25px;position:relative}.pageinfo .top-editors-charts canvas{max-height:250px;max-width:250px}.pageinfo .year-count-charts{clear:both;display:block;margin-bottom:25px;position:relative}.pageinfo .year-count-charts canvas{max-width:800px}.pageinfo .chart-wrapper{display:flex;flex-wrap:wrap;float:left;margin-right:50px}.pageinfo #textshares_chart{display:none;height:auto;width:auto}.pageinfo .chart-title{font-weight:700;text-align:center}.pageinfo .chart-legend{align-self:center;margin-left:15px}.pageinfo .chart-legend .color-icon{vertical-align:-4px}.pageinfo .legend-label{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:middle}.pageinfo .legend-value{vertical-align:bottom}.pageinfo .top-editors-table{margin-bottom:0}.pageinfo .footnotes{margin-bottom:20px;margin-top:5px}.pageinfo .month-counts-table .stripes-column{height:30px;padding:0}.pageinfo .month-counts-table .stripes{height:33.3333333333%}.pageinfo .sort-entry--assessment,.pageinfo .sort-entry--importance{font-weight:700;text-align:center}.pageinfo .sort-entry--assessment a,.pageinfo .sort-entry--importance a{color:#4365cc}.pageinfo .bugs-table .sort-entry--explanation{min-width:400px;white-space:pre-wrap}@media (max-width:767px){.pageinfo #year_count_legend{margin:0}.pageinfo #year_count_legend .legend-body>div{display:inline;margin-right:10px}}.autoedits #summary .chart-wrapper,.autoedits #summary .chart-wrapper canvas{max-width:300px}.autoedits #summary .chart-wrapper .chart-legend{display:none}.autoedits #tool_chart{display:none;height:auto;width:auto}.autoedits .autoedits-stat-list{margin-bottom:0;padding-bottom:0}.autoedits .tool-selector-form{margin-bottom:20px}.autoedits .tool-selector-form .btn-primary{vertical-align:bottom}.autoedits .tool-selector-form .form-submit{margin-bottom:0}.autoedits .contributions-container--loading .tool-selector-form{visibility:hidden}.autoedits #toolSelector{display:inline-block;width:auto}.autoedits .tooltipcss--tool-counts{cursor:help;position:relative;vertical-align:-1px}.autoedits .tooltipcss--tool-counts .tooltip-body{min-width:300px}.autoedits .footnotes{margin:20px 0 0}.blame .diff{border:0;border-collapse:initial;border-spacing:4px;margin:0;width:100%}.blame .diff td{padding:.33em .5em}.blame .diff td div{word-wrap:break-word}.blame .diff-lineno{font-weight:700}.blame .diff-marker{font-size:1.25em;padding:.25em;text-align:right}.blame .diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.blame .diff-deletedline{border-color:#ffe49c}.blame .diff-deletedline .diffchange{background:#feeec8}.blame .diff-addedline{border-color:#a3d3ff}.blame .diff-addedline .diffchange{background:#d8ecff}.blame .diff-addedline,.blame .diff-context,.blame .diff-deletedline{border-radius:.33em;border-style:solid;border-width:1px 1px 1px 4px;line-height:1.6;vertical-align:top;white-space:pre-wrap}.blame .diff-addedline .diffchange,.blame .diff-deletedline .diffchange{border-radius:.33em;padding:.25em 0}.blame .diffchange{text-decoration:none}.categoryedits .toggle-table--chart{margin-left:50px}.categoryedits #category_chart{display:none;height:auto;width:auto}.categoryedits .select2-selection--multiple{border-color:#ccc!important;border-radius:0}.categoryedits .select2-results__option,.categoryedits .select2-selection__rendered{padding-left:12px!important}.categoryedits .select2-results__message{display:none}.categoryedits .select2-results__option--highlighted{background:#3379b7!important}.categoryedits .loading-results{display:none}.editcounter .stat-list .table{margin:0 auto}.editcounter .stat-list .table.rights-changes-summary{margin:0}.editcounter .stat-list--empty-group{font-weight:400!important}.editcounter .stat-list--empty-group:after{content:""!important}.editcounter #timecard-bubble-chart{max-width:1100px}.editcounter #monthcounts-canvas,.editcounter #yearcounts-canvas{max-width:1000px}.editcounter #namespace-canvas{height:auto;width:auto}.editcounter div.chart-wrapper.qualitychangechart{float:none}.editcounter .top-project-edit-counts td{white-space:nowrap}.editcounter .footnotes{clear:both;padding-top:20px}.editcounter .tooltipcss--pages-created{position:relative;vertical-align:-1px}.editcounter .tooltipcss--pages-created:hover{text-decoration:none}.editcounter .tooltipcss--pages-created .tooltip-body{min-width:300px}.editcounter .pending{opacity:.5}.home #wrapper{background:transparent}.home .splash-logo{margin-top:30px;max-width:320px;width:100%}.home .tool-list{padding-top:10px;text-align:left}.home .tool-list .btn{display:block;margin-top:15px;position:relative;text-align:left;white-space:normal;width:100%}.home .tool-name{font-weight:700}@media (max-width:767px){.home .splash-logo{max-width:450px;width:90%}}.meta #api_usage_chart,.meta #usage_chart{max-width:1000px}.pages .panel-body h3{clear:both}.pages .panel-body h4:not(:first-child){padding-top:10px}.pages .deleted-page{cursor:help;position:relative}.pages .deleted-page .tooltip-body{left:67%;width:300px}.pages .sort-entry--page-title{white-space:normal}.topedits .color-icon{margin-right:3px}.topedits .footnotes{margin:20px 0}@media (max-width:767px){.basic-info-charts{display:none;margin-bottom:0}}@media (prefers-color-scheme:dark){:root{scrollbar-color:#aaa transparent}#wrapper,.panel-body,.xt-toc,body{background:#181818;color:#aaa}.xt-toc.fixed{box-shadow:5px 5px 8px #333}.home-link:after,[role=separator]{display:none}.dropdown-menu,.dropdown.open,.form-label{background:#222}.dropdown-menu{box-shadow:0 6px 12px #333}.dropdown-menu>.active>a,.dropdown-menu>li>a{background:#222;color:#999}.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:hover{background:#333;color:#999}.navbar-default{border:0}.navbar-default .navbar-nav>li>a{color:#999}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#aaa}header{background:#212121!important}.stat-list--group>tr:first-child>td{border-color:#606060!important}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-color:#606060}.table-striped>tbody>tr:hover,.table-striped>tbody>tr:nth-of-type(odd){background-color:transparent}.table-sticky-header .sticky-heading{background:#111}a,a:hover{color:#09f}.panel-primary,.panel-primary .panel-heading{border-color:#606060}.help-icon,.help-icon:hover,.panel-primary>.panel-heading,.panel-primary>.panel-heading a,.panel-primary>.panel-heading a:hover,h4{color:#aaa}.panel{background-color:transparent}.form-control,.form-label,.panel-default,.panel-default>.panel-heading,hr{border-color:#333}.form-control:focus{border-color:#606060;box-shadow:inset 0 1px 1px #333,0 0 8px #333}.form-control,.form-label,label{color:#999}.form-control{background:#111;color:#999}.blame .diff-context{background:transparent;color:#aaa}.diffchange-inline{color:#333}.btn-default{background:#222;border-color:#222;color:#999}.btn-default svg{fill:#999}.btn-default:hover svg,.open .btn-default svg{fill:#333}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--multiple .select2-selection__choice{background:transparent}.select2-dropdown{background-color:#222}.categoryedits .select2-selection--multiple{border-color:#333!important}.categoryedits .select2-results__option--highlighted,.select2-container--default .select2-results__option[aria-selected=true]{background-color:#333!important}.alert .close{opacity:.8;text-shadow:none}.alert-info{background:#012;border:0;color:#999}.alert-warning{background-color:#8a6d3b;color:#fcf8e3}.alert-danger{background-color:#a94442;border-color:#ff6b6b;color:#1b1818}.color-icon,canvas{background:transparent}.tooltipcss .tooltip-body{background:#333;border-color:#606060;box-shadow:5px 5px 8px #333;color:#aaa}.tooltipcss .tooltip-body:before{border-color:transparent #606060 transparent transparent}.tooltipcss .tooltip-body:after{border-color:transparent #333 transparent transparent}body.rtl .tooltipcss .tooltip-body:before{border-color:transparent transparent transparent #606060}body.rtl .tooltipcss .tooltip-body:after{border-color:transparent transparent transparent #333}.diff-pos,.diff-pos:before{color:#00b400}.diff-neg{color:#f73d3d}.pagination>li>a{background-color:transparent;border-color:#606060;color:#aaa}.pagination>li>a:focus,.pagination>li>a:hover{background-color:#333;border-color:#606060;color:#aaa}.pagination>li.disabled>span{background-color:inherit;border-color:inherit;opacity:.5}.pagination>li.active>a,.pagination>li.active>a:focus,.pagination>li.active>a:hover{background-color:#333;border-color:#606060;color:#aaa}.reverted-edit{background:#4e4c40!important}.reverted-edit .text-info{color:#74cefa}.reverted-edit .text-muted{color:#909090}.footer-branding,.home-link,.splash-logo{filter:invert(1) hue-rotate(180deg)}.prp-qualitytext{color:#fff}.prp-quality0{background-color:#55585e}.prp-quality1{background-color:#971602}.prp-quality2{background-color:#40408c}.prp-quality3{background-color:#5c5c00}.prp-quality4{background-color:#00662e}}@media (min-width:1200px){.xt-panel-body table{width:auto}}@media (max-width:1200px){.stat-list>.table td:first-child,.stat-list>.table th:first-child{width:300px}}@media (max-width:992px){.error-mascot{width:200px}}@media (max-width:767px){.basic-info-charts .chart-wrapper{display:block!important}.basic-info-charts .chart-wrapper .chart-legend{margin-bottom:15px}.app-footer{position:relative}.footer-branding{float:left!important;margin-bottom:10px}.footer-about{clear:both;display:block;max-width:100%}.footer-quote{overflow-x:initial;text-overflow:clip;white-space:normal}.xt-panel-description{display:block}.stat-list{padding:0}.stat-list>.table td:first-child,.stat-list>.table th:first-child{display:block;padding-top:5px;text-align:left!important}.stat-list>.table td:first-child.stat-list--new-group,.stat-list>.table th:first-child.stat-list--new-group{padding-top:15px!important}.stat-list>.table td .stat-list--new-group,.stat-list>.table td:last-child,.stat-list>.table th .stat-list--new-group,.stat-list>.table th:last-child{display:block;padding-top:0!important}.stat-list--group{padding-top:15px!important}.stat-list--group tr>td{padding-top:5px!important}.stat-list--group>tr:first-child>td{text-align:left!important}.back-to-search{font-size:0}.back-to-search .glyphicon{font-size:medium}.tool-links{clear:both;width:100%}.xt-panel-body{padding:15px 0}.panel-default{border-radius:0}#wrapper{margin:15px 5px}.xt-toc{display:none}.toggle-table--chart{margin:0;max-width:100%}.xt-page-title>small{display:block;padding:3px 0 10px}.xt-page-title>small:before{display:none}.input-group{margin-bottom:15px;width:100%}.input-group .tooltipcss{display:none}.input-group input[type=text]{border-radius:0!important}.input-group-addon{background:transparent;border:0;display:block;padding:0}.input-group-addon:first-child{font-weight:700}.input-group-addon:last-child{clear:both;padding-top:5px}.error-wrapper{padding:10px}.error-mascot--wrapper{margin-bottom:20px;text-align:center;width:100%}.times-in-utc{padding:0 15px}} \ No newline at end of file diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json index 765596401..4ee2960f3 100644 --- a/public/build/entrypoints.json +++ b/public/build/entrypoints.json @@ -3,11 +3,11 @@ "app": { "js": [ "/build/runtime.c217f8c4.js", - "/build/95.7a87ed1a.js", - "/build/app.f4fc5d0a.js" + "/build/852.96913092.js", + "/build/app.9880f65a.js" ], "css": [ - "/build/app.9c0698b8.css" + "/build/app.fb116d63.css" ] } } diff --git a/public/build/manifest.json b/public/build/manifest.json index 1aa114a7d..f1ccaeb70 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -1,6 +1,6 @@ { - "build/app.css": "/build/app.9c0698b8.css", - "build/app.js": "/build/app.f4fc5d0a.js", + "build/app.css": "/build/app.fb116d63.css", + "build/app.js": "/build/app.9880f65a.js", "build/runtime.js": "/build/runtime.c217f8c4.js", "build/852.96913092.js": "/build/852.96913092.js", "build/images/VPS-badge.svg": "/build/images/VPS-badge.svg", From 8ed29c101f359d2145803ce79f19c70f059d0f73 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 00:28:07 +0200 Subject: [PATCH 08/60] lints --- src/Model/Pages.php | 2 +- src/Model/Project.php | 2 +- src/Repository/PagesRepository.php | 2 +- src/Repository/ProjectRepository.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Pages.php b/src/Model/Pages.php index 3a4470a05..658d999f0 100644 --- a/src/Model/Pages.php +++ b/src/Model/Pages.php @@ -415,7 +415,7 @@ public function getDeletionSummary(int $namespace, string $pageTitle, string $of */ public function isProofreadPage(int $namespace): bool { - return $this->pages[$namespace][0] && + return $this->pages[$namespace][0] && array_key_exists('prp_quality', $this->pages[$namespace][0]); } diff --git a/src/Model/Project.php b/src/Model/Project.php index a17aed7da..4cc643a3d 100644 --- a/src/Model/Project.php +++ b/src/Model/Project.php @@ -76,7 +76,7 @@ public function hasPageAssessments($nsId = null): bool */ public function isPrpPage($namespace): bool { - return $this->hasProofreadPage() && + return $this->hasProofreadPage() && ( !is_numeric($namespace) || 'Page' === $this->getCanonicalNamespace($namespace) diff --git a/src/Repository/PagesRepository.php b/src/Repository/PagesRepository.php index de77cb3e4..852ce0d20 100644 --- a/src/Repository/PagesRepository.php +++ b/src/Repository/PagesRepository.php @@ -214,7 +214,7 @@ private function getPrpConditions($namespace, $project): array $conditions = [ 'prpSelect' => '', 'prpArSelect' => '', - 'prpJoin' => '' + 'prpJoin' => '', ]; if ($project->isPrpPage($namespace)) { $pagePropsTable = $project->getTableName('page_props', ''); diff --git a/src/Repository/ProjectRepository.php b/src/Repository/ProjectRepository.php index 564639a35..dbe29390d 100644 --- a/src/Repository/ProjectRepository.php +++ b/src/Repository/ProjectRepository.php @@ -327,7 +327,7 @@ private function setNamespaces(array $res, array &$metadata): void $name = null; } - if (null !== $name ) { + if (null !== $name) { $metadata['namespaces'][$namespace['id']] = $name; } $metadata['canonical_namespaces'][$namespace['id']] = $namespace['canonical'] ?? ''; From 7303495f39624a795101131974b74f4832e20356 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 13:07:47 +0200 Subject: [PATCH 09/60] PC: add pie chart; rm unused method (migrated to project) --- src/Model/Pages.php | 20 +- templates/pages/_pages_list.html.twig | 254 ++++++++++++++------------ 2 files changed, 144 insertions(+), 130 deletions(-) diff --git a/src/Model/Pages.php b/src/Model/Pages.php index 658d999f0..5fbbf84db 100644 --- a/src/Model/Pages.php +++ b/src/Model/Pages.php @@ -262,6 +262,11 @@ public function getCounts(): array if (self::REDIR_NONE !== $this->redirects) { $counts[$ns]['redirects'] = (int)$row['redirects']; } + if ($this->project->isPrpPage($ns)) { + foreach ([0, 1, 2, 3, 4] as $level) { + $counts[$ns]["prp_quality$level"] = (int)$row["prp_quality$level"]; + } + } } $this->countsByNamespace = $counts; @@ -404,21 +409,6 @@ public function getDeletionSummary(int $namespace, string $pageTitle, string $of return "$timestampStr ({$ret['actor_name']}): $summary"; } - /** - * Check if a namespace is the PRP Page namespace. - * Sadly, we don't have a clean way of knowing that - * and the namespace ID varies between wikis, - * so we have to just look at the data and check - * if the first row has a quality set. - * @param int $namespace Namespace ID. - * @return bool - */ - public function isProofreadPage(int $namespace): bool - { - return $this->pages[$namespace][0] && - array_key_exists('prp_quality', $this->pages[$namespace][0]); - } - /** * Run the query to get pages created by the user with options. * This is ran independently for each namespace if $this->namespace is 'all'. diff --git a/templates/pages/_pages_list.html.twig b/templates/pages/_pages_list.html.twig index 51334fde3..d7729d65f 100644 --- a/templates/pages/_pages_list.html.twig +++ b/templates/pages/_pages_list.html.twig @@ -1,5 +1,6 @@ {% import 'macros/layout.html.twig' as layout %} {% import 'macros/wiki.html.twig' as wiki %} +{% import 'macros/pieChart.html.twig' as chart %} {% set content %} {% if pages.getNumPages == 0 %} @@ -25,134 +26,157 @@ [{{ msg('hide')|lower }}] - - - - {% set columns = ['page-title', 'date', 'original-size'] %} - {% if pages.deleted != 'deleted' %} - {% set columns = columns|merge(['current-size']) %} - {% endif %} - {% if project.hasPageAssessments(ns) and pages.deleted != 'deleted' %} - {% set columns = columns|merge(['assessment']) %} - {% endif %} - {% if pages.isProofreadPage(ns) %} - {% set columns = columns|merge(['proofreadpage-quality']) %} - {% set qualityNames = project.prpQualityNames %} - {% endif %} - {% for thKey in columns %} - - {% endfor %} - - - - {% set index = 0 %} - {% for page in pages.results[ns] %} - {% set index = index + 1 %} - {% set pagename = titleWithNs(page.page_title, ns, project.namespaces) %} - - - - - +
    + +
    # - - {{ msg(thKey)|ucfirst }} - - - {{ msg('links') }}
    {{ index|num_format }} - {% if page.redirect %} - {{ wiki.pageLinkRaw(pagename, project, pagename, 'redirect=no') }} - · ({{ msg('redirect') }}) - {% else %} - {{ wiki.pageLinkRaw(pagename, project) }} - {% endif %} - {% if page.deleted %} - · - - ({{ msg('deleted') }}) -
    - {{ msg('loading') }}... -
    -
    - {% if page.recreated is defined and page.recreated %} - · ({{ msg('recreated') }}) - {% endif %} - {% endif %} -
    - {{ page.rev_length|num_format }} -
    + + + {% set columns = ['page-title', 'date', 'original-size'] %} {% if pages.deleted != 'deleted' %} - + {% endfor %} + + + + {% set index = 0 %} + {% for page in pages.results[ns] %} + {% set index = index + 1 %} + {% set pagename = titleWithNs(page.page_title, ns, project.namespaces) %} + + + - {% if project.hasPageAssessments(ns) and page.assessment is defined %} - - {% endif %} - {% if page.prp_quality is defined %} - + + + {% if pages.deleted != 'deleted' %} + - {% endif %} - {% endif %} - {% endif %} - {% if enabled('TopEdits') %} - · - {{ msg('tool-topedits') }} + {% if page.prp_quality is defined %} + {% endif %} - {% if isWMF() %} + {% endif %} + - - {% endfor %} - {% if pages.multiNamespace and pages.counts[ns].count > pages.resultsPerPage %} - - - - + + + {% endfor %} + {% if pages.multiNamespace and pages.counts[ns].count > pages.resultsPerPage %} + + + + + {% endif %} + +
    # - {% if page.length is null %} - {{ msg('na') }} + {% set columns = columns|merge(['current-size']) %} + {% endif %} + {% if project.hasPageAssessments(ns) and pages.deleted != 'deleted' %} + {% set columns = columns|merge(['assessment']) %} + {% endif %} + {% if project.isPrpPage(ns) %} + {% set columns = columns|merge(['proofreadpage-quality']) %} + {% set qualityNames = project.prpQualityNames %} + {% endif %} + {% for thKey in columns %} + + + {{ msg(thKey)|ucfirst }} + + + {{ msg('links') }}
    {{ index|num_format }} + {% if page.redirect %} + {{ wiki.pageLinkRaw(pagename, project, pagename, 'redirect=no') }} + · ({{ msg('redirect') }}) {% else %} - {{ page.length|num_format }} + {{ wiki.pageLinkRaw(pagename, project) }} {% endif %} - - {% if page.deleted %} - {{ msg('na') }} - {% else %} - {% if page.assessment.badge is defined %} - {{ page.assessment.class }} - {% endif %} - {{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }} + {% if page.deleted %} + · + + ({{ msg('deleted') }}) +
    + {{ msg('loading') }}... +
    +
    + {% if page.recreated is defined and page.recreated %} + · ({{ msg('recreated') }}) {% endif %} -
    - {% if page.deleted %} + {% endif %} + + {{ page.rev_length|num_format }} + + {% if page.length is null %} {{ msg('na') }} {% else %} - - {{ qualityNames[page.prp_quality] }} - + {{ page.length|num_format }} {% endif %} - {{ wiki.pageLogLinkRaw(pagename, project) }} - {% if not(page.deleted) or (page.recreated is defined and page.recreated == true) %} - · - {{ wiki.pageHistLinkRaw(pagename, project) }} - {% if enabled('PageInfo') %} - · - {{ msg('tool-pageinfo') }} + {% if project.hasPageAssessments(ns) and page.assessment is defined %} + + {% if page.deleted %} + {{ msg('na') }} + {% else %} + {% if page.assessment.badge is defined %} + {{ page.assessment.class }} + {% endif %} + {{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }} + {% endif %} + + {% if page.deleted %} + {{ msg('na') }} + {% else %} + + {{ qualityNames[page.prp_quality] }} + + {% endif %} + + {{ wiki.pageLogLinkRaw(pagename, project) }} + {% if not(page.deleted) or (page.recreated is defined and page.recreated == true) %} · - - {{ msg('pageviews') }} - + {{ wiki.pageHistLinkRaw(pagename, project) }} + {% if enabled('PageInfo') %} + · + {{ msg('tool-pageinfo') }} + {% endif %} + {% if enabled('TopEdits') %} + · + {{ msg('tool-topedits') }} + {% endif %} + {% if isWMF() %} + · + + {{ msg('pageviews') }} + + {% endif %} {% endif %} - {% endif %} -
    - - {{ (pages.counts[ns].count - pages.resultsPerPage)|number_format }} {{ msg('num-others', [pages.counts[ns].count - pages.resultsPerPage]) }} - -
    + + {{ (pages.counts[ns].count - pages.resultsPerPage)|number_format }} {{ msg('num-others', [pages.counts[ns].count - pages.resultsPerPage]) }} + +
    + + {% if project.isPrpPage(ns) %} + {% set qualityNames = project.prpQualityNames %} +
    + {{ msg('proofreadpage-quality') }} + {{ + chart.pie_chart('prp_quality', + [0, 1, 2, 3, 4]|map((i) => { + label: qualityNames[i], + value: pages.counts[ns]['prp_quality' ~ i], + percentage: ((pages.counts[ns]['prp_quality' ~ i] / pages.counts[ns].count) * 100), + color: color([11, 0, 4, 2, 1][i]) + }), + true, + 'qualitychart' + ) + }} +
    {% endif %} - - + + {% endfor %} {##### PAGINATION #####} From 54ae97bba7016ebb644fead623974f2e74cad6f0 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 13:22:36 +0200 Subject: [PATCH 10/60] refactor some ugly duplication on pa selects --- src/Repository/TopEditsRepository.php | 89 ++++++++++++--------------- 1 file changed, 41 insertions(+), 48 deletions(-) diff --git a/src/Repository/TopEditsRepository.php b/src/Repository/TopEditsRepository.php index 01dc0df12..12f245e26 100644 --- a/src/Repository/TopEditsRepository.php +++ b/src/Repository/TopEditsRepository.php @@ -81,6 +81,42 @@ public function getEdit(Page $page, array $revision): Edit return new Edit($this->editRepo, $this->userRepo, $page, $revision); } + /** + * Get the selects for PageAssessments class and projects. + * @param Project $project + * @param int|string $namespace + * @param string $pageTablePrefix What should be prepended to columns of the page table. Default ''. + * @return string + */ + private function getPaSelects( + Project $project, + $namespace, + string $pageTablePrefix = '' + ): string { + $hasPageAssessments = $this->isWMF && $project->hasPageAssessments($namespace); + $paTable = $project->getTableName('page_assessments'); + $paSelect = $hasPageAssessments + ? ", ( + SELECT pa_class + FROM $paTable + WHERE pa_page_id = ".$pageTablePrefix."page_id + AND pa_class != '' + LIMIT 1 + ) AS pa_class" + : ''; + $paProjectsTable = $project->getTableName('page_assessments_projects'); + $paProjectsSelect = $hasPageAssessments + ? ", ( + SELECT JSON_ARRAYAGG(pap_project_title) + FROM $paTable + JOIN $paProjectsTable + ON pa_project_id = pap_project_id + WHERE pa_page_id = ".$pageTablePrefix."page_id + ) AS pap_project_title" + : ''; + return $paSelect . $paProjectsSelect; + } + /** * Get the top edits by a user in a single namespace. * @param Project $project @@ -111,28 +147,6 @@ public function getTopEditsNamespace( $pageTable = $project->getTableName('page'); $revisionTable = $project->getTableName('revision'); - $hasPageAssessments = $this->isWMF && $project->hasPageAssessments($namespace); - $paTable = $project->getTableName('page_assessments'); - $paSelect = $hasPageAssessments - ? ", ( - SELECT pa_class - FROM $paTable - WHERE pa_page_id = page_id - AND pa_class != '' - LIMIT 1 - ) AS pa_class" - : ''; - $paProjectsTable = $project->getTableName('page_assessments_projects'); - $paProjectsSelect = $hasPageAssessments - ? ", ( - SELECT JSON_ARRAYAGG(pap_project_title) - FROM $paTable - JOIN $paProjectsTable - ON pa_project_id = pap_project_id - WHERE pa_page_id = page_id - ) AS pap_project_title" - : ''; - $ipcJoin = ''; $whereClause = 'rev_actor = :actorId'; $params = []; @@ -143,13 +157,13 @@ public function getTopEditsNamespace( [$params['startIp'], $params['endIp']] = IPUtils::parseRange($user->getUsername()); } + $paSelects = $this->getPaSelects($project, $namespace); + $offset = $pagination * $limit; $sql = "SELECT page_namespace AS `namespace`, page_title, page_is_redirect AS `redirect`, COUNT(page_title) AS `count` - $paSelect - $paProjectsSelect + $paSelects FROM $pageTable - JOIN $revisionTable ON page_id = rev_page $ipcJoin WHERE $whereClause @@ -298,28 +312,7 @@ public function getTopEditsAllNamespaces( $revDateConditions = $this->getDateConditions($start, $end); $pageTable = $this->getTableName($project->getDatabaseName(), 'page'); $revisionTable = $this->getTableName($project->getDatabaseName(), 'revision'); - $hasPageAssessments = $this->isWMF && $project->hasPageAssessments(); - $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments'); - $paSelect = $hasPageAssessments - ? ", ( - SELECT pa_class - FROM $pageAssessmentsTable - WHERE pa_page_id = e.page_id - AND pa_class != '' - LIMIT 1 - ) AS pa_class" - : ''; - $paProjectsTable = $project->getTableName('page_assessments_projects'); - $paProjectsSelect = $hasPageAssessments - ? ", ( - SELECT JSON_ARRAYAGG(pap_project_title) - FROM $pageAssessmentsTable - JOIN $paProjectsTable - ON pa_project_id = pap_project_id - WHERE pa_page_id = e.page_id - ) AS pap_project_title" - : ''; - + $paSelects = $this->getPaSelects($project, 'all', 'e.'); $ipcJoin = ''; $whereClause = 'rev_actor = :actorId'; @@ -332,7 +325,7 @@ public function getTopEditsAllNamespaces( } $sql = "SELECT c.page_namespace AS `namespace`, e.page_title, - c.page_is_redirect AS `redirect`, c.count $paSelect $paProjectsSelect + c.page_is_redirect AS `redirect`, c.count $paSelects FROM ( SELECT b.page_namespace, b.page_is_redirect, b.rev_page, b.count From c378fac14758febfff308ca69dc9e872d4136bc5 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 15:15:37 +0200 Subject: [PATCH 11/60] clean up getTopEditsAllNamespaces and fetch prp quality in both --- src/Repository/TopEditsRepository.php | 80 +++++++++++++++++---------- 1 file changed, 51 insertions(+), 29 deletions(-) diff --git a/src/Repository/TopEditsRepository.php b/src/Repository/TopEditsRepository.php index 12f245e26..b282ba8c7 100644 --- a/src/Repository/TopEditsRepository.php +++ b/src/Repository/TopEditsRepository.php @@ -85,13 +85,11 @@ public function getEdit(Page $page, array $revision): Edit * Get the selects for PageAssessments class and projects. * @param Project $project * @param int|string $namespace - * @param string $pageTablePrefix What should be prepended to columns of the page table. Default ''. * @return string */ private function getPaSelects( Project $project, - $namespace, - string $pageTablePrefix = '' + $namespace ): string { $hasPageAssessments = $this->isWMF && $project->hasPageAssessments($namespace); $paTable = $project->getTableName('page_assessments'); @@ -99,7 +97,7 @@ private function getPaSelects( ? ", ( SELECT pa_class FROM $paTable - WHERE pa_page_id = ".$pageTablePrefix."page_id + WHERE pa_page_id = page_id AND pa_class != '' LIMIT 1 ) AS pa_class" @@ -111,12 +109,33 @@ private function getPaSelects( FROM $paTable JOIN $paProjectsTable ON pa_project_id = pap_project_id - WHERE pa_page_id = ".$pageTablePrefix."page_id + WHERE pa_page_id = page_id ) AS pap_project_title" : ''; return $paSelect . $paProjectsSelect; } + /** + * Get the select and join for ProofreadPage quality level. + * @param Project $project + * @param int|string $namespace Namespade ID or 'all' + * @return array With keys 'prpSelect' and 'prpJoin' + */ + private function getPrpConditions( + Project $project, + $namespace + ): array { + if ($project->isPrpPage($namespace)) { + $pagePropsTable = $project->getTableName('page_props', ''); + return [ + 'prpSelect' => ", pp_value as `prp_quality`", + 'prpJoin' => "LEFT OUTER JOIN $pagePropsTable + ON (pp_page, pp_propname) = (page_id, 'proofread_page_quality_level')", + ]; + } + return ['prpSelect' => '', 'prpJoin' => '']; + } + /** * Get the top edits by a user in a single namespace. * @param Project $project @@ -159,12 +178,16 @@ public function getTopEditsNamespace( $paSelects = $this->getPaSelects($project, $namespace); + $prpConditions = $this->getPrpConditions($project, $namespace); + $offset = $pagination * $limit; $sql = "SELECT page_namespace AS `namespace`, page_title, page_is_redirect AS `redirect`, COUNT(page_title) AS `count` $paSelects + ".$prpConditions['prpSelect']." FROM $pageTable JOIN $revisionTable ON page_id = rev_page + ".$prpConditions['prpJoin']." $ipcJoin WHERE $whereClause AND page_namespace = :namespace @@ -305,14 +328,13 @@ public function getTopEditsAllNamespaces( ): array { // Set up cache. $cacheKey = $this->getCacheKey(func_get_args(), 'topedits_all'); - if ($this->cache->hasItem($cacheKey)) { + if ($this->cache->hasItem($cacheKey) && false) { return $this->cache->getItem($cacheKey)->get(); } $revDateConditions = $this->getDateConditions($start, $end); $pageTable = $this->getTableName($project->getDatabaseName(), 'page'); $revisionTable = $this->getTableName($project->getDatabaseName(), 'revision'); - $paSelects = $this->getPaSelects($project, 'all', 'e.'); $ipcJoin = ''; $whereClause = 'rev_actor = :actorId'; @@ -324,28 +346,28 @@ public function getTopEditsAllNamespaces( [$params['startIp'], $params['endIp']] = IPUtils::parseRange($user->getUsername()); } - $sql = "SELECT c.page_namespace AS `namespace`, e.page_title, - c.page_is_redirect AS `redirect`, c.count $paSelects - FROM - ( - SELECT b.page_namespace, b.page_is_redirect, b.rev_page, b.count - ,@rn := if(@ns = b.page_namespace, @rn + 1, 1) AS `row_number` - ,@ns := b.page_namespace AS dummy - FROM - ( - SELECT page_namespace, page_is_redirect, rev_page, count(rev_page) AS count - FROM $revisionTable - $ipcJoin - JOIN $pageTable ON page_id = rev_page - WHERE $whereClause - $revDateConditions - GROUP BY page_namespace, rev_page - ) AS b - JOIN (SELECT @ns := NULL, @rn := 0) AS vars - ORDER BY b.page_namespace ASC, b.count DESC - ) AS c - JOIN $pageTable e ON e.page_id = c.rev_page - WHERE c.`row_number` <= $limit"; + $paSelects = $this->getPaSelects($project, 'all'); + $prpConditions = $this->getPrpConditions($project, 'all'); + + $sql = " + SELECT * FROM ( + SELECT page_namespace as `namespace`, page_title, page_is_redirect as `redirect`, rev_page, count(rev_page) AS `count`, + ROW_NUMBER() OVER ( + PARTITION BY page_namespace + ORDER BY page_namespace ASC, `count` DESC + ) `row_number` + $paSelects + ".$prpConditions['prpSelect']." + FROM $revisionTable + $ipcJoin + JOIN $pageTable ON page_id = rev_page + ".$prpConditions['prpJoin']." + WHERE $whereClause + $revDateConditions + GROUP BY page_namespace, rev_page + ) a + WHERE `row_number` <= $limit + ORDER BY `namespace` ASC, `count` DESC"; $resultQuery = $this->executeQuery($sql, $project, $user, 'all', $params); $result = $resultQuery->fetchAllAssociative(); From 01f086df67a074f40296d4b88d225d245b471550 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 15:21:13 +0200 Subject: [PATCH 12/60] lint --- src/Repository/TopEditsRepository.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Repository/TopEditsRepository.php b/src/Repository/TopEditsRepository.php index b282ba8c7..135c7f4d3 100644 --- a/src/Repository/TopEditsRepository.php +++ b/src/Repository/TopEditsRepository.php @@ -351,7 +351,12 @@ public function getTopEditsAllNamespaces( $sql = " SELECT * FROM ( - SELECT page_namespace as `namespace`, page_title, page_is_redirect as `redirect`, rev_page, count(rev_page) AS `count`, + SELECT + page_namespace as `namespace`, + page_title, + page_is_redirect as `redirect`, + rev_page, + count(rev_page) AS `count`, ROW_NUMBER() OVER ( PARTITION BY page_namespace ORDER BY page_namespace ASC, `count` DESC From 55486be6ec1c66eeda4c68da668af34046fcdde0 Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 15:55:01 +0200 Subject: [PATCH 13/60] add column to TE and add proper sort keys for quality --- src/Model/TopEdits.php | 4 ++++ templates/pages/_pages_list.html.twig | 2 +- templates/topedits/result_namespace.html.twig | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Model/TopEdits.php b/src/Model/TopEdits.php index 27ac23013..45cdd5ba3 100644 --- a/src/Model/TopEdits.php +++ b/src/Model/TopEdits.php @@ -390,6 +390,10 @@ private function formatTopPagesNamespace(array $pages): array unset($page['pa_class']); } + if (array_key_exists('prp_quality', $page)) { + $page['prp_quality'] = (int)$page['prp_quality']; + } + if (isset($topEditedPages[$nsId])) { $topEditedPages[$nsId][] = $page; } else { diff --git a/templates/pages/_pages_list.html.twig b/templates/pages/_pages_list.html.twig index d7729d65f..f9ddffb32 100644 --- a/templates/pages/_pages_list.html.twig +++ b/templates/pages/_pages_list.html.twig @@ -110,7 +110,7 @@ {% endif %} {% if page.prp_quality is defined %} - + {% if page.deleted %} {{ msg('na') }} {% else %} diff --git a/templates/topedits/result_namespace.html.twig b/templates/topedits/result_namespace.html.twig index e2a17331b..8890c5edb 100644 --- a/templates/topedits/result_namespace.html.twig +++ b/templates/topedits/result_namespace.html.twig @@ -79,6 +79,15 @@ {% endif %} + {% if project.isPrpPage(ns) %} + + + {{ msg('proofreadpage-quality') }} + + + + {% set qualityNames = project.prpQualityNames %} + {% endif %} {{ msg('links') }} @@ -100,6 +109,13 @@ {{ page.assessment.class ? page.assessment.class : msg('unknown') }} {% endif %} + {% if page.prp_quality is defined %} + + + {{ qualityNames[page.prp_quality] }} + + + {% endif %} {{ wiki.pageLogLinkRaw(pageTitle, project) }} · From 64f584c88343a9c4ed61bcf134b68f24faf5a04d Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 16:18:58 +0200 Subject: [PATCH 14/60] add in wikitext, tsv, csv --- templates/pages/result.csv.twig | 6 +++++- templates/pages/result.tsv.twig | 6 +++++- templates/pages/result.wikitext.twig | 7 +++++++ templates/topedits/result_namespace.wikitext.twig | 7 +++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/templates/pages/result.csv.twig b/templates/pages/result.csv.twig index cfea841a5..427e16369 100644 --- a/templates/pages/result.csv.twig +++ b/templates/pages/result.csv.twig @@ -5,6 +5,10 @@ {% if project.hasPageAssessments and pages.deleted != 'deleted' %} {% set columns = columns|merge(['assessment']) %} {% endif %} +{% if project.hasProofreadPage and pages.deleted != 'deleted' %} +{% set columns = columns|merge(['proofreadpage-quality']) %} +{% set qualityNames = project.prpQualityNames %} +{% endif %} {% for thKey in columns %} {{ msg(thKey) }}{% if not loop.last %},{% endif %} {% endfor %} @@ -12,7 +16,7 @@ {% for ns in pages.results|keys %} {% for page in pages.results[ns] %} {% set pageTitle = titleWithNs(page.page_title, ns, project.namespaces) %} -{{ ns }},"{{ pageTitle }}",{{ page.timestamp|date_format }},{{ page.rev_length }}{% if pages.deleted != 'deleted' %},{% if page.length is not null %}{{ page.length }}{% endif %}{% endif %}{% if project.hasPageAssessments %},{{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }}{% endif %} +{{ ns }},"{{ pageTitle }}",{{ page.timestamp|date_format }},{{ page.rev_length }}{% if pages.deleted != 'deleted' %},{% if page.length is not null %}{{ page.length }}{% endif %}{% endif %}{% if project.hasPageAssessments %},{{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }}{% endif %}{% if project.hasProofreadPage %},{{ page.prp_quality ? qualityNames[page.prp_quality] : '' }}{% endif %} {% endfor %} {% endfor %} diff --git a/templates/pages/result.tsv.twig b/templates/pages/result.tsv.twig index f9c1f89cd..f69e0be0f 100644 --- a/templates/pages/result.tsv.twig +++ b/templates/pages/result.tsv.twig @@ -5,6 +5,10 @@ {% if project.hasPageAssessments and pages.deleted != 'deleted' %} {% set columns = columns|merge(['assessment']) %} {% endif %} +{% if project.hasProofreadPage and pages.deleted != 'deleted' %} +{% set columns = columns|merge(['proofreadpage-quality']) %} +{% set qualityNames = project.prpQualityNames %} +{% endif %} {% for thKey in columns %} {{ msg(thKey) }}{% if not loop.last %} {% endif %} {% endfor %} @@ -12,7 +16,7 @@ {% for ns in pages.results|keys %} {% for page in pages.results[ns] %} {% set pageTitle = titleWithNs(page.page_title, ns, project.namespaces) %} -{{ ns }} {{ pageTitle }} {{ page.timestamp|date_format }} {{ page.rev_length }}{% if pages.deleted != 'deleted' %} {% if page.length is not null %}{{ page.length }}{% endif %}{% endif %}{% if project.hasPageAssessments %} {{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }}{% endif %} +{{ ns }} {{ pageTitle }} {{ page.timestamp|date_format }} {{ page.rev_length }}{% if pages.deleted != 'deleted' %} {% if page.length is not null %}{{ page.length }}{% endif %}{% endif %}{% if project.hasPageAssessments %} {{ page.assessment.class ? page.assessment.class|ucfirst : msg('unknown') }}{% endif %}{% if project.hasProofreadPage %} {{ page.prp_quality ? qualityNames[page.prp_quality] : '' }}{% endif %} {% endfor %} {% endfor %} diff --git a/templates/pages/result.wikitext.twig b/templates/pages/result.wikitext.twig index 467e38f19..b37849603 100644 --- a/templates/pages/result.wikitext.twig +++ b/templates/pages/result.wikitext.twig @@ -19,6 +19,10 @@ {% if project.hasPageAssessments(ns) and pages.deleted != 'deleted' %} {% set columns = columns|merge(['assessment']) %} {% endif %} +{% if project.isPrpPage(ns) %} +{% set columns = columns|merge(['proofreadpage-quality']) %} +{% set qualityNames = project.prpQualityNames %} +{% endif %} {% for thKey in columns %} ! {{ msg(thKey)|ucfirst }} {% endfor %} @@ -42,6 +46,9 @@ [[File:{{ project.pageAssessments.badgeURL(page.assessment.class, true) }}|20px]] {{ page.assessment.class ? page.assessment.class : msg('unknown') }} {% endif %} {% endif %} +{% if page.prp_quality is defined %} +| {{ qualityNames[page.prp_quality] }} +{% endif %} {% endif %} | [{{ wiki.pageLogUrlRaw(pageTitle, project) }} {{ msg('log') }}]{% if not(page.deleted) %} · [{{ wiki.pageHistUrlRaw(pageTitle, project) }} {{ msg('history') }}]{% if enabled('PageInfo') %} · [{{ url('PageInfoResult', {'project': project.domain, 'page': pageTitle}) }} {{ msg('tool-pageinfo') }}]{% endif %}{% if enabled('TopEdits') %} · [{{ url('topedits', {'project': project.domain, 'username': user.usernameIdent, 'namespace': ns, 'page': page.page_title}) }} {{ msg('tool-topedits') }}]{% endif %}{% if isWMF() %} · [https://pageviews.wmcloud.org/?project={{ project.domain }}&pages={{ pageTitle|e('url') }} {{ msg('pageviews') }}]{% endif %}{% endif %} diff --git a/templates/topedits/result_namespace.wikitext.twig b/templates/topedits/result_namespace.wikitext.twig index acb20c808..29d26186a 100644 --- a/templates/topedits/result_namespace.wikitext.twig +++ b/templates/topedits/result_namespace.wikitext.twig @@ -15,6 +15,7 @@ ==== {{ nsName(ns, project.namespaces) }} ==== {% set showPageAssessment = ns == 0 and project.hasPageAssessments %} +{% set showProofreadQuality = project.hasProofreadPage and project.isPrpPage(ns) %} {{ te.numPagesNamespace(ns) }} {{ msg('pages')|lower }}. {| class="wikitable sortable" ! {{ msg('edits')|ucfirst }} @@ -22,6 +23,9 @@ {% if showPageAssessment %} ! {{ msg('assessment') }} {% endif %} +{% if showProofreadQuality %} +! {{ msg('proofreadpage-quality') }}{% set qualityNames = project.prpQualityNames %} +{% endif %} ! {{ msg('links') }} {% for page in pages %} |- @@ -32,6 +36,9 @@ {% if badge is defined %} [[File:{{ badge }}|20px]] {{ page.assessment.class ? page.assessment.class : msg('unknown') }} {% endif %}{% endif %} +{% if showProofreadQuality %} +| {{ qualityNames[page.prp_quality] }} +{% endif %} | [{% verbatim %}{{{% endverbatim %}fullurl:Special:Log|page={{ page.full_page_title|replace({' ': '_'}) }}}} {{ msg('log') }}] · [{{ url('PageInfoResult', {project:project.domain, page:page.full_page_title}) }} {{ msg('tool-pageinfo') }}] · [{{ url('TopEditsResultPage', {project:project.domain, username:user.usernameIdent, namespace:page.namespace, page:page.page_title}) }} {{ msg('tool-topedits') }}] {% endfor %} {% if pages|length >= 10 and te.topEdits|length > 1 %} From d7918139b94bf9b7c32bba4f33619409e545c4cf Mon Sep 17 00:00:00 2001 From: alien4444 Date: Wed, 20 Aug 2025 20:49:53 +0200 Subject: [PATCH 15/60] add tests for most of EditCounter; a few other tweaks --- src/Model/EditCounter.php | 83 +++---- src/Repository/EditCounterRepository.php | 17 +- templates/editCounter/general_stats.html.twig | 10 +- templates/editCounter/timecard.html.twig | 2 +- templates/topedits/result_namespace.html.twig | 2 +- tests/Model/EditCounterTest.php | 219 +++++++++++++++++- 6 files changed, 255 insertions(+), 78 deletions(-) diff --git a/src/Model/EditCounter.php b/src/Model/EditCounter.php index bf63cbdde..8b1a67a1f 100644 --- a/src/Model/EditCounter.php +++ b/src/Model/EditCounter.php @@ -46,10 +46,10 @@ class EditCounter extends Model protected array $timeCardData; /** - * Revision size data, with keys 'average_size', 'large_edits' and 'small_edits'. - * @var string[] As returned by the DB, unconverted to int or float + * Various data on the last 5000 edits. + * @var string[] */ - protected array $editSizeData; + protected array $editData; /** * Duration of the longest block in seconds; -1 if indefinite, @@ -149,19 +149,21 @@ public function getThanksReceived(): int * @param bool $blocksOnly Whether to include only blocks, and not reblocks and unblocks. * @return array */ - protected function getBlocks(string $type, bool $blocksOnly = true): array + public function getBlocks(string $type, bool $blocksOnly = true): array { if (isset($this->blocks[$type]) && is_array($this->blocks[$type])) { - return $this->blocks[$type]; + $blocks = $this->blocks[$type]; + } else { + $method = "getBlocks".ucfirst($type); + $blocks = $this->repository->$method($this->project, $this->user); + $this->blocks[$type] = $blocks; } - $method = "getBlocks".ucfirst($type); - $blocks = $this->repository->$method($this->project, $this->user); - $this->blocks[$type] = $blocks; // Filter out unblocks unless requested. + // Expressly don't store this. if ($blocksOnly) { $blocks = array_filter($blocks, function ($block) { - return ('block' === $block['log_action'] || 'reblock' == $block['log_action']); + return ('block' === $block['log_action'] || 'reblock' === $block['log_action']); }); } @@ -335,9 +337,11 @@ public function countBlocksReceived(): int */ public function getLongestBlockSeconds() { + // @codeCoverageIgnoreStart if (isset($this->longestBlockSeconds)) { return $this->longestBlockSeconds; } + // @codeCoverageIgnoreEnd $blocks = $this->getBlocks('received', false); $this->longestBlockSeconds = false; @@ -786,20 +790,21 @@ public function timeCard(): array // Fill in zeros for timeslots that have no values. $sortedTotals = []; $index = 0; - $sortedIndex = 0; foreach (range(1, 7) as $day) { foreach (range(0, 23) as $hour) { - if (isset($totals[$index]) && (int)$totals[$index]['hour'] === $hour) { - $sortedTotals[$sortedIndex] = $totals[$index]; + if (isset($totals[$index]) + && (int)$totals[$index]['day_of_week'] === $day + && (int)$totals[$index]['hour'] === $hour + ) { + $sortedTotals[] = $totals[$index]; $index++; } else { - $sortedTotals[$sortedIndex] = [ + $sortedTotals[] = [ 'day_of_week' => $day, 'hour' => $hour, 'value' => 0, ]; } - $sortedIndex++; } } @@ -819,10 +824,12 @@ public function monthCounts(?DateTime $currentTime = null): array return $this->monthCounts; } + // @codeCoverageIgnoreStart // Set to current month if we're not unit-testing if (!($currentTime instanceof DateTime)) { $currentTime = new DateTime('last day of this month'); } + // @codeCoverageIgnoreEnd $totals = $this->repository->getMonthCounts($this->project, $this->user); $out = [ @@ -889,8 +896,6 @@ public function monthCountsWithNamespaces(?DateTime $currentTime = null): array * string[] - Modified $out filled with month stats, * DateTime - timestamp of first edit * ] - * Tests covered in self::monthCounts(). - * @codeCoverageIgnore */ private function fillInMonthCounts(array $out, array $totals, DateTime $firstEdit): array { @@ -914,8 +919,6 @@ private function fillInMonthCounts(array $out, array $totals, DateTime $firstEdi * @param array $out * @param DatePeriod $dateRange From first edit to present. * @return array Modified $out filled with month stats. - * Tests covered in self::monthCounts(). - * @codeCoverageIgnore */ private function fillInMonthTotalsAndLabels(array $out, DatePeriod $dateRange): array { @@ -946,9 +949,11 @@ private function fillInMonthTotalsAndLabels(array $out, DatePeriod $dateRange): */ public function yearCounts(?DateTime $currentTime = null): array { + // @codeCoverageIgnoreStart if (isset($this->yearCounts)) { return $this->yearCounts; } + // @codeCoverageIgnoreEnd $monthCounts = $this->monthCounts($currentTime); $yearCounts = [ @@ -1015,16 +1020,16 @@ public function yearTotals(?DateTime $currentTime = null): array } /** - * Get average edit size, and number of large and small edits. - * @return array + * Get average edit size, number of large and small edits, and change tags. + * @return array With keys "sizes", "average_size", "small_edits", "large_edits", "tag_lists". */ - public function getEditSizeData(): array + public function getEditData(): array { - if (!isset($this->editSizeData)) { - $this->editSizeData = $this->repository - ->getEditSizeData($this->project, $this->user); + if (!isset($this->editData)) { + $this->editData = $this->repository + ->getEditData($this->project, $this->user); } - return $this->editSizeData; + return $this->editData; } /** @@ -1037,33 +1042,13 @@ public function countLast5000(): int return $this->countLiveRevisions() > 5000 ? 5000 : $this->countLiveRevisions(); } - /** - * Get the number of edits under 20 bytes of the user's past 5000 edits. - * @return int - */ - public function countSmallEdits(): int - { - $editSizeData = $this->getEditSizeData(); - return isset($editSizeData['small_edits']) ? (int) $editSizeData['small_edits'] : 0; - } - - /** - * Get the total number of edits over 1000 bytes of the user's past 5000 edits. - * @return int - */ - public function countLargeEdits(): int - { - $editSizeData = $this->getEditSizeData(); - return isset($editSizeData['large_edits']) ? (int) $editSizeData['large_edits'] : 0; - } - /** * Get the ProofreadPage tagged quality changes in the last 5000 edits. * @return int[] With keys 0, 1, 2, 3, 4, and 'total'. */ public function countQualityChanges(): array { - $tagLists = $this->getEditSizeData()['tag_lists']; + $tagLists = $this->getEditData()['tag_lists']; $res = [ 0 => 0, 1 => 0, @@ -1096,9 +1081,9 @@ public function countQualityChanges(): array */ public function averageEditSize(): float { - $editSizeData = $this->getEditSizeData(); - if (isset($editSizeData['average_size'])) { - return round((float)$editSizeData['average_size'], 3); + $editData = $this->getEditData(); + if (isset($editData['average_size'])) { + return round((float)$editData['average_size'], 3); } else { return 0; } diff --git a/src/Repository/EditCounterRepository.php b/src/Repository/EditCounterRepository.php index 828a19b41..66058c117 100644 --- a/src/Repository/EditCounterRepository.php +++ b/src/Repository/EditCounterRepository.php @@ -20,7 +20,6 @@ */ class EditCounterRepository extends Repository { - protected AutoEditsRepository $autoEditsRepo; protected ProjectRepository $projectRepo; public function __construct( @@ -32,10 +31,8 @@ public function __construct( bool $isWMF, int $queryTimeout, ProjectRepository $projectRepo, - AutoEditsRepository $autoEditsRepo ) { $this->projectRepo = $projectRepo; - $this->autoEditsRepo = $autoEditsRepo; parent::__construct($managerRegistry, $cache, $guzzle, $logger, $parameterBag, $isWMF, $queryTimeout); } @@ -562,7 +559,7 @@ public function getTimeCard(Project $project, User $user): array * @return string[] With keys 'sizes, 'average_size', * 'small_edits', 'large_edits', and 'tag_lists' */ - public function getEditSizeData(Project $project, User $user): array + public function getEditData(Project $project, User $user): array { // Set up cache. $cacheKey = $this->getCacheKey(func_get_args(), 'ec_editsizes'); @@ -619,16 +616,4 @@ public function getEditSizeData(Project $project, User $user): array // Cache and return. return $this->setCache($cacheKey, $results); } - - /** - * Get the number of edits this user made using semi-automated tools. - * @param Project $project - * @param User $user - * @return int Result of query, see below. - * @deprecated Inject AutoEditsRepository and call the countAutomatedEdits directly. - */ - public function countAutomatedEdits(Project $project, User $user): int - { - return $this->autoEditsRepo->countAutomatedEdits($project, $user); - } } diff --git a/templates/editCounter/general_stats.html.twig b/templates/editCounter/general_stats.html.twig index e583bc466..d49e670d7 100644 --- a/templates/editCounter/general_stats.html.twig +++ b/templates/editCounter/general_stats.html.twig @@ -173,20 +173,20 @@ {{ msg('small-edits') }}* - {{ ec.countSmallEdits|num_format }} + {{ ec.editData.small_edits|num_format }} {% if ec.countLast5000 %} · - ({{ ((ec.countSmallEdits / ec.countLast5000) * 100)|percent_format }}) + ({{ ((ec.editData.small_edits / ec.countLast5000) * 100)|percent_format }}) {% endif %} {{ msg('large-edits') }}* - {{ ec.countLargeEdits|num_format }} + {{ ec.editData.large_edits|num_format }} {% if ec.countLast5000 %} · - ({{ ((ec.countLargeEdits / ec.countLast5000) * 100)|percent_format }}) + ({{ ((ec.editData.small_edits / ec.countLast5000) * 100)|percent_format }}) {% endif %} @@ -524,7 +524,7 @@ [[test page]]', - ]); - static::assertEquals( - "<script>alert(\"XSS baby\")</script> " . - "test page", - $edit->getWikifiedSummary() - ); + /** + * Wikified edit summary + */ + public function testWikifiedComment(): void { + $edit = $this->getEditFactory( [ + 'comment' => ' [[test page]]', + ] ); + static::assertEquals( + "<script>alert(\"XSS baby\")</script> " . + "test page", + $edit->getWikifiedSummary() + ); - $edit = $this->getEditFactory([ - 'comment' => 'https://example.org', - ]); - static::assertEquals( - 'https://example.org', - $edit->getWikifiedSummary() - ); + $edit = $this->getEditFactory( [ + 'comment' => 'https://example.org', + ] ); + static::assertEquals( + 'https://example.org', + $edit->getWikifiedSummary() + ); - $edit = $this->getEditFactory([ - 'comment' => '/* Section */', - ]); - static::assertEquals( - "". - "Section:", - $edit->getWikifiedSummary() - ); - } + $edit = $this->getEditFactory( [ + 'comment' => '/* Section */', + ] ); + static::assertEquals( + "" . + "Section:", + $edit->getWikifiedSummary() + ); + } - /** - * Make sure the right tool is detected - */ - public function testTool(): void - { - $edit = $this->getEditFactory([ - 'comment' => 'Level 2 warning re. [[Barack Obama]] ([[WP:HG|HG]]) (3.2.0)', - ]); - static::assertArraySubset( - [ 'name' => 'Huggle' ], - $edit->getTool() - ); - } + /** + * Make sure the right tool is detected + */ + public function testTool(): void { + $edit = $this->getEditFactory( [ + 'comment' => 'Level 2 warning re. [[Barack Obama]] ([[WP:HG|HG]]) (3.2.0)', + ] ); + static::assertArraySubset( + [ 'name' => 'Huggle' ], + $edit->getTool() + ); + } - /** - * Was the edit a revert, based on the edit summary? - */ - public function testIsRevert(): void - { - $edit = $this->getEditFactory([ - 'comment' => 'You should have reverted this edit using [[WP:HG|Huggle]]', - ]); - static::assertFalse($edit->isRevert()); + /** + * Was the edit a revert, based on the edit summary? + */ + public function testIsRevert(): void { + $edit = $this->getEditFactory( [ + 'comment' => 'You should have reverted this edit using [[WP:HG|Huggle]]', + ] ); + static::assertFalse( $edit->isRevert() ); - $edit->setReverted(true); - static::assertTrue($edit->isReverted()); + $edit->setReverted( true ); + static::assertTrue( $edit->isReverted() ); - $edit2 = $this->getEditFactory([ - 'comment' => 'Reverted edits by Mogultalk (talk) ([[WP:HG|HG]]) (3.2.0)', - ]); - static::assertTrue($edit2->isRevert()); - } + $edit2 = $this->getEditFactory( [ + 'comment' => 'Reverted edits by Mogultalk (talk) ([[WP:HG|HG]]) (3.2.0)', + ] ); + static::assertTrue( $edit2->isRevert() ); + } - /** - * Tests that given edit summary is properly asserted as a revert - */ - public function testIsAutomated(): void - { - $edit = $this->getEditFactory([ - 'comment' => 'You should have reverted this edit using [[WP:HG|Huggle]]', - ]); - static::assertFalse($edit->isAutomated()); + /** + * Tests that given edit summary is properly asserted as a revert + */ + public function testIsAutomated(): void { + $edit = $this->getEditFactory( [ + 'comment' => 'You should have reverted this edit using [[WP:HG|Huggle]]', + ] ); + static::assertFalse( $edit->isAutomated() ); - $edit2 = $this->getEditFactory([ - 'comment' => 'Reverted edits by Mogultalk (talk) ([[WP:HG|HG]]) (3.2.0)', - ]); - static::assertTrue($edit2->isAutomated()); - } + $edit2 = $this->getEditFactory( [ + 'comment' => 'Reverted edits by Mogultalk (talk) ([[WP:HG|HG]]) (3.2.0)', + ] ); + static::assertTrue( $edit2->isAutomated() ); + } - /** - * Test some basic getters. - */ - public function testGetters(): void - { - $edit = $this->getEditFactory(['tags' => json_encode(['A', 'B'])]); - static::assertEquals('2017', $edit->getYear()); - static::assertEquals('01', $edit->getMonth()); - static::assertEquals(12, $edit->getLength()); - static::assertEquals(2, $edit->getSize()); - static::assertEquals(2, $edit->getLengthChange()); - static::assertEquals('Testuser', $edit->getUser()->getUsername()); - static::assertContains('A', $edit->getTags()); - } + /** + * Test some basic getters. + */ + public function testGetters(): void { + $edit = $this->getEditFactory( [ 'tags' => json_encode( [ 'A', 'B' ] ) ] ); + static::assertSame( '2017', $edit->getYear() ); + static::assertSame( '01', $edit->getMonth() ); + static::assertEquals( 12, $edit->getLength() ); + static::assertEquals( 2, $edit->getSize() ); + static::assertEquals( 2, $edit->getLengthChange() ); + static::assertEquals( 'Testuser', $edit->getUser()->getUsername() ); + static::assertContains( 'A', $edit->getTags() ); + } - /** - * URL to the diff. - */ - public function testDiffUrl(): void - { - $edit = $this->getEditFactory(); - static::assertEquals( - 'https://en.wikipedia.org/wiki/Special:Diff/1', - $edit->getDiffUrl() - ); - } + /** + * URL to the diff. + */ + public function testDiffUrl(): void { + $edit = $this->getEditFactory(); + static::assertEquals( + 'https://en.wikipedia.org/wiki/Special:Diff/1', + $edit->getDiffUrl() + ); + } - /** - * URL to the diff. - */ - public function testPermaUrl(): void - { - $edit = $this->getEditFactory(); - static::assertEquals( - 'https://en.wikipedia.org/wiki/Special:PermaLink/1', - $edit->getPermaUrl() - ); - } + /** + * URL to the diff. + */ + public function testPermaUrl(): void { + $edit = $this->getEditFactory(); + static::assertEquals( + 'https://en.wikipedia.org/wiki/Special:PermaLink/1', + $edit->getPermaUrl() + ); + } - /** - * Was the edit made by a logged out user? - */ - public function testIsAnon(): void - { - // Edit made by User:Testuser - $edit = $this->getEditFactory(); - $project = $this->createMock(Project::class); - static::assertFalse($edit->isAnon($project)); + /** + * Was the edit made by a logged out user? + */ + public function testIsAnon(): void { + // Edit made by User:Testuser + $edit = $this->getEditFactory(); + $project = $this->createMock( Project::class ); + static::assertFalse( $edit->isAnon( $project ) ); - $edit = $this->getEditFactory([ - 'username' => '192.168.0.1', - ]); - static::assertTrue($edit->isAnon($project)); - } + $edit = $this->getEditFactory( [ + 'username' => '192.168.0.1', + ] ); + static::assertTrue( $edit->isAnon( $project ) ); + } - public function testGetForJson(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('getPageInfo') - ->willReturn([ - 'ns' => 1, - ]); - $this->page = new Page($pageRepo, $this->project, 'Talk:Test_page'); - $edit = $this->getEditFactory(); - static::assertEquals( - [ - 'project' => 'en.wikipedia.org', - 'username' => 'Testuser', - 'page_title' => 'Test page', - 'namespace' => 1, - 'rev_id' => 1, - 'timestamp' => '2017-01-01T10:00:00Z', - 'minor' => false, - 'length' => 12, - 'length_change' => 2, - 'comment' => 'Test', - 'reverted' => false, - ], - $edit->getForJson(true) - ); - } + public function testGetForJson(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'getPageInfo' ) + ->willReturn( [ + 'ns' => 1, + ] ); + $this->page = new Page( $pageRepo, $this->project, 'Talk:Test_page' ); + $edit = $this->getEditFactory(); + static::assertEquals( + [ + 'project' => 'en.wikipedia.org', + 'username' => 'Testuser', + 'page_title' => 'Test page', + 'namespace' => 1, + 'rev_id' => 1, + 'timestamp' => '2017-01-01T10:00:00Z', + 'minor' => false, + 'length' => 12, + 'length_change' => 2, + 'comment' => 'Test', + 'reverted' => false, + ], + $edit->getForJson( true ) + ); + } - public function testDeleted(): void - { - $this->editAttrs['rev_deleted'] = Edit::DELETED_USER; - $edit = $this->getEditFactory(); - static::assertNull($edit->getUser()); - static::assertEquals(Edit::DELETED_USER, $edit->getDeleted()); - static::assertTrue($edit->deletedUser()); - static::assertFalse($edit->deletedSummary()); - } + public function testDeleted(): void { + $this->editAttrs['rev_deleted'] = Edit::DELETED_USER; + $edit = $this->getEditFactory(); + static::assertNull( $edit->getUser() ); + static::assertEquals( Edit::DELETED_USER, $edit->getDeleted() ); + static::assertTrue( $edit->deletedUser() ); + static::assertFalse( $edit->deletedSummary() ); + } - /** - * @param array $attrs - * @return Edit - */ - private function getEditFactory(array $attrs = []): Edit - { - $editRepo = $this->createMock(EditRepository::class); - $editRepo->method('getAutoEditsHelper') - ->willReturn($this->getAutomatedEditsHelper($this->client)); - $userRepo = $this->createMock(UserRepository::class); - return new Edit($editRepo, $userRepo, $this->page, array_merge($this->editAttrs, $attrs)); - } + /** + * @param array $attrs + * @return Edit + */ + private function getEditFactory( array $attrs = [] ): Edit { + $editRepo = $this->createMock( EditRepository::class ); + $editRepo->method( 'getAutoEditsHelper' ) + ->willReturn( $this->getAutomatedEditsHelper( $this->client ) ); + $userRepo = $this->createMock( UserRepository::class ); + return new Edit( $editRepo, $userRepo, $this->page, array_merge( $this->editAttrs, $attrs ) ); + } } diff --git a/tests/Model/GlobalContribsTest.php b/tests/Model/GlobalContribsTest.php index 76dad1913..0b42b34ee 100644 --- a/tests/Model/GlobalContribsTest.php +++ b/tests/Model/GlobalContribsTest.php @@ -1,6 +1,6 @@ globalContribsRepo = $this->createMock(GlobalContribsRepository::class); - $userRepo = $this->createMock(UserRepository::class); - $this->globalContribs = new GlobalContribs( - $this->globalContribsRepo, - $this->createMock(PageRepository::class), - $userRepo, - $this->createMock(EditRepository::class), - new User($userRepo, 'Test user') - ); - } + /** + * Set up shared mocks and class instances. + */ + public function setUp(): void { + $this->globalContribsRepo = $this->createMock( GlobalContribsRepository::class ); + $userRepo = $this->createMock( UserRepository::class ); + $this->globalContribs = new GlobalContribs( + $this->globalContribsRepo, + $this->createMock( PageRepository::class ), + $userRepo, + $this->createMock( EditRepository::class ), + new User( $userRepo, 'Test user' ) + ); + } - /** - * Get all global edit counts, or just the top N, or the overall grand total. - */ - public function testGlobalEditCounts(): void - { - $wiki1 = new Project('wiki1'); - $wiki2 = new Project('wiki2'); - $editCounts = [ - ['project' => new Project('wiki0'), 'total' => 30], - ['project' => $wiki1, 'total' => 50], - ['project' => $wiki2, 'total' => 40], - ['project' => new Project('wiki3'), 'total' => 20], - ['project' => new Project('wiki4'), 'total' => 10], - ['project' => new Project('wiki5'), 'total' => 35], - ]; - $this->globalContribsRepo->expects(static::once()) - ->method('globalEditCounts') - ->willReturn($editCounts); + /** + * Get all global edit counts, or just the top N, or the overall grand total. + */ + public function testGlobalEditCounts(): void { + $wiki1 = new Project( 'wiki1' ); + $wiki2 = new Project( 'wiki2' ); + $editCounts = [ + [ 'project' => new Project( 'wiki0' ), 'total' => 30 ], + [ 'project' => $wiki1, 'total' => 50 ], + [ 'project' => $wiki2, 'total' => 40 ], + [ 'project' => new Project( 'wiki3' ), 'total' => 20 ], + [ 'project' => new Project( 'wiki4' ), 'total' => 10 ], + [ 'project' => new Project( 'wiki5' ), 'total' => 35 ], + ]; + $this->globalContribsRepo->expects( static::once() ) + ->method( 'globalEditCounts' ) + ->willReturn( $editCounts ); - // Get the top 2. - static::assertEquals( - [ - ['project' => $wiki1, 'total' => 50], - ['project' => $wiki2, 'total' => 40], - ], - $this->globalContribs->globalEditCountsTopN(2) - ); + // Get the top 2. + static::assertEquals( + [ + [ 'project' => $wiki1, 'total' => 50 ], + [ 'project' => $wiki2, 'total' => 40 ], + ], + $this->globalContribs->globalEditCountsTopN( 2 ) + ); - // And the bottom 4. - static::assertEquals(95, $this->globalContribs->globalEditCountWithoutTopN(2)); + // And the bottom 4. + static::assertEquals( 95, $this->globalContribs->globalEditCountWithoutTopN( 2 ) ); - // Grand total. - static::assertEquals(185, $this->globalContribs->globalEditCount()); - } + // Grand total. + static::assertEquals( 185, $this->globalContribs->globalEditCount() ); + } - /** - * Test global edits. - * @dataProvider globalEditsProvider - * @param array $contribs - * @param array $projects - * @param int $count - * @param int $projectCount - */ - public function testGlobalEdits( - array $contribs, - array $projects, - int $count, - int $projectCount - ): void { - $globalContribsRepo = $this->createMock(GlobalContribsRepository::class); - $globalContribsRepo->expects(static::exactly(2+(count($projects) ? 0 : 1))) - ->method('getProjectsWithEdits') - ->willReturn($projects); - $globalContribsRepo->expects(static::any()) - ->method('getRevisions') - ->willReturn($contribs); - $this->globalContribs->setRepository($globalContribsRepo); + /** + * Test global edits. + * @dataProvider globalEditsProvider + * @param array $contribs + * @param array $projects + * @param int $count + * @param int $projectCount + */ + public function testGlobalEdits( + array $contribs, + array $projects, + int $count, + int $projectCount + ): void { + $globalContribsRepo = $this->createMock( GlobalContribsRepository::class ); + $globalContribsRepo->expects( static::exactly( 2 + ( count( $projects ) ? 0 : 1 ) ) ) + ->method( 'getProjectsWithEdits' ) + ->willReturn( $projects ); + $globalContribsRepo->expects( static::any() ) + ->method( 'getRevisions' ) + ->willReturn( $contribs ); + $this->globalContribs->setRepository( $globalContribsRepo ); - $edits = $this->globalContribs->globalEdits(); + $edits = $this->globalContribs->globalEdits(); - static::assertCount($count, $edits); - if ($count > 0) { - static::assertEquals('My user page', $edits['1514764800-1']->getComment()); - } - static::assertEquals($projectCount, $this->globalContribs->numProjectsWithEdits()); + static::assertCount( $count, $edits ); + if ( $count > 0 ) { + static::assertEquals( 'My user page', $edits['1514764800-1']->getComment() ); + } + static::assertEquals( $projectCount, $this->globalContribs->numProjectsWithEdits() ); - $this->globalContribs->globalEdits(); - } + $this->globalContribs->globalEdits(); + } - public function globalEditsProvider(): array - { - /** @var ProjectRepository|MockObject $wiki1Repo */ - $wiki1Repo = $this->createMock(ProjectRepository::class); - $wiki1Repo->expects(static::once()) - ->method('getMetadata') - ->willReturn(['namespaces' => [2 => 'User']]); - $wiki1Repo->expects(static::once()) - ->method('getOne') - ->willReturn([ - 'dbName' => 'wiki1', - 'url' => 'https://wiki1.example.org', - ]); - $wiki1 = new Project('wiki1'); - $wiki1->setRepository($wiki1Repo); - $edit = [[ - 'dbName' => 'wiki1', - 'id' => 1, - 'timestamp' => '20180101000000', - 'unix_timestamp' => '1514764800', - 'minor' => 0, - 'deleted' => 0, - 'length' => 5, - 'length_change' => 10, - 'parent_id' => 0, - 'username' => 'Test user', - 'page_title' => 'Foo bar', - 'namespace' => '2', - 'comment' => 'My user page', - ]]; - return [ - [ // Dataset #0: normal case. 1 edit, 1 project - $edit, - ['wiki1' => $wiki1], - 1, - 1, - ], [ // Dataset #1: project for edit is null - $edit, - ['wiki1' => null], - 0, - 1, - ], [ // Dataset #2: no projects and no edit - [], - [], - 0, - 0, - ], - ]; - } + public function globalEditsProvider(): array { + /** @var ProjectRepository|MockObject $wiki1Repo */ + $wiki1Repo = $this->createMock( ProjectRepository::class ); + $wiki1Repo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ 'namespaces' => [ 2 => 'User' ] ] ); + $wiki1Repo->expects( static::once() ) + ->method( 'getOne' ) + ->willReturn( [ + 'dbName' => 'wiki1', + 'url' => 'https://wiki1.example.org', + ] ); + $wiki1 = new Project( 'wiki1' ); + $wiki1->setRepository( $wiki1Repo ); + $edit = [ [ + 'dbName' => 'wiki1', + 'id' => 1, + 'timestamp' => '20180101000000', + 'unix_timestamp' => '1514764800', + 'minor' => 0, + 'deleted' => 0, + 'length' => 5, + 'length_change' => 10, + 'parent_id' => 0, + 'username' => 'Test user', + 'page_title' => 'Foo bar', + 'namespace' => '2', + 'comment' => 'My user page', + ] ]; + return [ + [ // Dataset #0: normal case. 1 edit, 1 project + $edit, + [ 'wiki1' => $wiki1 ], + 1, + 1, + ], [ // Dataset #1: project for edit is null + $edit, + [ 'wiki1' => null ], + 0, + 1, + ], [ // Dataset #2: no projects and no edit + [], + [], + 0, + 0, + ], + ]; + } } diff --git a/tests/Model/LargestPagesTest.php b/tests/Model/LargestPagesTest.php index e9bb0c40e..7fdb69a39 100644 --- a/tests/Model/LargestPagesTest.php +++ b/tests/Model/LargestPagesTest.php @@ -1,6 +1,6 @@ createMock(LargestPagesRepository::class), - $this->createMock(Project::class), - 0, - 'foo%', - '%bar' - ); +class LargestPagesTest extends TestCase { + public function testGetters(): void { + $largestPages = new LargestPages( + $this->createMock( LargestPagesRepository::class ), + $this->createMock( Project::class ), + 0, + 'foo%', + '%bar' + ); - static::assertEquals('foo%', $largestPages->getIncludePattern()); - static::assertEquals('%bar', $largestPages->getExcludePattern()); - } + static::assertEquals( 'foo%', $largestPages->getIncludePattern() ); + static::assertEquals( '%bar', $largestPages->getExcludePattern() ); + } } diff --git a/tests/Model/ModelTest.php b/tests/Model/ModelTest.php index 3ec168f43..8181c3a3f 100644 --- a/tests/Model/ModelTest.php +++ b/tests/Model/ModelTest.php @@ -1,6 +1,6 @@ createMock(SimpleEditCounterRepository::class); - $project = $this->createMock(Project::class); - $user = $this->createMock(User::class); - $start = '2020-01-01'; - $end = '2020-02-01'; +class ModelTest extends TestAdapter { + public function testBasics(): void { + // Use SimpleEditCounter since Model is abstract. + $repo = $this->createMock( SimpleEditCounterRepository::class ); + $project = $this->createMock( Project::class ); + $user = $this->createMock( User::class ); + $start = '2020-01-01'; + $end = '2020-02-01'; - $model = new SimpleEditCounter( - $repo, - $project, - $user, - 'all', - strtotime($start), - strtotime($end) - ); + $model = new SimpleEditCounter( + $repo, + $project, + $user, + 'all', + strtotime( $start ), + strtotime( $end ) + ); - self::assertEquals($model->getRepository(), $repo); - self::assertEquals($model->getProject(), $project); - self::assertEquals($model->getUser(), $user); - self::assertNull($model->getPage()); - self::assertEquals('all', $model->getNamespace()); - self::assertEquals(strtotime($start), $model->getStart()); - self::assertEquals($start, $model->getStartDate()); - self::assertEquals(strtotime($end), $model->getEnd()); - self::assertEquals($end, $model->getEndDate()); - self::assertTrue($model->hasDateRange()); - self::assertNull($model->getLimit()); - self::assertNull($model->getOffset()); - self::assertNull($model->getOffsetISO()); - } + self::assertEquals( $model->getRepository(), $repo ); + self::assertEquals( $model->getProject(), $project ); + self::assertEquals( $model->getUser(), $user ); + self::assertNull( $model->getPage() ); + self::assertEquals( 'all', $model->getNamespace() ); + self::assertEquals( strtotime( $start ), $model->getStart() ); + self::assertEquals( $start, $model->getStartDate() ); + self::assertEquals( strtotime( $end ), $model->getEnd() ); + self::assertEquals( $end, $model->getEndDate() ); + self::assertTrue( $model->hasDateRange() ); + self::assertNull( $model->getLimit() ); + self::assertNull( $model->getOffset() ); + self::assertNull( $model->getOffsetISO() ); + } } diff --git a/tests/Model/PageAssessmentsTest.php b/tests/Model/PageAssessmentsTest.php index 3ca456409..8f15ecac6 100644 --- a/tests/Model/PageAssessmentsTest.php +++ b/tests/Model/PageAssessmentsTest.php @@ -1,6 +1,6 @@ localContainer = $client->getContainer(); - - $this->paRepo = $this->createMock(PageAssessmentsRepository::class); - $this->paRepo->expects($this->once()) - ->method('getConfig') - ->willReturn($this->localContainer->getParameter('assessments')['en.wikipedia.org']); - - $this->project = $this->createMock(Project::class); - } - - /** - * Some of the basics. - */ - public function testBasics(): void - { - $pa = new PageAssessments($this->paRepo, $this->project); - - static::assertEquals( - $this->localContainer->getParameter('assessments')['en.wikipedia.org'], - $pa->getConfig() - ); - static::assertTrue($pa->isEnabled()); - static::assertTrue($pa->hasImportanceRatings()); - static::assertTrue($pa->isSupportedNamespace(6)); - } - - /** - * Badges - */ - public function testBadges(): void - { - $config = $this->paRepo->getConfig($this->project); - $config['class']['Unknown'] = null; - $paRepo = $this->createMock(PageAssessmentsRepository::class); - $paRepo->expects($this->once()) - ->method('getConfig') - ->willReturn($config); - $pa = new PageAssessments($paRepo, $this->project); - - static::assertEquals( - 'https://upload.wikimedia.org/wikipedia/commons/b/bc/Featured_article_star.svg', - $pa->getBadgeURL('FA') - ); - - static::assertEquals( - 'Featured_article_star.svg', - $pa->getBadgeURL('FA', true) - ); - - static::assertEquals( - '', - $pa->getBadgeURL('Bonjour', true) - ); - } - - /** - * Page assements. - */ - public function testGetAssessments(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('getPageInfo')->willReturn([ - 'title' => 'Test Page', - 'ns' => 0, - ]); - $page = new Page($pageRepo, $this->project, 'Test_page'); - - $this->paRepo->expects($this->exactly(2)) - ->method('getAssessments') - ->with($page) - ->willReturn([ - [ - 'wikiproject' => 'Military history', - 'class' => 'Start', - 'importance' => 'Low', - ], - [ - 'wikiproject' => 'Firearms', - 'class' => 'C', - 'importance' => 'High', - ], - ]); - - $pa = new PageAssessments($this->paRepo, $this->project); - - $assessments = $pa->getAssessments($page); - $assessment = $pa->getAssessment($page); - - // Picks the first assessment. - static::assertEquals([ - 'class' => 'Start', - 'color' => '#FFAA66', - 'category' => 'Category:Start-Class articles', - 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Symbol_start_class.svg', - ], $assessments['assessment']); - static::assertEquals([ - 'color' => '#FFAA66', - 'category' => 'Category:Start-Class articles', - 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Symbol_start_class.svg', - 'value' => 'Start', - ], $assessment); - - static::assertEquals(2, count($assessments['wikiprojects'])); - } - - public function testWrongNsAssessments(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('getPageInfo')->willReturn([ - 'title' => 'Talk:Test Page', - 'ns' => 1, - ]); - $page = new Page($pageRepo, $this->project, 'Talk:Test_page'); - $pa = new PageAssessments($this->paRepo, $this->project); - static::assertFalse($pa->getAssessment($page)); - static::assertNull($pa->getAssessments($page)); - } - - public function testUnknownAssessment(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('getPageInfo')->willReturn([ - 'title' => 'Test Page', - 'ns' => 6, - ]); - $page = new Page($pageRepo, $this->project, 'Test_page'); - $this->paRepo->expects(static::exactly(2)) - ->method('getAssessments') - ->willReturn([]); - $pa = new PageAssessments($this->paRepo, $this->project); - static::assertEquals([ - 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/e/e0/Symbol_question.svg', - 'color' => '', - 'category' => 'Category:Unassessed articles', - 'value' => '???', - ], $pa->getAssessment($page)); - static::assertEquals([], $pa->getAssessments($page)); - } - - public function testImportanceFromUnknownAssessment(): void - { - $pa = new PageAssessments($this->paRepo, $this->project); - static::assertEquals([ - 'color' => '', - 'category' => 'Category:Unknown-importance articles', - 'weight' => 0, - 'value' => '???', - ], $pa->getImportanceFromAssessment(['importance' => ''])); - } - - public function testImportanceWithMissingConfig(): void - { - // To make it happy about being used once: - $this->paRepo->getConfig($this->project); - // Also ensures we don't use it by mistake in the next tests. - $paRepo = $this->createMock(PageAssessmentsRepository::class); - $paRepo->expects(static::once()) - ->method('getConfig') - ->willReturn([]); - $pa = new PageAssessments($paRepo, $this->project); - static::assertNull($pa->getImportanceFromAssessment(['importance' => ''])); - } +class PageAssessmentsTest extends TestAdapter { + /** @var ContainerInterface The Symfony localContainer ($localContainer to not override self::$container). */ + protected ContainerInterface $localContainer; + + /** @var PageAssessments */ + protected $pa; + + /** @var PageAssessmentsRepository The repository for page assessments. */ + protected $paRepo; + + /** @var Project The project we're working with. */ + protected $project; + + /** + * Set up client and set container, and PageAssessmentsRepository mock. + */ + public function setUp(): void { + $client = static::createClient(); + $this->localContainer = $client->getContainer(); + + $this->paRepo = $this->createMock( PageAssessmentsRepository::class ); + $this->paRepo->expects( $this->once() ) + ->method( 'getConfig' ) + ->willReturn( $this->localContainer->getParameter( 'assessments' )['en.wikipedia.org'] ); + + $this->project = $this->createMock( Project::class ); + } + + /** + * Some of the basics. + */ + public function testBasics(): void { + $pa = new PageAssessments( $this->paRepo, $this->project ); + + static::assertEquals( + $this->localContainer->getParameter( 'assessments' )['en.wikipedia.org'], + $pa->getConfig() + ); + static::assertTrue( $pa->isEnabled() ); + static::assertTrue( $pa->hasImportanceRatings() ); + static::assertTrue( $pa->isSupportedNamespace( 6 ) ); + } + + /** + * Badges + */ + public function testBadges(): void { + $config = $this->paRepo->getConfig( $this->project ); + $config['class']['Unknown'] = null; + $paRepo = $this->createMock( PageAssessmentsRepository::class ); + $paRepo->expects( $this->once() ) + ->method( 'getConfig' ) + ->willReturn( $config ); + $pa = new PageAssessments( $paRepo, $this->project ); + + static::assertEquals( + 'https://upload.wikimedia.org/wikipedia/commons/b/bc/Featured_article_star.svg', + $pa->getBadgeURL( 'FA' ) + ); + + static::assertEquals( + 'Featured_article_star.svg', + $pa->getBadgeURL( 'FA', true ) + ); + + static::assertSame( + '', + $pa->getBadgeURL( 'Bonjour', true ) + ); + } + + /** + * Page assements. + */ + public function testGetAssessments(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'getPageInfo' )->willReturn( [ + 'title' => 'Test Page', + 'ns' => 0, + ] ); + $page = new Page( $pageRepo, $this->project, 'Test_page' ); + + $this->paRepo->expects( $this->exactly( 2 ) ) + ->method( 'getAssessments' ) + ->with( $page ) + ->willReturn( [ + [ + 'wikiproject' => 'Military history', + 'class' => 'Start', + 'importance' => 'Low', + ], + [ + 'wikiproject' => 'Firearms', + 'class' => 'C', + 'importance' => 'High', + ], + ] ); + + $pa = new PageAssessments( $this->paRepo, $this->project ); + + $assessments = $pa->getAssessments( $page ); + $assessment = $pa->getAssessment( $page ); + + // Picks the first assessment. + static::assertEquals( [ + 'class' => 'Start', + 'color' => '#FFAA66', + 'category' => 'Category:Start-Class articles', + 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Symbol_start_class.svg', + ], $assessments['assessment'] ); + static::assertEquals( [ + 'color' => '#FFAA66', + 'category' => 'Category:Start-Class articles', + 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Symbol_start_class.svg', + 'value' => 'Start', + ], $assessment ); + + static::assertCount( 2, $assessments['wikiprojects'] ); + } + + public function testWrongNsAssessments(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'getPageInfo' )->willReturn( [ + 'title' => 'Talk:Test Page', + 'ns' => 1, + ] ); + $page = new Page( $pageRepo, $this->project, 'Talk:Test_page' ); + $pa = new PageAssessments( $this->paRepo, $this->project ); + static::assertFalse( $pa->getAssessment( $page ) ); + static::assertNull( $pa->getAssessments( $page ) ); + } + + public function testUnknownAssessment(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'getPageInfo' )->willReturn( [ + 'title' => 'Test Page', + 'ns' => 6, + ] ); + $page = new Page( $pageRepo, $this->project, 'Test_page' ); + $this->paRepo->expects( static::exactly( 2 ) ) + ->method( 'getAssessments' ) + ->willReturn( [] ); + $pa = new PageAssessments( $this->paRepo, $this->project ); + static::assertEquals( [ + 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/e/e0/Symbol_question.svg', + 'color' => '', + 'category' => 'Category:Unassessed articles', + 'value' => '???', + ], $pa->getAssessment( $page ) ); + static::assertEquals( [], $pa->getAssessments( $page ) ); + } + + public function testImportanceFromUnknownAssessment(): void { + $pa = new PageAssessments( $this->paRepo, $this->project ); + static::assertEquals( [ + 'color' => '', + 'category' => 'Category:Unknown-importance articles', + 'weight' => 0, + 'value' => '???', + ], $pa->getImportanceFromAssessment( [ 'importance' => '' ] ) ); + } + + public function testImportanceWithMissingConfig(): void { + // To make it happy about being used once: + $this->paRepo->getConfig( $this->project ); + // Also ensures we don't use it by mistake in the next tests. + $paRepo = $this->createMock( PageAssessmentsRepository::class ); + $paRepo->expects( static::once() ) + ->method( 'getConfig' ) + ->willReturn( [] ); + $pa = new PageAssessments( $paRepo, $this->project ); + static::assertNull( $pa->getImportanceFromAssessment( [ 'importance' => '' ] ) ); + } } diff --git a/tests/Model/PageInfoTest.php b/tests/Model/PageInfoTest.php index 214418cd8..8010e713e 100644 --- a/tests/Model/PageInfoTest.php +++ b/tests/Model/PageInfoTest.php @@ -1,6 +1,6 @@ getAutomatedEditsHelper(); - /** @var I18nHelper $i18nHelper */ - $i18nHelper = static::getContainer()->get('app.i18n_helper'); - $this->project = $this->getMockEnwikiProject(); - $this->pageRepo = $this->createMock(PageRepository::class); - $this->page = $this->createMock(Page::class); - $this->editRepo = $this->createMock(EditRepository::class); - $this->editRepo->method('getAutoEditsHelper') - ->willReturn($autoEditsHelper); - $this->userRepo = $this->createMock(UserRepository::class); - $this->pageInfoRepo = $this->createMock(PageInfoRepository::class); - $this->pageInfoRepo->method('getMaxPageRevisions') - ->willReturn(static::getContainer()->getParameter('app.max_page_revisions')); - $this->pageInfo = new PageInfo( - $this->pageInfoRepo, - $i18nHelper, - $autoEditsHelper, - $this->page - ); - - // Used to set a few private properties without having to recreate everything - $this->reflectionClass = new ReflectionClass($this->pageInfo); - } - - /** - * Number of revisions - */ - public function testNumRevisions(): void - { - $this->setupData(); - $this->page->expects(static::once()) - ->method('getNumRevisions') - ->willReturn(10); - $this->pageInfo->prepareData(); - static::assertEquals(10, $this->pageInfo->getNumRevisions()); - // Should be cached (will error out if repo's getNumRevisions is called again). - static::assertEquals(10, $this->pageInfo->getNumRevisions()); - } - - /** - * Number of revisions processed, based on app.max_page_revisions - * @dataProvider revisionsProcessedProvider - * @param int $numRevisions - * @param int $assertion - */ - public function testRevisionsProcessed(int $numRevisions, int $assertion): void - { - $this->page->method('getNumRevisions')->willReturn($numRevisions); - static::assertEquals( - $this->pageInfo->getNumRevisionsProcessed(), - $assertion - ); - } - - /** - * Data for self::testRevisionsProcessed(). - * @return int[] - */ - public function revisionsProcessedProvider(): array - { - return [ - [1000000, 50000], - [10, 10], - ]; - } - - /** - * Whether there are too many revisions to process. - */ - public function testTooManyRevisions(): void - { - $this->page->expects(static::once()) - ->method('getNumRevisions') - ->willReturn(1000000); - static::assertTrue($this->pageInfo->tooManyRevisions()); - } - - /** - * Various bot-related methods - */ - public function testBots(): void - { - $this->pageInfoRepo->expects(static::once()) - ->method('getBotData') - ->willReturn([ - [ - 'username' => 'Foo', - 'count' => 3, - 'current' => '1', - ], - [ - 'username' => 'Bar', - 'count' => 12, - 'current' => '0', - ], - ]); - static::assertEquals([ - 'Foo' => [ - 'count' => 3, - 'current' => true, - ], - 'Bar' => [ - 'count' => 12, - 'current' => false, - ], - ], $this->pageInfo->getBots()); - static::assertEquals(2, $this->pageInfo->getNumBots()); - static::assertEquals(15, $this->pageInfo->getBotRevisionCount()); - static::assertEquals(15, $this->pageInfo->getBotRevisionCount()); // second time for caching - } - - public function testTopEditorsByEditCount(): void - { - $this->pageInfoRepo->expects(static::once()) - ->method('getTopEditorsByEditCount') - ->willReturn([ - [ - 'username' => 'Foo', - 'count' => 22, - 'minor' => 6, - 'first_revid' => 100, - 'first_timestamp' => '10000101000100', - 'latest_revid' => 300, - 'latest_timestamp' => '10000101000300', - ], - [ - 'username' => 'Bar', - 'count' => 20, - 'minor' => 4, - 'first_revid' => 200, - 'first_timestamp' => '10000101000200', - 'latest_revid' => 400, - 'latest_timestamp' => '10000101000400', - ], - ]); - static::assertEquals([ - [ - 'rank' => 1, - 'username' => 'Foo', - 'count' => 22, - 'minor' => 6, - 'first_edit' => [ - 'id' => 100, - 'timestamp' => '1000-01-01T00:01:00Z', - ], - 'latest_edit' => [ - 'id' => 300, - 'timestamp' => '1000-01-01T00:03:00Z', - ], - ], - [ - 'rank' => 2, - 'username' => 'Bar', - 'count' => 20, - 'minor' => 4, - 'first_edit' => [ - 'id' => 200, - 'timestamp' => '1000-01-01T00:02:00Z', - ], - 'latest_edit' => [ - 'id' => 400, - 'timestamp' => '1000-01-01T00:04:00Z', - ], - ], - ], $this->pageInfo->getTopEditorsByEditCount()); - // Test caching - $this->pageInfo->getTopEditorsByEditCount(); - } - - public function testLinksAndRedirects(): void - { - $this->setupData(); - $this->pageInfo->prepareData(); // Ensure we don't call the revisions (the second time will complain). - $this->page->expects(static::once()) - ->method('countLinksAndRedirects') - ->willReturn([ - 'links_ext_count' => 5, - 'links_out_count' => 3, - 'links_in_count' => 10, - 'redirects_count' => 0, - ]); - static::assertEquals(5, $this->pageInfo->linksExtCount()); - static::assertEquals(3, $this->pageInfo->linksOutCount()); - static::assertEquals(10, $this->pageInfo->linksInCount()); - static::assertEquals(0, $this->pageInfo->redirectsCount()); - } - - public function testBugs(): void - { - $this->page->expects(static::once()) - ->method('getErrors') - ->willReturn([]); - static::assertSame([], $this->pageInfo->getBugs()); - static::assertSame([], $this->pageInfo->getBugs()); // Ensure caching - static::assertEquals(0, $this->pageInfo->numBugs()); - } - - /** - * Test some of the more important getters. - */ - public function testGetters(): void - { - $this->setupData(); - $this->pageInfo->prepareData(); - - static::assertEquals( - 32, - $this->pageInfo->getFirstEdit()->getId() - ); - static::assertEquals( - 60, - $this->pageInfo->getLastEdit()->getId() - ); - static::assertEquals(3, $this->pageInfo->getNumEditors()); - static::assertEquals(2, $this->pageInfo->getAnonCount()); - static::assertEquals(40, $this->pageInfo->anonPercentage()); - static::assertEquals(3, $this->pageInfo->getMinorCount()); - static::assertEquals(60, $this->pageInfo->minorPercentage()); - static::assertEquals(1, $this->pageInfo->getBotRevisionCount()); - static::assertEquals(63, $this->pageInfo->getTotalDays()); - static::assertEquals(12, (int) $this->pageInfo->averageDaysPerEdit()); - static::assertEquals(0, (int) $this->pageInfo->editsPerDay()); - static::assertEquals(2.4, $this->pageInfo->editsPerMonth()); - static::assertEquals(5, $this->pageInfo->editsPerYear()); - static::assertEquals(1.7, $this->pageInfo->editsPerEditor()); - static::assertEquals(2, $this->pageInfo->getAutomatedCount()); - static::assertEquals(1, $this->pageInfo->getRevertCount()); - - static::assertEquals(80, $this->pageInfo->topTenPercentage()); - static::assertEquals(4, $this->pageInfo->getTopTenCount()); - - static::assertEquals(1, $this->pageInfo->getMaxAddition()->getId()); - static::assertEquals(32, $this->pageInfo->getMaxDeletion()->getId()); - - static::assertEquals( - ['Mick Jagger', '192.168.0.2', '192.168.0.1'], - array_keys($this->pageInfo->getEditors()) - ); - static::assertEquals( - [ - 'label' =>'Mick Jagger', - 'value' => 2, - 'percentage' => 50, - ], - $this->pageInfo->topTenEditorsByEdits()[0] - ); - static::assertEquals( - [ - 'label' =>'Mick Jagger', - 'value' => 30, - 'percentage' => 100, - ], - $this->pageInfo->topTenEditorsByAdded()[0] - ); - - // Top 10 counts should not include bots. - static::assertFalse( - array_search( - 'XtoolsBot', - array_column($this->pageInfo->topTenEditorsByEdits(), 'label') - ) - ); - static::assertFalse( - array_search( - 'XtoolsBot', - array_column($this->pageInfo->topTenEditorsByAdded(), 'label') - ) - ); - - static::assertEquals(['Mick Jagger'], $this->pageInfo->getHumans(1)); - - static::assertEquals(3, $this->pageInfo->getMaxEditsPerMonth()); - - static::assertContains( - 'AutoWikiBrowser', - array_keys($this->pageInfo->getTools()) - ); - - static::assertEquals(1, $this->pageInfo->numDeletedRevisions()); - static::assertEquals(2, $this->pageInfo->getMobileCount()); - static::assertEquals(2, $this->pageInfo->getVisualCount()); - } - - /** - * Test max removal reverting. - * Could theoretically be done above but would require changing many values. - */ - public function testMaxRemovalRevert(): void - { - $this->page->expects(static::once()) - ->method('getRevisions') - ->willReturn([ - [ - 'id' => 1, - 'timestamp' => '20010203040506', - 'minor' => '0', - 'length' => '30', - 'length_change' => '-1', - 'username' => null, - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - ], - [ - 'id' => 2, - 'timestamp' => '20010203040506', - 'minor' => '0', - 'length' => '30', - 'length_change' => '-2', - 'username' => null, - 'comment' => 'Foo bar', - 'rev_sha1' => 'bbbbbb', - ], - [ - 'id' => 3, - 'timestamp' => '20010203040508', - 'minor' => '0', - 'length' => '30', - 'length_change' => '2', - 'username' => null, - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - ], - ]); - $this->pageInfoRepo->expects(static::exactly(3)) - ->method('getEdit') - ->willReturnCallback(fn($page, $rev) => new Edit($this->editRepo, $this->userRepo, $page, $rev)); - $this->pageInfo->prepareData(); - static::assertEquals(1, $this->pageInfo->getMaxDeletion()->getId()); - } - - /** - * Make sure we don't divide by 0 - */ - public function testEmptyFallbacks(): void - { - $this->page->expects(static::once()) - ->method('getRevisions') - ->willReturn([ - [ - 'id' => 1, - 'timestamp' => '20010203040506', - 'minor' => '0', - 'length' => '30', - 'length_change' => '30', - 'username' => null, - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - 'tags' => '["mobile edit"]', - ], - ]); - $this->pageInfoRepo->expects(static::once()) - ->method('getEdit') - ->willReturnCallback(fn($page, $rev) => new Edit($this->editRepo, $this->userRepo, $page, $rev)); - $this->pageInfo->prepareData(); - static::assertEquals(0, $this->pageInfo->editsPerDay()); - static::assertEquals(0, $this->pageInfo->editsPerMonth()); - static::assertEquals(0, $this->pageInfo->editsPerYear()); - static::assertEquals(0, $this->pageInfo->editsPerEditor()); - } - - public function testCountHistory(): void - { - $this->page->expects(static::once()) - ->method('getRevisions') - ->willReturn([ - [ - 'id' => 1, - 'timestamp' => (new DateTime('now'))->format('YmdHis'), - 'minor' => '0', - 'length' => '30', - 'length_change' => '30', - 'username' => null, - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - 'tags' => '["mobile edit"]', - ], - ]); - $this->pageInfoRepo->expects(static::once()) - ->method('getEdit') - ->willReturnCallback(fn($page, $rev) => new Edit($this->editRepo, $this->userRepo, $page, $rev)); - $this->pageInfo->prepareData(); - static::assertEquals([1, 1, 1, 1], array_values($this->pageInfo->getCountHistory())); - } - - - /** - * Test that the data for each individual month and year is correct. - */ - public function testMonthYearCounts(): void - { - $this->setupData(); - $this->pageInfo->prepareData(); - - $yearMonthCounts = $this->pageInfo->getYearMonthCounts(); - - static::assertEquals([2016], array_keys($yearMonthCounts)); - static::assertEquals(['2016'], $this->pageInfo->getYearLabels()); - static::assertArraySubset([ - 'all' => 5, - 'minor' => 3, - 'anon' => 2, - 'automated' => 2, - 'size' => 20, - ], $yearMonthCounts[2016]); - - static::assertEquals( - ['08', '09', '10', '11', '12'], - array_keys($yearMonthCounts[2016]['months']) - ); - static::assertEquals( - ['2016-08', '2016-09', '2016-10', '2016-11', '2016-12'], - $this->pageInfo->getMonthLabels() - ); - - // Just test a few, not every month. - static::assertArraySubset([ - 'all' => 3, - 'minor' => 2, - 'anon' => 2, - 'automated' => 2, - ], $yearMonthCounts[2016]['months']['10']); - } - - - /** - * Test data around log events. - */ - public function testLogEvents(): void - { - $this->setupData(); - - $this->pageInfoRepo->expects(static::once()) - ->method('getLogEvents') - ->willReturn([ - [ - 'log_type' => 'protect', - 'timestamp' => '20160705000000', - ], - [ - 'log_type' => 'delete', - 'timestamp' => '20160905000000', - ], - [ - 'log_type' => 'delete', - 'timestamp' => '20160905000001', - ], - [ - 'log_type' => 'move', - 'timestamp' => '20161005000000', - ], - ]); - - $this->pageInfo->prepareData(); - $yearMonthCounts = $this->pageInfo->getYearMonthCounts(); - - // Just test a few, not every month. - static::assertEquals([ - 'protections' => 1, - 'deletions' => 2, - 'moves' => 1, - ], $yearMonthCounts[2016]['events']); - } - - /** - * Make sure that setLogEvents does nothing when yearMonthCounts is not set - */ - public function testLogEventsFallback(): void - { - // Intentionally don't setup, so addYearMonthCountEntry never gets called - $this->pageInfoRepo->expects(static::once()) - ->method('getLogEvents') - ->willReturn([['timestamp' => 'yesterday']]); - $this->pageInfo->prepareData(); // Will call setLogEvents under the hood - static::assertSame([], $this->pageInfo->getYearMonthCounts()); - } - - /** - * Set repository returns - */ - private function setupData(): void - { - $revisions = [ - [ - 'id' => 1, - 'timestamp' => '20160801000001', - 'minor' => '0', - 'length' => '30', - 'length_change' => '30', - 'username' => 'Mick Jagger', - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - 'tags' => '["mobile edit"]', - ], - [ - 'id' => 32, - 'timestamp' => '20160801000000', - 'minor' => '1', - 'length' => '25', - 'length_change' => '-5', - 'username' => 'Mick Jagger', - 'comment' => 'Blah', - 'rev_sha1' => 'bbbbbb', - 'tags' => '[]', - ], - [ - 'id' => 40, - 'timestamp' => '20161003000000', - 'minor' => '0', - 'length' => '15', - 'length_change' => '1000', - 'username' => '192.168.0.1', - 'comment' => 'Weeee using [[WP:AWB|AWB]]', - 'rev_sha1' => 'cccccc', - 'tags' => '["mobile edit","visualeditor"]', - ], - [ - 'id' => 50, - 'timestamp' => '20161003010000', - 'minor' => '1', - 'length' => '25', - 'length_change' => '-1000', - 'username' => '192.168.0.2', - 'comment' => 'I undo your edit cuz it bad', - 'rev_sha1' => 'bbbbbb', - 'tags' => '["visualeditor"]', - ], - [ - 'id' => 60, - 'timestamp' => '20161003020000', - 'minor' => '1', - 'length' => '20', - 'length_change' => '-5', - 'username' => 'Offensive username', - 'comment' => 'Weeee using [[WP:AWB|AWB]]', - 'rev_sha1' => 'ddddd', - 'rev_deleted' => Edit::DELETED_USER, - 'tags' => '[]', - ], - ]; - $this->page->expects(static::once()) - ->method('getRevisions') - ->willReturn($revisions); - $this->pageInfoRepo->expects(static::exactly(count($revisions))) - ->method('getEdit') - ->willReturnCallback(fn($page, $rev) => new Edit($this->editRepo, $this->userRepo, $page, $rev)); - $this->pageInfoRepo->expects(static::once()) - ->method('getBotData') - ->willReturn([['count' => 1, 'username' => 'XtoolsBot', 'current' => 1]]); - $this->pageInfoRepo->expects(static::any()) - ->method('getMaxPageRevisions') - ->willReturn(10); - } - - /** - * Test prose stats parser. - */ - public function testProseStats(): void - { - // We'll use a live page to better test the prose stats parser. - $client = static::getContainer()->get('eight_points_guzzle.client.xtools'); - $ret = $client->request('GET', 'https://en.wikipedia.org/api/rest_v1/page/html/Hanksy/747629772') - ->getBody() - ->getContents(); - $this->page->expects(static::once()) - ->method('getHTMLContent') - ->willReturn($ret); - - static::assertEquals([ - 'bytes' => 1539, - 'characters' => 1539, - 'words' => 261, - 'references' => 13, - 'unique_references' => 12, - 'sections' => 2, - ], $this->pageInfo->getProseStats()); - // Test caching - $this->pageInfo->getProseStats(); - } - - /** - * Ensure we react appropriately when getHTMLContent fails - */ - public function testProseStatFallback(): void - { - $this->page->expects(static::once()) - ->method('getHTMLContent') - ->willThrowException($this->createMock(BadGateWayException::class)); - static::assertNull($this->pageInfo->getProseStats()); - } - - /** - * Ensure we don't divide by 0 when the page had no added text - */ - public function testZeroAddedBytes(): void - { - $this->page->expects(static::once()) - ->method('getRevisions') - ->willReturn([ - [ - 'id' => 1, - 'timestamp' => '20160801000001', - 'minor' => '0', - 'length' => '0', - 'length_change' => '0', - 'username' => 'Mick Jagger', - 'comment' => 'Foo bar', - 'rev_sha1' => 'aaaaaa', - 'tags' => '["mobile edit"]', - ], - ]); - $this->pageInfoRepo->expects(static::once()) - ->method('getEdit') - ->willReturnCallback(fn($page, $rev) => new Edit($this->editRepo, $this->userRepo, $page, $rev)); - $this->pageInfo->prepareData(); - static::assertEquals(0, $this->pageInfo->topTenEditorsByAdded()[0]['percentage']); - } - - /** - * Various methods involving start/end dates. - */ - public function testWithDates(): void - { - $this->setupData(); - $this->pageInfo->prepareData(); - - $start = $this->reflectionClass->getProperty('start'); - $start->setValue($this->pageInfo, strtotime('2016-06-30')); - - $end = $this->reflectionClass->getProperty('end'); - $end->setValue($this->pageInfo, strtotime('2016-10-14')); - - $meth = $this->reflectionClass->getMethod('getLastDay'); - $lastDayOfMonth = $meth->invoke($this->pageInfo); - - static::assertTrue($this->pageInfo->hasDateRange()); - static::assertEquals('2016-06-30', $this->pageInfo->getStartDate()); - static::assertEquals('2016-10-14', $this->pageInfo->getEndDate()); - static::assertEquals([ - 'start' => '2016-06-30', - 'end' => '2016-10-14', - ], $this->pageInfo->getDateParams()); - static::assertEquals(strtotime('2016-10-31'), $lastDayOfMonth); - - // Uses length of last edit because there is a date range. - static::assertEquals(20, $this->pageInfo->getLength()); - - // Pageviews with a date range. - $this->page->expects(static::once()) - ->method('getPageviews') - ->willReturn(1500); - static::assertEquals(1500, $this->pageInfo->getPageviews()['count']); - - // no dates - $start->setValue($this->pageInfo, null); - $end->setValue($this->pageInfo, null); - $this->page->expects(static::once()) - ->method('getLength') - ->willReturn(42); - static::assertEquals([], $this->pageInfo->getDateParams()); - static::assertEquals(42, $this->pageInfo->getLength()); - } - - /** - * Transclusion counts. - */ - public function testTransclusionData(): void - { - $pageInfoRepo = $this->createMock(PageInfoRepository::class); - $pageInfoRepo->expects(static::once()) - ->method('getTransclusionData') - ->willReturn([ - 'categories' => 3, - 'templates' => 5, - 'files' => 2, - ]); - $this->pageInfo->setRepository($pageInfoRepo); - - static::assertEquals(3, $this->pageInfo->getNumCategories()); - static::assertEquals(5, $this->pageInfo->getNumTemplates()); - static::assertEquals(2, $this->pageInfo->getNumFiles()); - } - - public function testPageviews(): void - { - $this->page->expects(static::exactly($this->pageInfo->hasDateRange() ? 1 : 0)) - ->method('getPageviews') - ->willReturn(1500); - $this->page->expects(static::exactly($this->pageInfo->hasDateRange() ? 0 : 1)) - ->method('getLatestPageviews') - ->willReturn(1500); - - static::assertEquals([ - 'count' => 1500, - 'formatted' => '1,500', - 'tooltip' => '', - ], $this->pageInfo->getPageviews()); - - static::assertEquals(PageInfoApi::PAGEVIEWS_OFFSET, $this->pageInfo->getPageviewsOffset()); - } - - public function testPageviewsFailing(): void - { - $this->page->expects(static::exactly($this->pageInfo->hasDateRange() ? 1 : 0)) - ->method('getPageviews') - ->willReturn(null); - $this->page->expects(static::exactly($this->pageInfo->hasDateRange() ? 0 : 1)) - ->method('getLatestPageviews') - ->willReturn(null); - - static::assertEquals([ - 'count' => null, - 'formatted' => 'Data unavailable', - 'tooltip' => 'There was an error connecting to the Pageviews API. ' . - 'Try refreshing this page or try again later.', - ], $this->pageInfo->getPageviews()); - } +class PageInfoTest extends TestAdapter { + use ArraySubsetAsserts; + + protected PageInfo $pageInfo; + protected PageInfoRepository $pageInfoRepo; + protected EditRepository $editRepo; + protected Page $page; + protected PageRepository $pageRepo; + protected Project $project; + protected UserRepository $userRepo; + + /** @var ReflectionClass Hack to test private methods. */ + private ReflectionClass $reflectionClass; + + /** + * Set up shared mocks and class instances. + */ + public function setUp(): void { + $autoEditsHelper = $this->getAutomatedEditsHelper(); + /** @var I18nHelper $i18nHelper */ + $i18nHelper = static::getContainer()->get( 'app.i18n_helper' ); + $this->project = $this->getMockEnwikiProject(); + $this->pageRepo = $this->createMock( PageRepository::class ); + $this->page = $this->createMock( Page::class ); + $this->editRepo = $this->createMock( EditRepository::class ); + $this->editRepo->method( 'getAutoEditsHelper' ) + ->willReturn( $autoEditsHelper ); + $this->userRepo = $this->createMock( UserRepository::class ); + $this->pageInfoRepo = $this->createMock( PageInfoRepository::class ); + $this->pageInfoRepo->method( 'getMaxPageRevisions' ) + ->willReturn( static::getContainer()->getParameter( 'app.max_page_revisions' ) ); + $this->pageInfo = new PageInfo( + $this->pageInfoRepo, + $i18nHelper, + $autoEditsHelper, + $this->page + ); + + // Used to set a few private properties without having to recreate everything + $this->reflectionClass = new ReflectionClass( $this->pageInfo ); + } + + /** + * Number of revisions + */ + public function testNumRevisions(): void { + $this->setupData(); + $this->page->expects( static::once() ) + ->method( 'getNumRevisions' ) + ->willReturn( 10 ); + $this->pageInfo->prepareData(); + static::assertEquals( 10, $this->pageInfo->getNumRevisions() ); + // Should be cached (will error out if repo's getNumRevisions is called again). + static::assertEquals( 10, $this->pageInfo->getNumRevisions() ); + } + + /** + * Number of revisions processed, based on app.max_page_revisions + * @dataProvider revisionsProcessedProvider + * @param int $numRevisions + * @param int $assertion + */ + public function testRevisionsProcessed( int $numRevisions, int $assertion ): void { + $this->page->method( 'getNumRevisions' )->willReturn( $numRevisions ); + static::assertEquals( + $this->pageInfo->getNumRevisionsProcessed(), + $assertion + ); + } + + /** + * Data for self::testRevisionsProcessed(). + * @return int[] + */ + public function revisionsProcessedProvider(): array { + return [ + [ 1000000, 50000 ], + [ 10, 10 ], + ]; + } + + /** + * Whether there are too many revisions to process. + */ + public function testTooManyRevisions(): void { + $this->page->expects( static::once() ) + ->method( 'getNumRevisions' ) + ->willReturn( 1000000 ); + static::assertTrue( $this->pageInfo->tooManyRevisions() ); + } + + /** + * Various bot-related methods + */ + public function testBots(): void { + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getBotData' ) + ->willReturn( [ + [ + 'username' => 'Foo', + 'count' => 3, + 'current' => '1', + ], + [ + 'username' => 'Bar', + 'count' => 12, + 'current' => '0', + ], + ] ); + static::assertEquals( [ + 'Foo' => [ + 'count' => 3, + 'current' => true, + ], + 'Bar' => [ + 'count' => 12, + 'current' => false, + ], + ], $this->pageInfo->getBots() ); + static::assertEquals( 2, $this->pageInfo->getNumBots() ); + static::assertEquals( 15, $this->pageInfo->getBotRevisionCount() ); + static::assertEquals( 15, $this->pageInfo->getBotRevisionCount() ); // second time for caching + } + + public function testTopEditorsByEditCount(): void { + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getTopEditorsByEditCount' ) + ->willReturn( [ + [ + 'username' => 'Foo', + 'count' => 22, + 'minor' => 6, + 'first_revid' => 100, + 'first_timestamp' => '10000101000100', + 'latest_revid' => 300, + 'latest_timestamp' => '10000101000300', + ], + [ + 'username' => 'Bar', + 'count' => 20, + 'minor' => 4, + 'first_revid' => 200, + 'first_timestamp' => '10000101000200', + 'latest_revid' => 400, + 'latest_timestamp' => '10000101000400', + ], + ] ); + static::assertEquals( [ + [ + 'rank' => 1, + 'username' => 'Foo', + 'count' => 22, + 'minor' => 6, + 'first_edit' => [ + 'id' => 100, + 'timestamp' => '1000-01-01T00:01:00Z', + ], + 'latest_edit' => [ + 'id' => 300, + 'timestamp' => '1000-01-01T00:03:00Z', + ], + ], + [ + 'rank' => 2, + 'username' => 'Bar', + 'count' => 20, + 'minor' => 4, + 'first_edit' => [ + 'id' => 200, + 'timestamp' => '1000-01-01T00:02:00Z', + ], + 'latest_edit' => [ + 'id' => 400, + 'timestamp' => '1000-01-01T00:04:00Z', + ], + ], + ], $this->pageInfo->getTopEditorsByEditCount() ); + // Test caching + $this->pageInfo->getTopEditorsByEditCount(); + } + + public function testLinksAndRedirects(): void { + $this->setupData(); + $this->pageInfo->prepareData(); // Ensure we don't call the revisions (the second time will complain). + $this->page->expects( static::once() ) + ->method( 'countLinksAndRedirects' ) + ->willReturn( [ + 'links_ext_count' => 5, + 'links_out_count' => 3, + 'links_in_count' => 10, + 'redirects_count' => 0, + ] ); + static::assertEquals( 5, $this->pageInfo->linksExtCount() ); + static::assertEquals( 3, $this->pageInfo->linksOutCount() ); + static::assertEquals( 10, $this->pageInfo->linksInCount() ); + static::assertSame( 0, $this->pageInfo->redirectsCount() ); + } + + public function testBugs(): void { + $this->page->expects( static::once() ) + ->method( 'getErrors' ) + ->willReturn( [] ); + static::assertSame( [], $this->pageInfo->getBugs() ); + static::assertSame( [], $this->pageInfo->getBugs() ); // Ensure caching + static::assertSame( 0, $this->pageInfo->numBugs() ); + } + + /** + * Test some of the more important getters. + */ + public function testGetters(): void { + $this->setupData(); + $this->pageInfo->prepareData(); + + static::assertEquals( + 32, + $this->pageInfo->getFirstEdit()->getId() + ); + static::assertEquals( + 60, + $this->pageInfo->getLastEdit()->getId() + ); + static::assertEquals( 3, $this->pageInfo->getNumEditors() ); + static::assertEquals( 2, $this->pageInfo->getAnonCount() ); + static::assertEquals( 40, $this->pageInfo->anonPercentage() ); + static::assertEquals( 3, $this->pageInfo->getMinorCount() ); + static::assertEquals( 60, $this->pageInfo->minorPercentage() ); + static::assertSame( 1, $this->pageInfo->getBotRevisionCount() ); + static::assertEquals( 63, $this->pageInfo->getTotalDays() ); + static::assertEquals( 12, (int)$this->pageInfo->averageDaysPerEdit() ); + static::assertSame( 0, (int)$this->pageInfo->editsPerDay() ); + static::assertEquals( 2.4, $this->pageInfo->editsPerMonth() ); + static::assertEquals( 5, $this->pageInfo->editsPerYear() ); + static::assertEquals( 1.7, $this->pageInfo->editsPerEditor() ); + static::assertEquals( 2, $this->pageInfo->getAutomatedCount() ); + static::assertSame( 1, $this->pageInfo->getRevertCount() ); + + static::assertEquals( 80, $this->pageInfo->topTenPercentage() ); + static::assertEquals( 4, $this->pageInfo->getTopTenCount() ); + + static::assertSame( 1, $this->pageInfo->getMaxAddition()->getId() ); + static::assertEquals( 32, $this->pageInfo->getMaxDeletion()->getId() ); + + static::assertEquals( + [ 'Mick Jagger', '192.168.0.2', '192.168.0.1' ], + array_keys( $this->pageInfo->getEditors() ) + ); + static::assertEquals( + [ + 'label' => 'Mick Jagger', + 'value' => 2, + 'percentage' => 50, + ], + $this->pageInfo->topTenEditorsByEdits()[0] + ); + static::assertEquals( + [ + 'label' => 'Mick Jagger', + 'value' => 30, + 'percentage' => 100, + ], + $this->pageInfo->topTenEditorsByAdded()[0] + ); + + // Top 10 counts should not include bots. + static::assertFalse( + array_search( + 'XtoolsBot', + array_column( $this->pageInfo->topTenEditorsByEdits(), 'label' ) + ) + ); + static::assertFalse( + array_search( + 'XtoolsBot', + array_column( $this->pageInfo->topTenEditorsByAdded(), 'label' ) + ) + ); + + static::assertEquals( [ 'Mick Jagger' ], $this->pageInfo->getHumans( 1 ) ); + + static::assertEquals( 3, $this->pageInfo->getMaxEditsPerMonth() ); + + static::assertContains( + 'AutoWikiBrowser', + array_keys( $this->pageInfo->getTools() ) + ); + + static::assertSame( 1, $this->pageInfo->numDeletedRevisions() ); + static::assertEquals( 2, $this->pageInfo->getMobileCount() ); + static::assertEquals( 2, $this->pageInfo->getVisualCount() ); + } + + /** + * Test max removal reverting. + * Could theoretically be done above but would require changing many values. + */ + public function testMaxRemovalRevert(): void { + $this->page->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( [ + [ + 'id' => 1, + 'timestamp' => '20010203040506', + 'minor' => '0', + 'length' => '30', + 'length_change' => '-1', + 'username' => null, + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + ], + [ + 'id' => 2, + 'timestamp' => '20010203040506', + 'minor' => '0', + 'length' => '30', + 'length_change' => '-2', + 'username' => null, + 'comment' => 'Foo bar', + 'rev_sha1' => 'bbbbbb', + ], + [ + 'id' => 3, + 'timestamp' => '20010203040508', + 'minor' => '0', + 'length' => '30', + 'length_change' => '2', + 'username' => null, + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + ], + ] ); + $this->pageInfoRepo->expects( static::exactly( 3 ) ) + ->method( 'getEdit' ) + ->willReturnCallback( fn ( $page, $rev ) => new Edit( $this->editRepo, $this->userRepo, $page, $rev ) ); + $this->pageInfo->prepareData(); + static::assertSame( 1, $this->pageInfo->getMaxDeletion()->getId() ); + } + + /** + * Make sure we don't divide by 0 + */ + public function testEmptyFallbacks(): void { + $this->page->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( [ + [ + 'id' => 1, + 'timestamp' => '20010203040506', + 'minor' => '0', + 'length' => '30', + 'length_change' => '30', + 'username' => null, + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + 'tags' => '["mobile edit"]', + ], + ] ); + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getEdit' ) + ->willReturnCallback( fn ( $page, $rev ) => new Edit( $this->editRepo, $this->userRepo, $page, $rev ) ); + $this->pageInfo->prepareData(); + static::assertSame( 0, $this->pageInfo->editsPerDay() ); + static::assertSame( 0, $this->pageInfo->editsPerMonth() ); + static::assertSame( 0, $this->pageInfo->editsPerYear() ); + static::assertSame( 0, $this->pageInfo->editsPerEditor() ); + } + + public function testCountHistory(): void { + $this->page->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( [ + [ + 'id' => 1, + 'timestamp' => ( new DateTime( 'now' ) )->format( 'YmdHis' ), + 'minor' => '0', + 'length' => '30', + 'length_change' => '30', + 'username' => null, + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + 'tags' => '["mobile edit"]', + ], + ] ); + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getEdit' ) + ->willReturnCallback( fn ( $page, $rev ) => new Edit( $this->editRepo, $this->userRepo, $page, $rev ) ); + $this->pageInfo->prepareData(); + static::assertEquals( [ 1, 1, 1, 1 ], array_values( $this->pageInfo->getCountHistory() ) ); + } + + /** + * Test that the data for each individual month and year is correct. + */ + public function testMonthYearCounts(): void { + $this->setupData(); + $this->pageInfo->prepareData(); + + $yearMonthCounts = $this->pageInfo->getYearMonthCounts(); + + static::assertEquals( [ 2016 ], array_keys( $yearMonthCounts ) ); + static::assertEquals( [ '2016' ], $this->pageInfo->getYearLabels() ); + static::assertArraySubset( [ + 'all' => 5, + 'minor' => 3, + 'anon' => 2, + 'automated' => 2, + 'size' => 20, + ], $yearMonthCounts[2016] ); + + static::assertEquals( + [ '08', '09', '10', '11', '12' ], + array_keys( $yearMonthCounts[2016]['months'] ) + ); + static::assertEquals( + [ '2016-08', '2016-09', '2016-10', '2016-11', '2016-12' ], + $this->pageInfo->getMonthLabels() + ); + + // Just test a few, not every month. + static::assertArraySubset( [ + 'all' => 3, + 'minor' => 2, + 'anon' => 2, + 'automated' => 2, + ], $yearMonthCounts[2016]['months']['10'] ); + } + + /** + * Test data around log events. + */ + public function testLogEvents(): void { + $this->setupData(); + + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getLogEvents' ) + ->willReturn( [ + [ + 'log_type' => 'protect', + 'timestamp' => '20160705000000', + ], + [ + 'log_type' => 'delete', + 'timestamp' => '20160905000000', + ], + [ + 'log_type' => 'delete', + 'timestamp' => '20160905000001', + ], + [ + 'log_type' => 'move', + 'timestamp' => '20161005000000', + ], + ] ); + + $this->pageInfo->prepareData(); + $yearMonthCounts = $this->pageInfo->getYearMonthCounts(); + + // Just test a few, not every month. + static::assertEquals( [ + 'protections' => 1, + 'deletions' => 2, + 'moves' => 1, + ], $yearMonthCounts[2016]['events'] ); + } + + /** + * Make sure that setLogEvents does nothing when yearMonthCounts is not set + */ + public function testLogEventsFallback(): void { + // Intentionally don't setup, so addYearMonthCountEntry never gets called + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getLogEvents' ) + ->willReturn( [ [ 'timestamp' => 'yesterday' ] ] ); + $this->pageInfo->prepareData(); // Will call setLogEvents under the hood + static::assertSame( [], $this->pageInfo->getYearMonthCounts() ); + } + + /** + * Set repository returns + */ + private function setupData(): void { + $revisions = [ + [ + 'id' => 1, + 'timestamp' => '20160801000001', + 'minor' => '0', + 'length' => '30', + 'length_change' => '30', + 'username' => 'Mick Jagger', + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + 'tags' => '["mobile edit"]', + ], + [ + 'id' => 32, + 'timestamp' => '20160801000000', + 'minor' => '1', + 'length' => '25', + 'length_change' => '-5', + 'username' => 'Mick Jagger', + 'comment' => 'Blah', + 'rev_sha1' => 'bbbbbb', + 'tags' => '[]', + ], + [ + 'id' => 40, + 'timestamp' => '20161003000000', + 'minor' => '0', + 'length' => '15', + 'length_change' => '1000', + 'username' => '192.168.0.1', + 'comment' => 'Weeee using [[WP:AWB|AWB]]', + 'rev_sha1' => 'cccccc', + 'tags' => '["mobile edit","visualeditor"]', + ], + [ + 'id' => 50, + 'timestamp' => '20161003010000', + 'minor' => '1', + 'length' => '25', + 'length_change' => '-1000', + 'username' => '192.168.0.2', + 'comment' => 'I undo your edit cuz it bad', + 'rev_sha1' => 'bbbbbb', + 'tags' => '["visualeditor"]', + ], + [ + 'id' => 60, + 'timestamp' => '20161003020000', + 'minor' => '1', + 'length' => '20', + 'length_change' => '-5', + 'username' => 'Offensive username', + 'comment' => 'Weeee using [[WP:AWB|AWB]]', + 'rev_sha1' => 'ddddd', + 'rev_deleted' => Edit::DELETED_USER, + 'tags' => '[]', + ], + ]; + $this->page->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( $revisions ); + $this->pageInfoRepo->expects( static::exactly( count( $revisions ) ) ) + ->method( 'getEdit' ) + ->willReturnCallback( fn ( $page, $rev ) => new Edit( $this->editRepo, $this->userRepo, $page, $rev ) ); + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getBotData' ) + ->willReturn( [ [ 'count' => 1, 'username' => 'XtoolsBot', 'current' => 1 ] ] ); + $this->pageInfoRepo->expects( static::any() ) + ->method( 'getMaxPageRevisions' ) + ->willReturn( 10 ); + } + + /** + * Test prose stats parser. + */ + public function testProseStats(): void { + // We'll use a live page to better test the prose stats parser. + $client = static::getContainer()->get( 'eight_points_guzzle.client.xtools' ); + $ret = $client->request( 'GET', 'https://en.wikipedia.org/api/rest_v1/page/html/Hanksy/747629772' ) + ->getBody() + ->getContents(); + $this->page->expects( static::once() ) + ->method( 'getHTMLContent' ) + ->willReturn( $ret ); + + static::assertEquals( [ + 'bytes' => 1539, + 'characters' => 1539, + 'words' => 261, + 'references' => 13, + 'unique_references' => 12, + 'sections' => 2, + ], $this->pageInfo->getProseStats() ); + // Test caching + $this->pageInfo->getProseStats(); + } + + /** + * Ensure we react appropriately when getHTMLContent fails + */ + public function testProseStatFallback(): void { + $this->page->expects( static::once() ) + ->method( 'getHTMLContent' ) + ->willThrowException( $this->createMock( BadGateWayException::class ) ); + static::assertNull( $this->pageInfo->getProseStats() ); + } + + /** + * Ensure we don't divide by 0 when the page had no added text + */ + public function testZeroAddedBytes(): void { + $this->page->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( [ + [ + 'id' => 1, + 'timestamp' => '20160801000001', + 'minor' => '0', + 'length' => '0', + 'length_change' => '0', + 'username' => 'Mick Jagger', + 'comment' => 'Foo bar', + 'rev_sha1' => 'aaaaaa', + 'tags' => '["mobile edit"]', + ], + ] ); + $this->pageInfoRepo->expects( static::once() ) + ->method( 'getEdit' ) + ->willReturnCallback( fn ( $page, $rev ) => new Edit( $this->editRepo, $this->userRepo, $page, $rev ) ); + $this->pageInfo->prepareData(); + static::assertSame( 0, $this->pageInfo->topTenEditorsByAdded()[0]['percentage'] ); + } + + /** + * Various methods involving start/end dates. + */ + public function testWithDates(): void { + $this->setupData(); + $this->pageInfo->prepareData(); + + $start = $this->reflectionClass->getProperty( 'start' ); + $start->setValue( $this->pageInfo, strtotime( '2016-06-30' ) ); + + $end = $this->reflectionClass->getProperty( 'end' ); + $end->setValue( $this->pageInfo, strtotime( '2016-10-14' ) ); + + $meth = $this->reflectionClass->getMethod( 'getLastDay' ); + $lastDayOfMonth = $meth->invoke( $this->pageInfo ); + + static::assertTrue( $this->pageInfo->hasDateRange() ); + static::assertEquals( '2016-06-30', $this->pageInfo->getStartDate() ); + static::assertEquals( '2016-10-14', $this->pageInfo->getEndDate() ); + static::assertEquals( [ + 'start' => '2016-06-30', + 'end' => '2016-10-14', + ], $this->pageInfo->getDateParams() ); + static::assertEquals( strtotime( '2016-10-31' ), $lastDayOfMonth ); + + // Uses length of last edit because there is a date range. + static::assertEquals( 20, $this->pageInfo->getLength() ); + + // Pageviews with a date range. + $this->page->expects( static::once() ) + ->method( 'getPageviews' ) + ->willReturn( 1500 ); + static::assertEquals( 1500, $this->pageInfo->getPageviews()['count'] ); + + // no dates + $start->setValue( $this->pageInfo, null ); + $end->setValue( $this->pageInfo, null ); + $this->page->expects( static::once() ) + ->method( 'getLength' ) + ->willReturn( 42 ); + static::assertEquals( [], $this->pageInfo->getDateParams() ); + static::assertEquals( 42, $this->pageInfo->getLength() ); + } + + /** + * Transclusion counts. + */ + public function testTransclusionData(): void { + $pageInfoRepo = $this->createMock( PageInfoRepository::class ); + $pageInfoRepo->expects( static::once() ) + ->method( 'getTransclusionData' ) + ->willReturn( [ + 'categories' => 3, + 'templates' => 5, + 'files' => 2, + ] ); + $this->pageInfo->setRepository( $pageInfoRepo ); + + static::assertEquals( 3, $this->pageInfo->getNumCategories() ); + static::assertEquals( 5, $this->pageInfo->getNumTemplates() ); + static::assertEquals( 2, $this->pageInfo->getNumFiles() ); + } + + public function testPageviews(): void { + $this->page->expects( static::exactly( $this->pageInfo->hasDateRange() ? 1 : 0 ) ) + ->method( 'getPageviews' ) + ->willReturn( 1500 ); + $this->page->expects( static::exactly( $this->pageInfo->hasDateRange() ? 0 : 1 ) ) + ->method( 'getLatestPageviews' ) + ->willReturn( 1500 ); + + static::assertEquals( [ + 'count' => 1500, + 'formatted' => '1,500', + 'tooltip' => '', + ], $this->pageInfo->getPageviews() ); + + static::assertEquals( PageInfoApi::PAGEVIEWS_OFFSET, $this->pageInfo->getPageviewsOffset() ); + } + + public function testPageviewsFailing(): void { + $this->page->expects( static::exactly( $this->pageInfo->hasDateRange() ? 1 : 0 ) ) + ->method( 'getPageviews' ) + ->willReturn( null ); + $this->page->expects( static::exactly( $this->pageInfo->hasDateRange() ? 0 : 1 ) ) + ->method( 'getLatestPageviews' ) + ->willReturn( null ); + + static::assertEquals( [ + 'count' => null, + 'formatted' => 'Data unavailable', + 'tooltip' => 'There was an error connecting to the Pageviews API. ' . + 'Try refreshing this page or try again later.', + ], $this->pageInfo->getPageviews() ); + } } diff --git a/tests/Model/PageTest.php b/tests/Model/PageTest.php index 0a2ff8e3b..7156c832b 100644 --- a/tests/Model/PageTest.php +++ b/tests/Model/PageTest.php @@ -1,6 +1,6 @@ pageRepo = $this->createMock(PageRepository::class); - } - - /** - * A page has a title and an HTML display title. - */ - public function testTitles(): void - { - $project = new Project('TestProject'); - $data = [ - [$project, 'Test_Page_1', ['title' => 'Test_Page_1']], - [$project, 'Test_Page_2', ['title' => 'Test_Page_2', 'displaytitle' => 'Test page 2']], - ]; - $this->pageRepo->method('getPageInfo')->will($this->returnValueMap($data)); - - // Page with no display title. - $page = new Page($this->pageRepo, $project, 'Test_Page_1'); - static::assertEquals('Test_Page_1', $page->getTitle()); - static::assertEquals('Test_Page_1', $page->getDisplayTitle()); - - // Page with a display title. - $page = new Page($this->pageRepo, $project, 'Test_Page_2'); - static::assertEquals('Test_Page_2', $page->getTitle()); - static::assertEquals('Test page 2', $page->getDisplayTitle()); - - // Getting the unnormalized title should not call getPageInfo. - $page = new Page($this->pageRepo, $project, 'talk:Test Page_3'); - $this->pageRepo->expects($this->never())->method('getPageInfo'); - static::assertEquals('talk:Test Page_3', $page->getTitle(true)); - } - - /** - * A Page can be built through processing of a database row - */ - public function testNewFromRow(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $data = [ - [['page_title' => 'A', 'namespace' => 0], 'A'], - [['page_title' => 'B', 'namespace' => 1, 'length' => 4,], 'Talk:B'], - ]; - $project = $this->createMock(Project::class); - $project->expects(static::once()) - ->method('getNamespaces') - ->willReturn([ - 0 => '', - 1 => 'Talk', - ]); - foreach ($data as [$row, $fullPageTitle]) { - $page = Page::newFromRow($pageRepo, $project, $row); - static::assertEquals($row['namespace'], $page->getNamespace()); - static::assertInstanceOf(Page::class, $page); - static::assertEquals($fullPageTitle, $page->getTitle(true)); - } - } - - /** - * A page either exists or doesn't. - */ - public function testExists(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $project = new Project('TestProject'); - // Mock data (last element of each array is the return value). - $data = [ - [$project, 'Existing_page', []], - [$project, 'Missing_page', ['missing' => '']], - ]; - $pageRepo //->expects($this->exactly(2)) - ->method('getPageInfo') - ->will($this->returnValueMap($data)); - - // Existing page. - $page1 = new Page($this->pageRepo, $project, 'Existing_page'); - $page1->setRepository($pageRepo); - static::assertTrue($page1->exists()); - - // Missing page. - $page2 = new Page($this->pageRepo, $project, 'Missing_page'); - $page2->setRepository($pageRepo); - static::assertFalse($page2->exists()); - } - - /** - * Test basic getters - */ - public function testBasicGetters(): void - { - $project = $this->createMock(Project::class); - $project->method('getNamespaces') - ->willReturn([ - '', - 'Talk', - 'User', - ]); - $project->expects(static::once()) - ->method('getLang') - ->willReturn('en'); - - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->expects($this->once()) - ->method('getPageInfo') - ->willReturn([ - 'pageid' => '42', - 'fullurl' => 'https://example.org/User:Test:123', - 'watchers' => 5000, - 'ns' => 2, - 'length' => 300, - 'pageprops' => [ - 'wikibase_item' => 'Q95', - ], - ]); - $page = new Page($this->pageRepo, $project, 'User:Test:123'); - $page->setRepository($pageRepo); - - static::assertEquals(2, $page->getNamespace()); // Should set the pageInfo - static::assertEquals(42, $page->getId()); - static::assertEquals('https://example.org/User:Test:123', $page->getUrl()); - static::assertEquals(5000, $page->getWatchers()); - static::assertEquals(300, $page->getLength()); - static::assertEquals('User', $page->getNamespaceName()); - static::assertEquals('Q95', $page->getWikidataId()); - static::assertEquals('Test:123', $page->getTitleWithoutNamespace()); - static::assertEquals('en', $page->getLang()); // Intentionally defaults to project lang - // Ensure caching - static::assertEquals(300, $page->getLength()); - static::assertEquals(2, $page->getNamespace()); - } - - /** - * Test fetching of wikitext - */ - public function testWikitext(): void - { - $pageRepo = $this->getRealPageRepository(); - $page = new Page($pageRepo, $this->getMockEnwikiProject(), 'Main Page'); - - // We want to do a real-world test. enwiki's Main Page does not change much, - // and {{Main Page banner}} in particular should be there indefinitely, hopefully :) - $content = $page->getWikitext(); - static::assertStringContainsString('{{Main Page banner}}', $content); - } - - /** - * Test fetching of HTML - */ - public function testHtml(): void - { - $page = new Page($this->pageRepo, $this->getMockEnwikiProject(), 'A'); - $date = new \DateTime('20010101010101'); // 01:01:01 UTC, January 1, 2001 - $this->pageRepo->expects(static::once()) - ->method('getRevisionIdAtDate') - ->with($page, $date) - ->willReturn(1234); - $this->pageRepo->expects(static::once()) - ->method('getHTMLContent') - ->with($page, 1234) - ->willReturn('Hello'); - static::assertEquals('Hello', $page->getHTMLContent($date)); - } - - /** - * Tests wikidata item getter. - */ - public function testWikidataItems(): void - { - $wikidataItems = [ - [ - 'ips_site_id' => 'enwiki', - 'ips_site_page' => 'Google', - ], - [ - 'ips_site_id' => 'arwiki', - 'ips_site_page' => 'جوجل', - ], - ]; - - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('getPageInfo') - ->willReturn([ - 'pageprops' => [ - 'wikibase_item' => 'Q95', - ], - ]); - $pageRepo->expects($this->once()) - ->method('getWikidataItems') - ->willReturn($wikidataItems); - $page = new Page($this->pageRepo, new Project('TestProject'), 'Test_Page'); - $page->setRepository($pageRepo); - - static::assertArraySubset($wikidataItems, $page->getWikidataItems()); - static::assertEquals(2, $page->countWikidataItems()); // Ensure that we count the above - - // If no wikidata item... - $pageRepo2 = $this->createMock(PageRepository::class); - $pageRepo2->expects($this->once()) - ->method('getPageInfo') - ->willReturn([ - 'pageprops' => [], - ]); - $page2 = new Page($this->pageRepo, new Project('TestProject'), 'Test_Page'); - $page2->setRepository($pageRepo2); - static::assertNull($page2->getWikidataId()); - static::assertEquals(0, $page2->countWikidataItems()); - } - - /** - * Tests wikidata item counter. - */ - public function testCountWikidataItems(): void - { - $page = new Page($this->pageRepo, new Project('TestProject'), 'Test_Page'); - $this->pageRepo->method('countWikidataItems') - ->with($page) - ->willReturn(2); - - static::assertEquals(2, $page->countWikidataItems()); - } - - /** - * Fetching of revisions. - */ - public function testUsersEdits(): void - { - $this->pageRepo->method('getRevisions') - ->with() - ->willReturn([ - [ - 'id' => '1', - 'timestamp' => '20170505100000', - 'length_change' => '1', - 'comment' => 'One', - ], - [ - 'id' => '2', - 'timestamp' => '20170506100000', - 'length_change' => '2', - 'comment' => 'Two', - ], - ]); - $page = new Page($this->pageRepo, new Project('exampleWiki'), 'Page'); - $user = new User($this->createMock(UserRepository::class), 'Testuser'); - static::assertCount(2, $page->getRevisions($user)); - static::assertCount(2, $page->getRevisions($user)); // Test caching - static::assertEquals(2, $page->getNumRevisions()); - } - - /** - * Cases for counting of number of edits - */ - public function testNumRevisions(): void - { - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->expects(static::exactly(2)) - ->method('getNumRevisions') - ->willReturn(42); - $pageRepo->expects(static::once()) - ->method('getRevisions') - ->willReturn([]); - $page = new Page($pageRepo, new Project('examplewiki'), 'Page'); - - // #1: user given, so we query repo and don't cache - static::assertEquals(42, $page->getNumRevisions($this->createMock(User::class))); - - // #2: revisions happens to be set, so count that. doesn't query repo, but caches - static::assertEquals([], $page->getRevisions()); - static::assertEquals(0, $page->getNumRevisions()); - static::assertEquals(0, $page->getNumRevisions()); // Test caching - - // #3: normal case, go out of our way to check - $page = new Page($pageRepo, new Project('examplewiki'), 'Page'); // reset caching - static::assertEquals(42, $page->getNumRevisions()); // queries repo for the second time - - // #4: caching did work. If it doesn't we call the Repo method a third time - static::assertEquals(42, $page->getNumRevisions()); - } - - /** - * Test getErros and getCheckWikiErrors. - */ - public function testErrors(): void - { - $checkWikiErrors = [ - [ - 'error' => '61', - 'notice' => 'This is where the error is', - 'found' => '2017-08-09 00:05:09', - 'name' => 'Reference before punctuation', - 'prio' => '3', - 'explanation' => 'This is how to fix the error', - ], - ]; - - $this->pageRepo->method('getCheckWikiErrors') - ->willReturn($checkWikiErrors); - $this->pageRepo->method('getPageInfo') - ->willReturn([ - 'pagelanguage' => 'en', - 'pageprops' => [ - 'wikibase_item' => 'Q123', - ], - ]); - $page = new Page($this->pageRepo, new Project('exampleWiki'), 'Page'); - $page->setRepository($this->pageRepo); - - static::assertEquals($checkWikiErrors, $page->getCheckWikiErrors()); - static::assertEquals($checkWikiErrors, $page->getErrors()); - } - - /** - * Tests for pageviews-related functions - */ - public function testPageviews(): void - { - $pageviewsData = [ - 'items' => [ - ['views' => 2500], - ['views' => 1000], - ], - ]; - - $this->pageRepo->method('getPageviews')->willReturn($pageviewsData); - $page = new Page($this->pageRepo, new Project('exampleWiki'), 'Page'); - $page->setRepository($this->pageRepo); - - static::assertEquals( - 3500, - $page->getPageviews('20160101', '20160201') - ); - - static::assertEquals(3500, $page->getLatestPageviews(30)); - - // When the API fails. - $this->pageRepo->expects(static::once()) - ->method('getPageviews') - ->willThrowException($this->createMock(BadGatewayException::class)); - static::assertNull($page->getPageviews('20230101', '20230131')); - // 404, must return 0 - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->expects(static::once()) - ->method('getPageviews') - ->willThrowException($this->createMock(ClientException::class)); - $page = new Page($pageRepo, new Project('exampleWiki'), 'Page'); - static::assertEquals(0, $page->getPageviews('20230101', '20230131')); - } - - /** - * Is the page the Main Page? - */ - public function testIsMainPage(): void - { - $pageRepo = $this->getRealPageRepository(); - $page = new Page($pageRepo, $this->getMockEnwikiProject(), 'Main Page'); - static::assertTrue($page->isMainPage()); - } - - /** - * Links and redirects. - */ - public function testLinksAndRedirects(): void - { - $data = [ - 'links_ext_count' => '418', - 'links_out_count' => '1085', - 'links_in_count' => '33300', - 'redirects_count' => '61', - ]; - $pageRepo = $this->createMock(PageRepository::class); - $pageRepo->method('countLinksAndRedirects')->willReturn($data); - $page = new Page($this->pageRepo, new Project('exampleWiki'), 'Page'); - $page->setRepository($pageRepo); - - static::assertEquals($data, $page->countLinksAndRedirects()); - } - - private function getRealPageRepository(): PageRepository - { - static::createClient(); - return new PageRepository( - self::$container->get('doctrine'), - self::$container->get('cache.app'), - self::$container->get('eight_points_guzzle.client.xtools'), - $this->createMock(LoggerInterface::class), - self::$container->get('parameter_bag'), - true, - 30 - ); - } +class PageTest extends TestAdapter { + use ArraySubsetAsserts; + + protected PageRepository $pageRepo; + + /** + * Set up client and set container. + */ + public function setUp(): void { + $this->pageRepo = $this->createMock( PageRepository::class ); + } + + /** + * A page has a title and an HTML display title. + */ + public function testTitles(): void { + $project = new Project( 'TestProject' ); + $data = [ + [ $project, 'Test_Page_1', [ 'title' => 'Test_Page_1' ] ], + [ $project, 'Test_Page_2', [ 'title' => 'Test_Page_2', 'displaytitle' => 'Test page 2' ] ], + ]; + $this->pageRepo->method( 'getPageInfo' )->willReturnMap( $data ); + + // Page with no display title. + $page = new Page( $this->pageRepo, $project, 'Test_Page_1' ); + static::assertEquals( 'Test_Page_1', $page->getTitle() ); + static::assertEquals( 'Test_Page_1', $page->getDisplayTitle() ); + + // Page with a display title. + $page = new Page( $this->pageRepo, $project, 'Test_Page_2' ); + static::assertEquals( 'Test_Page_2', $page->getTitle() ); + static::assertEquals( 'Test page 2', $page->getDisplayTitle() ); + + // Getting the unnormalized title should not call getPageInfo. + $page = new Page( $this->pageRepo, $project, 'talk:Test Page_3' ); + $this->pageRepo->expects( $this->never() )->method( 'getPageInfo' ); + static::assertEquals( 'talk:Test Page_3', $page->getTitle( true ) ); + } + + /** + * A Page can be built through processing of a database row + */ + public function testNewFromRow(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $data = [ + [ [ 'page_title' => 'A', 'namespace' => 0 ], 'A' ], + [ [ 'page_title' => 'B', 'namespace' => 1, 'length' => 4, ], 'Talk:B' ], + ]; + $project = $this->createMock( Project::class ); + $project->expects( static::once() ) + ->method( 'getNamespaces' ) + ->willReturn( [ + 0 => '', + 1 => 'Talk', + ] ); + foreach ( $data as [ $row, $fullPageTitle ] ) { + $page = Page::newFromRow( $pageRepo, $project, $row ); + static::assertEquals( $row['namespace'], $page->getNamespace() ); + static::assertInstanceOf( Page::class, $page ); + static::assertEquals( $fullPageTitle, $page->getTitle( true ) ); + } + } + + /** + * A page either exists or doesn't. + */ + public function testExists(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $project = new Project( 'TestProject' ); + // Mock data (last element of each array is the return value). + $data = [ + [ $project, 'Existing_page', [] ], + [ $project, 'Missing_page', [ 'missing' => '' ] ], + ]; + $pageRepo // ->expects($this->exactly(2)) + ->method( 'getPageInfo' ) + ->willReturnMap( $data ); + + // Existing page. + $page1 = new Page( $this->pageRepo, $project, 'Existing_page' ); + $page1->setRepository( $pageRepo ); + static::assertTrue( $page1->exists() ); + + // Missing page. + $page2 = new Page( $this->pageRepo, $project, 'Missing_page' ); + $page2->setRepository( $pageRepo ); + static::assertFalse( $page2->exists() ); + } + + /** + * Test basic getters + */ + public function testBasicGetters(): void { + $project = $this->createMock( Project::class ); + $project->method( 'getNamespaces' ) + ->willReturn( [ + '', + 'Talk', + 'User', + ] ); + $project->expects( static::once() ) + ->method( 'getLang' ) + ->willReturn( 'en' ); + + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->expects( $this->once() ) + ->method( 'getPageInfo' ) + ->willReturn( [ + 'pageid' => '42', + 'fullurl' => 'https://example.org/User:Test:123', + 'watchers' => 5000, + 'ns' => 2, + 'length' => 300, + 'pageprops' => [ + 'wikibase_item' => 'Q95', + ], + ] ); + $page = new Page( $this->pageRepo, $project, 'User:Test:123' ); + $page->setRepository( $pageRepo ); + + static::assertEquals( 2, $page->getNamespace() ); // Should set the pageInfo + static::assertEquals( 42, $page->getId() ); + static::assertEquals( 'https://example.org/User:Test:123', $page->getUrl() ); + static::assertEquals( 5000, $page->getWatchers() ); + static::assertEquals( 300, $page->getLength() ); + static::assertEquals( 'User', $page->getNamespaceName() ); + static::assertEquals( 'Q95', $page->getWikidataId() ); + static::assertEquals( 'Test:123', $page->getTitleWithoutNamespace() ); + static::assertEquals( 'en', $page->getLang() ); // Intentionally defaults to project lang + // Ensure caching + static::assertEquals( 300, $page->getLength() ); + static::assertEquals( 2, $page->getNamespace() ); + } + + /** + * Test fetching of wikitext + */ + public function testWikitext(): void { + $pageRepo = $this->getRealPageRepository(); + $page = new Page( $pageRepo, $this->getMockEnwikiProject(), 'Main Page' ); + + // We want to do a real-world test. enwiki's Main Page does not change much, + // and {{Main Page banner}} in particular should be there indefinitely, hopefully :) + $content = $page->getWikitext(); + static::assertStringContainsString( '{{Main Page banner}}', $content ); + } + + /** + * Test fetching of HTML + */ + public function testHtml(): void { + $page = new Page( $this->pageRepo, $this->getMockEnwikiProject(), 'A' ); + $date = new \DateTime( '20010101010101' ); // 01:01:01 UTC, January 1, 2001 + $this->pageRepo->expects( static::once() ) + ->method( 'getRevisionIdAtDate' ) + ->with( $page, $date ) + ->willReturn( 1234 ); + $this->pageRepo->expects( static::once() ) + ->method( 'getHTMLContent' ) + ->with( $page, 1234 ) + ->willReturn( 'Hello' ); + static::assertEquals( 'Hello', $page->getHTMLContent( $date ) ); + } + + /** + * Tests wikidata item getter. + */ + public function testWikidataItems(): void { + $wikidataItems = [ + [ + 'ips_site_id' => 'enwiki', + 'ips_site_page' => 'Google', + ], + [ + 'ips_site_id' => 'arwiki', + 'ips_site_page' => 'جوجل', + ], + ]; + + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'getPageInfo' ) + ->willReturn( [ + 'pageprops' => [ + 'wikibase_item' => 'Q95', + ], + ] ); + $pageRepo->expects( $this->once() ) + ->method( 'getWikidataItems' ) + ->willReturn( $wikidataItems ); + $page = new Page( $this->pageRepo, new Project( 'TestProject' ), 'Test_Page' ); + $page->setRepository( $pageRepo ); + + static::assertArraySubset( $wikidataItems, $page->getWikidataItems() ); + static::assertEquals( 2, $page->countWikidataItems() ); // Ensure that we count the above + + // If no wikidata item... + $pageRepo2 = $this->createMock( PageRepository::class ); + $pageRepo2->expects( $this->once() ) + ->method( 'getPageInfo' ) + ->willReturn( [ + 'pageprops' => [], + ] ); + $page2 = new Page( $this->pageRepo, new Project( 'TestProject' ), 'Test_Page' ); + $page2->setRepository( $pageRepo2 ); + static::assertNull( $page2->getWikidataId() ); + static::assertSame( 0, $page2->countWikidataItems() ); + } + + /** + * Tests wikidata item counter. + */ + public function testCountWikidataItems(): void { + $page = new Page( $this->pageRepo, new Project( 'TestProject' ), 'Test_Page' ); + $this->pageRepo->method( 'countWikidataItems' ) + ->with( $page ) + ->willReturn( 2 ); + + static::assertEquals( 2, $page->countWikidataItems() ); + } + + /** + * Fetching of revisions. + */ + public function testUsersEdits(): void { + $this->pageRepo->method( 'getRevisions' ) + ->with() + ->willReturn( [ + [ + 'id' => '1', + 'timestamp' => '20170505100000', + 'length_change' => '1', + 'comment' => 'One', + ], + [ + 'id' => '2', + 'timestamp' => '20170506100000', + 'length_change' => '2', + 'comment' => 'Two', + ], + ] ); + $page = new Page( $this->pageRepo, new Project( 'exampleWiki' ), 'Page' ); + $user = new User( $this->createMock( UserRepository::class ), 'Testuser' ); + static::assertCount( 2, $page->getRevisions( $user ) ); + static::assertCount( 2, $page->getRevisions( $user ) ); // Test caching + static::assertEquals( 2, $page->getNumRevisions() ); + } + + /** + * Cases for counting of number of edits + */ + public function testNumRevisions(): void { + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->expects( static::exactly( 2 ) ) + ->method( 'getNumRevisions' ) + ->willReturn( 42 ); + $pageRepo->expects( static::once() ) + ->method( 'getRevisions' ) + ->willReturn( [] ); + $page = new Page( $pageRepo, new Project( 'examplewiki' ), 'Page' ); + + // #1: user given, so we query repo and don't cache + static::assertEquals( 42, $page->getNumRevisions( $this->createMock( User::class ) ) ); + + // #2: revisions happens to be set, so count that. doesn't query repo, but caches + static::assertEquals( [], $page->getRevisions() ); + static::assertSame( 0, $page->getNumRevisions() ); + static::assertSame( 0, $page->getNumRevisions() ); // Test caching + + // #3: normal case, go out of our way to check + $page = new Page( $pageRepo, new Project( 'examplewiki' ), 'Page' ); // reset caching + static::assertEquals( 42, $page->getNumRevisions() ); // queries repo for the second time + + // #4: caching did work. If it doesn't we call the Repo method a third time + static::assertEquals( 42, $page->getNumRevisions() ); + } + + /** + * Test getErros and getCheckWikiErrors. + */ + public function testErrors(): void { + $checkWikiErrors = [ + [ + 'error' => '61', + 'notice' => 'This is where the error is', + 'found' => '2017-08-09 00:05:09', + 'name' => 'Reference before punctuation', + 'prio' => '3', + 'explanation' => 'This is how to fix the error', + ], + ]; + + $this->pageRepo->method( 'getCheckWikiErrors' ) + ->willReturn( $checkWikiErrors ); + $this->pageRepo->method( 'getPageInfo' ) + ->willReturn( [ + 'pagelanguage' => 'en', + 'pageprops' => [ + 'wikibase_item' => 'Q123', + ], + ] ); + $page = new Page( $this->pageRepo, new Project( 'exampleWiki' ), 'Page' ); + $page->setRepository( $this->pageRepo ); + + static::assertEquals( $checkWikiErrors, $page->getCheckWikiErrors() ); + static::assertEquals( $checkWikiErrors, $page->getErrors() ); + } + + /** + * Tests for pageviews-related functions + */ + public function testPageviews(): void { + $pageviewsData = [ + 'items' => [ + [ 'views' => 2500 ], + [ 'views' => 1000 ], + ], + ]; + + $this->pageRepo->method( 'getPageviews' )->willReturn( $pageviewsData ); + $page = new Page( $this->pageRepo, new Project( 'exampleWiki' ), 'Page' ); + $page->setRepository( $this->pageRepo ); + + static::assertEquals( + 3500, + $page->getPageviews( '20160101', '20160201' ) + ); + + static::assertEquals( 3500, $page->getLatestPageviews( 30 ) ); + + // When the API fails. + $this->pageRepo->expects( static::once() ) + ->method( 'getPageviews' ) + ->willThrowException( $this->createMock( BadGatewayException::class ) ); + static::assertNull( $page->getPageviews( '20230101', '20230131' ) ); + // 404, must return 0 + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->expects( static::once() ) + ->method( 'getPageviews' ) + ->willThrowException( $this->createMock( ClientException::class ) ); + $page = new Page( $pageRepo, new Project( 'exampleWiki' ), 'Page' ); + static::assertSame( 0, $page->getPageviews( '20230101', '20230131' ) ); + } + + /** + * Is the page the Main Page? + */ + public function testIsMainPage(): void { + $pageRepo = $this->getRealPageRepository(); + $page = new Page( $pageRepo, $this->getMockEnwikiProject(), 'Main Page' ); + static::assertTrue( $page->isMainPage() ); + } + + /** + * Links and redirects. + */ + public function testLinksAndRedirects(): void { + $data = [ + 'links_ext_count' => '418', + 'links_out_count' => '1085', + 'links_in_count' => '33300', + 'redirects_count' => '61', + ]; + $pageRepo = $this->createMock( PageRepository::class ); + $pageRepo->method( 'countLinksAndRedirects' )->willReturn( $data ); + $page = new Page( $this->pageRepo, new Project( 'exampleWiki' ), 'Page' ); + $page->setRepository( $pageRepo ); + + static::assertEquals( $data, $page->countLinksAndRedirects() ); + } + + private function getRealPageRepository(): PageRepository { + static::createClient(); + return new PageRepository( + self::$container->get( 'doctrine' ), + self::$container->get( 'cache.app' ), + self::$container->get( 'eight_points_guzzle.client.xtools' ), + $this->createMock( LoggerInterface::class ), + self::$container->get( 'parameter_bag' ), + true, + 30 + ); + } } diff --git a/tests/Model/PagesTest.php b/tests/Model/PagesTest.php index d670b280f..406212d31 100644 --- a/tests/Model/PagesTest.php +++ b/tests/Model/PagesTest.php @@ -1,6 +1,6 @@ project = $this->createMock(Project::class); - $paRepo = $this->createMock(PageAssessmentsRepository::class); - $paRepo->method('getConfig') - ->willReturn($this->getAssessmentsConfig()); - $pa = new PageAssessments($paRepo, $this->project); - $this->project->method('getPageAssessments') - ->willReturn($pa); - $this->project->method('hasPageAssessments') - ->willReturn(true); - $this->project->method('getNamespaces') - ->willReturn([0 => 'Main', 1 => 'Talk', 3 => 'User_talk']); - $this->userRepo = $this->createMock(UserRepository::class); - $this->user = new User($this->userRepo, 'Test user'); - $this->pagesRepo = $this->createMock(PagesRepository::class); - } + /** + * Set up class instances and mocks. + */ + public function setUp(): void { + $this->project = $this->createMock( Project::class ); + $paRepo = $this->createMock( PageAssessmentsRepository::class ); + $paRepo->method( 'getConfig' ) + ->willReturn( $this->getAssessmentsConfig() ); + $pa = new PageAssessments( $paRepo, $this->project ); + $this->project->method( 'getPageAssessments' ) + ->willReturn( $pa ); + $this->project->method( 'hasPageAssessments' ) + ->willReturn( true ); + $this->project->method( 'getNamespaces' ) + ->willReturn( [ 0 => 'Main', 1 => 'Talk', 3 => 'User_talk' ] ); + $this->userRepo = $this->createMock( UserRepository::class ); + $this->user = new User( $this->userRepo, 'Test user' ); + $this->pagesRepo = $this->createMock( PagesRepository::class ); + } - /** - * Test the basic getters. - */ - public function testConstructor(): void - { - $pages = new Pages($this->pagesRepo, $this->project, $this->user); - static::assertEquals(0, $pages->getNamespace()); - static::assertEquals($this->project, $pages->getProject()); - static::assertEquals($this->user, $pages->getUser()); - static::assertEquals(Pages::REDIR_NONE, $pages->getRedirects()); - static::assertEquals(0, $pages->getOffset()); - } + /** + * Test the basic getters. + */ + public function testConstructor(): void { + $pages = new Pages( $this->pagesRepo, $this->project, $this->user ); + static::assertSame( 0, $pages->getNamespace() ); + static::assertEquals( $this->project, $pages->getProject() ); + static::assertEquals( $this->user, $pages->getUser() ); + static::assertEquals( Pages::REDIR_NONE, $pages->getRedirects() ); + static::assertSame( 0, $pages->getOffset() ); + } - /** - * @dataProvider provideSummaryColumnsData - */ - public function testSummaryColumns(string $redirects, string $deleted, array $expected): void - { - $pages = new Pages($this->pagesRepo, $this->project, $this->user, 0, $redirects, $deleted); - static::assertEquals(array_merge($expected, [ - 'total-page-size', - 'average-page-size', - ]), $pages->getSummaryColumns()); - } + /** + * @dataProvider provideSummaryColumnsData + */ + public function testSummaryColumns( string $redirects, string $deleted, array $expected ): void { + $pages = new Pages( $this->pagesRepo, $this->project, $this->user, 0, $redirects, $deleted ); + static::assertEquals( array_merge( $expected, [ + 'total-page-size', + 'average-page-size', + ] ), $pages->getSummaryColumns() ); + } - /** - * @return array - */ - public function provideSummaryColumnsData(): array - { - return [ - [Pages::REDIR_ALL, Pages::DEL_ALL, ['namespace', 'pages', 'redirects', 'deleted', 'live']], - [Pages::REDIR_ONLY, Pages::DEL_ALL, ['namespace', 'redirects', 'deleted', 'live']], - [Pages::REDIR_NONE, Pages::DEL_ALL, ['namespace', 'pages', 'deleted', 'live']], - [Pages::REDIR_ALL, Pages::DEL_ONLY, ['namespace', 'redirects', 'deleted']], - [Pages::REDIR_ONLY, Pages::DEL_ONLY, ['namespace', 'redirects', 'deleted']], - [Pages::REDIR_NONE, Pages::DEL_ONLY, ['namespace', 'deleted']], - [Pages::REDIR_ALL, Pages::DEL_NONE, ['namespace', 'pages', 'redirects']], - [Pages::REDIR_ONLY, Pages::DEL_NONE, ['namespace', 'redirects']], - [Pages::REDIR_NONE, Pages::DEL_NONE, ['namespace', 'pages']], - ]; - } + /** + * @return array + */ + public function provideSummaryColumnsData(): array { + return [ + [ Pages::REDIR_ALL, Pages::DEL_ALL, [ 'namespace', 'pages', 'redirects', 'deleted', 'live' ] ], + [ Pages::REDIR_ONLY, Pages::DEL_ALL, [ 'namespace', 'redirects', 'deleted', 'live' ] ], + [ Pages::REDIR_NONE, Pages::DEL_ALL, [ 'namespace', 'pages', 'deleted', 'live' ] ], + [ Pages::REDIR_ALL, Pages::DEL_ONLY, [ 'namespace', 'redirects', 'deleted' ] ], + [ Pages::REDIR_ONLY, Pages::DEL_ONLY, [ 'namespace', 'redirects', 'deleted' ] ], + [ Pages::REDIR_NONE, Pages::DEL_ONLY, [ 'namespace', 'deleted' ] ], + [ Pages::REDIR_ALL, Pages::DEL_NONE, [ 'namespace', 'pages', 'redirects' ] ], + [ Pages::REDIR_ONLY, Pages::DEL_NONE, [ 'namespace', 'redirects' ] ], + [ Pages::REDIR_NONE, Pages::DEL_NONE, [ 'namespace', 'pages' ] ], + ]; + } - public function testResults(): void - { - $this->setPagesResults(); - $pages = new Pages($this->pagesRepo, $this->project, $this->user, 'all', 'all'); - $pages->setRepository($this->pagesRepo); - $pages->getResults(); // Ensure it does prepare - static::assertEquals(3, $pages->getNumResults()); - static::assertEquals(1, $pages->getNumDeleted()); - static::assertEquals(1, $pages->getNumRedirects()); + public function testResults(): void { + $this->setPagesResults(); + $pages = new Pages( $this->pagesRepo, $this->project, $this->user, 'all', 'all' ); + $pages->setRepository( $this->pagesRepo ); + $pages->getResults(); // Ensure it does prepare + static::assertEquals( 3, $pages->getNumResults() ); + static::assertSame( 1, $pages->getNumDeleted() ); + static::assertSame( 1, $pages->getNumRedirects() ); - static::assertEquals([ - 0 => [ - 'count' => 2, - 'redirects' => 0, - 'deleted' => 1, - 'total_length' => 17, - 'avg_length' => 8.5, - ], - 1 => [ - 'count' => 1, - 'redirects' => 1, - 'deleted' => 0, - 'total_length' => 10, - 'avg_length' => 10, - ], - ], $pages->getCounts()); + static::assertEquals( [ + 0 => [ + 'count' => 2, + 'redirects' => 0, + 'deleted' => 1, + 'total_length' => 17, + 'avg_length' => 8.5, + ], + 1 => [ + 'count' => 1, + 'redirects' => 1, + 'deleted' => 0, + 'total_length' => 10, + 'avg_length' => 10, + ], + ], $pages->getCounts() ); - $results = $pages->getResults(); // Also ensures it does cache + $results = $pages->getResults(); // Also ensures it does cache - static::assertEquals([0, 1], array_keys($results)); - static::assertEquals([ - 'deleted' => true, - 'namespace' => 0, - 'page_title' => 'My_fun_page', - 'full_page_title' => 'My_fun_page', - 'redirect' => true, - 'timestamp' => '20160519000000', - 'rev_id' => 16, - 'rev_length' => 5, - 'length' => null, - 'recreated' => true, - 'assessment' => [ - 'class' => 'Unknown', - 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/e/e0/Symbol_question.svg', - 'color' => '', - 'category' => 'Category:Unassessed articles', - 'projects' => ['Random'], - ], - ], $results[0][0]); - static::assertEquals([ - 'deleted' => false, - 'namespace' => 1, - 'page_title' => 'Google', - 'full_page_title' => 'Talk:Google', - 'redirect' => true, - 'timestamp' => '20160719000000', - 'rev_id' => 15, - 'rev_length' => 10, - 'length' => 50, - 'assessment' => [ - 'class' => 'A', - 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/2/25/Symbol_a_class.svg', - 'color' => '#66FFFF', - 'category' => 'Category:A-Class articles', - 'projects' => ['Technology', 'Internet'], - ], - ], $results[1][0]); - static::assertTrue($pages->isMultiNamespace()); - static::assertEquals(null, $pages->getLastTimestamp()); - static::assertEquals(27, $pages->getTotalPageSize()); - static::assertEquals(9, $pages->averagePageSize()); - static::assertSame('all', $pages->getNamespace()); - static::assertEquals(50, $pages->resultsPerPage()); - static::assertEquals(false, $pages->resultsPerPage(true)); - static::assertEquals([ - ['pap_project_title' => 'Technology', 'count' => 2], - ['pap_project_title' => 'Random', 'count' => 1], - ['pap_project_title' => 'Computing', 'count' => 1], - ['pap_project_title' => 'Internet', 'count' => 1], - ], $pages->getWikiprojectCounts()); - static::assertEquals([ - 'A' => 1, - 'Unknown' => 1, - 'FA' => 1, - ], $pages->getAssessmentCounts()); - } - - /** - * Make sure we just spit out what the repo says, - * when there are more than 1 pages of results. - */ - public function testPaManyPages(): void - { - $project = $this->createMock(Project::class); - $pagesRepo = $this->createMock(PagesRepository::class); - $pagesRepo->expects(static::once()) - ->method('countPagesCreated') - ->willReturn([[ - 'namespace' => 0, - 'count' => 5001, - 'total_length' => 0, - 'deleted' => 0, - 'redirects' => 0, - ]]); - $pages = new Pages($pagesRepo, $project, $this->user, 'all', 'all'); - static::assertEquals(5001, $pages->getNumPages()); - $value = ['Exactly the value given as input.']; - $pagesRepo->expects(static::once()) - ->method('getWikiprojectCounts') - ->willReturn($value); - static::assertSame($value, $pages->getWikiprojectCounts()); - $pagesRepo->expects(static::once()) - ->method('getAssessmentCounts') - ->willReturn($value); - static::assertSame($value, $pages->getAssessmentCounts()); - } + static::assertEquals( [ 0, 1 ], array_keys( $results ) ); + static::assertEquals( [ + 'deleted' => true, + 'namespace' => 0, + 'page_title' => 'My_fun_page', + 'full_page_title' => 'My_fun_page', + 'redirect' => true, + 'timestamp' => '20160519000000', + 'rev_id' => 16, + 'rev_length' => 5, + 'length' => null, + 'recreated' => true, + 'assessment' => [ + 'class' => 'Unknown', + 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/e/e0/Symbol_question.svg', + 'color' => '', + 'category' => 'Category:Unassessed articles', + 'projects' => [ 'Random' ], + ], + ], $results[0][0] ); + static::assertEquals( [ + 'deleted' => false, + 'namespace' => 1, + 'page_title' => 'Google', + 'full_page_title' => 'Talk:Google', + 'redirect' => true, + 'timestamp' => '20160719000000', + 'rev_id' => 15, + 'rev_length' => 10, + 'length' => 50, + 'assessment' => [ + 'class' => 'A', + 'badge' => 'https://upload.wikimedia.org/wikipedia/commons/2/25/Symbol_a_class.svg', + 'color' => '#66FFFF', + 'category' => 'Category:A-Class articles', + 'projects' => [ 'Technology', 'Internet' ], + ], + ], $results[1][0] ); + static::assertTrue( $pages->isMultiNamespace() ); + static::assertNull( $pages->getLastTimestamp() ); + static::assertEquals( 27, $pages->getTotalPageSize() ); + static::assertEquals( 9, $pages->averagePageSize() ); + static::assertSame( 'all', $pages->getNamespace() ); + static::assertEquals( 50, $pages->resultsPerPage() ); + static::assertFalse( $pages->resultsPerPage( true ) ); + static::assertEquals( [ + [ 'pap_project_title' => 'Technology', 'count' => 2 ], + [ 'pap_project_title' => 'Random', 'count' => 1 ], + [ 'pap_project_title' => 'Computing', 'count' => 1 ], + [ 'pap_project_title' => 'Internet', 'count' => 1 ], + ], $pages->getWikiprojectCounts() ); + static::assertEquals( [ + 'A' => 1, + 'Unknown' => 1, + 'FA' => 1, + ], $pages->getAssessmentCounts() ); + } - public function testSingleNamespace(): void - { - // Also does the ProofreadPage tests. - $project = $this->createMock(Project::class); - $project->method('hasPageAssessments') - ->willReturn(false); - $project->method('isPrpPage') - ->with(104) - ->willReturn(true); - $project->method('getNamespaces') - ->willReturn([0 => 'Main', 1 => 'Talk', 104 => 'Page']); - $pages = new Pages($this->pagesRepo, $project, $this->user, 104, 'all'); - $pagesRepo = $this->createMock(PagesRepository::class); - $pagesRepo->expects(static::once()) - ->method('getPagesCreated') - ->willReturn([[ - 'namespace' => 104, - 'type' => 'rev', - 'page_title' => 'AAA', - 'redirect' => '1', - 'rev_length' => 2, - 'length' => 20, - 'timestamp' => '20250101000000', - 'rev_id' => 42, - 'recreated' => null, - 'prp_quality' => 3, - 'was_redirect' => null, - ]]); - $pagesRepo->expects(static::once()) - ->method('countPagesCreated') - ->willReturn([[ - 'namespace' => 104, - 'count' => 1, - 'deleted' => 0, - 'redirects' => 1, - 'total_length' => 20, - 'prp_quality0' => 0, - 'prp_quality1' => 0, - 'prp_quality2' => 0, - 'prp_quality3' => 1, - 'prp_quality4' => 0, - ]]); - $pages->setRepository($pagesRepo); - static::assertFalse($pages->isMultiNamespace()); - static::assertEquals('2025-01-01T00:00:00Z', $pages->getLastTimestamp()); - static::assertEquals(1, $pages->getNumPages()); - $counts = $pages->getCounts(); - static::assertEquals(1, $counts[104]['prp_quality3']); - } + /** + * Make sure we just spit out what the repo says, + * when there are more than 1 pages of results. + */ + public function testPaManyPages(): void { + $project = $this->createMock( Project::class ); + $pagesRepo = $this->createMock( PagesRepository::class ); + $pagesRepo->expects( static::once() ) + ->method( 'countPagesCreated' ) + ->willReturn( [ [ + 'namespace' => 0, + 'count' => 5001, + 'total_length' => 0, + 'deleted' => 0, + 'redirects' => 0, + ] ] ); + $pages = new Pages( $pagesRepo, $project, $this->user, 'all', 'all' ); + static::assertEquals( 5001, $pages->getNumPages() ); + $value = [ 'Exactly the value given as input.' ]; + $pagesRepo->expects( static::once() ) + ->method( 'getWikiprojectCounts' ) + ->willReturn( $value ); + static::assertSame( $value, $pages->getWikiprojectCounts() ); + $pagesRepo->expects( static::once() ) + ->method( 'getAssessmentCounts' ) + ->willReturn( $value ); + static::assertSame( $value, $pages->getAssessmentCounts() ); + } - public function setPagesResults(): void - { - $this->pagesRepo->expects(static::exactly(2)) - ->method('getPagesCreated') - ->willReturn([ - [ - 'namespace' => 1, - 'type' => 'rev', - 'page_title' => 'Google', - 'redirect' => '1', - 'rev_length' => 10, - 'length' => 50, - 'timestamp' => '20160719000000', - 'rev_id' => 15, - 'recreated' => null, - 'pa_class' => 'A', - 'was_redirect' => null, - 'pap_project_title' => '["Technology","Internet"]', - ], [ - 'namespace' => 0, - 'type' => 'arc', - 'page_title' => 'My_fun_page', - 'redirect' => '0', - 'rev_length' => 5, - 'length' => null, - 'timestamp' => '20160519000000', - 'rev_id' => 16, - 'recreated' => 1, - 'pa_class' => null, - 'was_redirect' => '1', - 'pap_project_title' => '["Random"]', - ], [ - 'namespace' => 0, - 'type' => 'rev', - 'page_title' => 'Foo_bar', - 'redirect' => '0', - 'rev_length' => 12, - 'length' => 50, - 'timestamp' => '20160101000000', - 'rev_id' => 17, - 'recreated' => null, - 'pa_class' => 'FA', - 'was_redirect' => null, - 'pap_project_title' => '["Computing","Technology"]', - ], - ]); - $this->pagesRepo->expects($this->once()) - ->method('countPagesCreated') - ->willReturn([ - [ - 'namespace' => 0, - 'count' => 2, - 'deleted' => 1, - 'redirects' => 0, - 'total_length' => 17, - ], [ - 'namespace' => 1, - 'count' => 1, - 'deleted' => 0, - 'redirects' => 1, - 'total_length' => 10, - ], - ]); - } + public function testSingleNamespace(): void { + // Also does the ProofreadPage tests. + $project = $this->createMock( Project::class ); + $project->method( 'hasPageAssessments' ) + ->willReturn( false ); + $project->method( 'isPrpPage' ) + ->with( 104 ) + ->willReturn( true ); + $project->method( 'getNamespaces' ) + ->willReturn( [ 0 => 'Main', 1 => 'Talk', 104 => 'Page' ] ); + $pages = new Pages( $this->pagesRepo, $project, $this->user, 104, 'all' ); + $pagesRepo = $this->createMock( PagesRepository::class ); + $pagesRepo->expects( static::once() ) + ->method( 'getPagesCreated' ) + ->willReturn( [ [ + 'namespace' => 104, + 'type' => 'rev', + 'page_title' => 'AAA', + 'redirect' => '1', + 'rev_length' => 2, + 'length' => 20, + 'timestamp' => '20250101000000', + 'rev_id' => 42, + 'recreated' => null, + 'prp_quality' => 3, + 'was_redirect' => null, + ] ] ); + $pagesRepo->expects( static::once() ) + ->method( 'countPagesCreated' ) + ->willReturn( [ [ + 'namespace' => 104, + 'count' => 1, + 'deleted' => 0, + 'redirects' => 1, + 'total_length' => 20, + 'prp_quality0' => 0, + 'prp_quality1' => 0, + 'prp_quality2' => 0, + 'prp_quality3' => 1, + 'prp_quality4' => 0, + ] ] ); + $pages->setRepository( $pagesRepo ); + static::assertFalse( $pages->isMultiNamespace() ); + static::assertEquals( '2025-01-01T00:00:00Z', $pages->getLastTimestamp() ); + static::assertSame( 1, $pages->getNumPages() ); + $counts = $pages->getCounts(); + static::assertSame( 1, $counts[104]['prp_quality3'] ); + } - /** - * Users get tooltips containing deletion summaries, for deleted pages. - * @dataProvider deletionSummaryProvider - * @param array|null $data - * @param int $ns - * @param string $title - * @param string $offset - * @param string|null $result - */ - public function testDeletionSummary( - ?array $data, - int $ns, - string $title, - string $offset, - ?string $result - ): void { - $project = new Project('testWiki'); - $project->setRepository($this->getProjectRepo()); - $this->pagesRepo->expects(static::once()) - ->method('getDeletionSummary') - ->willReturn($data); - $pages = new Pages($this->pagesRepo, $project, $this->user); - $pages->setRepository($this->pagesRepo); - static::assertEquals( - $result, - $pages->getDeletionSummary($ns, $title, $offset) - ); - } - - public function deletionSummaryProvider(): array - { - return [[ - [ - 'actor_name' => 'MusikAnimal', - 'comment_text' => '[[WP:AfD|Articles for deletion]]', - 'log_timestamp' => '20210108224022', - ], - 0, - 'Foobar', - '20210108224000', - "2021-01-08 22:40 (" . - "MusikAnimal): " . - "Articles for deletion", - ], [ - [], - 0, - 'Foobar', - '202101082240000', - null, - ]]; - } + public function setPagesResults(): void { + $this->pagesRepo->expects( static::exactly( 2 ) ) + ->method( 'getPagesCreated' ) + ->willReturn( [ + [ + 'namespace' => 1, + 'type' => 'rev', + 'page_title' => 'Google', + 'redirect' => '1', + 'rev_length' => 10, + 'length' => 50, + 'timestamp' => '20160719000000', + 'rev_id' => 15, + 'recreated' => null, + 'pa_class' => 'A', + 'was_redirect' => null, + 'pap_project_title' => '["Technology","Internet"]', + ], [ + 'namespace' => 0, + 'type' => 'arc', + 'page_title' => 'My_fun_page', + 'redirect' => '0', + 'rev_length' => 5, + 'length' => null, + 'timestamp' => '20160519000000', + 'rev_id' => 16, + 'recreated' => 1, + 'pa_class' => null, + 'was_redirect' => '1', + 'pap_project_title' => '["Random"]', + ], [ + 'namespace' => 0, + 'type' => 'rev', + 'page_title' => 'Foo_bar', + 'redirect' => '0', + 'rev_length' => 12, + 'length' => 50, + 'timestamp' => '20160101000000', + 'rev_id' => 17, + 'recreated' => null, + 'pa_class' => 'FA', + 'was_redirect' => null, + 'pap_project_title' => '["Computing","Technology"]', + ], + ] ); + $this->pagesRepo->expects( $this->once() ) + ->method( 'countPagesCreated' ) + ->willReturn( [ + [ + 'namespace' => 0, + 'count' => 2, + 'deleted' => 1, + 'redirects' => 0, + 'total_length' => 17, + ], [ + 'namespace' => 1, + 'count' => 1, + 'deleted' => 0, + 'redirects' => 1, + 'total_length' => 10, + ], + ] ); + } - /** - * Mock assessments configuration. - * @return array - */ - private function getAssessmentsConfig(): array - { - return [ - 'class' => [ - 'FA' => [ - 'badge' => 'b/bc/Featured_article_star.svg', - 'color' => '#9CBDFF', - 'category' => 'Category:FA-Class articles', - ], - 'A' => [ - 'badge' => '2/25/Symbol_a_class.svg', - 'color' => '#66FFFF', - 'category' => 'Category:A-Class articles', - ], - 'Unknown' => [ - 'badge' => 'e/e0/Symbol_question.svg', - 'color' => '', - 'category' => 'Category:Unassessed articles', - ], - ], - ]; - } + /** + * Users get tooltips containing deletion summaries, for deleted pages. + * @dataProvider deletionSummaryProvider + * @param array|null $data + * @param int $ns + * @param string $title + * @param string $offset + * @param string|null $result + */ + public function testDeletionSummary( + ?array $data, + int $ns, + string $title, + string $offset, + ?string $result + ): void { + $project = new Project( 'testWiki' ); + $project->setRepository( $this->getProjectRepo() ); + $this->pagesRepo->expects( static::once() ) + ->method( 'getDeletionSummary' ) + ->willReturn( $data ); + $pages = new Pages( $this->pagesRepo, $project, $this->user ); + $pages->setRepository( $this->pagesRepo ); + static::assertEquals( + $result, + $pages->getDeletionSummary( $ns, $title, $offset ) + ); + } + + public function deletionSummaryProvider(): array { + return [ [ + [ + 'actor_name' => 'MusikAnimal', + 'comment_text' => '[[WP:AfD|Articles for deletion]]', + 'log_timestamp' => '20210108224022', + ], + 0, + 'Foobar', + '20210108224000', + "2021-01-08 22:40 (" . + "MusikAnimal): " . + "Articles for deletion", + ], [ + [], + 0, + 'Foobar', + '202101082240000', + null, + ] ]; + } + + /** + * Mock assessments configuration. + * @return array + */ + private function getAssessmentsConfig(): array { + return [ + 'class' => [ + 'FA' => [ + 'badge' => 'b/bc/Featured_article_star.svg', + 'color' => '#9CBDFF', + 'category' => 'Category:FA-Class articles', + ], + 'A' => [ + 'badge' => '2/25/Symbol_a_class.svg', + 'color' => '#66FFFF', + 'category' => 'Category:A-Class articles', + ], + 'Unknown' => [ + 'badge' => 'e/e0/Symbol_question.svg', + 'color' => '', + 'category' => 'Category:Unassessed articles', + ], + ], + ]; + } } diff --git a/tests/Model/ProjectTest.php b/tests/Model/ProjectTest.php index 4f92d8f09..3ed520d50 100644 --- a/tests/Model/ProjectTest.php +++ b/tests/Model/ProjectTest.php @@ -1,6 +1,6 @@ projectRepo = $this->getProjectRepo(); - $this->userRepo = $this->createMock(UserRepository::class); - } + public function setUp(): void { + parent::setUp(); + $this->projectRepo = $this->getProjectRepo(); + $this->userRepo = $this->createMock( UserRepository::class ); + } - /** - * A project has its own domain name, database name, URL, script path, and article path. - */ - public function testBasicMetadata(): void - { - $this->projectRepo->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'general' => [ - 'articlePath' => '/test_wiki/$1', - 'scriptPath' => '/test_w', - 'wikiName' => 'Test Wiki', - 'mainpage' => 'Test Main Page', - ], - ]); - $this->projectRepo->expects(static::once()) - ->method('getApiPath') - ->willReturn('/w/api.php'); + /** + * A project has its own domain name, database name, URL, script path, and article path. + */ + public function testBasicMetadata(): void { + $this->projectRepo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'general' => [ + 'articlePath' => '/test_wiki/$1', + 'scriptPath' => '/test_w', + 'wikiName' => 'Test Wiki', + 'mainpage' => 'Test Main Page', + ], + ] ); + $this->projectRepo->expects( static::once() ) + ->method( 'getApiPath' ) + ->willReturn( '/w/api.php' ); - $project = new Project('testWiki'); - $project->setRepository($this->projectRepo); - static::assertEquals('test.example.org', $project->getDomain()); - static::assertEquals('test_wiki', $project->getDatabaseName()); - static::assertEquals('test_wiki', $project->getCacheKey()); - static::assertEquals('https://test.example.org/', $project->getUrl()); - static::assertEquals('en', $project->getLang()); - static::assertEquals('/test_w', $project->getScriptPath()); - static::assertEquals('/test_wiki/$1', $project->getArticlePath()); - static::assertEquals('https://test.example.org/w/api.php', $project->getApiUrl()); - static::assertEquals('Test Wiki (test.example.org)', $project->getTitle()); - static::assertEquals('Test Main Page', $project->getMainPage()); - static::assertTrue($project->exists()); - } + $project = new Project( 'testWiki' ); + $project->setRepository( $this->projectRepo ); + static::assertEquals( 'test.example.org', $project->getDomain() ); + static::assertEquals( 'test_wiki', $project->getDatabaseName() ); + static::assertEquals( 'test_wiki', $project->getCacheKey() ); + static::assertEquals( 'https://test.example.org/', $project->getUrl() ); + static::assertEquals( 'en', $project->getLang() ); + static::assertEquals( '/test_w', $project->getScriptPath() ); + static::assertEquals( '/test_wiki/$1', $project->getArticlePath() ); + static::assertEquals( 'https://test.example.org/w/api.php', $project->getApiUrl() ); + static::assertEquals( 'Test Wiki (test.example.org)', $project->getTitle() ); + static::assertEquals( 'Test Main Page', $project->getMainPage() ); + static::assertTrue( $project->exists() ); + } - /** - * Test fallback behaviour when URL not found - */ - public function testMetadataNoUrl(): void - { - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects(static::once()) - ->method('getOne') - ->willReturn([]); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertEquals('', $project->getMainPage()); - } + /** + * Test fallback behaviour when URL not found + */ + public function testMetadataNoUrl(): void { + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( static::once() ) + ->method( 'getOne' ) + ->willReturn( [] ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertSame( '', $project->getMainPage() ); + } - /** - * A project has a set of namespaces, comprising integer IDs and string titles. - */ - public function testNamespaces(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'namespaces' => [0 => 'Main', 1 => 'Talk'], - ]); + /** + * A project has a set of namespaces, comprising integer IDs and string titles. + */ + public function testNamespaces(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'namespaces' => [ 0 => 'Main', 1 => 'Talk' ], + ] ); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertCount(2, $project->getNamespaces()); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertCount( 2, $project->getNamespaces() ); - // Tests that getMetadata was in fact called only once and cached afterwards - static::assertEquals('Main', $project->getNamespaces()[0]); - } + // Tests that getMetadata was in fact called only once and cached afterwards + static::assertEquals( 'Main', $project->getNamespaces()[0] ); + } - /** - * Each namespace has a language-independent canonical name. - */ - public function testCanonicalNamespaces(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'canonical_namespaces' => [0 => '', 1 => 'Talk', 104 => 'Page'], - ]); - $projectRepo->expects(static::once()) - ->method('getInstalledExtensions') - ->willReturn(['ProofreadPage']); + /** + * Each namespace has a language-independent canonical name. + */ + public function testCanonicalNamespaces(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'canonical_namespaces' => [ 0 => '', 1 => 'Talk', 104 => 'Page' ], + ] ); + $projectRepo->expects( static::once() ) + ->method( 'getInstalledExtensions' ) + ->willReturn( [ 'ProofreadPage' ] ); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertTrue($project->isPrpPage(104)); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertTrue( $project->isPrpPage( 104 ) ); - // Tests that getMetadata was in fact called only once and cached afterwards - static::assertEquals('', $project->getCanonicalNamespace(0)); + // Tests that getMetadata was in fact called only once and cached afterwards + static::assertSame( '', $project->getCanonicalNamespace( 0 ) ); - // Ensure we default to '' when not found - static::assertEquals('', $project->getCanonicalNamespace(-1)); - } + // Ensure we default to '' when not found + static::assertSame( '', $project->getCanonicalNamespace( -1 ) ); + } - /** - * A project has a list of installed extensions - */ - public function testExtensions(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getInstalledExtensions') - ->willReturn(['NoThing', 'ProofreadPage']); + /** + * A project has a list of installed extensions + */ + public function testExtensions(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getInstalledExtensions' ) + ->willReturn( [ 'NoThing', 'ProofreadPage' ] ); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertTrue($project->hasProofreadPage()); - static::assertFalse($project->hasVisualEditor()); - static::assertFalse($project->hasPageTriage()); - } + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertTrue( $project->hasProofreadPage() ); + static::assertFalse( $project->hasVisualEditor() ); + static::assertFalse( $project->hasPageTriage() ); + } - /** - * XTools can be run in single-wiki mode, where there is only one project. - */ - public function testSingleWiki(): void - { - $this->markTestSkipped('No single-wiki support, currently.'); + /** + * XTools can be run in single-wiki mode, where there is only one project. + */ + public function testSingleWiki(): void { + $this->markTestSkipped( 'No single-wiki support, currently.' ); - $this->projectRepo->setSingleBasicInfo([ - 'url' => 'https://example.org/a-wiki/', - 'dbName' => 'example_wiki', - 'lang' => 'en', - ]); - $project = new Project('disregarded_wiki_name'); - $project->setRepository($this->projectRepo); - static::assertEquals('example_wiki', $project->getDatabaseName()); - static::assertEquals('https://example.org/a-wiki/', $project->getUrl()); - static::assertEquals('en', $project->getLang()); - } + $this->projectRepo->setSingleBasicInfo( [ + 'url' => 'https://example.org/a-wiki/', + 'dbName' => 'example_wiki', + 'lang' => 'en', + ] ); + $project = new Project( 'disregarded_wiki_name' ); + $project->setRepository( $this->projectRepo ); + static::assertEquals( 'example_wiki', $project->getDatabaseName() ); + static::assertEquals( 'https://example.org/a-wiki/', $project->getUrl() ); + static::assertEquals( 'en', $project->getLang() ); + } - /** - * A project is considered to exist if it has at least a domain name. - */ - public function testExists(): void - { - /** @var ProjectRepository|MockObject $projectRepo */ - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects(static::once()) - ->method('getOne') - ->willReturn([]); + /** + * A project is considered to exist if it has at least a domain name. + */ + public function testExists(): void { + /** @var ProjectRepository|MockObject $projectRepo */ + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( static::once() ) + ->method( 'getOne' ) + ->willReturn( [] ); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertFalse($project->exists()); - } + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertFalse( $project->exists() ); + } - /** - * Get the relative URL to the index.php script. - */ - public function testGetScript(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'general' => [ - 'script' => '/w/index.php', - ], - ]); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertEquals('/w/index.php', $project->getScript()); + /** + * Get the relative URL to the index.php script. + */ + public function testGetScript(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'general' => [ + 'script' => '/w/index.php', + ], + ] ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertEquals( '/w/index.php', $project->getScript() ); - // No script from API. - $projectRepo2 = $this->getProjectRepo(); - $projectRepo2->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'general' => [ - 'scriptPath' => '/w', - ], - ]); - $project2 = new Project('testWiki'); - $project2->setRepository($projectRepo2); - static::assertEquals('/w/index.php', $project2->getScript()); - } + // No script from API. + $projectRepo2 = $this->getProjectRepo(); + $projectRepo2->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'general' => [ + 'scriptPath' => '/w', + ], + ] ); + $project2 = new Project( 'testWiki' ); + $project2->setRepository( $projectRepo2 ); + static::assertEquals( '/w/index.php', $project2->getScript() ); + } - /** - * Projects can have varying temporary account config. - */ - public function testTempAccounts(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getMetadata') - ->willReturn([ - 'tempAccountPatterns' => [ - "*$1", - "~2$1", - ], - ]); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertTrue($project->hasTempAccounts()); - static::assertEquals(["*$1", "~2$1"], $project->getTempAccountPatterns()); - } + /** + * Projects can have varying temporary account config. + */ + public function testTempAccounts(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getMetadata' ) + ->willReturn( [ + 'tempAccountPatterns' => [ + "*$1", + "~2$1", + ], + ] ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertTrue( $project->hasTempAccounts() ); + static::assertEquals( [ "*$1", "~2$1" ], $project->getTempAccountPatterns() ); + } - /** - * A project may use PageAssessments in specific namespaces - */ - public function testPageAssessments(): void - { - $pa = $this->createMock(PageAssessments::class); - $pa->expects(static::once()) - ->method('isSupportedNamespace') - ->willReturn(false); - $pa->expects(static::once()) - ->method('isEnabled') - ->willReturn(true); - $project = new Project('testWiki'); - $project->setPageAssessments($pa); - static::assertEquals($project->getPageAssessments(), $pa); - static::assertTrue($project->hasPageAssessments()); - static::assertFalse($project->hasPageAssessments(42)); - } + /** + * A project may use PageAssessments in specific namespaces + */ + public function testPageAssessments(): void { + $pa = $this->createMock( PageAssessments::class ); + $pa->expects( static::once() ) + ->method( 'isSupportedNamespace' ) + ->willReturn( false ); + $pa->expects( static::once() ) + ->method( 'isEnabled' ) + ->willReturn( true ); + $project = new Project( 'testWiki' ); + $project->setPageAssessments( $pa ); + static::assertEquals( $project->getPageAssessments(), $pa ); + static::assertTrue( $project->hasPageAssessments() ); + static::assertFalse( $project->hasPageAssessments( 42 ) ); + } - /** - * A user or a whole project can opt in to displaying restricted statistics. - * @dataProvider optedInProvider - * @param string[] $optedInProjects List of projects. - * @param string $dbName The database name. - * @param string $domain The domain name. - * @param \stdClass|null $ident Identification information. - * @param bool $localExists - * @param bool $globalExists - * @param bool $hasOptedIn The result to check against. - */ - public function testOptedIn( - array $optedInProjects, - string $dbName, - string $domain, - ?\stdClass $ident, - bool $localExists, - bool $globalExists, - bool $hasOptedIn - ): void { - $project = new Project($dbName); - $globalProject = new Project('metawiki'); - $globalProjectRepo = $this->createMock(ProjectRepository::class); - $globalProjectRepo->expects(static::any()) - ->method('pageHasContent') - ->with($globalProject, 2, 'TestUser/EditCounterGlobalOptIn.js') - ->willReturn($globalExists); - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects(static::once()) - ->method('optedIn') - ->willReturn($optedInProjects); - $projectRepo->expects(static::once()) - ->method('getOne') - ->willReturn([ - 'dbName' => $dbName, - 'domain' => "https://$domain.org", - ]); - $projectRepo->method('getGlobalProject') - ->willReturn($globalProject); - $projectRepo->method('pageHasContent') - ->with($project, 2, 'TestUser/EditCounterOptIn.js') - ->willReturn($localExists); - $project->setRepository($projectRepo); - $globalProject->setRepository($globalProjectRepo); + /** + * A user or a whole project can opt in to displaying restricted statistics. + * @dataProvider optedInProvider + * @param string[] $optedInProjects List of projects. + * @param string $dbName The database name. + * @param string $domain The domain name. + * @param \stdClass|null $ident Identification information. + * @param bool $localExists + * @param bool $globalExists + * @param bool $hasOptedIn The result to check against. + */ + public function testOptedIn( + array $optedInProjects, + string $dbName, + string $domain, + ?\stdClass $ident, + bool $localExists, + bool $globalExists, + bool $hasOptedIn + ): void { + $project = new Project( $dbName ); + $globalProject = new Project( 'metawiki' ); + $globalProjectRepo = $this->createMock( ProjectRepository::class ); + $globalProjectRepo->expects( static::any() ) + ->method( 'pageHasContent' ) + ->with( $globalProject, 2, 'TestUser/EditCounterGlobalOptIn.js' ) + ->willReturn( $globalExists ); + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( static::once() ) + ->method( 'optedIn' ) + ->willReturn( $optedInProjects ); + $projectRepo->expects( static::once() ) + ->method( 'getOne' ) + ->willReturn( [ + 'dbName' => $dbName, + 'domain' => "https://$domain.org", + ] ); + $projectRepo->method( 'getGlobalProject' ) + ->willReturn( $globalProject ); + $projectRepo->method( 'pageHasContent' ) + ->with( $project, 2, 'TestUser/EditCounterOptIn.js' ) + ->willReturn( $localExists ); + $project->setRepository( $projectRepo ); + $globalProject->setRepository( $globalProjectRepo ); - // Check that the user has opted in or not. - $userRepo = $this->createMock(UserRepository::class); - $userRepo->expects(static::any()) - ->method('getXtoolsUserInfo') - ->willReturn($ident); - static::assertEquals($ident, $userRepo->getXtoolsUserInfo()); - $user = new User($userRepo, 'TestUser'); - static::assertEquals($hasOptedIn, $project->userHasOptedIn($user)); - } + // Check that the user has opted in or not. + $userRepo = $this->createMock( UserRepository::class ); + $userRepo->expects( static::any() ) + ->method( 'getXtoolsUserInfo' ) + ->willReturn( $ident ); + static::assertEquals( $ident, $userRepo->getXtoolsUserInfo() ); + $user = new User( $userRepo, 'TestUser' ); + static::assertEquals( $hasOptedIn, $project->userHasOptedIn( $user ) ); + } - /** - * Data for self::testOptedIn(). - * @return array - */ - public function optedInProvider(): array - { - $optedInProjects = ['project1']; - return [ - [$optedInProjects, 'project1', 'test.example.org', null, false, false, true], - [$optedInProjects, 'project2', 'test2.example.org', null, false, false, false], - [$optedInProjects, 'project3', 'test3.example.org', null, false, false, false], - [$optedInProjects, 'project4', 'test4.example.org', (object)['username' => 'TestUser'], false, false, true], - [$optedInProjects, 'project5', 'test5.example.org', null, true, false, true], - [$optedInProjects, 'project6', 'test6.example.org', null, false, true, true], - ]; - } + /** + * Data for self::testOptedIn(). + * @return array + */ + public function optedInProvider(): array { + $optedInProjects = [ 'project1' ]; + return [ + [ $optedInProjects, 'project1', 'test.example.org', null, false, false, true ], + [ $optedInProjects, 'project2', 'test2.example.org', null, false, false, false ], + [ $optedInProjects, 'project3', 'test3.example.org', null, false, false, false ], + [ $optedInProjects, 'project4', 'test4.example.org', (object)[ 'username' => 'TestUser' ], false, false, true ], + [ $optedInProjects, 'project5', 'test5.example.org', null, true, false, true ], + [ $optedInProjects, 'project6', 'test6.example.org', null, false, true, true ], + ]; + } - /** - * Normalized, quoted table name. - */ - public function testTableName(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getTableName') - ->willReturn('testwiki_p.revision_userindex'); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertEquals( - 'testwiki_p.revision_userindex', - $project->getTableName('testwiki', 'revision') - ); - } + /** + * Normalized, quoted table name. + */ + public function testTableName(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getTableName' ) + ->willReturn( 'testwiki_p.revision_userindex' ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertEquals( + 'testwiki_p.revision_userindex', + $project->getTableName( 'testwiki', 'revision' ) + ); + } - /** - * Getting a list of the users within specific user groups. - */ - public function testUsersInGroups(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::once()) - ->method('getUsersInGroups') - ->willReturn([ - ['user_name' => 'Bob', 'user_group' => 'sysop'], - ['user_name' => 'Bob', 'user_group' => 'checkuser'], - ['user_name' => 'Julie', 'user_group' => 'sysop'], - ['user_name' => 'Herald', 'user_group' => 'suppress'], - ['user_name' => 'Isosceles', 'user_group' => 'suppress'], - ['user_name' => 'Isosceles', 'user_group' => 'sysop'], - ]); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertEquals( - [ - 'Bob' => ['sysop', 'checkuser'], - 'Julie' => ['sysop'], - 'Herald' => ['suppress'], - 'Isosceles' => ['suppress', 'sysop'], - ], - $project->getUsersInGroups(['sysop', 'checkuser'], []) - ); - } + /** + * Getting a list of the users within specific user groups. + */ + public function testUsersInGroups(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::once() ) + ->method( 'getUsersInGroups' ) + ->willReturn( [ + [ 'user_name' => 'Bob', 'user_group' => 'sysop' ], + [ 'user_name' => 'Bob', 'user_group' => 'checkuser' ], + [ 'user_name' => 'Julie', 'user_group' => 'sysop' ], + [ 'user_name' => 'Herald', 'user_group' => 'suppress' ], + [ 'user_name' => 'Isosceles', 'user_group' => 'suppress' ], + [ 'user_name' => 'Isosceles', 'user_group' => 'sysop' ], + ] ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertEquals( + [ + 'Bob' => [ 'sysop', 'checkuser' ], + 'Julie' => [ 'sysop' ], + 'Herald' => [ 'suppress' ], + 'Isosceles' => [ 'suppress', 'sysop' ], + ], + $project->getUsersInGroups( [ 'sysop', 'checkuser' ], [] ) + ); + } - public function testGetUrlForPage(): void - { - $projectRepo = $this->getProjectRepo(); - $projectRepo->expects(static::exactly(2))->method('getMetadata'); - $project = new Project('testWiki'); - $project->setRepository($projectRepo); - static::assertEquals( - "https://test.example.org/wiki/Foobar", - $project->getUrlForPage('Foobar') - ); - $pageRepo = $this->createMock(PageRepository::class); - $page = new Page($pageRepo, $project, 'Foobar'); - static::assertEquals( - "https://test.example.org/wiki/Foobar", - $project->getUrlForPage($page) - ); - } + public function testGetUrlForPage(): void { + $projectRepo = $this->getProjectRepo(); + $projectRepo->expects( static::exactly( 2 ) )->method( 'getMetadata' ); + $project = new Project( 'testWiki' ); + $project->setRepository( $projectRepo ); + static::assertEquals( + "https://test.example.org/wiki/Foobar", + $project->getUrlForPage( 'Foobar' ) + ); + $pageRepo = $this->createMock( PageRepository::class ); + $page = new Page( $pageRepo, $project, 'Foobar' ); + static::assertEquals( + "https://test.example.org/wiki/Foobar", + $project->getUrlForPage( $page ) + ); + } } diff --git a/tests/Model/TopEditsTest.php b/tests/Model/TopEditsTest.php index 5cce131c8..cff2a7fe0 100644 --- a/tests/Model/TopEditsTest.php +++ b/tests/Model/TopEditsTest.php @@ -1,6 +1,6 @@ project = new Project('en.wikipedia.org'); - $this->project->setPageAssessments($this->createMock(PageAssessments::class)); - $this->projectRepo = $this->createMock(ProjectRepository::class); - $this->projectRepo->method('getMetadata') - ->willReturn(['namespaces' => [0 => 'Main', 3 => 'User_talk']]); - $this->projectRepo->method('getOne') - ->willReturn(['url' => 'https://en.wikipedia.org']); - $this->projectRepo->method('pageHasContent') - ->with($this->project, 2, 'Test user/EditCounterOptIn.js') - ->willReturn(true); - $this->project->setRepository($this->projectRepo); - $this->userRepo = $this->createMock(UserRepository::class); - $this->user = new User($this->userRepo, 'Test user'); - $this->autoEditsHelper = $this->getAutomatedEditsHelper(); - $this->teRepo = $this->createMock(TopEditsRepository::class); - $this->editRepo = $this->createMock(EditRepository::class); - $this->editRepo->method('getAutoEditsHelper') - ->willReturn($this->autoEditsHelper); - $this->pageRepo = $this->createMock(PageRepository::class); - } + /** + * Set up class instances and mocks. + */ + public function setUp(): void { + $this->project = new Project( 'en.wikipedia.org' ); + $this->project->setPageAssessments( $this->createMock( PageAssessments::class ) ); + $this->projectRepo = $this->createMock( ProjectRepository::class ); + $this->projectRepo->method( 'getMetadata' ) + ->willReturn( [ 'namespaces' => [ 0 => 'Main', 3 => 'User_talk' ] ] ); + $this->projectRepo->method( 'getOne' ) + ->willReturn( [ 'url' => 'https://en.wikipedia.org' ] ); + $this->projectRepo->method( 'pageHasContent' ) + ->with( $this->project, 2, 'Test user/EditCounterOptIn.js' ) + ->willReturn( true ); + $this->project->setRepository( $this->projectRepo ); + $this->userRepo = $this->createMock( UserRepository::class ); + $this->user = new User( $this->userRepo, 'Test user' ); + $this->autoEditsHelper = $this->getAutomatedEditsHelper(); + $this->teRepo = $this->createMock( TopEditsRepository::class ); + $this->editRepo = $this->createMock( EditRepository::class ); + $this->editRepo->method( 'getAutoEditsHelper' ) + ->willReturn( $this->autoEditsHelper ); + $this->pageRepo = $this->createMock( PageRepository::class ); + } - /** - * Test the basic functionality of TopEdits. - */ - public function testBasic(): void - { - // Single namespace, with defaults. - $te = $this->getTopEdits(); - static::assertEquals(0, $te->getNamespace()); - static::assertEquals(1000, $te->getLimit()); + /** + * Test the basic functionality of TopEdits. + */ + public function testBasic(): void { + // Single namespace, with defaults. + $te = $this->getTopEdits(); + static::assertSame( 0, $te->getNamespace() ); + static::assertEquals( 1000, $te->getLimit() ); - // Single namespace, explicit configuration. - $te = $this->getTopEdits(null, 5, false, false, 50); - static::assertEquals(5, $te->getNamespace()); - static::assertEquals(50, $te->getLimit()); + // Single namespace, explicit configuration. + $te = $this->getTopEdits( null, 5, false, false, 50 ); + static::assertEquals( 5, $te->getNamespace() ); + static::assertEquals( 50, $te->getLimit() ); - // All namespaces, so limit set. - $te = $this->getTopEdits(null, 'all'); - static::assertEquals('all', $te->getNamespace()); - static::assertEquals(20, $te->getLimit()); + // All namespaces, so limit set. + $te = $this->getTopEdits( null, 'all' ); + static::assertEquals( 'all', $te->getNamespace() ); + static::assertEquals( 20, $te->getLimit() ); - // All namespaces, explicit limit. - $te = $this->getTopEdits(null, 'all', false, false, 3); - static::assertEquals('all', $te->getNamespace()); - static::assertEquals(3, $te->getLimit()); + // All namespaces, explicit limit. + $te = $this->getTopEdits( null, 'all', false, false, 3 ); + static::assertEquals( 'all', $te->getNamespace() ); + static::assertEquals( 3, $te->getLimit() ); - $page = new Page($this->pageRepo, $this->project, 'Test page'); - $te->setPage($page); - static::assertEquals($page, $te->getPage()); + $page = new Page( $this->pageRepo, $this->project, 'Test page' ); + $te->setPage( $page ); + static::assertEquals( $page, $te->getPage() ); - // Explicit pagination - $te = $this->getTopEdits(null, 'all', false, false, 20, 1); - static::assertEquals(1, $te->getPagination()); - } + // Explicit pagination + $te = $this->getTopEdits( null, 'all', false, false, 20, 1 ); + static::assertSame( 1, $te->getPagination() ); + } - /** - * Getting top edited pages across all namespaces. - */ - public function testTopEditsAllNamespaces(): void - { - $te = $this->getTopEdits(null, 'all', false, false, 2); - $this->teRepo->expects($this->once()) - ->method('getTopEditsAllNamespaces') - ->with($this->project, $this->user, '', '', 2) - ->willReturn(array_merge( - $this->topEditsNamespaceFactory()[0], - $this->topEditsNamespaceFactory()[3] - )); - $te->setRepository($this->teRepo); - $te->prepareData(); + /** + * Getting top edited pages across all namespaces. + */ + public function testTopEditsAllNamespaces(): void { + $te = $this->getTopEdits( null, 'all', false, false, 2 ); + $this->teRepo->expects( $this->once() ) + ->method( 'getTopEditsAllNamespaces' ) + ->with( $this->project, $this->user, '', '', 2 ) + ->willReturn( array_merge( + $this->topEditsNamespaceFactory()[0], + $this->topEditsNamespaceFactory()[3] + ) ); + $te->setRepository( $this->teRepo ); + $te->prepareData(); - $result = $te->getTopEdits(); - static::assertEquals([0, 3], array_keys($result)); - static::assertEquals(2, count($result)); - static::assertEquals(2, count($result[0])); - static::assertEquals(2, count($result[3])); - static::assertEquals([ - 'namespace' => '0', - 'page_title' => 'Foo bar', - 'redirect' => '1', - 'count' => '24', - 'full_page_title' => 'Foo bar', - 'assessment' => [ - 'class' => 'List', - ], - 'pap_project_title' => '["Biography","India"]', - ], $result[0][0]); + $result = $te->getTopEdits(); + static::assertEquals( [ 0, 3 ], array_keys( $result ) ); + static::assertCount( 2, $result ); + static::assertCount( 2, $result[0] ); + static::assertCount( 2, $result[3] ); + static::assertEquals( [ + 'namespace' => '0', + 'page_title' => 'Foo bar', + 'redirect' => '1', + 'count' => '24', + 'full_page_title' => 'Foo bar', + 'assessment' => [ + 'class' => 'List', + ], + 'pap_project_title' => '["Biography","India"]', + ], $result[0][0] ); - // Fetching again should use value of class property. - // The $this->once() above will validate this. - $result2 = $te->getTopEdits(); - static::assertEquals($result, $result2); - } + // Fetching again should use value of class property. + // The $this->once() above will validate this. + $result2 = $te->getTopEdits(); + static::assertEquals( $result, $result2 ); + } - /** - * Getting top edited pages within a single namespace. - */ - public function testTopEditsNamespace(): void - { - $te = $this->getTopEdits(null, 0, false, false, 2); - $this->teRepo->expects(static::once()) - ->method('getTopEditsNamespace') - ->with($this->project, $this->user, 0, false, false, 2) - ->willReturn($this->topEditsNamespaceFactory()[0]); - $this->teRepo->expects(static::once()) - ->method('countEdits') - ->willReturn(42); - $this->teRepo->expects(static::once()) - ->method('countPagesNamespace') - ->with($this->project, $this->user, 0) - ->willReturn(2); - $te->setRepository($this->teRepo); - $te->prepareData(); + /** + * Getting top edited pages within a single namespace. + */ + public function testTopEditsNamespace(): void { + $te = $this->getTopEdits( null, 0, false, false, 2 ); + $this->teRepo->expects( static::once() ) + ->method( 'getTopEditsNamespace' ) + ->with( $this->project, $this->user, 0, false, false, 2 ) + ->willReturn( $this->topEditsNamespaceFactory()[0] ); + $this->teRepo->expects( static::once() ) + ->method( 'countEdits' ) + ->willReturn( 42 ); + $this->teRepo->expects( static::once() ) + ->method( 'countPagesNamespace' ) + ->with( $this->project, $this->user, 0 ) + ->willReturn( 2 ); + $te->setRepository( $this->teRepo ); + $te->prepareData(); - $result = $te->getTopEdits(); - static::assertEquals(42, $te->getNumTopEdits()); - static::assertEquals([0], array_keys($result)); - static::assertEquals(1, count($result)); - static::assertEquals(2, count($result[0])); - static::assertEquals([ - 'namespace' => '0', - 'page_title' => '101st Airborne Division', - 'redirect' => '0', - 'count' => '18', - 'full_page_title' => '101st Airborne Division', - 'pap_project_title' => null, - 'assessment' => ['class' => 'C'], - ], $result[0][1]); - static::assertEquals([ - [ 'pap_project_title' => 'Biography', 'count' => 24 ], - [ 'pap_project_title' => 'India', 'count' => 24 ], - ], $te->getProjectTotals(0)); - } + $result = $te->getTopEdits(); + static::assertEquals( 42, $te->getNumTopEdits() ); + static::assertEquals( [ 0 ], array_keys( $result ) ); + static::assertCount( 1, $result ); + static::assertCount( 2, $result[0] ); + static::assertEquals( [ + 'namespace' => '0', + 'page_title' => '101st Airborne Division', + 'redirect' => '0', + 'count' => '18', + 'full_page_title' => '101st Airborne Division', + 'pap_project_title' => null, + 'assessment' => [ 'class' => 'C' ], + ], $result[0][1] ); + static::assertEquals( [ + [ 'pap_project_title' => 'Biography', 'count' => 24 ], + [ 'pap_project_title' => 'India', 'count' => 24 ], + ], $te->getProjectTotals( 0 ) ); + } - /** - * Ensure we do default to a standalone query if there is more. - */ - public function testProjectsStandalone(): void - { - $te = $this->getTopEdits(null, 0, false, false, 2); - $this->teRepo->expects(static::once()) - ->method('countPagesNamespace') - ->with($this->project, $this->user, 0) - ->willReturn(3); - $this->teRepo->expects(static::once()) - ->method('getProjectTotals') - ->willReturn(['What the repo gives.']); - static::assertEquals(['What the repo gives.'], $te->getProjectTotals(0)); - } + /** + * Ensure we do default to a standalone query if there is more. + */ + public function testProjectsStandalone(): void { + $te = $this->getTopEdits( null, 0, false, false, 2 ); + $this->teRepo->expects( static::once() ) + ->method( 'countPagesNamespace' ) + ->with( $this->project, $this->user, 0 ) + ->willReturn( 3 ); + $this->teRepo->expects( static::once() ) + ->method( 'getProjectTotals' ) + ->willReturn( [ 'What the repo gives.' ] ); + static::assertEquals( [ 'What the repo gives.' ], $te->getProjectTotals( 0 ) ); + } - /** - * Ensure we do not show any data if the user has not opted in. - */ - public function testNotOptedIn(): void - { - $project = $this->createMock(Project::class); - $project->expects(static::once()) - ->method('userHasOptedIn') - ->willReturn(false); - $te = new TopEdits( - $this->teRepo, - $this->autoEditsHelper, - $project, - $this->user - ); - $te->prepareData(); - static::assertEmpty($te->getTopEdits()); - } + /** + * Ensure we do not show any data if the user has not opted in. + */ + public function testNotOptedIn(): void { + $project = $this->createMock( Project::class ); + $project->expects( static::once() ) + ->method( 'userHasOptedIn' ) + ->willReturn( false ); + $te = new TopEdits( + $this->teRepo, + $this->autoEditsHelper, + $project, + $this->user + ); + $te->prepareData(); + static::assertEmpty( $te->getTopEdits() ); + } - /** - * Data for self::testTopEditsAllNamespaces() and self::testTopEditsNamespace(). - * @return array - */ - private function topEditsNamespaceFactory(): array - { - return [ - 0 => [ - [ - 'namespace' => '0', - 'page_title' => 'Foo_bar', - 'redirect' => '1', - 'count' => '24', - 'pa_class' => 'List', - 'full_page_title' => 'Foo_bar', - 'pap_project_title' => json_encode([ - 'Biography', - 'India', - ]), - ], [ - 'namespace' => '0', - 'page_title' => '101st_Airborne_Division', - 'redirect' => '0', - 'count' => '18', - 'pa_class' => 'C', - 'full_page_title' => '101st_Airborne_Division', - 'pap_project_title' => null, - ], - ], - 3 => [ - [ - 'namespace' => '3', - 'page_title' => 'Test_user', - 'redirect' => '0', - 'count' => '3', - 'full_page_title' => 'User_talk:Test_user', - ], [ - 'namespace' => '3', - 'page_title' => 'Jimbo_Wales', - 'redirect' => '0', - 'count' => '1', - 'full_page_title' => 'User_talk:Jimbo_Wales', - ], - ], - ]; - } + /** + * Data for self::testTopEditsAllNamespaces() and self::testTopEditsNamespace(). + * @return array + */ + private function topEditsNamespaceFactory(): array { + return [ + 0 => [ + [ + 'namespace' => '0', + 'page_title' => 'Foo_bar', + 'redirect' => '1', + 'count' => '24', + 'pa_class' => 'List', + 'full_page_title' => 'Foo_bar', + 'pap_project_title' => json_encode( [ + 'Biography', + 'India', + ] ), + ], [ + 'namespace' => '0', + 'page_title' => '101st_Airborne_Division', + 'redirect' => '0', + 'count' => '18', + 'pa_class' => 'C', + 'full_page_title' => '101st_Airborne_Division', + 'pap_project_title' => null, + ], + ], + 3 => [ + [ + 'namespace' => '3', + 'page_title' => 'Test_user', + 'redirect' => '0', + 'count' => '3', + 'full_page_title' => 'User_talk:Test_user', + ], [ + 'namespace' => '3', + 'page_title' => 'Jimbo_Wales', + 'redirect' => '0', + 'count' => '1', + 'full_page_title' => 'User_talk:Jimbo_Wales', + ], + ], + ]; + } - /** - * Top edits to a single page. - */ - public function testTopEditsPage(): void - { - $te = $this->getTopEdits(new Page($this->pageRepo, $this->project, 'Test page')); - $this->teRepo->expects($this->once()) - ->method('getTopEditsPage') - ->willReturn($this->topEditsPageFactory()); - // The Edit instantiation happens in the repo, so we need to mock it for each - // revision so that the processing in TopEdits::prepareData() is done correctly. - $this->teRepo->method('getEdit') - ->willReturnCallback(function ($page, $rev) { - return new Edit($this->editRepo, $this->userRepo, $page, $rev); - }); + /** + * Top edits to a single page. + */ + public function testTopEditsPage(): void { + $te = $this->getTopEdits( new Page( $this->pageRepo, $this->project, 'Test page' ) ); + $this->teRepo->expects( $this->once() ) + ->method( 'getTopEditsPage' ) + ->willReturn( $this->topEditsPageFactory() ); + // The Edit instantiation happens in the repo, so we need to mock it for each + // revision so that the processing in TopEdits::prepareData() is done correctly. + $this->teRepo->method( 'getEdit' ) + ->willReturnCallback( function ( $page, $rev ) { + return new Edit( $this->editRepo, $this->userRepo, $page, $rev ); + } ); - $te->prepareData(); + $te->prepareData(); - static::assertEquals(4, $te->getNumTopEdits(), 'getNumTopEdits'); - static::assertEquals(100, $te->getTotalAdded(), 'getTotalAdded'); - static::assertEquals(-50, $te->getTotalRemoved(), 'getTotalRemoved'); - static::assertEquals(1, $te->getTotalMinor(), 'getTotalMinor'); - static::assertEquals(1, $te->getTotalAutomated(), 'getTotalAutomated'); - static::assertEquals(2, $te->getTotalReverted(), 'getTotalReverted'); - static::assertEquals(10, $te->getTopEdits()[1]->getId(), 'ID of second mock TopEdit'); - static::assertEquals(22.5, $te->getAtbe(), 'getAtBe'); - } + static::assertEquals( 4, $te->getNumTopEdits(), 'getNumTopEdits' ); + static::assertEquals( 100, $te->getTotalAdded(), 'getTotalAdded' ); + static::assertEquals( -50, $te->getTotalRemoved(), 'getTotalRemoved' ); + static::assertSame( 1, $te->getTotalMinor(), 'getTotalMinor' ); + static::assertSame( 1, $te->getTotalAutomated(), 'getTotalAutomated' ); + static::assertEquals( 2, $te->getTotalReverted(), 'getTotalReverted' ); + static::assertEquals( 10, $te->getTopEdits()[1]->getId(), 'ID of second mock TopEdit' ); + static::assertEquals( 22.5, $te->getAtbe(), 'getAtBe' ); + } - /** - * Test data for self::TopEditsPage(). - * @return array - */ - private function topEditsPageFactory(): array - { - return [ - [ - 'id' => 0, - 'timestamp' => '20170423000000', - 'minor' => 0, - 'length' => 100, - 'length_change' => 100, - 'reverted' => 0, - 'user_id' => 5, - 'username' => 'Test user', - 'comment' => 'Foo bar', - 'parent_comment' => null, - ], [ - 'id' => 10, - 'timestamp' => '20170313000000', - 'minor' => '1', - 'length' => 200, - 'length_change' => 50, - 'reverted' => 0, - 'user_id' => 5, - 'username' => 'Test user', - 'comment' => 'Weeee (using [[WP:AWB]])', - 'parent_comment' => 'Reverted edits by Test user ([[WP:HG]])', - ], [ - 'id' => 20, - 'timestamp' => '20170223000000', - 'minor' => 0, - 'length' => 500, - 'length_change' => -50, - 'reverted' => 0, - 'user_id' => 5, - 'username' => 'Test user', - 'comment' => 'Boomshakalaka', - 'parent_comment' => 'Just another innocent edit', - ], [ - 'id' => 30, - 'timestamp' => '20170123000000', - 'minor' => 0, - 'length' => 500, - 'length_change' => 100, - 'reverted' => 1, - 'user_id' => 5, - 'username' => 'Test user', - 'comment' => 'Best edit ever', - 'parent_comment' => 'I plead the Fifth', - ], - ]; - } + /** + * Test data for self::TopEditsPage(). + * @return array + */ + private function topEditsPageFactory(): array { + return [ + [ + 'id' => 0, + 'timestamp' => '20170423000000', + 'minor' => 0, + 'length' => 100, + 'length_change' => 100, + 'reverted' => 0, + 'user_id' => 5, + 'username' => 'Test user', + 'comment' => 'Foo bar', + 'parent_comment' => null, + ], [ + 'id' => 10, + 'timestamp' => '20170313000000', + 'minor' => '1', + 'length' => 200, + 'length_change' => 50, + 'reverted' => 0, + 'user_id' => 5, + 'username' => 'Test user', + 'comment' => 'Weeee (using [[WP:AWB]])', + 'parent_comment' => 'Reverted edits by Test user ([[WP:HG]])', + ], [ + 'id' => 20, + 'timestamp' => '20170223000000', + 'minor' => 0, + 'length' => 500, + 'length_change' => -50, + 'reverted' => 0, + 'user_id' => 5, + 'username' => 'Test user', + 'comment' => 'Boomshakalaka', + 'parent_comment' => 'Just another innocent edit', + ], [ + 'id' => 30, + 'timestamp' => '20170123000000', + 'minor' => 0, + 'length' => 500, + 'length_change' => 100, + 'reverted' => 1, + 'user_id' => 5, + 'username' => 'Test user', + 'comment' => 'Best edit ever', + 'parent_comment' => 'I plead the Fifth', + ], + ]; + } - /** - * @param Page|null $page - * @param string|int $namespace Namespace ID or 'all'. - * @param int|false $start Start date as Unix timestamp. - * @param int|false $end End date as Unix timestamp. - * @param int|null $limit Number of rows to fetch. - * @return TopEdits - */ - private function getTopEdits( - ?Page $page = null, - $namespace = 0, - $start = false, - $end = false, - ?int $limit = null, - int $pagination = 0 - ): TopEdits { - return new TopEdits( - $this->teRepo, - $this->autoEditsHelper, - $this->project, - $this->user, - $page, - $namespace, - $start, - $end, - $limit, - $pagination - ); - } + /** + * @param Page|null $page + * @param string|int $namespace Namespace ID or 'all'. + * @param int|false $start Start date as Unix timestamp. + * @param int|false $end End date as Unix timestamp. + * @param int|null $limit Number of rows to fetch. + * @return TopEdits + */ + private function getTopEdits( + ?Page $page = null, + $namespace = 0, + $start = false, + $end = false, + ?int $limit = null, + int $pagination = 0 + ): TopEdits { + return new TopEdits( + $this->teRepo, + $this->autoEditsHelper, + $this->project, + $this->user, + $page, + $namespace, + $start, + $end, + $limit, + $pagination + ); + } } diff --git a/tests/Model/UserRightsTest.php b/tests/Model/UserRightsTest.php index 6d01ef4b1..59abdd8b2 100644 --- a/tests/Model/UserRightsTest.php +++ b/tests/Model/UserRightsTest.php @@ -1,6 +1,6 @@ i18n = $this->createMock(I18nHelper::class); - $this->i18n->expects(static::any()) - ->method('getLang') - ->willReturn('en'); - //static::createClient()->getContainer()->get('app.i18n_helper'); - $project = new Project('test.example.org'); - $projectRepo = $this->getProjectRepo(); - $projectRepo->method('getMetadata') - ->willReturn([ - 'tempAccountPatterns' => ['~2$1'], - ]); - $project->setRepository($projectRepo); - $this->project = $project; - $this->userRepo = $this->createMock(UserRepository::class); - $this->user = new User($this->userRepo, 'Testuser'); - $this->userRightsRepo = $this->createMock(UserRightsRepository::class); - $this->userRights = new UserRights($this->userRightsRepo, $project, $this->user, $this->i18n); - } + public function setUp(): void { + $this->i18n = $this->createMock( I18nHelper::class ); + $this->i18n->expects( static::any() ) + ->method( 'getLang' ) + ->willReturn( 'en' ); + // static::createClient()->getContainer()->get('app.i18n_helper'); + $project = new Project( 'test.example.org' ); + $projectRepo = $this->getProjectRepo(); + $projectRepo->method( 'getMetadata' ) + ->willReturn( [ + 'tempAccountPatterns' => [ '~2$1' ], + ] ); + $project->setRepository( $projectRepo ); + $this->project = $project; + $this->userRepo = $this->createMock( UserRepository::class ); + $this->user = new User( $this->userRepo, 'Testuser' ); + $this->userRightsRepo = $this->createMock( UserRightsRepository::class ); + $this->userRights = new UserRights( $this->userRightsRepo, $project, $this->user, $this->i18n ); + } - /** - * User rights changes. - */ - public function testUserRightsChanges(): void - { - $this->userRightsRepo->expects(static::once()) - ->method('getRightsChanges') - ->willReturn([[ - // Added: interface-admin, temporary. - 'log_id' => '92769185', - 'log_timestamp' => '20180826173045', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:3:{i:0;s:11:"abusefilter";i:1;s:9:"checkuser";i:2;s:5:'. - '"sysop";}s:12:"5::newgroups";a:4:{i:0;s:11:"abusefilter";i:1;s:9:"checkuser";i:2;s:5:"sysop";'. - 'i:3;s:15:"interface-admin";}s:11:"oldmetadata";a:3:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"'. - 'expiry";N;}i:2;a:1:{s:6:"expiry";N;}}s:11:"newmetadata";a:4:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1'. - ':{s:6:"expiry";N;}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20181025000000";}}}', - 'log_action' => 'rights', - 'performer' => 'Worm That Turned', - 'log_comment' => 'per [[Special:Diff/856641107]]', - 'type' => 'local', - 'log_deleted' => '0', - ], [ - // Removed: ipblock-exempt, filemover. - 'log_id' => '210221', - 'log_timestamp' => '20180108132810', - 'log_comment' => '', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:6:{i:0;s:10:"bureaucrat";i:1;s:9:' . - '"filemover";i:2;s:6:"import";i:3;s:14:"ipblock-exempt";i:4;s:5:"sysop";i:5;' . - 's:14:"templateeditor";}s:12:"5::newgroups";a:5:{i:0;s:10:"bureaucrat";i:1;s:9:' . - '"filemover";i:2;s:6:"import";i:3;s:14:"ipblock-exempt";i:4;s:5:"sysop";}s:11:' . - '"oldmetadata";a:6:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";s:14:"' . - '20180108132858";}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858"' . - ';}i:4;a:1:{s:6:"expiry";N;}i:5;a:1:{s:6:"expiry";N;}}s:11:"newmetadata";a:5:{i:0;' . - 'a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";s:14:"20180108132858";}i:2;a:1:{s:6:' . - '"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858";}i:4;a:1:{s:6:"expiry";N;}}}', - 'log_action' => 'rights', - 'performer' => 'MusikAnimal', - 'type' => 'local', - 'log_deleted' => '0', - ], [ - // Added: ipblock-exempt, filemover, templateeditor. - 'log_id' => '210220', - 'log_timestamp' => '20180108132758', - 'log_comment' => '', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:3:{i:0;s:10:"bureaucrat";i:1;s:6:"import";' . - 'i:2;s:5:"sysop";}s:12:"5::newgroups";a:6:{i:0;s:10:"bureaucrat";i:1;s:6:"import";' . - 'i:2;s:5:"sysop";i:3;s:14:"ipblock-exempt";i:4;s:9:"filemover";i:5;s:14:"templateeditor";}' . - 's:11:"oldmetadata";a:3:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";N;}i:2;a:1:' . - '{s:6:"expiry";N;}}s:11:"newmetadata";a:6:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:' . - '"expiry";N;}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858";}' . - 'i:4;a:1:{s:6:"expiry";s:14:"20180108132858";}i:5;a:1:{s:6:"expiry";N;}}}', - 'log_action' => 'rights', - 'performer' => 'MusikAnimal', - 'type' => 'local', - 'log_deleted' => '0', - ], [ - // Added: bureaucrat; Removed: rollbacker. - 'log_id' => '155321', - 'log_timestamp' => '20150716002614', - 'log_comment' => 'Per user request.', - 'log_params' => 'a:2:{s:12:"4::oldgroups";a:3:{i:0;s:8:"reviewer";i:1;s:10:"rollbacker"' . - ';i:2;s:5:"sysop";}s:12:"5::newgroups";a:3:{i:0;s:8:"reviewer";i:1;s:5:"sysop";i:2;' . - 's:10:"bureaucrat";}}', - 'log_action' => 'rights', - 'performer' => 'Cyberpower678', - 'type' => 'meta', - 'log_deleted' => '0', - ], [ - // Old-school log entry, adds sysop. - 'log_id' => '140643', - 'log_timestamp' => '20141222034127', - 'log_comment' => 'per request', - 'log_params' => "\nsysop", - 'log_action' => 'rights', - 'performer' => 'Snowolf', - 'type' => 'meta', - 'log_deleted' => '0', - ], [ - // Comment deleted - 'log_id' => '168397975', - 'log_timestamp' => '20250310044508', - 'log_comment' => null, - 'log_params' => null, - 'log_action' => 'rights', - 'performer' => 'Queen of Hearts', - 'type' => 'local', - 'log_deleted' => '2', - ], - ]); - $this->userRightsRepo->expects(static::once()) - ->method('getAutoConfirmedAgeAndCount') - ->willReturn([ - 'wgAutoConfirmAge' => 1, // 1 second - 'wgAutoConfirmCount' => 1, // 1 edit - ]); - $this->userRightsRepo->expects(static::once()) - ->method('getNumEditsByTimestamp') - ->willReturn(2); - $this->userRightsRepo->expects(static::once()) - ->method('getRightsNames') - ->willReturn(['sysop' => 'Administrator']); + /** + * User rights changes. + */ + public function testUserRightsChanges(): void { + $this->userRightsRepo->expects( static::once() ) + ->method( 'getRightsChanges' ) + ->willReturn( [ [ + // Added: interface-admin, temporary. + 'log_id' => '92769185', + 'log_timestamp' => '20180826173045', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:3:{i:0;s:11:"abusefilter";i:1;s:9:"checkuser";i:2;s:5:' . + '"sysop";}s:12:"5::newgroups";a:4:{i:0;s:11:"abusefilter";i:1;s:9:"checkuser";i:2;s:5:"sysop";' . + 'i:3;s:15:"interface-admin";}s:11:"oldmetadata";a:3:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"' . + 'expiry";N;}i:2;a:1:{s:6:"expiry";N;}}s:11:"newmetadata";a:4:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1' . + ':{s:6:"expiry";N;}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20181025000000";}}}', + 'log_action' => 'rights', + 'performer' => 'Worm That Turned', + 'log_comment' => 'per [[Special:Diff/856641107]]', + 'type' => 'local', + 'log_deleted' => '0', + ], [ + // Removed: ipblock-exempt, filemover. + 'log_id' => '210221', + 'log_timestamp' => '20180108132810', + 'log_comment' => '', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:6:{i:0;s:10:"bureaucrat";i:1;s:9:' . + '"filemover";i:2;s:6:"import";i:3;s:14:"ipblock-exempt";i:4;s:5:"sysop";i:5;' . + 's:14:"templateeditor";}s:12:"5::newgroups";a:5:{i:0;s:10:"bureaucrat";i:1;s:9:' . + '"filemover";i:2;s:6:"import";i:3;s:14:"ipblock-exempt";i:4;s:5:"sysop";}s:11:' . + '"oldmetadata";a:6:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";s:14:"' . + '20180108132858";}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858"' . + ';}i:4;a:1:{s:6:"expiry";N;}i:5;a:1:{s:6:"expiry";N;}}s:11:"newmetadata";a:5:{i:0;' . + 'a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";s:14:"20180108132858";}i:2;a:1:{s:6:' . + '"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858";}i:4;a:1:{s:6:"expiry";N;}}}', + 'log_action' => 'rights', + 'performer' => 'MusikAnimal', + 'type' => 'local', + 'log_deleted' => '0', + ], [ + // Added: ipblock-exempt, filemover, templateeditor. + 'log_id' => '210220', + 'log_timestamp' => '20180108132758', + 'log_comment' => '', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:3:{i:0;s:10:"bureaucrat";i:1;s:6:"import";' . + 'i:2;s:5:"sysop";}s:12:"5::newgroups";a:6:{i:0;s:10:"bureaucrat";i:1;s:6:"import";' . + 'i:2;s:5:"sysop";i:3;s:14:"ipblock-exempt";i:4;s:9:"filemover";i:5;s:14:"templateeditor";}' . + 's:11:"oldmetadata";a:3:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:"expiry";N;}i:2;a:1:' . + '{s:6:"expiry";N;}}s:11:"newmetadata";a:6:{i:0;a:1:{s:6:"expiry";N;}i:1;a:1:{s:6:' . + '"expiry";N;}i:2;a:1:{s:6:"expiry";N;}i:3;a:1:{s:6:"expiry";s:14:"20180108132858";}' . + 'i:4;a:1:{s:6:"expiry";s:14:"20180108132858";}i:5;a:1:{s:6:"expiry";N;}}}', + 'log_action' => 'rights', + 'performer' => 'MusikAnimal', + 'type' => 'local', + 'log_deleted' => '0', + ], [ + // Added: bureaucrat; Removed: rollbacker. + 'log_id' => '155321', + 'log_timestamp' => '20150716002614', + 'log_comment' => 'Per user request.', + 'log_params' => 'a:2:{s:12:"4::oldgroups";a:3:{i:0;s:8:"reviewer";i:1;s:10:"rollbacker"' . + ';i:2;s:5:"sysop";}s:12:"5::newgroups";a:3:{i:0;s:8:"reviewer";i:1;s:5:"sysop";i:2;' . + 's:10:"bureaucrat";}}', + 'log_action' => 'rights', + 'performer' => 'Cyberpower678', + 'type' => 'meta', + 'log_deleted' => '0', + ], [ + // Old-school log entry, adds sysop. + 'log_id' => '140643', + 'log_timestamp' => '20141222034127', + 'log_comment' => 'per request', + 'log_params' => "\nsysop", + 'log_action' => 'rights', + 'performer' => 'Snowolf', + 'type' => 'meta', + 'log_deleted' => '0', + ], [ + // Comment deleted + 'log_id' => '168397975', + 'log_timestamp' => '20250310044508', + 'log_comment' => null, + 'log_params' => null, + 'log_action' => 'rights', + 'performer' => 'Queen of Hearts', + 'type' => 'local', + 'log_deleted' => '2', + ], + ] ); + $this->userRightsRepo->expects( static::once() ) + ->method( 'getAutoConfirmedAgeAndCount' ) + ->willReturn( [ + 'wgAutoConfirmAge' => 1, // 1 second + 'wgAutoConfirmCount' => 1, // 1 edit + ] ); + $this->userRightsRepo->expects( static::once() ) + ->method( 'getNumEditsByTimestamp' ) + ->willReturn( 2 ); + $this->userRightsRepo->expects( static::once() ) + ->method( 'getRightsNames' ) + ->willReturn( [ 'sysop' => 'Administrator' ] ); - /** @var MockObject|UserRepository $userRepo */ - $userRepo = $this->createMock(UserRepository::class); - $userRepo->method('getIdAndRegistration') - ->willReturn([ - 'userId' => 5, - 'regDate' => '20180101000000', - ]); - $this->user->setRepository($userRepo); + /** @var MockObject|UserRepository $userRepo */ + $userRepo = $this->createMock( UserRepository::class ); + $userRepo->method( 'getIdAndRegistration' ) + ->willReturn( [ + 'userId' => 5, + 'regDate' => '20180101000000', + ] ); + $this->user->setRepository( $userRepo ); - static::assertEquals(20180101000001, $this->userRights->getAutoConfirmedTimeStamp()); - static::assertEquals([ - 20180101000001 => [ - 'logId' => null, - 'performer' => null, - 'comment' => null, - 'added' => ['autoconfirmed'], - 'removed' => [], - 'grantType' => 'automatic', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20181025000000 => [ - 'logId' => '92769185', - 'performer' => 'Worm That Turned', - 'comment' => null, - 'added' => [], - 'removed' => ['interface-admin'], - 'grantType' => 'automatic', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20180826173045 => [ - 'logId' => '92769185', - 'performer' => 'Worm That Turned', - 'comment' => 'per [[Special:Diff/856641107]]', - 'added' => ['interface-admin'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20180108132858 => [ - 'logId' => '210220', - 'performer' => 'MusikAnimal', - 'comment' => null, - 'added' => [], - 'removed' => ['ipblock-exempt', 'filemover'], - 'grantType' => 'automatic', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20180108132810 => [ - 'logId' => '210221', - 'performer' => 'MusikAnimal', - 'comment' => '', - 'added' => [], - 'removed' => ['templateeditor'], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20180108132758 => [ - 'logId' => '210220', - 'performer' => 'MusikAnimal', - 'comment' => '', - 'added' => ['ipblock-exempt', 'filemover', 'templateeditor'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20150716002614 => [ - 'logId' => '155321', - 'performer' => 'Cyberpower678', - 'comment' => 'Per user request.', - 'added' => ['bureaucrat'], - 'removed' => ['rollbacker'], - 'grantType' => 'manual', - 'type' => 'meta', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20141222034127 => [ - 'logId' => '140643', - 'performer' => 'Snowolf', - 'comment' => 'per request', - 'added' => ['sysop'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'meta', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 20250310044508 => [ - 'logId' => '168397975', - 'performer' => 'Queen of Hearts', - 'comment' => null, - 'added' => [], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => true, - 'commentDeleted' => true, - 'performerDeleted' => false, - ], - ], $this->userRights->getRightsChanges()); + static::assertEquals( 20180101000001, $this->userRights->getAutoConfirmedTimeStamp() ); + static::assertEquals( [ + 20180101000001 => [ + 'logId' => null, + 'performer' => null, + 'comment' => null, + 'added' => [ 'autoconfirmed' ], + 'removed' => [], + 'grantType' => 'automatic', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20181025000000 => [ + 'logId' => '92769185', + 'performer' => 'Worm That Turned', + 'comment' => null, + 'added' => [], + 'removed' => [ 'interface-admin' ], + 'grantType' => 'automatic', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20180826173045 => [ + 'logId' => '92769185', + 'performer' => 'Worm That Turned', + 'comment' => 'per [[Special:Diff/856641107]]', + 'added' => [ 'interface-admin' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20180108132858 => [ + 'logId' => '210220', + 'performer' => 'MusikAnimal', + 'comment' => null, + 'added' => [], + 'removed' => [ 'ipblock-exempt', 'filemover' ], + 'grantType' => 'automatic', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20180108132810 => [ + 'logId' => '210221', + 'performer' => 'MusikAnimal', + 'comment' => '', + 'added' => [], + 'removed' => [ 'templateeditor' ], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20180108132758 => [ + 'logId' => '210220', + 'performer' => 'MusikAnimal', + 'comment' => '', + 'added' => [ 'ipblock-exempt', 'filemover', 'templateeditor' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20150716002614 => [ + 'logId' => '155321', + 'performer' => 'Cyberpower678', + 'comment' => 'Per user request.', + 'added' => [ 'bureaucrat' ], + 'removed' => [ 'rollbacker' ], + 'grantType' => 'manual', + 'type' => 'meta', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20141222034127 => [ + 'logId' => '140643', + 'performer' => 'Snowolf', + 'comment' => 'per request', + 'added' => [ 'sysop' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'meta', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 20250310044508 => [ + 'logId' => '168397975', + 'performer' => 'Queen of Hearts', + 'comment' => null, + 'added' => [], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => true, + 'commentDeleted' => true, + 'performerDeleted' => false, + ], + ], $this->userRights->getRightsChanges() ); - $this->userRightsRepo->expects(static::once()) - ->method('getGlobalRightsChanges') - ->willReturn([[ - 'log_id' => '140643', - 'log_timestamp' => '20141222034127', - 'log_comment' => 'per request', - 'log_params' => "\nsysop", - 'log_action' => 'gblrights', - 'performer' => 'Snowolf', - 'type' => 'global', - 'log_deleted' => '0', - ]]); + $this->userRightsRepo->expects( static::once() ) + ->method( 'getGlobalRightsChanges' ) + ->willReturn( [ [ + 'log_id' => '140643', + 'log_timestamp' => '20141222034127', + 'log_comment' => 'per request', + 'log_params' => "\nsysop", + 'log_action' => 'gblrights', + 'performer' => 'Snowolf', + 'type' => 'global', + 'log_deleted' => '0', + ] ] ); - static::assertEquals([ - 20141222034127 => [ - 'logId' => '140643', - 'performer' => 'Snowolf', - 'comment' => 'per request', - 'added' => ['sysop'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'global', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - ], $this->userRights->getGlobalRightsChanges()); + static::assertEquals( [ + 20141222034127 => [ + 'logId' => '140643', + 'performer' => 'Snowolf', + 'comment' => 'per request', + 'added' => [ 'sysop' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'global', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + ], $this->userRights->getGlobalRightsChanges() ); - /** @var MockObject|UserRepository $userRepo */ - $userRepo = $this->createMock(UserRepository::class); - $userRepo->expects(static::once()) - ->method('getUserRights') - ->willReturn(['sysop', 'bureaucrat']); - $userRepo->expects(static::once()) - ->method('getGlobalUserRights') - ->willReturn(['sysop']); - $this->user->setRepository($userRepo); + /** @var MockObject|UserRepository $userRepo */ + $userRepo = $this->createMock( UserRepository::class ); + $userRepo->expects( static::once() ) + ->method( 'getUserRights' ) + ->willReturn( [ 'sysop', 'bureaucrat' ] ); + $userRepo->expects( static::once() ) + ->method( 'getGlobalUserRights' ) + ->willReturn( [ 'sysop' ] ); + $this->user->setRepository( $userRepo ); - // Global rights and changes. - static::assertEquals([ - 'current' => ['sysop'], - 'former' => [], - ], $this->userRights->getGlobalRightsStates()); + // Global rights and changes. + static::assertEquals( [ + 'current' => [ 'sysop' ], + 'former' => [], + ], $this->userRights->getGlobalRightsStates() ); - // Current rights. - static::assertEquals( - ['sysop', 'bureaucrat', 'autoconfirmed'], - $this->userRights->getRightsStates()['local']['current'] - ); + // Current rights. + static::assertEquals( + [ 'sysop', 'bureaucrat', 'autoconfirmed' ], + $this->userRights->getRightsStates()['local']['current'] + ); - // Former rights. - static::assertEquals( - ['interface-admin', 'ipblock-exempt', 'filemover', 'templateeditor', 'rollbacker'], - $this->userRights->getRightsStates()['local']['former'] - ); + // Former rights. + static::assertEquals( + [ 'interface-admin', 'ipblock-exempt', 'filemover', 'templateeditor', 'rollbacker' ], + $this->userRights->getRightsStates()['local']['former'] + ); - // Rights names. - static::assertEquals('Administrator', $this->userRights->getRightsName('sysop')); - // Missing key, and ensure caching. - static::assertEquals('example', $this->userRights->getRightsName('example')); - } + // Rights names. + static::assertEquals( 'Administrator', $this->userRights->getRightsName( 'sysop' ) ); + // Missing key, and ensure caching. + static::assertEquals( 'example', $this->userRights->getRightsName( 'example' ) ); + } - /** - * Test various edge cases and unexpected incidents during log processsing - * @dataProvider edgeCaseProvider - * @param $logData - * @param $hasImpossibleLogs - * @param $result - */ - public function testChangesEdgeCases( - array $logData, - bool $hasImpossibleLogs, - array $result - ): void { - $this->userRightsRepo->expects(static::once()) - ->method('getRightsChanges') - ->willReturn($logData); - static::assertEquals($result, $this->userRights->getRightsChanges()); - static::assertEquals($hasImpossibleLogs, $this->userRights->hasImpossibleLogs()); - } + /** + * Test various edge cases and unexpected incidents during log processsing + * @dataProvider edgeCaseProvider + * @param $logData + * @param $hasImpossibleLogs + * @param $result + */ + public function testChangesEdgeCases( + array $logData, + bool $hasImpossibleLogs, + array $result + ): void { + $this->userRightsRepo->expects( static::once() ) + ->method( 'getRightsChanges' ) + ->willReturn( $logData ); + static::assertEquals( $result, $this->userRights->getRightsChanges() ); + static::assertEquals( $hasImpossibleLogs, $this->userRights->hasImpossibleLogs() ); + } - public function edgeCaseProvider(): array - { - return [[ // Dataset #0: Expiry modification - [ - [ // Temporary intadmin grant until timestamp 4 - 'log_id' => '1234', - 'log_timestamp' => '0', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:0:{}s:12:"5::newgroups";a:1:{i:0;s:15:'. - '"interface-admin";}s:11:"oldmetadata";a:0:{}s:11:"newmetadata";a:1:{i:0;a:1:'. - '{s:6:"expiry";s:1:"8";}}}', - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => 'One', - 'type' => 'local', - 'log_deleted' => 0, - ], - [ // One second before, extended until 8 - 'log_id' => '5678', - 'log_timestamp' => '3', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:1:{i:0;s:15:"interface-admin";}s:12:"5::newgroups";'. - 'a:1:{i:0;s:15:"interface-admin";}s:11:"oldmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"4";}}s:'. - '11:"newmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"8";}}}', - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => 'Two!', - 'type' => 'local', - 'log_deleted' => 0, - ], - ], - false, - [ - 0 => [ - 'logId' => '1234', - 'performer' => 'Random', - 'comment' => 'One', - 'added' => ['interface-admin'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 3 => [ - 'logId' => '5678', - 'performer' => 'Random', - 'comment' => 'Two!', - 'added' => ['interface-admin'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 8 => [ - 'logId' => '5678', - 'performer' => 'Random', - 'comment' => null, - 'added' => [], - 'removed' => ['interface-admin'], - 'grantType' => 'automatic', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - ], - ],[ // Dataset #1: Impossible logs - [ - [ // removal of sysop - 'log_id' => '1234', - 'log_timestamp' => '0', - 'log_params' => "sysop\n", - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => '...', - 'type' => 'local', - 'log_deleted' => 0, - ], - ], - true, - [ - [ - 'logId' => '1234', - 'performer' => 'Random', - 'comment' => '...', - 'added' => [], - 'removed' => ['sysop'], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - ], - ], [ // Dataset #2: everything revdeleted - [ - [ // removal of sysop - 'log_id' => '1234', - 'log_timestamp' => '0', - 'log_params' => null, - 'log_action' => 'rights', - 'performer' => null, - 'log_comment' => null, - 'type' => 'local', - 'log_deleted' => 7, - ], - ], - false, - [ - 0 => [ - 'logId' => '1234', - 'performer' => null, - 'comment' => null, - 'added' => [], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => true, - 'commentDeleted' => true, - 'performerDeleted' => true, - ], - ], - ], [ // Dataset #3: (none)s to splice out - [ - [ // none in old - 'log_id' => '1234', - 'log_timestamp' => '0', - 'log_params' => "(none)\nsysop", - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => '...', - 'type' => 'local', - 'log_deleted' => 0, - ], - [ // none in new - 'log_id' => '5678', - 'log_timestamp' => '1', - 'log_params' => "sysop\n(none)", - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => '...', - 'type' => 'local', - 'log_deleted' => 0, - ], - ], - false, - [ - 0 => [ - 'logId' => '1234', - 'performer' => 'Random', - 'comment' => '...', - 'added' => ['sysop'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 1 => [ - 'logId' => '5678', - 'performer' => 'Random', - 'comment' => '...', - 'added' => [], - 'removed' => ['sysop'], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - ], - ], [ // Dataset #4: removing pending auto removals on manual removal - [ - [ // Temporary intadmin grant until timestamp 4 - 'log_id' => '1234', - 'log_timestamp' => '0', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:0:{}s:12:"5::newgroups";a:1:{i:0;s:15:'. - '"interface-admin";}s:11:"oldmetadata";a:0:{}s:11:"newmetadata";a:1:{i:0;a:1:'. - '{s:6:"expiry";s:1:"8";}}}', - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => 'One', - 'type' => 'local', - 'log_deleted' => 0, - ], - [ // One second before, removed manually - 'log_id' => '5678', - 'log_timestamp' => '3', - 'log_params' => 'a:4:{s:12:"4::oldgroups";a:1:{i:0;s:15:"interface-admin";}s:12:"5::newgroups";'. - 'a:0:{}s:11:"oldmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"4";}}s:11:"newmetadata";a:0:{}}', - 'log_action' => 'rights', - 'performer' => 'Random', - 'log_comment' => 'Two!', - 'type' => 'local', - 'log_deleted' => 0, - ], - ], - false, - [ - 0 => [ - 'logId' => '1234', - 'performer' => 'Random', - 'comment' => 'One', - 'added' => ['interface-admin'], - 'removed' => [], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - 3 => [ - 'logId' => '5678', - 'performer' => 'Random', - 'comment' => 'Two!', - 'added' => [], - 'removed' => ['interface-admin'], - 'grantType' => 'manual', - 'type' => 'local', - 'paramsDeleted' => false, - 'commentDeleted' => false, - 'performerDeleted' => false, - ], - ], - ]]; - } + public function edgeCaseProvider(): array { + return [ [ // Dataset #0: Expiry modification + [ + [ // Temporary intadmin grant until timestamp 4 + 'log_id' => '1234', + 'log_timestamp' => '0', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:0:{}s:12:"5::newgroups";a:1:{i:0;s:15:' . + '"interface-admin";}s:11:"oldmetadata";a:0:{}s:11:"newmetadata";a:1:{i:0;a:1:' . + '{s:6:"expiry";s:1:"8";}}}', + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => 'One', + 'type' => 'local', + 'log_deleted' => 0, + ], + [ // One second before, extended until 8 + 'log_id' => '5678', + 'log_timestamp' => '3', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:1:{i:0;s:15:"interface-admin";}s:12:"5::newgroups";' . + 'a:1:{i:0;s:15:"interface-admin";}s:11:"oldmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"4";}}s:' . + '11:"newmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"8";}}}', + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => 'Two!', + 'type' => 'local', + 'log_deleted' => 0, + ], + ], + false, + [ + 0 => [ + 'logId' => '1234', + 'performer' => 'Random', + 'comment' => 'One', + 'added' => [ 'interface-admin' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 3 => [ + 'logId' => '5678', + 'performer' => 'Random', + 'comment' => 'Two!', + 'added' => [ 'interface-admin' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 8 => [ + 'logId' => '5678', + 'performer' => 'Random', + 'comment' => null, + 'added' => [], + 'removed' => [ 'interface-admin' ], + 'grantType' => 'automatic', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + ], + ], [ // Dataset #1: Impossible logs + [ + [ // removal of sysop + 'log_id' => '1234', + 'log_timestamp' => '0', + 'log_params' => "sysop\n", + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => '...', + 'type' => 'local', + 'log_deleted' => 0, + ], + ], + true, + [ + [ + 'logId' => '1234', + 'performer' => 'Random', + 'comment' => '...', + 'added' => [], + 'removed' => [ 'sysop' ], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + ], + ], [ // Dataset #2: everything revdeleted + [ + [ // removal of sysop + 'log_id' => '1234', + 'log_timestamp' => '0', + 'log_params' => null, + 'log_action' => 'rights', + 'performer' => null, + 'log_comment' => null, + 'type' => 'local', + 'log_deleted' => 7, + ], + ], + false, + [ + 0 => [ + 'logId' => '1234', + 'performer' => null, + 'comment' => null, + 'added' => [], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => true, + 'commentDeleted' => true, + 'performerDeleted' => true, + ], + ], + ], [ // Dataset #3: (none)s to splice out + [ + [ // none in old + 'log_id' => '1234', + 'log_timestamp' => '0', + 'log_params' => "(none)\nsysop", + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => '...', + 'type' => 'local', + 'log_deleted' => 0, + ], + [ // none in new + 'log_id' => '5678', + 'log_timestamp' => '1', + 'log_params' => "sysop\n(none)", + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => '...', + 'type' => 'local', + 'log_deleted' => 0, + ], + ], + false, + [ + 0 => [ + 'logId' => '1234', + 'performer' => 'Random', + 'comment' => '...', + 'added' => [ 'sysop' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 1 => [ + 'logId' => '5678', + 'performer' => 'Random', + 'comment' => '...', + 'added' => [], + 'removed' => [ 'sysop' ], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + ], + ], [ // Dataset #4: removing pending auto removals on manual removal + [ + [ // Temporary intadmin grant until timestamp 4 + 'log_id' => '1234', + 'log_timestamp' => '0', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:0:{}s:12:"5::newgroups";a:1:{i:0;s:15:' . + '"interface-admin";}s:11:"oldmetadata";a:0:{}s:11:"newmetadata";a:1:{i:0;a:1:' . + '{s:6:"expiry";s:1:"8";}}}', + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => 'One', + 'type' => 'local', + 'log_deleted' => 0, + ], + [ // One second before, removed manually + 'log_id' => '5678', + 'log_timestamp' => '3', + 'log_params' => 'a:4:{s:12:"4::oldgroups";a:1:{i:0;s:15:"interface-admin";}s:12:"5::newgroups";' . + 'a:0:{}s:11:"oldmetadata";a:1:{i:0;a:1:{s:6:"expiry";s:1:"4";}}s:11:"newmetadata";a:0:{}}', + 'log_action' => 'rights', + 'performer' => 'Random', + 'log_comment' => 'Two!', + 'type' => 'local', + 'log_deleted' => 0, + ], + ], + false, + [ + 0 => [ + 'logId' => '1234', + 'performer' => 'Random', + 'comment' => 'One', + 'added' => [ 'interface-admin' ], + 'removed' => [], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + 3 => [ + 'logId' => '5678', + 'performer' => 'Random', + 'comment' => 'Two!', + 'added' => [], + 'removed' => [ 'interface-admin' ], + 'grantType' => 'manual', + 'type' => 'local', + 'paramsDeleted' => false, + 'commentDeleted' => false, + 'performerDeleted' => false, + ], + ], + ] ]; + } - /** - * Admin status - * @dataProvider adminStatusProvider - * @param array $currentRights - * @param array $rightsChanges - * @param string|bool $adminStatus - */ - public function testAdminStatus( - array $currentRights, - array $rightsChanges, - $adminStatus - ): void { - $user = $this->createMock(User::class); - $user->expects(static::once()) - ->method('getUserRights') - ->willReturn($currentRights); - $this->userRightsRepo->expects(static::once()) - ->method('getRightsChanges') - ->willReturn($rightsChanges); - $userRights = new UserRights($this->userRightsRepo, $this->project, $user, $this->i18n); - static::assertEquals($adminStatus, $userRights->getAdminStatus()); - } + /** + * Admin status + * @dataProvider adminStatusProvider + * @param array $currentRights + * @param array $rightsChanges + * @param string|bool $adminStatus + */ + public function testAdminStatus( + array $currentRights, + array $rightsChanges, + $adminStatus + ): void { + $user = $this->createMock( User::class ); + $user->expects( static::once() ) + ->method( 'getUserRights' ) + ->willReturn( $currentRights ); + $this->userRightsRepo->expects( static::once() ) + ->method( 'getRightsChanges' ) + ->willReturn( $rightsChanges ); + $userRights = new UserRights( $this->userRightsRepo, $this->project, $user, $this->i18n ); + static::assertEquals( $adminStatus, $userRights->getAdminStatus() ); + } - public function adminStatusProvider(): array - { - return [ - [ - ['sysop'], - [], - 'current', - ], - [ - [], - [ - [ - 'log_timestamp' => 0, - 'log_action' => '', - 'log_id' => 3, - 'log_params' => "\nsysop", - 'log_comment' => null, - 'performer' => 'Ghost', - 'type' => '', - 'log_deleted' => 2, - ], - [ - 'log_timestamp' => 1, - 'log_action' => '', - 'log_id' => 4, - 'log_params' => "sysop\n", - 'log_comment' => null, - 'performer' => 'Ghost', - 'type' => '', - 'log_deleted' => 2, - ], - ], - 'former', - ], - [ - [], - [], - false, - ], - ]; - } + public function adminStatusProvider(): array { + return [ + [ + [ 'sysop' ], + [], + 'current', + ], + [ + [], + [ + [ + 'log_timestamp' => 0, + 'log_action' => '', + 'log_id' => 3, + 'log_params' => "\nsysop", + 'log_comment' => null, + 'performer' => 'Ghost', + 'type' => '', + 'log_deleted' => 2, + ], + [ + 'log_timestamp' => 1, + 'log_action' => '', + 'log_id' => 4, + 'log_params' => "sysop\n", + 'log_comment' => null, + 'performer' => 'Ghost', + 'type' => '', + 'log_deleted' => 2, + ], + ], + 'former', + ], + [ + [], + [], + false, + ], + ]; + } - /** - * Test autoconfirmed calculations - * @dataProvider autoconfirmedTimestampProvider - * @param bool $isTemp - * @param array|null $thresholds - * @param \DateTime|null $regDate - * @param int $editsByAcDate - * @param \DateTime|false $nthEditTimestamp - * @param \DateTime|false $resTimestamp - */ - public function testAutoconfirmedTimestamp( - bool $isTemp, - ?array $thresholds, - $regDate, - int $editsByAcDate, - $nthEditTimestamp, - $resTimestamp - ): void { - $user = $this->createMock(User::class); - $user->expects(static::once()) - ->method('isTemp') - ->willReturn($isTemp); - $this->userRightsRepo->expects(static::any()) - ->method('getAutoconfirmedAgeAndCount') - ->willReturn($thresholds); - $user->expects(static::any()) - ->method('getRegistrationDate') - ->willReturn($regDate); - $this->userRightsRepo->expects(static::any()) - ->method('getNumEditsByTimestamp') - ->willReturn($editsByAcDate); - $this->userRightsRepo->expects(static::any()) - ->method('getNthEditTimestamp') - ->willReturn($nthEditTimestamp); - $userRights = new UserRights($this->userRightsRepo, $this->project, $user, $this->i18n); - static::assertEquals($resTimestamp, $userRights->getAutoconfirmedTimestamp()); - } + /** + * Test autoconfirmed calculations + * @dataProvider autoconfirmedTimestampProvider + * @param bool $isTemp + * @param array|null $thresholds + * @param \DateTime|null $regDate + * @param int $editsByAcDate + * @param \DateTime|false $nthEditTimestamp + * @param \DateTime|false $resTimestamp + */ + public function testAutoconfirmedTimestamp( + bool $isTemp, + ?array $thresholds, + $regDate, + int $editsByAcDate, + $nthEditTimestamp, + $resTimestamp + ): void { + $user = $this->createMock( User::class ); + $user->expects( static::once() ) + ->method( 'isTemp' ) + ->willReturn( $isTemp ); + $this->userRightsRepo->expects( static::any() ) + ->method( 'getAutoconfirmedAgeAndCount' ) + ->willReturn( $thresholds ); + $user->expects( static::any() ) + ->method( 'getRegistrationDate' ) + ->willReturn( $regDate ); + $this->userRightsRepo->expects( static::any() ) + ->method( 'getNumEditsByTimestamp' ) + ->willReturn( $editsByAcDate ); + $this->userRightsRepo->expects( static::any() ) + ->method( 'getNthEditTimestamp' ) + ->willReturn( $nthEditTimestamp ); + $userRights = new UserRights( $this->userRightsRepo, $this->project, $user, $this->i18n ); + static::assertEquals( $resTimestamp, $userRights->getAutoconfirmedTimestamp() ); + } - public function autoconfirmedTimestampProvider(): array - { - $stamp = fn($s) => strval(20250101000000+$s); - $time = fn($s) => new \DateTime($stamp($s)); - return [ - // Dataset #0: temporary used - [true, null, null, 3, $time(2), false], - // Dataset #1: null thresholds - [false, null, null, 3, $time(2), false], - // Dataset #2: null registration date - [false, ['wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2], null, 3, $time(2), false], - // Dataset #3: got the required edits before required age - [false, ['wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2], $time(0), 3, $time(2), $stamp(4)], - // Dataset #4: got the required edits after required age - [false, ['wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2], $time(0), 1, $time(6), $stamp(6)], - // Dataset #5: never got the required edits - [false, ['wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2], $time(0), 1, false, false], - ]; - } + public function autoconfirmedTimestampProvider(): array { + $stamp = static fn ( $s ) => strval( 20250101000000 + $s ); + $time = static fn ( $s ) => new \DateTime( $stamp( $s ) ); + return [ + // Dataset #0: temporary used + [ true, null, null, 3, $time( 2 ), false ], + // Dataset #1: null thresholds + [ false, null, null, 3, $time( 2 ), false ], + // Dataset #2: null registration date + [ false, [ 'wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2 ], null, 3, $time( 2 ), false ], + // Dataset #3: got the required edits before required age + [ false, [ 'wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2 ], $time( 0 ), 3, $time( 2 ), $stamp( 4 ) ], + // Dataset #4: got the required edits after required age + [ false, [ 'wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2 ], $time( 0 ), 1, $time( 6 ), $stamp( 6 ) ], + // Dataset #5: never got the required edits + [ false, [ 'wgAutoConfirmAge' => 4, 'wgAutoConfirmCount' => 2 ], $time( 0 ), 1, false, false ], + ]; + } } diff --git a/tests/Model/UserTest.php b/tests/Model/UserTest.php index 375824403..85c15361d 100644 --- a/tests/Model/UserTest.php +++ b/tests/Model/UserTest.php @@ -1,6 +1,6 @@ userRepo = $this->createMock(UserRepository::class); - } - - /** - * A username should be given an initial capital letter in all cases. - */ - public function testUsernameHasInitialCapital(): void - { - $user = new User($this->userRepo, 'lowercasename'); - static::assertEquals('Lowercasename', $user->getUsername()); - static::assertEquals(md5('Lowercasename'), $user->getCacheKey()); - $user2 = new User($this->userRepo, 'UPPERCASENAME'); - static::assertEquals('UPPERCASENAME', $user2->getUsername()); - } - - /** - * A user has an integer identifier on a project (and this can differ from project - * to project). - */ - public function testUserHasIdOnProject(): void - { - // Set up stub user and project repositories. - $this->userRepo->expects($this->exactly(2)) - ->method('getIdAndRegistration') - ->willReturn([ - 'userId' => 12, - 'regDate' => '20170101000000', - ]); - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects($this->once()) - ->method('getOne') - ->willReturn(['dbname' => 'testWiki']); - - // Make sure the user has the correct ID. - $user = new User($this->userRepo, 'TestUser'); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - static::assertEquals(12, $user->getId($project)); - static::assertTrue($user->existsOnProject($project)); - } - - /** - * Is a user an admin on a given project? - * @dataProvider isAdminProvider - * @param string $username The username. - * @param string[] $groups The groups to test. - * @param bool $isAdmin The desired result. - */ - public function testIsAdmin(string $username, array $groups, bool $isAdmin): void - { - $this->userRepo->expects($this->once()) - ->method('getUserRights') - ->willReturn($groups); - $user = new User($this->userRepo, $username); - static::assertEquals($isAdmin, $user->isAdmin(new Project('testWiki'))); - } - - /** - * Data for self::testIsAdmin(). - * @return string[] - */ - public function isAdminProvider(): array - { - return [ - ['AdminUser', ['sysop', 'autopatrolled'], true], - ['NormalUser', ['autopatrolled'], false], - ]; - } - - /** - * Get the expiry of the current block of a user on a given project - */ - public function testCountActiveBlocks(): void - { - $this->userRepo->expects($this->once()) - ->method('countActiveBlocks') - ->willReturn(5); - $user = new User($this->userRepo, 'TestUser'); - - $projectRepo = $this->createMock(ProjectRepository::class); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - - static::assertEquals(5, $user->countActiveBlocks($project)); - } - - /** - * Is the user currently blocked on a given project? - */ - public function testIsBlocked(): void - { - $this->userRepo->expects($this->once()) - ->method('countActiveBlocks') - ->willReturn(1); - $user = new User($this->userRepo, 'TestUser'); - - $projectRepo = $this->createMock(ProjectRepository::class); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - - static::assertEquals(true, $user->isBlocked($project)); - } - - /** - * Registration date of the user - */ - public function testRegistrationDate(): void - { - $this->userRepo->expects($this->once()) - ->method('getIdAndRegistration') - ->willReturn([ - 'userId' => 12, - 'regDate' => '20170101000000', - ]); - $user = new User($this->userRepo, 'TestUser'); - - $projectRepo = $this->createMock(ProjectRepository::class); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - - $regDateTime = new DateTime('2017-01-01 00:00:00'); - static::assertEquals($regDateTime, $user->getRegistrationDate($project)); - } - - /** - * System edit count. - */ - public function testEditCount(): void - { - $this->userRepo->expects(static::once()) - ->method('getEditCount') - ->willReturn(12345); - $user = new User($this->userRepo, 'TestUser'); - - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects($this->once()) - ->method('getOne') - ->willReturn(['url' => 'https://wiki.example.org']); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - - static::assertEquals(12345, $user->getEditCount($project)); - - // Should not call UserRepository::getEditCount() again. - static::assertEquals(12345, $user->getEditCount($project)); - } - - /** - * Too many edits to process? - */ - public function testHasTooManyEdits(): void - { - $this->userRepo->expects($this->once()) - ->method('getEditCount') - ->willReturn(123456789); - $this->userRepo->expects($this->exactly(3)) - ->method('maxEdits') - ->willReturn(250000); - $this->userRepo->expects(static::once()) - ->method('numEditsRequiringLogin') - ->willReturn(12344); - $user = new User($this->userRepo, 'TestUser'); - - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->expects($this->once()) - ->method('getOne') - ->willReturn(['url' => 'https://wiki.example.org']); - $project = new Project('wiki.example.org'); - $project->setRepository($projectRepo); - - // User::maxEdits() - static::assertEquals(250000, $user->maxEdits()); - - // User::tooManyEdits() - static::assertTrue($user->hasTooManyEdits($project)); - - // User:hasManyEdits() - static::assertTrue($user->hasManyEdits($project)); - } - - /** - * IP-related functionality and methods. - */ - public function testIpMethods(): void - { - $user = new User($this->userRepo, '192.168.0.0'); - static::assertTrue($user->isIP()); - static::assertFalse($user->isIpRange()); - static::assertFalse($user->isIPv6()); - static::assertEquals('192.168.0.0', $user->getUsernameIdent()); - static::assertTrue($user->isAnon($this->createMock(Project::class))); // should not call any Project methods - - $user = new User($this->userRepo, '74.24.52.13/20'); - static::assertTrue($user->isIP()); - static::assertTrue($user->isQueryableRange()); - static::assertEquals('ipr-74.24.52.13/20', $user->getUsernameIdent()); - - $user = new User($this->userRepo, '2600:387:0:80d::b0'); - static::assertTrue($user->isIP()); - static::assertTrue($user->isIPv6()); - static::assertFalse($user->isIpRange()); - static::assertEquals('2600:387:0:80D:0:0:0:B0', $user->getUsername()); - static::assertEquals('2600:387:0:80D:0:0:0:B0', $user->getUsernameIdent()); - - // Using 'ipr-' prefix, which should only apply in routing. - $user = new User($this->userRepo, 'ipr-2001:DB8::/32'); - static::assertTrue($user->isIP()); - static::assertTrue($user->isIPv6()); - static::assertTrue($user->isIpRange()); - static::assertTrue($user->isQueryableRange()); - static::assertEquals('2001:DB8:0:0:0:0:0:0/32', $user->getUsername()); - static::assertEquals('2001:db8::/32', $user->getPrettyUsername()); - static::assertEquals('ipr-2001:DB8:0:0:0:0:0:0/32', $user->getUsernameIdent()); - - $user = new User($this->userRepo, '2001:db8::/31'); - static::assertTrue($user->isIpRange()); - static::assertFalse($user->isQueryableRange()); - - $user = new User($this->userRepo, 'Test'); - static::assertFalse($user->isIP()); - static::assertFalse($user->isIpRange()); - static::assertEquals('Test', $user->getPrettyUsername()); - } - - public function testGetIpSubstringFromCidr(): void - { - $user = new User($this->userRepo, '2001:db8:abc:1400::/54'); - static::assertEquals('2001:DB8:ABC:1', $user->getIpSubstringFromCidr()); - - $user = new User($this->userRepo, '174.197.128.0/18'); - static::assertEquals('174.197.1', $user->getIpSubstringFromCidr()); - - $user = new User($this->userRepo, '174.197.128.0'); - static::assertEquals(null, $user->getIpSubstringFromCidr()); - } - - public function testIsQueryableRange(): void - { - $user = new User($this->userRepo, '2001:db8:abc:1400::/54'); - static::assertTrue($user->isQueryableRange()); - - $user = new User($this->userRepo, '2001:db8:abc:1400::/5'); - static::assertFalse($user->isQueryableRange()); - - $user = new User($this->userRepo, '2001:db8:abc:1400'); - static::assertTrue($user->isQueryableRange()); - } - - /** - * From Core's PatternTest https://w.wiki/BZQH (GPL-2.0-or-later) - * @dataProvider provideIsTempUsername - * @param bool $hasTemp - * @param string $stringPattern - * @param string $name - * @param bool $expected - * @return void - */ - public function testIsTemp(bool $hasTemp, string $stringPattern, string $name, bool $expected): void - { - $project = $this->createMock(Project::class); - $project->expects(static::once()) - ->method('hasTempAccounts') - ->willReturn($hasTemp); - $project->expects($hasTemp ? static::once() : static::never()) - ->method('getTempAccountPatterns') - ->willReturn([$stringPattern]); - $user = new User($this->userRepo, $name); - try { - static::assertSame($expected, $user->isTemp($project)); - // Check that if the pattern is invalid we errored - static::assertStringContainsString('$1', $stringPattern); - } catch (UnexpectedValueException $e) { - // Check that we get here only if the pattern is invalid - static::assertStringNotContainsString('$1', $stringPattern); - } - } - - /** - * From Core's PatternTest https://w.wiki/BZQH (GPL-2.0-or-later) - */ - public static function provideIsTempUsername(): array - { - return [ - 'prefix mismatch' => [ - 'hasTemp' => true, - 'pattern' => '*$1', - 'name' => 'Test', - 'expected' => false, - ], - 'prefix match' => [ - 'hasTemp' => true, - 'pattern' => '*$1', - 'name' => '*Some user', - 'expected' => true, - ], - 'suffix only match' => [ - 'hasTemp' => true, - 'pattern' => '$1*', - 'name' => 'Some user*', - 'expected' => true, - ], - 'suffix only mismatch' => [ - 'hasTemp' => true, - 'pattern' => '$1*', - 'name' => 'Some user', - 'expected' => false, - ], - 'prefix and suffix match' => [ - 'hasTemp' => true, - 'pattern' => '*$1*', - 'name' => '*Unregistered 123*', - 'expected' => true, - ], - 'prefix and suffix mismatch' => [ - 'hasTemp' => true, - 'pattern' => '*$1*', - 'name' => 'Unregistered 123*', - 'expected' => false, - ], - 'prefix and suffix zero length match' => [ - 'hasTemp' => true, - 'pattern' => '*$1*', - 'name' => '**', - 'expected' => true, - ], - 'prefix and suffix overlapping' => [ - 'hasTemp' => true, - 'pattern' => '*$1*', - 'name' => '*', - 'expected' => false, - ], - 'no temp accounts' => [ - 'hasTemp' => false, - 'pattern' => '*$1*', - 'name' => '**', - 'expected' => false, - ], - 'invalid pattern' => [ - 'hasTemp' => true, - 'pattern' => '', - 'nam' => '*', - 'expected' => false, - ], - ]; - } - - /** - * Test identification logic - * @dataProvider isCurrentlyLoggedInProvider - * @param Stub $userInfo - * @param bool $expected - */ - public function testIsCurrentlyLoggedIn(Stub $userInfo, bool $expected): void - { - $this->userRepo->expects(static::once()) - ->method('getXtoolsUserInfo') - ->will($userInfo); - $user = new User($this->userRepo, 'Foo'); - static::assertEquals($expected, $user->isCurrentlyLoggedIn()); - } - - public function isCurrentlyLoggedInProvider(): array - { - return [ - 'not_logged_in' => [ - $this->throwException(new Exception('')), - false, - ], - 'malformed_ident' => [ - $this->returnValue((object)[]), - false, - ], - 'wrong_user' => [ - $this->returnValue((object)['username' => 'Bar']), - false, - ], - 'right_user' => [ - $this->returnValue((object)['username' => 'Foo']), - true, - ], - ]; - } +class UserTest extends TestAdapter { + protected UserRepository $userRepo; + + public function setUp(): void { + $this->userRepo = $this->createMock( UserRepository::class ); + } + + /** + * A username should be given an initial capital letter in all cases. + */ + public function testUsernameHasInitialCapital(): void { + $user = new User( $this->userRepo, 'lowercasename' ); + static::assertEquals( 'Lowercasename', $user->getUsername() ); + static::assertEquals( md5( 'Lowercasename' ), $user->getCacheKey() ); + $user2 = new User( $this->userRepo, 'UPPERCASENAME' ); + static::assertEquals( 'UPPERCASENAME', $user2->getUsername() ); + } + + /** + * A user has an integer identifier on a project (and this can differ from project + * to project). + */ + public function testUserHasIdOnProject(): void { + // Set up stub user and project repositories. + $this->userRepo->expects( $this->exactly( 2 ) ) + ->method( 'getIdAndRegistration' ) + ->willReturn( [ + 'userId' => 12, + 'regDate' => '20170101000000', + ] ); + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( $this->once() ) + ->method( 'getOne' ) + ->willReturn( [ 'dbname' => 'testWiki' ] ); + + // Make sure the user has the correct ID. + $user = new User( $this->userRepo, 'TestUser' ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + static::assertEquals( 12, $user->getId( $project ) ); + static::assertTrue( $user->existsOnProject( $project ) ); + } + + /** + * Is a user an admin on a given project? + * @dataProvider isAdminProvider + * @param string $username The username. + * @param string[] $groups The groups to test. + * @param bool $isAdmin The desired result. + */ + public function testIsAdmin( string $username, array $groups, bool $isAdmin ): void { + $this->userRepo->expects( $this->once() ) + ->method( 'getUserRights' ) + ->willReturn( $groups ); + $user = new User( $this->userRepo, $username ); + static::assertEquals( $isAdmin, $user->isAdmin( new Project( 'testWiki' ) ) ); + } + + /** + * Data for self::testIsAdmin(). + * @return string[] + */ + public function isAdminProvider(): array { + return [ + [ 'AdminUser', [ 'sysop', 'autopatrolled' ], true ], + [ 'NormalUser', [ 'autopatrolled' ], false ], + ]; + } + + /** + * Get the expiry of the current block of a user on a given project + */ + public function testCountActiveBlocks(): void { + $this->userRepo->expects( $this->once() ) + ->method( 'countActiveBlocks' ) + ->willReturn( 5 ); + $user = new User( $this->userRepo, 'TestUser' ); + + $projectRepo = $this->createMock( ProjectRepository::class ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + + static::assertEquals( 5, $user->countActiveBlocks( $project ) ); + } + + /** + * Is the user currently blocked on a given project? + */ + public function testIsBlocked(): void { + $this->userRepo->expects( $this->once() ) + ->method( 'countActiveBlocks' ) + ->willReturn( 1 ); + $user = new User( $this->userRepo, 'TestUser' ); + + $projectRepo = $this->createMock( ProjectRepository::class ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + + static::assertTrue( $user->isBlocked( $project ) ); + } + + /** + * Registration date of the user + */ + public function testRegistrationDate(): void { + $this->userRepo->expects( $this->once() ) + ->method( 'getIdAndRegistration' ) + ->willReturn( [ + 'userId' => 12, + 'regDate' => '20170101000000', + ] ); + $user = new User( $this->userRepo, 'TestUser' ); + + $projectRepo = $this->createMock( ProjectRepository::class ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + + $regDateTime = new DateTime( '2017-01-01 00:00:00' ); + static::assertEquals( $regDateTime, $user->getRegistrationDate( $project ) ); + } + + /** + * System edit count. + */ + public function testEditCount(): void { + $this->userRepo->expects( static::once() ) + ->method( 'getEditCount' ) + ->willReturn( 12345 ); + $user = new User( $this->userRepo, 'TestUser' ); + + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( $this->once() ) + ->method( 'getOne' ) + ->willReturn( [ 'url' => 'https://wiki.example.org' ] ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + + static::assertEquals( 12345, $user->getEditCount( $project ) ); + + // Should not call UserRepository::getEditCount() again. + static::assertEquals( 12345, $user->getEditCount( $project ) ); + } + + /** + * Too many edits to process? + */ + public function testHasTooManyEdits(): void { + $this->userRepo->expects( $this->once() ) + ->method( 'getEditCount' ) + ->willReturn( 123456789 ); + $this->userRepo->expects( $this->exactly( 3 ) ) + ->method( 'maxEdits' ) + ->willReturn( 250000 ); + $this->userRepo->expects( static::once() ) + ->method( 'numEditsRequiringLogin' ) + ->willReturn( 12344 ); + $user = new User( $this->userRepo, 'TestUser' ); + + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->expects( $this->once() ) + ->method( 'getOne' ) + ->willReturn( [ 'url' => 'https://wiki.example.org' ] ); + $project = new Project( 'wiki.example.org' ); + $project->setRepository( $projectRepo ); + + // User::maxEdits() + static::assertEquals( 250000, $user->maxEdits() ); + + // User::tooManyEdits() + static::assertTrue( $user->hasTooManyEdits( $project ) ); + + // User:hasManyEdits() + static::assertTrue( $user->hasManyEdits( $project ) ); + } + + /** + * IP-related functionality and methods. + */ + public function testIpMethods(): void { + $user = new User( $this->userRepo, '192.168.0.0' ); + static::assertTrue( $user->isIP() ); + static::assertFalse( $user->isIpRange() ); + static::assertFalse( $user->isIPv6() ); + static::assertEquals( '192.168.0.0', $user->getUsernameIdent() ); + static::assertTrue( $user->isAnon( $this->createMock( Project::class ) ) ); // should not call any Project methods + + $user = new User( $this->userRepo, '74.24.52.13/20' ); + static::assertTrue( $user->isIP() ); + static::assertTrue( $user->isQueryableRange() ); + static::assertEquals( 'ipr-74.24.52.13/20', $user->getUsernameIdent() ); + + $user = new User( $this->userRepo, '2600:387:0:80d::b0' ); + static::assertTrue( $user->isIP() ); + static::assertTrue( $user->isIPv6() ); + static::assertFalse( $user->isIpRange() ); + static::assertEquals( '2600:387:0:80D:0:0:0:B0', $user->getUsername() ); + static::assertEquals( '2600:387:0:80D:0:0:0:B0', $user->getUsernameIdent() ); + + // Using 'ipr-' prefix, which should only apply in routing. + $user = new User( $this->userRepo, 'ipr-2001:DB8::/32' ); + static::assertTrue( $user->isIP() ); + static::assertTrue( $user->isIPv6() ); + static::assertTrue( $user->isIpRange() ); + static::assertTrue( $user->isQueryableRange() ); + static::assertEquals( '2001:DB8:0:0:0:0:0:0/32', $user->getUsername() ); + static::assertEquals( '2001:db8::/32', $user->getPrettyUsername() ); + static::assertEquals( 'ipr-2001:DB8:0:0:0:0:0:0/32', $user->getUsernameIdent() ); + + $user = new User( $this->userRepo, '2001:db8::/31' ); + static::assertTrue( $user->isIpRange() ); + static::assertFalse( $user->isQueryableRange() ); + + $user = new User( $this->userRepo, 'Test' ); + static::assertFalse( $user->isIP() ); + static::assertFalse( $user->isIpRange() ); + static::assertEquals( 'Test', $user->getPrettyUsername() ); + } + + public function testGetIpSubstringFromCidr(): void { + $user = new User( $this->userRepo, '2001:db8:abc:1400::/54' ); + static::assertEquals( '2001:DB8:ABC:1', $user->getIpSubstringFromCidr() ); + + $user = new User( $this->userRepo, '174.197.128.0/18' ); + static::assertEquals( '174.197.1', $user->getIpSubstringFromCidr() ); + + $user = new User( $this->userRepo, '174.197.128.0' ); + static::assertNull( $user->getIpSubstringFromCidr() ); + } + + public function testIsQueryableRange(): void { + $user = new User( $this->userRepo, '2001:db8:abc:1400::/54' ); + static::assertTrue( $user->isQueryableRange() ); + + $user = new User( $this->userRepo, '2001:db8:abc:1400::/5' ); + static::assertFalse( $user->isQueryableRange() ); + + $user = new User( $this->userRepo, '2001:db8:abc:1400' ); + static::assertTrue( $user->isQueryableRange() ); + } + + /** + * From Core's PatternTest https://w.wiki/BZQH (GPL-2.0-or-later) + * @dataProvider provideIsTempUsername + * @param bool $hasTemp + * @param string $stringPattern + * @param string $name + * @param bool $expected + * @return void + */ + public function testIsTemp( bool $hasTemp, string $stringPattern, string $name, bool $expected ): void { + $project = $this->createMock( Project::class ); + $project->expects( static::once() ) + ->method( 'hasTempAccounts' ) + ->willReturn( $hasTemp ); + $project->expects( $hasTemp ? static::once() : static::never() ) + ->method( 'getTempAccountPatterns' ) + ->willReturn( [ $stringPattern ] ); + $user = new User( $this->userRepo, $name ); + try { + static::assertSame( $expected, $user->isTemp( $project ) ); + // Check that if the pattern is invalid we errored + static::assertStringContainsString( '$1', $stringPattern ); + } catch ( UnexpectedValueException $e ) { + // Check that we get here only if the pattern is invalid + static::assertStringNotContainsString( '$1', $stringPattern ); + } + } + + /** + * From Core's PatternTest https://w.wiki/BZQH (GPL-2.0-or-later) + */ + public static function provideIsTempUsername(): array { + return [ + 'prefix mismatch' => [ + 'hasTemp' => true, + 'pattern' => '*$1', + 'name' => 'Test', + 'expected' => false, + ], + 'prefix match' => [ + 'hasTemp' => true, + 'pattern' => '*$1', + 'name' => '*Some user', + 'expected' => true, + ], + 'suffix only match' => [ + 'hasTemp' => true, + 'pattern' => '$1*', + 'name' => 'Some user*', + 'expected' => true, + ], + 'suffix only mismatch' => [ + 'hasTemp' => true, + 'pattern' => '$1*', + 'name' => 'Some user', + 'expected' => false, + ], + 'prefix and suffix match' => [ + 'hasTemp' => true, + 'pattern' => '*$1*', + 'name' => '*Unregistered 123*', + 'expected' => true, + ], + 'prefix and suffix mismatch' => [ + 'hasTemp' => true, + 'pattern' => '*$1*', + 'name' => 'Unregistered 123*', + 'expected' => false, + ], + 'prefix and suffix zero length match' => [ + 'hasTemp' => true, + 'pattern' => '*$1*', + 'name' => '**', + 'expected' => true, + ], + 'prefix and suffix overlapping' => [ + 'hasTemp' => true, + 'pattern' => '*$1*', + 'name' => '*', + 'expected' => false, + ], + 'no temp accounts' => [ + 'hasTemp' => false, + 'pattern' => '*$1*', + 'name' => '**', + 'expected' => false, + ], + 'invalid pattern' => [ + 'hasTemp' => true, + 'pattern' => '', + 'nam' => '*', + 'expected' => false, + ], + ]; + } + + /** + * Test identification logic + * @dataProvider isCurrentlyLoggedInProvider + * @param Stub $userInfo + * @param bool $expected + */ + public function testIsCurrentlyLoggedIn( Stub $userInfo, bool $expected ): void { + $this->userRepo->expects( static::once() ) + ->method( 'getXtoolsUserInfo' ) + ->will( $userInfo ); + $user = new User( $this->userRepo, 'Foo' ); + static::assertEquals( $expected, $user->isCurrentlyLoggedIn() ); + } + + public function isCurrentlyLoggedInProvider(): array { + return [ + 'not_logged_in' => [ + $this->throwException( new Exception( '' ) ), + false, + ], + 'malformed_ident' => [ + $this->returnValue( (object)[] ), + false, + ], + 'wrong_user' => [ + $this->returnValue( (object)[ 'username' => 'Bar' ] ), + false, + ], + 'right_user' => [ + $this->returnValue( (object)[ 'username' => 'Foo' ] ), + true, + ], + ]; + } } diff --git a/tests/Repository/RepositoryTest.php b/tests/Repository/RepositoryTest.php index 7f8876957..3059f3d48 100644 --- a/tests/Repository/RepositoryTest.php +++ b/tests/Repository/RepositoryTest.php @@ -1,6 +1,6 @@ repository = static::getContainer()->get(SimpleEditCounterRepository::class); - $this->userRepo = static::getContainer()->get(UserRepository::class); - } + protected function setUp(): void { + static::bootKernel(); + $this->repository = static::getContainer()->get( SimpleEditCounterRepository::class ); + $this->userRepo = static::getContainer()->get( UserRepository::class ); + } - /** - * Test that the table-name transformations are correct. - */ - public function testGetTableName(): void - { - if (static::getContainer()->getParameter('app.is_wmf')) { - // When using Labs. - static::assertEquals('`testwiki_p`.`page`', $this->repository->getTableName('testwiki', 'page')); - static::assertEquals( - '`testwiki_p`.`logging_userindex`', - $this->repository->getTableName('testwiki', 'logging') - ); - } else { - // When using wiki databases directly. - static::assertEquals('`testwiki`.`page`', $this->repository->getTableName('testwiki', 'page')); - static::assertEquals('`testwiki`.`logging`', $this->repository->getTableName('testwiki', 'logging')); - } - } + /** + * Test that the table-name transformations are correct. + */ + public function testGetTableName(): void { + if ( static::getContainer()->getParameter( 'app.is_wmf' ) ) { + // When using Labs. + static::assertEquals( '`testwiki_p`.`page`', $this->repository->getTableName( 'testwiki', 'page' ) ); + static::assertEquals( + '`testwiki_p`.`logging_userindex`', + $this->repository->getTableName( 'testwiki', 'logging' ) + ); + } else { + // When using wiki databases directly. + static::assertEquals( '`testwiki`.`page`', $this->repository->getTableName( 'testwiki', 'page' ) ); + static::assertEquals( '`testwiki`.`logging`', $this->repository->getTableName( 'testwiki', 'logging' ) ); + } + } - /** - * Test getting a unique cache key for a given set of arguments. - */ - public function testCacheKey(): void - { - // Set up example Models that we'll pass to Repository::getCacheKey(). - $project = $this->createMock(Project::class); - $project->method('getCacheKey')->willReturn('enwiki'); - $user = new User($this->userRepo, 'Test user (WMF)'); + /** + * Test getting a unique cache key for a given set of arguments. + */ + public function testCacheKey(): void { + // Set up example Models that we'll pass to Repository::getCacheKey(). + $project = $this->createMock( Project::class ); + $project->method( 'getCacheKey' )->willReturn( 'enwiki' ); + $user = new User( $this->userRepo, 'Test user (WMF)' ); - // Given explicit cache prefix. - static::assertEquals( - 'cachePrefix.enwiki.f475a8ac7f25e162bba0eb1b4b245027.'. - 'a84e19e5268bf01623c8a130883df668.202cb962ac59075b964b07152d234b70', - $this->repository->getCacheKey( - [$project, $user, '20170101', '', null, [1, 2, 3]], - 'cachePrefix' - ) - ); + // Given explicit cache prefix. + static::assertEquals( + 'cachePrefix.enwiki.f475a8ac7f25e162bba0eb1b4b245027.' . + 'a84e19e5268bf01623c8a130883df668.202cb962ac59075b964b07152d234b70', + $this->repository->getCacheKey( + [ $project, $user, '20170101', '', null, [ 1, 2, 3 ] ], + 'cachePrefix' + ) + ); - // It will use the name of the caller, in this case testCacheKey. - static::assertEquals( - // The `false` argument generates the trailing `.` - 'testCacheKey.enwiki.f475a8ac7f25e162bba0eb1b4b245027.' . - 'a84e19e5268bf01623c8a130883df668.d41d8cd98f00b204e9800998ecf8427e', - $this->repository->getCacheKey([$project, $user, '20170101', '', false, null]) - ); + // It will use the name of the caller, in this case testCacheKey. + static::assertEquals( + // The `false` argument generates the trailing `.` + 'testCacheKey.enwiki.f475a8ac7f25e162bba0eb1b4b245027.' . + 'a84e19e5268bf01623c8a130883df668.d41d8cd98f00b204e9800998ecf8427e', + $this->repository->getCacheKey( [ $project, $user, '20170101', '', false, null ] ) + ); - // Single argument, no prefix. - static::assertEquals( - 'testCacheKey.838763cbdc764f1740370a8ee1000c65', - $this->repository->getCacheKey('mycache') - ); - } + // Single argument, no prefix. + static::assertEquals( + 'testCacheKey.838763cbdc764f1740370a8ee1000c65', + $this->repository->getCacheKey( 'mycache' ) + ); + } - /** - * SQL date conditions helper. - */ - public function testDateConditions(): void - { - $start = strtotime('20170101'); - $end = strtotime('20190201'); - $offset = strtotime('20180201235959'); + /** + * SQL date conditions helper. + */ + public function testDateConditions(): void { + $start = strtotime( '20170101' ); + $end = strtotime( '20190201' ); + $offset = strtotime( '20180201235959' ); - static::assertEquals( - " AND alias.rev_timestamp >= '20170101000000' AND alias.rev_timestamp <= '20190201235959'", - $this->repository->getDateConditions($start, $end, false, 'alias.') - ); + static::assertEquals( + " AND alias.rev_timestamp >= '20170101000000' AND alias.rev_timestamp <= '20190201235959'", + $this->repository->getDateConditions( $start, $end, false, 'alias.' ) + ); - static::assertEquals( - " AND rev_timestamp >= '20170101000000' AND rev_timestamp <= '20180201235959'", - $this->repository->getDateConditions($start, $end, $offset) - ); - } + static::assertEquals( + " AND rev_timestamp >= '20170101000000' AND rev_timestamp <= '20180201235959'", + $this->repository->getDateConditions( $start, $end, $offset ) + ); + } } diff --git a/tests/SessionHelper.php b/tests/SessionHelper.php index 2cf509294..8192aa4d0 100644 --- a/tests/SessionHelper.php +++ b/tests/SessionHelper.php @@ -1,6 +1,6 @@ getRequestStack($session); */ -trait SessionHelper -{ - /** - * Create and get a new session object. - * Code courtesy of marien-probesys on GitHub. Unlicensed but used with permission. - * @see https://github.com/symfony/symfony/discussions/45662 - * @param KernelBrowser $client - * @return Session - */ - public function createSession(KernelBrowser $client): Session - { - $container = $client->getContainer(); - $sessionSavePath = $container->getParameter('session.save_path'); - $sessionStorage = new MockFileSessionStorage($sessionSavePath); +trait SessionHelper { + /** + * Create and get a new session object. + * Code courtesy of marien-probesys on GitHub. Unlicensed but used with permission. + * @see https://github.com/symfony/symfony/discussions/45662 + * @param KernelBrowser $client + * @return Session + */ + public function createSession( KernelBrowser $client ): Session { + $container = $client->getContainer(); + $sessionSavePath = $container->getParameter( 'session.save_path' ); + $sessionStorage = new MockFileSessionStorage( $sessionSavePath ); - $session = new Session($sessionStorage); - $session->start(); - $session->save(); + $session = new Session( $sessionStorage ); + $session->start(); + $session->save(); - $sessionCookie = new Cookie( - $session->getName(), - $session->getId(), - null, - null, - 'localhost', - ); - $client->getCookieJar()->set($sessionCookie); + $sessionCookie = new Cookie( + $session->getName(), + $session->getId(), + null, + null, + 'localhost', + ); + $client->getCookieJar()->set( $sessionCookie ); - return $session; - } + return $session; + } - /** - * Get a RequestStack with the Session object set. - * @param Session $session - * @param array $requestParams - * @return RequestStack - */ - public function getRequestStack(Session $session, array $requestParams = []): RequestStack - { - /** @var RequestStack $requestStack */ - $requestStack = static::getContainer()->get('request_stack'); - $request = new Request($requestParams); - $request->setSession($session); - $requestStack->push($request); - return $requestStack; - } + /** + * Get a RequestStack with the Session object set. + * @param Session $session + * @param array $requestParams + * @return RequestStack + */ + public function getRequestStack( Session $session, array $requestParams = [] ): RequestStack { + /** @var RequestStack $requestStack */ + $requestStack = static::getContainer()->get( 'request_stack' ); + $request = new Request( $requestParams ); + $request->setSession( $session ); + $requestStack->push( $request ); + return $requestStack; + } } diff --git a/tests/TestAdapter.php b/tests/TestAdapter.php index 0331f7aa7..3c2486e1c 100644 --- a/tests/TestAdapter.php +++ b/tests/TestAdapter.php @@ -1,6 +1,6 @@ createMock(ProjectRepository::class); - $repo->method('getOne') - ->willReturn([ - 'url' => 'https://test.example.org', - 'dbName' => 'test_wiki', - 'lang' => 'en', - ]); - return $repo; - } + /** + * Get a mocked ProjectRepository with some dummy data. + * @return MockObject|ProjectRepository + */ + public function getProjectRepo(): MockObject { + /** @var MockObject|ProjectRepository $repo */ + $repo = $this->createMock( ProjectRepository::class ); + $repo->method( 'getOne' ) + ->willReturn( [ + 'url' => 'https://test.example.org', + 'dbName' => 'test_wiki', + 'lang' => 'en', + ] ); + return $repo; + } - /** - * Get a Project object for en.wikipedia.org - * @return Project - */ - protected function getMockEnwikiProject(): Project - { - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->method('getOne') - ->willReturn([ - 'url' => 'https://en.wikipedia.org/w/api.php', - ]); - $projectRepo->method('getMetadata') - ->willReturn([ - 'general' => [ - 'mainpage' => 'Main Page', - 'scriptPath' => '/w', - ], - 'tempAccountPatterns' => ['~2$1'], - ]); - $project = new Project('en.wikipedia.org'); - $project->setRepository($projectRepo); - return $project; - } + /** + * Get a Project object for en.wikipedia.org + * @return Project + */ + protected function getMockEnwikiProject(): Project { + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->method( 'getOne' ) + ->willReturn( [ + 'url' => 'https://en.wikipedia.org/w/api.php', + ] ); + $projectRepo->method( 'getMetadata' ) + ->willReturn( [ + 'general' => [ + 'mainpage' => 'Main Page', + 'scriptPath' => '/w', + ], + 'tempAccountPatterns' => [ '~2$1' ], + ] ); + $project = new Project( 'en.wikipedia.org' ); + $project->setRepository( $projectRepo ); + return $project; + } - /** - * Get an AutomatedEditsHelper with the session properly set. - * @param KernelBrowser|null $client - * @return AutomatedEditsHelper - */ - protected function getAutomatedEditsHelper(?KernelBrowser $client = null): AutomatedEditsHelper - { - $client = $client ?? static::createClient(); - $session = $this->createSession($client); - return new AutomatedEditsHelper( - $this->getRequestStack($session), - static::getContainer()->get('cache.app'), - static::getContainer()->get('eight_points_guzzle.client.xtools') - ); - } + /** + * Get an AutomatedEditsHelper with the session properly set. + * @param KernelBrowser|null $client + * @return AutomatedEditsHelper + */ + protected function getAutomatedEditsHelper( ?KernelBrowser $client = null ): AutomatedEditsHelper { + $client = $client ?? static::createClient(); + $session = $this->createSession( $client ); + return new AutomatedEditsHelper( + $this->getRequestStack( $session ), + static::getContainer()->get( 'cache.app' ), + static::getContainer()->get( 'eight_points_guzzle.client.xtools' ) + ); + } } diff --git a/tests/Twig/AppExtensionTest.php b/tests/Twig/AppExtensionTest.php index 3e6f38dc9..f6ec40d94 100644 --- a/tests/Twig/AppExtensionTest.php +++ b/tests/Twig/AppExtensionTest.php @@ -1,6 +1,6 @@ createSession(static::createClient()); - $requestStack = $this->getRequestStack($session); - $i18nHelper = new I18nHelper($requestStack, static::getContainer()->getParameter('kernel.project_dir')); - $urlGenerator = $this->createMock(UrlGenerator::class); - $this->appExtension = new AppExtension( - $requestStack, - $i18nHelper, - $urlGenerator, - $this->createMock(ProjectRepository::class), - static::getContainer()->get('parameter_bag'), - static::getContainer()->getParameter('app.is_wmf'), - static::getContainer()->getParameter('app.single_wiki'), - 30 - ); - } + /** + * Set class instance. + */ + public function setUp(): void { + $session = $this->createSession( static::createClient() ); + $requestStack = $this->getRequestStack( $session ); + $i18nHelper = new I18nHelper( $requestStack, static::getContainer()->getParameter( 'kernel.project_dir' ) ); + $urlGenerator = $this->createMock( UrlGenerator::class ); + $this->appExtension = new AppExtension( + $requestStack, + $i18nHelper, + $urlGenerator, + $this->createMock( ProjectRepository::class ), + static::getContainer()->get( 'parameter_bag' ), + static::getContainer()->getParameter( 'app.is_wmf' ), + static::getContainer()->getParameter( 'app.single_wiki' ), + 30 + ); + } - /** - * Format number as a diff size. - */ - public function testDiffFormat(): void - { - static::assertEquals( - "3,000", - $this->appExtension->diffFormat(3000) - ); - static::assertEquals( - "-20,000", - $this->appExtension->diffFormat(-20000) - ); - static::assertEquals( - "0", - $this->appExtension->diffFormat(0) - ); - static::assertEquals('', $this->appExtension->diffFormat(null)); - } + /** + * Format number as a diff size. + */ + public function testDiffFormat(): void { + static::assertEquals( + "3,000", + $this->appExtension->diffFormat( 3000 ) + ); + static::assertEquals( + "-20,000", + $this->appExtension->diffFormat( -20000 ) + ); + static::assertEquals( + "0", + $this->appExtension->diffFormat( 0 ) + ); + static::assertSame( '', $this->appExtension->diffFormat( null ) ); + } - /** - * Format number as a percentage. - */ - public function testPercentFormat(): void - { - static::assertEquals('45%', $this->appExtension->percentFormat(45)); - static::assertEquals('30%', $this->appExtension->percentFormat(30, null, 3)); - static::assertEquals('33.33%', $this->appExtension->percentFormat(2, 6, 2)); - static::assertEquals('25%', $this->appExtension->percentFormat(2, 8)); - } + /** + * Format number as a percentage. + */ + public function testPercentFormat(): void { + static::assertEquals( '45%', $this->appExtension->percentFormat( 45 ) ); + static::assertEquals( '30%', $this->appExtension->percentFormat( 30, null, 3 ) ); + static::assertEquals( '33.33%', $this->appExtension->percentFormat( 2, 6, 2 ) ); + static::assertEquals( '25%', $this->appExtension->percentFormat( 2, 8 ) ); + } - /** - * Format a time duration as humanized string. - */ - public function testFormatDuration(): void - { - static::assertEquals( - [30, 'num-seconds'], - $this->appExtension->formatDuration(30, false) - ); - static::assertEquals( - [1, 'num-minutes'], - $this->appExtension->formatDuration(70, false) - ); - static::assertEquals( - [50, 'num-minutes'], - $this->appExtension->formatDuration(3000, false) - ); - static::assertEquals( - [2, 'num-hours'], - $this->appExtension->formatDuration(7500, false) - ); - static::assertEquals( - [10, 'num-days'], - $this->appExtension->formatDuration(864000, false) - ); - } + /** + * Format a time duration as humanized string. + */ + public function testFormatDuration(): void { + static::assertEquals( + [ 30, 'num-seconds' ], + $this->appExtension->formatDuration( 30, false ) + ); + static::assertEquals( + [ 1, 'num-minutes' ], + $this->appExtension->formatDuration( 70, false ) + ); + static::assertEquals( + [ 50, 'num-minutes' ], + $this->appExtension->formatDuration( 3000, false ) + ); + static::assertEquals( + [ 2, 'num-hours' ], + $this->appExtension->formatDuration( 7500, false ) + ); + static::assertEquals( + [ 10, 'num-days' ], + $this->appExtension->formatDuration( 864000, false ) + ); + } - /** - * Format a number. - */ - public function testNumberFormat(): void - { - static::assertEquals('1,234', $this->appExtension->numberFormat(1234)); - static::assertEquals('1,234.32', $this->appExtension->numberFormat(1234.316, 2)); - static::assertEquals('50', $this->appExtension->numberFormat(50.0000, 4)); - } + /** + * Format a number. + */ + public function testNumberFormat(): void { + static::assertEquals( '1,234', $this->appExtension->numberFormat( 1234 ) ); + static::assertEquals( '1,234.32', $this->appExtension->numberFormat( 1234.316, 2 ) ); + static::assertSame( '50', $this->appExtension->numberFormat( 50.0000, 4 ) ); + } - /** - * Format a size. - */ - public function testSizeFormat(): void - { - static::assertEquals('12.01 KB', $this->appExtension->sizeFormat(12300)); - static::assertEquals('100', $this->appExtension->sizeFormat(100)); - static::assertEquals('0', $this->appExtension->sizeFormat(0)); - static::assertEquals('1.12 GB', $this->appExtension->sizeFormat(1200300400)); - static::assertEquals('1.09 TB', $this->appExtension->sizeFormat(1200300400500)); - } + /** + * Format a size. + */ + public function testSizeFormat(): void { + static::assertEquals( '12.01 KB', $this->appExtension->sizeFormat( 12300 ) ); + static::assertSame( '100', $this->appExtension->sizeFormat( 100 ) ); + static::assertSame( '0', $this->appExtension->sizeFormat( 0 ) ); + static::assertEquals( '1.12 GB', $this->appExtension->sizeFormat( 1200300400 ) ); + static::assertEquals( '1.09 TB', $this->appExtension->sizeFormat( 1200300400500 ) ); + } - /** - * Intuition methods. - */ - public function testIntution(): void - { - static::assertEquals('en', $this->appExtension->getLang()); - static::assertEquals('English', $this->appExtension->getLangName()); + /** + * Intuition methods. + */ + public function testIntution(): void { + static::assertEquals( 'en', $this->appExtension->getLang() ); + static::assertEquals( 'English', $this->appExtension->getLangName() ); - $allLangs = $this->appExtension->getAllLangs(); + $allLangs = $this->appExtension->getAllLangs(); - // There should be a bunch. - static::assertGreaterThan(20, count($allLangs)); + // There should be a bunch. + static::assertGreaterThan( 20, count( $allLangs ) ); - // Keys should be the language codes, with name as the values. - static::assertArraySubset(['en' => 'English'], $allLangs); - static::assertArraySubset(['de' => 'Deutsch'], $allLangs); - static::assertArraySubset(['es' => 'Español'], $allLangs); + // Keys should be the language codes, with name as the values. + static::assertArraySubset( [ 'en' => 'English' ], $allLangs ); + static::assertArraySubset( [ 'de' => 'Deutsch' ], $allLangs ); + static::assertArraySubset( [ 'es' => 'Español' ], $allLangs ); - // Testing if the language is RTL. - static::assertFalse($this->appExtension->isRTL('en')); - static::assertTrue($this->appExtension->isRTL('ar')); - } + // Testing if the language is RTL. + static::assertFalse( $this->appExtension->isRTL( 'en' ) ); + static::assertTrue( $this->appExtension->isRTL( 'ar' ) ); + } - /** - * Methods that fetch data about the git repository. - */ - public function testGitMethods(): void - { - // This test is mysteriously failing on Scrutinizer, but not on Travis. - // Commenting out for now. - // static::assertEquals(7, strlen($this->appExtension->gitShortHash())); + /** + * Methods that fetch data about the git repository. + */ + public function testGitMethods(): void { + // This test is mysteriously failing on Scrutinizer, but not on Travis. + // Commenting out for now. + // static::assertEquals(7, strlen($this->appExtension->gitShortHash())); - static::assertEquals(40, strlen($this->appExtension->gitHash())); - static::assertMatchesRegularExpression('/\d{4}-\d{2}-\d{2}/', $this->appExtension->gitDate()); - } + static::assertEquals( 40, strlen( $this->appExtension->gitHash() ) ); + static::assertMatchesRegularExpression( '/\d{4}-\d{2}-\d{2}/', $this->appExtension->gitDate() ); + } - /** - * Capitalizing first letter. - */ - public function testCapitalizeFirst(): void - { - static::assertEquals('Foo', $this->appExtension->capitalizeFirst('foo')); - static::assertEquals('Bar', $this->appExtension->capitalizeFirst('Bar')); - } + /** + * Capitalizing first letter. + */ + public function testCapitalizeFirst(): void { + static::assertEquals( 'Foo', $this->appExtension->capitalizeFirst( 'foo' ) ); + static::assertEquals( 'Bar', $this->appExtension->capitalizeFirst( 'Bar' ) ); + } - /** - * Getting amount of time it took to complete the request. - */ - public function testRequestTime(): void - { - static::assertTrue(is_double($this->appExtension->requestMemory())); - } + /** + * Getting amount of time it took to complete the request. + */ + public function testRequestTime(): void { + static::assertTrue( is_float( $this->appExtension->requestMemory() ) ); + } - /** - * Is the given user logged out? - */ - public function testUserIsAnon(): void - { - $userRepo = $this->createMock(UserRepository::class); - $user = new User($userRepo, '68.229.186.65'); - $user2 = new User($userRepo, 'Test user'); - $project = $this->createMock(Project::class); - $project->method('hasTempAccounts') - ->willReturn(true); - $project->method('getTempAccountPatterns') - ->willReturn(['~2$1']); - static::assertTrue($this->appExtension->isUserAnon($project, $user)); - static::assertFalse($this->appExtension->isUserAnon($project, $user2)); + /** + * Is the given user logged out? + */ + public function testUserIsAnon(): void { + $userRepo = $this->createMock( UserRepository::class ); + $user = new User( $userRepo, '68.229.186.65' ); + $user2 = new User( $userRepo, 'Test user' ); + $project = $this->createMock( Project::class ); + $project->method( 'hasTempAccounts' ) + ->willReturn( true ); + $project->method( 'getTempAccountPatterns' ) + ->willReturn( [ '~2$1' ] ); + static::assertTrue( $this->appExtension->isUserAnon( $project, $user ) ); + static::assertFalse( $this->appExtension->isUserAnon( $project, $user2 ) ); - static::assertTrue($this->appExtension->isUserAnon($project, '2605:E000:855A:4B00:3035:523D:F7E9:8F82')); - static::assertFalse($this->appExtension->isUserAnon($project, '192.0.blah.1')); - static::assertTrue($this->appExtension->isUserAnon($project, '~2024-1234')); - } + static::assertTrue( $this->appExtension->isUserAnon( $project, '2605:E000:855A:4B00:3035:523D:F7E9:8F82' ) ); + static::assertFalse( $this->appExtension->isUserAnon( $project, '192.0.blah.1' ) ); + static::assertTrue( $this->appExtension->isUserAnon( $project, '~2024-1234' ) ); + } - /** - * Formatting dates. - */ - public function testDateFormat(): void - { - static::assertEquals( - '2017-01-23 00:00', - $this->appExtension->dateFormat('2017-01-23') - ); - static::assertEquals( - '2017-01-23 00:00', - $this->appExtension->dateFormat(new DateTime('2017-01-23')) - ); - } + /** + * Formatting dates. + */ + public function testDateFormat(): void { + static::assertEquals( + '2017-01-23 00:00', + $this->appExtension->dateFormat( '2017-01-23' ) + ); + static::assertEquals( + '2017-01-23 00:00', + $this->appExtension->dateFormat( new DateTime( '2017-01-23' ) ) + ); + } - /** - * Building URL query string from array. - */ - public function testBuildQuery(): void - { - static::assertEquals( - 'foo=1&bar=2', - $this->appExtension->buildQuery([ - 'foo' => 1, - 'bar' => 2, - ]) - ); - } + /** + * Building URL query string from array. + */ + public function testBuildQuery(): void { + static::assertEquals( + 'foo=1&bar=2', + $this->appExtension->buildQuery( [ + 'foo' => 1, + 'bar' => 2, + ] ) + ); + } - /** - * Getting a normalized page title with the namespace. - */ - public function testTitleWithNs(): void - { - static::assertSame( - 'User talk:Foo bar', - $this->appExtension->titleWithNs('Foo_bar', 3, [ - 3 => 'User talk', - ]) - ); - } + /** + * Getting a normalized page title with the namespace. + */ + public function testTitleWithNs(): void { + static::assertSame( + 'User talk:Foo bar', + $this->appExtension->titleWithNs( 'Foo_bar', 3, [ + 3 => 'User talk', + ] ) + ); + } - /** - * Wikifying a string. - */ - public function testWikify(): void - { - $project = new Project('TestProject'); - $projectRepo = $this->createMock(ProjectRepository::class); - $projectRepo->method('getOne') - ->willReturn([ - 'url' => 'https://test.example.org', - 'dbName' => 'test_wiki', - 'lang' => 'en', - ]); - $projectRepo->method('getMetadata') - ->willReturn([ - 'general' => [ - 'articlePath' => '/wiki/$1', - ], - ]); - $project->setRepository($projectRepo); - $summary = ' [[test page]]'; - static::assertEquals( - "<script>alert(\"XSS baby\")</script> " . - "test page", - $this->appExtension->wikify($summary, $project) - ); - } + /** + * Wikifying a string. + */ + public function testWikify(): void { + $project = new Project( 'TestProject' ); + $projectRepo = $this->createMock( ProjectRepository::class ); + $projectRepo->method( 'getOne' ) + ->willReturn( [ + 'url' => 'https://test.example.org', + 'dbName' => 'test_wiki', + 'lang' => 'en', + ] ); + $projectRepo->method( 'getMetadata' ) + ->willReturn( [ + 'general' => [ + 'articlePath' => '/wiki/$1', + ], + ] ); + $project->setRepository( $projectRepo ); + $summary = ' [[test page]]'; + static::assertEquals( + "<script>alert(\"XSS baby\")</script> " . + "test page", + $this->appExtension->wikify( $summary, $project ) + ); + } } diff --git a/tests/Twig/TopNavExtensionTest.php b/tests/Twig/TopNavExtensionTest.php index 11523286c..76ca8199f 100644 --- a/tests/Twig/TopNavExtensionTest.php +++ b/tests/Twig/TopNavExtensionTest.php @@ -1,6 +1,6 @@ createSession(static::createClient()); - $requestStack = $this->getRequestStack($session); - $i18nHelper = new I18nHelper($requestStack, static::getContainer()->getParameter('kernel.project_dir')); - $this->topNavExtension = new TopNavExtension( - $requestStack, - $i18nHelper, - $this->createMock(UrlGenerator::class), - $this->createMock(ProjectRepository::class), - static::getContainer()->get('parameter_bag'), - static::getContainer()->getParameter('app.is_wmf'), - static::getContainer()->getParameter('app.single_wiki'), - static::getContainer()->getParameter('app.replag_threshold') - ); - } + /** + * Set class instance. + */ + public function setUp(): void { + $session = $this->createSession( static::createClient() ); + $requestStack = $this->getRequestStack( $session ); + $i18nHelper = new I18nHelper( $requestStack, static::getContainer()->getParameter( 'kernel.project_dir' ) ); + $this->topNavExtension = new TopNavExtension( + $requestStack, + $i18nHelper, + $this->createMock( UrlGenerator::class ), + $this->createMock( ProjectRepository::class ), + static::getContainer()->get( 'parameter_bag' ), + static::getContainer()->getParameter( 'app.is_wmf' ), + static::getContainer()->getParameter( 'app.single_wiki' ), + static::getContainer()->getParameter( 'app.replag_threshold' ) + ); + } - /** - * @covers \App\Twig\TopNavExtension::topNavEditCounter() - */ - public function testTopNavEditCounter(): void - { - static::assertEquals([ - 'General statistics', - 'Month counts', - 'Namespace Totals', - 'Rights changes', - 'Time card', - 'Top edited pages', - 'Year counts', - ], array_values($this->topNavExtension->topNavEditCounter())); - } + /** + * @covers \App\Twig\TopNavExtension::topNavEditCounter() + */ + public function testTopNavEditCounter(): void { + static::assertEquals( [ + 'General statistics', + 'Month counts', + 'Namespace Totals', + 'Rights changes', + 'Time card', + 'Top edited pages', + 'Year counts', + ], array_values( $this->topNavExtension->topNavEditCounter() ) ); + } - /** - * @covers \App\Twig\TopNavExtension::topNavUser() - */ - public function testTopNavUser(): void - { - static::assertEquals([ - 'Admin Score', - 'Automated Edits', - 'Category Edits', - 'Edit Counter', - 'Edit Summaries', - 'Global Contributions', - 'Pages Created', - 'Simple Counter', - 'Top Edits', - ], array_values($this->topNavExtension->topNavUser())); - } + /** + * @covers \App\Twig\TopNavExtension::topNavUser() + */ + public function testTopNavUser(): void { + static::assertEquals( [ + 'Admin Score', + 'Automated Edits', + 'Category Edits', + 'Edit Counter', + 'Edit Summaries', + 'Global Contributions', + 'Pages Created', + 'Simple Counter', + 'Top Edits', + ], array_values( $this->topNavExtension->topNavUser() ) ); + } - /** - * @covers \App\Twig\TopNavExtension::topNavPage() - */ - public function testTopNavPage(): void - { - static::assertEquals([ - 'Authorship', - 'Blame', - 'Page History', - ], array_values($this->topNavExtension->topNavPage())); - } + /** + * @covers \App\Twig\TopNavExtension::topNavPage() + */ + public function testTopNavPage(): void { + static::assertEquals( [ + 'Authorship', + 'Blame', + 'Page History', + ], array_values( $this->topNavExtension->topNavPage() ) ); + } - /** - * @covers \App\Twig\TopNavExtension::topNavProject() - */ - public function testTopNavProject(): void - { - static::assertEquals([ - 'Admin Stats', - 'Patroller Stats', - 'Steward Stats', - 'Largest Pages', - ], array_values($this->topNavExtension->topNavProject())); - } + /** + * @covers \App\Twig\TopNavExtension::topNavProject() + */ + public function testTopNavProject(): void { + static::assertEquals( [ + 'Admin Stats', + 'Patroller Stats', + 'Steward Stats', + 'Largest Pages', + ], array_values( $this->topNavExtension->topNavProject() ) ); + } } diff --git a/webpack.config.js b/webpack.config.js index cb7467493..e6bd79d21 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,85 +3,84 @@ const Encore = require('@symfony/webpack-encore'); // Manually configure the runtime environment if not already configured yet by the "encore" command. // It's useful when you use tools that rely on webpack.config.js file. if (!Encore.isRuntimeEnvironmentConfigured()) { - Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); + Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); } Encore - // Directory where compiled assets will be stored. - .setOutputPath('public/build/') + // Directory where compiled assets will be stored. + .setOutputPath('public/build/') - // Public URL path used by the web server to access the output path. - .setPublicPath('/build') + // Public URL path used by the web server to access the output path. + .setPublicPath('/build') - // this is now needed so that your manifest.json keys are still `build/foo.js` - // (which is a file that's used by Symfony's `asset()` function) - .setManifestKeyPrefix('build') + // this is now needed so that your manifest.json keys are still `build/foo.js` + // (which is a file that's used by Symfony's `asset()` function) + .setManifestKeyPrefix('build') - .copyFiles({ - from: './assets/images', - to: 'images/[path][name].[ext]' - }) + .copyFiles({ + from: './assets/images', + to: 'images/[path][name].[ext]' + }) - /* - * ENTRY CONFIG - * - * Add 1 entry for each "page" of your app - * (including one that's included on every page - e.g. "app") - * - * Each entry will result in one JavaScript file (e.g. app.js) - * and one CSS file (e.g. app.css) if you JavaScript imports CSS. - */ - .addEntry('app', [ - // Scripts - './assets/vendor/jquery.i18n/jquery.i18n.dist.js', - './assets/vendor/Chart.min.js', - './assets/vendor/bootstrap-typeahead.js', - './assets/js/common/application.js', - './assets/js/common/contributions-lists.js', - './assets/js/adminstats.js', - './assets/js/pageinfo.js', - './assets/js/authorship.js', - './assets/js/autoedits.js', - './assets/js/blame.js', - './assets/js/categoryedits.js', - './assets/js/editcounter.js', - './assets/js/globalcontribs.js', - './assets/js/pages.js', - './assets/js/topedits.js', + /* + * ENTRY CONFIG + * + * Add 1 entry for each "page" of your app + * (including one that's included on every page - e.g. "app") + * + * Each entry will result in one JavaScript file (e.g. app.js) + * and one CSS file (e.g. app.css) if you JavaScript imports CSS. + */ + .addEntry('app', [ + // Scripts + './assets/vendor/jquery.i18n/jquery.i18n.dist.js', + './assets/vendor/Chart.min.js', + './assets/vendor/bootstrap-typeahead.js', + './assets/js/common/application.js', + './assets/js/common/contributions-lists.js', + './assets/js/adminstats.js', + './assets/js/pageinfo.js', + './assets/js/authorship.js', + './assets/js/autoedits.js', + './assets/js/blame.js', + './assets/js/categoryedits.js', + './assets/js/editcounter.js', + './assets/js/globalcontribs.js', + './assets/js/pages.js', + './assets/js/topedits.js', - // Stylesheets - './assets/css/application.scss', - './assets/css/pageinfo.scss', - './assets/css/autoedits.scss', - './assets/css/blame.scss', - './assets/css/categoryedits.scss', - './assets/css/editcounter.scss', - './assets/css/home.scss', - './assets/css/meta.scss', - './assets/css/pages.scss', - './assets/css/topedits.scss', - './assets/css/responsive.scss' - ]) + // Stylesheets + './assets/css/application.scss', + './assets/css/pageinfo.scss', + './assets/css/autoedits.scss', + './assets/css/blame.scss', + './assets/css/categoryedits.scss', + './assets/css/editcounter.scss', + './assets/css/home.scss', + './assets/css/meta.scss', + './assets/css/pages.scss', + './assets/css/topedits.scss', + './assets/css/responsive.scss' + ]) - // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. - .splitEntryChunks() + // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. + .splitEntryChunks() - // will require an extra script tag for runtime.js - // but, you probably want this, unless you're building a single-page app - .enableSingleRuntimeChunk() + // will require an extra script tag for runtime.js + // but, you probably want this, unless you're building a single-page app + .enableSingleRuntimeChunk() - // Other options. - .enableSassLoader() - .cleanupOutputBeforeBuild() - .enableBuildNotifications() - .enableSourceMaps(!Encore.isProduction()) - .enableVersioning(Encore.isProduction()) + // Other options. + .enableSassLoader() + .cleanupOutputBeforeBuild() + .enableBuildNotifications() + .enableSourceMaps(!Encore.isProduction()) + .enableVersioning(Encore.isProduction()) - // enables @babel/preset-env polyfills - .configureBabelPresetEnv((config) => { - config.useBuiltIns = 'usage'; - config.corejs = 3; - }) -; + // enables @babel/preset-env polyfills + .configureBabelPresetEnv((config) => { + config.useBuiltIns = 'usage'; + config.corejs = 3; + }); module.exports = Encore.getWebpackConfig(); From cf4a78c099d31c8603b5ae38bccff70b8c65bd2e Mon Sep 17 00:00:00 2001 From: alien4444 Date: Sat, 10 Jan 2026 14:16:45 +0100 Subject: [PATCH 60/60] fix pages query by removing distinct --- src/Repository/PagesRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/PagesRepository.php b/src/Repository/PagesRepository.php index 86ee137a5..86df05d14 100644 --- a/src/Repository/PagesRepository.php +++ b/src/Repository/PagesRepository.php @@ -250,7 +250,7 @@ private function getPagesCreatedInnerSql( $logTable = $project->getTableName( 'logging', 'logindex' ); // Only SELECT things that are needed, based on whether or not we're doing a COUNT. - $revSelects = "DISTINCT page_namespace AS `namespace`, 'rev' AS `type`, page_title, " + $revSelects = "page_namespace AS `namespace`, 'rev' AS `type`, page_title, " . "page_is_redirect AS `redirect`, rev_len AS `rev_length`"; if ( !$count ) { $revSelects .= ", page_len AS `length`, rev_timestamp AS `timestamp`, "