diff --git a/javascripts/langviews/config.js b/javascripts/langviews/config.js index 4c7a5c29c..7ff66446b 100644 --- a/javascripts/langviews/config.js +++ b/javascripts/langviews/config.js @@ -42,7 +42,6 @@ const config = { name: 'Validated' } }, - dateLimit: 90, // num days dateRangeSelector: '#range_input', defaults: { dateRange: 'latest-20', diff --git a/javascripts/massviews/config.js b/javascripts/massviews/config.js index a6b3f65df..5a845b8e4 100644 --- a/javascripts/massviews/config.js +++ b/javascripts/massviews/config.js @@ -12,7 +12,6 @@ const config = { agentSelector: '#agent_select', chart: '.aqs-chart', - dateLimit: 31, // num days dateRangeSelector: '#range_input', defaults: { dateRange: 'latest-20', diff --git a/javascripts/redirectviews/config.js b/javascripts/redirectviews/config.js index 25dac067f..29316c15f 100644 --- a/javascripts/redirectviews/config.js +++ b/javascripts/redirectviews/config.js @@ -16,7 +16,6 @@ const config = { return `${$.i18n('totals')}: ${scope.formatNumber(scope.outputData.sum)} (${scope.formatNumber(Math.round(scope.outputData.average))}/${$.i18n('day')})`; }, - dateLimit: 90, // num days dateRangeSelector: '#range_input', defaults: { dateRange: 'latest-20', diff --git a/public_html/langviews/application.js b/public_html/langviews/application.js index 523511a6c..124c8e920 100644 --- a/public_html/langviews/application.js +++ b/public_html/langviews/application.js @@ -9,7 +9,7 @@ if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(t r.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;t>i;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,o=n.chartArea,a=n.options,r=a.elements.arc,s=o.right-o.left-r.borderWidth,l=o.bottom-o.top-r.borderWidth,c=Math.min(s,l),u={x:0,y:0},d=i.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var p=a.rotation%(2*Math.PI);p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0);var g=p+f,m={x:Math.cos(p),y:Math.sin(p)},k={x:Math.cos(g),y:Math.sin(g)},v=0>=p&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,w=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,b=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,x=h/100,D={x:y?-1:Math.min(m.x*(m.x<0?1:x),k.x*(k.x<0?1:x)),y:b?-1:Math.min(m.y*(m.y<0?1:x),k.y*(k.y<0?1:x))},C={x:v?1:Math.max(m.x*(m.x>0?1:x),k.x*(k.x>0?1:x)),y:w?1:Math.max(m.y*(m.y>0?1:x),k.y*(k.y>0?1:x))},S={width:.5*(C.x-D.x),height:.5*(C.y-D.y)};c=Math.min(s/S.width,l/S.height),u={x:(C.x+D.x)*-.5,y:(C.y+D.y)*-.5}}n.borderWidth=i.getMaxBorderWidth(d.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=u.x*n.outerRadius,n.offsetY=u.y*n.outerRadius,d.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=i.outerRadius-n.radiusLength,e.each(d.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var o=this,a=o.chart,r=a.chartArea,s=a.options,l=s.animation,c=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=o.getDataset(),p=n&&l.animateRotate?0:t.hidden?0:o.calculateCircumference(f.data[i])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:o.innerRadius,m=n&&l.animateScale?0:o.outerRadius,k=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:o.index,_index:i,_model:{x:c+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:m,innerRadius:g,label:k(f.label,i,a.data.labels[i])}});var v=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(0===i?v.startAngle=s.rotation:v.startAngle=o.getMeta().data[i-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),o=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(o+=Math.abs(t))}),o},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,a=t.length,r=0;a>r;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=t[r]._chart?t[r]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,addElementAndReset:function(i){var n=this,o=n.chart.options,a=n.getMeta();t.DatasetController.prototype.addElementAndReset.call(n,i),e(n.getDataset(),o)&&0!==a.dataset._model.tension&&n.updateBezierControlPoints()},update:function(t){var n,o,a,r=this,s=r.getMeta(),l=s.dataset,c=s.data||[],u=r.chart.options,d=u.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,u);for(p&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=h,l._datasetIndex=r.index,l._children=c,l._model={spanGaps:f.spanGaps?f.spanGaps:u.spanGaps,tension:a.tension?a.tension:i.getValueOrDefault(f.lineTension,d.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||d.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||d.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||d.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:a.steppedLine?a.steppedLine:i.getValueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:i.getValueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode),scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePixel()},l.pivot()),n=0,o=c.length;o>n;++n)r.updateElement(c[n],n,t);for(p&&0!==l._model.tension&&r.updateBezierControlPoints(),n=0,o=c.length;o>n;++n)c[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,o=this.getDataset(),a=t.custom||{};return a.backgroundColor?n=a.backgroundColor:o.pointBackgroundColor?n=i.getValueAtIndexOrDefault(o.pointBackgroundColor,e,n):o.backgroundColor&&(n=o.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,o=this.getDataset(),a=t.custom||{};return a.borderColor?n=a.borderColor:o.pointBorderColor?n=i.getValueAtIndexOrDefault(o.pointBorderColor,e,n):o.borderColor&&(n=o.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,o=this.getDataset(),a=t.custom||{};return a.borderWidth?n=a.borderWidth:o.pointBorderWidth?n=i.getValueAtIndexOrDefault(o.pointBorderWidth,e,n):o.borderWidth&&(n=o.borderWidth),n},updateElement:function(t,e,n){var o,a,r=this,s=r.getMeta(),l=t.custom||{},c=r.getDataset(),u=r.index,d=c.data[e],h=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),p=r.chart.options.elements.point,g=r.chart.data.labels||[],m=1===g.length||1===c.data.length||r.chart.isCombo;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),o=f.getPixelForValue("object"==typeof d?d:NaN,e,u,m),a=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=f,t._yScale=h,t._datasetIndex=u,t._index=e,t._model={x:o,y:a,skip:l.skip||isNaN(o)||isNaN(a),radius:l.radius||i.getValueAtIndexOrDefault(c.pointRadius,e,p.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(c.pointStyle,e,p.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(c.pointHitRadius,e,p.hitRadius)}},calculatePointY:function(t,e,i){var n,o,a,r=this,s=r.chart,l=r.getMeta(),c=r.getScaleForId(l.yAxisID),u=0,d=0;if(c.options.stacked){for(n=0;i>n;n++)if(o=s.data.datasets[n],a=s.getDatasetMeta(n),"line"===a.type&&a.yAxisID===c.id&&s.isDatasetVisible(n)){var h=Number(c.getRightValue(o.data[e]));0>h?d+=h||0:u+=h||0}var f=Number(c.getRightValue(t));return 0>f?c.getPixelForValue(d+f):c.getPixelForValue(u+f)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,o,a,r,s=this,l=s.getMeta(),c=s.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(u);else for(e=0,n=u.length;n>e;++e)o=u[e],a=o._model,r=i.splineCurve(i.previousItem(u,e)._model,a,i.nextItem(u,e)._model,l.dataset._model.tension),a.controlPointPreviousX=r.previous.x,a.controlPointPreviousY=r.previous.y,a.controlPointNextX=r.next.x,a.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;n>e;++e)a=u[e]._model,a.controlPointPreviousX=t(a.controlPointPreviousX,c.left,c.right),a.controlPointPreviousY=t(a.controlPointPreviousY,c.top,c.bottom),a.controlPointNextX=t(a.controlPointNextX,c.left,c.right),a.controlPointNextY=t(a.controlPointNextY,c.top,c.bottom)},draw:function(t){var i,n,o=this,a=o.getMeta(),r=a.data||[],s=t||1;for(i=0,n=r.length;n>i;++i)r[i].transition(s);for(e(o.getDataset(),o.chart.options)&&a.dataset.transition(s).draw(),i=0,n=r.length;n>i;++i)r[i].draw()},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=t._model;a.radius=o.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=o.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(a.backgroundColor)),a.borderColor=o.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(a.borderColor)),a.borderWidth=o.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=a.radius||i.getValueAtIndexOrDefault(n.pointRadius,o,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,o),r.borderColor=e.getPointBorderColor(t,o),r.borderWidth=e.getPointBorderWidth(t,o)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,o){var a=t.getDatasetMeta(0),r=i.datasets[0],s=a.data[o],l=s.custom||{},c=e.getValueAtIndexOrDefault,u=t.options.elements.arc,d=l.backgroundColor?l.backgroundColor:c(r.backgroundColor,o,u.backgroundColor),h=l.borderColor?l.borderColor:c(r.borderColor,o,u.borderColor),f=l.borderWidth?l.borderWidth:c(r.borderWidth,o,u.borderWidth);return{text:n,fillStyle:d,strokeStyle:h,lineWidth:f,hidden:isNaN(r.data[o])||a.data[o].hidden,index:o}}):[]}},onClick:function(t,e){var i,n,o,a=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;n>i;++i)o=r.getDatasetMeta(i),o.data[a].hidden=!o.data[a].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,o=n.chartArea,a=i.getMeta(),r=n.options,s=r.elements.arc,l=Math.min(o.right-o.left,o.bottom-o.top);n.outerRadius=Math.max((l-s.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,a.count=i.countVisibleElements(),e.each(a.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var o=this,a=o.chart,r=o.getDataset(),s=a.options,l=s.animation,c=a.scale,u=e.getValueAtIndexOrDefault,d=a.data.labels,h=o.calculateCircumference(r.data[i]),f=c.xCenter,p=c.yCenter,g=0,m=o.getMeta(),k=0;i>k;++k)isNaN(r.data[k])||m.data[k].hidden||++g;var v=s.startAngle,w=t.hidden?0:c.getDistanceFromCenterForValue(r.data[i]),y=v+h*g,b=y+(t.hidden?0:h),x=l.animateScale?0:c.getDistanceFromCenterForValue(r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:c,_model:{x:f,y:p,innerRadius:0,outerRadius:n?x:w,startAngle:n&&l.animateRotate?v:y,endAngle:n&&l.animateRotate?v:b,label:u(d,i,d[i])}}),o.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,addElementAndReset:function(e){t.DatasetController.prototype.addElementAndReset.call(this,e),this.updateBezierControlPoints()},update:function(t){var i=this,n=i.getMeta(),o=n.dataset,a=n.data,r=o.custom||{},s=i.getDataset(),l=i.chart.options.elements.line,c=i.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:c.top,scaleBottom:c.bottom,scaleZero:c.getBasePosition()}}),n.dataset.pivot(),e.each(a,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var o=this,a=t.custom||{},r=o.getDataset(),s=o.chart.scale,l=o.chart.options.elements.point,c=s.getPointPositionForValue(i,r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:s,_model:{x:n?s.xCenter:c.x,y:n?s.yCenter:c.y,tension:a.tension?a.tension:e.getValueOrDefault(r.tension,o.chart.options.elements.line.tension),radius:a.radius?a.radius:e.getValueAtIndexOrDefault(r.pointRadius,i,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,i,l.backgroundColor),borderColor:a.borderColor?a.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,i,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,i,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,i,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:e.getValueAtIndexOrDefault(r.hitRadius,i,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,o){var a=n._model,r=e.splineCurve(e.previousItem(i.data,o,!0)._model,a,e.nextItem(i.data,o,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,o,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,o,e.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,o,e.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,o,a.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,o,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,o,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,o,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,o,r.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o=this;n||(t.animating=!0);for(var a=0;a1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;nt.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var o=Date.now(),a=(o-e)/t.frameDuration;t.dropFrames+=a,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(t,e,i,n,o){var a,r,s,l,c,u;if("object"==typeof e&&(a=e.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return void t.drawImage(e,n-e.width/2,o-e.height/2);if(!(isNaN(i)||0>=i)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),r=3*i/Math.sqrt(3),c=r*Math.sqrt(3)/2,t.moveTo(n-r/2,o+c/3),t.lineTo(n+r/2,o+c/3),t.lineTo(n,o-2*c/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,o-u,2*u,2*u),t.strokeRect(n-u,o-u,2*u,2*u);break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,o),t.lineTo(n,o+u),t.lineTo(n+u,o),t.lineTo(n,o-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}}}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.types={},t.instances={},t.controllers={},t.Controller=function(i){return this.chart=i,this.config=i.config,this.options=this.config.options=e.configMerge(t.defaults.global,t.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),t.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},e.extend(t.Controller.prototype,{initialize:function(){var e=this;return t.plugins.notify("beforeInit",[e]),e.bindEvents(),e.ensureScalesHaveIDs(),e.buildOrUpdateControllers(),e.buildScales(),e.updateLayout(),e.resetElements(),e.initToolTip(),e.update(),t.plugins.notify("afterInit",[e]),e},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(i){var n=this,o=n.chart,a=o.canvas,r=e.getMaximumWidth(a),s=o.aspectRatio,l=n.options.maintainAspectRatio&&isNaN(s)===!1&&isFinite(s)&&0!==s?r/s:e.getMaximumHeight(a),c=o.width!==r||o.height!==l;if(!c)return n;a.width=o.width=r,a.height=o.height=l,e.retinaScale(o);var u={width:r,height:l};return t.plugins.notify("resize",[n,u]),n.options.onResize&&n.options.onResize(n,u),i||(n.stop(),n.update(n.options.responsiveAnimationDuration)),n},ensureScalesHaveIDs:function(){var t=this.options,i=t.scales||{},n=t.scale;e.each(i.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),e.each(i.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,n=i.options,o=i.scales={},a=[];n.scales&&(a=a.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),n.scale&&a.push({options:n.scale,dtype:"radialLinear",isDefault:!0}),e.each(a,function(n){var a=n.options,r=e.getValueOrDefault(a.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){var l=new s({id:a.id,options:a,ctx:i.chart.ctx,chart:i});o[l.id]=l,n.isDefault&&(i.scale=l)}}),t.scaleService.addScalesToLayout(this)},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=this,n=[],o=[];if(e.each(i.data.datasets,function(e,a){var r=i.getDatasetMeta(a);r.type||(r.type=e.type||i.config.type),n.push(r.type),r.controller?r.controller.updateIndex(a):(r.controller=new t.controllers[r.type](i,a),o.push(r.controller))},i),n.length>1)for(var a=1;ae;++e)n.getDatasetMeta(e).controller.update();t.plugins.notify("afterDatasetsUpdate",[n])}},render:function(i,n){var o=this;t.plugins.notify("beforeRender",[o]);var a=o.options.animation;if(a&&("undefined"!=typeof i&&0!==i||"undefined"==typeof i&&0!==a.duration)){var r=new t.Animation;r.numSteps=(i||a.duration)/16.66,r.easing=a.easing,r.render=function(t,i){var n=e.easingEffects[i.easing],o=i.currentStep/i.numSteps,a=n(o);t.draw(a,o,i.currentStep)},r.onAnimationProgress=a.onProgress,r.onAnimationComplete=a.onComplete,t.animationService.addAnimation(o,r,i,n)}else o.draw(),a&&a.onComplete&&a.onComplete.call&&a.onComplete.call(o);return o},draw:function(i){var n=this,o=i||1;n.clear(),t.plugins.notify("beforeDraw",[n,o]),e.each(n.boxes,function(t){t.draw(n.chartArea)},n),n.scale&&n.scale.draw(),t.plugins.notify("beforeDatasetsDraw",[n,o]),e.each(n.data.datasets,function(t,e){n.isDatasetVisible(e)&&n.getDatasetMeta(e).controller.draw(i)},n,!0),t.plugins.notify("afterDatasetsDraw",[n,o]),n.tooltip.transition(o).draw(),t.plugins.notify("afterDraw",[n,o])},getElementAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[];return e.each(i.data.datasets,function(t,a){if(i.isDatasetVisible(a)){var r=i.getDatasetMeta(a);e.each(r.data,function(t){return t.inRange(n.x,n.y)?(o.push(t),o):void 0})}}),o.slice(0,1)},getElementsAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[],a=function(){if(i.data.datasets)for(var t=0;t0&&(e=this.getDatasetMeta(e[0]._datasetIndex).data),e},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;i>e;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var i=this;i.stop(),i.clear(),e.unbindEvents(i,i.events),e.removeResizeListener(i.chart.canvas.parentNode);var n=i.chart.canvas;n.width=i.chart.width,n.height=i.chart.height,void 0!==i.chart.originalDevicePixelRatio&&i.chart.ctx.scale(1/i.chart.originalDevicePixelRatio,1/i.chart.originalDevicePixelRatio),n.style.width=i.chart.originalCanvasStyleWidth,n.style.height=i.chart.originalCanvasStyleHeight,t.plugins.notify("destroy",[i]),delete t.instances[i.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this;e.bindEvents(t,t.options.events,function(e){t.eventHandler(e)})},updateHoverStyle:function(t,e,i){var n,o,a,r=i?"setHoverStyle":"removeHoverStyle";switch(e){case"single":t=[t[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(o=0,a=t.length;a>o;++o)n=t[o],n&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var i=this,n=i.tooltip,o=i.options||{},a=o.hover,r=o.tooltips;return i.lastActive=i.lastActive||[],i.lastTooltipActive=i.lastTooltipActive||[],"mouseout"===t.type?(i.active=[],i.tooltipActive=[]):(i.active=i.getElementsAtEventForMode(t,a.mode),i.tooltipActive=i.getElementsAtEventForMode(t,r.mode)),a.onHover&&a.onHover.call(i,i.active),i.legend&&i.legend.handleEvent&&i.legend.handleEvent(t),("mouseup"===t.type||"click"===t.type)&&o.onClick&&o.onClick.call(i,t,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),(r.enabled||r.custom)&&(n.initialize(),n._active=i.tooltipActive,n.update(!0)),n.pivot(),i.animating||e.arrayEquals(i.active,i.lastActive)&&e.arrayEquals(i.tooltipActive,i.lastTooltipActive)||(i.stop(),(r.enabled||r.custom)&&n.update(!0),i.render(a.animationDuration,!0)),i.lastActive=i.active,i.lastTooltipActive=i.tooltipActive,i}})}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.DatasetController=function(t,e){this.initialize(t,e)},e.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],a=n.data;for(t=0,e=o.length;e>t;++t)a[t]=a[t]||i.createMetaData(n,t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this,i=e.createMetaData(t);e.getMeta().data.splice(t,0,i),e.updateElement(i,t,!0)},buildOrUpdateElements:function(){var t=this.getMeta(),e=t.data,i=this.getDataset().data.length,n=e.length;if(n>i)e.splice(i,n-i);else if(i>n)for(var o=n;i>o;++o)this.addElementAndReset(o)},update:i,draw:function(t){var i=t||1;e.each(this.getMeta().data,function(t){t.transition(i).draw()})},removeHoverStyle:function(t,i){var n=this.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=e.getValueAtIndexOrDefault,s=t._model;s.backgroundColor=a.backgroundColor?a.backgroundColor:r(n.backgroundColor,o,i.backgroundColor),s.borderColor=a.borderColor?a.borderColor:r(n.borderColor,o,i.borderColor),s.borderWidth=a.borderWidth?a.borderWidth:r(n.borderWidth,o,i.borderWidth)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=e.getValueAtIndexOrDefault,r=e.getHoverColor,s=t._model;s.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:a(i.hoverBackgroundColor,n,r(s.backgroundColor)),s.borderColor=o.hoverBorderColor?o.hoverBorderColor:a(i.hoverBorderColor,n,r(s.borderColor)), s.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:a(i.hoverBorderWidth,n,s.borderWidth)}}),t.DatasetController.extend=e.inherits}},{}],25:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,o){if("_"===o[0]);else if(i._view.hasOwnProperty(o))if(n===i._view[o]);else if("string"==typeof n)try{var a=e.color(i._model[o]).mix(e.color(i._start[o]),t);i._view[o]=a.rgbString()}catch(t){i._view[o]=n}else if("number"==typeof n){var r=void 0!==i._start[o]&&isNaN(i._start[o])===!1?i._start[o]:0;i._view[o]=(i._model[o]-r)*t+r}else i._view[o]=n;else"number"!=typeof n||isNaN(i._view[o])?i._view[o]=n:i._view[o]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,i){"use strict";var n=t(3);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function o(t,n,o){var a=document.defaultView,r=t.parentNode,s=a.getComputedStyle(t)[n],l=a.getComputedStyle(r)[n],c=i(s),u=i(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,t,o):d,u?e(l,r,o):d):"none"}var a=t.helpers={};a.each=function(t,e,i,n){var o,r;if(a.isArray(t))if(r=t.length,n)for(o=r-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;r>o;o++)e.call(i,t[o],o);else if("object"==typeof t){var s=Object.keys(t);for(r=s.length,o=0;r>o;o++)e.call(i,t[s[o]],s[o])}},a.clone=function(t){var e={};return a.each(t,function(t,i){a.isArray(t)?e[i]=t.slice(0):"object"==typeof t&&null!==t?e[i]=a.clone(t):e[i]=t}),e},a.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;n>i;i++)a.each(arguments[i],e);return t},a.configMerge=function(e){var i=a.clone(e);return a.each(Array.prototype.slice.call(arguments,1),function(e){a.each(e,function(e,n){if("scales"===n)i[n]=a.scaleMerge(i.hasOwnProperty(n)?i[n]:{},e);else if("scale"===n)i[n]=a.configMerge(i.hasOwnProperty(n)?i[n]:{},t.scaleService.getScaleDefaults(e.type),e);else if(i.hasOwnProperty(n)&&a.isArray(i[n])&&a.isArray(e)){var o=i[n];a.each(e,function(t,e){e=n[i].length||!n[i][o].type?n[i].push(a.configMerge(s,e)):e.type&&e.type!==n[i][o].type?n[i][o]=a.configMerge(n[i][o],s,e):n[i][o]=a.configMerge(n[i][o],e)}):(n[i]=[],a.each(e,function(e){var o=a.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(a.configMerge(t.scaleService.getScaleDefaults(o),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=a.configMerge(n[i],e):n[i]=e}),n},a.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:a.isArray(t)?ei;++i)if(t[i]===e)return i;return-1},a.where=function(t,e){if(a.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return a.each(t,function(t){e(t)&&i.push(t)}),i},a.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;o>n;++n)if(e.call(i,t[n],n,t))return n;return-1},a.findNextWhere=function(t,e,i){(void 0===i||null===i)&&(i=-1);for(var n=i+1;n=0;n--){var o=t[n];if(e(o))return o}},a.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i},a.noop=function(){},a.uid=function(){var t=0;return function(){return t++}}(),a.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1},a.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},a.toRadians=function(t){return t*(Math.PI/180)},a.toDegrees=function(t){return t*(180/Math.PI)},a.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),a=Math.atan2(n,i);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},a.aliasPixel=function(t){return t%2===0?0:.5},a.splineCurve=function(t,e,i,n){var o=t.skip?e:t,a=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;var d=n*c,h=n*u;return{previous:{x:a.x-d*(r.x-o.x),y:a.y-d*(r.y-o.y)},next:{x:a.x+h*(r.x-o.x),y:a.y+h*(r.y-o.y)}}},a.EPSILON=Number.EPSILON||1e-14,a.splineCurveMonotone=function(t){var e,i,n,o,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,o&&!o.model.skip&&(n.deltaK=(o.model.y-n.model.y)/(o.model.x-n.model.x)),!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2);var l,c,u,d;for(e=0;s-1>e;++e)n=r[e],o=r[e+1],n.model.skip||o.model.skip||(a.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(l=n.mK/n.deltaK,c=o.mK/n.deltaK,d=Math.pow(l,2)+Math.pow(c,2),9>=d||(u=3/Math.sqrt(d),n.mK=l*u*n.deltaK,o.mK=c*u*n.deltaK)));var h;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),o&&!o.model.skip&&(h=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},a.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},a.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},a.niceNum=function(t,e){var i,n=Math.floor(a.log10(t)),o=t/Math.pow(10,n);return i=e?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,i*Math.pow(10,n)};var r=a.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),nt?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};a.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),a.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),a.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var c=parseFloat(a.getStyle(r,"padding-left")),u=parseFloat(a.getStyle(r,"padding-top")),d=parseFloat(a.getStyle(r,"padding-right")),h=parseFloat(a.getStyle(r,"padding-bottom")),f=s.right-s.left-c-d,p=s.bottom-s.top-u-h;return i=Math.round((i-s.left-c)/f*r.width/e.currentDevicePixelRatio),n=Math.round((n-s.top-u)/p*r.height/e.currentDevicePixelRatio),{x:i,y:n}},a.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},a.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=a.noop},a.bindEvents=function(t,e,i){var n=t.events=t.events||{};a.each(e,function(e){n[e]=function(){i.apply(t,arguments)},a.addEvent(t.chart.canvas,e,n[e])})},a.unbindEvents=function(t,e){var i=t.chart.canvas;a.each(e,function(t,e){a.removeEvent(i,e,t)})},a.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},a.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},a.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-left"),10),n=parseInt(a.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,r=a.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},a.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-top"),10),n=parseInt(a.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,r=a.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},a.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},a.retinaScale=function(t){var e=t.ctx,i=t.canvas,n=i.width,o=i.height,a=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==a&&(i.height=o*a,i.width=n*a,e.scale(a,a),t.originalDevicePixelRatio=t.originalDevicePixelRatio||a),i.style.width=n+"px",i.style.height=o+"px"},a.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},a.fontString=function(t,e,i){return e+" "+t+"px "+i},a.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;a.each(i,function(e){void 0!==e&&null!==e&&a.isArray(e)!==!0?s=a.measureText(t,o,r,s,e):a.isArray(e)&&a.each(e,function(e){void 0===e||null===e||a.isArray(e)||(s=a.measureText(t,o,r,s,e))})});var l=r.length/2;if(l>i.length){for(var c=0;l>c;c++)delete o[r[c]];r.splice(0,l)}return s},a.measureText=function(t,e,i,n,o){var a=e[o];return a||(a=e[o]=t.measureText(o).width,i.push(o)),a>n&&(n=a),n},a.numberOfLabelLines=function(t){var e=1;return a.each(t,function(t){a.isArray(t)&&t.length>e&&(e=t.length)}),e},a.drawRoundedRectangle=function(t,e,i,n,o,a){t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+a),t.lineTo(e+n,i+o-a),t.quadraticCurveTo(e+n,i+o,e+n-a,i+o),t.lineTo(e+a,i+o),t.quadraticCurveTo(e,i+o,e,i+o-a),t.lineTo(e,i+a),t.quadraticCurveTo(e,i,e+a,i),t.closePath()},a.color=function(e){return n?n(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},a.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n),i.tabIndex=-1;var o=i.style;o.width="100%",o.display="block",o.border=0,o.height=0,o.margin=0,o.position="absolute",o.left=0,o.right=0,o.top=0,o.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){return e?e():void 0}},a.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},a.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.arrayEquals=function(t,e){var i,n,o,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;n>i;++i)if(o=t[i],r=e[i],o instanceof Array&&r instanceof Array){if(!a.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},a.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},a.getHoverColor=function(t){return t instanceof CanvasPattern?t:a.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){var n=this,o=t.helpers;return n.config=i||{data:{datasets:[]}},e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),n.ctx=e,n.canvas=e.canvas,e.canvas.style.display=e.canvas.style.display||"block",n.width=e.canvas.width||parseInt(o.getStyle(e.canvas,"width"),10)||o.getMaximumWidth(e.canvas),n.height=e.canvas.height||parseInt(o.getStyle(e.canvas,"height"),10)||o.getMaximumHeight(e.canvas),n.aspectRatio=n.width/n.height,(isNaN(n.aspectRatio)||isFinite(n.aspectRatio)===!1)&&(n.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),n.originalCanvasStyleWidth=e.canvas.style.width,n.originalCanvasStyleHeight=e.canvas.style.height,o.retinaScale(n),n.controller=new t.Controller(n),o.addResizeListener(e.canvas.parentNode,function(){n.controller&&n.controller.config.options.responsive&&n.controller.resize()}),n.controller?n.controller:n};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('
    ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),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 o(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?g:b,y),x-=e.height):(e=t.update(w,v),b-=e.width),D.push({horizontal:i,minSize:e,box:t})}function a(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:C,right:S,top:0,bottom:0};t.update(t.options.fullWidth?g:b,m/2,n)}else t.update(i.minSize.width,x)}function r(t){var i=e.findNextWhere(D,function(e){return e.box===t}),n={left:0,right:0,top:M,bottom:Y};i&&t.update(i.minSize.width,x,n)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:C,t.right=t.options.fullWidth?i-l:C+b,t.top=A,t.bottom=A+t.height,A=t.bottom):(t.left=P,t.right=P+t.width,t.top=M,t.bottom=M+x,P=t.right)}if(t){var l=0,c=0,u=e.where(t.boxes,function(t){return"left"===t.options.position}),d=e.where(t.boxes,function(t){return"right"===t.options.position}),h=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),p=e.where(t.boxes,function(t){return"chartArea"===t.options.position});h.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var g=i-2*l,m=n-2*c,k=g/2,v=m/2,w=(i-k)/(u.length+d.length),y=(n-v)/(h.length+f.length),b=g,x=m,D=[];e.each(u.concat(d,h,f),o);var C=l,S=l,M=c,Y=c;e.each(u.concat(d),a),e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h.concat(f),a),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height}),e.each(u.concat(d),r),C=l,S=l,M=c,Y=c,e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height});var _=n-M-Y,T=i-C-S;(T!==b||_!==x)&&(e.each(u,function(t){t.height=_}),e.each(d,function(t){t.height=_}),e.each(h,function(t){t.options.fullWidth||(t.width=T)}),e.each(f,function(t){t.options.fullWidth||(t.width=T)}),x=_,b=T);var P=l,A=c;e.each(u.concat(h),s),P+=b,A+=x,e.each(d,s),e.each(f,s),t.chartArea={left:C,top:M,right:C+b,bottom:M+x},e.each(p,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(b,x)})}}}}},{}],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,o=n.getDatasetMeta(i);o.hidden=null===o.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,o=n.labels,a=n.display,r=i.ctx,s=t.defaults.global,l=e.getValueOrDefault,c=l(o.fontSize,s.defaultFontSize),u=l(o.fontStyle,s.defaultFontStyle),d=l(o.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=a?10:0):(p.width=a?10:0,p.height=i.maxHeight),a)if(r.font=h,g){var m=i.lineWidths=[0],k=i.legendItems.length?c+o.padding:0;r.textAlign="left",r.textBaseline="top",e.each(i.legendItems,function(t,e){var n=o.usePointStyle?c*Math.sqrt(2):o.boxWidth,a=n+c/2+r.measureText(t.text).width;m[m.length-1]+a+o.padding>=i.width&&(k+=c+o.padding,m[m.length]=i.left),f[e]={left:0,top:0,width:a,height:c},m[m.length-1]+=a+o.padding}),p.height+=k}else{var v=o.padding,w=i.columnWidths=[],y=o.padding,b=0,x=0,D=c+v;e.each(i.legendItems,function(t,e){var i=o.usePointStyle?2*o.boxWidth:o.boxWidth,n=i+c/2+r.measureText(t.text).width;x+D>p.height&&(y+=b+o.padding,w.push(b),b=0,x=0),b=Math.max(b,n),x+=D,f[e]={left:0,top:0,width:n,height:c}}),y+=b,w.push(b),p.width+=y}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,o=n.labels,a=t.defaults.global,r=a.elements.line,s=i.width,l=i.lineWidths;if(n.display){var c,u=i.ctx,d=e.getValueOrDefault,h=d(o.fontColor,a.defaultFontColor),f=d(o.fontSize,a.defaultFontSize),p=d(o.fontStyle,a.defaultFontStyle),g=d(o.fontFamily,a.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=o.boxWidth,v=i.legendHitBoxes,w=function(e,i,o){if(!(isNaN(k)||0>=k)){u.save(),u.fillStyle=d(o.fillStyle,a.defaultColor),u.lineCap=d(o.lineCap,r.borderCapStyle),u.lineDashOffset=d(o.lineDashOffset,r.borderDashOffset),u.lineJoin=d(o.lineJoin,r.borderJoinStyle),u.lineWidth=d(o.lineWidth,r.borderWidth),u.strokeStyle=d(o.strokeStyle,a.defaultColor);var s=0===d(o.lineWidth,r.borderWidth);if(u.setLineDash&&u.setLineDash(d(o.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,o.pointStyle,l,h,p)}else s||u.strokeRect(e,i,k,f),u.fillRect(e,i,k,f);u.restore()}},y=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+o.padding,line:0}:{x:i.left+o.padding,y:i.top+o.padding,line:0};var x=f+o.padding;e.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,a=o.usePointStyle?f+f/2+n:k+f/2+n,r=c.x,d=c.y;b?r+a>=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]+o.padding,d=c.y=i.top,c.line++),w(r,d,t),v[e].left=r,v[e].top=d,y(r,d,t,n),b?c.x+=a+o.padding:c.y+=x})}},handleEvent:function(t){var i=this,n=i.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!n.onHover)return}else{if("click"!==o)return;if(!n.onClick)return}var a=e.getRelativePosition(t,i.chart.chart),r=a.x,s=a.y;if(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)for(var l=i.legendHitBoxes,c=0;c=u.left&&r<=u.left+u.width&&s>=u.top&&s<=u.top+u.height){if("click"===o){n.onClick.call(i,t,i.legendItems[c]);break}if("mousemove"===o){n.onHover.call(i,t,i.legendItems[c]);break}}}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.legend;n&&(e.legend=new t.Legend({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.legend))}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)})},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e){var i,n,o=this._plugins,a=o.length;for(i=0;a>i;++i)if(n=o[i],"function"==typeof n[t]&&n[t].apply(n,e||[])===!1)return!1;return!0}},t.PluginBase=t.Element.extend({beforeInit:e,afterInit:e,beforeUpdate:e,afterUpdate:e,beforeDraw:e,afterDraw:e,destroy:e}),t.pluginService=t.plugins}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(t){return e.isArray(t)?t:""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=i,o.margins=e.extend({left:0,right:0,top:0,bottom:0},n),o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeDataLimits(),o.determineDataLimits(),o.afterDataLimits(),o.beforeBuildTicks(),o.buildTicks(),o.afterBuildTicks(),o.beforeTickToLabelConversion(),o.convertTicksToLabels(),o.afterTickToLabelConversion(),o.beforeCalculateTickRotation(),o.calculateTickRotation(),o.afterCalculateTickRotation(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;t.ticks=t.ticks.map(function(e,i,n){return t.options.ticks.userCallback?t.options.ticks.userCallback(e,i,n):t.options.ticks.callback(e,i,n)},t)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=this,n=i.ctx,o=t.defaults.global,a=i.options.ticks,r=e.getValueOrDefault(a.fontSize,o.defaultFontSize),s=e.getValueOrDefault(a.fontStyle,o.defaultFontStyle),l=e.getValueOrDefault(a.fontFamily,o.defaultFontFamily),c=e.fontString(r,s,l);n.font=c;var u,d=n.measureText(i.ticks[0]).width,h=n.measureText(i.ticks[i.ticks.length-1]).width;if(i.labelRotation=a.minRotation||0,i.paddingRight=0,i.paddingLeft=0,i.options.display&&i.isHorizontal()){i.paddingRight=h/2+3,i.paddingLeft=d/2+3,i.longestTextCache||(i.longestTextCache={});for(var f,p,g=e.longestText(n,c,i.ticks,i.longestTextCache),m=g,k=i.getPixelForTick(1)-i.getPixelForTick(0)-6;m>k&&i.labelRotationi.yLabelWidth&&(i.paddingLeft=u+r/2),i.paddingRight=r/2,p*g>i.maxHeight){i.labelRotation--;break}i.labelRotation++,m=f*g}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){var i=this,n=i.minSize={width:0,height:0},o=i.options,a=t.defaults.global,r=o.ticks,s=o.scaleLabel,l=o.gridLines,c=o.display,u=i.isHorizontal(),d=e.getValueOrDefault(r.fontSize,a.defaultFontSize),h=e.getValueOrDefault(r.fontStyle,a.defaultFontStyle),f=e.getValueOrDefault(r.fontFamily,a.defaultFontFamily),p=e.fontString(d,h,f),g=e.getValueOrDefault(s.fontSize,a.defaultFontSize),m=o.gridLines.tickMarkLength;if(u?n.width=i.isFullWidth()?i.maxWidth-i.margins.left-i.margins.right:i.maxWidth:n.width=c&&l.drawTicks?m:0,u?n.height=c&&l.drawTicks?m:0:n.height=i.maxHeight,s.display&&c&&(u?n.height+=1.5*g:n.width+=1.5*g),r.display&&c){i.longestTextCache||(i.longestTextCache={});var k=e.longestText(i.ctx,p,i.ticks,i.longestTextCache),v=e.numberOfLabelLines(i.ticks),w=.5*d;if(u){i.longestLabelWidth=k;var y=Math.sin(e.toRadians(i.labelRotation))*i.longestLabelWidth+d*v+w*v;n.height=Math.min(i.maxHeight,n.height+y),i.ctx.font=p;var b=i.ctx.measureText(i.ticks[0]).width,x=i.ctx.measureText(i.ticks[i.ticks.length-1]).width,D=Math.cos(e.toRadians(i.labelRotation)),C=Math.sin(e.toRadians(i.labelRotation));i.paddingLeft=0!==i.labelRotation?D*b+3:b/2+3,i.paddingRight=0!==i.labelRotation?C*(d/2)+3:x/2+3}else{var S=i.maxWidth-n.width,M=r.mirror;M?k=0:k+=i.options.ticks.padding,S>k?n.width+=k:n.width=i.maxWidth,i.paddingTop=d/2,i.paddingBottom=d/2}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingTop=Math.max(i.paddingTop-i.margins.top,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0),i.paddingBottom=Math.max(i.paddingBottom-i.margins.bottom,0)),i.width=n.width,i.height=n.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),o=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),a=o*t+i.paddingLeft;e&&(a+=o/2);var r=i.left+Math.round(a);return r+=i.isFullWidth()?i.margins.left:0}var s=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(s/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){var t=this,e=t.min,i=t.max;return t.getPixelForValue(t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(i){var n=this,o=n.options;if(o.display){var a,r,s=n.ctx,l=t.defaults.global,c=o.ticks,u=o.gridLines,d=o.scaleLabel,h=0!==n.labelRotation,f=c.autoSkip,p=n.isHorizontal();c.maxTicksLimit&&(r=c.maxTicksLimit);var g=e.getValueOrDefault(c.fontColor,l.defaultFontColor),m=e.getValueOrDefault(c.fontSize,l.defaultFontSize),k=e.getValueOrDefault(c.fontStyle,l.defaultFontStyle),v=e.getValueOrDefault(c.fontFamily,l.defaultFontFamily),w=e.fontString(m,k,v),y=u.tickMarkLength,b=e.getValueOrDefault(u.borderDash,l.borderDash),x=e.getValueOrDefault(u.borderDashOffset,l.borderDashOffset),D=e.getValueOrDefault(d.fontColor,l.defaultFontColor),C=e.getValueOrDefault(d.fontSize,l.defaultFontSize),S=e.getValueOrDefault(d.fontStyle,l.defaultFontStyle),M=e.getValueOrDefault(d.fontFamily,l.defaultFontFamily),Y=e.fontString(C,S,M),_=e.toRadians(n.labelRotation),T=Math.cos(_),P=n.longestLabelWidth*T; s.fillStyle=g;var A=[];if(p){if(a=!1,h&&(P/=2),(P+c.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(a=1+Math.floor((P+c.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),r&&n.ticks.length>r)for(;!a||n.ticks.length/(a||1)>r;)a||(a=1),a+=1;f||(a=!1)}var I="right"===o.position?n.left:n.right-y,O="right"===o.position?n.left+y:n.right,L="bottom"===o.position?n.top:n.bottom-y,F="bottom"===o.position?n.top+y:n.bottom;if(e.each(n.ticks,function(t,r){if(void 0!==t&&null!==t){var s=n.ticks.length===r+1,l=a>1&&r%a>0||r%a===0&&r+a>=n.ticks.length;if((!l||s)&&void 0!==t&&null!==t){var d,f;r===("undefined"!=typeof n.zeroLineIndex?n.zeroLineIndex:0)?(d=u.zeroLineWidth,f=u.zeroLineColor):(d=e.getValueAtIndexOrDefault(u.lineWidth,r),f=e.getValueAtIndexOrDefault(u.color,r));var g,m,k,v,w,D,C,S,M,Y,T="middle",P="middle";if(p){h||(P="top"===o.position?"bottom":"top"),T=h?"right":"center";var E=n.getPixelForTick(r)+e.aliasPixel(d);M=n.getPixelForTick(r,u.offsetGridLines)+c.labelOffset,Y=h?n.top+12:"top"===o.position?n.bottom-y:n.top+y,g=k=w=C=E,m=L,v=F,D=i.top,S=i.bottom}else{"left"===o.position?c.mirror?(M=n.right+c.padding,T="left"):(M=n.right-c.padding,T="right"):c.mirror?(M=n.left-c.padding,T="right"):(M=n.left+c.padding,T="left");var j=n.getPixelForTick(r);j+=e.aliasPixel(d),Y=n.getPixelForTick(r,u.offsetGridLines),g=I,k=O,w=i.left,C=i.right,m=v=D=S=j}A.push({tx1:g,ty1:m,tx2:k,ty2:v,x1:w,y1:D,x2:C,y2:S,labelX:M,labelY:Y,glWidth:d,glColor:f,glBorderDash:b,glBorderDashOffset:x,rotation:-1*_,label:t,textBaseline:P,textAlign:T})}}}),e.each(A,function(t){if(u.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),u.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),c.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=w,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(e.isArray(i))for(var n=0,o=-(i.length-1)*m*.75;ne;++e){var a=t[e];if(a&&a.hasValue()){var r=a.tooltipPosition();n.push(r.x),o.push(r.y)}}var s=0,l=0;for(e=0;e0){var a=t[0];a.xLabel?i=a.xLabel:o>0&&a.indexe;++e)p.push(n(c[e]));s.itemSort&&(p=p.sort(function(t,e){return s.itemSort(t,e,u)})),c.length>1&&o.each(p,function(t){h.push(s.callbacks.labelColor.call(r,t,d))}),o.extend(l,{title:r.getTitle(p,u),beforeBody:r.getBeforeBody(p,u),body:r.getBody(p,u),afterBody:r.getAfterBody(p,u),footer:r.getFooter(p,u),x:Math.round(f.x),y:Math.round(f.y),caretPadding:o.getValueOrDefault(f.padding,2),labelColors:h});var g=r.getTooltipSize(l);r.determineAlignment(g),o.extend(l,r.getBackgroundPoint(l,g))}else r._model.opacity=0;return t&&s.custom&&s.custom.call(r,l),r},getTooltipSize:function(t){var e=this._chart.ctx,i={height:2*t.yPadding,width:0},n=t.body,a=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=t.beforeBody.length+t.afterBody.length;var r=t.title.length,s=t.footer.length,l=t.titleFontSize,c=t.bodyFontSize,u=t.footerFontSize;i.height+=r*l,i.height+=(r-1)*t.titleSpacing,i.height+=r?t.titleMarginBottom:0,i.height+=a*c,i.height+=a?(a-1)*t.bodySpacing:0,i.height+=s?t.footerMarginTop:0,i.height+=s*u,i.height+=s?(s-1)*t.footerSpacing:0;var d=0,h=function(t){i.width=Math.max(i.width,e.measureText(t).width+d)};return e.font=o.fontString(l,t._titleFontStyle,t._titleFontFamily),o.each(t.title,h),e.font=o.fontString(c,t._bodyFontStyle,t._bodyFontFamily),o.each(t.beforeBody.concat(t.afterBody),h),d=n.length>1?c+2:0,o.each(n,function(t){o.each(t.before,h),o.each(t.lines,h),o.each(t.after,h)}),d=0,e.font=o.fontString(u,t._footerFontStyle,t._footerFontFamily),o.each(t.footer,h),i.width+=2*t.xPadding,i},determineAlignment:function(t){var e=this,i=e._model,n=e._chart,o=e._chartInstance.chartArea;i.yn.height-t.height&&(i.yAlign="bottom");var a,r,s,l,c,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2;"center"===i.yAlign?(a=function(t){return u>=t},r=function(t){return t>u}):(a=function(e){return e<=t.width/2},r=function(e){return e>=n.width-t.width/2}),s=function(e){return e+t.width>n.width},l=function(e){return e-t.width<0},c=function(t){return d>=t?"top":"bottom"},a(i.x)?(i.xAlign="left",s(i.x)&&(i.xAlign="center",i.yAlign=c(i.y))):r(i.x)&&(i.xAlign="right",l(i.x)&&(i.xAlign="center",i.yAlign=c(i.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,o=t.caretPadding,a=t.cornerRadius,r=t.xAlign,s=t.yAlign,l=n+o,c=a+o;return"right"===r?i.x-=e.width:"center"===r&&(i.x-=e.width/2),"top"===s?i.y+=l:"bottom"===s?i.y-=e.height+l:i.y-=e.height/2,"center"===s?"left"===r?i.x+=l:"right"===r&&(i.x-=l):"left"===r?i.x-=c:"right"===r&&(i.x+=c),i},drawCaret:function(t,e,i){var n,a,r,s,l,c,u=this._view,d=this._chart.ctx,h=u.caretSize,f=u.cornerRadius,p=u.xAlign,g=u.yAlign,m=t.x,k=t.y,v=e.width,w=e.height;"center"===g?("left"===p?(n=m,a=n-h,r=n):(n=m+v,a=n+h,r=n),l=k+w/2,s=l-h,c=l+h):("left"===p?(n=m+f,a=n+h,r=a+h):"right"===p?(n=m+v-f,a=n-h,r=a-h):(a=m+v/2,n=a-h,r=a+h),"top"===g?(s=k,l=s-h,c=s):(s=k+w,l=s+h,c=s));var y=o.color(u.backgroundColor);d.fillStyle=y.alpha(i*y.alpha()).rgbString(),d.beginPath(),d.moveTo(n,s),d.lineTo(a,l),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r=e.titleFontSize,s=e.titleSpacing,l=o.color(e.titleFontColor);i.fillStyle=l.alpha(n*l.alpha()).rgbString(),i.font=o.fontString(r,e._titleFontStyle,e._titleFontFamily);var c,u;for(c=0,u=a.length;u>c;++c)i.fillText(a[c],t.x,t.y),t.y+=r+s,c+1===a.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i,n){var a=e.bodyFontSize,r=e.bodySpacing,s=e.body;i.textAlign=e._bodyAlign,i.textBaseline="top";var l=o.color(e.bodyFontColor),c=l.alpha(n*l.alpha()).rgbString();i.fillStyle=c,i.font=o.fontString(a,e._bodyFontStyle,e._bodyFontFamily);var u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=a+r};o.each(e.beforeBody,d);var h=s.length>1;u=h?a+2:0,o.each(s,function(r,s){o.each(r.before,d),o.each(r.lines,function(r){h&&(i.fillStyle=o.color(e.legendColorBackground).alpha(n).rgbaString(),i.fillRect(t.x,t.y,a,a),i.strokeStyle=o.color(e.labelColors[s].borderColor).alpha(n).rgbaString(),i.strokeRect(t.x,t.y,a,a),i.fillStyle=o.color(e.labelColors[s].backgroundColor).alpha(n).rgbaString(),i.fillRect(t.x+1,t.y+1,a-2,a-2),i.fillStyle=c),d(r)}),o.each(r.after,d)}),u=0,o.each(e.afterBody,d),t.y-=r},drawFooter:function(t,e,i,n){var a=e.footer;if(a.length){t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top";var r=o.color(e.footerFontColor);i.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.font=o.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),o.each(a,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i=this.getTooltipSize(e),n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.enabled){var r=o.color(e.backgroundColor);t.fillStyle=r.alpha(a*r.alpha()).rgbString(),o.drawRoundedRectangle(t,n.x,n.y,i.width,i.height,e.cornerRadius),t.fill(),this.drawCaret(n,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a)}}}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)l;)l+=2*Math.PI;for(;a>l;)a-=2*Math.PI;for(;s>a;)a+=2*Math.PI;var c=a>=s&&l>=a,u=r>=n.innerRadius&&r<=n.outerRadius;return c&&u}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;e._view.steppedLine===!0?(l.lineTo(i.x,t._view.y),l.lineTo(i.x,i.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,o=n._view,a=o.spanGaps,r=o.scaleZero,s=n._loop,l=n._chart.ctx;l.save();var c=n._children.slice(),u=-1;s&&c.length&&c.push(c[0]);var d,h,f,p;if(c.length&&o.fill){for(l.beginPath(),d=0;dd;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return!!i&&(i.y=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.xLabels&&o||n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t]},getPixelForValue:function(t,e,i,n){var o=this,a=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var r=o.getLabels(),s=r.indexOf(t);e=-1!==s?s:e}if(o.isHorizontal()){var l=o.width-(o.paddingLeft+o.paddingRight),c=l/a,u=c*(e-o.minIndex)+o.paddingLeft;return(o.options.gridLines.offsetGridLines&&n||o.maxIndex===o.minIndex&&n)&&(u+=c/2),o.left+Math.round(u)}var d=o.height-(o.paddingTop+o.paddingBottom),h=d/a,f=h*(e-o.minIndex)+o.paddingTop;return o.options.gridLines.offsetGridLines&&n&&(f+=h/2),o.top+Math.round(f)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,i=this,n=Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),o=i.isHorizontal(),a=o?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.paddingBottom),r=a/n;return t-=o?i.left:i.top,i.options.gridLines.offsetGridLines&&(t-=r/2),t-=o?i.paddingLeft:i.paddingTop,e=0>=t?0:Math.round(t/r)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=e.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r}}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=i.chart,a=o.data,r=a.datasets,s=i.isHorizontal();if(i.min=null,i.max=null,n.stacked){var l={};e.each(r,function(a,r){var s=o.getDatasetMeta(r);void 0===l[s.type]&&(l[s.type]={positiveValues:[],negativeValues:[]});var c=l[s.type].positiveValues,u=l[s.type].negativeValues;o.isDatasetVisible(r)&&t(s)&&e.each(a.data,function(t,e){var o=+i.getRightValue(t);isNaN(o)||s.data[e].hidden||(c[e]=c[e]||0,u[e]=u[e]||0,n.relativePoints?c[e]=100:0>o?u[e]+=o:c[e]+=o)})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),o=e.min(n),a=e.max(n);i.min=null===i.min?o:Math.min(i.min,o),i.max=null===i.max?a:Math.max(i.max,a)})}else e.each(r,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,o=n.options.ticks;if(n.isHorizontal())i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.width/50));else{var a=e.getValueOrDefault(o.fontSize,t.defaults.global.defaultFontSize);i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.height/(2*a)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i,n=this,o=n.paddingLeft,a=n.paddingBottom,r=n.start,s=+n.getRightValue(t),l=n.end-r;return n.isHorizontal()?(i=n.width-(o+n.paddingRight),e=n.left+i/l*(s-r),Math.round(e+o)):(i=n.height-(n.paddingTop+a),e=n.bottom-a-i/l*(s-r),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,o=e.paddingBottom,a=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+o),r=(i?t-e.left-n:e.bottom-o-t)/a;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var o=e.sign(t.min),a=e.sign(t.max);0>o&&0>a?t.max=0:o>0&&a>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],o=i.ticks,a=e.getValueOrDefault,r=t.getTickLimit();r=Math.max(2,r);var s,l=o.fixedStepSize&&o.fixedStepSize>0||o.stepSize&&o.stepSize>0;if(l)s=a(o.fixedStepSize,o.stepSize);else{var c=e.niceNum(t.max-t.min,!1);s=e.niceNum(c/(r-1),!0)}var u=Math.floor(t.min/s)*s,d=Math.ceil(t.max/s)*s,h=(d-u)/s;h=e.almostEquals(h,Math.round(h),s/1e3)?Math.round(h):Math.ceil(h),n.push(void 0!==o.min?o.min:u);for(var f=1;h>f;++f)n.push(u+f*s);n.push(void 0!==o.max?o.max:d),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),o.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return c?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=n.ticks,a=i.chart,r=a.data,s=r.datasets,l=e.getValueOrDefault,c=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var u={};e.each(s,function(o,r){var s=a.getDatasetMeta(r);a.isDatasetVisible(r)&&t(s)&&(void 0===u[s.type]&&(u[s.type]=[]),e.each(o.data,function(t,e){var o=u[s.type],a=+i.getRightValue(t);isNaN(a)||s.data[e].hidden||(o[e]=o[e]||0,n.relativePoints?o[e]=100:o[e]+=a)}))}),e.each(u,function(t){var n=e.min(t),o=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(s,function(n,o){var r=a.getDatasetMeta(o);a.isDatasetVisible(o)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n),0!==n&&(null===i.minNotZero||nt.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,o,a,r,s,l,c,u,d,h,f,p=this.options.pointLabels,g=e.getValueOrDefault(p.fontSize,i.defaultFontSize),m=e.getValueOrDefault(p.fontStyle,i.defaultFontStyle),k=e.getValueOrDefault(p.fontFamily,i.defaultFontFamily),v=e.fontString(g,m,k),w=e.min([this.height/2-g-5,this.width/2]),y=this.width,b=0;for(this.ctx.font=v,n=0;ny&&(y=t.x+a,r=n),t.x-aD?t.x+o>y&&(y=t.x+o,r=n):t.x-oe&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validateParams:["project","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","badges","lang"],view:["list","chart"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var r=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")}}(),s=function(){function t(t,e){for(var i=0;i0&&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:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),t?e.page=$(this.config.sourceInput).val().score():(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);var e=$(this.config.sourceInput).val().score().replace(/[&%?]/g,escape);window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&page="+e),$(".permalink").prop("href","/langviews?"+$.param(this.getPermaLink())+"&page="+e)}}},{key:"getBadgeMarkup",value:function(t){if(!this.config.badges[t])return"";var e=this.config.badges[t].image,i=this.config.badges[t].name;return""+i+""}},{key:"renderData",value:function(){var t=this;l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){var i=Object.keys(t.outputData.badges).map(function(e){return""+t.getBadgeMarkup(e)+" × "+t.outputData.badges[e]+""}).join(", ");$(".output-totals").html(""+$.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))+" / "+$.i18n("day")+""),$("#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 "+(i+1)+"\n "+e.lang+'\n '+e.label+"\n "+n+"\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\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"),o=Object.keys(t),a=$.Deferred(),r=[],s=0,l={},c=o.length,u=[],d=[],h=function o(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="Error in Cassandra table storage backend"===t.responseJSON.title,n=e.getPageLink(f.title,f.lang+"."+e.baseProject+".org");if(i){if(l[h]?l[h]++:l[h]=1,l[h]<3)return c++,e.rateLimit(o,e.config.apiThrottle,e)(h);u.push(n)}else e.writeMessage(n+": "+$.i18n("api-error","Pageviews API")+" - "+t.responseJSON.title);404!==t.status&&(hadFailure=!0)}).always(function(){e.updateProgressBar(++s,c),s===c&&(u.length&&e.writeMessage($.i18n("api-error-timeout","
    "+u.map(function(t){return"
  • "+t+"
  • "}).join("")+"
")),a.resolve(d))})},f=this.rateLimit(h,this.config.apiThrottle,this);return o.forEach(function(t,e){f(t)}),a}},{key:"getInterwikiData",value:function(t,e){var i=this,n=$.Deferred(),o="https://www.wikidata.org/w/api.php?action=wbgetentities&sites="+t+("&titles="+encodeURIComponent(e)+"&props=sitelinks/urls|datatype&format=json&callback=?");return $.getJSON(o).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 o=Object.keys(t.entities)[0],a=t.entities[o].sitelinks,r={},s=new RegExp("^https://[\\w-]+\\."+i.baseProject+"\\.org");return Object.keys(a).forEach(function(t){var e=a[t].site.replace(/-/g,"_");s.test(a[t].url)&&u[e]&&(a[t].lang=u[e].replace(/\.wiki.*$/,""),r[t]=a[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),this.patchUsage(),$(".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];return e[i].missing?(t.setState("initial"),t.writeMessage(t.getPageLink(i)+": "+$.i18n("api-error-no-data"))):($(t.config.sourceInput).val(i),void 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");break;case"invalid":}}},{key:"processInput",value:function(){var t=this,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 o=t.getPageLink(e,t.project);setTimeout(function(){t.buildMotherDataset(e,o,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){var e=t.query.prefixsearch.map(function(t){return t.title});return e}}})}},{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,'""')+'"',o='"'+i.badges.map(function(e){return t.config.badges[e].name.replace(/"/g,'""')})+'"';e+=[i.lang,n,o].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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||ee&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validateParams:["project","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","badges","lang"],view:["list","chart"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var r=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")}}(),s=function(){function t(t,e){for(var i=0;i0&&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:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),t?e.page=$(this.config.sourceInput).val().score():(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);var e=$(this.config.sourceInput).val().score().replace(/[&%?]/g,escape);window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&page="+e),$(".permalink").prop("href","/langviews?"+$.param(this.getPermaLink())+"&page="+e)}}},{key:"getBadgeMarkup",value:function(t){if(!this.config.badges[t])return"";var e=this.config.badges[t].image,i=this.config.badges[t].name;return""+i+""}},{key:"renderData",value:function(){var t=this;l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){var i=Object.keys(t.outputData.badges).map(function(e){return""+t.getBadgeMarkup(e)+" × "+t.outputData.badges[e]+""}).join(", ");$(".output-totals").html(""+$.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))+" / "+$.i18n("day")+""),$("#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 "+(i+1)+"\n "+e.lang+'\n '+e.label+"\n "+n+"\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\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"),o=Object.keys(t),a=$.Deferred(),r=[],s=0,l={},c=o.length,u=[],d=[],h=function o(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="Error in Cassandra table storage backend"===t.responseJSON.title,n=e.getPageLink(f.title,f.lang+"."+e.baseProject+".org");if(i){if(l[h]?l[h]++:l[h]=1,l[h]<3)return c++,e.rateLimit(o,e.config.apiThrottle,e)(h);u.push(n)}else e.writeMessage(n+": "+$.i18n("api-error","Pageviews API")+" - "+t.responseJSON.title);404!==t.status&&(hadFailure=!0)}).always(function(){e.updateProgressBar(++s,c),s===c&&(u.length&&e.writeMessage($.i18n("api-error-timeout","
    "+u.map(function(t){return"
  • "+t+"
  • "}).join("")+"
")),a.resolve(d))})},f=this.rateLimit(h,this.config.apiThrottle,this);return o.forEach(function(t,e){f(t)}),a}},{key:"getInterwikiData",value:function(t,e){var i=this,n=$.Deferred(),o="https://www.wikidata.org/w/api.php?action=wbgetentities&sites="+t+("&titles="+encodeURIComponent(e)+"&props=sitelinks/urls|datatype&format=json&callback=?");return $.getJSON(o).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 o=Object.keys(t.entities)[0],a=t.entities[o].sitelinks,r={},s=new RegExp("^https://[\\w-]+\\."+i.baseProject+"\\.org");return Object.keys(a).forEach(function(t){var e=a[t].site.replace(/-/g,"_");s.test(a[t].url)&&u[e]&&(a[t].lang=u[e].replace(/\.wiki.*$/,""),r[t]=a[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),this.patchUsage(),$(".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];return e[i].missing?(t.setState("initial"),t.writeMessage(t.getPageLink(i)+": "+$.i18n("api-error-no-data"))):($(t.config.sourceInput).val(i),void 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");break;case"invalid":}}},{key:"processInput",value:function(){var t=this,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 o=t.getPageLink(e,t.project);setTimeout(function(){t.buildMotherDataset(e,o,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){var e=t.query.prefixsearch.map(function(t){return t.title});return e}}})}},{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,'""')+'"',o='"'+i.badges.map(function(e){return t.config.badges[e].name.replace(/"/g,'""')})+'"';e+=[i.lang,n,o].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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||e"+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"")))})};return t.forEach(function(t,e){return l(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{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(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>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(c(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.setChartPointDetectionRadius(),t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{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};"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"),$(".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}}]),e}(t)};e.exports=u},{}],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;io?-e.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-attributes-alt glyphicon-sort-by-attributes").addClass("glyphicon-sort");var o=1===parseInt(this.direction,10)?"glyphicon-sort-by-attributes-alt":"glyphicon-sort-by-attributes";$(".sort-link--"+this.sort+" span").addClass(o).removeClass("glyphicon-sort");try{t(n)}catch(t){this.setState("complete"),this.showFatalErrors([t])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(t){var e=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+t).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(t+"-mode"),"chart"===t){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var i=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var n=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",n)}this.isLogarithmic()&&(i.scales=Object.assign({},i.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):""}}}]})),$(".show-labels-option").is(":checked")?i=this.showPointLabels(i):(delete i.animation.onComplete,delete i.animation.onProgress),"radar"===this.chartType?i.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):i.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var o=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(o,{type:this.chartType,data:this.outputData,options:i}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(t,e){if(!e)return $(".progress-bar").css("width","0%"),$(".progress-counter").text("");var i=t/e*100;$(".progress-bar").css("width",i.toFixed(2)+"%"),t===e?$(".progress-counter").text("Building dataset..."):$(".progress-counter").text($.i18n("processing-page",t,e))}}]),e}(t)};e.exports=s},{}],6:[function(t,e,i){"use strict";Array.prototype.includes||(Array.prototype.includes=function(t){return this.indexOf(t)!==-1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.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}$/,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;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=moment(this.daterangepicker.endDate).add(1,"day"),n=moment(this.daterangepicker.startDate);n.isBefore(i);n.add(1,"day"))t?e.push(n.format(this.dateFormat)):e.push(n.format("YYYY-MM-DD"));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())}},{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:"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"].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();return t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))}),$.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))]=e.to});var n={};return t.forEach(function(t){t=decodeURIComponent(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=decodeURI(location.search.slice(1)),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($.i18n("latest-days",o)),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(e){return t.validateProject(e)})}},{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){var i=$(".daterangepicker .ranges li").index(e.target),n=t.daterangepicker.container,o=n.find(".daterangepicker_input input");t.specialRange={range:Object.keys(t.config.specialRanges)[i],value:o[0].value+" - "+o[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"),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 decodeURIComponent(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];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.clearMessages(),this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),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(){return"true"===this.localizeDateFormat?this.getLocaleDateString():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=f},{"./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 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,minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().subtract(1,"days").startOf("day")],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),moment().subtract(1,"days").startOf("day")],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}}}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":9}],9:[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",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};e.exports=n},{}]},{},[2]); \ No newline at end of file diff --git a/public_html/massviews/application.js b/public_html/massviews/application.js index 3fb28a8c5..58c73e873 100644 --- a/public_html/massviews/application.js +++ b/public_html/massviews/application.js @@ -9,7 +9,7 @@ if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(t r.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;t>i;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,o=n.chartArea,a=n.options,r=a.elements.arc,s=o.right-o.left-r.borderWidth,l=o.bottom-o.top-r.borderWidth,c=Math.min(s,l),u={x:0,y:0},d=i.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var p=a.rotation%(2*Math.PI);p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0);var g=p+f,m={x:Math.cos(p),y:Math.sin(p)},k={x:Math.cos(g),y:Math.sin(g)},v=0>=p&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,w=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,b=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,x=h/100,D={x:y?-1:Math.min(m.x*(m.x<0?1:x),k.x*(k.x<0?1:x)),y:b?-1:Math.min(m.y*(m.y<0?1:x),k.y*(k.y<0?1:x))},C={x:v?1:Math.max(m.x*(m.x>0?1:x),k.x*(k.x>0?1:x)),y:w?1:Math.max(m.y*(m.y>0?1:x),k.y*(k.y>0?1:x))},S={width:.5*(C.x-D.x),height:.5*(C.y-D.y)};c=Math.min(s/S.width,l/S.height),u={x:(C.x+D.x)*-.5,y:(C.y+D.y)*-.5}}n.borderWidth=i.getMaxBorderWidth(d.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=u.x*n.outerRadius,n.offsetY=u.y*n.outerRadius,d.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=i.outerRadius-n.radiusLength,e.each(d.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var o=this,a=o.chart,r=a.chartArea,s=a.options,l=s.animation,c=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=o.getDataset(),p=n&&l.animateRotate?0:t.hidden?0:o.calculateCircumference(f.data[i])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:o.innerRadius,m=n&&l.animateScale?0:o.outerRadius,k=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:o.index,_index:i,_model:{x:c+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:m,innerRadius:g,label:k(f.label,i,a.data.labels[i])}});var v=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(0===i?v.startAngle=s.rotation:v.startAngle=o.getMeta().data[i-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),o=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(o+=Math.abs(t))}),o},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,a=t.length,r=0;a>r;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=t[r]._chart?t[r]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,addElementAndReset:function(i){var n=this,o=n.chart.options,a=n.getMeta();t.DatasetController.prototype.addElementAndReset.call(n,i),e(n.getDataset(),o)&&0!==a.dataset._model.tension&&n.updateBezierControlPoints()},update:function(t){var n,o,a,r=this,s=r.getMeta(),l=s.dataset,c=s.data||[],u=r.chart.options,d=u.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,u);for(p&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=h,l._datasetIndex=r.index,l._children=c,l._model={spanGaps:f.spanGaps?f.spanGaps:u.spanGaps,tension:a.tension?a.tension:i.getValueOrDefault(f.lineTension,d.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||d.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||d.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||d.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:a.steppedLine?a.steppedLine:i.getValueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:i.getValueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode),scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePixel()},l.pivot()),n=0,o=c.length;o>n;++n)r.updateElement(c[n],n,t);for(p&&0!==l._model.tension&&r.updateBezierControlPoints(),n=0,o=c.length;o>n;++n)c[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,o=this.getDataset(),a=t.custom||{};return a.backgroundColor?n=a.backgroundColor:o.pointBackgroundColor?n=i.getValueAtIndexOrDefault(o.pointBackgroundColor,e,n):o.backgroundColor&&(n=o.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,o=this.getDataset(),a=t.custom||{};return a.borderColor?n=a.borderColor:o.pointBorderColor?n=i.getValueAtIndexOrDefault(o.pointBorderColor,e,n):o.borderColor&&(n=o.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,o=this.getDataset(),a=t.custom||{};return a.borderWidth?n=a.borderWidth:o.pointBorderWidth?n=i.getValueAtIndexOrDefault(o.pointBorderWidth,e,n):o.borderWidth&&(n=o.borderWidth),n},updateElement:function(t,e,n){var o,a,r=this,s=r.getMeta(),l=t.custom||{},c=r.getDataset(),u=r.index,d=c.data[e],h=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),p=r.chart.options.elements.point,g=r.chart.data.labels||[],m=1===g.length||1===c.data.length||r.chart.isCombo;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),o=f.getPixelForValue("object"==typeof d?d:NaN,e,u,m),a=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=f,t._yScale=h,t._datasetIndex=u,t._index=e,t._model={x:o,y:a,skip:l.skip||isNaN(o)||isNaN(a),radius:l.radius||i.getValueAtIndexOrDefault(c.pointRadius,e,p.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(c.pointStyle,e,p.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(c.pointHitRadius,e,p.hitRadius)}},calculatePointY:function(t,e,i){var n,o,a,r=this,s=r.chart,l=r.getMeta(),c=r.getScaleForId(l.yAxisID),u=0,d=0;if(c.options.stacked){for(n=0;i>n;n++)if(o=s.data.datasets[n],a=s.getDatasetMeta(n),"line"===a.type&&a.yAxisID===c.id&&s.isDatasetVisible(n)){var h=Number(c.getRightValue(o.data[e]));0>h?d+=h||0:u+=h||0}var f=Number(c.getRightValue(t));return 0>f?c.getPixelForValue(d+f):c.getPixelForValue(u+f)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,o,a,r,s=this,l=s.getMeta(),c=s.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(u);else for(e=0,n=u.length;n>e;++e)o=u[e],a=o._model,r=i.splineCurve(i.previousItem(u,e)._model,a,i.nextItem(u,e)._model,l.dataset._model.tension),a.controlPointPreviousX=r.previous.x,a.controlPointPreviousY=r.previous.y,a.controlPointNextX=r.next.x,a.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;n>e;++e)a=u[e]._model,a.controlPointPreviousX=t(a.controlPointPreviousX,c.left,c.right),a.controlPointPreviousY=t(a.controlPointPreviousY,c.top,c.bottom),a.controlPointNextX=t(a.controlPointNextX,c.left,c.right),a.controlPointNextY=t(a.controlPointNextY,c.top,c.bottom)},draw:function(t){var i,n,o=this,a=o.getMeta(),r=a.data||[],s=t||1;for(i=0,n=r.length;n>i;++i)r[i].transition(s);for(e(o.getDataset(),o.chart.options)&&a.dataset.transition(s).draw(),i=0,n=r.length;n>i;++i)r[i].draw()},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=t._model;a.radius=o.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=o.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(a.backgroundColor)),a.borderColor=o.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(a.borderColor)),a.borderWidth=o.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=a.radius||i.getValueAtIndexOrDefault(n.pointRadius,o,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,o),r.borderColor=e.getPointBorderColor(t,o),r.borderWidth=e.getPointBorderWidth(t,o)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('
      ');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var a=0;a'),o[a]&&e.push(o[a]),e.push("");return e.push("
    "),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,o){var a=t.getDatasetMeta(0),r=i.datasets[0],s=a.data[o],l=s.custom||{},c=e.getValueAtIndexOrDefault,u=t.options.elements.arc,d=l.backgroundColor?l.backgroundColor:c(r.backgroundColor,o,u.backgroundColor),h=l.borderColor?l.borderColor:c(r.borderColor,o,u.borderColor),f=l.borderWidth?l.borderWidth:c(r.borderWidth,o,u.borderWidth);return{text:n,fillStyle:d,strokeStyle:h,lineWidth:f,hidden:isNaN(r.data[o])||a.data[o].hidden,index:o}}):[]}},onClick:function(t,e){var i,n,o,a=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;n>i;++i)o=r.getDatasetMeta(i),o.data[a].hidden=!o.data[a].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,o=n.chartArea,a=i.getMeta(),r=n.options,s=r.elements.arc,l=Math.min(o.right-o.left,o.bottom-o.top);n.outerRadius=Math.max((l-s.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,a.count=i.countVisibleElements(),e.each(a.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var o=this,a=o.chart,r=o.getDataset(),s=a.options,l=s.animation,c=a.scale,u=e.getValueAtIndexOrDefault,d=a.data.labels,h=o.calculateCircumference(r.data[i]),f=c.xCenter,p=c.yCenter,g=0,m=o.getMeta(),k=0;i>k;++k)isNaN(r.data[k])||m.data[k].hidden||++g;var v=s.startAngle,w=t.hidden?0:c.getDistanceFromCenterForValue(r.data[i]),y=v+h*g,b=y+(t.hidden?0:h),x=l.animateScale?0:c.getDistanceFromCenterForValue(r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:c,_model:{x:f,y:p,innerRadius:0,outerRadius:n?x:w,startAngle:n&&l.animateRotate?v:y,endAngle:n&&l.animateRotate?v:b,label:u(d,i,d[i])}}),o.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,addElementAndReset:function(e){t.DatasetController.prototype.addElementAndReset.call(this,e),this.updateBezierControlPoints()},update:function(t){var i=this,n=i.getMeta(),o=n.dataset,a=n.data,r=o.custom||{},s=i.getDataset(),l=i.chart.options.elements.line,c=i.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:c.top,scaleBottom:c.bottom,scaleZero:c.getBasePosition()}}),n.dataset.pivot(),e.each(a,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var o=this,a=t.custom||{},r=o.getDataset(),s=o.chart.scale,l=o.chart.options.elements.point,c=s.getPointPositionForValue(i,r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:s,_model:{x:n?s.xCenter:c.x,y:n?s.yCenter:c.y,tension:a.tension?a.tension:e.getValueOrDefault(r.tension,o.chart.options.elements.line.tension),radius:a.radius?a.radius:e.getValueAtIndexOrDefault(r.pointRadius,i,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,i,l.backgroundColor),borderColor:a.borderColor?a.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,i,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,i,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,i,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:e.getValueAtIndexOrDefault(r.hitRadius,i,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,o){var a=n._model,r=e.splineCurve(e.previousItem(i.data,o,!0)._model,a,e.nextItem(i.data,o,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,o,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,o,e.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,o,e.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,o,a.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,o,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,o,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,o,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,o,r.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o=this;n||(t.animating=!0);for(var a=0;a1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;nt.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var o=Date.now(),a=(o-e)/t.frameDuration;t.dropFrames+=a,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(t,e,i,n,o){var a,r,s,l,c,u;if("object"==typeof e&&(a=e.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return void t.drawImage(e,n-e.width/2,o-e.height/2);if(!(isNaN(i)||0>=i)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),r=3*i/Math.sqrt(3),c=r*Math.sqrt(3)/2,t.moveTo(n-r/2,o+c/3),t.lineTo(n+r/2,o+c/3),t.lineTo(n,o-2*c/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,o-u,2*u,2*u),t.strokeRect(n-u,o-u,2*u,2*u);break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,o),t.lineTo(n,o+u),t.lineTo(n+u,o),t.lineTo(n,o-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}}}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.types={},t.instances={},t.controllers={},t.Controller=function(i){return this.chart=i,this.config=i.config,this.options=this.config.options=e.configMerge(t.defaults.global,t.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),t.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},e.extend(t.Controller.prototype,{initialize:function(){var e=this;return t.plugins.notify("beforeInit",[e]),e.bindEvents(),e.ensureScalesHaveIDs(),e.buildOrUpdateControllers(),e.buildScales(),e.updateLayout(),e.resetElements(),e.initToolTip(),e.update(),t.plugins.notify("afterInit",[e]),e},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(i){var n=this,o=n.chart,a=o.canvas,r=e.getMaximumWidth(a),s=o.aspectRatio,l=n.options.maintainAspectRatio&&isNaN(s)===!1&&isFinite(s)&&0!==s?r/s:e.getMaximumHeight(a),c=o.width!==r||o.height!==l;if(!c)return n;a.width=o.width=r,a.height=o.height=l,e.retinaScale(o);var u={width:r,height:l};return t.plugins.notify("resize",[n,u]),n.options.onResize&&n.options.onResize(n,u),i||(n.stop(),n.update(n.options.responsiveAnimationDuration)),n},ensureScalesHaveIDs:function(){var t=this.options,i=t.scales||{},n=t.scale;e.each(i.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),e.each(i.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,n=i.options,o=i.scales={},a=[];n.scales&&(a=a.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),n.scale&&a.push({options:n.scale,dtype:"radialLinear",isDefault:!0}),e.each(a,function(n){var a=n.options,r=e.getValueOrDefault(a.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){var l=new s({id:a.id,options:a,ctx:i.chart.ctx,chart:i});o[l.id]=l,n.isDefault&&(i.scale=l)}}),t.scaleService.addScalesToLayout(this)},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=this,n=[],o=[];if(e.each(i.data.datasets,function(e,a){var r=i.getDatasetMeta(a);r.type||(r.type=e.type||i.config.type),n.push(r.type),r.controller?r.controller.updateIndex(a):(r.controller=new t.controllers[r.type](i,a),o.push(r.controller))},i),n.length>1)for(var a=1;ae;++e)n.getDatasetMeta(e).controller.update();t.plugins.notify("afterDatasetsUpdate",[n])}},render:function(i,n){var o=this;t.plugins.notify("beforeRender",[o]);var a=o.options.animation;if(a&&("undefined"!=typeof i&&0!==i||"undefined"==typeof i&&0!==a.duration)){var r=new t.Animation;r.numSteps=(i||a.duration)/16.66,r.easing=a.easing,r.render=function(t,i){var n=e.easingEffects[i.easing],o=i.currentStep/i.numSteps,a=n(o);t.draw(a,o,i.currentStep)},r.onAnimationProgress=a.onProgress,r.onAnimationComplete=a.onComplete,t.animationService.addAnimation(o,r,i,n)}else o.draw(),a&&a.onComplete&&a.onComplete.call&&a.onComplete.call(o);return o},draw:function(i){var n=this,o=i||1;n.clear(),t.plugins.notify("beforeDraw",[n,o]),e.each(n.boxes,function(t){t.draw(n.chartArea)},n),n.scale&&n.scale.draw(),t.plugins.notify("beforeDatasetsDraw",[n,o]),e.each(n.data.datasets,function(t,e){n.isDatasetVisible(e)&&n.getDatasetMeta(e).controller.draw(i)},n,!0),t.plugins.notify("afterDatasetsDraw",[n,o]),n.tooltip.transition(o).draw(),t.plugins.notify("afterDraw",[n,o])},getElementAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[];return e.each(i.data.datasets,function(t,a){if(i.isDatasetVisible(a)){var r=i.getDatasetMeta(a);e.each(r.data,function(t){return t.inRange(n.x,n.y)?(o.push(t),o):void 0})}}),o.slice(0,1)},getElementsAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[],a=function(){if(i.data.datasets)for(var t=0;t0&&(e=this.getDatasetMeta(e[0]._datasetIndex).data),e},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;i>e;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var i=this;i.stop(),i.clear(),e.unbindEvents(i,i.events),e.removeResizeListener(i.chart.canvas.parentNode);var n=i.chart.canvas;n.width=i.chart.width,n.height=i.chart.height,void 0!==i.chart.originalDevicePixelRatio&&i.chart.ctx.scale(1/i.chart.originalDevicePixelRatio,1/i.chart.originalDevicePixelRatio),n.style.width=i.chart.originalCanvasStyleWidth,n.style.height=i.chart.originalCanvasStyleHeight,t.plugins.notify("destroy",[i]),delete t.instances[i.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this;e.bindEvents(t,t.options.events,function(e){t.eventHandler(e)})},updateHoverStyle:function(t,e,i){var n,o,a,r=i?"setHoverStyle":"removeHoverStyle";switch(e){case"single":t=[t[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(o=0,a=t.length;a>o;++o)n=t[o],n&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var i=this,n=i.tooltip,o=i.options||{},a=o.hover,r=o.tooltips;return i.lastActive=i.lastActive||[],i.lastTooltipActive=i.lastTooltipActive||[],"mouseout"===t.type?(i.active=[],i.tooltipActive=[]):(i.active=i.getElementsAtEventForMode(t,a.mode),i.tooltipActive=i.getElementsAtEventForMode(t,r.mode)),a.onHover&&a.onHover.call(i,i.active),i.legend&&i.legend.handleEvent&&i.legend.handleEvent(t),("mouseup"===t.type||"click"===t.type)&&o.onClick&&o.onClick.call(i,t,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),(r.enabled||r.custom)&&(n.initialize(),n._active=i.tooltipActive,n.update(!0)),n.pivot(),i.animating||e.arrayEquals(i.active,i.lastActive)&&e.arrayEquals(i.tooltipActive,i.lastTooltipActive)||(i.stop(),(r.enabled||r.custom)&&n.update(!0),i.render(a.animationDuration,!0)),i.lastActive=i.active,i.lastTooltipActive=i.tooltipActive,i}})}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.DatasetController=function(t,e){this.initialize(t,e)},e.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],a=n.data;for(t=0,e=o.length;e>t;++t)a[t]=a[t]||i.createMetaData(n,t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this,i=e.createMetaData(t);e.getMeta().data.splice(t,0,i),e.updateElement(i,t,!0)},buildOrUpdateElements:function(){var t=this.getMeta(),e=t.data,i=this.getDataset().data.length,n=e.length;if(n>i)e.splice(i,n-i);else if(i>n)for(var o=n;i>o;++o)this.addElementAndReset(o)},update:i,draw:function(t){var i=t||1;e.each(this.getMeta().data,function(t){t.transition(i).draw()})},removeHoverStyle:function(t,i){var n=this.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=e.getValueAtIndexOrDefault,s=t._model;s.backgroundColor=a.backgroundColor?a.backgroundColor:r(n.backgroundColor,o,i.backgroundColor),s.borderColor=a.borderColor?a.borderColor:r(n.borderColor,o,i.borderColor),s.borderWidth=a.borderWidth?a.borderWidth:r(n.borderWidth,o,i.borderWidth)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=e.getValueAtIndexOrDefault,r=e.getHoverColor,s=t._model;s.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:a(i.hoverBackgroundColor,n,r(s.backgroundColor)),s.borderColor=o.hoverBorderColor?o.hoverBorderColor:a(i.hoverBorderColor,n,r(s.borderColor)), s.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:a(i.hoverBorderWidth,n,s.borderWidth)}}),t.DatasetController.extend=e.inherits}},{}],25:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,o){if("_"===o[0]);else if(i._view.hasOwnProperty(o))if(n===i._view[o]);else if("string"==typeof n)try{var a=e.color(i._model[o]).mix(e.color(i._start[o]),t);i._view[o]=a.rgbString()}catch(t){i._view[o]=n}else if("number"==typeof n){var r=void 0!==i._start[o]&&isNaN(i._start[o])===!1?i._start[o]:0;i._view[o]=(i._model[o]-r)*t+r}else i._view[o]=n;else"number"!=typeof n||isNaN(i._view[o])?i._view[o]=n:i._view[o]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,i){"use strict";var n=t(3);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function o(t,n,o){var a=document.defaultView,r=t.parentNode,s=a.getComputedStyle(t)[n],l=a.getComputedStyle(r)[n],c=i(s),u=i(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,t,o):d,u?e(l,r,o):d):"none"}var a=t.helpers={};a.each=function(t,e,i,n){var o,r;if(a.isArray(t))if(r=t.length,n)for(o=r-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;r>o;o++)e.call(i,t[o],o);else if("object"==typeof t){var s=Object.keys(t);for(r=s.length,o=0;r>o;o++)e.call(i,t[s[o]],s[o])}},a.clone=function(t){var e={};return a.each(t,function(t,i){a.isArray(t)?e[i]=t.slice(0):"object"==typeof t&&null!==t?e[i]=a.clone(t):e[i]=t}),e},a.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;n>i;i++)a.each(arguments[i],e);return t},a.configMerge=function(e){var i=a.clone(e);return a.each(Array.prototype.slice.call(arguments,1),function(e){a.each(e,function(e,n){if("scales"===n)i[n]=a.scaleMerge(i.hasOwnProperty(n)?i[n]:{},e);else if("scale"===n)i[n]=a.configMerge(i.hasOwnProperty(n)?i[n]:{},t.scaleService.getScaleDefaults(e.type),e);else if(i.hasOwnProperty(n)&&a.isArray(i[n])&&a.isArray(e)){var o=i[n];a.each(e,function(t,e){e=n[i].length||!n[i][o].type?n[i].push(a.configMerge(s,e)):e.type&&e.type!==n[i][o].type?n[i][o]=a.configMerge(n[i][o],s,e):n[i][o]=a.configMerge(n[i][o],e)}):(n[i]=[],a.each(e,function(e){var o=a.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(a.configMerge(t.scaleService.getScaleDefaults(o),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=a.configMerge(n[i],e):n[i]=e}),n},a.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:a.isArray(t)?ei;++i)if(t[i]===e)return i;return-1},a.where=function(t,e){if(a.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return a.each(t,function(t){e(t)&&i.push(t)}),i},a.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;o>n;++n)if(e.call(i,t[n],n,t))return n;return-1},a.findNextWhere=function(t,e,i){(void 0===i||null===i)&&(i=-1);for(var n=i+1;n=0;n--){var o=t[n];if(e(o))return o}},a.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i},a.noop=function(){},a.uid=function(){var t=0;return function(){return t++}}(),a.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1},a.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},a.toRadians=function(t){return t*(Math.PI/180)},a.toDegrees=function(t){return t*(180/Math.PI)},a.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),a=Math.atan2(n,i);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},a.aliasPixel=function(t){return t%2===0?0:.5},a.splineCurve=function(t,e,i,n){var o=t.skip?e:t,a=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;var d=n*c,h=n*u;return{previous:{x:a.x-d*(r.x-o.x),y:a.y-d*(r.y-o.y)},next:{x:a.x+h*(r.x-o.x),y:a.y+h*(r.y-o.y)}}},a.EPSILON=Number.EPSILON||1e-14,a.splineCurveMonotone=function(t){var e,i,n,o,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,o&&!o.model.skip&&(n.deltaK=(o.model.y-n.model.y)/(o.model.x-n.model.x)),!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2);var l,c,u,d;for(e=0;s-1>e;++e)n=r[e],o=r[e+1],n.model.skip||o.model.skip||(a.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(l=n.mK/n.deltaK,c=o.mK/n.deltaK,d=Math.pow(l,2)+Math.pow(c,2),9>=d||(u=3/Math.sqrt(d),n.mK=l*u*n.deltaK,o.mK=c*u*n.deltaK)));var h;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),o&&!o.model.skip&&(h=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},a.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},a.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},a.niceNum=function(t,e){var i,n=Math.floor(a.log10(t)),o=t/Math.pow(10,n);return i=e?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,i*Math.pow(10,n)};var r=a.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),nt?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};a.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),a.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),a.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var c=parseFloat(a.getStyle(r,"padding-left")),u=parseFloat(a.getStyle(r,"padding-top")),d=parseFloat(a.getStyle(r,"padding-right")),h=parseFloat(a.getStyle(r,"padding-bottom")),f=s.right-s.left-c-d,p=s.bottom-s.top-u-h;return i=Math.round((i-s.left-c)/f*r.width/e.currentDevicePixelRatio),n=Math.round((n-s.top-u)/p*r.height/e.currentDevicePixelRatio),{x:i,y:n}},a.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},a.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=a.noop},a.bindEvents=function(t,e,i){var n=t.events=t.events||{};a.each(e,function(e){n[e]=function(){i.apply(t,arguments)},a.addEvent(t.chart.canvas,e,n[e])})},a.unbindEvents=function(t,e){var i=t.chart.canvas;a.each(e,function(t,e){a.removeEvent(i,e,t)})},a.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},a.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},a.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-left"),10),n=parseInt(a.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,r=a.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},a.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-top"),10),n=parseInt(a.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,r=a.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},a.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},a.retinaScale=function(t){var e=t.ctx,i=t.canvas,n=i.width,o=i.height,a=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==a&&(i.height=o*a,i.width=n*a,e.scale(a,a),t.originalDevicePixelRatio=t.originalDevicePixelRatio||a),i.style.width=n+"px",i.style.height=o+"px"},a.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},a.fontString=function(t,e,i){return e+" "+t+"px "+i},a.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;a.each(i,function(e){void 0!==e&&null!==e&&a.isArray(e)!==!0?s=a.measureText(t,o,r,s,e):a.isArray(e)&&a.each(e,function(e){void 0===e||null===e||a.isArray(e)||(s=a.measureText(t,o,r,s,e))})});var l=r.length/2;if(l>i.length){for(var c=0;l>c;c++)delete o[r[c]];r.splice(0,l)}return s},a.measureText=function(t,e,i,n,o){var a=e[o];return a||(a=e[o]=t.measureText(o).width,i.push(o)),a>n&&(n=a),n},a.numberOfLabelLines=function(t){var e=1;return a.each(t,function(t){a.isArray(t)&&t.length>e&&(e=t.length)}),e},a.drawRoundedRectangle=function(t,e,i,n,o,a){t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+a),t.lineTo(e+n,i+o-a),t.quadraticCurveTo(e+n,i+o,e+n-a,i+o),t.lineTo(e+a,i+o),t.quadraticCurveTo(e,i+o,e,i+o-a),t.lineTo(e,i+a),t.quadraticCurveTo(e,i,e+a,i),t.closePath()},a.color=function(e){return n?n(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},a.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n),i.tabIndex=-1;var o=i.style;o.width="100%",o.display="block",o.border=0,o.height=0,o.margin=0,o.position="absolute",o.left=0,o.right=0,o.top=0,o.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){return e?e():void 0}},a.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},a.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.arrayEquals=function(t,e){var i,n,o,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;n>i;++i)if(o=t[i],r=e[i],o instanceof Array&&r instanceof Array){if(!a.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},a.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},a.getHoverColor=function(t){return t instanceof CanvasPattern?t:a.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){var n=this,o=t.helpers;return n.config=i||{data:{datasets:[]}},e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),n.ctx=e,n.canvas=e.canvas,e.canvas.style.display=e.canvas.style.display||"block",n.width=e.canvas.width||parseInt(o.getStyle(e.canvas,"width"),10)||o.getMaximumWidth(e.canvas),n.height=e.canvas.height||parseInt(o.getStyle(e.canvas,"height"),10)||o.getMaximumHeight(e.canvas),n.aspectRatio=n.width/n.height,(isNaN(n.aspectRatio)||isFinite(n.aspectRatio)===!1)&&(n.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),n.originalCanvasStyleWidth=e.canvas.style.width,n.originalCanvasStyleHeight=e.canvas.style.height,o.retinaScale(n),n.controller=new t.Controller(n),o.addResizeListener(e.canvas.parentNode,function(){n.controller&&n.controller.config.options.responsive&&n.controller.resize()}),n.controller?n.controller:n};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('
      ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
    "),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 o(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?g:b,y),x-=e.height):(e=t.update(w,v),b-=e.width),D.push({horizontal:i,minSize:e,box:t})}function a(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:C,right:S,top:0,bottom:0};t.update(t.options.fullWidth?g:b,m/2,n)}else t.update(i.minSize.width,x)}function r(t){var i=e.findNextWhere(D,function(e){return e.box===t}),n={left:0,right:0,top:M,bottom:Y};i&&t.update(i.minSize.width,x,n)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:C,t.right=t.options.fullWidth?i-l:C+b,t.top=A,t.bottom=A+t.height,A=t.bottom):(t.left=P,t.right=P+t.width,t.top=M,t.bottom=M+x,P=t.right)}if(t){var l=0,c=0,u=e.where(t.boxes,function(t){return"left"===t.options.position}),d=e.where(t.boxes,function(t){return"right"===t.options.position}),h=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),p=e.where(t.boxes,function(t){return"chartArea"===t.options.position});h.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var g=i-2*l,m=n-2*c,k=g/2,v=m/2,w=(i-k)/(u.length+d.length),y=(n-v)/(h.length+f.length),b=g,x=m,D=[];e.each(u.concat(d,h,f),o);var C=l,S=l,M=c,Y=c;e.each(u.concat(d),a),e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h.concat(f),a),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height}),e.each(u.concat(d),r),C=l,S=l,M=c,Y=c,e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height});var _=n-M-Y,T=i-C-S;(T!==b||_!==x)&&(e.each(u,function(t){t.height=_}),e.each(d,function(t){t.height=_}),e.each(h,function(t){t.options.fullWidth||(t.width=T)}),e.each(f,function(t){t.options.fullWidth||(t.width=T)}),x=_,b=T);var P=l,A=c;e.each(u.concat(h),s),P+=b,A+=x,e.each(d,s),e.each(f,s),t.chartArea={left:C,top:M,right:C+b,bottom:M+x},e.each(p,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(b,x)})}}}}},{}],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,o=n.getDatasetMeta(i);o.hidden=null===o.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,o=n.labels,a=n.display,r=i.ctx,s=t.defaults.global,l=e.getValueOrDefault,c=l(o.fontSize,s.defaultFontSize),u=l(o.fontStyle,s.defaultFontStyle),d=l(o.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=a?10:0):(p.width=a?10:0,p.height=i.maxHeight),a)if(r.font=h,g){var m=i.lineWidths=[0],k=i.legendItems.length?c+o.padding:0;r.textAlign="left",r.textBaseline="top",e.each(i.legendItems,function(t,e){var n=o.usePointStyle?c*Math.sqrt(2):o.boxWidth,a=n+c/2+r.measureText(t.text).width;m[m.length-1]+a+o.padding>=i.width&&(k+=c+o.padding,m[m.length]=i.left),f[e]={left:0,top:0,width:a,height:c},m[m.length-1]+=a+o.padding}),p.height+=k}else{var v=o.padding,w=i.columnWidths=[],y=o.padding,b=0,x=0,D=c+v;e.each(i.legendItems,function(t,e){var i=o.usePointStyle?2*o.boxWidth:o.boxWidth,n=i+c/2+r.measureText(t.text).width;x+D>p.height&&(y+=b+o.padding,w.push(b),b=0,x=0),b=Math.max(b,n),x+=D,f[e]={left:0,top:0,width:n,height:c}}),y+=b,w.push(b),p.width+=y}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,o=n.labels,a=t.defaults.global,r=a.elements.line,s=i.width,l=i.lineWidths;if(n.display){var c,u=i.ctx,d=e.getValueOrDefault,h=d(o.fontColor,a.defaultFontColor),f=d(o.fontSize,a.defaultFontSize),p=d(o.fontStyle,a.defaultFontStyle),g=d(o.fontFamily,a.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=o.boxWidth,v=i.legendHitBoxes,w=function(e,i,o){if(!(isNaN(k)||0>=k)){u.save(),u.fillStyle=d(o.fillStyle,a.defaultColor),u.lineCap=d(o.lineCap,r.borderCapStyle),u.lineDashOffset=d(o.lineDashOffset,r.borderDashOffset),u.lineJoin=d(o.lineJoin,r.borderJoinStyle),u.lineWidth=d(o.lineWidth,r.borderWidth),u.strokeStyle=d(o.strokeStyle,a.defaultColor);var s=0===d(o.lineWidth,r.borderWidth);if(u.setLineDash&&u.setLineDash(d(o.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,o.pointStyle,l,h,p)}else s||u.strokeRect(e,i,k,f),u.fillRect(e,i,k,f);u.restore()}},y=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+o.padding,line:0}:{x:i.left+o.padding,y:i.top+o.padding,line:0};var x=f+o.padding;e.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,a=o.usePointStyle?f+f/2+n:k+f/2+n,r=c.x,d=c.y;b?r+a>=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]+o.padding,d=c.y=i.top,c.line++),w(r,d,t),v[e].left=r,v[e].top=d,y(r,d,t,n),b?c.x+=a+o.padding:c.y+=x})}},handleEvent:function(t){var i=this,n=i.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!n.onHover)return}else{if("click"!==o)return;if(!n.onClick)return}var a=e.getRelativePosition(t,i.chart.chart),r=a.x,s=a.y;if(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)for(var l=i.legendHitBoxes,c=0;c=u.left&&r<=u.left+u.width&&s>=u.top&&s<=u.top+u.height){if("click"===o){n.onClick.call(i,t,i.legendItems[c]);break}if("mousemove"===o){n.onHover.call(i,t,i.legendItems[c]);break}}}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.legend;n&&(e.legend=new t.Legend({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.legend))}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)})},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e){var i,n,o=this._plugins,a=o.length;for(i=0;a>i;++i)if(n=o[i],"function"==typeof n[t]&&n[t].apply(n,e||[])===!1)return!1;return!0}},t.PluginBase=t.Element.extend({beforeInit:e,afterInit:e,beforeUpdate:e,afterUpdate:e,beforeDraw:e,afterDraw:e,destroy:e}),t.pluginService=t.plugins}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(t){return e.isArray(t)?t:""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=i,o.margins=e.extend({left:0,right:0,top:0,bottom:0},n),o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeDataLimits(),o.determineDataLimits(),o.afterDataLimits(),o.beforeBuildTicks(),o.buildTicks(),o.afterBuildTicks(),o.beforeTickToLabelConversion(),o.convertTicksToLabels(),o.afterTickToLabelConversion(),o.beforeCalculateTickRotation(),o.calculateTickRotation(),o.afterCalculateTickRotation(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;t.ticks=t.ticks.map(function(e,i,n){return t.options.ticks.userCallback?t.options.ticks.userCallback(e,i,n):t.options.ticks.callback(e,i,n)},t)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=this,n=i.ctx,o=t.defaults.global,a=i.options.ticks,r=e.getValueOrDefault(a.fontSize,o.defaultFontSize),s=e.getValueOrDefault(a.fontStyle,o.defaultFontStyle),l=e.getValueOrDefault(a.fontFamily,o.defaultFontFamily),c=e.fontString(r,s,l);n.font=c;var u,d=n.measureText(i.ticks[0]).width,h=n.measureText(i.ticks[i.ticks.length-1]).width;if(i.labelRotation=a.minRotation||0,i.paddingRight=0,i.paddingLeft=0,i.options.display&&i.isHorizontal()){i.paddingRight=h/2+3,i.paddingLeft=d/2+3,i.longestTextCache||(i.longestTextCache={});for(var f,p,g=e.longestText(n,c,i.ticks,i.longestTextCache),m=g,k=i.getPixelForTick(1)-i.getPixelForTick(0)-6;m>k&&i.labelRotationi.yLabelWidth&&(i.paddingLeft=u+r/2),i.paddingRight=r/2,p*g>i.maxHeight){i.labelRotation--;break}i.labelRotation++,m=f*g}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){var i=this,n=i.minSize={width:0,height:0},o=i.options,a=t.defaults.global,r=o.ticks,s=o.scaleLabel,l=o.gridLines,c=o.display,u=i.isHorizontal(),d=e.getValueOrDefault(r.fontSize,a.defaultFontSize),h=e.getValueOrDefault(r.fontStyle,a.defaultFontStyle),f=e.getValueOrDefault(r.fontFamily,a.defaultFontFamily),p=e.fontString(d,h,f),g=e.getValueOrDefault(s.fontSize,a.defaultFontSize),m=o.gridLines.tickMarkLength;if(u?n.width=i.isFullWidth()?i.maxWidth-i.margins.left-i.margins.right:i.maxWidth:n.width=c&&l.drawTicks?m:0,u?n.height=c&&l.drawTicks?m:0:n.height=i.maxHeight,s.display&&c&&(u?n.height+=1.5*g:n.width+=1.5*g),r.display&&c){i.longestTextCache||(i.longestTextCache={});var k=e.longestText(i.ctx,p,i.ticks,i.longestTextCache),v=e.numberOfLabelLines(i.ticks),w=.5*d;if(u){i.longestLabelWidth=k;var y=Math.sin(e.toRadians(i.labelRotation))*i.longestLabelWidth+d*v+w*v;n.height=Math.min(i.maxHeight,n.height+y),i.ctx.font=p;var b=i.ctx.measureText(i.ticks[0]).width,x=i.ctx.measureText(i.ticks[i.ticks.length-1]).width,D=Math.cos(e.toRadians(i.labelRotation)),C=Math.sin(e.toRadians(i.labelRotation));i.paddingLeft=0!==i.labelRotation?D*b+3:b/2+3,i.paddingRight=0!==i.labelRotation?C*(d/2)+3:x/2+3}else{var S=i.maxWidth-n.width,M=r.mirror;M?k=0:k+=i.options.ticks.padding,S>k?n.width+=k:n.width=i.maxWidth,i.paddingTop=d/2,i.paddingBottom=d/2}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingTop=Math.max(i.paddingTop-i.margins.top,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0),i.paddingBottom=Math.max(i.paddingBottom-i.margins.bottom,0)),i.width=n.width,i.height=n.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),o=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),a=o*t+i.paddingLeft;e&&(a+=o/2);var r=i.left+Math.round(a);return r+=i.isFullWidth()?i.margins.left:0}var s=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(s/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){var t=this,e=t.min,i=t.max;return t.getPixelForValue(t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(i){var n=this,o=n.options;if(o.display){var a,r,s=n.ctx,l=t.defaults.global,c=o.ticks,u=o.gridLines,d=o.scaleLabel,h=0!==n.labelRotation,f=c.autoSkip,p=n.isHorizontal();c.maxTicksLimit&&(r=c.maxTicksLimit);var g=e.getValueOrDefault(c.fontColor,l.defaultFontColor),m=e.getValueOrDefault(c.fontSize,l.defaultFontSize),k=e.getValueOrDefault(c.fontStyle,l.defaultFontStyle),v=e.getValueOrDefault(c.fontFamily,l.defaultFontFamily),w=e.fontString(m,k,v),y=u.tickMarkLength,b=e.getValueOrDefault(u.borderDash,l.borderDash),x=e.getValueOrDefault(u.borderDashOffset,l.borderDashOffset),D=e.getValueOrDefault(d.fontColor,l.defaultFontColor),C=e.getValueOrDefault(d.fontSize,l.defaultFontSize),S=e.getValueOrDefault(d.fontStyle,l.defaultFontStyle),M=e.getValueOrDefault(d.fontFamily,l.defaultFontFamily),Y=e.fontString(C,S,M),_=e.toRadians(n.labelRotation),T=Math.cos(_),P=n.longestLabelWidth*T; s.fillStyle=g;var A=[];if(p){if(a=!1,h&&(P/=2),(P+c.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(a=1+Math.floor((P+c.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),r&&n.ticks.length>r)for(;!a||n.ticks.length/(a||1)>r;)a||(a=1),a+=1;f||(a=!1)}var I="right"===o.position?n.left:n.right-y,O="right"===o.position?n.left+y:n.right,L="bottom"===o.position?n.top:n.bottom-y,$="bottom"===o.position?n.top+y:n.bottom;if(e.each(n.ticks,function(t,r){if(void 0!==t&&null!==t){var s=n.ticks.length===r+1,l=a>1&&r%a>0||r%a===0&&r+a>=n.ticks.length;if((!l||s)&&void 0!==t&&null!==t){var d,f;r===("undefined"!=typeof n.zeroLineIndex?n.zeroLineIndex:0)?(d=u.zeroLineWidth,f=u.zeroLineColor):(d=e.getValueAtIndexOrDefault(u.lineWidth,r),f=e.getValueAtIndexOrDefault(u.color,r));var g,m,k,v,w,D,C,S,M,Y,T="middle",P="middle";if(p){h||(P="top"===o.position?"bottom":"top"),T=h?"right":"center";var E=n.getPixelForTick(r)+e.aliasPixel(d);M=n.getPixelForTick(r,u.offsetGridLines)+c.labelOffset,Y=h?n.top+12:"top"===o.position?n.bottom-y:n.top+y,g=k=w=C=E,m=L,v=$,D=i.top,S=i.bottom}else{"left"===o.position?c.mirror?(M=n.right+c.padding,T="left"):(M=n.right-c.padding,T="right"):c.mirror?(M=n.left-c.padding,T="right"):(M=n.left+c.padding,T="left");var F=n.getPixelForTick(r);F+=e.aliasPixel(d),Y=n.getPixelForTick(r,u.offsetGridLines),g=I,k=O,w=i.left,C=i.right,m=v=D=S=F}A.push({tx1:g,ty1:m,tx2:k,ty2:v,x1:w,y1:D,x2:C,y2:S,labelX:M,labelY:Y,glWidth:d,glColor:f,glBorderDash:b,glBorderDashOffset:x,rotation:-1*_,label:t,textBaseline:P,textAlign:T})}}}),e.each(A,function(t){if(u.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),u.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),c.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=w,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(e.isArray(i))for(var n=0,o=-(i.length-1)*m*.75;ne;++e){var a=t[e];if(a&&a.hasValue()){var r=a.tooltipPosition();n.push(r.x),o.push(r.y)}}var s=0,l=0;for(e=0;e0){var a=t[0];a.xLabel?i=a.xLabel:o>0&&a.indexe;++e)p.push(n(c[e]));s.itemSort&&(p=p.sort(function(t,e){return s.itemSort(t,e,u)})),c.length>1&&o.each(p,function(t){h.push(s.callbacks.labelColor.call(r,t,d))}),o.extend(l,{title:r.getTitle(p,u),beforeBody:r.getBeforeBody(p,u),body:r.getBody(p,u),afterBody:r.getAfterBody(p,u),footer:r.getFooter(p,u),x:Math.round(f.x),y:Math.round(f.y),caretPadding:o.getValueOrDefault(f.padding,2),labelColors:h});var g=r.getTooltipSize(l);r.determineAlignment(g),o.extend(l,r.getBackgroundPoint(l,g))}else r._model.opacity=0;return t&&s.custom&&s.custom.call(r,l),r},getTooltipSize:function(t){var e=this._chart.ctx,i={height:2*t.yPadding,width:0},n=t.body,a=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=t.beforeBody.length+t.afterBody.length;var r=t.title.length,s=t.footer.length,l=t.titleFontSize,c=t.bodyFontSize,u=t.footerFontSize;i.height+=r*l,i.height+=(r-1)*t.titleSpacing,i.height+=r?t.titleMarginBottom:0,i.height+=a*c,i.height+=a?(a-1)*t.bodySpacing:0,i.height+=s?t.footerMarginTop:0,i.height+=s*u,i.height+=s?(s-1)*t.footerSpacing:0;var d=0,h=function(t){i.width=Math.max(i.width,e.measureText(t).width+d)};return e.font=o.fontString(l,t._titleFontStyle,t._titleFontFamily),o.each(t.title,h),e.font=o.fontString(c,t._bodyFontStyle,t._bodyFontFamily),o.each(t.beforeBody.concat(t.afterBody),h),d=n.length>1?c+2:0,o.each(n,function(t){o.each(t.before,h),o.each(t.lines,h),o.each(t.after,h)}),d=0,e.font=o.fontString(u,t._footerFontStyle,t._footerFontFamily),o.each(t.footer,h),i.width+=2*t.xPadding,i},determineAlignment:function(t){var e=this,i=e._model,n=e._chart,o=e._chartInstance.chartArea;i.yn.height-t.height&&(i.yAlign="bottom");var a,r,s,l,c,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2;"center"===i.yAlign?(a=function(t){return u>=t},r=function(t){return t>u}):(a=function(e){return e<=t.width/2},r=function(e){return e>=n.width-t.width/2}),s=function(e){return e+t.width>n.width},l=function(e){return e-t.width<0},c=function(t){return d>=t?"top":"bottom"},a(i.x)?(i.xAlign="left",s(i.x)&&(i.xAlign="center",i.yAlign=c(i.y))):r(i.x)&&(i.xAlign="right",l(i.x)&&(i.xAlign="center",i.yAlign=c(i.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,o=t.caretPadding,a=t.cornerRadius,r=t.xAlign,s=t.yAlign,l=n+o,c=a+o;return"right"===r?i.x-=e.width:"center"===r&&(i.x-=e.width/2),"top"===s?i.y+=l:"bottom"===s?i.y-=e.height+l:i.y-=e.height/2,"center"===s?"left"===r?i.x+=l:"right"===r&&(i.x-=l):"left"===r?i.x-=c:"right"===r&&(i.x+=c),i},drawCaret:function(t,e,i){var n,a,r,s,l,c,u=this._view,d=this._chart.ctx,h=u.caretSize,f=u.cornerRadius,p=u.xAlign,g=u.yAlign,m=t.x,k=t.y,v=e.width,w=e.height;"center"===g?("left"===p?(n=m,a=n-h,r=n):(n=m+v,a=n+h,r=n),l=k+w/2,s=l-h,c=l+h):("left"===p?(n=m+f,a=n+h,r=a+h):"right"===p?(n=m+v-f,a=n-h,r=a-h):(a=m+v/2,n=a-h,r=a+h),"top"===g?(s=k,l=s-h,c=s):(s=k+w,l=s+h,c=s));var y=o.color(u.backgroundColor);d.fillStyle=y.alpha(i*y.alpha()).rgbString(),d.beginPath(),d.moveTo(n,s),d.lineTo(a,l),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r=e.titleFontSize,s=e.titleSpacing,l=o.color(e.titleFontColor);i.fillStyle=l.alpha(n*l.alpha()).rgbString(),i.font=o.fontString(r,e._titleFontStyle,e._titleFontFamily);var c,u;for(c=0,u=a.length;u>c;++c)i.fillText(a[c],t.x,t.y),t.y+=r+s,c+1===a.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i,n){var a=e.bodyFontSize,r=e.bodySpacing,s=e.body;i.textAlign=e._bodyAlign,i.textBaseline="top";var l=o.color(e.bodyFontColor),c=l.alpha(n*l.alpha()).rgbString();i.fillStyle=c,i.font=o.fontString(a,e._bodyFontStyle,e._bodyFontFamily);var u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=a+r};o.each(e.beforeBody,d);var h=s.length>1;u=h?a+2:0,o.each(s,function(r,s){o.each(r.before,d),o.each(r.lines,function(r){h&&(i.fillStyle=o.color(e.legendColorBackground).alpha(n).rgbaString(),i.fillRect(t.x,t.y,a,a),i.strokeStyle=o.color(e.labelColors[s].borderColor).alpha(n).rgbaString(),i.strokeRect(t.x,t.y,a,a),i.fillStyle=o.color(e.labelColors[s].backgroundColor).alpha(n).rgbaString(),i.fillRect(t.x+1,t.y+1,a-2,a-2),i.fillStyle=c),d(r)}),o.each(r.after,d)}),u=0,o.each(e.afterBody,d),t.y-=r},drawFooter:function(t,e,i,n){var a=e.footer;if(a.length){t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top";var r=o.color(e.footerFontColor);i.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.font=o.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),o.each(a,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i=this.getTooltipSize(e),n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.enabled){var r=o.color(e.backgroundColor);t.fillStyle=r.alpha(a*r.alpha()).rgbString(),o.drawRoundedRectangle(t,n.x,n.y,i.width,i.height,e.cornerRadius),t.fill(),this.drawCaret(n,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a)}}}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)l;)l+=2*Math.PI;for(;a>l;)a-=2*Math.PI;for(;s>a;)a+=2*Math.PI;var c=a>=s&&l>=a,u=r>=n.innerRadius&&r<=n.outerRadius;return c&&u}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;e._view.steppedLine===!0?(l.lineTo(i.x,t._view.y),l.lineTo(i.x,i.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,o=n._view,a=o.spanGaps,r=o.scaleZero,s=n._loop,l=n._chart.ctx;l.save();var c=n._children.slice(),u=-1;s&&c.length&&c.push(c[0]);var d,h,f,p;if(c.length&&o.fill){for(l.beginPath(),d=0;dd;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return!!i&&(i.y=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.xLabels&&o||n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t]},getPixelForValue:function(t,e,i,n){var o=this,a=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var r=o.getLabels(),s=r.indexOf(t);e=-1!==s?s:e}if(o.isHorizontal()){var l=o.width-(o.paddingLeft+o.paddingRight),c=l/a,u=c*(e-o.minIndex)+o.paddingLeft;return(o.options.gridLines.offsetGridLines&&n||o.maxIndex===o.minIndex&&n)&&(u+=c/2),o.left+Math.round(u)}var d=o.height-(o.paddingTop+o.paddingBottom),h=d/a,f=h*(e-o.minIndex)+o.paddingTop;return o.options.gridLines.offsetGridLines&&n&&(f+=h/2),o.top+Math.round(f)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,i=this,n=Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),o=i.isHorizontal(),a=o?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.paddingBottom),r=a/n;return t-=o?i.left:i.top,i.options.gridLines.offsetGridLines&&(t-=r/2),t-=o?i.paddingLeft:i.paddingTop,e=0>=t?0:Math.round(t/r)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=e.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r}}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=i.chart,a=o.data,r=a.datasets,s=i.isHorizontal();if(i.min=null,i.max=null,n.stacked){var l={};e.each(r,function(a,r){var s=o.getDatasetMeta(r);void 0===l[s.type]&&(l[s.type]={positiveValues:[],negativeValues:[]});var c=l[s.type].positiveValues,u=l[s.type].negativeValues;o.isDatasetVisible(r)&&t(s)&&e.each(a.data,function(t,e){var o=+i.getRightValue(t);isNaN(o)||s.data[e].hidden||(c[e]=c[e]||0,u[e]=u[e]||0,n.relativePoints?c[e]=100:0>o?u[e]+=o:c[e]+=o)})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),o=e.min(n),a=e.max(n);i.min=null===i.min?o:Math.min(i.min,o),i.max=null===i.max?a:Math.max(i.max,a)})}else e.each(r,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,o=n.options.ticks;if(n.isHorizontal())i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.width/50));else{var a=e.getValueOrDefault(o.fontSize,t.defaults.global.defaultFontSize);i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.height/(2*a)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i,n=this,o=n.paddingLeft,a=n.paddingBottom,r=n.start,s=+n.getRightValue(t),l=n.end-r;return n.isHorizontal()?(i=n.width-(o+n.paddingRight),e=n.left+i/l*(s-r),Math.round(e+o)):(i=n.height-(n.paddingTop+a),e=n.bottom-a-i/l*(s-r),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,o=e.paddingBottom,a=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+o),r=(i?t-e.left-n:e.bottom-o-t)/a;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var o=e.sign(t.min),a=e.sign(t.max);0>o&&0>a?t.max=0:o>0&&a>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],o=i.ticks,a=e.getValueOrDefault,r=t.getTickLimit();r=Math.max(2,r);var s,l=o.fixedStepSize&&o.fixedStepSize>0||o.stepSize&&o.stepSize>0;if(l)s=a(o.fixedStepSize,o.stepSize);else{var c=e.niceNum(t.max-t.min,!1);s=e.niceNum(c/(r-1),!0)}var u=Math.floor(t.min/s)*s,d=Math.ceil(t.max/s)*s,h=(d-u)/s;h=e.almostEquals(h,Math.round(h),s/1e3)?Math.round(h):Math.ceil(h),n.push(void 0!==o.min?o.min:u);for(var f=1;h>f;++f)n.push(u+f*s);n.push(void 0!==o.max?o.max:d),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),o.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return c?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=n.ticks,a=i.chart,r=a.data,s=r.datasets,l=e.getValueOrDefault,c=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var u={};e.each(s,function(o,r){var s=a.getDatasetMeta(r);a.isDatasetVisible(r)&&t(s)&&(void 0===u[s.type]&&(u[s.type]=[]),e.each(o.data,function(t,e){var o=u[s.type],a=+i.getRightValue(t);isNaN(a)||s.data[e].hidden||(o[e]=o[e]||0,n.relativePoints?o[e]=100:o[e]+=a)}))}),e.each(u,function(t){var n=e.min(t),o=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(s,function(n,o){var r=a.getDatasetMeta(o);a.isDatasetVisible(o)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n),0!==n&&(null===i.minNotZero||nt.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,o,a,r,s,l,c,u,d,h,f,p=this.options.pointLabels,g=e.getValueOrDefault(p.fontSize,i.defaultFontSize),m=e.getValueOrDefault(p.fontStyle,i.defaultFontStyle),k=e.getValueOrDefault(p.fontFamily,i.defaultFontFamily),v=e.fontString(g,m,k),w=e.min([this.height/2-g-5,this.width/2]),y=this.width,b=0;for(this.ctx.font=v,n=0;ny&&(y=t.x+a,r=n),t.x-aD?t.x+o>y&&(y=t.x+o,r=n):t.x-oe&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",sources:{category:{placeholder:"https://en.wikipedia.org/wiki/Category:Folk_musicians_from_New_York",descriptionParams:function(){return[""+$.i18n("category").toLowerCase()+""]},type:"text"},wikilinks:{placeholder:"https://en.wikipedia.org/wiki/Book:New_York_City",descriptionParams:function(){return["https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Wikilinks"]},type:"text"},pagepile:{placeholder:"12345",descriptionParams:function(){return["PagePile"]},type:"number"},subpages:{placeholder:"https://en.wikipedia.org/wiki/User:Example",descriptionParams:function(){return[""+$.i18n("subpages").toLowerCase()+""]},type:"text"},transclusions:{placeholder:"https://en.wikipedia.org/wiki/Template:Infobox_Olympic_games",descriptionParams:function(){return["https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Transclusion"]},type:"text"},quarry:{placeholder:"12345",descriptionParams:function(){return["Quarry"]},type:"number"},hashtag:{placeholder:"#editathon",descriptionParams:function(){return[""+$.i18n("hashtag-credits","Wikipedia social search"),""+$.i18n("hashtag").toLowerCase()+""]},type:"string"},"external-link":{placeholder:"*.nycgo.com",descriptionParams:function(){return[""+$.i18n("external-link").toLowerCase()+""]},type:"string"}},platformSelector:"#platform_select",sourceButton:"#source_button",sourceInput:"#source_input",formStates:["initial","processing","complete","invalid"],timestampFormat:"YYYYMMDD00",validateParams:["source","subjectpage","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","original"],source:["pagepile","wikilinks","category","subpages","transclusions","quarry","hashtag","external-link"],view:["list","chart"],subjectpage:["0","1"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e"),$(this.config.sourceInput).prop("type",this.config.sources[i].type).prop("placeholder",this.config.sources[i].placeholder).val(""),$(".source-description").html((e=$).i18n.apply(e,["massviews-"+i+"-description"].concat(n(this.config.sources[i].descriptionParams())))),"category"===i?$(".category-subject-toggle").show():$(".category-subject-toggle").hide(),"quarry"===i||"external-link"===i?($(".massviews-source-input").addClass("project-enabled"),$(".project-input").prop("disabled",!1)):($(".massviews-source-input").removeClass("project-enabled"),$(".project-input").prop("disabled",!0)),$(this.config.sourceInput).focus()}},{key:"getParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={platform:$(this.config.platformSelector).val(),agent:$(this.config.agentSelector).val(),source:$(this.config.sourceButton).data("value"),target:$(this.config.sourceInput).val().score()};return this.specialRange&&!t?e.range=this.specialRange.range:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),"category"===e.source?e.subjectpage=$(".category-subject-toggle--input").is(":checked")?"1":"0":"quarry"!==e.source&&"external-link"!==e.source||(e.project=$(".project-input").val()),t||(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);window.history.replaceState({},document.title,"?"+$.param(this.getParams())),$(".permalink").prop("href","/massviews?"+$.param(this.getPermaLink()))}}},{key:"renderData",value:function(){var t=this;c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){var i=$("#source_button").data("value"),n=void 0;n=["wikilinks","subpages","transclusions"].includes(i)?$.i18n("num-"+i,e.length-("subpages"===i?1:0)):$.i18n("num-pages",e.length),$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n(n,e.length)+"\n "+t.formatNumber(t.outputData.sum)+"\n "+t.formatNumber(Math.round(t.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),e.forEach(function(e,i){$("#output_list").append("\n "+(i+1)+"\n "+t.getPageLink(e.label,e.project)+'\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(t,e){switch(e){case"original":return t.index;case"title":return t.label;case"views":return Number(t.sum)}}},{key:"getPageViewsData",value:function(t,e){var i=this,n=this.daterangepicker.startDate.startOf("day"),o=this.daterangepicker.endDate.startOf("day"),a=$.Deferred(),r=0,l={},c=t.length,u=[],d=[],h=function t(h){var f=void 0;if(e)f=e;else{var p=i.getWikiPageFromURL(h),g=s(p,2);f=g[0],h=g[1]}var m=encodeURIComponent(h),k="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+f+("/"+$(i.config.platformSelector).val()+"/"+$(i.config.agentSelector).val()+"/"+m+"/daily")+("/"+n.format(i.config.timestampFormat)+"/"+o.format(i.config.timestampFormat)),v=$.ajax({url:k,dataType:"json"});v.done(function(t){d.push({title:h,project:f,items:t.items})}).fail(function(e){var n="Error in Cassandra table storage backend"===e.responseJSON.title;return n&&(l[h]?l[h]++:l[h]=1,l[h]<3)?(c++,i.rateLimit(t,100,i)(h)):(n?u.push(h):i.writeMessage(i.getPageLink(h,f)+": "+$.i18n("api-error","Pageviews API")+" - "+e.responseJSON.title),void(404!==e.status&&(hadFailure=!0)))}).always(function(){i.updateProgressBar(++r,c),r===c&&(u.length&&i.writeMessage($.i18n("api-error-timeout","
      "+u.map(function(t){return"
    • "+i.getPageLink(t,f)+"
    • "}).join("")+"
    ")),a.resolve(d))})},f=this.rateLimit(h,this.config.apiThrottle,this);return t.forEach(function(t,e){f(t)}),a}},{key:"buildMotherDataset",value:function(t,e,i){var n=this;this.outputData={labels:this.getDateHeadings(!0),link:e,listData:[]};var o=moment(this.daterangepicker.startDate),a=moment(this.daterangepicker.endDate),r=this.numDaysInRange(),l=new Array(r).fill(0),c=[];i.forEach(function(t,e){var i=t.items.map(function(t){return t.views}),u=i.reduce(function(t,e){return t+e});n.outputData.listData.push({data:i,label:t.title,project:t.project,sum:u,average:u/r,index:e});var d=n.fillInZeros(t.items,o,a),h=s(d,2),f=h[0],p=h[1];p.forEach(function(t){c.includes(t)||c.push(t)}),l=l.map(function(t,e){return t+f[e].views})});var u=l.reduce(function(t,e){return(t||0)+(e||0)});if(Object.assign(this.outputData,{datasets:[{label:t,data:l,sum:u,average:u/r}],datesWithoutData:c,sum:u,average:u/r}),c.length){var d=c.map(function(t){return moment(t).format(n.dateFormat)});this.writeMessage($.i18n("api-incomplete-data",d.sort().join(" · "),d.length))}return this.hadFailure||simpleStorage.set(this.getCacheKey(),this.outputData,{TTL:6e5}),this.outputData}},{key:"getPileURL",value:function(t){return"http://tools.wmflabs.org/pagepile/api.php?action=get_data&id="+t}},{key:"getPileLink",value:function(t){return"Page Pile "+t+""}},{key:"getPagePile",value:function(t){var e=this,i=$.Deferred(),n="https://tools.wmflabs.org/pagepile/api.php?id="+t+"&action=get_data&format=json&metadata=1";return $.ajax({url:n,dataType:"jsonp"}).done(function(n){var o=Object.keys(n.pages);return o.length>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",e.getPileLink(t),e.formatNumber(o.length),e.config.apiLimit)),o=o.slice(0,e.config.apiLimit)),i.resolve({id:n.id,wiki:n.wiki,pages:o})}).fail(function(n){return i.reject(e.getPileLink(t)+": "+$.i18n("api-error-no-data"))}),i}},{key:"getWikiPageFromURL",value:function(t){var e=void 0;return e=t.includes("?")?t.match(/\/\/(.*?)\/w\/.*\?(?:.*\b)?title=(.*?)(?:&|$)/):t.match(/\/\/(.*?)\/wiki\/(.*?)(?:\?|$)/),e?e.slice(1):[null,null]}},{key:"popParams",value:function(){var t=this,e=this.validateParams(this.parseQueryString());this.validateDateRange(e),this.patchUsage(),this.updateSourceInput($(".source-option[data-value="+e.source+"]")[0]),e.target&&$(this.config.sourceInput).val(decodeURIComponent(e.target).descore()),$(".site-notice .alert-danger").length?delete e.target:e.overflow&&"pagepile"===e.source&&e.target&&this.toastInfo($.i18n("massviews-redirect",$.i18n("title"),10,this.getPileLink(e.target))),$(this.config.platformSelector).val(e.platform),$(this.config.agentSelector).val(e.agent),["sort","direction","view","source","subjectpage"].forEach(function(i){t[i]=e[i]}),"quarry"!==e.source&&"external-link"!==e.source||!e.project||$(".project-input").val(e.project),"1"===e.subjectpage&&$(".category-subject-toggle--input").prop("checked",!0),e.target&&this.processInput()}},{key:"setState",value:function(t,e){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(t),t){case"initial":this.updateProgressBar(0),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(),"function"==typeof e&&e.call(this);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");break;case"invalid":}}},{key:"apiErrorReset",value:function(t,e){var i=this;this.setState("initial",function(){var n=void 0;n=e?$.i18n("api-error",t)+": "+e:""+$.i18n("api-error-unknown",t),i.writeMessage(n)})}},{key:"processPagePile",value:function(t){var e=this,i=$(this.config.sourceInput).val();$(".progress-counter").text($.i18n("fetching-data","Page Pile API")),this.getPagePile(i).done(function(n){if(!n.pages.length)return e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",e.getPileLink(i)))});var o=d[n.wiki];"en.wikipedia.org"===o&&(n.pages=n.pages.map(function(t){return t.replace(/^Project:Wikipedia:/,"Wikipedia:")})),e.getPageViewsData(n.pages,o).done(function(i){var a="Page Pile #"+n.id;$(".output-title").text(a).prop("href",e.getPileURL(n.id)),$(".output-params").html("\n "+$(e.config.dateRangeSelector).val()+'\n —\n \n '+o.replace(/.org$/,"").escape()+"\n \n "),t(a,e.getPileLink(n.id),i)})}).fail(function(t){e.setState("initial"),"string"==typeof t?e.writeMessage(t):e.writeMessage($.i18n("api-error-unknown","Page Pile"))})}},{key:"processCategory",value:function(t,e,i){var n=this,o={list:"categorymembers",cmlimit:500,cmtitle:e,prop:"categoryinfo",titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Category API")),this.massApi(o,t,"cmcontinue","categorymembers").done(function(o){if(o.error)return n.apiErrorReset("Category API",o.error.info);var r=o.pages[0];if(r.missing)return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var s=r.categoryinfo.size,l=n.getSiteInfo(t)?n.getSiteInfo(t).namespaces:void 0,c=o.categorymembers;if(!c.length)return n.setState("initial",function(){n.writeMessage($.i18n("massviews-empty-set",a))});s>n.config.apiLimit&&(n.writeMessage($.i18n("massviews-oversized-set",a,n.formatNumber(s),n.config.apiLimit)),c=c.slice(0,n.config.apiLimit));var u=n.mapCategoryPageNames(c,l);n.getPageViewsData(u,t).done(function(t){i(e,a,t)})}).fail(function(t){n.setState("initial"),t&&"string"==typeof t.error?n.writeMessage($.i18n("api-error",a+": "+t.error)):n.writeMessage($.i18n("api-error-unknown",a))})}},{key:"processHashtag",value:function(t){var e=this,i=$(this.config.sourceInput).val().replace(/^#/,""),n='#'+i.escape()+"";$(".progress-counter").text($.i18n("fetching-data","Hashtag API")),$.get("//tools.wmflabs.org/hashtags/csv/"+i+"?limit=5000").done(function(o){for(var a=",",r=new RegExp("(\\"+a+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|'+('([^"\\'+a+"\\r\\n]*))"),"gi"),s=[[]],l=void 0;l=r.exec(o);){var c=l[1];c.length&&c!==a&&s.push([]);var u=void 0;u=l[2]?l[2].replace(new RegExp('""',"g"),'"'):l[3],s[s.length-1].push(u)}return 1!==s[s.length-1].length||s[s.length-1][0]||(s=s.slice(0,-1)),1===s.length?e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",n))}):void e.getPageURLsFromHashtagCSV(s).done(function(o){var a=o.length;a>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",n,e.formatNumber(a),e.config.apiLimit)),o=o.slice(0,e.config.apiLimit)),e.getPageViewsData(o).done(function(e){t(i,n,e)})}).fail(function(){return e.apiErrorReset("Siteinfo API")})}).fail(function(){return e.apiErrorReset("Hashtag API")})}},{key:"getPageURLsFromHashtagCSV",value:function(t){var e=this,i=$.Deferred(),n=t[0].indexOf("spaced_title"),o=t[0].indexOf("rc_namespace"),a=t[0].indexOf("diff_url"),r=[];return t.slice(1).forEach(function(s){var l=s[a].match(/https:\/\/(.*?\.org)\//)[1];e.fetchSiteInfo(l).done(function(){var a=e.getSiteInfo(l).namespaces[s[o]]["*"];r.push("https://"+l+"/wiki/"+(a?a+":":"")+s[n]),r.length===t.length-1&&i.resolve(r.unique())}).fail(function(){i.reject()})}),i}},{key:"processSubpages",value:function(t,e,i){var n,o=this,a=e.descore(),r=0,s=void 0;for(var l in this.getSiteInfo(t).namespaces)if("0"!==l){var c=this.getSiteInfo(t).namespaces[l]["*"]+":";a.startsWith(c)&&(r=this.getSiteInfo(t).namespaces[l].id,s=e.substring(c.length))}var u=r%2===0?r+1:r-1,d=[];$(".progress-counter").text($.i18n("fetching-data","Allpages API")),[r,u].forEach(function(e){var i={list:"allpages",aplimit:500,apnamespace:e,apprefix:s+"/"};d.push(o.massApi(i,t,"apcontinue","allpages"))});var h=this.getPageLink(e,t);(n=$).when.apply(n,d).done(function(n,a){var r=[n,a].filter(function(t){return!!t.error});if(r.length)return o.setState("initial",function(){r.forEach(function(t){o.writeMessage($.i18n("api-error","Allpages API")+": "+t.error.info.escape())})}),!1;var s=n.allpages.concat(a.allpages),l=s.length;if(0===l)return o.setState("initial",function(){o.writeMessage($.i18n("api-error-no-data"))});l>o.config.apiLimit&&(o.writeMessage($.i18n("massviews-oversized-set",h,o.formatNumber(l),o.config.apiLimit)),s=s.slice(0,o.config.apiLimit));var c=[e].concat(s.map(function(t){return t.title}));o.getPageViewsData(c,t).done(function(t){i(e,h,t)})}).fail(function(t){o.setState("initial"),t&&"string"==typeof t.error?o.writeMessage($.i18n("api-error",h+": "+t.error)):o.writeMessage($.i18n("api-error-unknown",h))})}},{key:"processTemplate",value:function(t,e,i){var n=this,o={prop:"transcludedin",tilimit:500,titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Transclusion API")),this.massApi(o,t,"ticontinue",function(t){return t.pages[0].transcludedin}).done(function(o){if(o.error)return n.apiErrorReset("Transclusion API",o.error.info);if(!o.pages[0])return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var r=o.pages.map(function(t){return t.title});o.continue&&n.writeMessage($.i18n("massviews-oversized-set-unknown",a,n.config.apiLimit)),n.getPageViewsData(r,t).done(function(t){i(e,a,t)})}).fail(function(t){n.setState("initial"),t&&"string"==typeof t.error?n.writeMessage($.i18n("api-error",a+": "+t.error)):n.writeMessage($.i18n("api-error-unknown",a))})}},{key:"processWikiPage",value:function(t,e,i){var n=this,o={pllimit:500,prop:"links",titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Links API")),this.massApi(o,t,"plcontinue",function(t){return t.pages[0].links}).done(function(o){if(o.error)return n.apiErrorReset("Links API",o.error.info);if(!o.pages[0])return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var r=o.pages.map(function(t){return t.title});return r.length?(o.continue&&n.writeMessage($.i18n("massviews-oversized-set-unknown",a,n.config.apiLimit)),void n.getPageViewsData(r,t).done(function(t){i(e,a,t)})):n.setState("initial",function(){n.writeMessage($.i18n("massviews-empty-set",a))})}).fail(function(t){var e=t&&"string"==typeof t.error?t.error:null;n.apiErrorReset("Links API",e)})}},{key:"processQuarry",value:function(t){var e=this,i=$(".project-input").val(),n=$(this.config.sourceInput).val();if(this.validateProject(i)){var o="https://quarry.wmflabs.org/query/"+n+"/result/latest/0/json",a="Quarry "+n+"";$(".progress-counter").text($.i18n("fetching-data","Quarry API")),$.getJSON(o).done(function(o){var r=o.headers.indexOf("page_title");if(r===-1)return e.setState("initial"),e.writeMessage($.i18n("invalid-quarry-dataset","page_title"));var s=o.rows.map(function(t){return t[r]});s.length>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",a,e.formatNumber(s.length),e.config.apiLimit)),s=s.slice(0,e.config.apiLimit)),e.getPageViewsData(s,i).done(function(e){t(n,a,e); -})}).fail(function(t){return e.setState("initial"),e.writeMessage($.i18n("api-error-unknown","Quarry API"),!0)})}}},{key:"processExternalLink",value:function(t){var e=this,i=$(".project-input").val(),n=$(this.config.sourceInput).val();if(this.validateProject(i)){var o={list:"exturlusage",eulimit:500,eunamespace:0,euquery:n},a=""+n+"";$(".progress-counter").text($.i18n("fetching-data","External link API")),this.massApi(o,i,"euoffset","exturlusage").done(function(o){if(o.error)return e.apiErrorReset("External link API",o.error.info);if(!o.exturlusage[0])return e.setState("initial",function(){e.writeMessage($.i18n("api-error-no-data"))});var r=o.exturlusage.map(function(t){return t.title}).unique();return r.length?(o.continue&&e.writeMessage($.i18n("massviews-oversized-set-unknown",a,e.config.apiLimit)),void e.getPageViewsData(r,i).done(function(e){t(n,a,e)})):e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",a))})}).fail(function(t){e.setState("initial"),t&&"string"==typeof t.error?e.writeMessage($.i18n("api-error",a+": "+t.error)):e.writeMessage($.i18n("api-error-unknown",a))})}}},{key:"validateProject",value:function(t){return!!t&&(t=t.replace(/^www\./,""),!!h.includes(t)||(this.setState("initial"),this.writeMessage($.i18n("invalid-project",""+t.escape()+""),!0),!1))}},{key:"mapCategoryPageNames",value:function(t,e){var i=[];return t.forEach(function(t){if(e&&t.ns%2===1){var n=e[t.ns].canonical,o=e[t.ns-1].canonical||"";i.push(t.title.replace(n,o).replace(/^\:/,""))}else i.push(t.title)}),i}},{key:"processInput",value:function(){var t=this;this.setState("processing");var e=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()),e()},500);var i=function(i,n,o){$(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("building-dataset")),setTimeout(function(){t.buildMotherDataset(i,n,o),e()},250)},n=$("#source_button").data("value");switch(n){case"pagepile":return this.processPagePile(i);case"quarry":return this.processQuarry(i);case"hashtag":return this.processHashtag(i);case"external-link":return this.processExternalLink(i)}var o=this.getWikiPageFromURL($(this.config.sourceInput).val()),a=s(o,2),r=a[0],l=a[1];if(!r||!l)return this.setState("initial",function(){t.writeMessage($.i18n("invalid-"+("category"===n?"category":"page")+"-url"))});if(this.validateProject(r))switch(l=decodeURIComponent(l).replace(/\/$/,""),n){case"category":$(".category-subject-toggle--input").is(":checked")?this.fetchSiteInfo(r).then(function(){t.processCategory(r,l,i)}):this.processCategory(r,l,i);break;case"subpages":this.fetchSiteInfo(r).then(function(){return t.processSubpages(r,l,i)});break;case"wikilinks":this.processWikiPage(r,l,i);break;case"transclusions":this.processTemplate(r,l,i)}}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(e){var i='"'+e.label.descore().replace(/"/g,'""')+'"';t+=[i].concat(e.data).join(",")+"\n"}),this.downloadData(t,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}}]),e}(mix(f).with(p,g));$(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 m})},{"../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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||e"+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"")))})};return t.forEach(function(t,e){return l(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{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(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>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(c(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.setChartPointDetectionRadius(),t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{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};"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"),$(".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}}]),e}(t)};e.exports=u},{}],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;io?-e.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-attributes-alt glyphicon-sort-by-attributes").addClass("glyphicon-sort");var o=1===parseInt(this.direction,10)?"glyphicon-sort-by-attributes-alt":"glyphicon-sort-by-attributes";$(".sort-link--"+this.sort+" span").addClass(o).removeClass("glyphicon-sort");try{t(n)}catch(t){this.setState("complete"),this.showFatalErrors([t])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(t){var e=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+t).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(t+"-mode"),"chart"===t){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var i=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var n=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",n)}this.isLogarithmic()&&(i.scales=Object.assign({},i.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):""}}}]})),$(".show-labels-option").is(":checked")?i=this.showPointLabels(i):(delete i.animation.onComplete,delete i.animation.onProgress),"radar"===this.chartType?i.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):i.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var o=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(o,{type:this.chartType,data:this.outputData,options:i}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(t,e){if(!e)return $(".progress-bar").css("width","0%"),$(".progress-counter").text("");var i=t/e*100;$(".progress-bar").css("width",i.toFixed(2)+"%"),t===e?$(".progress-counter").text("Building dataset..."):$(".progress-counter").text($.i18n("processing-page",t,e))}}]),e}(t)};e.exports=s},{}],6:[function(t,e,i){"use strict";Array.prototype.includes||(Array.prototype.includes=function(t){return this.indexOf(t)!==-1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.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}$/,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;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=moment(this.daterangepicker.endDate).add(1,"day"),n=moment(this.daterangepicker.startDate);n.isBefore(i);n.add(1,"day"))t?e.push(n.format(this.dateFormat)):e.push(n.format("YYYY-MM-DD"));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())}},{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:"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"].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();return t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))}),$.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))]=e.to});var n={};return t.forEach(function(t){t=decodeURIComponent(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=decodeURI(location.search.slice(1)),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($.i18n("latest-days",o)),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(e){return t.validateProject(e)})}},{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){var i=$(".daterangepicker .ranges li").index(e.target),n=t.daterangepicker.container,o=n.find(".daterangepicker_input input");t.specialRange={range:Object.keys(t.config.specialRanges)[i],value:o[0].value+" - "+o[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"),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 decodeURIComponent(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];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.clearMessages(),this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),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(){return"true"===this.localizeDateFormat?this.getLocaleDateString():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=f},{"./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 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,minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().subtract(1,"days").startOf("day")],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),moment().subtract(1,"days").startOf("day")],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}}}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":9}],9:[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",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};e.exports=n},{}]},{},[2]); \ No newline at end of file +return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",sources:{category:{placeholder:"https://en.wikipedia.org/wiki/Category:Folk_musicians_from_New_York",descriptionParams:function(){return[""+$.i18n("category").toLowerCase()+""]},type:"text"},wikilinks:{placeholder:"https://en.wikipedia.org/wiki/Book:New_York_City",descriptionParams:function(){return["https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Wikilinks"]},type:"text"},pagepile:{placeholder:"12345",descriptionParams:function(){return["PagePile"]},type:"number"},subpages:{placeholder:"https://en.wikipedia.org/wiki/User:Example",descriptionParams:function(){return[""+$.i18n("subpages").toLowerCase()+""]},type:"text"},transclusions:{placeholder:"https://en.wikipedia.org/wiki/Template:Infobox_Olympic_games",descriptionParams:function(){return["https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Transclusion"]},type:"text"},quarry:{placeholder:"12345",descriptionParams:function(){return["Quarry"]},type:"number"},hashtag:{placeholder:"#editathon",descriptionParams:function(){return[""+$.i18n("hashtag-credits","Wikipedia social search"),""+$.i18n("hashtag").toLowerCase()+""]},type:"string"},"external-link":{placeholder:"*.nycgo.com",descriptionParams:function(){return[""+$.i18n("external-link").toLowerCase()+""]},type:"string"}},platformSelector:"#platform_select",sourceButton:"#source_button",sourceInput:"#source_input",formStates:["initial","processing","complete","invalid"],timestampFormat:"YYYYMMDD00",validateParams:["source","subjectpage","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","original"],source:["pagepile","wikilinks","category","subpages","transclusions","quarry","hashtag","external-link"],view:["list","chart"],subjectpage:["0","1"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e"),$(this.config.sourceInput).prop("type",this.config.sources[i].type).prop("placeholder",this.config.sources[i].placeholder).val(""),$(".source-description").html((e=$).i18n.apply(e,["massviews-"+i+"-description"].concat(n(this.config.sources[i].descriptionParams())))),"category"===i?$(".category-subject-toggle").show():$(".category-subject-toggle").hide(),"quarry"===i||"external-link"===i?($(".massviews-source-input").addClass("project-enabled"),$(".project-input").prop("disabled",!1)):($(".massviews-source-input").removeClass("project-enabled"),$(".project-input").prop("disabled",!0)),$(this.config.sourceInput).focus()}},{key:"getParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={platform:$(this.config.platformSelector).val(),agent:$(this.config.agentSelector).val(),source:$(this.config.sourceButton).data("value"),target:$(this.config.sourceInput).val().score()};return this.specialRange&&!t?e.range=this.specialRange.range:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),"category"===e.source?e.subjectpage=$(".category-subject-toggle--input").is(":checked")?"1":"0":"quarry"!==e.source&&"external-link"!==e.source||(e.project=$(".project-input").val()),t||(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);window.history.replaceState({},document.title,"?"+$.param(this.getParams())),$(".permalink").prop("href","/massviews?"+$.param(this.getPermaLink()))}}},{key:"renderData",value:function(){var t=this;c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){var i=$("#source_button").data("value"),n=void 0;n=["wikilinks","subpages","transclusions"].includes(i)?$.i18n("num-"+i,e.length-("subpages"===i?1:0)):$.i18n("num-pages",e.length),$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n(n,e.length)+"\n "+t.formatNumber(t.outputData.sum)+"\n "+t.formatNumber(Math.round(t.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),e.forEach(function(e,i){$("#output_list").append("\n "+(i+1)+"\n "+t.getPageLink(e.label,e.project)+'\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(t,e){switch(e){case"original":return t.index;case"title":return t.label;case"views":return Number(t.sum)}}},{key:"getPageViewsData",value:function(t,e){var i=this,n=this.daterangepicker.startDate.startOf("day"),o=this.daterangepicker.endDate.startOf("day"),a=$.Deferred(),r=0,l={},c=t.length,u=[],d=[],h=function t(h){var f=void 0;if(e)f=e;else{var p=i.getWikiPageFromURL(h),g=s(p,2);f=g[0],h=g[1]}var m=encodeURIComponent(h),k="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+f+("/"+$(i.config.platformSelector).val()+"/"+$(i.config.agentSelector).val()+"/"+m+"/daily")+("/"+n.format(i.config.timestampFormat)+"/"+o.format(i.config.timestampFormat)),v=$.ajax({url:k,dataType:"json"});v.done(function(t){d.push({title:h,project:f,items:t.items})}).fail(function(e){var n="Error in Cassandra table storage backend"===e.responseJSON.title;return n&&(l[h]?l[h]++:l[h]=1,l[h]<3)?(c++,i.rateLimit(t,100,i)(h)):(n?u.push(h):i.writeMessage(i.getPageLink(h,f)+": "+$.i18n("api-error","Pageviews API")+" - "+e.responseJSON.title),void(404!==e.status&&(hadFailure=!0)))}).always(function(){i.updateProgressBar(++r,c),r===c&&(u.length&&i.writeMessage($.i18n("api-error-timeout","
      "+u.map(function(t){return"
    • "+i.getPageLink(t,f)+"
    • "}).join("")+"
    ")),a.resolve(d))})},f=this.rateLimit(h,this.config.apiThrottle,this);return t.forEach(function(t,e){f(t)}),a}},{key:"buildMotherDataset",value:function(t,e,i){var n=this;this.outputData={labels:this.getDateHeadings(!0),link:e,listData:[]};var o=moment(this.daterangepicker.startDate),a=moment(this.daterangepicker.endDate),r=this.numDaysInRange(),l=new Array(r).fill(0),c=[];i.forEach(function(t,e){var i=t.items.map(function(t){return t.views}),u=i.reduce(function(t,e){return t+e});n.outputData.listData.push({data:i,label:t.title,project:t.project,sum:u,average:u/r,index:e});var d=n.fillInZeros(t.items,o,a),h=s(d,2),f=h[0],p=h[1];p.forEach(function(t){c.includes(t)||c.push(t)}),l=l.map(function(t,e){return t+f[e].views})});var u=l.reduce(function(t,e){return(t||0)+(e||0)});if(Object.assign(this.outputData,{datasets:[{label:t,data:l,sum:u,average:u/r}],datesWithoutData:c,sum:u,average:u/r}),c.length){var d=c.map(function(t){return moment(t).format(n.dateFormat)});this.writeMessage($.i18n("api-incomplete-data",d.sort().join(" · "),d.length))}return this.hadFailure||simpleStorage.set(this.getCacheKey(),this.outputData,{TTL:6e5}),this.outputData}},{key:"getPileURL",value:function(t){return"http://tools.wmflabs.org/pagepile/api.php?action=get_data&id="+t}},{key:"getPileLink",value:function(t){return"Page Pile "+t+""}},{key:"getPagePile",value:function(t){var e=this,i=$.Deferred(),n="https://tools.wmflabs.org/pagepile/api.php?id="+t+"&action=get_data&format=json&metadata=1";return $.ajax({url:n,dataType:"jsonp"}).done(function(n){var o=Object.keys(n.pages);return o.length>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",e.getPileLink(t),e.formatNumber(o.length),e.config.apiLimit)),o=o.slice(0,e.config.apiLimit)),i.resolve({id:n.id,wiki:n.wiki,pages:o})}).fail(function(n){return i.reject(e.getPileLink(t)+": "+$.i18n("api-error-no-data"))}),i}},{key:"getWikiPageFromURL",value:function(t){var e=void 0;return e=t.includes("?")?t.match(/\/\/(.*?)\/w\/.*\?(?:.*\b)?title=(.*?)(?:&|$)/):t.match(/\/\/(.*?)\/wiki\/(.*?)(?:\?|$)/),e?e.slice(1):[null,null]}},{key:"popParams",value:function(){var t=this,e=this.validateParams(this.parseQueryString());this.validateDateRange(e),this.patchUsage(),this.updateSourceInput($(".source-option[data-value="+e.source+"]")[0]),e.target&&$(this.config.sourceInput).val(decodeURIComponent(e.target).descore()),$(".site-notice .alert-danger").length?delete e.target:e.overflow&&"pagepile"===e.source&&e.target&&this.toastInfo($.i18n("massviews-redirect",$.i18n("title"),10,this.getPileLink(e.target))),$(this.config.platformSelector).val(e.platform),$(this.config.agentSelector).val(e.agent),["sort","direction","view","source","subjectpage"].forEach(function(i){t[i]=e[i]}),"quarry"!==e.source&&"external-link"!==e.source||!e.project||$(".project-input").val(e.project),"1"===e.subjectpage&&$(".category-subject-toggle--input").prop("checked",!0),e.target&&this.processInput()}},{key:"setState",value:function(t,e){switch($("main").removeClass(this.config.formStates.join(" ")).addClass(t),t){case"initial":this.updateProgressBar(0),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(),"function"==typeof e&&e.call(this);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");break;case"invalid":}}},{key:"apiErrorReset",value:function(t,e){var i=this;this.setState("initial",function(){var n=void 0;n=e?$.i18n("api-error",t)+": "+e:""+$.i18n("api-error-unknown",t),i.writeMessage(n)})}},{key:"processPagePile",value:function(t){var e=this,i=$(this.config.sourceInput).val();$(".progress-counter").text($.i18n("fetching-data","Page Pile API")),this.getPagePile(i).done(function(n){if(!n.pages.length)return e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",e.getPileLink(i)))});var o=d[n.wiki];"en.wikipedia.org"===o&&(n.pages=n.pages.map(function(t){return t.replace(/^Project:Wikipedia:/,"Wikipedia:")})),e.getPageViewsData(n.pages,o).done(function(i){var a="Page Pile #"+n.id;$(".output-title").text(a).prop("href",e.getPileURL(n.id)),$(".output-params").html("\n "+$(e.config.dateRangeSelector).val()+'\n —\n \n '+o.replace(/.org$/,"").escape()+"\n \n "),t(a,e.getPileLink(n.id),i)})}).fail(function(t){e.setState("initial"),"string"==typeof t?e.writeMessage(t):e.writeMessage($.i18n("api-error-unknown","Page Pile"))})}},{key:"processCategory",value:function(t,e,i){var n=this,o={list:"categorymembers",cmlimit:500,cmtitle:e,prop:"categoryinfo",titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Category API")),this.massApi(o,t,"cmcontinue","categorymembers").done(function(o){if(o.error)return n.apiErrorReset("Category API",o.error.info);var r=o.pages[0];if(r.missing)return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var s=r.categoryinfo.size,l=n.getSiteInfo(t)?n.getSiteInfo(t).namespaces:void 0,c=o.categorymembers;if(!c.length)return n.setState("initial",function(){n.writeMessage($.i18n("massviews-empty-set",a))});s>n.config.apiLimit&&(n.writeMessage($.i18n("massviews-oversized-set",a,n.formatNumber(s),n.config.apiLimit)),c=c.slice(0,n.config.apiLimit));var u=n.mapCategoryPageNames(c,l);n.getPageViewsData(u,t).done(function(t){i(e,a,t)})}).fail(function(t){n.setState("initial"),t&&"string"==typeof t.error?n.writeMessage($.i18n("api-error",a+": "+t.error)):n.writeMessage($.i18n("api-error-unknown",a))})}},{key:"processHashtag",value:function(t){var e=this,i=$(this.config.sourceInput).val().replace(/^#/,""),n='#'+i.escape()+"";$(".progress-counter").text($.i18n("fetching-data","Hashtag API")),$.get("//tools.wmflabs.org/hashtags/csv/"+i+"?limit=5000").done(function(o){for(var a=",",r=new RegExp("(\\"+a+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|'+('([^"\\'+a+"\\r\\n]*))"),"gi"),s=[[]],l=void 0;l=r.exec(o);){var c=l[1];c.length&&c!==a&&s.push([]);var u=void 0;u=l[2]?l[2].replace(new RegExp('""',"g"),'"'):l[3],s[s.length-1].push(u)}return 1!==s[s.length-1].length||s[s.length-1][0]||(s=s.slice(0,-1)),1===s.length?e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",n))}):void e.getPageURLsFromHashtagCSV(s).done(function(o){var a=o.length;a>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",n,e.formatNumber(a),e.config.apiLimit)),o=o.slice(0,e.config.apiLimit)),e.getPageViewsData(o).done(function(e){t(i,n,e)})}).fail(function(){return e.apiErrorReset("Siteinfo API")})}).fail(function(){return e.apiErrorReset("Hashtag API")})}},{key:"getPageURLsFromHashtagCSV",value:function(t){var e=this,i=$.Deferred(),n=t[0].indexOf("spaced_title"),o=t[0].indexOf("rc_namespace"),a=t[0].indexOf("diff_url"),r=[];return t.slice(1).forEach(function(s){var l=s[a].match(/https:\/\/(.*?\.org)\//)[1];e.fetchSiteInfo(l).done(function(){var a=e.getSiteInfo(l).namespaces[s[o]]["*"];r.push("https://"+l+"/wiki/"+(a?a+":":"")+s[n]),r.length===t.length-1&&i.resolve(r.unique())}).fail(function(){i.reject()})}),i}},{key:"processSubpages",value:function(t,e,i){var n,o=this,a=e.descore(),r=0,s=void 0;for(var l in this.getSiteInfo(t).namespaces)if("0"!==l){var c=this.getSiteInfo(t).namespaces[l]["*"]+":";a.startsWith(c)&&(r=this.getSiteInfo(t).namespaces[l].id,s=e.substring(c.length))}var u=r%2===0?r+1:r-1,d=[];$(".progress-counter").text($.i18n("fetching-data","Allpages API")),[r,u].forEach(function(e){var i={list:"allpages",aplimit:500,apnamespace:e,apprefix:s+"/"};d.push(o.massApi(i,t,"apcontinue","allpages"))});var h=this.getPageLink(e,t);(n=$).when.apply(n,d).done(function(n,a){var r=[n,a].filter(function(t){return!!t.error});if(r.length)return o.setState("initial",function(){r.forEach(function(t){o.writeMessage($.i18n("api-error","Allpages API")+": "+t.error.info.escape())})}),!1;var s=n.allpages.concat(a.allpages),l=s.length;if(0===l)return o.setState("initial",function(){o.writeMessage($.i18n("api-error-no-data"))});l>o.config.apiLimit&&(o.writeMessage($.i18n("massviews-oversized-set",h,o.formatNumber(l),o.config.apiLimit)),s=s.slice(0,o.config.apiLimit));var c=[e].concat(s.map(function(t){return t.title}));o.getPageViewsData(c,t).done(function(t){i(e,h,t)})}).fail(function(t){o.setState("initial"),t&&"string"==typeof t.error?o.writeMessage($.i18n("api-error",h+": "+t.error)):o.writeMessage($.i18n("api-error-unknown",h))})}},{key:"processTemplate",value:function(t,e,i){var n=this,o={prop:"transcludedin",tilimit:500,titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Transclusion API")),this.massApi(o,t,"ticontinue",function(t){return t.pages[0].transcludedin}).done(function(o){if(o.error)return n.apiErrorReset("Transclusion API",o.error.info);if(!o.pages[0])return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var r=o.pages.map(function(t){return t.title});o.continue&&n.writeMessage($.i18n("massviews-oversized-set-unknown",a,n.config.apiLimit)),n.getPageViewsData(r,t).done(function(t){i(e,a,t)})}).fail(function(t){n.setState("initial"),t&&"string"==typeof t.error?n.writeMessage($.i18n("api-error",a+": "+t.error)):n.writeMessage($.i18n("api-error-unknown",a))})}},{key:"processWikiPage",value:function(t,e,i){var n=this,o={pllimit:500,prop:"links",titles:e},a=this.getPageLink(e,t);$(".progress-counter").text($.i18n("fetching-data","Links API")),this.massApi(o,t,"plcontinue",function(t){return t.pages[0].links}).done(function(o){if(o.error)return n.apiErrorReset("Links API",o.error.info);if(!o.pages[0])return n.setState("initial",function(){n.writeMessage($.i18n("api-error-no-data"))});var r=o.pages.map(function(t){return t.title});return r.length?(o.continue&&n.writeMessage($.i18n("massviews-oversized-set-unknown",a,n.config.apiLimit)),void n.getPageViewsData(r,t).done(function(t){i(e,a,t)})):n.setState("initial",function(){n.writeMessage($.i18n("massviews-empty-set",a))})}).fail(function(t){var e=t&&"string"==typeof t.error?t.error:null;n.apiErrorReset("Links API",e)})}},{key:"processQuarry",value:function(t){var e=this,i=$(".project-input").val(),n=$(this.config.sourceInput).val();if(this.validateProject(i)){var o="https://quarry.wmflabs.org/query/"+n+"/result/latest/0/json",a="Quarry "+n+"";$(".progress-counter").text($.i18n("fetching-data","Quarry API")),$.getJSON(o).done(function(o){var r=o.headers.indexOf("page_title");if(r===-1)return e.setState("initial"),e.writeMessage($.i18n("invalid-quarry-dataset","page_title"));var s=o.rows.map(function(t){return t[r]});s.length>e.config.apiLimit&&(e.writeMessage($.i18n("massviews-oversized-set",a,e.formatNumber(s.length),e.config.apiLimit)),s=s.slice(0,e.config.apiLimit)),e.getPageViewsData(s,i).done(function(e){t(n,a,e)})}).fail(function(t){ +return e.setState("initial"),e.writeMessage($.i18n("api-error-unknown","Quarry API"),!0)})}}},{key:"processExternalLink",value:function(t){var e=this,i=$(".project-input").val(),n=$(this.config.sourceInput).val();if(this.validateProject(i)){var o={list:"exturlusage",eulimit:500,eunamespace:0,euquery:n},a=""+n+"";$(".progress-counter").text($.i18n("fetching-data","External link API")),this.massApi(o,i,"euoffset","exturlusage").done(function(o){if(o.error)return e.apiErrorReset("External link API",o.error.info);if(!o.exturlusage[0])return e.setState("initial",function(){e.writeMessage($.i18n("api-error-no-data"))});var r=o.exturlusage.map(function(t){return t.title}).unique();return r.length?(o.continue&&e.writeMessage($.i18n("massviews-oversized-set-unknown",a,e.config.apiLimit)),void e.getPageViewsData(r,i).done(function(e){t(n,a,e)})):e.setState("initial",function(){e.writeMessage($.i18n("massviews-empty-set",a))})}).fail(function(t){e.setState("initial"),t&&"string"==typeof t.error?e.writeMessage($.i18n("api-error",a+": "+t.error)):e.writeMessage($.i18n("api-error-unknown",a))})}}},{key:"validateProject",value:function(t){return!!t&&(t=t.replace(/^www\./,""),!!h.includes(t)||(this.setState("initial"),this.writeMessage($.i18n("invalid-project",""+t.escape()+""),!0),!1))}},{key:"mapCategoryPageNames",value:function(t,e){var i=[];return t.forEach(function(t){if(e&&t.ns%2===1){var n=e[t.ns].canonical,o=e[t.ns-1].canonical||"";i.push(t.title.replace(n,o).replace(/^\:/,""))}else i.push(t.title)}),i}},{key:"processInput",value:function(){var t=this;this.setState("processing");var e=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()),e()},500);var i=function(i,n,o){$(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("building-dataset")),setTimeout(function(){t.buildMotherDataset(i,n,o),e()},250)},n=$("#source_button").data("value");switch(n){case"pagepile":return this.processPagePile(i);case"quarry":return this.processQuarry(i);case"hashtag":return this.processHashtag(i);case"external-link":return this.processExternalLink(i)}var o=this.getWikiPageFromURL($(this.config.sourceInput).val()),a=s(o,2),r=a[0],l=a[1];if(!r||!l)return this.setState("initial",function(){t.writeMessage($.i18n("invalid-"+("category"===n?"category":"page")+"-url"))});if(this.validateProject(r))switch(l=decodeURIComponent(l).replace(/\/$/,""),n){case"category":$(".category-subject-toggle--input").is(":checked")?this.fetchSiteInfo(r).then(function(){t.processCategory(r,l,i)}):this.processCategory(r,l,i);break;case"subpages":this.fetchSiteInfo(r).then(function(){return t.processSubpages(r,l,i)});break;case"wikilinks":this.processWikiPage(r,l,i);break;case"transclusions":this.processTemplate(r,l,i)}}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(e){var i='"'+e.label.descore().replace(/"/g,'""')+'"';t+=[i].concat(e.data).join(",")+"\n"}),this.downloadData(t,"csv")}},{key:"baseProject",get:function(){return this.project.split(".")[1]}}]),e}(mix(f).with(p,g));$(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 m})},{"../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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||e"+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"")))})};return t.forEach(function(t,e){return l(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{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(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>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(c(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.setChartPointDetectionRadius(),t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{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};"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"),$(".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}}]),e}(t)};e.exports=u},{}],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;io?-e.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-attributes-alt glyphicon-sort-by-attributes").addClass("glyphicon-sort");var o=1===parseInt(this.direction,10)?"glyphicon-sort-by-attributes-alt":"glyphicon-sort-by-attributes";$(".sort-link--"+this.sort+" span").addClass(o).removeClass("glyphicon-sort");try{t(n)}catch(t){this.setState("complete"),this.showFatalErrors([t])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(t){var e=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+t).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(t+"-mode"),"chart"===t){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var i=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var n=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",n)}this.isLogarithmic()&&(i.scales=Object.assign({},i.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):""}}}]})),$(".show-labels-option").is(":checked")?i=this.showPointLabels(i):(delete i.animation.onComplete,delete i.animation.onProgress),"radar"===this.chartType?i.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):i.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var o=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(o,{type:this.chartType,data:this.outputData,options:i}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(t,e){if(!e)return $(".progress-bar").css("width","0%"),$(".progress-counter").text("");var i=t/e*100;$(".progress-bar").css("width",i.toFixed(2)+"%"),t===e?$(".progress-counter").text("Building dataset..."):$(".progress-counter").text($.i18n("processing-page",t,e))}}]),e}(t)};e.exports=s},{}],6:[function(t,e,i){"use strict";Array.prototype.includes||(Array.prototype.includes=function(t){return this.indexOf(t)!==-1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.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}$/,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;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=moment(this.daterangepicker.endDate).add(1,"day"),n=moment(this.daterangepicker.startDate);n.isBefore(i);n.add(1,"day"))t?e.push(n.format(this.dateFormat)):e.push(n.format("YYYY-MM-DD"));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())}},{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:"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"].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();return t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))}),$.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))]=e.to});var n={};return t.forEach(function(t){t=decodeURIComponent(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=decodeURI(location.search.slice(1)),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($.i18n("latest-days",o)),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(e){return t.validateProject(e)})}},{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){var i=$(".daterangepicker .ranges li").index(e.target),n=t.daterangepicker.container,o=n.find(".daterangepicker_input input");t.specialRange={range:Object.keys(t.config.specialRanges)[i],value:o[0].value+" - "+o[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"),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 decodeURIComponent(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];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.clearMessages(),this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),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(){return"true"===this.localizeDateFormat?this.getLocaleDateString():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=f},{"./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 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,minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().subtract(1,"days").startOf("day")],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),moment().subtract(1,"days").startOf("day")],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}}}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":9}],9:[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",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};e.exports=n},{}]},{},[2]); \ No newline at end of file diff --git a/public_html/redirectviews/application.js b/public_html/redirectviews/application.js index e920a5947..6baac6db9 100644 --- a/public_html/redirectviews/application.js +++ b/public_html/redirectviews/application.js @@ -9,7 +9,7 @@ if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(t r.update()}},cutoutPercentage:50,rotation:Math.PI*-.5,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;t>i;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,o=n.chartArea,a=n.options,r=a.elements.arc,s=o.right-o.left-r.borderWidth,l=o.bottom-o.top-r.borderWidth,c=Math.min(s,l),u={x:0,y:0},d=i.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var p=a.rotation%(2*Math.PI);p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0);var g=p+f,m={x:Math.cos(p),y:Math.sin(p)},k={x:Math.cos(g),y:Math.sin(g)},v=0>=p&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,w=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,y=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,b=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,x=h/100,D={x:y?-1:Math.min(m.x*(m.x<0?1:x),k.x*(k.x<0?1:x)),y:b?-1:Math.min(m.y*(m.y<0?1:x),k.y*(k.y<0?1:x))},C={x:v?1:Math.max(m.x*(m.x>0?1:x),k.x*(k.x>0?1:x)),y:w?1:Math.max(m.y*(m.y>0?1:x),k.y*(k.y>0?1:x))},S={width:.5*(C.x-D.x),height:.5*(C.y-D.y)};c=Math.min(s/S.width,l/S.height),u={x:(C.x+D.x)*-.5,y:(C.y+D.y)*-.5}}n.borderWidth=i.getMaxBorderWidth(d.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=u.x*n.outerRadius,n.offsetY=u.y*n.outerRadius,d.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=i.outerRadius-n.radiusLength,e.each(d.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var o=this,a=o.chart,r=a.chartArea,s=a.options,l=s.animation,c=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,f=o.getDataset(),p=n&&l.animateRotate?0:t.hidden?0:o.calculateCircumference(f.data[i])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:o.innerRadius,m=n&&l.animateScale?0:o.outerRadius,k=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:o.index,_index:i,_model:{x:c+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:p,outerRadius:m,innerRadius:g,label:k(f.label,i,a.data.labels[i])}});var v=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(0===i?v.startAngle=s.rotation:v.startAngle=o.getMeta().data[i-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),o=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(o+=Math.abs(t))}),o},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,o=this.index,a=t.length,r=0;a>r;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=t[r]._chart?t[r]._chart.config.data.datasets[o].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,addElementAndReset:function(i){var n=this,o=n.chart.options,a=n.getMeta();t.DatasetController.prototype.addElementAndReset.call(n,i),e(n.getDataset(),o)&&0!==a.dataset._model.tension&&n.updateBezierControlPoints()},update:function(t){var n,o,a,r=this,s=r.getMeta(),l=s.dataset,c=s.data||[],u=r.chart.options,d=u.elements.line,h=r.getScaleForId(s.yAxisID),f=r.getDataset(),p=e(f,u);for(p&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=h,l._datasetIndex=r.index,l._children=c,l._model={spanGaps:f.spanGaps?f.spanGaps:u.spanGaps,tension:a.tension?a.tension:i.getValueOrDefault(f.lineTension,d.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||d.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||d.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||d.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||d.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||d.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||d.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||d.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:d.fill,steppedLine:a.steppedLine?a.steppedLine:i.getValueOrDefault(f.steppedLine,d.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:i.getValueOrDefault(f.cubicInterpolationMode,d.cubicInterpolationMode),scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePixel()},l.pivot()),n=0,o=c.length;o>n;++n)r.updateElement(c[n],n,t);for(p&&0!==l._model.tension&&r.updateBezierControlPoints(),n=0,o=c.length;o>n;++n)c[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,o=this.getDataset(),a=t.custom||{};return a.backgroundColor?n=a.backgroundColor:o.pointBackgroundColor?n=i.getValueAtIndexOrDefault(o.pointBackgroundColor,e,n):o.backgroundColor&&(n=o.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,o=this.getDataset(),a=t.custom||{};return a.borderColor?n=a.borderColor:o.pointBorderColor?n=i.getValueAtIndexOrDefault(o.pointBorderColor,e,n):o.borderColor&&(n=o.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,o=this.getDataset(),a=t.custom||{};return a.borderWidth?n=a.borderWidth:o.pointBorderWidth?n=i.getValueAtIndexOrDefault(o.pointBorderWidth,e,n):o.borderWidth&&(n=o.borderWidth),n},updateElement:function(t,e,n){var o,a,r=this,s=r.getMeta(),l=t.custom||{},c=r.getDataset(),u=r.index,d=c.data[e],h=r.getScaleForId(s.yAxisID),f=r.getScaleForId(s.xAxisID),p=r.chart.options.elements.point,g=r.chart.data.labels||[],m=1===g.length||1===c.data.length||r.chart.isCombo;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),o=f.getPixelForValue("object"==typeof d?d:NaN,e,u,m),a=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=f,t._yScale=h,t._datasetIndex=u,t._index=e,t._model={x:o,y:a,skip:l.skip||isNaN(o)||isNaN(a),radius:l.radius||i.getValueAtIndexOrDefault(c.pointRadius,e,p.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(c.pointStyle,e,p.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(c.pointHitRadius,e,p.hitRadius)}},calculatePointY:function(t,e,i){var n,o,a,r=this,s=r.chart,l=r.getMeta(),c=r.getScaleForId(l.yAxisID),u=0,d=0;if(c.options.stacked){for(n=0;i>n;n++)if(o=s.data.datasets[n],a=s.getDatasetMeta(n),"line"===a.type&&a.yAxisID===c.id&&s.isDatasetVisible(n)){var h=Number(c.getRightValue(o.data[e]));0>h?d+=h||0:u+=h||0}var f=Number(c.getRightValue(t));return 0>f?c.getPixelForValue(d+f):c.getPixelForValue(u+f)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,o,a,r,s=this,l=s.getMeta(),c=s.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(u);else for(e=0,n=u.length;n>e;++e)o=u[e],a=o._model,r=i.splineCurve(i.previousItem(u,e)._model,a,i.nextItem(u,e)._model,l.dataset._model.tension),a.controlPointPreviousX=r.previous.x,a.controlPointPreviousY=r.previous.y,a.controlPointNextX=r.next.x,a.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;n>e;++e)a=u[e]._model,a.controlPointPreviousX=t(a.controlPointPreviousX,c.left,c.right),a.controlPointPreviousY=t(a.controlPointPreviousY,c.top,c.bottom),a.controlPointNextX=t(a.controlPointNextX,c.left,c.right),a.controlPointNextY=t(a.controlPointNextY,c.top,c.bottom)},draw:function(t){var i,n,o=this,a=o.getMeta(),r=a.data||[],s=t||1;for(i=0,n=r.length;n>i;++i)r[i].transition(s);for(e(o.getDataset(),o.chart.options)&&a.dataset.transition(s).draw(),i=0,n=r.length;n>i;++i)r[i].draw()},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=t._model;a.radius=o.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=o.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(a.backgroundColor)),a.borderColor=o.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(a.borderColor)),a.borderWidth=o.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=a.radius||i.getValueAtIndexOrDefault(n.pointRadius,o,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,o),r.borderColor=e.getPointBorderColor(t,o),r.borderWidth=e.getPointBorderWidth(t,o)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('
      ');var i=t.data,n=i.datasets,o=i.labels;if(n.length)for(var a=0;a'),o[a]&&e.push(o[a]),e.push("");return e.push("
    "),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,o){var a=t.getDatasetMeta(0),r=i.datasets[0],s=a.data[o],l=s.custom||{},c=e.getValueAtIndexOrDefault,u=t.options.elements.arc,d=l.backgroundColor?l.backgroundColor:c(r.backgroundColor,o,u.backgroundColor),h=l.borderColor?l.borderColor:c(r.borderColor,o,u.borderColor),f=l.borderWidth?l.borderWidth:c(r.borderWidth,o,u.borderWidth);return{text:n,fillStyle:d,strokeStyle:h,lineWidth:f,hidden:isNaN(r.data[o])||a.data[o].hidden,index:o}}):[]}},onClick:function(t,e){var i,n,o,a=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;n>i;++i)o=r.getDatasetMeta(i),o.data[a].hidden=!o.data[a].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,o=n.chartArea,a=i.getMeta(),r=n.options,s=r.elements.arc,l=Math.min(o.right-o.left,o.bottom-o.top);n.outerRadius=Math.max((l-s.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,a.count=i.countVisibleElements(),e.each(a.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var o=this,a=o.chart,r=o.getDataset(),s=a.options,l=s.animation,c=a.scale,u=e.getValueAtIndexOrDefault,d=a.data.labels,h=o.calculateCircumference(r.data[i]),f=c.xCenter,p=c.yCenter,g=0,m=o.getMeta(),k=0;i>k;++k)isNaN(r.data[k])||m.data[k].hidden||++g;var v=s.startAngle,w=t.hidden?0:c.getDistanceFromCenterForValue(r.data[i]),y=v+h*g,b=y+(t.hidden?0:h),x=l.animateScale?0:c.getDistanceFromCenterForValue(r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:c,_model:{x:f,y:p,innerRadius:0,outerRadius:n?x:w,startAngle:n&&l.animateRotate?v:y,endAngle:n&&l.animateRotate?v:b,label:u(d,i,d[i])}}),o.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,addElementAndReset:function(e){t.DatasetController.prototype.addElementAndReset.call(this,e),this.updateBezierControlPoints()},update:function(t){var i=this,n=i.getMeta(),o=n.dataset,a=n.data,r=o.custom||{},s=i.getDataset(),l=i.chart.options.elements.line,c=i.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:c.top,scaleBottom:c.bottom,scaleZero:c.getBasePosition()}}),n.dataset.pivot(),e.each(a,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var o=this,a=t.custom||{},r=o.getDataset(),s=o.chart.scale,l=o.chart.options.elements.point,c=s.getPointPositionForValue(i,r.data[i]);e.extend(t,{_datasetIndex:o.index,_index:i,_scale:s,_model:{x:n?s.xCenter:c.x,y:n?s.yCenter:c.y,tension:a.tension?a.tension:e.getValueOrDefault(r.tension,o.chart.options.elements.line.tension),radius:a.radius?a.radius:e.getValueAtIndexOrDefault(r.pointRadius,i,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,i,l.backgroundColor),borderColor:a.borderColor?a.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,i,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,i,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,i,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:e.getValueAtIndexOrDefault(r.hitRadius,i,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,o){var a=n._model,r=e.splineCurve(e.previousItem(i.data,o,!0)._model,a,e.nextItem(i.data,o,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,o,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,o,e.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,o,e.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,o,a.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},o=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,o,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,o,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,o,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,o,r.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var o=this;n||(t.animating=!0);for(var a=0;a1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;nt.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var o=Date.now(),a=(o-e)/t.frameDuration;t.dropFrames+=a,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(t,e,i,n,o){var a,r,s,l,c,u;if("object"==typeof e&&(a=e.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return void t.drawImage(e,n-e.width/2,o-e.height/2);if(!(isNaN(i)||0>=i)){switch(e){default:t.beginPath(),t.arc(n,o,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),r=3*i/Math.sqrt(3),c=r*Math.sqrt(3)/2,t.moveTo(n-r/2,o+c/3),t.lineTo(n+r/2,o+c/3),t.lineTo(n,o-2*c/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,o-u,2*u,2*u),t.strokeRect(n-u,o-u,2*u,2*u);break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,o),t.lineTo(n,o+u),t.lineTo(n+u,o),t.lineTo(n,o-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,o+i),t.lineTo(n,o-i),t.moveTo(n-i,o),t.lineTo(n+i,o),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,o-l),t.lineTo(n+s,o+l),t.moveTo(n-s,o+l),t.lineTo(n+s,o-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,o),t.lineTo(n+i,o),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,o),t.lineTo(n+i,o),t.closePath()}t.stroke()}}}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.types={},t.instances={},t.controllers={},t.Controller=function(i){return this.chart=i,this.config=i.config,this.options=this.config.options=e.configMerge(t.defaults.global,t.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),t.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},e.extend(t.Controller.prototype,{initialize:function(){var e=this;return t.plugins.notify("beforeInit",[e]),e.bindEvents(),e.ensureScalesHaveIDs(),e.buildOrUpdateControllers(),e.buildScales(),e.updateLayout(),e.resetElements(),e.initToolTip(),e.update(),t.plugins.notify("afterInit",[e]),e},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(i){var n=this,o=n.chart,a=o.canvas,r=e.getMaximumWidth(a),s=o.aspectRatio,l=n.options.maintainAspectRatio&&isNaN(s)===!1&&isFinite(s)&&0!==s?r/s:e.getMaximumHeight(a),c=o.width!==r||o.height!==l;if(!c)return n;a.width=o.width=r,a.height=o.height=l,e.retinaScale(o);var u={width:r,height:l};return t.plugins.notify("resize",[n,u]),n.options.onResize&&n.options.onResize(n,u),i||(n.stop(),n.update(n.options.responsiveAnimationDuration)),n},ensureScalesHaveIDs:function(){var t=this.options,i=t.scales||{},n=t.scale;e.each(i.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),e.each(i.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,n=i.options,o=i.scales={},a=[];n.scales&&(a=a.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),n.scale&&a.push({options:n.scale,dtype:"radialLinear",isDefault:!0}),e.each(a,function(n){var a=n.options,r=e.getValueOrDefault(a.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){var l=new s({id:a.id,options:a,ctx:i.chart.ctx,chart:i});o[l.id]=l,n.isDefault&&(i.scale=l)}}),t.scaleService.addScalesToLayout(this)},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=this,n=[],o=[];if(e.each(i.data.datasets,function(e,a){var r=i.getDatasetMeta(a);r.type||(r.type=e.type||i.config.type),n.push(r.type),r.controller?r.controller.updateIndex(a):(r.controller=new t.controllers[r.type](i,a),o.push(r.controller))},i),n.length>1)for(var a=1;ae;++e)n.getDatasetMeta(e).controller.update();t.plugins.notify("afterDatasetsUpdate",[n])}},render:function(i,n){var o=this;t.plugins.notify("beforeRender",[o]);var a=o.options.animation;if(a&&("undefined"!=typeof i&&0!==i||"undefined"==typeof i&&0!==a.duration)){var r=new t.Animation;r.numSteps=(i||a.duration)/16.66,r.easing=a.easing,r.render=function(t,i){var n=e.easingEffects[i.easing],o=i.currentStep/i.numSteps,a=n(o);t.draw(a,o,i.currentStep)},r.onAnimationProgress=a.onProgress,r.onAnimationComplete=a.onComplete,t.animationService.addAnimation(o,r,i,n)}else o.draw(),a&&a.onComplete&&a.onComplete.call&&a.onComplete.call(o);return o},draw:function(i){var n=this,o=i||1;n.clear(),t.plugins.notify("beforeDraw",[n,o]),e.each(n.boxes,function(t){t.draw(n.chartArea)},n),n.scale&&n.scale.draw(),t.plugins.notify("beforeDatasetsDraw",[n,o]),e.each(n.data.datasets,function(t,e){n.isDatasetVisible(e)&&n.getDatasetMeta(e).controller.draw(i)},n,!0),t.plugins.notify("afterDatasetsDraw",[n,o]),n.tooltip.transition(o).draw(),t.plugins.notify("afterDraw",[n,o])},getElementAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[];return e.each(i.data.datasets,function(t,a){if(i.isDatasetVisible(a)){var r=i.getDatasetMeta(a);e.each(r.data,function(t){return t.inRange(n.x,n.y)?(o.push(t),o):void 0})}}),o.slice(0,1)},getElementsAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),o=[],a=function(){if(i.data.datasets)for(var t=0;t0&&(e=this.getDatasetMeta(e[0]._datasetIndex).data),e},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;i>e;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var i=this;i.stop(),i.clear(),e.unbindEvents(i,i.events),e.removeResizeListener(i.chart.canvas.parentNode);var n=i.chart.canvas;n.width=i.chart.width,n.height=i.chart.height,void 0!==i.chart.originalDevicePixelRatio&&i.chart.ctx.scale(1/i.chart.originalDevicePixelRatio,1/i.chart.originalDevicePixelRatio),n.style.width=i.chart.originalCanvasStyleWidth,n.style.height=i.chart.originalCanvasStyleHeight,t.plugins.notify("destroy",[i]),delete t.instances[i.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this;e.bindEvents(t,t.options.events,function(e){t.eventHandler(e)})},updateHoverStyle:function(t,e,i){var n,o,a,r=i?"setHoverStyle":"removeHoverStyle";switch(e){case"single":t=[t[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(o=0,a=t.length;a>o;++o)n=t[o],n&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var i=this,n=i.tooltip,o=i.options||{},a=o.hover,r=o.tooltips;return i.lastActive=i.lastActive||[],i.lastTooltipActive=i.lastTooltipActive||[],"mouseout"===t.type?(i.active=[],i.tooltipActive=[]):(i.active=i.getElementsAtEventForMode(t,a.mode),i.tooltipActive=i.getElementsAtEventForMode(t,r.mode)),a.onHover&&a.onHover.call(i,i.active),i.legend&&i.legend.handleEvent&&i.legend.handleEvent(t),("mouseup"===t.type||"click"===t.type)&&o.onClick&&o.onClick.call(i,t,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),(r.enabled||r.custom)&&(n.initialize(),n._active=i.tooltipActive,n.update(!0)),n.pivot(),i.animating||e.arrayEquals(i.active,i.lastActive)&&e.arrayEquals(i.tooltipActive,i.lastTooltipActive)||(i.stop(),(r.enabled||r.custom)&&n.update(!0),i.render(a.animationDuration,!0)),i.lastActive=i.active,i.lastTooltipActive=i.tooltipActive,i}})}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.DatasetController=function(t,e){this.initialize(t,e)},e.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),o=i.getDataset().data||[],a=n.data;for(t=0,e=o.length;e>t;++t)a[t]=a[t]||i.createMetaData(n,t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this,i=e.createMetaData(t);e.getMeta().data.splice(t,0,i),e.updateElement(i,t,!0)},buildOrUpdateElements:function(){var t=this.getMeta(),e=t.data,i=this.getDataset().data.length,n=e.length;if(n>i)e.splice(i,n-i);else if(i>n)for(var o=n;i>o;++o)this.addElementAndReset(o)},update:i,draw:function(t){var i=t||1;e.each(this.getMeta().data,function(t){t.transition(i).draw()})},removeHoverStyle:function(t,i){var n=this.chart.data.datasets[t._datasetIndex],o=t._index,a=t.custom||{},r=e.getValueAtIndexOrDefault,s=t._model;s.backgroundColor=a.backgroundColor?a.backgroundColor:r(n.backgroundColor,o,i.backgroundColor),s.borderColor=a.borderColor?a.borderColor:r(n.borderColor,o,i.borderColor),s.borderWidth=a.borderWidth?a.borderWidth:r(n.borderWidth,o,i.borderWidth)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=e.getValueAtIndexOrDefault,r=e.getHoverColor,s=t._model;s.backgroundColor=o.hoverBackgroundColor?o.hoverBackgroundColor:a(i.hoverBackgroundColor,n,r(s.backgroundColor)),s.borderColor=o.hoverBorderColor?o.hoverBorderColor:a(i.hoverBorderColor,n,r(s.borderColor)), s.borderWidth=o.hoverBorderWidth?o.hoverBorderWidth:a(i.hoverBorderWidth,n,s.borderWidth)}}),t.DatasetController.extend=e.inherits}},{}],25:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,o){if("_"===o[0]);else if(i._view.hasOwnProperty(o))if(n===i._view[o]);else if("string"==typeof n)try{var a=e.color(i._model[o]).mix(e.color(i._start[o]),t);i._view[o]=a.rgbString()}catch(t){i._view[o]=n}else if("number"==typeof n){var r=void 0!==i._start[o]&&isNaN(i._start[o])===!1?i._start[o]:0;i._view[o]=(i._model[o]-r)*t+r}else i._view[o]=n;else"number"!=typeof n||isNaN(i._view[o])?i._view[o]=n:i._view[o]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,i){"use strict";var n=t(3);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function o(t,n,o){var a=document.defaultView,r=t.parentNode,s=a.getComputedStyle(t)[n],l=a.getComputedStyle(r)[n],c=i(s),u=i(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,t,o):d,u?e(l,r,o):d):"none"}var a=t.helpers={};a.each=function(t,e,i,n){var o,r;if(a.isArray(t))if(r=t.length,n)for(o=r-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;r>o;o++)e.call(i,t[o],o);else if("object"==typeof t){var s=Object.keys(t);for(r=s.length,o=0;r>o;o++)e.call(i,t[s[o]],s[o])}},a.clone=function(t){var e={};return a.each(t,function(t,i){a.isArray(t)?e[i]=t.slice(0):"object"==typeof t&&null!==t?e[i]=a.clone(t):e[i]=t}),e},a.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;n>i;i++)a.each(arguments[i],e);return t},a.configMerge=function(e){var i=a.clone(e);return a.each(Array.prototype.slice.call(arguments,1),function(e){a.each(e,function(e,n){if("scales"===n)i[n]=a.scaleMerge(i.hasOwnProperty(n)?i[n]:{},e);else if("scale"===n)i[n]=a.configMerge(i.hasOwnProperty(n)?i[n]:{},t.scaleService.getScaleDefaults(e.type),e);else if(i.hasOwnProperty(n)&&a.isArray(i[n])&&a.isArray(e)){var o=i[n];a.each(e,function(t,e){e=n[i].length||!n[i][o].type?n[i].push(a.configMerge(s,e)):e.type&&e.type!==n[i][o].type?n[i][o]=a.configMerge(n[i][o],s,e):n[i][o]=a.configMerge(n[i][o],e)}):(n[i]=[],a.each(e,function(e){var o=a.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(a.configMerge(t.scaleService.getScaleDefaults(o),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=a.configMerge(n[i],e):n[i]=e}),n},a.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:a.isArray(t)?ei;++i)if(t[i]===e)return i;return-1},a.where=function(t,e){if(a.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return a.each(t,function(t){e(t)&&i.push(t)}),i},a.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,o=t.length;o>n;++n)if(e.call(i,t[n],n,t))return n;return-1},a.findNextWhere=function(t,e,i){(void 0===i||null===i)&&(i=-1);for(var n=i+1;n=0;n--){var o=t[n];if(e(o))return o}},a.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=a.inherits,t&&a.extend(i.prototype,t),i.__super__=e.prototype,i},a.noop=function(){},a.uid=function(){var t=0;return function(){return t++}}(),a.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},a.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1},a.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},a.toRadians=function(t){return t*(Math.PI/180)},a.toDegrees=function(t){return t*(180/Math.PI)},a.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n),a=Math.atan2(n,i);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},a.aliasPixel=function(t){return t%2===0?0:.5},a.splineCurve=function(t,e,i,n){var o=t.skip?e:t,a=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;var d=n*c,h=n*u;return{previous:{x:a.x-d*(r.x-o.x),y:a.y-d*(r.y-o.y)},next:{x:a.x+h*(r.x-o.x),y:a.y+h*(r.y-o.y)}}},a.EPSILON=Number.EPSILON||1e-14,a.splineCurveMonotone=function(t){var e,i,n,o,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,o&&!o.model.skip&&(n.deltaK=(o.model.y-n.model.y)/(o.model.x-n.model.x)),!i||i.model.skip?n.mK=n.deltaK:!o||o.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2);var l,c,u,d;for(e=0;s-1>e;++e)n=r[e],o=r[e+1],n.model.skip||o.model.skip||(a.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=o.mK=0:(l=n.mK/n.deltaK,c=o.mK/n.deltaK,d=Math.pow(l,2)+Math.pow(c,2),9>=d||(u=3/Math.sqrt(d),n.mK=l*u*n.deltaK,o.mK=c*u*n.deltaK)));var h;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,o=s-1>e?r[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),o&&!o.model.skip&&(h=(o.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},a.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},a.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},a.niceNum=function(t,e){var i,n=Math.floor(a.log10(t)),o=t/Math.pow(10,n);return i=e?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,i*Math.pow(10,n)};var r=a.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===(t/=1)?1:(i||(i=.3),nt?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)):n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};a.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),a.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),a.getRelativePosition=function(t,e){var i,n,o=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=o.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=o.clientX,n=o.clientY);var c=parseFloat(a.getStyle(r,"padding-left")),u=parseFloat(a.getStyle(r,"padding-top")),d=parseFloat(a.getStyle(r,"padding-right")),h=parseFloat(a.getStyle(r,"padding-bottom")),f=s.right-s.left-c-d,p=s.bottom-s.top-u-h;return i=Math.round((i-s.left-c)/f*r.width/e.currentDevicePixelRatio),n=Math.round((n-s.top-u)/p*r.height/e.currentDevicePixelRatio),{x:i,y:n}},a.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},a.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=a.noop},a.bindEvents=function(t,e,i){var n=t.events=t.events||{};a.each(e,function(e){n[e]=function(){i.apply(t,arguments)},a.addEvent(t.chart.canvas,e,n[e])})},a.unbindEvents=function(t,e){var i=t.chart.canvas;a.each(e,function(t,e){a.removeEvent(i,e,t)})},a.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},a.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},a.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-left"),10),n=parseInt(a.getStyle(e,"padding-right"),10),o=e.clientWidth-i-n,r=a.getConstraintWidth(t);return isNaN(r)?o:Math.min(o,r)},a.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(a.getStyle(e,"padding-top"),10),n=parseInt(a.getStyle(e,"padding-bottom"),10),o=e.clientHeight-i-n,r=a.getConstraintHeight(t);return isNaN(r)?o:Math.min(o,r)},a.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},a.retinaScale=function(t){var e=t.ctx,i=t.canvas,n=i.width,o=i.height,a=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==a&&(i.height=o*a,i.width=n*a,e.scale(a,a),t.originalDevicePixelRatio=t.originalDevicePixelRatio||a),i.style.width=n+"px",i.style.height=o+"px"},a.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},a.fontString=function(t,e,i){return e+" "+t+"px "+i},a.longestText=function(t,e,i,n){n=n||{};var o=n.data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;a.each(i,function(e){void 0!==e&&null!==e&&a.isArray(e)!==!0?s=a.measureText(t,o,r,s,e):a.isArray(e)&&a.each(e,function(e){void 0===e||null===e||a.isArray(e)||(s=a.measureText(t,o,r,s,e))})});var l=r.length/2;if(l>i.length){for(var c=0;l>c;c++)delete o[r[c]];r.splice(0,l)}return s},a.measureText=function(t,e,i,n,o){var a=e[o];return a||(a=e[o]=t.measureText(o).width,i.push(o)),a>n&&(n=a),n},a.numberOfLabelLines=function(t){var e=1;return a.each(t,function(t){a.isArray(t)&&t.length>e&&(e=t.length)}),e},a.drawRoundedRectangle=function(t,e,i,n,o,a){t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+a),t.lineTo(e+n,i+o-a),t.quadraticCurveTo(e+n,i+o,e+n-a,i+o),t.lineTo(e+a,i+o),t.quadraticCurveTo(e,i+o,e,i+o-a),t.lineTo(e,i+a),t.quadraticCurveTo(e,i,e+a,i),t.closePath()},a.color=function(e){return n?n(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},a.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n),i.tabIndex=-1;var o=i.style;o.width="100%",o.display="block",o.border=0,o.height=0,o.margin=0,o.position="absolute",o.left=0,o.right=0,o.top=0,o.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){return e?e():void 0}},a.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},a.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a.arrayEquals=function(t,e){var i,n,o,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;n>i;++i)if(o=t[i],r=e[i],o instanceof Array&&r instanceof Array){if(!a.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},a.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},a.getHoverColor=function(t){return t instanceof CanvasPattern?t:a.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){var n=this,o=t.helpers;return n.config=i||{data:{datasets:[]}},e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),n.ctx=e,n.canvas=e.canvas,e.canvas.style.display=e.canvas.style.display||"block",n.width=e.canvas.width||parseInt(o.getStyle(e.canvas,"width"),10)||o.getMaximumWidth(e.canvas),n.height=e.canvas.height||parseInt(o.getStyle(e.canvas,"height"),10)||o.getMaximumHeight(e.canvas),n.aspectRatio=n.width/n.height,(isNaN(n.aspectRatio)||isFinite(n.aspectRatio)===!1)&&(n.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),n.originalCanvasStyleWidth=e.canvas.style.width,n.originalCanvasStyleHeight=e.canvas.style.height,o.retinaScale(n),n.controller=new t.Controller(n),o.addResizeListener(e.canvas.parentNode,function(){n.controller&&n.controller.config.options.responsive&&n.controller.resize()}),n.controller?n.controller:n};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('
      ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
    "),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 o(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?g:b,y),x-=e.height):(e=t.update(w,v),b-=e.width),D.push({horizontal:i,minSize:e,box:t})}function a(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:C,right:S,top:0,bottom:0};t.update(t.options.fullWidth?g:b,m/2,n)}else t.update(i.minSize.width,x)}function r(t){var i=e.findNextWhere(D,function(e){return e.box===t}),n={left:0,right:0,top:M,bottom:Y};i&&t.update(i.minSize.width,x,n)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:C,t.right=t.options.fullWidth?i-l:C+b,t.top=A,t.bottom=A+t.height,A=t.bottom):(t.left=P,t.right=P+t.width,t.top=M,t.bottom=M+x,P=t.right)}if(t){var l=0,c=0,u=e.where(t.boxes,function(t){return"left"===t.options.position}),d=e.where(t.boxes,function(t){return"right"===t.options.position}),h=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),p=e.where(t.boxes,function(t){return"chartArea"===t.options.position});h.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var g=i-2*l,m=n-2*c,k=g/2,v=m/2,w=(i-k)/(u.length+d.length),y=(n-v)/(h.length+f.length),b=g,x=m,D=[];e.each(u.concat(d,h,f),o);var C=l,S=l,M=c,Y=c;e.each(u.concat(d),a),e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h.concat(f),a),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height}),e.each(u.concat(d),r),C=l,S=l,M=c,Y=c,e.each(u,function(t){C+=t.width}),e.each(d,function(t){S+=t.width}),e.each(h,function(t){M+=t.height}),e.each(f,function(t){Y+=t.height});var _=n-M-Y,T=i-C-S;(T!==b||_!==x)&&(e.each(u,function(t){t.height=_}),e.each(d,function(t){t.height=_}),e.each(h,function(t){t.options.fullWidth||(t.width=T)}),e.each(f,function(t){t.options.fullWidth||(t.width=T)}),x=_,b=T);var P=l,A=c;e.each(u.concat(h),s),P+=b,A+=x,e.each(d,s),e.each(f,s),t.chartArea={left:C,top:M,right:C+b,bottom:M+x},e.each(p,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(b,x)})}}}}},{}],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,o=n.getDatasetMeta(i);o.hidden=null===o.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,o=n.labels,a=n.display,r=i.ctx,s=t.defaults.global,l=e.getValueOrDefault,c=l(o.fontSize,s.defaultFontSize),u=l(o.fontStyle,s.defaultFontStyle),d=l(o.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=a?10:0):(p.width=a?10:0,p.height=i.maxHeight),a)if(r.font=h,g){var m=i.lineWidths=[0],k=i.legendItems.length?c+o.padding:0;r.textAlign="left",r.textBaseline="top",e.each(i.legendItems,function(t,e){var n=o.usePointStyle?c*Math.sqrt(2):o.boxWidth,a=n+c/2+r.measureText(t.text).width;m[m.length-1]+a+o.padding>=i.width&&(k+=c+o.padding,m[m.length]=i.left),f[e]={left:0,top:0,width:a,height:c},m[m.length-1]+=a+o.padding}),p.height+=k}else{var v=o.padding,w=i.columnWidths=[],y=o.padding,b=0,x=0,D=c+v;e.each(i.legendItems,function(t,e){var i=o.usePointStyle?2*o.boxWidth:o.boxWidth,n=i+c/2+r.measureText(t.text).width;x+D>p.height&&(y+=b+o.padding,w.push(b),b=0,x=0),b=Math.max(b,n),x+=D,f[e]={left:0,top:0,width:n,height:c}}),y+=b,w.push(b),p.width+=y}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,o=n.labels,a=t.defaults.global,r=a.elements.line,s=i.width,l=i.lineWidths;if(n.display){var c,u=i.ctx,d=e.getValueOrDefault,h=d(o.fontColor,a.defaultFontColor),f=d(o.fontSize,a.defaultFontSize),p=d(o.fontStyle,a.defaultFontStyle),g=d(o.fontFamily,a.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=o.boxWidth,v=i.legendHitBoxes,w=function(e,i,o){if(!(isNaN(k)||0>=k)){u.save(),u.fillStyle=d(o.fillStyle,a.defaultColor),u.lineCap=d(o.lineCap,r.borderCapStyle),u.lineDashOffset=d(o.lineDashOffset,r.borderDashOffset),u.lineJoin=d(o.lineJoin,r.borderJoinStyle),u.lineWidth=d(o.lineWidth,r.borderWidth),u.strokeStyle=d(o.strokeStyle,a.defaultColor);var s=0===d(o.lineWidth,r.borderWidth);if(u.setLineDash&&u.setLineDash(d(o.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,o.pointStyle,l,h,p)}else s||u.strokeRect(e,i,k,f),u.fillRect(e,i,k,f);u.restore()}},y=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+o.padding,line:0}:{x:i.left+o.padding,y:i.top+o.padding,line:0};var x=f+o.padding;e.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,a=o.usePointStyle?f+f/2+n:k+f/2+n,r=c.x,d=c.y;b?r+a>=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]+o.padding,d=c.y=i.top,c.line++),w(r,d,t),v[e].left=r,v[e].top=d,y(r,d,t,n),b?c.x+=a+o.padding:c.y+=x})}},handleEvent:function(t){var i=this,n=i.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!n.onHover)return}else{if("click"!==o)return;if(!n.onClick)return}var a=e.getRelativePosition(t,i.chart.chart),r=a.x,s=a.y;if(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)for(var l=i.legendHitBoxes,c=0;c=u.left&&r<=u.left+u.width&&s>=u.top&&s<=u.top+u.height){if("click"===o){n.onClick.call(i,t,i.legendItems[c]);break}if("mousemove"===o){n.onHover.call(i,t,i.legendItems[c]);break}}}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.legend;n&&(e.legend=new t.Legend({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.legend))}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)})},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e){var i,n,o=this._plugins,a=o.length;for(i=0;a>i;++i)if(n=o[i],"function"==typeof n[t]&&n[t].apply(n,e||[])===!1)return!1;return!0}},t.PluginBase=t.Element.extend({beforeInit:e,afterInit:e,beforeUpdate:e,afterUpdate:e,beforeDraw:e,afterDraw:e,destroy:e}),t.pluginService=t.plugins}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(t){return e.isArray(t)?t:""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=i,o.margins=e.extend({left:0,right:0,top:0,bottom:0},n),o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeDataLimits(),o.determineDataLimits(),o.afterDataLimits(),o.beforeBuildTicks(),o.buildTicks(),o.afterBuildTicks(),o.beforeTickToLabelConversion(),o.convertTicksToLabels(),o.afterTickToLabelConversion(),o.beforeCalculateTickRotation(),o.calculateTickRotation(),o.afterCalculateTickRotation(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;t.ticks=t.ticks.map(function(e,i,n){return t.options.ticks.userCallback?t.options.ticks.userCallback(e,i,n):t.options.ticks.callback(e,i,n)},t)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=this,n=i.ctx,o=t.defaults.global,a=i.options.ticks,r=e.getValueOrDefault(a.fontSize,o.defaultFontSize),s=e.getValueOrDefault(a.fontStyle,o.defaultFontStyle),l=e.getValueOrDefault(a.fontFamily,o.defaultFontFamily),c=e.fontString(r,s,l);n.font=c;var u,d=n.measureText(i.ticks[0]).width,h=n.measureText(i.ticks[i.ticks.length-1]).width;if(i.labelRotation=a.minRotation||0,i.paddingRight=0,i.paddingLeft=0,i.options.display&&i.isHorizontal()){i.paddingRight=h/2+3,i.paddingLeft=d/2+3,i.longestTextCache||(i.longestTextCache={});for(var f,p,g=e.longestText(n,c,i.ticks,i.longestTextCache),m=g,k=i.getPixelForTick(1)-i.getPixelForTick(0)-6;m>k&&i.labelRotationi.yLabelWidth&&(i.paddingLeft=u+r/2),i.paddingRight=r/2,p*g>i.maxHeight){i.labelRotation--;break}i.labelRotation++,m=f*g}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){var i=this,n=i.minSize={width:0,height:0},o=i.options,a=t.defaults.global,r=o.ticks,s=o.scaleLabel,l=o.gridLines,c=o.display,u=i.isHorizontal(),d=e.getValueOrDefault(r.fontSize,a.defaultFontSize),h=e.getValueOrDefault(r.fontStyle,a.defaultFontStyle),f=e.getValueOrDefault(r.fontFamily,a.defaultFontFamily),p=e.fontString(d,h,f),g=e.getValueOrDefault(s.fontSize,a.defaultFontSize),m=o.gridLines.tickMarkLength;if(u?n.width=i.isFullWidth()?i.maxWidth-i.margins.left-i.margins.right:i.maxWidth:n.width=c&&l.drawTicks?m:0,u?n.height=c&&l.drawTicks?m:0:n.height=i.maxHeight,s.display&&c&&(u?n.height+=1.5*g:n.width+=1.5*g),r.display&&c){i.longestTextCache||(i.longestTextCache={});var k=e.longestText(i.ctx,p,i.ticks,i.longestTextCache),v=e.numberOfLabelLines(i.ticks),w=.5*d;if(u){i.longestLabelWidth=k;var y=Math.sin(e.toRadians(i.labelRotation))*i.longestLabelWidth+d*v+w*v;n.height=Math.min(i.maxHeight,n.height+y),i.ctx.font=p;var b=i.ctx.measureText(i.ticks[0]).width,x=i.ctx.measureText(i.ticks[i.ticks.length-1]).width,D=Math.cos(e.toRadians(i.labelRotation)),C=Math.sin(e.toRadians(i.labelRotation));i.paddingLeft=0!==i.labelRotation?D*b+3:b/2+3,i.paddingRight=0!==i.labelRotation?C*(d/2)+3:x/2+3}else{var S=i.maxWidth-n.width,M=r.mirror;M?k=0:k+=i.options.ticks.padding,S>k?n.width+=k:n.width=i.maxWidth,i.paddingTop=d/2,i.paddingBottom=d/2}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingTop=Math.max(i.paddingTop-i.margins.top,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0),i.paddingBottom=Math.max(i.paddingBottom-i.margins.bottom,0)),i.width=n.width,i.height=n.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),o=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),a=o*t+i.paddingLeft;e&&(a+=o/2);var r=i.left+Math.round(a);return r+=i.isFullWidth()?i.margins.left:0}var s=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(s/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){var t=this,e=t.min,i=t.max;return t.getPixelForValue(t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(i){var n=this,o=n.options;if(o.display){var a,r,s=n.ctx,l=t.defaults.global,c=o.ticks,u=o.gridLines,d=o.scaleLabel,h=0!==n.labelRotation,f=c.autoSkip,p=n.isHorizontal();c.maxTicksLimit&&(r=c.maxTicksLimit);var g=e.getValueOrDefault(c.fontColor,l.defaultFontColor),m=e.getValueOrDefault(c.fontSize,l.defaultFontSize),k=e.getValueOrDefault(c.fontStyle,l.defaultFontStyle),v=e.getValueOrDefault(c.fontFamily,l.defaultFontFamily),w=e.fontString(m,k,v),y=u.tickMarkLength,b=e.getValueOrDefault(u.borderDash,l.borderDash),x=e.getValueOrDefault(u.borderDashOffset,l.borderDashOffset),D=e.getValueOrDefault(d.fontColor,l.defaultFontColor),C=e.getValueOrDefault(d.fontSize,l.defaultFontSize),S=e.getValueOrDefault(d.fontStyle,l.defaultFontStyle),M=e.getValueOrDefault(d.fontFamily,l.defaultFontFamily),Y=e.fontString(C,S,M),_=e.toRadians(n.labelRotation),T=Math.cos(_),P=n.longestLabelWidth*T; s.fillStyle=g;var A=[];if(p){if(a=!1,h&&(P/=2),(P+c.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(a=1+Math.floor((P+c.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),r&&n.ticks.length>r)for(;!a||n.ticks.length/(a||1)>r;)a||(a=1),a+=1;f||(a=!1)}var I="right"===o.position?n.left:n.right-y,O="right"===o.position?n.left+y:n.right,L="bottom"===o.position?n.top:n.bottom-y,F="bottom"===o.position?n.top+y:n.bottom;if(e.each(n.ticks,function(t,r){if(void 0!==t&&null!==t){var s=n.ticks.length===r+1,l=a>1&&r%a>0||r%a===0&&r+a>=n.ticks.length;if((!l||s)&&void 0!==t&&null!==t){var d,f;r===("undefined"!=typeof n.zeroLineIndex?n.zeroLineIndex:0)?(d=u.zeroLineWidth,f=u.zeroLineColor):(d=e.getValueAtIndexOrDefault(u.lineWidth,r),f=e.getValueAtIndexOrDefault(u.color,r));var g,m,k,v,w,D,C,S,M,Y,T="middle",P="middle";if(p){h||(P="top"===o.position?"bottom":"top"),T=h?"right":"center";var E=n.getPixelForTick(r)+e.aliasPixel(d);M=n.getPixelForTick(r,u.offsetGridLines)+c.labelOffset,Y=h?n.top+12:"top"===o.position?n.bottom-y:n.top+y,g=k=w=C=E,m=L,v=F,D=i.top,S=i.bottom}else{"left"===o.position?c.mirror?(M=n.right+c.padding,T="left"):(M=n.right-c.padding,T="right"):c.mirror?(M=n.left-c.padding,T="right"):(M=n.left+c.padding,T="left");var j=n.getPixelForTick(r);j+=e.aliasPixel(d),Y=n.getPixelForTick(r,u.offsetGridLines),g=I,k=O,w=i.left,C=i.right,m=v=D=S=j}A.push({tx1:g,ty1:m,tx2:k,ty2:v,x1:w,y1:D,x2:C,y2:S,labelX:M,labelY:Y,glWidth:d,glColor:f,glBorderDash:b,glBorderDashOffset:x,rotation:-1*_,label:t,textBaseline:P,textAlign:T})}}}),e.each(A,function(t){if(u.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),u.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),c.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=w,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(e.isArray(i))for(var n=0,o=-(i.length-1)*m*.75;ne;++e){var a=t[e];if(a&&a.hasValue()){var r=a.tooltipPosition();n.push(r.x),o.push(r.y)}}var s=0,l=0;for(e=0;e0){var a=t[0];a.xLabel?i=a.xLabel:o>0&&a.indexe;++e)p.push(n(c[e]));s.itemSort&&(p=p.sort(function(t,e){return s.itemSort(t,e,u)})),c.length>1&&o.each(p,function(t){h.push(s.callbacks.labelColor.call(r,t,d))}),o.extend(l,{title:r.getTitle(p,u),beforeBody:r.getBeforeBody(p,u),body:r.getBody(p,u),afterBody:r.getAfterBody(p,u),footer:r.getFooter(p,u),x:Math.round(f.x),y:Math.round(f.y),caretPadding:o.getValueOrDefault(f.padding,2),labelColors:h});var g=r.getTooltipSize(l);r.determineAlignment(g),o.extend(l,r.getBackgroundPoint(l,g))}else r._model.opacity=0;return t&&s.custom&&s.custom.call(r,l),r},getTooltipSize:function(t){var e=this._chart.ctx,i={height:2*t.yPadding,width:0},n=t.body,a=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=t.beforeBody.length+t.afterBody.length;var r=t.title.length,s=t.footer.length,l=t.titleFontSize,c=t.bodyFontSize,u=t.footerFontSize;i.height+=r*l,i.height+=(r-1)*t.titleSpacing,i.height+=r?t.titleMarginBottom:0,i.height+=a*c,i.height+=a?(a-1)*t.bodySpacing:0,i.height+=s?t.footerMarginTop:0,i.height+=s*u,i.height+=s?(s-1)*t.footerSpacing:0;var d=0,h=function(t){i.width=Math.max(i.width,e.measureText(t).width+d)};return e.font=o.fontString(l,t._titleFontStyle,t._titleFontFamily),o.each(t.title,h),e.font=o.fontString(c,t._bodyFontStyle,t._bodyFontFamily),o.each(t.beforeBody.concat(t.afterBody),h),d=n.length>1?c+2:0,o.each(n,function(t){o.each(t.before,h),o.each(t.lines,h),o.each(t.after,h)}),d=0,e.font=o.fontString(u,t._footerFontStyle,t._footerFontFamily),o.each(t.footer,h),i.width+=2*t.xPadding,i},determineAlignment:function(t){var e=this,i=e._model,n=e._chart,o=e._chartInstance.chartArea;i.yn.height-t.height&&(i.yAlign="bottom");var a,r,s,l,c,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2;"center"===i.yAlign?(a=function(t){return u>=t},r=function(t){return t>u}):(a=function(e){return e<=t.width/2},r=function(e){return e>=n.width-t.width/2}),s=function(e){return e+t.width>n.width},l=function(e){return e-t.width<0},c=function(t){return d>=t?"top":"bottom"},a(i.x)?(i.xAlign="left",s(i.x)&&(i.xAlign="center",i.yAlign=c(i.y))):r(i.x)&&(i.xAlign="right",l(i.x)&&(i.xAlign="center",i.yAlign=c(i.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,o=t.caretPadding,a=t.cornerRadius,r=t.xAlign,s=t.yAlign,l=n+o,c=a+o;return"right"===r?i.x-=e.width:"center"===r&&(i.x-=e.width/2),"top"===s?i.y+=l:"bottom"===s?i.y-=e.height+l:i.y-=e.height/2,"center"===s?"left"===r?i.x+=l:"right"===r&&(i.x-=l):"left"===r?i.x-=c:"right"===r&&(i.x+=c),i},drawCaret:function(t,e,i){var n,a,r,s,l,c,u=this._view,d=this._chart.ctx,h=u.caretSize,f=u.cornerRadius,p=u.xAlign,g=u.yAlign,m=t.x,k=t.y,v=e.width,w=e.height;"center"===g?("left"===p?(n=m,a=n-h,r=n):(n=m+v,a=n+h,r=n),l=k+w/2,s=l-h,c=l+h):("left"===p?(n=m+f,a=n+h,r=a+h):"right"===p?(n=m+v-f,a=n-h,r=a-h):(a=m+v/2,n=a-h,r=a+h),"top"===g?(s=k,l=s-h,c=s):(s=k+w,l=s+h,c=s));var y=o.color(u.backgroundColor);d.fillStyle=y.alpha(i*y.alpha()).rgbString(),d.beginPath(),d.moveTo(n,s),d.lineTo(a,l),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r=e.titleFontSize,s=e.titleSpacing,l=o.color(e.titleFontColor);i.fillStyle=l.alpha(n*l.alpha()).rgbString(),i.font=o.fontString(r,e._titleFontStyle,e._titleFontFamily);var c,u;for(c=0,u=a.length;u>c;++c)i.fillText(a[c],t.x,t.y),t.y+=r+s,c+1===a.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i,n){var a=e.bodyFontSize,r=e.bodySpacing,s=e.body;i.textAlign=e._bodyAlign,i.textBaseline="top";var l=o.color(e.bodyFontColor),c=l.alpha(n*l.alpha()).rgbString();i.fillStyle=c,i.font=o.fontString(a,e._bodyFontStyle,e._bodyFontFamily);var u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=a+r};o.each(e.beforeBody,d);var h=s.length>1;u=h?a+2:0,o.each(s,function(r,s){o.each(r.before,d),o.each(r.lines,function(r){h&&(i.fillStyle=o.color(e.legendColorBackground).alpha(n).rgbaString(),i.fillRect(t.x,t.y,a,a),i.strokeStyle=o.color(e.labelColors[s].borderColor).alpha(n).rgbaString(),i.strokeRect(t.x,t.y,a,a),i.fillStyle=o.color(e.labelColors[s].backgroundColor).alpha(n).rgbaString(),i.fillRect(t.x+1,t.y+1,a-2,a-2),i.fillStyle=c),d(r)}),o.each(r.after,d)}),u=0,o.each(e.afterBody,d),t.y-=r},drawFooter:function(t,e,i,n){var a=e.footer;if(a.length){t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top";var r=o.color(e.footerFontColor);i.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.font=o.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),o.each(a,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i=this.getTooltipSize(e),n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.enabled){var r=o.color(e.backgroundColor);t.fillStyle=r.alpha(a*r.alpha()).rgbString(),o.drawRoundedRectangle(t,n.x,n.y,i.width,i.height,e.cornerRadius),t.fill(),this.drawCaret(n,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a)}}}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)l;)l+=2*Math.PI;for(;a>l;)a-=2*Math.PI;for(;s>a;)a+=2*Math.PI;var c=a>=s&&l>=a,u=r>=n.innerRadius&&r<=n.outerRadius;return c&&u}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;e._view.steppedLine===!0?(l.lineTo(i.x,t._view.y),l.lineTo(i.x,i.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,o=n._view,a=o.spanGaps,r=o.scaleZero,s=n._loop,l=n._chart.ctx;l.save();var c=n._children.slice(),u=-1;s&&c.length&&c.push(c[0]);var d,h,f,p;if(c.length&&o.fill){for(l.beginPath(),d=0;dd;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return!!i&&(i.y=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,o=i.isHorizontal();return n.xLabels&&o||n.yLabels&&!o?i.getRightValue(n.datasets[e].data[t]):i.ticks[t]},getPixelForValue:function(t,e,i,n){var o=this,a=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var r=o.getLabels(),s=r.indexOf(t);e=-1!==s?s:e}if(o.isHorizontal()){var l=o.width-(o.paddingLeft+o.paddingRight),c=l/a,u=c*(e-o.minIndex)+o.paddingLeft;return(o.options.gridLines.offsetGridLines&&n||o.maxIndex===o.minIndex&&n)&&(u+=c/2),o.left+Math.round(u)}var d=o.height-(o.paddingTop+o.paddingBottom),h=d/a,f=h*(e-o.minIndex)+o.paddingTop;return o.options.gridLines.offsetGridLines&&n&&(f+=h/2),o.top+Math.round(f)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,i=this,n=Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),o=i.isHorizontal(),a=o?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.paddingBottom),r=a/n;return t-=o?i.left:i.top,i.options.gridLines.offsetGridLines&&(t-=r/2),t-=o?i.paddingLeft:i.paddingTop,e=0>=t?0:Math.round(t/r)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=e.log10(Math.abs(o)),r="";if(0!==t){var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r}}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=i.chart,a=o.data,r=a.datasets,s=i.isHorizontal();if(i.min=null,i.max=null,n.stacked){var l={};e.each(r,function(a,r){var s=o.getDatasetMeta(r);void 0===l[s.type]&&(l[s.type]={positiveValues:[],negativeValues:[]});var c=l[s.type].positiveValues,u=l[s.type].negativeValues;o.isDatasetVisible(r)&&t(s)&&e.each(a.data,function(t,e){var o=+i.getRightValue(t);isNaN(o)||s.data[e].hidden||(c[e]=c[e]||0,u[e]=u[e]||0,n.relativePoints?c[e]=100:0>o?u[e]+=o:c[e]+=o)})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),o=e.min(n),a=e.max(n);i.min=null===i.min?o:Math.min(i.min,o),i.max=null===i.max?a:Math.max(i.max,a)})}else e.each(r,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,o=n.options.ticks;if(n.isHorizontal())i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.width/50));else{var a=e.getValueOrDefault(o.fontSize,t.defaults.global.defaultFontSize);i=Math.min(o.maxTicksLimit?o.maxTicksLimit:11,Math.ceil(n.height/(2*a)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i,n=this,o=n.paddingLeft,a=n.paddingBottom,r=n.start,s=+n.getRightValue(t),l=n.end-r;return n.isHorizontal()?(i=n.width-(o+n.paddingRight),e=n.left+i/l*(s-r),Math.round(e+o)):(i=n.height-(n.paddingTop+a),e=n.bottom-a-i/l*(s-r),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,o=e.paddingBottom,a=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+o),r=(i?t-e.left-n:e.bottom-o-t)/a;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var o=e.sign(t.min),a=e.sign(t.max);0>o&&0>a?t.max=0:o>0&&a>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],o=i.ticks,a=e.getValueOrDefault,r=t.getTickLimit();r=Math.max(2,r);var s,l=o.fixedStepSize&&o.fixedStepSize>0||o.stepSize&&o.stepSize>0;if(l)s=a(o.fixedStepSize,o.stepSize);else{var c=e.niceNum(t.max-t.min,!1);s=e.niceNum(c/(r-1),!0)}var u=Math.floor(t.min/s)*s,d=Math.ceil(t.max/s)*s,h=(d-u)/s;h=e.almostEquals(h,Math.round(h),s/1e3)?Math.round(h):Math.ceil(h),n.push(void 0!==o.min?o.min:u);for(var f=1;h>f;++f)n.push(u+f*s);n.push(void 0!==o.max?o.max:d),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),o.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var o=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return c?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,o=n.ticks,a=i.chart,r=a.data,s=r.datasets,l=e.getValueOrDefault,c=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var u={};e.each(s,function(o,r){var s=a.getDatasetMeta(r);a.isDatasetVisible(r)&&t(s)&&(void 0===u[s.type]&&(u[s.type]=[]),e.each(o.data,function(t,e){var o=u[s.type],a=+i.getRightValue(t);isNaN(a)||s.data[e].hidden||(o[e]=o[e]||0,n.relativePoints?o[e]=100:o[e]+=a)}))}),e.each(u,function(t){var n=e.min(t),o=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(s,function(n,o){var r=a.getDatasetMeta(o);a.isDatasetVisible(o)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n),0!==n&&(null===i.minNotZero||nt.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,o,a,r,s,l,c,u,d,h,f,p=this.options.pointLabels,g=e.getValueOrDefault(p.fontSize,i.defaultFontSize),m=e.getValueOrDefault(p.fontStyle,i.defaultFontStyle),k=e.getValueOrDefault(p.fontFamily,i.defaultFontFamily),v=e.fontString(g,m,k),w=e.min([this.height/2-g-5,this.width/2]),y=this.width,b=0;for(this.ctx.font=v,n=0;ny&&(y=t.x+a,r=n),t.x-aD?t.x+o>y&&(y=t.x+o,r=n):t.x-oe&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},dateLimit:90,dateRangeSelector:"#range_input",defaults:{dateRange:"latest-20",sort:"views",direction:1,outputData:[],hadFailure:!1,total:0,view:"list"},linearLegend:function(t,e){return""+$.i18n("totals")+":\n "+$.i18n("num-redirects",e.outputData.listData.length-1)+"\n •\n "+$.i18n("num-pageviews",e.formatNumber(e.outputData.sum))+"\n ("+e.formatNumber(Math.round(e.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validateParams:["project","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","section"],view:["list","chart"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var r=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")}}(),s=function(){function t(t,e){for(var i=0;i0&&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:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),t?e.page=$(this.config.sourceInput).val().score():(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);var e=$(this.config.sourceInput).val().score().replace(/[&%?]/g,escape);window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&page="+e),$(".permalink").prop("href","/redirectviews?"+$.param(this.getPermaLink())+"&page="+e)}}},{key:"renderData",value:function(){var t=this;l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-redirects",t.outputData.titles.length-1)+"\n "+$.i18n("num-sections",t.outputData.sectionCount)+"\n "+t.formatNumber(t.outputData.sum)+"\n "+t.formatNumber(Math.round(t.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),e.forEach(function(e,i){var n=e.label===t.outputData.source,o="";if(e.section){var a=t.getPageURL(t.outputData.source)+"#"+encodeURIComponent(e.section.score());o='#'+e.section+""}$("#output_list").append("\n "+(i+1)+'\n '+e.label+" "+(n?"("+$.i18n("target")+")":"")+"\n "+o+"\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(t,e){switch(e){case"title":return t.label;case"section":return t.section;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"),o=$.Deferred(),a=[],r=0,s={},l=t.length,c=[],u=[],d=function t(d){var h=encodeURIComponent(d.title),f="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+e.project+("/"+$(e.config.platformSelector).val()+"/"+$(e.config.agentSelector).val()+"/"+h+"/daily")+("/"+i.format(e.config.timestampFormat)+"/"+n.format(e.config.timestampFormat)),p=$.ajax({url:f,dataType:"json"});a.push(p),p.done(function(t){u.push({title:d.title,section:d.fragment,items:t.items})}).fail(function(i){var n="Error in Cassandra table storage backend"===i.responseJSON.title,o=e.getPageLink(d.title,e.project+".org");if(n){if(s[d.title]?s[d.title]++:s[d.title]=1,s[d.title]<3)return l++,e.rateLimit(t,e.config.apiThrottle,e)(d);c.push(o)}else e.writeMessage(o+": "+$.i18n("api-error","Pageviews API")+" - "+i.responseJSON.title);404!==i.status&&(hadFailure=!0)}).always(function(){e.updateProgressBar(++r,l),r===l&&(c.length&&e.writeMessage($.i18n("api-error-timeout","
      "+c.map(function(t){return"
    • "+t+"
    • "}).join("")+"
    ")),o.resolve(u))})},h=this.rateLimit(d,this.config.apiThrottle,this);return t.forEach(function(t){h(t)}),o}},{key:"getRedirects",value:function(t){var e=this,i=$.Deferred(),n=$.ajax({url:"https://"+this.project+".org/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",formatversion:2,prop:"redirects",rdprop:"title|fragment",rdlimit:500,titles:t}});return n.done(function(n){if(n.error)return e.setState("initial",function(){e.writeMessage($.i18n("api-error","Redirect API")+": "+n.error.info.escape())});var o=[{title:t}].concat(n.query.pages[0].redirects||[]);return i.resolve(o)}),i}},{key:"popParams",value:function(){var t=this,e=this.validateParams(this.parseQueryString("pages"));$(this.config.projectInput).val(e.project),this.validateDateRange(e),this.patchUsage(),$(".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];return e[i].missing?(t.setState("initial"),t.writeMessage(t.getPageLink(i)+": "+$.i18n("api-error-no-data"))):($(t.config.sourceInput).val(i),void 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");break;case"invalid":}}},{key:"processInput",value:function(){var t=this,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()};return this.isRequestCached()?($(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("loading-cache")),setTimeout(function(){t.outputData=simpleStorage.get(t.getCacheKey()),i()},500)):($(".progress-counter").text($.i18n("fetching-data","Redirects API")),void this.getRedirects(e).done(function(n){t.getPageViewsData(n).done(function(n){$(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("building-dataset"));var o=t.getPageLink(e,t.project);setTimeout(function(){t.buildMotherDataset(e,o,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:"opensearch",redirects:"resolve",format:"json",search:t}},preProcess:function(t){return t[1]}}})}},{key:"validateProject",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this)&&(this.setState("initial"),this.setupSourceInput())}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(e){var i='"'+e.label.descore().replace(/"/g,'""')+'"';t+=[i].concat(e.data).join(",")+"\n"});var e=encodeURI(t);window.open(e)}},{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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||e"+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"")))})};return t.forEach(function(t,e){return l(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{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(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>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(c(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.setChartPointDetectionRadius(),t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{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};"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"),$(".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}}]),e}(t)};e.exports=u},{}],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;io?-e.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-attributes-alt glyphicon-sort-by-attributes").addClass("glyphicon-sort");var o=1===parseInt(this.direction,10)?"glyphicon-sort-by-attributes-alt":"glyphicon-sort-by-attributes";$(".sort-link--"+this.sort+" span").addClass(o).removeClass("glyphicon-sort");try{t(n)}catch(t){this.setState("complete"),this.showFatalErrors([t])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(t){var e=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+t).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(t+"-mode"),"chart"===t){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var i=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var n=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",n)}this.isLogarithmic()&&(i.scales=Object.assign({},i.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):""}}}]})),$(".show-labels-option").is(":checked")?i=this.showPointLabels(i):(delete i.animation.onComplete,delete i.animation.onProgress),"radar"===this.chartType?i.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):i.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var o=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(o,{type:this.chartType,data:this.outputData,options:i}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(t,e){if(!e)return $(".progress-bar").css("width","0%"),$(".progress-counter").text("");var i=t/e*100;$(".progress-bar").css("width",i.toFixed(2)+"%"),t===e?$(".progress-counter").text("Building dataset..."):$(".progress-counter").text($.i18n("processing-page",t,e))}}]),e}(t)};e.exports=s},{}],6:[function(t,e,i){"use strict";Array.prototype.includes||(Array.prototype.includes=function(t){return this.indexOf(t)!==-1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.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}$/,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;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=moment(this.daterangepicker.endDate).add(1,"day"),n=moment(this.daterangepicker.startDate);n.isBefore(i);n.add(1,"day"))t?e.push(n.format(this.dateFormat)):e.push(n.format("YYYY-MM-DD"));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())}},{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:"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"].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();return t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))}),$.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))]=e.to});var n={};return t.forEach(function(t){t=decodeURIComponent(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=decodeURI(location.search.slice(1)),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($.i18n("latest-days",o)),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(e){return t.validateProject(e)})}},{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){var i=$(".daterangepicker .ranges li").index(e.target),n=t.daterangepicker.container,o=n.find(".daterangepicker_input input");t.specialRange={range:Object.keys(t.config.specialRanges)[i],value:o[0].value+" - "+o[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"),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 decodeURIComponent(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];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.clearMessages(),this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),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(){return"true"===this.localizeDateFormat?this.getLocaleDateString():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=f},{"./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 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,minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().subtract(1,"days").startOf("day")],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),moment().subtract(1,"days").startOf("day")],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}}}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":9}],9:[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", +return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,o=n.gridLines,a=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(a.fontSize,i.defaultFontSize),d=l(a.fontStyle,i.defaultFontStyle),h=l(a.fontFamily,i.defaultFontFamily),f=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(o.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(o.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(o.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var p=0;p=0;w--){if(r.display){var y=t.getPointPosition(w,p);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(y.x,y.y),c.stroke(),c.closePath()}var b=t.getPointPosition(w,p+5),x=l(s.fontColor,i.defaultFontColor);c.font=v,c.fillStyle=x;var D=t.pointLabels,C=this.getIndexAngle(w)+Math.PI/2,S=360*C/(2*Math.PI)%360;0===S||180===S?c.textAlign="center":180>S?c.textAlign="left":c.textAlign="right",90===S||270===S?c.textBaseline="middle":S>270||90>S?c.textBaseline="bottom":c.textBaseline="top",c.fillText(D[w]?D[w]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",o,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},a=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:"undefined"!=typeof this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),"undefined"!=typeof i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&e.options.time.isoWeekday!==!1?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(o,a){var r=[],s=t.chart.isDatasetVisible(a);"object"==typeof o.data[0]&&null!==o.data[0]?e.each(o.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var o=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),o.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):o=i,t.labelDiffs.push(o)},t)},buildTicks:function(){var n=this;n.ctx.save();var o=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(o,a,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width,d=Math.cos(e.toRadians(n.options.ticks.maxRotation)),h=Math.sin(e.toRadians(n.options.ticks.maxRotation));u=u*d+o*h;var f=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var p=0,g=i.units[p];p=Math.ceil(n.scaleSizeInUnits/f)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,g.steps[m]);break}break}if(g.maxStep===!1||Math.ceil(n.scaleSizeInUnits/f)b?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):b>=0&&(n.lastTick=y),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var x=1;x<=n.scaleSizeInUnits;++x){var D=w.clone().add(x,n.tickUnit);if(n.options.time.max&&D.diff(n.lastTick,n.tickUnit,!0)>=0)break;x%n.unitScale===0&&n.ticks.push(D)}var C=n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit);(0!==C||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&&t"+$.i18n("totals")+": "+t.formatNumber(t.outputData.sum)+"\n ("+t.formatNumber(Math.round(t.outputData.average))+"/"+$.i18n("day")+")"},dateRangeSelector:"#range_input",defaults:{dateRange:"latest-20",sort:"views",direction:1,outputData:[],hadFailure:!1,total:0,view:"list"},linearLegend:function(t,e){return""+$.i18n("totals")+":\n "+$.i18n("num-redirects",e.outputData.listData.length-1)+"\n •\n "+$.i18n("num-pageviews",e.formatNumber(e.outputData.sum))+"\n ("+e.formatNumber(Math.round(e.outputData.average))+"/"+$.i18n("day")+")"},logarithmicCheckbox:".logarithmic-scale-option",platformSelector:"#platform_select",projectInput:"#project_input",formStates:["initial","processing","complete","invalid"],sourceInput:"#source_input",timestampFormat:"YYYYMMDD00",validateParams:["project","platform","agent","direction","sort","view"],validParams:{direction:["-1","1"],sort:["title","views","section"],view:["list","chart"]}};e.exports=n},{}],2:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var r=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")}}(),s=function(){function t(t,e){for(var i=0;i0&&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:(e.start=this.daterangepicker.startDate.format("YYYY-MM-DD"),e.end=this.daterangepicker.endDate.format("YYYY-MM-DD")),t?e.page=$(this.config.sourceInput).val().score():(e.sort=this.sort,e.direction=this.direction,e.view=this.view,this.noLogScale&&(e.autolog="false")),e}},{key:"pushParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(window.history&&window.history.replaceState){if(t)return history.replaceState(null,document.title,location.href.split("?")[0]);var e=$(this.config.sourceInput).val().score().replace(/[&%?]/g,escape);window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&page="+e),$(".permalink").prop("href","/redirectviews?"+$.param(this.getPermaLink())+"&page="+e)}}},{key:"renderData",value:function(){var t=this;l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"renderData",this).call(this,function(e){$(".output-totals").html(""+$.i18n("totals")+"\n "+$.i18n("num-redirects",t.outputData.titles.length-1)+"\n "+$.i18n("num-sections",t.outputData.sectionCount)+"\n "+t.formatNumber(t.outputData.sum)+"\n "+t.formatNumber(Math.round(t.outputData.average))+" / "+$.i18n("day")+""),$("#output_list").html(""),e.forEach(function(e,i){var n=e.label===t.outputData.source,o="";if(e.section){var a=t.getPageURL(t.outputData.source)+"#"+encodeURIComponent(e.section.score());o='#'+e.section+""}$("#output_list").append("\n "+(i+1)+'\n '+e.label+" "+(n?"("+$.i18n("target")+")":"")+"\n "+o+"\n "+t.formatNumber(e.sum)+"\n "+t.formatNumber(Math.round(e.average))+" / "+$.i18n("day")+"\n ")})})}},{key:"getSortProperty",value:function(t,e){switch(e){case"title":return t.label;case"section":return t.section;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"),o=$.Deferred(),a=[],r=0,s={},l=t.length,c=[],u=[],d=function t(d){var h=encodeURIComponent(d.title),f="https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/"+e.project+("/"+$(e.config.platformSelector).val()+"/"+$(e.config.agentSelector).val()+"/"+h+"/daily")+("/"+i.format(e.config.timestampFormat)+"/"+n.format(e.config.timestampFormat)),p=$.ajax({url:f,dataType:"json"});a.push(p),p.done(function(t){u.push({title:d.title,section:d.fragment,items:t.items})}).fail(function(i){var n="Error in Cassandra table storage backend"===i.responseJSON.title,o=e.getPageLink(d.title,e.project+".org");if(n){if(s[d.title]?s[d.title]++:s[d.title]=1,s[d.title]<3)return l++,e.rateLimit(t,e.config.apiThrottle,e)(d);c.push(o)}else e.writeMessage(o+": "+$.i18n("api-error","Pageviews API")+" - "+i.responseJSON.title);404!==i.status&&(hadFailure=!0)}).always(function(){e.updateProgressBar(++r,l),r===l&&(c.length&&e.writeMessage($.i18n("api-error-timeout","
      "+c.map(function(t){return"
    • "+t+"
    • "}).join("")+"
    ")),o.resolve(u))})},h=this.rateLimit(d,this.config.apiThrottle,this);return t.forEach(function(t){h(t)}),o}},{key:"getRedirects",value:function(t){var e=this,i=$.Deferred(),n=$.ajax({url:"https://"+this.project+".org/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",formatversion:2,prop:"redirects",rdprop:"title|fragment",rdlimit:500,titles:t}});return n.done(function(n){if(n.error)return e.setState("initial",function(){e.writeMessage($.i18n("api-error","Redirect API")+": "+n.error.info.escape())});var o=[{title:t}].concat(n.query.pages[0].redirects||[]);return i.resolve(o)}),i}},{key:"popParams",value:function(){var t=this,e=this.validateParams(this.parseQueryString("pages"));$(this.config.projectInput).val(e.project),this.validateDateRange(e),this.patchUsage(),$(".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];return e[i].missing?(t.setState("initial"),t.writeMessage(t.getPageLink(i)+": "+$.i18n("api-error-no-data"))):($(t.config.sourceInput).val(i),void 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");break;case"invalid":}}},{key:"processInput",value:function(){var t=this,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()};return this.isRequestCached()?($(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("loading-cache")),setTimeout(function(){t.outputData=simpleStorage.get(t.getCacheKey()),i()},500)):($(".progress-counter").text($.i18n("fetching-data","Redirects API")),void this.getRedirects(e).done(function(n){t.getPageViewsData(n).done(function(n){$(".progress-bar").css("width","100%"),$(".progress-counter").text($.i18n("building-dataset"));var o=t.getPageLink(e,t.project);setTimeout(function(){t.buildMotherDataset(e,o,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:"opensearch",redirects:"resolve",format:"json",search:t}},preProcess:function(t){return t[1]}}})}},{key:"validateProject",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this)&&(this.setState("initial"),this.setupSourceInput())}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Title,"+this.getDateHeadings(!1).join(",")+"\n";this.outputData.listData.forEach(function(e){var i='"'+e.label.descore().replace(/"/g,'""')+'"';t+=[i].concat(e.data).join(",")+"\n"});var e=encodeURI(t);window.open(e)}},{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);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;return n=this.isPageviews()?"views":"metaviews"===this.app?"count":"devices",t.map(function(t,o){var a=i.getDateHeadings(!1),r=new Array(a.length),s=0,l=void 0,c=0;t.forEach(function(t){var e=t[n],o=void 0;o="metaviews"===i.app?t.date:moment(t.timestamp,i.config.timestampFormat).format("YYYY-MM-DD"),r[a.indexOf(o)]=e,s+=e||0,e>c&&(c=e),(void 0===l||e"+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"")))})};return t.forEach(function(t,e){return l(t,e)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{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(){"line"===this.chartType&&(this.numDaysInRange()>50?Chart.defaults.global.elements.point.hitRadius=3:this.numDaysInRange()>30?Chart.defaults.global.elements.point.hitRadius=5:this.numDaysInRange()>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(c(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.setChartPointDetectionRadius(),t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{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};"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"),$(".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}}]),e}(t)};e.exports=u},{}],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;io?-e.direction:0});$(".sort-link span").removeClass("glyphicon-sort-by-attributes-alt glyphicon-sort-by-attributes").addClass("glyphicon-sort");var o=1===parseInt(this.direction,10)?"glyphicon-sort-by-attributes-alt":"glyphicon-sort-by-attributes";$(".sort-link--"+this.sort+" span").addClass(o).removeClass("glyphicon-sort");try{t(n)}catch(t){this.setState("complete"),this.showFatalErrors([t])}finally{this.pushParams()}this.toggleView(this.view),"complete"!==this.getState()&&this.setState("complete")}},{key:"toggleView",value:function(t){var e=this;if($(".view-btn").removeClass("active"),$(".view-btn--"+t).addClass("active"),$("output").removeClass("list-mode").removeClass("chart-mode").addClass(t+"-mode"),"chart"===t){this.destroyChart(),this.config.circularCharts.includes(this.chartType)&&(this.chartType="bar");var i=Object.assign({},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);if(this.assignOutputDataChartOpts(),this.setChartPointDetectionRadius(),"true"===this.autoLogDetection){var n=this.shouldBeLogarithmic([this.outputData.datasets[0].data]);$(this.config.logarithmicCheckbox).prop("checked",n)}this.isLogarithmic()&&(i.scales=Object.assign({},i.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):""}}}]})),$(".show-labels-option").is(":checked")?i=this.showPointLabels(i):(delete i.animation.onComplete,delete i.animation.onProgress),"radar"===this.chartType?i.scale.ticks.beginAtZero=$(".begin-at-zero-option").is(":checked"):i.scales.yAxes[0].ticks.beginAtZero=$(".begin-at-zero-option").is(":checked");var o=$(this.config.chart)[0].getContext("2d");this.chartObj=new Chart(o,{type:this.chartType,data:this.outputData,options:i}),$(".chart-specific").show(),$("#chart-legend").html(this.chartObj.generateLegend())}else $(".chart-specific").hide();this.pushParams()}},{key:"updateProgressBar",value:function(t,e){if(!e)return $(".progress-bar").css("width","0%"),$(".progress-counter").text("");var i=t/e*100;$(".progress-bar").css("width",i.toFixed(2)+"%"),t===e?$(".progress-counter").text("Building dataset..."):$(".progress-counter").text($.i18n("processing-page",t,e))}}]),e}(t)};e.exports=s},{}],6:[function(t,e,i){"use strict";Array.prototype.includes||(Array.prototype.includes=function(t){return this.indexOf(t)!==-1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.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}$/,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;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=moment(this.daterangepicker.endDate).add(1,"day"),n=moment(this.daterangepicker.startDate);n.isBefore(i);n.add(1,"day"))t?e.push(n.format(this.dateFormat)):e.push(n.format("YYYY-MM-DD"));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())}},{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:"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"].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();return t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))}),$.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))]=e.to});var n={};return t.forEach(function(t){t=decodeURIComponent(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=decodeURI(location.search.slice(1)),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($.i18n("latest-days",o)),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(e){return t.validateProject(e)})}},{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){var i=$(".daterangepicker .ranges li").index(e.target),n=t.daterangepicker.container,o=n.find(".daterangepicker_input input");t.specialRange={range:Object.keys(t.config.specialRanges)[i],value:o[0].value+" - "+o[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"),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 decodeURIComponent(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];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.clearMessages(),this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),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(){return"true"===this.localizeDateFormat?this.getLocaleDateString():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=f},{"./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 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,minDate:moment("2015-07-01").startOf("day"),maxDate:moment().subtract(1,"days").startOf("day"),specialRanges:{"last-week":[moment().subtract(1,"week").startOf("week"),moment().subtract(1,"week").endOf("week")],"this-month":[moment().startOf("month"),moment().subtract(1,"days").startOf("day")],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().subtract(1,"days").startOf("day")],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),moment().subtract(1,"days").startOf("day")],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}}}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":9}],9:[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",advisorywiki:"advisory.wikimedia.org",arwikimedia:"ar.wikimedia.org",arbcom_dewiki:"arbcom-de.wikipedia.org",arbcom_enwiki:"arbcom-en.wikipedia.org",arbcom_fiwiki:"arbcom-fi.wikipedia.org",arbcom_nlwiki:"arbcom-nl.wikipedia.org",auditcomwiki:"auditcom.wikimedia.org",bdwikimedia:"bd.wikimedia.org",bewikimedia:"be.wikimedia.org",betawikiversity:"beta.wikiversity.org",boardwiki:"board.wikimedia.org",boardgovcomwiki:"boardgovcom.wikimedia.org",brwikimedia:"br.wikimedia.org",cawikimedia:"ca.wikimedia.org",chairwiki:"chair.wikimedia.org",chapcomwiki:"affcom.wikimedia.org",checkuserwiki:"checkuser.wikimedia.org",cnwikimedia:"cn.wikimedia.org",cowikimedia:"co.wikimedia.org",collabwiki:"collab.wikimedia.org",commonswiki:"commons.wikimedia.org",dkwikimedia:"dk.wikimedia.org",donatewiki:"donate.wikimedia.org",etwikimedia:"ee.wikimedia.org",execwiki:"exec.wikimedia.org",fdcwiki:"fdc.wikimedia.org",fiwikimedia:"fi.wikimedia.org",foundationwiki:"wikimediafoundation.org",grantswiki:"grants.wikimedia.org",iegcomwiki:"iegcom.wikimedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",internalwiki:"internal.wikimedia.org",labswiki:"wikitech.wikimedia.org",labtestwiki:"labtestwikitech.wikimedia.org",legalteamwiki:"legalteam.wikimedia.org",loginwiki:"login.wikimedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mkwikimedia:"mk.wikimedia.org",movementroleswiki:"movementroles.wikimedia.org",mxwikimedia:"mx.wikimedia.org",nlwikimedia:"nl.wikimedia.org",nowikimedia:"no.wikimedia.org",noboard_chapterswikimedia:"noboard-chapters.wikimedia.org",nostalgiawiki:"nostalgia.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nzwikimedia:"nz.wikimedia.org",officewiki:"office.wikimedia.org",ombudsmenwiki:"ombudsmen.wikimedia.org",otrs_wikiwiki:"otrs-wiki.wikimedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",plwikimedia:"pl.wikimedia.org",qualitywiki:"quality.wikimedia.org",rswikimedia:"rs.wikimedia.org",ruwikimedia:"ru.wikimedia.org",sewikimedia:"se.wikimedia.org",searchcomwiki:"searchcom.wikimedia.org",sourceswiki:"wikisource.org",spcomwiki:"spcom.wikimedia.org",specieswiki:"species.wikimedia.org",stewardwiki:"steward.wikimedia.org",strategywiki:"strategy.wikimedia.org",tenwiki:"ten.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",testwikidatawiki:"test.wikidata.org",trwikimedia:"tr.wikimedia.org",transitionteamwiki:"transitionteam.wikimedia.org",uawikimedia:"ua.wikimedia.org",ukwikimedia:"uk.wikimedia.org",usabilitywiki:"usability.wikimedia.org",votewiki:"vote.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimania2005wiki:"wikimania2005.wikimedia.org",wikimania2006wiki:"wikimania2006.wikimedia.org",wikimania2007wiki:"wikimania2007.wikimedia.org",wikimania2008wiki:"wikimania2008.wikimedia.org",wikimania2009wiki:"wikimania2009.wikimedia.org",wikimania2010wiki:"wikimania2010.wikimedia.org",wikimania2011wiki:"wikimania2011.wikimedia.org",wikimania2012wiki:"wikimania2012.wikimedia.org",wikimania2013wiki:"wikimania2013.wikimedia.org",wikimania2014wiki:"wikimania2014.wikimedia.org",wikimania2015wiki:"wikimania2015.wikimedia.org",wikimania2016wiki:"wikimania2016.wikimedia.org",wikimania2017wiki:"wikimania2017.wikimedia.org",wikimaniateamwiki:"wikimaniateam.wikimedia.org",zerowiki:"zero.wikimedia.org"};e.exports=n},{}]},{},[2]); \ No newline at end of file