MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/usr/local/local/share/netdata/web/v3/5638.3b5936c3d82cb2945c95.chunk.js
/*! For license information please see 5638.3b5936c3d82cb2945c95.chunk.js.LICENSE.txt */
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"add58d114229f0c7996ebd9e09ce63888b5394f2"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="040d2a45-4f5b-4b8e-a34b-456f362f31c4",t._sentryDebugIdIdentifier="sentry-dbid-040d2a45-4f5b-4b8e-a34b-456f362f31c4")}catch(t){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5638],{5638(t,e,o){o.d(e,{A:()=>ee});var n=o(66118),r=o(81692);const i={modes:{point:(t,e)=>a(t,e,{intersect:!0}),nearest:(t,e,o)=>function(t,e,o){let n=Number.POSITIVE_INFINITY;return a(t,e,o).reduce(((t,i)=>{const s=i.getCenterPoint(),a=function(t,e,o){if("x"===o)return{x:t.x,y:e.y};if("y"===o)return{x:e.x,y:t.y};return e}(e,s,o.axis),d=(0,r.aF)(e,a);return d<n?(t=[i],n=d):d===n&&t.push(i),t}),[]).sort(((t,e)=>t._index-e._index)).slice(0,1)}(t,e,o),x:(t,e,o)=>a(t,e,{intersect:o.intersect,axis:"x"}),y:(t,e,o)=>a(t,e,{intersect:o.intersect,axis:"y"})}};function s(t,e,o){return(i.modes[o.mode]||i.modes.nearest)(t,e,o)}function a(t,e,o){return t.filter((t=>o.intersect?t.inRange(e.x,e.y):function(t,e,o){return"x"!==o&&"y"!==o?t.inRange(e.x,e.y,"x",!0)||t.inRange(e.x,e.y,"y",!0):t.inRange(e.x,e.y,o,!0)}(t,e,o.axis)))}function d(t,e,o){const n=Math.cos(o),r=Math.sin(o),i=e.x,s=e.y;return{x:i+n*(t.x-i)-r*(t.y-s),y:s+r*(t.x-i)+n*(t.y-s)}}const l=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,c=.001,h=(t,e,o)=>Math.min(o,Math.max(e,t)),u=(t,e)=>t.value>=t.start-e&&t.value<=t.end+e;function f(t,e,o){for(const n of Object.keys(t))t[n]=h(t[n],e,o);return t}function x(t,{x:e,y:o,x2:n,y2:r},i,{borderWidth:s,hitTolerance:a}){const d=(s+a)/2,l=t.x>=e-d-c&&t.x<=n+d+c,h=t.y>=o-d-c&&t.y<=r+d+c;return"x"===i?l:("y"===i||l)&&h}function y(t,{rect:e,center:o},n,{rotation:i,borderWidth:s,hitTolerance:a}){return x(d(t,o,(0,r.t)(-i)),e,n,{borderWidth:s,hitTolerance:a})}function p(t,e){const{centerX:o,centerY:n}=t.getProps(["centerX","centerY"],e);return{x:o,y:n}}const b=t=>"string"===typeof t&&t.endsWith("%"),g=t=>parseFloat(t)/100,m=t=>h(g(t),0,1),v=(t,e)=>({x:t,y:e,x2:t,y2:e,width:0,height:0}),w={box:t=>v(t.centerX,t.centerY),doughnutLabel:t=>v(t.centerX,t.centerY),ellipse:t=>({centerX:t.centerX,centerY:t.centerX,radius:0,width:0,height:0}),label:t=>v(t.centerX,t.centerY),line:t=>v(t.x,t.y),point:t=>({centerX:t.centerX,centerY:t.centerY,radius:0,width:0,height:0}),polygon:t=>v(t.centerX,t.centerY)};function M(t,e){return"start"===e?0:"end"===e?t:b(e)?m(e)*t:t/2}function S(t,e,o=!0){return"number"===typeof e?e:b(e)?(o?m(e):g(e))*t:t}function k(t,e,{borderWidth:o,position:n,xAdjust:i,yAdjust:s},a){const d=(0,r.i)(a),l=e.width+(d?a.width:0)+o,c=e.height+(d?a.height:0)+o,h=C(n),u=A(t.x,l,i,h.x),f=A(t.y,c,s,h.y);return{x:u,y:f,x2:u+l,y2:f+c,width:l,height:c,centerX:u+l/2,centerY:f+c/2}}function C(t,e="center"){return(0,r.i)(t)?{x:(0,r.v)(t.x,e),y:(0,r.v)(t.y,e)}:{x:t=(0,r.v)(t,e),y:t}}const P=(t,e)=>t&&t.autoFit&&e<1;function T(t,e){const o=t.font,n=(0,r.b)(o)?o:[o];return P(t,e)?n.map((function(t){const o=(0,r.a0)(t);return o.size=Math.floor(t.size*e),o.lineHeight=t.lineHeight,(0,r.a0)(o)})):n.map((t=>(0,r.a0)(t)))}function D(t){return t&&((0,r.h)(t.xValue)||(0,r.h)(t.yValue))}function A(t,e,o=0,n){return t-M(e,n)+o}function j(t,e,o){const n=o.init;if(n)return!0===n?O(e,o):function(t,e,o){const n=(0,r.Q)(o.init,[{chart:t,properties:e,options:o}]);if(!0===n)return O(e,o);if((0,r.i)(n))return n}(t,e,o)}function Y(t,e,o){let n=!1;return e.forEach((e=>{(0,r.a7)(t[e])?(n=!0,o[e]=t[e]):(0,r.h)(o[e])&&delete o[e]})),n}function O(t,e){const o=e.type||"line";return w[o](t)}const X=new Map;function I(t){if(t&&"object"===typeof t){const e=t.toString();return"[object HTMLImageElement]"===e||"[object HTMLCanvasElement]"===e}}function W(t,{x:e,y:o},n){n&&(t.translate(e,o),t.rotate((0,r.t)(n)),t.translate(-e,-o))}function R(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle||"butt",t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle||"miter",t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,!0}function _(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY}function E(t,e){const o=e.content;if(I(o)){return{width:S(o.width,e.width),height:S(o.height,e.height)}}const n=T(e),i=e.textStrokeWidth,s=(0,r.b)(o)?o:[o],a=s.join()+(t=>t.reduce((function(t,e){return t+e.string}),""))(n)+i+(t._measureText?"-spriting":"");return X.has(a)||X.set(a,function(t,e,o,n){t.save();const r=e.length;let i=0,s=n;for(let a=0;a<r;a++){const r=o[Math.min(a,o.length-1)];t.font=r.string;const d=e[a];i=Math.max(i,t.measureText(d).width+n),s+=r.lineHeight}return t.restore(),{width:i,height:s}}(t,s,n,i)),X.get(a)}function H(t,e,o){const{x:n,y:i,width:s,height:a}=e;t.save(),_(t,o);const d=R(t,o);t.fillStyle=o.backgroundColor,t.beginPath(),(0,r.aw)(t,{x:n,y:i,w:s,h:a,radius:f((0,r.ay)(o.borderRadius),0,Math.min(s,a)/2)}),t.closePath(),t.fill(),d&&(t.shadowColor=o.borderShadowColor,t.stroke()),t.restore()}function z(t,e,o,n){const i=o.content;if(I(i))return t.save(),t.globalAlpha=function(t,e){const o=(0,r.x)(t)?t:e;return(0,r.x)(o)?h(o,0,1):1}(o.opacity,i.style.opacity),t.drawImage(i,e.x,e.y,e.width,e.height),void t.restore();const s=(0,r.b)(i)?i:[i],a=T(o,n),d=o.color,l=(0,r.b)(d)?d:[d],c=function(t,e){const{x:o,width:n}=t,r=e.textAlign;return"center"===r?o+n/2:"end"===r||"right"===r?o+n:o}(e,o),u=e.y+o.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=o.textAlign,function(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,!0}(t,o)&&function(t,{x:e,y:o},n,r){t.beginPath();let i=0;n.forEach((function(n,s){const a=r[Math.min(s,r.length-1)],d=a.lineHeight;t.font=a.string,t.strokeText(n,e,o+d/2+i),i+=d})),t.stroke()}(t,{x:c,y:u},s,a),function(t,{x:e,y:o},n,{fonts:r,colors:i}){let s=0;n.forEach((function(n,a){const d=i[Math.min(a,i.length-1)],l=r[Math.min(a,r.length-1)],c=l.lineHeight;t.beginPath(),t.font=l.string,t.fillStyle=d,t.fillText(n,e,o+c/2+s),s+=c,t.fill()}))}(t,{x:c,y:u},s,{fonts:a,colors:l}),t.restore()}function N(t,e,o,n){const{radius:i,options:s}=e,a=s.pointStyle,d=s.rotation;let l=(d||0)*r.b4;if(I(a))return t.save(),t.translate(o,n),t.rotate(l),t.drawImage(a,-a.width/2,-a.height/2,a.width,a.height),void t.restore();(t=>isNaN(t)||t<=0)(i)||function(t,{x:e,y:o,radius:n,rotation:i,style:s,rad:a}){let d,l,c,h;switch(t.beginPath(),s){default:t.arc(e,o,n,0,r.T),t.closePath();break;case"triangle":t.moveTo(e+Math.sin(a)*n,o-Math.cos(a)*n),a+=r.b6,t.lineTo(e+Math.sin(a)*n,o-Math.cos(a)*n),a+=r.b6,t.lineTo(e+Math.sin(a)*n,o-Math.cos(a)*n),t.closePath();break;case"rectRounded":h=.516*n,c=n-h,d=Math.cos(a+r.b5)*c,l=Math.sin(a+r.b5)*c,t.arc(e-d,o-l,h,a-r.P,a-r.H),t.arc(e+l,o-d,h,a-r.H,a),t.arc(e+d,o+l,h,a,a+r.H),t.arc(e-l,o+d,h,a+r.H,a+r.P),t.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*n,t.rect(e-c,o-c,2*c,2*c);break}a+=r.b5;case"rectRot":d=Math.cos(a)*n,l=Math.sin(a)*n,t.moveTo(e-d,o-l),t.lineTo(e+l,o-d),t.lineTo(e+d,o+l),t.lineTo(e-l,o+d),t.closePath();break;case"crossRot":a+=r.b5;case"cross":d=Math.cos(a)*n,l=Math.sin(a)*n,t.moveTo(e-d,o-l),t.lineTo(e+d,o+l),t.moveTo(e+l,o-d),t.lineTo(e-l,o+d);break;case"star":d=Math.cos(a)*n,l=Math.sin(a)*n,t.moveTo(e-d,o-l),t.lineTo(e+d,o+l),t.moveTo(e+l,o-d),t.lineTo(e-l,o+d),a+=r.b5,d=Math.cos(a)*n,l=Math.sin(a)*n,t.moveTo(e-d,o-l),t.lineTo(e+d,o+l),t.moveTo(e+l,o-d),t.lineTo(e-l,o+d);break;case"line":d=Math.cos(a)*n,l=Math.sin(a)*n,t.moveTo(e-d,o-l),t.lineTo(e+d,o+l);break;case"dash":t.moveTo(e,o),t.lineTo(e+Math.cos(a)*n,o+Math.sin(a)*n)}t.fill()}(t,{x:o,y:n,radius:i,rotation:d,style:a,rad:l})}const V=["left","bottom","top","right"];function L(t,e){const{pointX:o,pointY:n,options:i}=e,s=i.callout,a=s&&s.display&&function(t,e){const o=e.position;if(V.includes(o))return o;return function(t,e){const{x:o,y:n,x2:i,y2:s,width:a,height:l,pointX:c,pointY:h,centerX:u,centerY:f,rotation:x}=t,y={x:u,y:f},p=e.start,b=S(a,p),g=S(l,p),m=[o,o+b,o+b,i],v=[n+g,s,n,s],w=[];for(let M=0;M<4;M++){const t=d({x:m[M],y:v[M]},y,(0,r.t)(x));w.push({position:V[M],distance:(0,r.aF)(t,{x:c,y:h})})}return w.sort(((t,e)=>t.distance-e.distance))[0].position}(t,e)}(e,s);if(!a||function(t,e,o){const{pointX:n,pointY:r}=t,i=e.margin;let s=n,a=r;"left"===o?s+=i:"right"===o?s-=i:"top"===o?a+=i:"bottom"===o&&(a-=i);return t.inRange(s,a)}(e,s,a))return;t.save(),t.beginPath();if(!R(t,s))return t.restore();const{separatorStart:l,separatorEnd:c}=function(t,e){const{x:o,y:n,x2:r,y2:i}=t,s=function(t,e){const{width:o,height:n,options:r}=t,i=r.callout.margin+r.borderWidth/2;if("right"===e)return o+i;if("bottom"===e)return n+i;return-i}(t,e);let a,d;"left"===e||"right"===e?(a={x:o+s,y:n},d={x:a.x,y:i}):(a={x:o,y:n+s},d={x:r,y:a.y});return{separatorStart:a,separatorEnd:d}}(e,a),{sideStart:h,sideEnd:u}=function(t,e,o){const{y:n,width:r,height:i,options:s}=t,a=s.callout.start,d=function(t,e){const o=e.side;if("left"===t||"top"===t)return-o;return o}(e,s.callout);let l,c;"left"===e||"right"===e?(l={x:o.x,y:n+S(i,a)},c={x:l.x+d,y:l.y}):(l={x:o.x+S(r,a),y:o.y},c={x:l.x,y:l.y+d});return{sideStart:l,sideEnd:c}}(e,a,l);(s.margin>0||0===i.borderWidth)&&(t.moveTo(l.x,l.y),t.lineTo(c.x,c.y)),t.moveTo(h.x,h.y),t.lineTo(u.x,u.y);const f=d({x:o,y:n},e.getCenterPoint(),(0,r.t)(-e.rotation));t.lineTo(f.x,f.y),t.stroke(),t.restore()}const $={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function F(t,e,o){return e="number"===typeof e?e:t.parse(e),(0,r.g)(e)?t.getPixelForValue(e):o}function B(t,e,o){const n=e[o];if(n||"scaleID"===o)return n;const r=o.charAt(0),i=Object.values(t).filter((t=>t.axis&&t.axis===r));return i.length?i[0].id:r}function J(t,e){if(t){const o=t.options.reverse;return{start:F(t,e.min,o?e.end:e.start),end:F(t,e.max,o?e.start:e.end)}}}function q(t,e){const{chartArea:o,scales:n}=t,r=n[B(n,e,"xScaleID")],i=n[B(n,e,"yScaleID")];let s=o.width/2,a=o.height/2;return r&&(s=F(r,e.xValue,r.left+r.width/2)),i&&(a=F(i,e.yValue,i.top+i.height/2)),{x:s,y:a}}function Q(t,e){const o=t.scales,n=o[B(o,e,"xScaleID")],r=o[B(o,e,"yScaleID")];if(!n&&!r)return{};let{left:i,right:s}=n||t.chartArea,{top:a,bottom:d}=r||t.chartArea;const l=Z(n,{min:e.xMin,max:e.xMax,start:i,end:s});i=l.start,s=l.end;const c=Z(r,{min:e.yMin,max:e.yMax,start:d,end:a});return a=c.start,d=c.end,{x:i,y:a,x2:s,y2:d,width:s-i,height:d-a,centerX:i+(s-i)/2,centerY:a+(d-a)/2}}function U(t,e){if(!D(e)){const o=Q(t,e);let n=e.radius;n&&!isNaN(n)||(n=Math.min(o.width,o.height)/2,e.radius=n);const r=2*n,i=o.centerX+e.xAdjust,s=o.centerY+e.yAdjust;return{x:i-n,y:s-n,x2:i+n,y2:s+n,centerX:i,centerY:s,width:r,height:r,radius:n}}return function(t,e){const o=q(t,e),n=2*e.radius;return{x:o.x-e.radius+e.xAdjust,y:o.y-e.radius+e.yAdjust,x2:o.x+e.radius+e.xAdjust,y2:o.y+e.radius+e.yAdjust,centerX:o.x+e.xAdjust,centerY:o.y+e.yAdjust,radius:e.radius,width:n,height:n}}(t,e)}function G(t,e){const{scales:o,chartArea:n}=t,r=o[e.scaleID],i={x:n.left,y:n.top,x2:n.right,y2:n.bottom};return r?function(t,e,o){const n=F(t,o.value,NaN),r=F(t,o.endValue,n);t.isHorizontal()?(e.x=n,e.x2=r):(e.y=n,e.y2=r)}(r,i,e):function(t,e,o){for(const n of Object.keys($)){const r=t[B(t,o,n)];if(r){const{min:t,max:i,start:s,end:a,startProp:d,endProp:l}=$[n],c=J(r,{min:o[t],max:o[i],start:r[s],end:r[a]});e[d]=c.start,e[l]=c.end}}}(o,i,e),i}function K(t,e){const o=Q(t,e);return o.initProperties=j(t,o,e),o.elements=[{type:"label",optionScope:"label",properties:et(t,o,e),initProperties:o.initProperties}],o}function Z(t,e){const o=J(t,e)||e;return{start:Math.min(o.start,o.end),end:Math.max(o.start,o.end)}}function tt(t,e){const{start:o,end:n,borderWidth:r}=t,{position:i,padding:{start:s,end:a},adjust:d}=e;return o+r/2+d+M(n-r-o-s-a-e.size,i)}function et(t,e,o){const n=o.label;n.backgroundColor="transparent",n.callout.display=!1;const i=C(n.position),s=(0,r.E)(n.padding),a=E(t.ctx,n),d=function({properties:t,options:e},o,n,r){const{x:i,x2:s,width:a}=t;return tt({start:i,end:s,size:a,borderWidth:e.borderWidth},{position:n.x,padding:{start:r.left,end:r.right},adjust:e.label.xAdjust,size:o.width})}({properties:e,options:o},a,i,s),l=function({properties:t,options:e},o,n,r){const{y:i,y2:s,height:a}=t;return tt({start:i,end:s,size:a,borderWidth:e.borderWidth},{position:n.y,padding:{start:r.top,end:r.bottom},adjust:e.label.yAdjust,size:o.height})}({properties:e,options:o},a,i,s),c=a.width+s.width,h=a.height+s.height;return{x:d,y:l,x2:d+c,y2:l+h,width:c,height:h,centerX:d+c/2,centerY:l+h/2,rotation:n.rotation}}const ot=["enter","leave"],nt=ot.concat("click");function rt(t,e,o){if(t.listened)switch(e.type){case"mousemove":case"mouseout":return function(t,e,o){if(!t.moveListened)return;let n;n="mousemove"===e.type?s(t.visibleElements,e,o.interaction):[];const r=t.hovered;t.hovered=n;const i={state:t,event:e};let a=it(i,"leave",r,n);return it(i,"enter",n,r)||a}(t,e,o);case"click":return function(t,e,o){const n=t.listeners,r=s(t.visibleElements,e,o.interaction);let i;for(const s of r)i=st(s.options.click||n.click,s,e)||i;return i}(t,e,o)}}function it({state:t,event:e},o,n,r){let i;for(const s of n)r.indexOf(s)<0&&(i=st(s.options[o]||t.listeners[o],s,e)||i);return i}function st(t,e,o){return!0===(0,r.Q)(t,[e.$context,o])}const at=["afterDraw","beforeDraw"];function dt(t,e,o){if(t.hooked){const n=e.options[o]||t.hooks[o];return(0,r.Q)(n,[e.$context])}}function lt(t,e,o){const n=function(t,e,o){const n=e.axis,i=e.id,s=n+"ScaleID",a={min:(0,r.v)(e.min,Number.NEGATIVE_INFINITY),max:(0,r.v)(e.max,Number.POSITIVE_INFINITY)};for(const r of o)r.scaleID===i?ft(r,e,["value","endValue"],a):B(t,r,s)===i&&ft(r,e,[n+"Min",n+"Max",n+"Value"],a);return a}(t.scales,e,o);let i=ct(e,n,"min","suggestedMin");i=ct(e,n,"max","suggestedMax")||i,i&&(0,r.a7)(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function ct(t,e,o,n){if((0,r.g)(e[o])&&!function(t,e,o){return(0,r.h)(t[e])||(0,r.h)(t[o])}(t.options,o,n)){const n=t[o]!==e[o];return t[o]=e[o],n}}function ht(t,e){for(const o of["scaleID","xScaleID","yScaleID"]){const n=B(e,t,o);n&&!e[n]&&ut(t,o)&&console.warn(`No scale found with id '${n}' for annotation '${t.id}'`)}}function ut(t,e){if("scaleID"===e)return!0;const o=e.charAt(0);for(const n of["Min","Max","Value"])if((0,r.h)(t[o+n]))return!0;return!1}function ft(t,e,o,n){for(const i of o){const o=t[i];if((0,r.h)(o)){const t=e.parse(o);n.min=Math.min(n.min,t),n.max=Math.max(n.max,t)}}}class xt extends n.Hg{inRange(t,e,o,n){const{x:i,y:s}=d({x:t,y:e},this.getCenterPoint(n),(0,r.t)(-this.options.rotation));return x({x:i,y:s},this.getProps(["x","y","x2","y2"],n),o,this.options)}getCenterPoint(t){return p(this,t)}draw(t){t.save(),W(t,this.getCenterPoint(),this.options.rotation),H(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return K(t,e)}}xt.id="boxAnnotation",xt.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},xt.defaultRoutes={borderColor:"color",backgroundColor:"color"},xt.descriptors={label:{_fallback:!0}};class yt extends n.Hg{inRange(t,e,o,n){return y({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],n),center:this.getCenterPoint(n)},o,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return p(this,t)}draw(t){const e=this.options;e.display&&e.content&&(!function(t,e){const{_centerX:o,_centerY:n,_radius:r,_startAngle:i,_endAngle:s,_counterclockwise:a,options:d}=e;t.save();const l=R(t,d);t.fillStyle=d.backgroundColor,t.beginPath(),t.arc(o,n,r,i,s,a),t.closePath(),t.fill(),l&&t.stroke();t.restore()}(t,this),t.save(),W(t,this.getCenterPoint(),this.rotation),z(t,this,e,this._fitRatio),t.restore())}resolveElementProperties(t,e){const o=function(t,e){return t.getSortedVisibleDatasetMetas().reduce((function(o,r){const i=r.controller;return i instanceof n.ju&&function(t,e,o){if(!e.autoHide)return!0;for(let n=0;n<o.length;n++)if(!o[n].hidden&&t.getDataVisibility(n))return!0}(t,e,r.data)&&(!o||i.innerRadius<o.controller.innerRadius)&&i.options.circumference>=90?r:o}),void 0)}(t,e);if(!o)return{};const{controllerMeta:i,point:s,radius:a}=function({chartArea:t},e,o){const{left:n,top:i,right:s,bottom:a}=t,{innerRadius:d,offsetX:l,offsetY:c}=o.controller,h=(n+s)/2+l,u=(i+a)/2+c,f={left:Math.max(h-d,n),right:Math.min(h+d,s),top:Math.max(u-d,i),bottom:Math.min(u+d,a)},x={x:(f.left+f.right)/2,y:(f.top+f.bottom)/2},y=e.spacing+e.borderWidth/2,p=d-y,b=x.y>u,g=function(t,e,o,n){const i=Math.pow(o-t,2),s=Math.pow(n,2),a=-2*e,d=Math.pow(e,2)+i-s,l=Math.pow(a,2)-4*d;if(l<=0)return{_startAngle:0,_endAngle:r.T};const c=(-a-Math.sqrt(l))/2,h=(-a+Math.sqrt(l))/2;return{_startAngle:(0,r.D)({x:e,y:o},{x:c,y:t}).angle,_endAngle:(0,r.D)({x:e,y:o},{x:h,y:t}).angle}}(b?i+y:a-y,h,u,p),m={_centerX:h,_centerY:u,_radius:p,_counterclockwise:b,...g};return{controllerMeta:m,point:x,radius:Math.min(d,Math.min(f.right-f.left,f.bottom-f.top)/2)}}(t,e,o);let d=E(t.ctx,e);const l=function({width:t,height:e},o){const n=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return 2*o/n}(d,a);P(e,l)&&(d={width:d.width*l,height:d.height*l});const{position:c,xAdjust:h,yAdjust:u}=e,f=k(s,d,{borderWidth:0,position:c,xAdjust:h,yAdjust:u});return{initProperties:j(t,f,e),...f,...i,rotation:e.rotation,_fitRatio:l}}}yt.id="doughnutLabelAnnotation",yt.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},yt.defaultRoutes={};class pt extends n.Hg{inRange(t,e,o,n){return y({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],n),center:this.getCenterPoint(n)},o,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return p(this,t)}draw(t){const e=this.options,o=!(0,r.h)(this._visible)||this._visible;e.display&&e.content&&o&&(t.save(),W(t,this.getCenterPoint(),this.rotation),L(t,this),H(t,this,e),z(t,function({x:t,y:e,width:o,height:n,options:i}){const s=i.borderWidth/2,a=(0,r.E)(i.padding);return{x:t+a.left+s,y:e+a.top+s,width:o-a.left-a.right-i.borderWidth,height:n-a.top-a.bottom-i.borderWidth}}(this),e),t.restore())}resolveElementProperties(t,e){let o;if(D(e))o=q(t,e);else{const{centerX:n,centerY:r}=Q(t,e);o={x:n,y:r}}const n=(0,r.E)(e.padding),i=k(o,E(t.ctx,e),e,n);return{initProperties:j(t,i,e),pointX:o.x,pointY:o.y,...i,rotation:e.rotation}}}pt.id="labelAnnotation",pt.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},pt.defaultRoutes={borderColor:"color"};const bt=(t,e,o)=>({x:t.x+o*(e.x-t.x),y:t.y+o*(e.y-t.y)}),gt=(t,e,o)=>bt(e,o,Math.abs((t-e.y)/(o.y-e.y))).x,mt=(t,e,o)=>bt(e,o,Math.abs((t-e.x)/(o.x-e.x))).y,vt=t=>t*t,wt=(t,e,o,n)=>(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*o,Mt=(t,e,o,n)=>({x:wt(t.x,e.x,o.x,n),y:wt(t.y,e.y,o.y,n)}),St=(t,e,o,n)=>2*(1-n)*(e-t)+2*n*(o-e),kt=(t,e,o,n)=>-Math.atan2(St(t.x,e.x,o.x,n),St(t.y,e.y,o.y,n))+.5*r.P;class Ct extends n.Hg{inRange(t,e,o,n){const r=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==o&&"y"!==o){const o={mouseX:t,mouseY:e},{path:i,ctx:s}=this;if(i){R(s,this.options),s.lineWidth+=this.options.hitTolerance;const{chart:r}=this.$context,a=t*r.currentDevicePixelRatio,d=e*r.currentDevicePixelRatio,l=s.isPointInStroke(i,a,d)||Dt(this,o,n);return s.restore(),l}return function(t,{mouseX:e,mouseY:o},n=.001,r){const{x:i,y:s,x2:a,y2:d}=t.getProps(["x","y","x2","y2"],r),l=a-i,c=d-s,h=vt(l)+vt(c),u=0===h?-1:((e-i)*l+(o-s)*c)/h;let f,x;u<0?(f=i,x=s):u>1?(f=a,x=d):(f=i+u*l,x=s+u*c);return vt(e-f)+vt(o-x)<=n}(this,o,vt(r),n)||Dt(this,o,n)}return function(t,{mouseX:e,mouseY:o},n,{hitSize:r,useFinalPosition:i}){const s=((t,e,{x:o,y:n,x2:r,y2:i},s)=>"y"===s?{start:Math.min(n,i),end:Math.max(n,i),value:e}:{start:Math.min(o,r),end:Math.max(o,r),value:t})(e,o,t.getProps(["x","y","x2","y2"],i),n);return u(s,r)||Dt(t,{mouseX:e,mouseY:o},i,n)}(this,{mouseX:t,mouseY:e},o,{hitSize:r,useFinalPosition:n})}getCenterPoint(t){return p(this,t)}draw(t){const{x:e,y:o,x2:n,y2:i,cp:s,options:a}=this;if(t.save(),!R(t,a))return t.restore();_(t,a);const d=Math.sqrt(Math.pow(n-e,2)+Math.pow(i-o,2));if(a.curve&&s)return function(t,e,o,n){const{x:i,y:s,x2:a,y2:d,options:l}=e,{startOpts:c,endOpts:h,startAdjust:u,endAdjust:f}=Yt(e),x={x:i,y:s},y={x:a,y:d},p=kt(x,o,y,0),b=kt(x,o,y,1)-r.P,g=Mt(x,o,y,u/n),m=Mt(x,o,y,1-f/n),v=new Path2D;t.beginPath(),v.moveTo(g.x,g.y),v.quadraticCurveTo(o.x,o.y,m.x,m.y),t.shadowColor=l.borderShadowColor,t.stroke(v),e.path=v,e.ctx=t,It(t,g,{angle:p,adjust:u},c),It(t,m,{angle:b,adjust:f},h)}(t,this,s,d),t.restore();const{startOpts:l,endOpts:c,startAdjust:h,endAdjust:u}=Yt(this),f=Math.atan2(i-o,n-e);t.translate(e,o),t.rotate(f),t.beginPath(),t.moveTo(0+h,0),t.lineTo(d-u,0),t.shadowColor=a.borderShadowColor,t.stroke(),Xt(t,0,h,l),Xt(t,d,-u,c),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const o=G(t,e),{x:n,y:i,x2:s,y2:a}=o,l=function({x:t,y:e,x2:o,y2:n},{top:r,right:i,bottom:s,left:a}){return!(t<a&&o<a||t>i&&o>i||e<r&&n<r||e>s&&n>s)}(o,t.chartArea),c=l?function(t,e,o){const{x:n,y:r}=Tt(t,e,o),{x:i,y:s}=Tt(e,t,o);return{x:n,y:r,x2:i,y2:s,width:Math.abs(i-n),height:Math.abs(s-r)}}({x:n,y:i},{x:s,y:a},t.chartArea):{x:n,y:i,x2:s,y2:a,width:Math.abs(s-n),height:Math.abs(a-i)};if(c.centerX=(s+n)/2,c.centerY=(a+i)/2,c.initProperties=j(t,c,e),e.curve){const t={x:c.x,y:c.y},o={x:c.x2,y:c.y2};c.cp=function(t,e,o){const{x:n,y:r,x2:i,y2:s,centerX:a,centerY:l}=t,c=Math.atan2(s-r,i-n),h=C(e.controlPoint,0);return d({x:a+S(o,h.x,!1),y:l+S(o,h.y,!1)},{x:a,y:l},c)}(c,e,(0,r.aF)(t,o))}const h=function(t,e,o){const n=o.borderWidth,i=(0,r.E)(o.padding),s=E(t.ctx,o),a=s.width+i.width+n,d=s.height+i.height+n;return function(t,e,o,n){const{width:i,height:s,padding:a}=o,{xAdjust:d,yAdjust:l}=e,c={x:t.x,y:t.y},h={x:t.x2,y:t.y2},u="auto"===e.rotation?function(t){const{x:e,y:o,x2:n,y2:i}=t,s=Math.atan2(i-o,n-e);return s>r.P/2?s-r.P:s<r.P/-2?s+r.P:s}(t):(0,r.t)(e.rotation),f=function(t,e,o){const n=Math.cos(o),r=Math.sin(o);return{w:Math.abs(t*n)+Math.abs(e*r),h:Math.abs(t*r)+Math.abs(e*n)}}(i,s,u),x=function(t,e,o,n){let r;const i=function(t,e){const{x:o,x2:n,y:r,y2:i}=t,s=Math.min(r,i)-e.top,a=Math.min(o,n)-e.left,d=e.bottom-Math.max(r,i),l=e.right-Math.max(o,n);return{x:Math.min(a,l),y:Math.min(s,d),dx:a<=l?1:-1,dy:s<=d?1:-1}}(t,n);r="start"===e.position?At({w:t.x2-t.x,h:t.y2-t.y},o,e,i):"end"===e.position?1-At({w:t.x-t.x2,h:t.y-t.y2},o,e,i):M(1,e.position);return r}(t,e,{labelSize:f,padding:a},n),y=t.cp?Mt(c,t.cp,h,x):bt(c,h,x),p={size:f.w,min:n.left,max:n.right,padding:a.left},b={size:f.h,min:n.top,max:n.bottom,padding:a.top},g=jt(y.x,p)+d,m=jt(y.y,b)+l;return{x:g-i/2,y:m-s/2,x2:g+i/2,y2:m+s/2,centerX:g,centerY:m,pointX:y.x,pointY:y.y,width:i,height:s,rotation:(0,r.U)(u)}}(e,o,{width:a,height:d,padding:i},t.chartArea)}(t,c,e.label);return h._visible=l,c.elements=[{type:"label",optionScope:"label",properties:h,initProperties:c.initProperties}],c}}Ct.id="lineAnnotation";const Pt={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};function Tt({x:t,y:e},o,{top:n,right:r,bottom:i,left:s}){return t<s&&(e=mt(s,{x:t,y:e},o),t=s),t>r&&(e=mt(r,{x:t,y:e},o),t=r),e<n&&(t=gt(n,{x:t,y:e},o),e=n),e>i&&(t=gt(i,{x:t,y:e},o),e=i),{x:t,y:e}}function Dt(t,{mouseX:e,mouseY:o},n,r){const i=t.label;return i.options.display&&i.inRange(e,o,r,n)}function At(t,e,o,n){const{labelSize:r,padding:i}=e,s=t.w*n.dx,a=t.h*n.dy,d=s>0&&(r.w/2+i.left-n.x)/s,l=a>0&&(r.h/2+i.top-n.y)/a;return h(Math.max(d,l),0,.25)}function jt(t,e){const{size:o,min:n,max:r,padding:i}=e,s=o/2;return o>r-n?(r+n)/2:(n>=t-i-s&&(t=n+i+s),r<=t+i+s&&(t=r-i-s),t)}function Yt(t){const e=t.options,o=e.arrowHeads&&e.arrowHeads.start,n=e.arrowHeads&&e.arrowHeads.end;return{startOpts:o,endOpts:n,startAdjust:Ot(t,o),endAdjust:Ot(t,n)}}function Ot(t,e){if(!e||!e.display)return 0;const{length:o,width:n}=e,r=t.options.borderWidth/2,i={x:o,y:n+r},s={x:0,y:r};return Math.abs(gt(0,i,s))}function Xt(t,e,o,n){if(!n||!n.display)return;const{length:r,width:i,fill:s,backgroundColor:a,borderColor:d}=n,l=Math.abs(e-r)+o;t.beginPath(),_(t,n),R(t,n),t.moveTo(l,-i),t.lineTo(e+o,0),t.lineTo(l,i),!0===s?(t.fillStyle=a||d,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=n.borderShadowColor,t.stroke()}function It(t,{x:e,y:o},{angle:n,adjust:r},i){i&&i.display&&(t.save(),t.translate(e,o),t.rotate(n),Xt(t,0,-r,i),t.restore())}Ct.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Pt),fill:!1,length:12,start:Object.assign({},Pt),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},pt.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ct.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ct.defaultRoutes={borderColor:"color"};class Wt extends n.Hg{inRange(t,e,o,n){const i=this.options.rotation,s=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==o&&"y"!==o)return function(t,e,o,n){const{width:i,height:s,centerX:a,centerY:d}=e,l=i/2,c=s/2;if(l<=0||c<=0)return!1;const h=(0,r.t)(o||0),u=Math.cos(h),f=Math.sin(h),x=Math.pow(u*(t.x-a)+f*(t.y-d),2),y=Math.pow(f*(t.x-a)-u*(t.y-d),2);return x/Math.pow(l+n,2)+y/Math.pow(c+n,2)<=1.0001}({x:t,y:e},this.getProps(["width","height","centerX","centerY"],n),i,s);const{x:a,y:l,x2:h,y2:u}=this.getProps(["x","y","x2","y2"],n),f="y"===o?{start:l,end:u}:{start:a,end:h},x=d({x:t,y:e},this.getCenterPoint(n),(0,r.t)(-i));return x[o]>=f.start-s-c&&x[o]<=f.end+s+c}getCenterPoint(t){return p(this,t)}draw(t){const{width:e,height:o,centerX:n,centerY:i,options:s}=this;t.save(),W(t,this.getCenterPoint(),s.rotation),_(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const a=R(t,s);t.ellipse(n,i,o/2,e/2,r.P/2,0,2*r.P),t.fill(),a&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return K(t,e)}}Wt.id="ellipseAnnotation",Wt.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},xt.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Wt.defaultRoutes={borderColor:"color",backgroundColor:"color"},Wt.descriptors={label:{_fallback:!0}};class Rt extends n.Hg{inRange(t,e,o,n){const{x:r,y:i,x2:s,y2:a,width:d}=this.getProps(["x","y","x2","y2","width"],n),l=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==o&&"y"!==o)return function(t,e,o,n){return!(!t||!e||o<=0)&&Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(o+n,2)}({x:t,y:e},this.getCenterPoint(n),d/2,l);return u("y"===o?{start:i,end:a,value:e}:{start:r,end:s,value:t},l)}getCenterPoint(t){return p(this,t)}draw(t){const e=this.options,o=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,_(t,e);const n=R(t,e);N(t,this,this.centerX,this.centerY),n&&!I(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=o}resolveElementProperties(t,e){const o=U(t,e);return o.initProperties=j(t,o,e),o}}Rt.id="pointAnnotation",Rt.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Rt.defaultRoutes={borderColor:"color",backgroundColor:"color"};class _t extends n.Hg{inRange(t,e,o,n){if("x"!==o&&"y"!==o)return this.options.radius>=.1&&this.elements.length>1&&function(t,e,o,n){let r=!1,i=t[t.length-1].getProps(["bX","bY"],n);for(const s of t){const t=s.getProps(["bX","bY"],n);t.bY>o!==i.bY>o&&e<(i.bX-t.bX)*(o-t.bY)/(i.bY-t.bY)+t.bX&&(r=!r),i=t}return r}(this.elements,t,e,n);const i=d({x:t,y:e},this.getCenterPoint(n),(0,r.t)(-this.options.rotation)),s=this.elements.map((t=>"y"===o?t.bY:t.bX)),a=Math.min(...s),l=Math.max(...s);return i[o]>=a&&i[o]<=l}getCenterPoint(t){return p(this,t)}draw(t){const{elements:e,options:o}=this;t.save(),t.beginPath(),t.fillStyle=o.backgroundColor,_(t,o);const n=R(t,o);let r=!0;for(const i of e)r?(t.moveTo(i.x,i.y),r=!1):t.lineTo(i.x,i.y);t.closePath(),t.fill(),n&&(t.shadowColor=o.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const o=U(t,e),{sides:n,rotation:i}=e,s=[],a=2*r.P/n;let d=i*r.b4;for(let r=0;r<n;r++,d+=a){const n=Et(o,e,d);n.initProperties=j(t,o,e),s.push(n)}return o.elements=s,o}}function Et({centerX:t,centerY:e},{radius:o,borderWidth:n,hitTolerance:r},i){const s=(n+r)/2,a=Math.sin(i),d=Math.cos(i),l={x:t+a*o,y:e-d*o};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:t+a*(o+s),bY:e-d*(o+s)}}}_t.id="polygonAnnotation",_t.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},_t.defaultRoutes={borderColor:"color",backgroundColor:"color"};const Ht={box:xt,doughnutLabel:yt,ellipse:Wt,label:pt,line:Ct,point:Rt,polygon:_t};Object.keys(Ht).forEach((t=>{r.d.describe(`elements.${Ht[t].id}`,{_fallback:"plugins.annotation.common"})}));const zt={update:Object.assign},Nt=nt.concat(at),Vt=(t,e)=>(0,r.i)(e)?Ut(t,e):t,Lt=t=>"color"===t||"font"===t;function $t(t="line"){return Ht[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function Ft(t,e,o,i){const s=function(t,e,o){if("reset"===o||"none"===o||"resize"===o)return zt;return new n.Qw(t,e)}(t,o.animations,i),a=e.annotations,d=function(t,e){const o=e.length,n=t.length;if(n<o){const e=o-n;t.splice(n,0,...new Array(e))}else n>o&&t.splice(o,n-o);return t}(e.elements,a);for(let n=0;n<a.length;n++){const e=a[n],o=qt(d,n,e.type),i=e.setContext(Gt(t,o,d,e)),l=o.resolveElementProperties(t,i);l.skip=Bt(l),"elements"in l&&(Jt(o,l.elements,i,s),delete l.elements),(0,r.h)(o.x)||Object.assign(o,l),Object.assign(o,l.initProperties),l.options=Qt(i),s.update(o,l)}}function Bt(t){return isNaN(t.x)||isNaN(t.y)}function Jt(t,e,o,n){const r=t.elements||(t.elements=[]);r.length=e.length;for(let i=0;i<e.length;i++){const t=e[i],s=t.properties,a=qt(r,i,t.type,t.initProperties),d=o[t.optionScope].override(t);s.options=Qt(d),n.update(a,s)}}function qt(t,e,o,n){const r=Ht[$t(o)];let i=t[e];return i&&i instanceof r||(i=t[e]=new r,Object.assign(i,n)),i}function Qt(t){const e=Ht[$t(t.type)],o={};o.id=t.id,o.type=t.type,o.drawTime=t.drawTime,Object.assign(o,Ut(t,e.defaults),Ut(t,e.defaultRoutes));for(const n of Nt)o[n]=t[n];return o}function Ut(t,e){const o={};for(const n of Object.keys(e)){const i=e[n],s=t[n];Lt(n)&&(0,r.b)(s)?o[n]=s.map((t=>Vt(t,i))):o[n]=Vt(s,i)}return o}function Gt(t,e,o,n){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,get elements(){return o.filter((t=>t&&t.options))},id:n.id,type:"annotation"}))}const Kt=new Map,Zt=t=>"doughnutLabel"!==t.type,te=nt.concat(at);var ee={id:"annotation",version:"3.1.0",beforeRegister(){!function(t,e,o,n=!0){const r=o.split(".");let i=0;for(const s of e.split(".")){const a=r[i++];if(parseInt(s,10)<parseInt(a,10))break;if(l(a,s)){if(n)throw new Error(`${t} v${o} is not supported. v${e} or newer is required.`);return!1}}}("chart.js","4.0",n.t1.version)},afterRegister(){n.t1.register(Ht)},afterUnregister(){n.t1.unregister(Ht)},beforeInit(t){Kt.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(t,e,o){const n=Kt.get(t).annotations=[];let i=o.annotations;(0,r.i)(i)?Object.keys(i).forEach((t=>{const e=i[t];(0,r.i)(e)&&(e.id=t,n.push(e))})):(0,r.b)(i)&&n.push(...i),function(t,e){for(const o of t)ht(o,e)}(n.filter(Zt),t.scales)},afterDataLimits(t,e){const o=Kt.get(t);lt(t,e.scale,o.annotations.filter(Zt).filter((t=>t.display&&t.adjustScaleRange)))},afterUpdate(t,e,o){const n=Kt.get(t);!function(t,e,o){e.listened=Y(o,nt,e.listeners),e.moveListened=!1,ot.forEach((t=>{(0,r.a7)(o[t])&&(e.moveListened=!0)})),e.listened&&e.moveListened||e.annotations.forEach((t=>{!e.listened&&(0,r.a7)(t.click)&&(e.listened=!0),e.moveListened||ot.forEach((o=>{(0,r.a7)(t[o])&&(e.listened=!0,e.moveListened=!0)}))}))}(0,n,o),Ft(t,n,o,e.mode),n.visibleElements=n.elements.filter((t=>!t.skip&&t.options.display)),function(t,e,o){const n=e.visibleElements;e.hooked=Y(o,at,e.hooks),e.hooked||n.forEach((t=>{e.hooked||at.forEach((o=>{(0,r.a7)(t.options[o])&&(e.hooked=!0)}))}))}(0,n,o)},beforeDatasetsDraw(t,e,o){oe(t,"beforeDatasetsDraw",o.clip)},afterDatasetsDraw(t,e,o){oe(t,"afterDatasetsDraw",o.clip)},beforeDatasetDraw(t,e,o){oe(t,e.index,o.clip)},beforeDraw(t,e,o){oe(t,"beforeDraw",o.clip)},afterDraw(t,e,o){oe(t,"afterDraw",o.clip)},beforeEvent(t,e,o){rt(Kt.get(t),e.event,o)&&(e.changed=!0)},afterDestroy(t){Kt.delete(t)},getAnnotations(t){const e=Kt.get(t);return e?e.elements:[]},_getAnnotationElementsAtEventForMode:(t,e,o)=>s(t,e,o),defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:t=>!te.includes(t)&&"init"!==t,annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${Ht[$t(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Lt,_fallback:!0},_indexable:Lt}},additionalOptionScopes:[""]};function oe(t,e,o){const{ctx:n,chartArea:i}=t,s=Kt.get(t);o&&(0,r.Y)(n,i);const a=function(t,e){const o=[];for(const n of t)if(n.options.drawTime===e&&o.push({element:n,main:!0}),n.elements&&n.elements.length)for(const t of n.elements)t.options.display&&t.options.drawTime===e&&o.push({element:t});return o}(s.visibleElements,e).sort(((t,e)=>t.element.options.z-e.element.options.z));for(const r of a)ne(n,i,s,r);o&&(0,r.$)(n)}function ne(t,e,o,n){const r=n.element;n.main?(dt(o,r,"beforeDraw"),r.draw(t,e),dt(o,r,"afterDraw")):r.draw(t,e)}}}]);