From 26e19a39fbfc9e96db3c9d9e214af84c0abcadfd Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Sun, 29 Jan 2017 01:12:14 -0500 Subject: [PATCH] Pageviews: Fix display of basic info in Totals section --- javascripts/templates.js | 9 +++++---- public_html/application.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/javascripts/templates.js b/javascripts/templates.js index ca2b0c209..83751fe70 100644 --- a/javascripts/templates.js +++ b/javascripts/templates.js @@ -40,12 +40,13 @@ const templates = { }; if (!multiEntity) { - if (entity.assessment) { - infoHash[basicInfoMsg] = { [$.i18n('class')]: entity.assessment }; - } - infoHash[basicInfoMsg] = { + let newHash = { [$.i18n('protection')]: entity.protection }; + if (entity.assessment) { + newHash[$.i18n('class')] = entity.assessment; + } + Object.assign(infoHash[basicInfoMsg], newHash); } let markup = ''; diff --git a/public_html/application.js b/public_html/application.js index d8e46ae67..b9d846090 100644 --- a/public_html/application.js +++ b/public_html/application.js @@ -15,4 +15,4 @@ _model:{xPadding:n.xPadding,yPadding:n.yPadding,xAlign:n.xAlign,yAlign:n.yAlign, for(var D=1;D<=n.scaleSizeInUnits;++D){var x=k.clone().add(D,n.tickUnit);if(n.options.time.max&&x.diff(n.lastTick,n.tickUnit,!0)>=0)break;D%n.unitScale===0&&n.ticks.push(x)}var _=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==_||0===n.scaleSizeInUnits)&&(n.options.time.max?(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.ticks[0],n.tickUnit,!0)):(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0))),n.ctx.restore(),n.labelDiffs=void 0},getLabelForIndex:function(t,e){var i=this,n=i.chart.data.labels&&t10?this.massviewsRedirectWithPagePile(e.pages).then(i):(this.setInitialChartType(e.pages.length),i(e.pages)):this.getDefaultPages().done(function(e){t.setInitialChartType(e.length),i(e)}).fail(function(){setTimeout(t.stopSpinny.bind(t)),t.setInitialChartType(),t.focusSelect2()})}},{key:"getDefaultPages",value:function(){var t=this,e=$.Deferred();if("en.wikipedia"===this.project)e.resolve(["Cat","Dog"]);else if(this.project.includes("wikipedia")){var i="https://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Cat|Dog&props=sitelinks/urls|datatype&format=json&callback=?";$.getJSON(i).done(function(i){if(i.error)return e.resolve();var n=Object.keys(u).find(function(e){return u[e]===t.project+".org"}),o=Object.keys(i.entities).map(function(t){return i.entities[t].sitelinks[n].title});e.resolve(o)})}else this.fetchSiteInfo(this.project).done(function(i){e.resolve([i[t.project].general.mainpage])}).fail(e.reject);return e}},{key:"processSearchResults",value:function(t){var e=t?t.query:{},i=[];return e?("autocomplete"===this.autocomplete?e.prefixsearch.length&&(i=e.prefixsearch.map(function(t){return{id:t.title.score(),text:t.title}})):"autocomplete_redirects"===this.autocomplete&&(e.redirects&&(i=e.redirects.map(function(t){return{id:t.from.score(),text:t.from}})),Object.keys(e.pages).forEach(function(t){var n=e.pages[t];i.push({id:n.title.score(),text:n.title})})),{results:i}):{results:i}}},{key:"getParams",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={project:$(this.config.projectInput).val(),platform:$(this.config.platformSelector).val(),agent:$(this.config.agentSelector).val()};return this.specialRange&&t?e.range=this.specialRange.range:this.isMonthly()?(e.start=moment(this.monthStartDatepicker.getDate()).format("YYYY-MM"),e.end=moment(this.monthEndDatepicker.getDate()).format("YYYY-MM")):(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),this.noLogScale&&(e.autolog="false"),e}},{key:"pushParams",value:function(){var t=$(this.config.select2Input).select2("val")||[],e=t.join("|").replace(/[&%?+]/g,encodeURIComponent);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&pages="+e),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&pages="+e)}},{key:"setupSelect2",value:function(){var t=this,e=$(this.config.select2Input),i={ajax:this.getArticleSelectorAjax(),tags:"no_autocomplete"===this.autocomplete,placeholder:$.i18n("article-placeholder"),maximumSelectionLength:10,minimumInputLength:1};e.select2(i),e.off("select2:select").on("select2:select",this.processInput.bind(this)),e.off("select2:unselect").on("select2:unselect",function(i){t.processInput(!1,i.params.data.text),e.trigger("select2:close")}),e.off("select2:open").on("select2:open",function(e){$(e.target).val()&&10===$(e.target).val().length&&$(".select2-search__field").one("keyup",function(){var e=$.i18n("massviews-notice",10,""+$.i18n("massviews")+"");t.toastInfo(e)})})}},{key:"getArticleSelectorAjax",value:function(){var t=this;return"no_autocomplete"!==this.autocomplete?{url:"https://"+this.project+".org/w/api.php",dataType:"jsonp",delay:200,jsonpCallback:"articleSuggestionCallback",data:function(e){return t.getSearchParams(e.term)},processResults:this.processSearchResults.bind(this),cache:!0}:null}},{key:"resetView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"resetView",this).call(this,t,i),$(".output-list").html(""),$(".single-page-ranking").html(""),$(".single-page-stats").html(""),$(".single-page-legend").html("")}},{key:"validateProject",value:function(){s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this)&&(this.resetView(!0),this.focusSelect2())}},{key:"setupListeners",value:function(){var t=this;s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupListeners",this).call(this),$("#platform-select, #agent-select").on("change",this.processInput.bind(this)),$("#date-type-select").on("change",function(e){$(".date-selector").toggle("daily"===e.target.value),$(".month-selector").toggle("monthly"===e.target.value),"monthly"===e.target.value?(t.specialRange=null,t.setupMonthSelector(),t.daterangepicker.setStartDate(t.monthStartDatepicker.getDate()),t.daterangepicker.setEndDate(moment(t.monthEndDatepicker.getDate()).endOf("month"))):t.processInput()}),$(".sort-link").on("click",function(e){var i=$(e.currentTarget).data("type");t.direction=t.sort===i?-t.direction:1,t.sort=i,t.updateTable()}),$(".clear-pages").on("click",function(){t.resetView(!0),t.focusSelect2()})}},{key:"processInput",value:function(t,e){var i=this;if(this.pushParams(),t||location.search!==this.params||this.prevChartType!==this.chartType){this.params=location.search;var n=$(l.select2Input).select2("val")||[];if(!n.length)return this.resetView();this.setInitialChartType(n.length),this.prevChartType&&this.clearMessages(),this.prevChartType=this.chartType,this.destroyChart(),this.startSpinny(),e?(this.outputData=this.outputData.filter(function(t){return t.label!==e.descore()}),this.outputData=this.outputData.map(function(t){return Object.assign({},t,i.config.chartConfig[i.chartType].dataset(t.color))}),this.updateChart()):this.initialQuery?(this.getPageViewsData(n).done(function(t){i.getPageAssessments(t.entities).then(function(e){for(var n in e)i.entityInfo.entities[n].assessment=e[n];i.updateChart(t)})}),this.initialQuery=!1):this.getPageAndEditInfo(n.map(function(t){return encodeURIComponent(t)})).then(function(){i.getPageViewsData(n).done(function(t){i.getPageAssessments(t.entities).then(function(e){for(var n in e)i.entityInfo.entities[n].assessment=e[n];i.updateChart(t)})})})}}},{key:"showSinglePageLegend",value:function(){var t=this,e=this.outputData[0],i=this.getTopviewsMonth(!1),n=i.format("YYYY")+"/"+i.format("MM")+"/all-days";$.ajax({url:"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/"+this.project+"/"+($(this.config.platformSelector).val()+"/"+n),dataType:"json"}).done(function(n){var o=n.items[0].articles.find(function(t){return t.article===e.label.score()});if(o){var a=t.daterangepicker.locale.monthNames[i.month()],r="\n most-viewed pages\n ";$(".single-page-ranking").html($.i18n("most-viewed-rank",o.rank,r,a+" "+i.year()))}}).always(function(){$(".table-view").hide(),$(".single-page-stats").html("\n "+t.getPageLink(e.label)+"\n "+(e.assessment?"·\n"+e.assessment:"")+"\n ·\n \n "+$(t.config.dateRangeSelector).val()+"\n \n ·\n "+$.i18n("num-pageviews",t.formatNumber(e.sum))+"\n \n "),$(".single-page-legend").html(t.config.templates.chartLegend(t))})}},{key:"updateTable",value:function(){var t=this;if($.isNumeric(this.outputData[0].num_edits)||$(".legend-block--revisions .legend-block--body").html(""+$.i18n("data-unavailable")+""),1===this.outputData.length)return this.showSinglePageLegend();$(".single-page-stats").html(""),$(".single-page-ranking").html(""),$(".output-list").html("");var e=this.outputData.slice().sort(function(e,i){var n=t.getSortProperty(e,t.sort),o=t.getSortProperty(i,t.sort);return no?-t.direction:0});$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var i=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";$(".sort-link--"+this.sort+" .glyphicon").addClass(i).removeClass("glyphicon-sort");var n=!1,o=!1;e.forEach(function(e,i){e.protection!==$.i18n("none").toLowerCase()&&(n=!0),e.assessment&&e.assessment.length&&(o=!0),$(".output-list").append(t.config.templates.tableRow(t,e))});var a=e.reduce(function(t,e){return t+e.sum},0),r={label:$.i18n("num-pages",e.length),sum:a,average:Math.round(a/e[0].data.filter(function(t){return null!==t}).length),num_edits:this.entityInfo.totals?this.entityInfo.totals.num_edits:null,num_users:this.entityInfo.totals?this.entityInfo.totals.num_users:null,length:e.reduce(function(t,e){return t+e.length},0),protection:e.filter(function(t){return"none"!==t.protection}).length+" protections",watchers:e.reduce(function(t,e){return t+e.watchers||0},0)};$(".output-list").append(this.config.templates.tableRow(this,r,!0)),$(".table-view--protection").toggle(n),$(".table-view--class").toggle(o),$(".table-view").show()}},{key:"getSortProperty",value:function(t,e){switch(e){case"title":return t.label;case"class":return $(t.assessment).prop("alt");case"views":return Number(t.sum);case"average":return Number(t.average);case"edits":return Number(t.num_edits);case"editors":return Number(t.num_users);case"size":return Number(t.length);case"watchers":return Number(t.watchers)}}},{key:"getPageAndEditInfo",value:function(t){var e=this,i=$.Deferred();return this.getPageInfo(t).done(function(t){for(var n in t)t[n].missing&&(e.writeMessage(e.getPageLink(n)+": "+$.i18n("api-error-no-data")),delete t[n]);e.entityInfo={entities:t},e.getEditData(Object.keys(t)).done(function(t){for(var n in t.pages){var o=t.pages[n],a=e.entityInfo.entities[n].protection||[];Array.isArray(a)&&(a=a.find(function(t){return"edit"===t.type})),o.protection=a?a.level:$.i18n("none").toLowerCase(),Object.assign(e.entityInfo.entities[n],t.pages[n])}e.entityInfo.totals=t.totals,i.resolve(e.entityInfo)}).fail(function(){i.resolve(e.entityInfo)})}).fail(function(){i.resolve({})}),i}},{key:"massviewsRedirectWithPagePile",value:function(t){var e=this,i=$.Deferred();return $.ajax({url:"//tools.wmflabs.org/pagepile/api.php",data:{action:"create_pile_with_data",wiki:this.dbName(this.project),data:t.join("\n")}}).success(function(t){var i=e.getParams();delete i.project,document.location="/massviews?overflow=1&"+$.param(i)+"&source=pagepile&target="+t.pile.id}).fail(function(){e.toastError($.i18n("auto-pagepile-error","PagePile",10)),i.resolve(t.slice(0,10))}),i}}]),e}(mix(c).with(d));$(document).ready(function(){return document.location.hash&&!document.location.search?document.location.href=document.location.href.replace("#","?"):document.location.hash?document.location.href=document.location.href.replace(/\#.*/,""):void new h})},{"./config":1,"./shared/chart_helpers":3,"./shared/pv":6,"./shared/site_map":8}],3:[function(t,e,i){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:1;"true"===this.rememberChart?this.chartType=this.getFromLocalStorage("pageviews-chart-preference")||this.config.defaults.chartType(t):this.chartType=this.config.defaults.chartType(t)}},{key:"destroyChart",value:function(){this.chartObj&&(this.chartObj.destroy(),$(".chart-legend").html(""))}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Date,",e=[],i=[],n=this.getDateHeadings(!1);n.forEach(function(t,e){i[e]=[t]}),this.chartObj.data.datasets.forEach(function(t){var o='"'+t.label.replace(/"/g,'""')+'"';e.push(o),n.forEach(function(e,n){i[n].push(t.data[n])})}),t=t+e.join(",")+"\n",i.forEach(function(e){t+=e.join(",")+"\n"}),this.downloadData(t,"csv")}},{key:"exportJSON",value:function(){var t=this,e=[];this.chartObj.data.datasets.forEach(function(i,n){var o={page:i.label.replace(/"/g,'"').replace(/'/g,"'"),color:i.strokeColor,sum:i.sum,daily_average:Math.round(i.sum/t.numDaysInRange())};t.getDateHeadings(!1).forEach(function(t,e){o[t.replace(/\\/,"")]=i.data[e]}),e.push(o)});var i="data:text/json;charset=utf-8,"+JSON.stringify(e);this.downloadData(i,"json")}},{key:"exportPNG",value:function(){this.downloadData(this.chartObj.toBase64Image(),"png")}},{key:"fillInZeros",value:function(t,e,i){var n=this,a={};t.items.forEach(function(t){var e=moment(t.timestamp,n.config.timestampFormat).format("YYYYMMDD");a[e]=t}),t.items=[];for(var r=moment(e);r<=i;r.add(1,"day"))if(a[r.format("YYYYMMDD")])t.items.push(a[r.format("YYYYMMDD")]);else{var s=r.isSame(this.config.maxDate)||r.isSame(moment(this.config.maxDate).subtract(1,"days"));t.items.push(o({timestamp:r.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",s?null:0))}return t}},{key:"buildChartData",value:function(t,e){var i=this,n=void 0,o=this.isMonthly()?"YYYY-MM":"YYYY-MM-DD";return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,a){var r=i.getDateHeadings(!1),s=new Array(r.length),l=0,c=void 0,u=0;t.forEach(function(t){var e=t[n],a=void 0;a="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format(o),s[r.indexOf(a)]=e,l+=e||0,e>u&&(u=e),(void 0===c||e";e.toastWarn($.i18n("new-article-warning",n))}});var l="siteviews"===e.app?e.getSiteLink(u):e.getPageLink(u,e.project);c.errors.push(l+": "+$.i18n("api-error","Pageviews API")+" - "+i.responseJSON.title)}}).always(function(){++n===a&&(e.pageViewsData=c,i.resolve(c),r.length&&e.writeMessage($.i18n("api-error-timeout","
    "+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"
")))})};return t.forEach(function(t,e){return u(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{key:"isMonthly",value:function(){return"monthly"===$("#date-type-select").val()}},{key:"isLogarithmic",value:function(){return $(this.config.logarithmicCheckbox).is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===$(this.config.dataSourceSelector).val()}},{key:"isUniqueDevices",value:function(){return!this.isPageviews()}},{key:"printChart",value:function(){var t=window.open();t.document.write(''),t.print(),t.close()}},{key:"resetView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{this.destroyChart(),t&&this.resetSelect2()}catch(t){}finally{this.stopSpinny(),$("body").addClass("initial"),$(this.config.chart).hide(),e&&this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){if("line"===this.chartType){var t=this.getDateHeadings().length;t>50?Chart.defaults.global.elements.point.hitRadius=3:t>30?Chart.defaults.global.elements.point.hitRadius=5:t>20?Chart.defaults.global.elements.point.hitRadius=10:Chart.defaults.global.elements.point.hitRadius=30}}},{key:"shouldBeLogarithmic",value:function(t){var e;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var i=[];t.forEach(function(t){i.push(t.map(function(t){return t||0}))});var o=Math.max.apply(Math,n((e=[]).concat.apply(e,i)));if(o<=10)return!1;var a=!1;return i.forEach(function(t){t.push(o);var e=t.reduce(function(t,e){return t+e}),i=e/t.length,n=0;if(t.forEach(function(t){return n+=t?t*Math.log(t/i):0}),n/e>.5)return a=!0}),a}},{key:"setupDateRangeSelector",value:function(){var t=this;if(u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var i=$(this.config.dateRangeSelector);$(".date-latest a").on("click",function(e){var i=$(e.target).data("value");t.setSpecialRange("latest-"+i),$(".latest-text").text($.i18n("latest-days",i))}),i.on("change",function(e){t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{key:"setupMonthSelector",value:function(t,e){var i=this;this.monthDatepicker&&this.monthDatepicker.destroy(),$(".month-selector").datepicker({autoclose:!0,format:"M yyyy",viewMode:"months",minViewMode:"months",startDate:this.config.minDate.toDate(),endDate:this.config.maxMonth,disableTouchKeyboard:!0}),t=t||this.config.initialMonthStart,e=e||this.config.maxMonth;var n=function(t,e){return ti.config.maxMonth&&(e=i.config.maxMonth),(ee)&&(t=e),[t,e]},o=n(t,e),a=l(o,2);t=a[0],e=a[1],this.monthStartDatepicker.setDate(t),this.monthEndDatepicker.setDate(e),this.daterangepicker.startDate=moment(t).startOf("month"),this.daterangepicker.setEndDate(moment(e).endOf("month"));var r=function(){var t=n(i.monthStartDatepicker.getDate(),i.monthEndDatepicker.getDate()),e=l(t,2),o=e[0],a=e[1];i.daterangepicker.startDate=moment(o).startOf("month"),i.daterangepicker.setEndDate(moment(a).endOf("month"))};$(".month-selector-start").on("hide",r),$(".month-selector-end").on("hide",r)}},{key:"updateChart",value:function(t){var e=this;$(".chart-legend").html("");var i=t?t.entities:$(this.config.select2Input).val();if(!t||!this.showErrors(t)){if(!i.length)return this.stopSpinny();if(1===i.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),t&&(this.outputData=this.buildChartData(t.datasets,i)),"true"===this.autoLogDetection){var o=this.shouldBeLogarithmic(this.outputData.map(function(t){return t.data}));$(this.config.logarithmicCheckbox).prop("checked",o),$(".begin-at-zero").toggleClass("disabled",o)}this.outputData=this.setColorsAndLogValues(this.outputData);var a=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(a.scales=Object.assign({},a.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(t,i,n){var o=t/Math.pow(10,Math.floor(Chart.helpers.log10(t)));return 1===o||2===o||5===o||0===i||i===n.length-1?e.formatNumber(t):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var r=$(this.config.chart)[0].getContext("2d"),s=Math.min.apply(Math,n(this.outputData.map(function(t){return t.min})));if(this.config.linearCharts.includes(this.chartType)){var l={labels:this.getDateHeadings(),datasets:this.outputData,dateFormat:this.dateFormat};"radar"===this.chartType?a.scale.ticks.beginAtZero=0===s||$(".begin-at-zero-option").is(":checked"):(a.scales.yAxes[0].ticks.beginAtZero=0===s||$(".begin-at-zero-option").is(":checked"),a.zoom=["pageviews","siteviews"].includes(this.app)&&this.numDaysInRange()>1&&!this.isMonthly()), $(".show-labels-option").is(":checked")?a=this.showPointLabels(a):(delete a.animation.onComplete,delete a.animation.onProgress),this.chartObj=new Chart(r,{type:this.chartType,data:l,options:a})}else delete a.animation.onComplete,delete a.animation.onProgress,this.chartObj=new Chart(r,{type:this.chartType,data:{labels:this.outputData.map(function(t){return t.label}),datasets:[{data:this.outputData.map(function(t){return t.value}),backgroundColor:this.outputData.map(function(t){return t.backgroundColor}),hoverBackgroundColor:this.outputData.map(function(t){return t.hoverBackgroundColor}),averages:this.outputData.map(function(t){return t.average})}]},options:a})}catch(t){return this.showErrors({errors:[],fatalErrors:[t]})}$(".chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible"),["metaviews","pageviews","siteviews"].includes(this.app)&&this.updateTable()}}},{key:"showPointLabels",value:function(t){if(["bar","line"].includes(this.chartType)){var e=function(t){return t.textAlign="center",t.textBaseline="bottom",t.fillStyle="#444",t.font=Chart.helpers.fontString(Chart.defaults.global.defaultFontSize,Chart.defaults.global.defaultFontStyle,Chart.defaults.global.defaultFontFamily),t},i=function(t,i){var n=t.chart,o=e(n.ctx);Chart.helpers.each(t.data.datasets.forEach(function(e,a){var r=n.controller.getDatasetMeta(a);Chart.helpers.each(r.data.forEach(function(t,n){o.fillStyle="rgba(68,68,68,"+i+")";var a=e._meta[Object.keys(e._meta)[0]].data[n]._yScale.maxHeight,r=(a-t._model.y)/a>=.93?t._model.y+5:t._model.y-10;o.fillText(e.data[n],t._model.x,r)}),t)}),t)};return t.animation.onComplete=function(){i(this,1)},t.animation.onProgress=function(t){var e=t.animationObject;i(this,e.currentStep/e.numSteps)},t}}},{key:"showErrors",value:function(t){var e=this;if(t.fatalErrors.length){this.resetView(!0);var i=t.fatalErrors.unique();return this.showFatalErrors(i),!0}return t.errors.length&&(!t.entities||t.errors.length!==t.entities.length&&t.entities.length||this.resetView(),t.errors.unique().forEach(function(t){return e.writeMessage(t)})),!1}},{key:"monthDatepicker",get:function(){return $(".month-selector").data("datepicker")}},{key:"monthStartDatepicker",get:function(){return $(".month-selector-start").data("datepicker")}},{key:"monthEndDatepicker",get:function(){return $(".month-selector-end").data("datepicker")}}]),e}(t)};e.exports=d},{"./zoom_plugin":9}],4:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(e){return t[e]})},Array.prototype.unique=function(){return this.filter(function(t,e,i){return i.indexOf(t)===e})},window.mix=function(t){return new a(t)};var a=function(){function t(e){n(this,t),this.superclass=e}return o(t,[{key:"with",value:function(){for(var t=arguments.length,e=Array(t),i=0;ithis.length)&&this.indexOf(t,e)!==-1}),"function"!=typeof Object.assign&&!function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i>>0,n=arguments[1],o=void 0,a=0;a>>0,n=arguments[1],o=n>>0,a=o<0?Math.max(i+o,0):Math.min(o,i),r=arguments[2],s=void 0===r?i:r>>0,l=s<0?Math.max(i+s,0):Math.min(s,i);aThis is the staging environment!

\n

To use the staging app, append debug=true to the URL

\n

Otherwise, please update your links to use\n https://"+location.host+t+"\n

\n

\n Redirecting you to the production "+document.title+" in\n 10...\n

\n ");var e=10;return setInterval(function(){return 0===--e?document.location=t:void $(".countdown").text(e)},1e3),{v:a(i)}}();if("object"===("undefined"==typeof c?"undefined":l(c)))return c.v}i.debug?window.app=i:i.splash();var u=n({},i18nLang,"/pageviews/messages/"+i18nLang+".json");return"en"!==i18nLang&&(u.en="/pageviews/messages/en.json"),$.i18n({locale:i18nLang}).load(u).then(i.initialize.bind(i)),toastr.options={closeButton:!0,debug:"localhost"===location.host,newestOnTop:!1,progressBar:!1,positionClass:"toast-top-center",preventDuplicates:!0,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"3000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut",toastClass:"alert",iconClasses:{error:"alert-danger",info:"alert-info",success:"alert-success",warning:"alert-warning"}},i}return r(e,t),c(e,[{key:"toast",value:function(t){var e=t.title?""+t.title+" ":"";t=Object.assign({message:e+t.message,level:"warning",timeout:10},t),toastr.options.timeOut=1e3*t.timeout,toastr[t.level](t.message)}},{key:"toastSuccess",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"success",timeout:e})}},{key:"toastInfo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"info",timeout:e})}},{key:"toastWarn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"warning",timeout:e})}},{key:"toastError",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"error",timeout:e})}},{key:"addInvalidParamNotice",value:function(t){var e=""+$.i18n("documentation").toLowerCase()+"";this.toastError("\n "+$.i18n("invalid-params")+"\n "+$.i18n("param-error-3",t,e)+"\n ")}},{key:"validateDateRange",value:function(t){if(t.range)this.setSpecialRange(t.range)||(this.addInvalidParamNotice("range"),this.setSpecialRange(this.config.defaults.dateRange));else if(t.start){var e=/\d{4}-\d{2}-\d{2}$/;t.start&&/^\d{4}-\d{2}$/.test(t.start)&&(t.start=t.start+"-01",t.monthly=!0),t.end&&/^\d{4}-\d{2}$/.test(t.end)?t.end=moment(t.end+"-01").endOf("month").format("YYYY-MM-DD"):t.monthly=!1;var i=void 0,n=void 0;if(!t.start||!e.test(t.start))return this.addInvalidParamNotice("start"),!1;if(i=moment(t.start),!t.end||!e.test(t.end))return this.addInvalidParamNotice("end"),!1;if(n=moment(t.end),i"+$.i18n("invalid-params")+"\n "+$.i18n("param-error-1",moment(this.config.minDate).format(this.dateFormat))+"\n "),!1;if(i>n)return this.toastError("\n "+$.i18n("param-error-2")+"\n "+$.i18n("invalid-params")+"\n "),!1;t.monthly&&["pageviews","siteviews"].includes(this.app)?($("#date-type-select").val("monthly"),$(".date-selector").hide(),$(".month-selector").show(),this.monthStart=moment(t.start).toDate(),this.monthEnd=moment(t.end).startOf("month").toDate(),this.setupMonthSelector(this.monthStart,this.monthEnd)):(this.daterangepicker.startDate=i,this.daterangepicker.setEndDate(n))}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"dbName",value:function(t){return Object.keys(d).find(function(e){return d[e]===t.replace(/\.org$/,"")+".org"})}},{key:"downloadData",value:function(t,e){var i=encodeURI(t),n=document.createElement("a");if("string"==typeof n.download){document.body.appendChild(n);var o=this.getExportFilename()+"."+e;n.download=o,n.href=i,n.click(),document.body.removeChild(n)}else window.open(i)}},{key:"fillInSettings",value:function(){var t=this;$.each($("#settings-modal input"),function(e,i){"checkbox"===i.type?i.checked="true"===t[i.name]:i.checked=t[i.name]===i.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"formatNumber",value:function(t){var e=this.getFromLocalStorage("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting;return"true"===e?this.n(t):t}},{key:"formatYAxisNumber",value:function(t){return t%1===0?this.formatNumber(t):null}},{key:"getDateHeadings",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=[],i="monthly"===$("#date-type-select").val(),n=moment(this.daterangepicker.endDate).add(i?0:1,"day"),o=i?"month":"day",a=i?"YYYY-MM":"YYYY-MM-DD",r=moment(this.daterangepicker.startDate);r.isBefore(n);r.add(1,o))t?e.push(r.format(this.dateFormat)):e.push(r.format(a));return e}},{key:"getExpandedPageURL",value:function(t){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(t.score()).replace(/'/,escape)}},{key:"getHistoryLink",value:function(t,e){return'\n '+e+"\n "}},{key:"getExportFilename",value:function(){var t=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),e=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+t+"-"+e}},{key:"getPageLink",value:function(t,e){return''+t.descore().escape()+""}},{key:"getPageURL",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.project;return"//"+e.replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(t.score()).replace(/%3A|%2F/g,unescape)}},{key:"getSiteLink",value:function(t){return''+t+""}},{key:"getLocaleDateString",value:function(){if(!navigator.language)return this.config.defaults.dateFormat;var t={"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD","quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"},e=navigator.language.toLowerCase();return t[e]||this.config.defaults.dateFormat}},{key:"getFromLocalStorage",value:function(t){try{return localStorage.getItem(t)}catch(e){return storage[t]}}},{key:"getBugReportURL",value:function(t,e){var i="https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit§ion=new&preloadtitle="+(e||this.app.upcase()+" bug report");return t?i+"&preload=Talk:Pageviews_Analysis/Preload&preloadparams[]="+t:i}},{key:"fetchSiteInfo",value:function(t){var e=this;t=t.replace(/\.org$/,"");var i=$.Deferred(),n="pageviews-siteinfo-"+t;return this.siteInfo[t]?i.resolve(this.siteInfo):(simpleStorage.hasKey(n)?(this.siteInfo[t]=simpleStorage.get(n),i.resolve(this.siteInfo)):$.ajax({url:"https://"+t+".org/w/api.php",data:{action:"query",meta:"siteinfo",siprop:"general|namespaces",format:"json"},dataType:"jsonp"}).done(function(o){e.siteInfo[t]=o.query,simpleStorage.set(n,e.siteInfo[t],{TTL:6048e5}),i.resolve(e.siteInfo)}).fail(function(t){i.reject(t)}),i)}},{key:"getPageAssessments",value:function(t){var e=this,i=$.Deferred();return this.massApi({prop:"pageassessments",titles:t.join("|")},this.project,"pacontinue","pages").done(function(t){var n={};return t.pages.forEach(function(t){if(t.pageassessments){var i=Object.keys(t.pageassessments),o=t.pageassessments[i[0]];if(o&&o.class.length&&!n[t.title]){var a=e.config.pageAssessmentBadges[e.project][o.class]||"";if(!a.length)return;var r="");n[t.title]=r}}}),i.resolve(n)}),i}},{key:"getSiteInfo",value:function(t){return this.siteInfo[t.replace(/\.org$/,"")]}},{key:"getTopviewsMonth",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=t?"startDate":"endDate",i=moment(this.daterangepicker[e]);return i.month()!==moment().month()&&i.month()!==moment().subtract(2,"days").month()||i.subtract(1,"month"),i}},{key:"getTopviewsMonthURL",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getTopviewsMonth(),i={project:t,platform:"all-access",date:e.startOf("month").format("YYYY-MM")};return"/topviews?"+$.param(i)}},{key:"getUserAgent",value:function(){return navigator.userAgent?navigator.userAgent:"Unknown"}},{key:"setLocalStorage",value:function(t,e){try{return localStorage.setItem(t,e)}catch(i){return storage[t]=e}}},{key:"hashCode",value:function(t){return t.split("").reduce(function(t,e){return(t<<5)-t+e.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!this.isListApp()}},{key:"isListApp",value:function(){return["langviews","massviews","redirectviews","userviews"].includes(this.app)}},{key:"isMultilangProject",value:function(){return new RegExp(".*?\\.("+e.multilangProjects.join("|")+")").test(this.project)}},{key:"massApi",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"continue",n=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.config.apiLimit;/\.org$/.test(e)||(e+=".org");var a=$.Deferred(),r={pages:[]},s=function s(l){var c=Object.assign({action:"query",format:"json",formatversion:"2"},t);l&&(c[i]=l);var u=$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:c});u.done(function(t){if(t.error)return a.resolve(t);var e=void 0;"function"==typeof n?(r.pages=r.pages.concat(n(t.query)),e=r.pages.length>=o):(t.query.pages&&(r.pages=r.pages.concat(t.query.pages)),t.query[n]&&(r[n]=(r[n]||[]).concat(t.query[n])),e=r.pages.length>=o||r[n].length>=o),!e&&t.continue&&t.continue[i]?setTimeout(function(){s(t.continue[i])},100):(t.continue&&(r.continue=!0),a.resolve(r))}).fail(function(t){a.reject(t)})};return s(),a}},{key:"n",value:function(t){return new Number(t).toLocaleString()}},{key:"getPageInfo",value:function(t){var e=$.Deferred();try{t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))})}catch(t){}return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&inprop=protection|watchers&formatversion=2&format=json&titles="+t.join("|"),dataType:"jsonp"}).then(function(i){i.query.normalized&&i.query.normalized.forEach(function(e){t[t.indexOf(encodeURIComponent(e.from))]=encodeURIComponent(e.to)});var n={};return t.forEach(function(t){try{t=decodeURIComponent(t)}catch(t){}n[t]=i.query.pages.find(function(e){return e.title===t})}),e.resolve(n)})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(t){for(var e=location.search.slice(1).replace(/\+/g,"%20").replace(/%7C/g,"|"),i=e.split("&"),n={},o=0;o").text(t).html();$("").appendTo(e.config.select2Input)}),$(this.config.select2Input).select2("val",t),$(this.config.select2Input).trigger("select2:select"),t}},{key:"setSpecialRange",value:function(t){var e=Object.keys(this.config.specialRanges).indexOf(t),i=void 0,n=void 0,o=void 0;if(t.includes("latest-")){o=parseInt(t.replace("latest-",""),10)||20;var a=this.config.specialRanges.latest(o),r=s(a,2);i=r[0],n=r[1]}else{if(!(e>=0))return;var l="latest"===t?this.config.specialRanges.latest():this.config.specialRanges[t],c=s(l,2);i=c[0],n=c[1],$(".daterangepicker .ranges li").eq(e).trigger("click")}return this.specialRange={range:t,value:i.format(this.dateFormat)+" - "+n.format(this.dateFormat)},this.daterangepicker.startDate=i,this.daterangepicker.setEndDate(n),$(".latest-text").text(o?$.i18n("latest-days",o):$.i18n("latest")),this.specialRange}},{key:"setupSelect2Colors",value:function(){var t=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(e,i){t.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(i+1)+") { background: "+e+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var t=this;$("a[href='#']").on("click",function(t){return t.preventDefault()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this)),$(this.config.projectInput).on("focusin",function(){this.dataset.value=this.value}),$(this.config.projectInput).on("change",function(){return t.validateProject()}),$(".permalink").on("click",function(e){$(".permalink-copy").val($(".permalink").prop("href"))[0].select();try{document.execCommand("copy"),t.toastSuccess("Permalink copied to clipboard"),e.preventDefault(),document.activeElement.blur()}catch(t){}})}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var t=this,e=$(this.config.dateRangeSelector),i={};Object.keys(this.config.specialRanges).forEach(function(e){"latest"!==e&&(i[$.i18n(e)]=t.config.specialRanges[e])});var n={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:moment().subtract(this.config.daysAgo,"days"),minDate:this.config.minDate,maxDate:this.config.maxDate,ranges:i};this.config.dateLimit&&(n.dateLimit={days:this.config.dateLimit}),e.daterangepicker(n),$(".daterangepicker").append($("
").addClass("daterange-notice").html($.i18n("date-notice",document.title,"stats.grok.se",$.i18n("july")+" 2015"))),$(".daterangepicker .ranges li").on("click",function(e){if(e.target.innerText===$.i18n("custom-range"))return t.specialRange=null,app.daterangepicker.clickApply();var i=t.daterangepicker.container,n=i.find(".daterangepicker_input input"),o=Object.keys(t.config.specialRanges).find(function(t){return $.i18n(t)===e.target.innerText});t.specialRange={range:o,value:n[0].value+" - "+n[1].value}}),$(this.config.dateRangeSelector).on("apply.daterangepicker",function(e,i){i.chosenLabel===$.i18n("custom-range")&&(t.specialRange=null,t.daterangepicker.updateElement())})}},{key:"showFatalErrors",value:function(t){var e=this;this.resetView(),t.forEach(function(t){e.writeMessage(""+$.i18n("fatal-error")+": "+t+"")});var i=function(t){return e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)};if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&$.ajax({method:"POST",url:"//tools.wmflabs.org/musikanimal/paste",data:{content:"\ndate: "+moment().utc().format()+("\ntool: "+this.app)+("\nlanguage: "+i18nLang)+("\nchart: "+this.chartType)+("\nurl: "+document.location.href)+("\nuserAgent: "+this.getUserAgent())+("\ntrace: "+t[0].stack),title:"Pageviews Analysis error report: "+t[0]}}).done(function(t){t&&t.result&&t.result.objectName?i(t.result.objectName):i()}).fail(function(){i()})}},{key:"splash",value:function(){var t="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",t),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",t),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",t),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",t),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',t),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",t),console.log("%c ___ _ _ _ _ ",t),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",t),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",t),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",t),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',t),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",t),console.log("%c ",t),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",t)}},{key:"startSpinny",value:function(){var t=this;$("body").addClass("loading"),setTimeout(function(){return document.activeElement.blur()}),clearTimeout(this.timeout),this.timeout=setTimeout(function(e){ t.resetView(),t.toastError("\n "+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",t.getBugReportURL())+"\n ")},3e4)}},{key:"stopSpinny",value:function(){$("body").removeClass("loading initial"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(t){return t.map(function(t){return t.score()})}},{key:"updateInterAppLinks",value:function(){var t=this;$(".interapp-link").each(function(e,i){var n=i.href.split("?")[0];i.classList.contains("interapp-link--siteviews")?i.href=n+"?sites="+t.project.escape()+".org":i.href=n+"?project="+t.project.escape()+".org"})}},{key:"validateParams",value:function(t){var e=this;return this.config.validateParams.forEach(function(i){"project"===i&&t.project&&(t.project=t.project.replace(/^www\./,""));var n=e.config.defaults[i],o=t[i];void 0===n||e.config.validParams[i].includes(o)||(o&&e.addInvalidParamNotice(i),t[i]=n)}),t}},{key:"validateProject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=$(this.config.projectInput)[0],i=e.value.replace(/^www\./,""),n=!1;return t&&!this.isMultilangProject()?(this.toastWarn($.i18n("invalid-lang-project",""+i.escape()+"")),i=e.dataset.value):h.includes(i)?(this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),n&&$(this.config.projectInput).trigger("updated"),e.value=i,n}},{key:"writeMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&this.clearMessages(),$(".message-container").append("
"+t+"
")}},{key:"dateFormat",get:function(){var t="monthly"===$("#date-type-select").val();return"true"===this.localizeDateFormat?t?"MMM YYYY":this.getLocaleDateString():t?"YYYY-MM":this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return $(this.config.dateRangeSelector).data("daterangepicker")}},{key:"project",get:function(){var t=$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(u);e.exports=p},{"./core_extensions":4,"./polyfills":5,"./pv_config":7,"./site_map":8}],7:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i1?"line":"bar"},dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"false",beginAtZero:"false",rememberChart:"false",agent:"user",platform:"all-access",project:"en.wikipedia.org"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(t){return e.formatNumber(t)}}}]},legendCallback:function(t){return e.config.chartLegend(t.data.datasets,i)}},daysAgo:20,initialMonthStart:moment(s).subtract(11,"months").toDate(),minDate:moment("2015-07-01").startOf("day"),maxDate:a,maxMonth:s,specialRanges:{"last-week":[moment().subtract(1,"week").startOf("isoweek"),moment().subtract(1,"week").endOf("isoweek")],"this-month":[moment().startOf("month"),moment().startOf("month").isAfter(a)?moment().startOf("month"):a],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().startOf("year").isAfter(a)?moment().startOf("year"):a],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),a],latest:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.config.daysAgo;return[moment().subtract(t,"days").startOf("day"),i.config.maxDate]}},timestampFormat:"YYYYMMDD00",validParams:{agent:["all-agents","user","spider","bot"],platform:["all-access","desktop","mobile-app","mobile-web"],project:r},pageAssessmentProjects:["en.wikipedia","en.wikivoyage"],pageAssessmentBadges:{"en.wikipedia":{FA:"e/e7/Cscr-featured.svg",GA:"9/94/Symbol_support_vote.svg",A:"2/25/Symbol_a_class.svg",B:"5/5f/Symbol_b_class.svg",C:"e/e6/Symbol_c_class.svg",Start:"a/a4/Symbol_start_class.svg",Stub:"f/f5/Symbol_stub_class.svg",FL:"e/e7/Cscr-featured.svg",List:"d/db/Symbol_list_class.svg",Dab:"2/2a/Symbol_dab_class.svg"},"en.wikivoyage":{stub:"f/f3/Symbol_plain_grey.svg",outline:"c/c8/Start-icon.svg",usable:"d/d0/Symbol_keep_vote.svg",guide:"9/94/Symbol_support_vote.svg",star:"b/b4/Symbol_star_gold.svg"}}}}return o(t,[{key:"linearTooltips",value:function(t){var e=this;return{mode:t||"x-axis",callbacks:{label:function(t){return Number.isNaN(t.yLabel)?" "+$.i18n("unknown"):" "+e.formatNumber(t.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"circularTooltips",get:function(){var t=this;return{callbacks:{label:function e(i,n){var o=n.datasets[i.datasetIndex].data[i.index],e=n.labels[i.index];return Number.isNaN(o)?e+": "+$.i18n("unknown"):e+": "+t.formatNumber(o)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}}]),t}();e.exports=s},{"./site_map":8}],8:[function(t,e,i){"use strict";var n={aawiki:"aa.wikipedia.org",aawiktionary:"aa.wiktionary.org",aawikibooks:"aa.wikibooks.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwiktionary:"af.wiktionary.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",akwiki:"ak.wikipedia.org",akwiktionary:"ak.wiktionary.org",akwikibooks:"ak.wikibooks.org",alswiki:"als.wikipedia.org",alswiktionary:"als.wiktionary.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",amwiki:"am.wikipedia.org",amwiktionary:"am.wiktionary.org",amwikiquote:"am.wikiquote.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",angwiki:"ang.wikipedia.org",angwiktionary:"ang.wiktionary.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",arwiki:"ar.wikipedia.org",arwiktionary:"ar.wiktionary.org",arwikibooks:"ar.wikibooks.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arcwiki:"arc.wikipedia.org",arzwiki:"arz.wikipedia.org",aswiki:"as.wikipedia.org",aswiktionary:"as.wiktionary.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",astwiki:"ast.wikipedia.org",astwiktionary:"ast.wiktionary.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",aywiki:"ay.wikipedia.org",aywiktionary:"ay.wiktionary.org",aywikibooks:"ay.wikibooks.org",azwiki:"az.wikipedia.org",azwiktionary:"az.wiktionary.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azbwiki:"azb.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bclwiki:"bcl.wikipedia.org",bewiki:"be.wikipedia.org",bewiktionary:"be.wiktionary.org",bewikibooks:"be.wikibooks.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",be_x_oldwiki:"be-tarask.wikipedia.org",bgwiki:"bg.wikipedia.org",bgwiktionary:"bg.wiktionary.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwiktionary:"bi.wiktionary.org",biwikibooks:"bi.wikibooks.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwiktionary:"bm.wiktionary.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bnwiki:"bn.wikipedia.org",bnwiktionary:"bn.wiktionary.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bowiki:"bo.wikipedia.org",bowiktionary:"bo.wiktionary.org",bowikibooks:"bo.wikibooks.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwiktionary:"br.wiktionary.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",bswiki:"bs.wikipedia.org",bswiktionary:"bs.wiktionary.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawiktionary:"ca.wiktionary.org",cawikibooks:"ca.wikibooks.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cewiki:"ce.wikipedia.org",cebwiki:"ceb.wikipedia.org",chwiki:"ch.wikipedia.org",chwiktionary:"ch.wiktionary.org",chwikibooks:"ch.wikibooks.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cowiki:"co.wikipedia.org",cowiktionary:"co.wiktionary.org",cowikibooks:"co.wikibooks.org",cowikiquote:"co.wikiquote.org",crwiki:"cr.wikipedia.org",crwiktionary:"cr.wiktionary.org",crwikiquote:"cr.wikiquote.org",crhwiki:"crh.wikipedia.org",cswiki:"cs.wikipedia.org",cswiktionary:"cs.wiktionary.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywiktionary:"cy.wiktionary.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",dawiki:"da.wikipedia.org",dawiktionary:"da.wiktionary.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dewiki:"de.wikipedia.org",dewiktionary:"de.wiktionary.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",diqwiki:"diq.wikipedia.org",dsbwiki:"dsb.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwiktionary:"el.wiktionary.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwiktionary:"en.wiktionary.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",eowiki:"eo.wikipedia.org",eowiktionary:"eo.wiktionary.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eswiki:"es.wikipedia.org",eswiktionary:"es.wiktionary.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",etwiki:"et.wikipedia.org",etwiktionary:"et.wiktionary.org",etwikibooks:"et.wikibooks.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",euwiki:"eu.wikipedia.org",euwiktionary:"eu.wiktionary.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawiktionary:"fa.wiktionary.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",ffwiki:"ff.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwiktionary:"fi.wiktionary.org",fiwikibooks:"fi.wikibooks.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",fowiki:"fo.wikipedia.org",fowiktionary:"fo.wiktionary.org",fowikisource:"fo.wikisource.org",frwiki:"fr.wikipedia.org",frwiktionary:"fr.wiktionary.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywiktionary:"fy.wiktionary.org",fywikibooks:"fy.wikibooks.org",gawiki:"ga.wikipedia.org",gawiktionary:"ga.wiktionary.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",glwiki:"gl.wikipedia.org",glwiktionary:"gl.wiktionary.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glkwiki:"glk.wikipedia.org",gnwiki:"gn.wikipedia.org",gnwiktionary:"gn.wiktionary.org",gnwikibooks:"gn.wikibooks.org",gomwiki:"gom.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",guwiki:"gu.wikipedia.org",guwiktionary:"gu.wiktionary.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hakwiki:"hak.wikipedia.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewiktionary:"he.wiktionary.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hiwiki:"hi.wikipedia.org",hiwiktionary:"hi.wiktionary.org",hiwikibooks:"hi.wikibooks.org",hiwikiquote:"hi.wikiquote.org",hifwiki:"hif.wikipedia.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwiktionary:"hr.wiktionary.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwiktionary:"hu.wiktionary.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",hywiki:"hy.wikipedia.org",hywiktionary:"hy.wiktionary.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawiktionary:"ia.wiktionary.org",iawikibooks:"ia.wikibooks.org",idwiki:"id.wikipedia.org",idwiktionary:"id.wiktionary.org",idwikibooks:"id.wikibooks.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",iewiki:"ie.wikipedia.org",iewiktionary:"ie.wiktionary.org",iewikibooks:"ie.wikibooks.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswiktionary:"is.wiktionary.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",itwiki:"it.wikipedia.org",itwiktionary:"it.wiktionary.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jawiki:"ja.wikipedia.org",jawiktionary:"ja.wiktionary.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwiktionary:"jv.wiktionary.org",kawiki:"ka.wikipedia.org",kawiktionary:"ka.wiktionary.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwiktionary:"kk.wiktionary.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwiktionary:"km.wiktionary.org",kmwikibooks:"km.wikibooks.org",knwiki:"kn.wikipedia.org",knwiktionary:"kn.wiktionary.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",kowiki:"ko.wikipedia.org",kowiktionary:"ko.wiktionary.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",koiwiki:"koi.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",krcwiki:"krc.wikipedia.org",kswiki:"ks.wikipedia.org",kswiktionary:"ks.wiktionary.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kshwiki:"ksh.wikipedia.org",kuwiki:"ku.wikipedia.org",kuwiktionary:"ku.wiktionary.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwiktionary:"kw.wiktionary.org",kwwikiquote:"kw.wikiquote.org",kywiki:"ky.wikipedia.org",kywiktionary:"ky.wiktionary.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",lawiki:"la.wikipedia.org",lawiktionary:"la.wiktionary.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",ladwiki:"lad.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwiktionary:"lb.wiktionary.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbewiki:"lbe.wikipedia.org",lezwiki:"lez.wikipedia.org",lgwiki:"lg.wikipedia.org",liwiki:"li.wikipedia.org",liwiktionary:"li.wiktionary.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",lijwiki:"lij.wikipedia.org",lmowiki:"lmo.wikipedia.org",lnwiki:"ln.wikipedia.org",lnwiktionary:"ln.wiktionary.org",lnwikibooks:"ln.wikibooks.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwiktionary:"lt.wiktionary.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltgwiki:"ltg.wikipedia.org",lvwiki:"lv.wikipedia.org",lvwiktionary:"lv.wiktionary.org",lvwikibooks:"lv.wikibooks.org",maiwiki:"mai.wikipedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mgwiki:"mg.wikipedia.org",mgwiktionary:"mg.wiktionary.org",mgwikibooks:"mg.wikibooks.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",mhrwiki:"mhr.wikipedia.org",miwiki:"mi.wikipedia.org",miwiktionary:"mi.wiktionary.org",miwikibooks:"mi.wikibooks.org",minwiki:"min.wikipedia.org",mkwiki:"mk.wikipedia.org",mkwiktionary:"mk.wiktionary.org",mkwikibooks:"mk.wikibooks.org",mkwikisource:"mk.wikisource.org",mlwiki:"ml.wikipedia.org",mlwiktionary:"ml.wiktionary.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mnwiki:"mn.wikipedia.org",mnwiktionary:"mn.wiktionary.org",mnwikibooks:"mn.wikibooks.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrwiki:"mr.wikipedia.org",mrwiktionary:"mr.wiktionary.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrjwiki:"mrj.wikipedia.org",mswiki:"ms.wikipedia.org",mswiktionary:"ms.wiktionary.org",mswikibooks:"ms.wikibooks.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mywiki:"my.wikipedia.org",mywiktionary:"my.wiktionary.org",mywikibooks:"my.wikibooks.org",myvwiki:"myv.wikipedia.org",mznwiki:"mzn.wikipedia.org",nawiki:"na.wikipedia.org",nawiktionary:"na.wiktionary.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nahwiki:"nah.wikipedia.org",nahwiktionary:"nah.wiktionary.org",nahwikibooks:"nah.wikibooks.org",napwiki:"nap.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswiktionary:"nds.wiktionary.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",nds_nlwiki:"nds-nl.wikipedia.org",newiki:"ne.wikipedia.org",newiktionary:"ne.wiktionary.org",newikibooks:"ne.wikibooks.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",nlwiki:"nl.wikipedia.org",nlwiktionary:"nl.wiktionary.org",nlwikibooks:"nl.wikibooks.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nnwiki:"nn.wikipedia.org",nnwiktionary:"nn.wiktionary.org",nnwikiquote:"nn.wikiquote.org",nowiki:"no.wikipedia.org",nowiktionary:"no.wiktionary.org",nowikibooks:"no.wikibooks.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",novwiki:"nov.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nywiki:"ny.wikipedia.org",ocwiki:"oc.wikipedia.org",ocwiktionary:"oc.wiktionary.org",ocwikibooks:"oc.wikibooks.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwiktionary:"or.wiktionary.org",orwikisource:"or.wikisource.org",oswiki:"os.wikipedia.org",pawiki:"pa.wikipedia.org",pawiktionary:"pa.wiktionary.org",pawikibooks:"pa.wikibooks.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",pihwiki:"pih.wikipedia.org",plwiki:"pl.wikipedia.org",plwiktionary:"pl.wiktionary.org",plwikibooks:"pl.wikibooks.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",pmswiki:"pms.wikipedia.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswiktionary:"ps.wiktionary.org",pswikibooks:"ps.wikibooks.org",ptwiki:"pt.wikipedia.org",ptwiktionary:"pt.wiktionary.org",ptwikibooks:"pt.wikibooks.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",quwiki:"qu.wikipedia.org",quwiktionary:"qu.wiktionary.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",rmwiki:"rm.wikipedia.org",rmwiktionary:"rm.wiktionary.org",rmwikibooks:"rm.wikibooks.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",rowiki:"ro.wikipedia.org",rowiktionary:"ro.wiktionary.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwiktionary:"ru.wiktionary.org",ruwikibooks:"ru.wikibooks.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruewiki:"rue.wikipedia.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sawiki:"sa.wikipedia.org",sawiktionary:"sa.wiktionary.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",sdwiki:"sd.wikipedia.org",sdwiktionary:"sd.wiktionary.org",sdwikinews:"sd.wikinews.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",siwiki:"si.wikipedia.org",siwiktionary:"si.wiktionary.org",siwikibooks:"si.wikibooks.org",simplewiki:"simple.wikipedia.org",simplewiktionary:"simple.wiktionary.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",skwiki:"sk.wikipedia.org",skwiktionary:"sk.wiktionary.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",slwiki:"sl.wikipedia.org",slwiktionary:"sl.wiktionary.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",sqwiki:"sq.wikipedia.org",sqwiktionary:"sq.wiktionary.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",srwiki:"sr.wikipedia.org",srwiktionary:"sr.wiktionary.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srnwiki:"srn.wikipedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",stqwiki:"stq.wikipedia.org",suwiki:"su.wikipedia.org",suwiktionary:"su.wiktionary.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",svwiki:"sv.wikipedia.org",svwiktionary:"sv.wiktionary.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",swwiki:"sw.wikipedia.org",swwiktionary:"sw.wiktionary.org",swwikibooks:"sw.wikibooks.org",szlwiki:"szl.wikipedia.org",tawiki:"ta.wikipedia.org",tawiktionary:"ta.wiktionary.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tewiki:"te.wikipedia.org",tewiktionary:"te.wiktionary.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tetwiki:"tet.wikipedia.org",tgwiki:"tg.wikipedia.org",tgwiktionary:"tg.wiktionary.org",tgwikibooks:"tg.wikibooks.org",thwiki:"th.wikipedia.org",thwiktionary:"th.wiktionary.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwiktionary:"tk.wiktionary.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tlwiki:"tl.wikipedia.org",tlwiktionary:"tl.wiktionary.org",tlwikibooks:"tl.wikibooks.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwiktionary:"tr.wiktionary.org",trwikibooks:"tr.wikibooks.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwiktionary:"tt.wiktionary.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tywiki:"ty.wikipedia.org",tyvwiki:"tyv.wikipedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwiktionary:"ug.wiktionary.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ukwiki:"uk.wikipedia.org",ukwiktionary:"uk.wiktionary.org",ukwikibooks:"uk.wikibooks.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",urwiki:"ur.wikipedia.org",urwiktionary:"ur.wiktionary.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",uzwiki:"uz.wikipedia.org",uzwiktionary:"uz.wiktionary.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",vewiki:"ve.wikipedia.org",vecwiki:"vec.wikipedia.org",vecwiktionary:"vec.wiktionary.org",vecwikisource:"vec.wikisource.org",vepwiki:"vep.wikipedia.org",viwiki:"vi.wikipedia.org",viwiktionary:"vi.wiktionary.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowiktionary:"vo.wiktionary.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",wawiki:"wa.wikipedia.org",wawiktionary:"wa.wiktionary.org",wawikibooks:"wa.wikibooks.org",warwiki:"war.wikipedia.org",wowiki:"wo.wikipedia.org",wowiktionary:"wo.wiktionary.org",wowikiquote:"wo.wikiquote.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwiktionary:"xh.wiktionary.org",xhwikibooks:"xh.wikibooks.org",xmfwiki:"xmf.wikipedia.org", -yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",arwikimedia:"ar.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",etwikimedia:"ee.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",labswiki:"wikitech.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nzwikimedia:"nz.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",sourceswiki:"wikisource.org",specieswiki:"species.wikimedia.org",trwikimedia:"tr.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org"};e.exports=n},{}],9:[function(t,e,i){"use strict";var n=(Chart.Zoom=Chart.Zoom||{},{beforeInit:function(t){if(t.options.zoom){t.zoom={};var e=t.chart.ctx.canvas;t.zoom._mouseDownHandler=function(e){t.zoom._dragZoomStart=e},e.addEventListener("mousedown",t.zoom._mouseDownHandler),t.zoom._mouseMoveHandler=function(e){t.zoom._dragZoomStart&&(t.zoom._dragZoomEnd=e,t.update(0))},e.addEventListener("mousemove",t.zoom._mouseMoveHandler),t.zoom._mouseUpHandler=function(e){if(t.zoom._dragZoomStart){var i=t.zoom._dragZoomStart,n=i.target.getBoundingClientRect().left,o=Math.min(i.clientX,e.clientX)-n,a=Math.max(i.clientX,e.clientX)-n,r=t.scales["x-axis-0"],s=r.getValueForPixel(o),l=r.getValueForPixel(a),c=a-o;if(c<=0)return void(t.zoom._dragZoomStart=null);t.zoom._dragZoomStart=null,t.zoom._dragZoomEnd=null;var u=t.data.labels,d=$(".aqs-date-range-selector").data("daterangepicker");if(l-s+1===u.length)return t.update(0);d.startDate=moment(u[s],t.data.dateFormat),d.setEndDate(moment(u[l],t.data.dateFormat)),d.updateElement()}},e.addEventListener("mouseup",t.zoom._mouseUpHandler)}},beforeDatasetsDraw:function(t){if(t.options.zoom&&t.zoom._dragZoomStart&&t.zoom._dragZoomEnd){var e=t.chart.ctx,i=t.chartArea;e.save(),e.beginPath();var n=t.scales["y-axis-0"],o=t.zoom._dragZoomStart,a=t.zoom._dragZoomEnd,r=o.target.getBoundingClientRect().left,s=Math.min(o.clientX,a.clientX)-r,l=Math.max(o.clientX,a.clientX)-r,c=l-s;e.fillStyle="rgba(225,225,225,0.3)",e.lineWidth=5,e.fillRect(s,n.top,c,n.bottom-n.top),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}},afterDatasetsDraw:function(t){t.options.zoom&&t.chart.ctx.restore()}});Chart.pluginService.register(n)},{}],10:[function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var o={chartLegend:function(t){var e=function(e){var i,o,a,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=void 0;l=s?t.formatNumber(e.num_edits):t.getHistoryLink(e.label,t.formatNumber(e.num_edits));var c=$.i18n("basic-information"),u=(r={},n(r,$.i18n("pageviews"),(i={},n(i,$.i18n("pageviews"),t.formatNumber(e.sum)),n(i,$.i18n($("#date-type-select").val()+"-average"),t.formatNumber(e.average)),i)),n(r,$.i18n("revisions"),(o={},n(o,$.i18n("edits"),l),n(o,$.i18n("editors"),t.formatNumber(e.num_users)),o)),n(r,c,(a={},n(a,$.i18n("watchers"),e.watchers?t.formatNumber(e.watchers):$.i18n("unknown")),n(a,$.i18n("size"),e.length?t.formatNumber(e.length):""),a)),r);s||(e.assessment&&(u[c]=n({},$.i18n("class"),e.assessment)),u[c]=n({},$.i18n("protection"),e.protection));var d="";for(var h in u){var p=h.toLowerCase().score();d+="
\n
"+h+"

\n
";for(var f in u[h]){var g=u[h][f];g&&(d+='\n
\n '+f+":\n \n "+g+"\n \n
")}d+="
"}return s||(d+='\n "),d};if(1===t.outputData.length)return e(t.outputData[0]);var i=t.outputData.reduce(function(t,e){return t+e.sum},0),o={sum:i,average:Math.round(i/t.outputData[0].data.filter(function(t){return null!==t}).length),num_edits:t.entityInfo.totals?t.entityInfo.totals.num_edits:null,num_users:t.entityInfo.totals?t.entityInfo.totals.num_users:null,watchers:t.outputData.reduce(function(t,e){return t+e.watchers||0},0),length:t.outputData.reduce(function(t,e){return t+e.length},0)};return e(o,!0)},tableRow:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=i?"th":"td",o=i?"":'\n '+$.i18n("all-languages")+'\n •\n '+$.i18n("redirects")+"\n ",a=$.isNumeric(e.num_users)?t.formatNumber(e.num_users):"?",r=void 0;return r=$.isNumeric(e.num_edits)?i?t.formatNumber(e.num_edits):t.getHistoryLink(e.label,t.formatNumber(e.num_edits)):"?",$(".table-view--average .col-heading").text($.i18n($("#date-type-select").val()+"-average")),"\n \n <"+n+" class='table-view--color-col'>\n \n \n <"+n+" class='table-view--title'>"+(i?e.label:t.getPageLink(e.label))+"\n <"+n+" class='table-view--class'>"+(e.assessment||"")+"\n <"+n+" class='table-view--views'>"+t.formatNumber(e.sum)+"\n <"+n+" class='table-view--average'>"+t.formatNumber(e.average)+"\n <"+n+" class='table-view-edits table-view--edit-data'>"+r+"\n <"+n+" class='table-view-editors table-view--edit-data'>"+a+"\n <"+n+" class='table-view--size'>"+t.formatNumber(e.length)+"\n <"+n+" class='table-view--protection'>"+e.protection+"\n <"+n+" class='table-view--watchers'>"+(e.watchers?t.formatNumber(e.watchers):$.i18n("unknown"))+"\n <"+n+">"+o+"\n \n "}};e.exports=o},{}]},{},[2]); \ No newline at end of file +yiwiki:"yi.wikipedia.org",yiwiktionary:"yi.wiktionary.org",yiwikisource:"yi.wikisource.org",yowiki:"yo.wikipedia.org",yowiktionary:"yo.wiktionary.org",yowikibooks:"yo.wikibooks.org",zawiki:"za.wikipedia.org",zawiktionary:"za.wiktionary.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zeawiki:"zea.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwiktionary:"zh.wiktionary.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_yuewiki:"zh-yue.wikipedia.org",zuwiki:"zu.wikipedia.org",zuwiktionary:"zu.wiktionary.org",zuwikibooks:"zu.wikibooks.org",arwikimedia:"ar.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",etwikimedia:"ee.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",labswiki:"wikitech.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nzwikimedia:"nz.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",sourceswiki:"wikisource.org",specieswiki:"species.wikimedia.org",trwikimedia:"tr.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org"};e.exports=n},{}],9:[function(t,e,i){"use strict";var n=(Chart.Zoom=Chart.Zoom||{},{beforeInit:function(t){if(t.options.zoom){t.zoom={};var e=t.chart.ctx.canvas;t.zoom._mouseDownHandler=function(e){t.zoom._dragZoomStart=e},e.addEventListener("mousedown",t.zoom._mouseDownHandler),t.zoom._mouseMoveHandler=function(e){t.zoom._dragZoomStart&&(t.zoom._dragZoomEnd=e,t.update(0))},e.addEventListener("mousemove",t.zoom._mouseMoveHandler),t.zoom._mouseUpHandler=function(e){if(t.zoom._dragZoomStart){var i=t.zoom._dragZoomStart,n=i.target.getBoundingClientRect().left,o=Math.min(i.clientX,e.clientX)-n,a=Math.max(i.clientX,e.clientX)-n,r=t.scales["x-axis-0"],s=r.getValueForPixel(o),l=r.getValueForPixel(a),c=a-o;if(c<=0)return void(t.zoom._dragZoomStart=null);t.zoom._dragZoomStart=null,t.zoom._dragZoomEnd=null;var u=t.data.labels,d=$(".aqs-date-range-selector").data("daterangepicker");if(l-s+1===u.length)return t.update(0);d.startDate=moment(u[s],t.data.dateFormat),d.setEndDate(moment(u[l],t.data.dateFormat)),d.updateElement()}},e.addEventListener("mouseup",t.zoom._mouseUpHandler)}},beforeDatasetsDraw:function(t){if(t.options.zoom&&t.zoom._dragZoomStart&&t.zoom._dragZoomEnd){var e=t.chart.ctx,i=t.chartArea;e.save(),e.beginPath();var n=t.scales["y-axis-0"],o=t.zoom._dragZoomStart,a=t.zoom._dragZoomEnd,r=o.target.getBoundingClientRect().left,s=Math.min(o.clientX,a.clientX)-r,l=Math.max(o.clientX,a.clientX)-r,c=l-s;e.fillStyle="rgba(225,225,225,0.3)",e.lineWidth=5,e.fillRect(s,n.top,c,n.bottom-n.top),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip()}},afterDatasetsDraw:function(t){t.options.zoom&&t.chart.ctx.restore()}});Chart.pluginService.register(n)},{}],10:[function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var o={chartLegend:function(t){var e=function(e){var i,o,a,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=void 0;l=s?t.formatNumber(e.num_edits):t.getHistoryLink(e.label,t.formatNumber(e.num_edits));var c=$.i18n("basic-information"),u=(r={},n(r,$.i18n("pageviews"),(i={},n(i,$.i18n("pageviews"),t.formatNumber(e.sum)),n(i,$.i18n($("#date-type-select").val()+"-average"),t.formatNumber(e.average)),i)),n(r,$.i18n("revisions"),(o={},n(o,$.i18n("edits"),l),n(o,$.i18n("editors"),t.formatNumber(e.num_users)),o)),n(r,c,(a={},n(a,$.i18n("watchers"),e.watchers?t.formatNumber(e.watchers):$.i18n("unknown")),n(a,$.i18n("size"),e.length?t.formatNumber(e.length):""),a)),r);if(!s){var d=n({},$.i18n("protection"),e.protection);e.assessment&&(d[$.i18n("class")]=e.assessment),Object.assign(u[c],d)}var h="";for(var p in u){var f=p.toLowerCase().score();h+="
\n
"+p+"

\n
";for(var g in u[p]){var m=u[p][g];m&&(h+='\n
\n '+g+":\n \n "+m+"\n \n
")}h+="
"}return s||(h+='\n "),h};if(1===t.outputData.length)return e(t.outputData[0]);var i=t.outputData.reduce(function(t,e){return t+e.sum},0),o={sum:i,average:Math.round(i/t.outputData[0].data.filter(function(t){return null!==t}).length),num_edits:t.entityInfo.totals?t.entityInfo.totals.num_edits:null,num_users:t.entityInfo.totals?t.entityInfo.totals.num_users:null,watchers:t.outputData.reduce(function(t,e){return t+e.watchers||0},0),length:t.outputData.reduce(function(t,e){return t+e.length},0)};return e(o,!0)},tableRow:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=i?"th":"td",o=i?"":'\n '+$.i18n("all-languages")+'\n •\n '+$.i18n("redirects")+"\n ",a=$.isNumeric(e.num_users)?t.formatNumber(e.num_users):"?",r=void 0;return r=$.isNumeric(e.num_edits)?i?t.formatNumber(e.num_edits):t.getHistoryLink(e.label,t.formatNumber(e.num_edits)):"?",$(".table-view--average .col-heading").text($.i18n($("#date-type-select").val()+"-average")),"\n \n <"+n+" class='table-view--color-col'>\n \n \n <"+n+" class='table-view--title'>"+(i?e.label:t.getPageLink(e.label))+"\n <"+n+" class='table-view--class'>"+(e.assessment||"")+"\n <"+n+" class='table-view--views'>"+t.formatNumber(e.sum)+"\n <"+n+" class='table-view--average'>"+t.formatNumber(e.average)+"\n <"+n+" class='table-view-edits table-view--edit-data'>"+r+"\n <"+n+" class='table-view-editors table-view--edit-data'>"+a+"\n <"+n+" class='table-view--size'>"+t.formatNumber(e.length)+"\n <"+n+" class='table-view--protection'>"+e.protection+"\n <"+n+" class='table-view--watchers'>"+(e.watchers?t.formatNumber(e.watchers):$.i18n("unknown"))+"\n <"+n+">"+o+"\n \n "}};e.exports=o},{}]},{},[2]); \ No newline at end of file