From f4d4bea752f6900eadd8ca2f01ccc9b1ba459652 Mon Sep 17 00:00:00 2001
From: MusikAnimal ');for(var i=0;i
"),e.join("")}}},t.Chart=t,t}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,i,n){function a(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?p:w,y),b-=e.height):(e=t.update(v,k),w-=e.width),x.push({horizontal:i,minSize:e,box:t})}function o(t){var i=e.findNextWhere(x,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:D,right:C,top:0,bottom:0};t.update(t.options.fullWidth?p:w,g/2,n)}else t.update(i.minSize.width,b)}function r(t){var i=e.findNextWhere(x,function(e){return e.box===t}),n={left:0,right:0,top:M,bottom:S};i&&t.update(i.minSize.width,b,n)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:D,t.right=t.options.fullWidth?i-l:D+w,t.top=P,t.bottom=P+t.height,P=t.bottom):(t.left=T,t.right=T+t.width,t.top=M,t.bottom=M+b,T=t.right)}if(t){var l=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),u=e.where(t.boxes,function(t){return"right"===t.options.position}),d=e.where(t.boxes,function(t){return"top"===t.options.position}),h=e.where(t.boxes,function(t){return"bottom"===t.options.position}),f=e.where(t.boxes,function(t){return"chartArea"===t.options.position});d.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),h.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var p=i-2*l,g=n-0,m=p/2,k=g/2,v=(i-m)/(c.length+u.length),y=(n-k)/(d.length+h.length),w=p,b=g,x=[];e.each(c.concat(u,d,h),a);var D=l,C=l,M=0,S=0;e.each(c.concat(u),o),e.each(c,function(t){D+=t.width}),e.each(u,function(t){C+=t.width}),e.each(d.concat(h),o),e.each(d,function(t){M+=t.height}),e.each(h,function(t){S+=t.height}),e.each(c.concat(u),r),D=l,C=l,M=0,S=0,e.each(c,function(t){D+=t.width}),e.each(u,function(t){C+=t.width}),e.each(d,function(t){M+=t.height}),e.each(h,function(t){S+=t.height});var Y=n-M-S,_=i-D-C;(_!==w||Y!==b)&&(e.each(c,function(t){t.height=Y}),e.each(u,function(t){t.height=Y}),e.each(d,function(t){t.options.fullWidth||(t.width=_)}),e.each(h,function(t){t.options.fullWidth||(t.width=_)}),b=Y,w=_);var T=l,P=0;e.each(c.concat(d),s),T+=w,P+=b,e.each(u,s),e.each(h,s),t.chartArea={left:D,top:M,right:D+w,bottom:M+b},e.each(f,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(w,b)})}}}}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var i=t.data;return e.isArray(i.datasets)?i.datasets.map(function(i,n){return{text:i.label,fillStyle:e.isArray(i.backgroundColor)?i.backgroundColor[0]:i.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,datasetIndex:n}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:i,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,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:i,beforeBuildLabels:i,buildLabels:function(){var t=this;t.legendItems=t.options.labels.generateLabels.call(t,t.chart),t.options.reverse&&t.legendItems.reverse()},afterBuildLabels:i,beforeFit:i,fit:function(){var i=this,n=i.options,a=n.labels,o=n.display,r=i.ctx,s=t.defaults.global,l=e.getValueOrDefault,c=l(a.fontSize,s.defaultFontSize),u=l(a.fontStyle,s.defaultFontStyle),d=l(a.fontFamily,s.defaultFontFamily),h=e.fontString(c,u,d),f=i.legendHitBoxes=[],p=i.minSize,g=i.isHorizontal();if(g?(p.width=i.maxWidth,p.height=o?10:0):(p.width=o?10:0,p.height=i.maxHeight),o)if(r.font=h,g){var m=i.lineWidths=[0],k=i.legendItems.length?c+a.padding:0;r.textAlign="left",r.textBaseline="top",e.each(i.legendItems,function(t,e){var n=a.usePointStyle?c*Math.sqrt(2):a.boxWidth,o=n+c/2+r.measureText(t.text).width;m[m.length-1]+o+a.padding>=i.width&&(k+=c+a.padding,m[m.length]=i.left),f[e]={left:0,top:0,width:o,height:c},m[m.length-1]+=o+a.padding}),p.height+=k}else{var v=a.padding,y=i.columnWidths=[],w=a.padding,b=0,x=0,D=c+v;e.each(i.legendItems,function(t,e){var i=a.usePointStyle?2*a.boxWidth:a.boxWidth,n=i+c/2+r.measureText(t.text).width;x+D>p.height&&(w+=b+a.padding,y.push(b),b=0,x=0),b=Math.max(b,n),x+=D,f[e]={left:0,top:0,width:n,height:c}}),w+=b,y.push(b),p.width+=w}i.width=p.width,i.height=p.height},afterFit:i,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var i=this,n=i.options,a=n.labels,o=t.defaults.global,r=o.elements.line,s=i.width,l=i.lineWidths;if(n.display){var c,u=i.ctx,d=e.getValueOrDefault,h=d(a.fontColor,o.defaultFontColor),f=d(a.fontSize,o.defaultFontSize),p=d(a.fontStyle,o.defaultFontStyle),g=d(a.fontFamily,o.defaultFontFamily),m=e.fontString(f,p,g);u.textAlign="left",u.textBaseline="top",u.lineWidth=.5,u.strokeStyle=h,u.fillStyle=h,u.font=m;var k=a.boxWidth,v=i.legendHitBoxes,y=function(e,i,a){if(!(isNaN(k)||0>=k)){u.save(),u.fillStyle=d(a.fillStyle,o.defaultColor),u.lineCap=d(a.lineCap,r.borderCapStyle),u.lineDashOffset=d(a.lineDashOffset,r.borderDashOffset),u.lineJoin=d(a.lineJoin,r.borderJoinStyle),u.lineWidth=d(a.lineWidth,r.borderWidth),u.strokeStyle=d(a.strokeStyle,o.defaultColor);var s=0===d(a.lineWidth,r.borderWidth);if(u.setLineDash&&u.setLineDash(d(a.lineDash,r.borderDash)),n.labels&&n.labels.usePointStyle){var l=f*Math.SQRT2/2,c=l/Math.SQRT2,h=e+c,p=i+c;t.canvasHelpers.drawPoint(u,a.pointStyle,l,h,p)}else s||u.strokeRect(e,i,k,f),u.fillRect(e,i,k,f);u.restore()}},w=function(t,e,i,n){u.fillText(i.text,k+f/2+t,e),i.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(k+f/2+t,e+f/2),u.lineTo(k+f/2+t+n,e+f/2),u.stroke())},b=i.isHorizontal();c=b?{x:i.left+(s-l[0])/2,y:i.top+a.padding,line:0}:{x:i.left+a.padding,y:i.top+a.padding,line:0};var x=f+a.padding;e.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,o=a.usePointStyle?f+f/2+n:k+f/2+n,r=c.x,d=c.y;b?r+o>=s&&(d=c.y+=x,c.line++,r=c.x=i.left+(s-l[c.line])/2):d+x>i.bottom&&(r=c.x=r+i.columnWidths[c.line]+a.padding,d=c.y=i.top,c.line++),y(r,d,t),v[e].left=r,v[e].top=d,w(r,d,t,n),b?c.x+=o+a.padding:c.y+=x})}},handleEvent:function(t){var i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var o=e.getRelativePosition(t,i.chart.chart),r=o.x,s=o.y;if(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)for(var l=i.legendHitBoxes,c=0;c"+$.i18n("totals")+" \n "+$.i18n("num-languages",e.length)+" \n "+$.i18n("unique-titles",t.outputData.titles.length)+" \n "+i+" \n "+t.formatNumber(t.outputData.sum)+" \n "+t.formatNumber(Math.round(t.outputData.average))+" "),$("#output_list").html(""),e.forEach(function(e,i){var n="";e.badges&&(n=e.badges.map(t.getBadgeMarkup.bind(t)).join()),$("#output_list").append("\n ")})})}},{key:"getSortProperty",value:function(t,e){switch(e){case"lang":return t.lang;case"title":return t.label;case"badges":return t.badges.sort().join("");case"views":return Number(t.sum)}}},{key:"getPageViewsData",value:function(t){var e=this,i=this.daterangepicker.startDate.startOf("day"),n=this.daterangepicker.endDate.startOf("day"),a=Object.keys(t),o=$.Deferred(),r=[],s=0,l={},c=a.length,u=[],d=[],h=function a(h){var f=t[h],p=encodeURIComponent(f.title),g="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+f.lang+"."+e.baseProject+"/"+$(e.config.platformSelector).val()+"/"+$(e.config.agentSelector).val()+"/"+p+"/daily/"+i.format(e.config.timestampFormat)+"/"+n.format(e.config.timestampFormat),m=$.ajax({url:g,dataType:"json"});r.push(m),m.done(function(t){d.push({badges:f.badges,dbName:h,lang:f.lang,title:f.title,url:f.url,items:t.items})}).fail(function(t){var i=t.responseJSON&&t.responseJSON.title?t.responseJSON.title:$.i18n("unknown"),n="Error in Cassandra table storage backend"===i,o=e.getPageLink(f.title,f.lang+"."+e.baseProject+".org");if(n){if(l[h]?l[h]++:l[h]=1,l[h]<3)return c++,e.rateLimit(a,e.config.apiThrottle,e)(h);u.push(o)}else e.writeMessage(o+": "+$.i18n("api-error","Pageviews API")+" - "+i);404!==t.status&&(e.hadFailure=!0)}).always(function(){e.updateProgressBar(++s,c),s===c&&(u.length&&e.writeMessage($.i18n("api-error-timeout",""+(i+1)+" \n "+e.lang+" \n "+t.getPageLink(e.label,e.lang+"."+t.baseProject+".org")+" \n "+n+" \n "+t.formatNumber(e.sum)+" \n "+t.formatNumber(Math.round(e.average))+" \n "+u.map(function(t){return"
")),o.resolve(d))})},f=this.rateLimit(h,this.config.apiThrottle,this);return a.forEach(function(t,e){f(t)}),o}},{key:"getInterwikiData",value:function(t,e){var i=this,n=$.Deferred(),a="https://www.wikidata.org/w/api.php?action=wbgetentities&sites="+t+"&titles="+encodeURIComponent(e)+"&props=sitelinks/urls|datatype&format=json&callback=?";return $.getJSON(a).done(function(t){if(t.error)return n.reject($.i18n("api-error","Wikidata")+": "+t.error.info);if(t.entities[-1])return n.reject(""+e.descore().escape()+" - "+$.i18n("api-error-no-data"));var a=Object.keys(t.entities)[0],o=t.entities[a].sitelinks,r={},s=new RegExp("^https://[\\w-]+\\."+i.baseProject+"\\.org");return Object.keys(o).forEach(function(t){var e=o[t].site.replace(/-/g,"_");s.test(o[t].url)&&u[e]&&(o[t].lang=u[e].replace(/\.wiki.*$/,""),r[t]=o[t])}),n.resolve(r)}),n}},{key:"getPageNameFromURL",value:function(t){return t.includes("?")?t.match(/\?(?:.*\b)?title=(.*?)(?:&|$)/)[1]:t.match(/\/wiki\/(.*?)(?:\?|$)/)[1]}},{key:"popParams",value:function(){var t=this,e=this.validateParams(this.parseQueryString("pages"));$(this.config.projectInput).val(e.project),this.validateDateRange(e),$(".site-notice .alert-danger").length&&delete e.page,$(this.config.platformSelector).val(e.platform),$(this.config.agentSelector).val(e.agent),["sort","direction","view"].forEach(function(i){t[i]=e[i]}),this.setupSourceInput(),e.page?this.getPageInfo([e.page]).done(function(e){var i=Object.keys(e)[0];if(e[i].missing)return t.setState("initial"),t.writeMessage(t.getPageLink(i)+": "+$.i18n("api-error-no-data"));$(t.config.sourceInput).val(i),t.processInput()}).fail(function(){t.writeMessage($.i18n("api-error-unknown","Info"))}):$(this.config.sourceInput).focus()}},{key:"setState",value:function(t){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(t),t){case"initial":this.clearMessages(),this.assignDefaults(),this.destroyChart(),$(".output").removeClass("list-mode").removeClass("chart-mode"),$(".data-links").addClass("invisible"),this.typeahead&&this.typeahead.hide(),$(this.config.sourceInput).val("").focus();break;case"processing":this.processStarted(),this.clearMessages(),document.activeElement.blur(),$(".progress-bar").addClass("active");break;case"complete":this.processEnded(),this.updateProgressBar(0),$(".progress-bar").removeClass("active"),$(".data-links").removeClass("invisible")}}},{key:"processInput",value:function(){var t=this;this.patchUsage();var e=$(this.config.sourceInput).val();this.setState("processing");var i=function(){$(".output-title").html(t.outputData.link),$(".output-params").html($(t.config.dateRangeSelector).val()),t.setInitialChartType(),t.renderData()};if(this.isRequestCached())return $(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("loading-cache")),setTimeout(function(){t.outputData=simpleStorage.get(t.getCacheKey()),i()},500);var n=Object.keys(u).find(function(e){return u[e]===$(t.config.projectInput).val()});$(".progress-counter").text($.i18n("fetching-data","Wikidata")),this.getInterwikiData(n,e).done(function(n){t.getPageViewsData(n).done(function(n){$(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("building-dataset"));var a=t.getPageLink(e,t.project);setTimeout(function(){t.buildMotherDataset(e,a,n),i()},250)})}).fail(function(e){t.setState("initial"),"string"==typeof e?t.writeMessage(e):t.writeMessage($.i18n("api-error-unknown","Wikidata"))})}},{key:"setupSourceInput",value:function(){this.typeahead&&this.typeahead.destroy(),$(this.config.sourceInput).typeahead({ajax:{url:"https://"+this.project+".org/w/api.php",timeout:200,triggerLength:1,method:"get",preDispatch:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t}},preProcess:function(t){return t.query.prefixsearch.map(function(t){return t.title})}}})}},{key:"validateProject",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this,!0)&&(this.setState("initial"),this.setupSourceInput())}},{key:"exportCSV",value:function(){var t=this,e="data:text/csv;charset=utf-8,Language,Title,Badges,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(i){var n='"'+i.label.descore().replace(/"/g,'""')+'"',a='"'+i.badges.map(function(e){return t.config.badges[e].name.replace(/"/g,'""')})+'"';e+=[i.lang,n,a].concat(i.data).join(",")+"\n"}),this.downloadData(e,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}},{key:"typeahead",get:function(){return $(this.config.sourceInput).data("typeahead")}}]),e}(mix(d).with(h,f));$(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 p})},{"../shared/chart_helpers":3,"../shared/list_helpers":5,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(t,e,i){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e"+r.map(function(t){return"
")))})};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:"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;Chart.defaults.global.elements.point.hitRadius=t>50?3:t>30?5:t>20?10: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 a=Math.max.apply(Math,n((e=[]).concat.apply(e,i)));if(a<=10)return!1;var o=!1;return i.forEach(function(t){t.push(a);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 o=!0}),o}},{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.minDate.toDate(),endDate:this.maxMonth,disableTouchKeyboard:!0}),t=t||this.initialMonthStart,e=e||this.maxMonth;var n=function(t,e){return t
To use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":4,"./polyfills":6,"./pv_config":8,"./site_map":9}],8:[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 a=function(){function t(t,e){for(var i=0;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":4,"./polyfills":6,"./pv_config":8,"./site_map":9}],8:[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 a=function(){function t(t,e){for(var i=0;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":4,"./polyfills":6,"./pv_config":8,"./site_map":9}],8:[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 a=function(){function t(t,e){for(var i=0;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":5,"./polyfills":7,"./pv_config":9,"./site_map":10}],9:[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 a=function(){function t(t,e){for(var i=0;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":5,"./polyfills":7,"./pv_config":9,"./site_map":10}],9:[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 a=function(){function t(t,e){for(var i=0;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),r(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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 a(e,t),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var o=$(".interapp-links--entry").length;o>0&&n+e+i>t;){var r=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();r.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(r),n=$(".interapp-links").outerWidth()+i,o--}}}},{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),iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),r(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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 a(e,t),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var o=$(".interapp-links--entry").length;o>0&&n+e+i>t;){var r=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();r.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(r),n=$(".interapp-links").outerWidth()+i,o--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./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;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),a(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var o=$(".interapp-links--entry").length;o>0&&n+e+i>t;){var a=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();a.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(a),n=$(".interapp-links").outerWidth()+i,o--}}}},{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), +var n=t.pages[i]||{},o=e.entityInfo.entities[i].protection||[];Array.isArray(o)&&(o=o.find(function(t){return"edit"===t.type})),n.protection=o?o.level:$.i18n("none").toLowerCase(),Object.assign(e.entityInfo.entities[i],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(u).with(h));$(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 p})},{"../shared/chart_helpers":4,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[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=function(){function t(t,e){var i=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a={chartLegend:function(t){var e=function(e){var i,a,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=void 0;if(s)l=t.formatNumber(e.num_edits);else{var c=t.getDates(),u=o(c,2),d=u[1];l=t.getHistoryLink(e.label,t.formatNumber(e.num_edits),t.isMonthly()?d.endOf("month"):d,e.num_edits)}var h=$.i18n("basic-information"),p=n({},$.i18n("pageviews"),t.formatNumber(e.sum));t.shouldBeLogarithmic(t.outputData.map(function(t){return t.data}))&&(p[$.i18n("median")]=t.formatNumber(e.median)),p[$.i18n($("#date-type-select").val()+"-average")]=t.formatNumber(e.average);var f=(r={},n(r,$.i18n("pageviews"),p),n(r,$.i18n("revisions"),(i={},n(i,$.i18n("edits"),l),n(i,$.i18n("editors"),t.formatNumber(e.num_users)),i)),n(r,h,(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 g,m=e.assessment?t.getAssessmentBadge(e)+" "+e.assessment.upcase():"";Object.assign(f[h],(g={},n(g,$.i18n("protection"),e.protection),n(g,$.i18n("class"),m),g))}var v="";for(var k in f){v+="To use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n https://"+location.host+s+"\n
\n\n Redirecting you to the production "+document.title+" in\n 10...\n
\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),a(i)}return i.debug?window.app=i:i.splash(),i.loadTranslations(),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),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),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,appPath+"/"+currentApp+"/messages/"+i18nLang+".json");"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]=appPath+"/"+currentApp+"/messages/"+e+".json"}),t.en=appPath+"/"+currentApp+"/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var o=$(".interapp-links--entry").length;o>0&&n+e+i>t;){var a=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();a.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(a),n=$(".interapp-links").outerWidth()+i,o--}}}},{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"+t+"
")});if(this.debug)throw t[0];t&&t[0]&&t[0].stack&&function(t){e.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",e.getBugReportURL(t))+"\n ",0)}()}},{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):d.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){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append(" ")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{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="mediaviews"===this.app?"commons.wikimedia.org":$(this.config.projectInput).val();return t?t.toLowerCase().replace(/.org$/,""):null}}],[{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":5,"./polyfills":6,"./pv_config":8,"./site_map":9}],8:[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;iTo use the staging app, append debug=true
to the URL
Otherwise, please update your links to use\n