1var ca=Object.defineProperty;var ha=(i,t,e)=>t in i?ca(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var E=(i,t,e)=>(ha(i,typeof t!="symbol"?t+"":t,e),e);import{y as f,M as da,N as ua,L as Ut,A as gi,l as fa,m as ga,n as pa,r as dt,H as ma,O as $,Q as Js,h as ba,w as _a,R as to,i as xa,B as eo}from"./main-CmF2wOyp.js";import{D as ya,A as va}from"./article-C41PvtUu.js";import{L as ka,H as io,a as wa,R as Sa}from"./property-CmWt_dR_.js";import{S as we,R as Ma,A as Ea,C as Ca}from"./custom-structured-text-renderer-JxkE0AFk.js";import{H as oi}from"./index-CptfD2in.js";import{u as Pa,G as Da}from"./use-google-maps-n8356c5q.js";import{u as Aa}from"./use-agent-query-Cmg5dg2l.js";import"./debug-pill-CqFUSD25.js";const no=({onRenderItem:i,onRenderGridRow:t,maxItemsInRow:e,firstMaxItemsInRow:n,onRenderGrid:s})=>{const o=f.useContext(da),r=f.useRef(null),a=n||e,{inView:l,ref:c}=ua();f.useEffect(()=>{l&&o.hasNext&&!o.loadingPage&&o.pageNext()},[l]);const h=o.nodes.map((u,g)=>({measureElement:()=>{},index:g,key:g}));return f.createElement("div",null,f.createElement("div",{ref:r},f.createElement("div",{style:{width:"100%",position:"relative",opacity:o.loadingState?.5:1}},f.createElement("div",{style:{top:0,left:0,width:"100%"}},s({currentArgs:o.currentArgs,children:f.createElement(f.Fragment,null,h.map(u=>u.index===0?f.createElement("div",{key:u.key,"data-index":u.index,ref:u.measureElement},t({index:u.index,currentArgs:o.currentArgs,children:[...new Array(a)].map((g,d)=>{if(o.nodes[d])return i({currentArgs:o.currentArgs,item:o.nodes[d],index:d})}).filter(g=>!!g)})):f.createElement("div",{key:u.key,"data-index":u.index,ref:u.measureElement},t({index:u.index,currentArgs:o.currentArgs,children:[...new Array(e)].map((g,d)=>{const p=a+(u.index-1)*e+d;if(o.nodes[p])return i({item:o.nodes[p],index:p,currentArgs:o.currentArgs})}).filter(g=>!!g)}))))}),f.createElement("div",{ref:c})))))},Ta={width:"100%",height:"400px"},Oa=({suburb:i})=>{const{isLoaded:t}=Pa(),[e,n]=f.useState(null),[s,o]=f.useState(null),r=f.useCallback(function(c){const h={query:`${i}, VIC, AUS`,fields:["name","geometry"]};new window.google.maps.places.PlacesService(c).textSearch(h,(g,d)=>{if(d===window.google.maps.places.PlacesServiceStatus.OK&&g.length){const p=g[0];c.setCenter(p.geometry.location),o(p.geometry.location);let m=c.getFeatureLayer("LOCALITY");const b={strokeColor:"#4A5880",strokeOpacity:1,strokeWeight:3,fillColor:"#B0B9CF",fillOpacity:.4};m.style=_=>{if(_.feature.placeId==p.place_id)return b}}else console.log("No results")})},[i]),a=f.useCallback(function(c){n(null)},[]);return t?f.createElement(Da,{mapContainerStyle:Ta,zoom:13,options:{mapId:"1cc599846998ebaa",mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},onLoad:r,onUnmount:a}):f.createElement(f.Fragment,null)},La=i=>f.createElement(Ut,{className:"card card--property-suburb",to:i.permalink},f.createElement("div",{className:"card__left"},f.createElement("div",{className:"card__image"},f.createElement(gi,{asset:i.thumbnail})),f.createElement("div",{className:"card__stats"},i.address&&f.createElement("h4",null,i.address.replace(", VIC","").replace(", "+i.addressComponents[0].postCode,"")),f.createElement("ul",null,i.beds>0&&f.createElement("li",null,f.createElement(fa,null),i.beds),i.baths>0&&f.createElement("li",null,f.createElement(ga,null),i.baths),i.allCarSpaces>0&&f.createElement("li",null,f.createElement(pa,null),i.allCarSpaces),i.landArea&&f.createElement("li",null,f.createElement(ka,{landArea:i.landArea}))))),f.createElement("div",{className:"card__right"},f.createElement("div",{className:"card__price"},f.createElement("p",null,f.createElement("strong",null,"Sold Price")),i.price&&i.price.includes("Sold for")&&f.createElement("p",null,parseFloat(i.price.replace(/[^0-9.]/g,"")).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0})),i.price&&i.price.includes("Contact Agent")&&f.createElement("p",null,"Contact Agent")),f.createElement("div",{className:"card__price"},f.createElement("p",null,f.createElement("strong",null,"Date Sold")),f.createElement("p",null,i.soldDate))));/*! 2 * @kurkle/color v0.3.2 3 * https://github.com/kurkle/color#readme 4 * (c) 2023 Jukka Kurkela 5 * Released under the MIT License 6 */function xe(i){return i+.5|0}const St=(i,t,e)=>Math.max(Math.min(i,e),t);function oe(i){return St(xe(i*2.55),0,255)}
vendor: 6,443 bytes, line 6
6function Ct(i){return St(xe(i*255),0,255)}function xt(i){return St(xe(i/2.55)/100,0,1)}function so(i){return St(xe(i*100),0,100)}const ot={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},pi=[..."0123456789ABCDEF"],Ra=i=>pi[i&15],Fa=i=>pi[(i&240)>>4]+pi[i&15],Se=i=>(i&240)>>4===(i&15),Ia=i=>Se(i.r)&&Se(i.g)&&Se(i.b)&&Se(i.a);function Na(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&ot[i[1]]*17,g:255&ot[i[2]]*17,b:255&ot[i[3]]*17,a:t===5?ot[i[4]]*17:255}:(t===7||t===9)&&(e={r:ot[i[1]]<<4|ot[i[2]],g:ot[i[3]]<<4|ot[i[4]],b:ot[i[5]]<<4|ot[i[6]],a:t===9?ot[i[7]]<<4|ot[i[8]]:255})),e}const za=(i,t)=>i<255?t(i):"";function Ba(i){var t=Ia(i)?Ra:Fa;return i?"#"+t(i.r)+t(i.g)+t(i.b)+za(i.a,t):void 0}const Ha=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function kr(i,t,e){const n=t*Math.min(e,1-e),s=(o,r=(o+i/30)%12)=>e-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Wa(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Va(i,t,e){const n=kr(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function ja(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Ei(i){const e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),r=Math.min(e,n,s),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=ja(e,n,s,h,o),l=l*60+.5),[l|0,c||0,a]}function Ci(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Ct)}function Pi(i,t,e){return Ci(kr,i,t,e)}function $a(i,t,e){return Ci(Va,i,t,e)}function Ua(i,t,e){return Ci(Wa,i,t,e)}function wr(i){return(i%360+360)%360}function Ya(i){const t=Ha.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?oe(+t[5]):Ct(+t[5]));const s=wr(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=$a(s,o,r):t[1]==="hsv"?n=Ua(s,o,r):n=Pi(s,o,r),{r:n[0],g:n[1],b:n[2],a:e}}function Xa(i,t){var e=Ei(i);e[0]=wr(e[0]+t),e=Pi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Ka(i){if(!i)return;const t=Ei(i),e=t[0],n=so(t[1]),s=so(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${xt(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const oo={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ro={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function qa(){const i={},t=Object.keys(ro),e=Object.keys(oo);let n,s,o,r,a;for(n=0;n<t.length;n++){for(r=a=t[n],s=0;s<e.length;s++)o=e[s],a=a.replace(o,oo[o]);o=parseInt(ro[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}let Me;function Ga(i){Me||(Me=qa(),Me.transparent=[0,0,0,0]);const t=Me[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Qa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Za(i){const t=Qa.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const r=+t[7];e=t[8]?oe(r):St(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?oe(n):St(n,0,255)),s=255&(t[4]?oe(s):St(s,0,255)),o=255&(t[6]?oe(o):St(o,0,255)),{r:n,g:s,b:o,a:e}}}function Ja(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${xt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const ri=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Vt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function tl(i,t,e){const n=Vt(xt(i.r)),s=Vt(xt(i.g)),o=Vt(xt(i.b));return{r:Ct(ri(n+e*(Vt(xt(t.r))-n))),g:Ct(ri(s+e*(Vt(xt(t.g))-s))),b:Ct(ri(o+e*(Vt(xt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ee(i,t,e){if(i){let n=Ei(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Pi(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Sr(i,t){return i&&Object.assign(t||{},i)}function ao(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Ct(i[3]))):(t=Sr(i,{r:0,g:0,b:0,a:1}),t.a=Ct(t.a)),t}function el(i){return i.charAt(0)==="r"?Za(i):Ya(i)}class ge{constructor(t){if(t instanceof ge)return t;const e=typeof t;let n;e==="object"?n=ao(t):e==="string"&&(n=Na(t)||Ga(t)||el(t)),this._rgb=n,this._val
vendor: 50,287 bytes, lines 6-16
6id=!!n}get valid(){return this._valid}get rgb(){var t=Sr(this._rgb);return t&&(t.a=xt(t.a)),t}set rgb(t){this._rgb=ao(t)}rgbString(){return this._valid?Ja(this._rgb):void 0}hexString(){return this._valid?Ba(this._rgb):void 0}hslString(){return this._valid?Ka(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=tl(this._rgb,t._rgb,e)),this}clone(){return new ge(this.rgb)}alpha(t){return this._rgb.a=Ct(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=xe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ee(this._rgb,2,t),this}darken(t){return Ee(this._rgb,2,-t),this}saturate(t){return Ee(this._rgb,1,t),this}desaturate(t){return Ee(this._rgb,1,-t),this}rotate(t){return Xa(this._rgb,t),this}}/*! 7 * Chart.js v4.4.3 8 * https://www.chartjs.org 9 * (c) 2024 Chart.js Contributors 10 * Released under the MIT License 11 */function mt(){}const il=(()=>{let i=0;return()=>i++})();function z(i){return i===null||typeof i>"u"}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function R(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function G(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function st(i,t){return G(i)?i:t}function O(i,t){return typeof i>"u"?t:i}const nl=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function N(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function F(i,t,e,n){let s,o,r;if(H(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(R(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)t.call(e,i[r[s]],r[s])}function $e(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Ue(i){if(H(i))return i.map(Ue);if(R(i)){const t=Object.create(null),e=Object.keys(i),n=e.length;let s=0;for(;s<n;++s)t[e[s]]=Ue(i[e[s]]);return t}return i}function Mr(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function sl(i,t,e,n){if(!Mr(i))return;const s=t[i],o=e[i];R(s)&&R(o)?pe(s,o,n):t[i]=Ue(o)}function pe(i,t,e){const n=H(t)?t:[t],s=n.length;if(!R(i))return i;e=e||{};const o=e.merger||sl;let r;for(let a=0;a<s;++a){if(r=n[a],!R(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function ce(i,t){return pe(i,t,{merger:ol})}function ol(i,t,e){if(!Mr(i))return;const n=t[i],s=e[i];R(n)&&R(s)?ce(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=Ue(s))}const lo={"":i=>i,x:i=>i.x,y:i=>i.y};function rl(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function al(i){const t=rl(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Ye(i,t){return(lo[t]||(lo[t]=al(t)))(i)}function Di(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Xe=i=>typeof i<"u",Pt=i=>typeof i=="function",co=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function ll(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const V=Math.PI,q=2*V,cl=q+V,Ke=Number.POSITIVE_INFINITY,hl=V/180,X=V/2,Tt=V/4,ho=V*2/3,Mt=Math.log10,Gt=Math.sign;function he(i,t,e){return Math.abs(i-t)<e}function uo(i){const t=Math.round(i);i=he(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Mt(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function dl(i){const t=[],e=Math.sqrt(i);let n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function me(i){return!isNaN(parseFloat(i))&&isFinite(i)}function ul(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Er(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Et(i){return i*(V/180)}function Ai(i){return i*(180/V)}function fo(i){if(!G(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Cr(i,t){const e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);let o=Math.atan2(n,e);return o<-.5*V&&(o+=q),{angle:o,distance:s}}function mi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function fl(i,t){return(i-t+cl)%q-V}function at(i){return(i%q+q)%q}function Ti(i,t,e,n){const s=at(i),o=at(t),r=at(e),a=at(o-s),l=at(r-s),c=at(s-o),h=at(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function tt(i,t,e){return Math.max(t,Math.min(e,i))}function gl(i){return tt(i,-32768,32767)}function Yt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Oi(i,t,e){e=e||(r=>i[r]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const Nt=(i,t,e,n)=>Oi(i,e,n?s=>{const o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),pl=(i,t,e)=>Oi(i,e,n=>i[n][t]>=e);function ml(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}const Pr=["push","pop","shift","splice","unshift"];function bl(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Pr.forEach(e=>{const n="_onData"+Di(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function go(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Pr.forEach(o=>{delete i[o]}),delete i._chartjs)}function _l(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Dr=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Ar(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,Dr.call(window,()=>{n=!1,i.apply(t,e)}))}}function xl(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Li=i=>i==="start"?"left":i==="end"?"right":"center",Z=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,yl=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function vl(i,t,e){const n=t.length;let s=0,o=n;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:u,maxDefined:g}=r.getUserBounds();u&&(s=tt(Math.min(Nt(a,l,c).lo,e?n:Nt(t,l,r.getPixelForValue(c)).lo),0,n-1)),g?o=tt(Math.max(Nt(a,r.axis,h,!0).hi+1,e?0:Nt(t,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function kl(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}const Ce=i=>i===0||i===1,po=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*q/e)),mo=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*q/e)+1,de={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*X)+1,easeOutSine:i=>Math.sin(i*X),easeInOutSine:i=>-.5*(Math.cos(V*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Ce(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Ce(i)?i:po(i,.075,.3),easeOutElastic:i=>Ce(i)?i:mo(i,.075,.3),easeInOutElastic(i){return Ce(i)?i:i<.5?.5*po(i*2,.1125,.45):.5+.5*mo(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-de.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?de.easeInBounce(i*2)*.5:de.easeOutBounce(i*2-1)*.5+.5};function Ri(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function bo(i){return Ri(i)?i:new ge(i)}function ai(i){return Ri(i)?i:new ge(i).saturate(.5).darken(.1).hexString()}const wl=["x","y","borderWidth","radius","tension"],Sl=["color","borderColor","backgroundColor"];function Ml(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Sl},numbers:{type:"number",properties:wl}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function El(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _o=new Map;function Cl(i,t){t=t||{};const e=i+JSON.stringify(t);let n=_o.get(e);return n||(n=new Intl.NumberFormat(i,t),_o.set(e,n)),n}function Fi(i,t,e){return Cl(t,e).format(i)}const Tr={values(i){return H(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Pl(i,e)}const r=Mt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Fi(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(Mt(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?Tr.numeric.call(this,i,t,e):""}};function Pl(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var ii={formatters:Tr};function Dl(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ii.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Bt=Object.create(null),bi=Object.create(null);function ue(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;n<s;++n){const o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function li(i,t,e){return typeof t=="string"?pe(ue(i,t),e):pe(ue(i,""),t)}class Al{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>ai(s.backgroundColor),this.hoverBorderColor=(n,s)=>ai(s.borderColor),this.hoverColor=(n,s)=>ai(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return li(this,t,e)}get(t){return ue(this,t)}describe(t,e){return li(bi,t,e)}override(t,e){return li(Bt,t,e)}route(t,e,n,s){const o=ue(this,t),r=ue(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[s];return R(l)?Object.assign({},c,l):O(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var W=new Al({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ml,El,Dl]);function Tl(i){return!i||z(i.size)||z(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function qe(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function Ol(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,u,g;for(l=0;l<a;l++)if(u=e[l],u!=null&&!H(u))r=qe(i,s,o,r,u);else if(H(u))for(c=0,h=u.length;c<h;c++)g=u[c],g!=null&&!H(g)&&(r=qe(i,s,o,r,g));i.restore();const d=o.length/2;if(d>e.length){for(l=0;l<d;l++)delete s[o[l]];o.splice(0,d)}return r}function Ot(i,t,e){const n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function xo(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function _i(i,t,e,n){Or(i,t,e,n,null)}function Or(i,t,e,n,s){let o,r,a,l,c,h,u,g;const d=t.pointStyle,p=t.rotation,m=t.radius;let b=(p||0)*hl;if(d&&typeof d=="object"&&(o=d.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(b),i.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),i.restore();return}if(!(isNaN(m)||m<=0)){switch(i.beginPath(),d){default:s?i.ellipse(e,n,s/2,m,0,0,q):i.arc(e,n,m,0,q),i.closePath();break;case"triangle":h=s?s/2:m,i.moveTo(e+Math.sin(b)*h,n-Math.cos(b)*m),b+=ho,i.lineTo(e+Math.sin(b)*h,n-Math.cos(b)*m),b+=ho,i.lineTo(e+Math.sin(b)*h,n-Math.cos(b)*m),i.closePath();break;case"rectRounded":c=m*.516,l=m-c,r=Math.cos(b+Tt)*l,u=Math.cos(b+Tt)*(s?s/2-c:l),a=Math.sin(b+Tt)*l,g=Math.sin(b+Tt)*(s?s/2-c:l),i.arc(e-u,n-a,c,b-V,b-X),i.arc(e+g,n-r,c,b-X,b),i.arc(e+u,n+a,c,b,b+X),i.arc(e-g,n+r,c,b+X,b+V),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,h=s?s/2:l,i.rect(e-h,n-l,2*h,2*l);break}b+=Tt;case"rectRot":u=Math.cos(b)*(s?s/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,g=Math.sin(b)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+g,n-r),i.lineTo(e+u,n+a),i.lineTo(e-g,n+r),i.closePath();break;case"crossRot":b+=Tt;case"cross":u=Math.cos(b)*(s?s/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,g=Math.sin(b)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+g,n-r),i.lineTo(e-g,n+r);break;case"star":u=Math.cos(b)*(s?s/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,g=Math.sin(b)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+g,n-r),i.lineTo(e-g,n+r),b+=Tt,u=Math.cos(b)*(s?s/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,g=Math.sin(b)*(s?s/2:m),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+g,n-r),i.lineTo(e-g,n+r);break;case"line":r=s?s/2:Math.cos(b)*m,a=Math.sin(b)*m,i.moveTo(e-r,n-a),i.lineTo(e+r,n+a);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(b)*(s?s/2:m),n+Math.sin(b)*m);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function yt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Ii(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Ni(i){i.restore()}function Ll(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Rl(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function Fl(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),z(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Il(i,t,e,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function Nl(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Ht(i,t,e,n,s,o={}){const r=H(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,Fl(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Nl(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),z(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),Il(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function Ge(i,t){const{x:e,y:n,w:s,h:o,radius:r}=t;i.arc(e+r.topLeft,n+r.topLeft,r.topLeft,1.5*V,V,!0),i.lineTo(e,n+o-r.bottomLeft),i.arc(e+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,V,X,!0),i.lineTo(e+s-r.bottomRight,n+o),i.arc(e+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,X,0,!0),i.lineTo(e+s,n+r.topRight),i.arc(e+s-r.topRight,n+r.topRight,r.topRight,0,-X,!0),i.lineTo(e+r.topLeft,n)}const zl=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Bl=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Hl(i,t){const e=(""+i).match(zl);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Wl=i=>+i||0;function zi(i,t){const e={},n=R(t),s=n?Object.keys(t):t,o=R(i)?n?r=>O(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of s)e[r]=Wl(o(r));return e}function Vl(i){return zi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Kt(i){return zi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function J(i){const t=Vl(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function K(i,t){i=i||{},t=t||W.font;let e=O(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=O(i.style,t.style);n&&!(""+n).match(Bl)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:O(i.family,t.family),lineHeight:Hl(O(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:O(i.weight,t.weight),string:""};return s.string=Tl(s),s}function Pe(i,t,e,n){let s=!0,o,r,a;for(o=0,r=i.length;o<r;++o)if(a=i[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),s=!1),e!==void 0&&H(a)&&(a=a[e%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function jl(i,t,e){const{min:n,max:s}=i,o=nl(t,(s-n)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Dt(i,t){return Object.assign(Object.create(i),t)}function Bi(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=Ir("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Bi([a,...i],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Rr(a,l,()=>Ql(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return vo(a).includes(l)},ownKeys(a){return vo(a)},set(a,l,c){const h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function Qt(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lr(i,n),setContext:o=>Qt(i,o,e,n),override:o=>Qt(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Rr(o,r,()=>Ul(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Lr(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Pt(e)?e:()=>e,isIndexable:Pt(n)?n:()=>n}}const $l=(i,t)=>i?i+Di(t):t,Hi=(i,t)=>R(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Rr(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const n=e();return i[t]=n,n}function Ul(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i;let a=n[t];return Pt(a)&&r.isScriptable(t)&&(a=Yl(t,a,i,e)),H(a)&&a.length&&(a=Xl(t,a,i,r.isIndexable)),Hi(t,a)&&(a=Qt(a,s,o&&o[t],r)),a}function Yl(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||n);return a.delete(i),Hi(i,l)&&(l=Wi(s._scopes,s,i,l)),l}function Xl(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(R(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=Wi(c,s,i,h);t.push(Qt(u,o,r&&r[i],a))}}return t}function Fr(i,t,e){return Pt(i)?i(t,e):i}const Kl=(i,t)=>i===!0?t:typeof i=="string"?Ye(t,i):void 0;function ql(i,t,e,n,s){for(const o of t){const r=Kl(e,o);if(r){i.add(r);const a=Fr(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(r===!1&&typeof n<"u"&&e!==n)return null}return!1}function Wi(i,t,e,n){const s=t._rootScopes,o=Fr(t._fallback,e,n),r=[...i,...s],a=new Set;a.add(n);let l=yo(a,r,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=yo(a,r,o,l,n),l===null)?!1:Bi(Array.from(a),[""],s,o,()=>Gl(t,e,n))}function yo(i,t,e,n,s){for(;e;)e=ql(i,t,e,n,s);return e}function Gl(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return H(s)&&R(e)?e:s||{}}function Ql(i,t,e,n){let s;for(const o of t)if(s=Ir($l(o,i),e),typeof s<"u")return Hi(i,s)?Wi(e,n,i,s):s}function Ir(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function vo(i){let t=i._keys;return t||(t=i._keys=Zl(i._scopes)),t}function Zl(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}const Jl=Number.EPSILON||1e-14,Zt=(i,t)=>t<i.length&&!i[t].skip&&i[t],Nr=i=>i==="x"?"y":"x";function tc(i,t,e,n){const s=i.skip?t:i,o=t,r=e.skip?t:e,a=mi(o,s),l=mi(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,g=n*h;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+g*(r.x-s.x),y:o.y+g*(r.y-s.y)}}}function ec(i,t,e){const n=i.length;let s,o,r,a,l,c=Zt(i,0);for(let h=0;h<n-1;++h)if(l=c,c=Zt(i,h+1),!(!l||!c)){if(he(t[h],0,Jl)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=s*r*t[h],e[h+1]=o*r*t[h])}}function ic(i,t,e="x"){const n=Nr(e),s=i.length;let o,r,a,l=Zt(i,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Zt(i,c+1),!a)continue;const h=a[e],u=a[n];r&&(o=(h-r[e])/3,a[`cp1${e}`]=h-o,a[`cp1${n}`]=u-o*t[c]),l&&(o=(l[e]-h)/3,a[`cp2${e}`]=h+o,a[`cp2${n}`]=u+o*t[c])}}function nc(i,t="x"){const e=Nr(t),n=i.length,s=Array(n).fill(0),o=Array(n);let r,a,l,c=Zt(i,0);for(r=0;r<n;++r)if(a=l,l=c,c=Zt(i,r+1),!!l){if(c){const h=c[t]-l[t];s[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?Gt(s[r-1])!==Gt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}ec(i,s,o),ic(i,o,t)}function De(i,t,e){return Math.max(Math.min(i,e),t)}function sc(i,t){let e,n,s,o,r,a=yt(i[0],t);for(e=0,n=i.length;e<n;++e)r=o,o=a,a=e<n-1&&yt(i[e+1],t),o&&(s=i[e],r&&(s.cp1x=De(s.cp1x,t.left,t.right),s.cp1y=De(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=De(s.cp2x,t.left,t.right),s.cp2y=De(s.cp2y,t.top,t.bottom)))}function oc(i,t,e,n,s){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")nc(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=tc(c,a,i[Math.min(o+1,r-(n?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&sc(i,e)}function Vi(){return typeof window<"u"&&typeof document<"u"}function ji(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Qe(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}const ni=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function rc(i,t){return ni(i).getPropertyValue(t)}const ac=["top","right","bottom","left"];function zt(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=ac[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const lc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function cc(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let r=!1,a,l;if(lc(s,o,i.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Ft(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=ni(e),o=s.boxSizing==="border-box",r=zt(s,"padding"),a=zt(s,"border","width"),{x:l,y:c,box:h}=cc(i,e),u=r.left+(h&&a.left),g=r.top+(h&&a.top);let{width:d,height:p}=t;return o&&(d-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-u)/d*e.width/n),y:Math.round((c-g)/p*e.height/n)}}function hc(i,t,e){let n,s;if(t===void 0||e===void 0){const o=i&&ji(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=ni(o),l=zt(a,"border","width"),c=zt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,n=Qe(a.maxWidth,o,"clientWidth"),s=Qe(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Ke,maxHeight:s||Ke}}const Ae=i=>Math.round(i*10)/10;function dc(i,t,e,n){const s=ni(i),o=zt(s,"margin"),r=Qe(s.maxWidth,i,"clientWidth")||Ke,a=Qe(s.maxHeight,i,"clientHeight")||Ke,l=hc(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const g=zt(s,"border","width"),d=zt(s,"padding");c-=d.width+g.width,h-=d.height+g.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=Ae(Math.min(c,r,l.maxWidth)),h=Ae(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ae(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=Ae(Math.floor(h*n))),{width:c,height:h}}function ko(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const uc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};Vi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i}();function wo(i,t){const e=rc(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function It(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function fc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function gc(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=It(i,s,e),a=It(s,o,e),l=It(o,t,e),c=It(r,a,e),h=It(a,l,e);return It(c,h,e)}const pc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},mc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function qt(i,t,e){return i?pc(t,e):mc()}function zr(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Br(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Hr(i){return i==="angle"?{between:Ti,compare:fl,normalize:at}:{between:Yt,compare:(t,e)=>t-e,normalize:t=>t}}function So({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function bc(i,t,e){const{property:n,start:s,end:o}=e,{between:r,normalize:a}=Hr(n),l=t.length;let{start:c,end:h,loop:u}=i,g,d;if(u){for(c+=l,h+=l,g=0,d=l;g<d&&r(a(t[c%l][n]),s,o);++g)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:u,style:i.style}}function _c(i,t,e){if(!e)return[i];const{property:n,start:s,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=Hr(n),{start:h,end:u,loop:g,style:d}=bc(i,t,e),p=[];let m=!1,b=null,_,x,k;const w=()=>l(s,k,_)&&a(s,k)!==0,y=()=>a(o,_)===0||l(o,k,_),S=()=>m||w(),M=()=>!m||y();for(let v=h,P=h;v<=u;++v)x=t[v%r],!x.skip&&(_=c(x[n]),_!==k&&(m=l(_,s,o),b===null&&S()&&(b=a(_,s)===0?v:P),b!==null&&M()&&(p.push(So({start:b,end:v,loop:g,count:r,style:d})),b=null),P=v,k=_));return b!==null&&p.push(So({start:b,end:u,loop:g,count:r,style:d})),p}function xc(i,t){const e=[],n=i.segments;for(let s=0;s<n.length;s++){const o=_c(n[s],i.points,t);o.length&&e.push(...o)}return e}function yc(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function vc(i,t,e,n){const s=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function kc(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const o=!!i._loop,{start:r,end:a}=yc(e,s,o,n);if(n===!0)return Mo(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+s:a,c=!!i._fullLoop&&r===0&&a===s-1;return Mo(i,vc(e,r,l,c),e,t)}function Mo(i,t,e,n){return!n||!n.setContext||!e?t:wc(i,t,e,n)}function wc(i,t,e,n){const s=i._chart.getContext(),o=Eo(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,u=t[0].start,g=u;function d(p,m,b,_){const x=a?-1:1;if(p!==m){for(p+=l;e[p%l].skip;)p-=x;for(;e[m%l].skip;)m+=x;p%l!==m%l&&(c.push({start:p%l,end:m%l,loop:b,style:_}),h=_,u=m%l)}}for(const p of t){u=a?u:p.start;let m=e[u%l],b;for(g=u+1;g<=p.end;g++){const _=e[g%l];b=Eo(n.setContext(Dt(s,{type:"segment",p0:m,p1:_,p0DataIndex:(g-1)%l,p1DataIndex:g%l,datasetIndex:r}))),Sc(b,h)&&d(u,g-1,p.loop,h),m=_,h=b}u<g-1&&d(u,g-1,p.loop,h)}return c}function Eo(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Sc(i,t){if(!t)return!1;const e=[],n=function(s,o){return Ri(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}/*! 12 * Chart.js v4.4.3 13 * https://www.chartjs.org 14 * (c) 2024 Chart.js Contributors 15 * Released under the MIT License 16 */class Mc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const o=e.listeners[s],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(n-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Dr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var bt=new Mc;const Co="transparent",Ec={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=bo(i||Co),s=n.valid&&bo(t||Co);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Cc{constructor(t,e,n,s){const o=e[n];s=Pe([t.to,s,o,t.from]);const r=Pe([t.from,o,s]);this._active=!0,this._fn=t.fn||Ec[t.type||typeof r],this._easing=de[t.easing]||de.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Pe([t.to,e,s,t.from]),this._from=Pe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<n),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}class Wr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!R(t))return;const e=Object.keys(W.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!R(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,e){const n=e.options,s=Dc(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Pc(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let u=o[c];const g=n.get(c);if(u)if(g&&u.active()){u.update(g,h,a);continue}else u.cancel();if(!g||!g.duration){t[c]=h;continue}o[c]=u=new Cc(g,t,c,h),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return bt.add(this._chart,n),!0}}function Pc(i,t){const e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Dc(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Po(i,t){const e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function Ac(i,t,e){if(e===!1)return!1;const n=Po(i,e),s=Po(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Tc(i){let t,e,n,s;return R(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function Vr(i,t){const e=[],n=i._getSortedDatasetMetas(t);let s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function Do(i,t,e,n={}){const s=i.keys,o=n.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===e){if(n.all)continue;break}c=i.values[l],G(c)&&(o||t===0||Gt(t)===Gt(c))&&(t+=c)}return t}}function Oc(i,t){const{iScale:e,vScale:n}=t,s=e.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[s]:h,[o]:i[h]};return a}function Ao(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Lc(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Rc(i){const{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Fc(i,t,e){const n=i[t]||(i[t]={});return n[e]||(n[e]={})}function To(i,t,e,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function Oo(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=Lc(o,r,n),u=t.length;let g;for(let d=0;d<u;++d){const p=t[d],{[l]:m,[c]:b}=p,_=p._stacks||(p._stacks={});g=_[c]=Fc(s,h,m),g[a]=b,g._top=To(g,r,!0,n.type),g._bottom=To(g,r,!1,n.type);const x=g._visualValues||(g._visualValues={});x[a]=b}}function ci(i,t){const e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Ic(i,t){return Dt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Nc(i,t,e){return Dt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function te(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const hi=i=>i==="reset"||i==="none",Lo=(i,t)=>t?i:Object.assign({},i),zc=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Vr(e,!0),values:null};class fe{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ao(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&te(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,g,d,p)=>u==="x"?g:u==="r"?p:d,o=e.xAxisID=O(n.xAxisID,ci(t,"x")),r=e.yAxisID=O(n.yAxisID,ci(t,"y")),a=e.rAxisID=O(n.rAxisID,ci(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,r,a),h=e.vAxisID=s(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&go(this._data,this),t._stacked&&te(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(R(e)){const s=this._cachedMeta;this._data=Oc(e,s)}else if(n!==e){if(n){go(n,this);const s=this._cachedMeta;te(s),s._parsed=[]}e&&Object.isExtensible(e)&&bl(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=Ao(e.vScale,e),e.stack!==n.stack&&(s=!0,te(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&Oo(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,u,g;if(this._parsing===!1)n._parsed=s,n._sorted=!0,g=s;else{H(s[t])?g=this.parseArrayData(n,s,t,e):R(s[t])?g=this.parseObjectData(n,s,t,e):g=this.parsePrimitiveData(n,s,t,e);const d=()=>u[a]===null||c&&u[a]<c[a];for(h=0;h<e;++h)n._parsed[h+t]=u=g[h],l&&(d()&&(l=!1),c=u);n._sorted=l}r&&Oo(this,g)}parsePrimitiveData(t,e,n,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,u=new Array(s);let g,d,p;for(g=0,d=s;g<d;++g)p=g+n,u[g]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return u}parseArrayData(t,e,n,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,h,u;for(l=0,c=s;l<c;++l)h=l+n,u=e[h],a[l]={x:o.parse(u[0],h),y:r.parse(u[1],h)};return a}parseObjectData(t,e,n,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,u,g,d;for(h=0,u=s;h<u;++h)g=h+n,d=e[g],c[h]={x:o.parse(Ye(d,a),g),y:r.parse(Ye(d,l),g)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Vr(s,!0),values:e._stacks[t.axis]._visualValues};return Do(a,r,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const o=n[e.axis];let r=o===null?NaN:o;const a=s&&n._stacks[e.axis];s&&a&&(s.values=a,r=Do(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,r=s.length,a=this._getOtherScale(t),l=zc(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=Rc(a);let g,d;function p(){d=s[g];const m=d[a.axis];return!G(d[t.axis])||h>m||u<m}for(g=0;g<r&&!(!p()&&(this.updateRangeFromParsed(c,t,d,l),o));++g);if(o){for(g=r-1;g>=0;--g)if(!p()){this.updateRangeFromParsed(c,t,d,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,r;for(s=0,o=e.length;s<o;++s)r=e[s][t.axis],G(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Tc(O(this.options.clip,Ac(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const u=s[h];u.hidden||(u.active&&c?r.push(u):u.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Nc(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ic(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Xe(n);if(a)return Lo(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],g=c.getOptionScopes(this.getDataset(),h),d=Object.keys(W.elements[t]),p=()=>this.getContext(n,s,e),m=c.resolveNamedOptions(g,d,p,u);return m.$shared&&(m.$shared=l,o[r]=Object.freeze(Lo(m,l))),m}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),g=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(g,this.getContext(t,n,e))}const c=new Wr(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||hi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:r}}updateElement(t,e,n,s){hi(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!hi(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){const s=this._cachedMeta,o=s.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&te(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}E(fe,"defaults",{}),E(fe,"datasetElementType",null),E(fe,"dataElementType",null);class He extends fe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=vl(e,s,r);this._drawStart=a,this._drawCount=l,kl(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,s),g=r.axis,d=a.axis,{spanGaps:p,segment:m}=this.options,b=me(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||s==="none",x=e+n,k=t.length;let w=e>0&&this.getParsed(e-1);for(let y=0;y<k;++y){const S=t[y],M=_?S:{};if(y<e||y>=x){M.skip=!0;continue}const v=this.getParsed(y),P=z(v[d]),A=M[g]=r.getPixelForValue(v[g],y),D=M[d]=o||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,v,l):v[d],y);M.skip=isNaN(A)||isNaN(D)||P,M.stop=y>0&&Math.abs(v[g]-w[g])>b,m&&(M.parsed=v,M.raw=c.data[y]),u&&(M.options=h||this.resolveDataElementOptions(y,S.active?"active":s)),_||this.updateElement(S,y,M,s),w=v}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}
vendor: 5,388 bytes, line 16
16E(He,"id","line"),E(He,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),E(He,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Lt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $i{constructor(t){E(this,"options");this.options=t||{}}static override(t){Object.assign($i.prototype,t)}init(){}formats(){return Lt()}parse(){return Lt()}format(){return Lt()}add(){return Lt()}diff(){return Lt()}startOf(){return Lt()}endOf(){return Lt()}}var Bc={_date:$i};function Hc(i,t,e,n){const{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?pl:Nt;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const u=l(o,t,e-h),g=l(o,t,e+h);return{lo:u.lo,hi:g.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function ye(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:u,hi:g}=Hc(o[a],t,r,s);for(let d=u;d<=g;++d){const p=h[d];p.skip||n(p,c,d)}}}function Wc(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){const o=t?Math.abs(n.x-s.x):0,r=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function di(i,t,e,n,s){const o=[];return!s&&!i.isPointInArea(t)||ye(i,e,t,function(a,l,c){!s&&!yt(a,i.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Vc(i,t,e,n){let s=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],n),{angle:u}=Cr(r,{x:t.x,y:t.y});Ti(u,c,h)&&s.push({element:r,datasetIndex:a,index:l})}return ye(i,e,t,o),s}function jc(i,t,e,n,s,o){let r=[];const a=Wc(e);let l=Number.POSITIVE_INFINITY;function c(h,u,g){const d=h.inRange(t.x,t.y,s);if(n&&!d)return;const p=h.getCenterPoint(s);if(!(!!o||i.isPointInArea(p))&&!d)return;const b=a(t,p);b<l?(r=[{element:h,datasetIndex:u,index:g}],l=b):b===l&&r.push({element:h,datasetIndex:u,index:g})}return ye(i,e,t,c),r}function ui(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?Vc(i,t,e,s):jc(i,t,e,n,s,o)}function Ro(i,t,e,n,s){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return ye(i,e,t,(l,c,h)=>{l[r](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}var $c={evaluateInteractionItems:ye,modes:{index(i,t,e,n){const s=Ft(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?di(i,s,o,n,r):ui(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Ft(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?di(i,s,o,n,r):ui(i,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,n){const s=Ft(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return di(i,s,o,n,r)},nearest(i,t,e,n){const s=Ft(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return ui(i,s,o,e.intersect,n,r)},x(i,t,e,n){const s=Ft(t,i);return Ro(i,s,"x",e.intersect,n)},y(i,t,e,n){const s=Ft(t,i);return Ro(i,s,"y",e.intersect,n)}}};const jr=["left","top","right","bottom"];function ee(i,t){return i.filter(e=>e.pos===t)}function Fo(i,t){return i.filter(e=>jr.indexOf(e.pos)===-1&&e.box.axis===t)}function ie(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Uc(i){const t=[];let e,n,s,o,r,a;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Yc(i){const t={};for(const e of i){const{stack:n,pos:s,stackWeight:o}=e;if(!n||!jr.includes(s))continue;const r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Xc(i,t){const e=Yc(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&t.availableHeight)}return e}function Kc(i){const t=Uc(i),e=ie(t.filter(c=>c.box.fullSize),!0),n=ie(ee(t,"left"),!0),s=ie(ee(t,"right")),o=ie(ee(t,"top"),!0),r=ie(ee(t,"bottom")),a=Fo(t,"x"),l=Fo(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ee(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Io(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function $r(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function qc(i,t,e,n){const{pos:s,box:o}=e,r=i.maxPadding;if(!R(s)){e.size&&(i[s]-=e.size);const u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,i[s]+=e.size}o.getPadding&&$r(r,o.getPadding());const a=Math.max(0,t.outerWidth-Io(r,i,"left","right")),l=Math.max(0,t.outerHeight-Io(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Gc(i){const t=i.maxPadding;
vendor: 108,326 bytes, lines 16-18
16function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Qc(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return n(i?["left","right"]:["top","bottom"])}function re(i,t,e,n){const s=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Qc(a.horizontal,t));const{same:u,other:g}=qc(t,e,a,n);c|=u&&s.length,h=h||g,l.fullSize||s.push(a)}return c&&re(s,t,e,n)||h}function Te(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function No(i,t,e,n){const s=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const u=t.w*h,g=c.size||l.height;Xe(c.start)&&(r=c.start),l.fullSize?Te(l,s.left,r,e.outerWidth-s.right-s.left,g):Te(l,t.left+c.placed,r,u,g),c.start=r,c.placed+=u,r=l.bottom}else{const u=t.h*h,g=c.size||l.width;Xe(c.start)&&(o=c.start),l.fullSize?Te(l,o,s.top,g,e.outerHeight-s.bottom-s.top):Te(l,o,t.top+c.placed,g,u),c.start=o,c.placed+=u,o=l.right}}t.x=o,t.y=r}var rt={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;const s=J(i.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(e-s.height,0),a=Kc(i.boxes),l=a.vertical,c=a.horizontal;F(i.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const h=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),g=Object.assign({},s);$r(g,J(n));const d=Object.assign({maxPadding:g,w:o,h:r,x:s.left,y:s.top},s),p=Xc(l.concat(c),u);re(a.fullSize,d,u,p),re(l,d,u,p),re(c,d,u,p)&&re(l,d,u,p),Gc(d),No(a.leftAndTop,d,u,p),d.x+=d.w,d.y+=d.h,No(a.rightAndBottom,d,u,p),i.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},F(a.chartArea,m=>{const b=m.box;Object.assign(b,i.chartArea),b.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Ur{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class Zc extends Ur{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const We="$chartjs",Jc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},zo=i=>i===null||i==="";function th(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[We]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",zo(s)){const o=wo(i,"width");o!==void 0&&(i.width=o)}if(zo(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=wo(i,"height");o!==void 0&&(i.height=o)}return i}const Yr=uc?{passive:!0}:!1;function eh(i,t,e){i&&i.addEventListener(t,e,Yr)}function ih(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Yr)}function nh(i,t){const e=Jc[i.type]||i.type,{x:n,y:s}=Ft(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function Ze(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function sh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ze(a.addedNodes,n),r=r&&!Ze(a.removedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function oh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ze(a.removedNodes,n),r=r&&!Ze(a.addedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const be=new Map;let Bo=0;function Xr(){const i=window.devicePixelRatio;i!==Bo&&(Bo=i,be.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function rh(i,t){be.size||window.addEventListener("resize",Xr),be.set(i,t)}function ah(i){be.delete(i),be.size||window.removeEventListener("resize",Xr)}function lh(i,t,e){const n=i.canvas,s=n&&ji(n);if(!s)return;const o=Ar((a,l)=>{const c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(s),rh(i,o),r}function fi(i,t,e){e&&e.disconnect(),t==="resize"&&ah(i)}function ch(i,t,e){const n=i.canvas,s=Ar(o=>{i.ctx!==null&&e(nh(o,i))},i);return eh(n,t,s),s}class hh extends Ur{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(th(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[We])return!1;const n=e[We].initial;["height","width"].forEach(o=>{const r=n[o];z(r)?e.removeAttribute(o):e.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[We],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),r={attach:sh,detach:oh,resize:lh}[e]||ch;s[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:fi,detach:fi,resize:fi}[e]||ih)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return dc(t,e,n,s)}isAttached(t){const e=t&&ji(t);return!!(e&&e.isConnected)}}function dh(i){return!Vi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Zc:hh}class ft{constructor(){E(this,"x");E(this,"y");E(this,"active",!1);E(this,"options");E(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return me(this.x)&&me(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}E(ft,"defaults",{}),E(ft,"defaultRoutes");function uh(i,t){const e=i.options.ticks,n=fh(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?ph(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return mh(t,c,o,r/s),c;const h=gh(o,t,s);if(r>0){let u,g;const d=r>1?Math.round((l-a)/(r-1)):null;for(Oe(t,c,h,z(d)?0:a-d,a),u=0,g=r-1;u<g;u++)Oe(t,c,h,o[u],o[u+1]);return Oe(t,c,h,l,z(d)?t.length:l+d),c}return Oe(t,c,h),c}function fh(i){const t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function gh(i,t,e){const n=bh(i),s=t.length/e;if(!n)return Math.max(s,1);const o=dl(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function ph(i){const t=[];let e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function mh(i,t,e,n){let s=0,o=e[0],r;for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(t.push(i[r]),s++,o=e[s*n])}function Oe(i,t,e,n,s){const o=O(n,0),r=Math.min(O(s,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function bh(i){const t=i.length;let e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}const _h=i=>i==="left"?"right":i==="right"?"left":i,Ho=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Wo=(i,t)=>Math.min(t||i,i);function Vo(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function xh(i,t,e){const n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function yh(i,t){F(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function ne(i){return i.drawTicks?i.tickLength:0}function jo(i,t){if(!i.display)return 0;const e=K(i.font,t),n=J(i.padding);return(H(i.text)?i.text.length:1)*e.lineHeight+n.height}function vh(i,t){return Dt(i,{scale:t,type:"scale"})}function kh(i,t,e){return Dt(i,{tick:e,index:t,type:"tick"})}function wh(i,t,e){let n=Li(i);return(e&&t!=="right"||!e&&t==="right")&&(n=_h(n)),n}function Sh(i,t,e,n){const{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let u=0,g,d,p;const m=r-s,b=a-o;if(i.isHorizontal()){if(d=Z(n,o,a),R(e)){const _=Object.keys(e)[0],x=e[_];p=h[_].getPixelForValue(x)+m-t}else e==="center"?p=(c.bottom+c.top)/2+m-t:p=Ho(i,e,t);g=a-o}else{if(R(e)){const _=Object.keys(e)[0],x=e[_];d=h[_].getPixelForValue(x)-b+t}else e==="center"?d=(c.left+c.right)/2-b+t:d=Ho(i,e,t);p=Z(n,r,s),u=e==="left"?-X:X}return{titleX:d,titleY:p,maxWidth:g,rotation:u}}class Wt extends ft{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=st(t,Number.POSITIVE_INFINITY),e=st(e,Number.NEGATIVE_INFINITY),n=st(n,Number.POSITIVE_INFINITY),s=st(s,Number.NEGATIVE_INFINITY),{min:st(t,n),max:st(e,s),minDefined:G(t),maxDefined:G(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:e,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,r.min)),o||(n=Math.max(n,r.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:st(e,st(n,e)),max:st(n,st(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=jl(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Vo(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=uh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){N(this.options.afterUpdate,[this])}beforeSetDimensions(){N(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){N(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),N(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){N(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=N(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){N(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){N(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=Wo(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),u=h.widest.width,g=h.highest.height,d=tt(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:d/(n-1),u+6>a&&(a=d/(n-(t.offset?.5:1)),l=this.maxHeight-ne(t.grid)-e.padding-jo(t.title,this.chart.options.font),c=Math.sqrt(u*u+g*g),r=Ai(Math.min(Math.asin(tt((h.highest.height+6)/a,-1,1)),Math.asin(tt(l/c,-1,1))-Math.asin(tt(g/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=jo(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=ne(o)+l):(t.height=this.maxHeight,t.width=ne(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:g}=this._getLabelSizes(),d=n.padding*2,p=Et(this.labelRotation),m=Math.cos(p),b=Math.sin(p);if(a){const _=n.mirror?0:b*u.width+m*g.height;t.height=Math.min(this.maxHeight,t.height+_+d)}else{const _=n.mirror?0:m*u.width+b*g.height;t.width=Math.min(this.maxWidth,t.width+_+d)}this._calculatePadding(c,h,b,m)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,d=0;l?c?(g=s*t.width,d=n*e.height):(g=n*t.height,d=s*e.width):o==="start"?d=e.width:o==="end"?g=t.width:o!=="inner"&&(g=t.width/2,d=e.width/2),this.paddingLeft=Math.max((g-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((d-u+r)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;o==="start"?(h=0,u=t.height):o==="end"&&(h=e.height,u=0),this.paddingTop=h+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){N(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)z(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Vo(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/Wo(e,n));let c=0,h=0,u,g,d,p,m,b,_,x,k,w,y;for(u=0;u<e;u+=l){if(p=t[u].label,m=this._resolveTickFontOptions(u),s.font=b=m.string,_=o[b]=o[b]||{data:{},gc:[]},x=m.lineHeight,k=w=0,!z(p)&&!H(p))k=qe(s,_.data,_.gc,k,p),w=x;else if(H(p))for(g=0,d=p.length;g<d;++g)y=p[g],!z(y)&&!H(y)&&(k=qe(s,_.data,_.gc,k,y),w+=x);r.push(k),a.push(w),c=Math.max(k,c),h=Math.max(w,h)}yh(o,e);const S=r.indexOf(c),M=a.indexOf(h),v=P=>({width:r[P]||0,height:a[P]||0});return{first:v(0),last:v(e-1),widest:v(S),highest:v(M),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return gl(this._alignToPixels?Ot(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=kh(this.getContext(),t,n))}return this.$context||(this.$context=vh(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Et(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),g=ne(o),d=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,b=m/2,_=function(I){return Ot(n,I,m)};let x,k,w,y,S,M,v,P,A,D,T,j;if(r==="top")x=_(this.bottom),M=this.bottom-g,P=x-b,D=_(t.top)+b,j=t.bottom;else if(r==="bottom")x=_(this.top),D=t.top,j=_(t.bottom)-b,M=x+b,P=this.top+g;else if(r==="left")x=_(this.right),S=this.right-g,v=x-b,A=_(t.left)+b,T=t.right;else if(r==="right")x=_(this.left),A=t.left,T=_(t.right)-b,S=x+b,v=this.left+g;else if(e==="x"){if(r==="center")x=_((t.top+t.bottom)/2+.5);else if(R(r)){const I=Object.keys(r)[0],B=r[I];x=_(this.chart.scales[I].getPixelForValue(B))}D=t.top,j=t.bottom,M=x+b,P=M+g}else if(e==="y"){if(r==="center")x=_((t.left+t.right)/2);else if(R(r)){const I=Object.keys(r)[0],B=r[I];x=_(this.chart.scales[I].getPixelForValue(B))}S=x-b,v=S-g,A=t.left,T=t.right}const Q=O(s.ticks.maxTicksLimit,u),L=Math.max(1,Math.ceil(u/Q));for(k=0;k<u;k+=L){const I=this.getContext(k),B=o.setContext(I),et=a.setContext(I),U=B.lineWidth,gt=B.color,At=et.dash||[],pt=et.dashOffset,vt=B.tickWidth,lt=B.tickColor,kt=B.tickBorderDash||[],ct=B.tickBorderDashOffset;w=xh(this,k,l),w!==void 0&&(y=Ot(n,w,U),c?S=v=A=T=y:M=P=D=j=y,d.push({tx1:S,ty1:M,tx2:v,ty2:P,x1:A,y1:D,x2:T,y2:j,width:U,color:gt,borderDash:At,borderDashOffset:pt,tickWidth:vt,tickColor:lt,tickBorderDash:kt,tickBorderDashOffset:ct}))}return this._ticksLength=u,this._borderValue=x,d}_computeLabelItems(t){const e=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=o,g=ne(n.grid),d=g+h,p=u?-h:d,m=-Et(this.labelRotation),b=[];let _,x,k,w,y,S,M,v,P,A,D,T,j="middle";if(s==="top")S=this.bottom-p,M=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+p,M=this._getXAxisLabelAlignment();else if(s==="left"){const L=this._getYAxisLabelAlignment(g);M=L.textAlign,y=L.x}else if(s==="right"){const L=this._getYAxisLabelAlignment(g);M=L.textAlign,y=L.x}else if(e==="x"){if(s==="center")S=(t.top+t.bottom)/2+d;else if(R(s)){const L=Object.keys(s)[0],I=s[L];S=this.chart.scales[L].getPixelForValue(I)+d}M=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")y=(t.left+t.right)/2-d;else if(R(s)){const L=Object.keys(s)[0],I=s[L];y=this.chart.scales[L].getPixelForValue(I)}M=this._getYAxisLabelAlignment(g).textAlign}e==="y"&&(l==="start"?j="top":l==="end"&&(j="bottom"));const Q=this._getLabelSizes();for(_=0,x=a.length;_<x;++_){k=a[_],w=k.label;const L=o.setContext(this.getContext(_));v=this.getPixelForTick(_)+o.labelOffset,P=this._resolveTickFontOptions(_),A=P.lineHeight,D=H(w)?w.length:1;const I=D/2,B=L.color,et=L.textStrokeColor,U=L.textStrokeWidth;let gt=M;r?(y=v,M==="inner"&&(_===x-1?gt=this.options.reverse?"left":"right":_===0?gt=this.options.reverse?"right":"left":gt="center"),s==="top"?c==="near"||m!==0?T=-D*A+A/2:c==="center"?T=-Q.highest.height/2-I*A+A:T=-Q.highest.height+A/2:c==="near"||m!==0?T=A/2:c==="center"?T=Q.highest.height/2-I*A:T=Q.highest.height-D*A,u&&(T*=-1),m!==0&&!L.showLabelBackdrop&&(y+=A/2*Math.sin(m))):(S=v,T=(1-D)*A/2);let At;if(L.showLabelBackdrop){const pt=J(L.backdropPadding),vt=Q.heights[_],lt=Q.widths[_];let kt=T-pt.top,ct=0-pt.left;switch(j){case"middle":kt-=vt/2;break;case"bottom":kt-=vt;break}switch(M){case"center":ct-=lt/2;break;case"right":ct-=lt;break;case"inner":_===x-1?ct-=lt:_>0&&(ct-=lt/2);break}At={left:ct,top:kt,width:lt+pt.width,height:vt+pt.height,color:L.backdropColor}}b.push({label:w,font:P,textOffset:T,options:{rotation:m,color:B,strokeColor:et,strokeWidth:U,textAlign:gt,textBaseline:j,translation:[y,S],backdrop:At}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,r=s.length;o<r;++o){const l=s[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,u,g;this.isHorizontal()?(c=Ot(t,this.left,r)-r/2,h=Ot(t,this.right,a)+a/2,u=g=l):(u=Ot(t,this.top,r)-r/2,g=Ot(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,u),e.lineTo(h,g),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&Ii(n,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;Ht(n,c,0,h,l,a)}s&&Ni(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const o=K(n.font),r=J(n.padding),a=n.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||R(e)?(l+=r.bottom,H(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:u,rotation:g}=Sh(this,l,e,a);Ht(t,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:g,textAlign:wh(a,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=O(t.grid&&t.grid.z,-1),s=O(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Wt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return K(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Le{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;Ch(e)&&(n=this.register(e));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Mh(t,r,n),this.override&&W.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in W[s]&&(delete W[s][n],this.override&&delete Bt[n])}}function Mh(i,t,e){const n=pe(Object.create(null),[e?W.get(e):{},W.get(t),i.defaults]);W.set(t,n),i.defaultRoutes&&Eh(t,i.defaultRoutes),i.descriptors&&W.describe(t,i.descriptors)}function Eh(i,t){Object.keys(t).forEach(e=>{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");W.route(o,s,l,a)})}function Ch(i){return"id"in i&&"defaults"in i}class Ph{constructor(){this.controllers=new Le(fe,"datasets",!0),this.elements=new Le(ft,"elements"),this.plugins=new Le(Object,"plugins"),this.scales=new Le(Wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):F(s,r=>{const a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,n){const s=Di(t);N(n["before"+s],[],n),e[t](n),N(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var ut=new Ph;class Dh{constructor(){this._init=[]}notify(t,e,n,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,n,s){s=s||{};for(const o of t){const r=o.plugin,a=r[n],l=[e,s,o.options];if(N(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){z(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,s=O(n.options&&n.options.plugins,{}),o=Ah(n);return s===!1&&!e?[]:Oh(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function Ah(i){const t={},e=[],n=Object.keys(ut.plugins.items);for(let o=0;o<n.length;o++)e.push(ut.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function Th(i,t){return!t&&i===!1?null:i===!0?{}:i}function Oh(i,{plugins:t,localIds:e},n,s){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=Th(n[l],s);c!==null&&o.push({plugin:a,options:Lh(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Lh(i,{plugin:t,local:e},n,s){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(n,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xi(i,t){const e=W.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Rh(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Fh(i,t){return i===t?"_index_":"_value_"}function $o(i){if(i==="x"||i==="y"||i==="r")return i}function Ih(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function yi(i,...t){if($o(i))return i;for(const e of t){const n=e.axis||Ih(e.position)||i.length>1&&$o(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Uo(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Nh(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return Uo(i,"x",e[0])||Uo(i,"y",e[0])}return{}}function zh(i,t){const e=Bt[i.type]||{scales:{}},n=t.scales||{},s=xi(i.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!R(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=yi(r,a,Nh(r,i),W.scales[a.type]),c=Fh(l,s),h=e.scales||{};o[r]=ce(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||xi(a,t),h=(Bt[a]||{}).scales||{};Object.keys(h).forEach(u=>{const g=Rh(u,l),d=r[g+"AxisID"]||g;o[d]=o[d]||Object.create(null),ce(o[d],[{axis:g},n[d],h[u]])})}),Object.keys(o).forEach(r=>{const a=o[r];ce(a,[W.scales[a.type],W.scale])}),o}function Kr(i){const t=i.options||(i.options={});t.plugins=O(t.plugins,{}),t.scales=zh(i,t)}function qr(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Bh(i){return i=i||{},i.data=qr(i.data),Kr(i),i}const Yo=new Map,Gr=new Set;function Re(i,t){let e=Yo.get(i);return e||(e=t(),Yo.set(i,e),Gr.add(e)),e}const se=(i,t,e)=>{const n=Ye(t,e);n!==void 0&&i.add(n)};class Hh{constructor(t){this._config=Bh(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=qr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Kr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Re(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Re(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Re(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return Re(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>se(l,t,u))),h.forEach(u=>se(l,s,u)),h.forEach(u=>se(l,Bt[o]||{},u)),h.forEach(u=>se(l,W,u)),h.forEach(u=>se(l,bi,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Gr.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Bt[e]||{},W.datasets[e]||{},{type:e},W,bi]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Xo(this._resolverCache,t,s);let l=r;if(Vh(r,e)){o.$shared=!1,n=Pt(n)?n():n;const c=this.createResolver(t,n,a);l=Qt(r,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=Xo(this._resolverCache,t,n);return R(e)?Qt(o,e,void 0,s):o}}function Xo(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:Bi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const Wh=i=>R(i)&&Object.getOwnPropertyNames(i).some(t=>Pt(i[t]));function Vh(i,t){const{isScriptable:e,isIndexable:n}=Lr(i);for(const s of t){const o=e(s),r=n(s),a=(r||o)&&i[s];if(o&&(Pt(a)||Wh(a))||r&&H(a))return!0}return!1}var jh="4.4.3";const $h=["top","bottom","left","right","chartArea"];function Ko(i,t){return i==="top"||i==="bottom"||$h.indexOf(i)===-1&&t==="x"}function qo(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function Go(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),N(e&&e.onComplete,[i],t)}function Uh(i){const t=i.chart,e=t.options.animation;N(e&&e.onProgress,[i],t)}function Qr(i){return Vi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Ve={},Qo=i=>{const t=Qr(i);return Object.values(Ve).filter(e=>e.canvas===t).pop()};function Yh(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const r=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=r)}}}function Xh(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function Fe(i,t,e){return i.options.clip?i[e]:t[e]}function Kh(i,t){const{xScale:e,yScale:n}=i;return e&&n?{left:Fe(e,t,"left"),right:Fe(e,t,"right"),top:Fe(n,t,"top"),bottom:Fe(n,t,"bottom")}:t}var wt;let ve=(wt=class{static register(...t){ut.add(...t),Zo()}static unregister(...t){ut.remove(...t),Zo()}constructor(t,e){const n=this.config=new Hh(e),s=Qr(t),o=Qo(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||dh(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=il(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Dh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=xl(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],Ve[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}bt.listen(this,"complete",Go),bt.listen(this,"progress",Uh),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return z(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ut}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ko(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return xo(this.canvas,this.ctx),this}stop(){return bt.stop(this),this}resize(t,e){bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ko(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),N(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};F(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=yi(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),F(o,r=>{const a=r.options,l=a.id,c=yi(l,a),h=O(a.type,r.dtype);(a.position===void 0||Ko(a.position,c)!==Ko(r.dposition))&&(a.position=r.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===h)u=n[l];else{const g=ut.getScale(h);u=new g({id:l,type:h,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),F(s,(r,a)=>{r||delete n[a]}),F(n,r=>{rt.configure(this,r,r.options),rt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(qo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){const o=e[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||xi(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=ut.getController(a),{datasetElementType:c,dataElementType:h}=W.datasets[a];Object.assign(l,{dataElementType:ut.getElement(h),datasetElementType:c&&ut.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){F(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:u}=this.getDatasetMeta(c),g=!s&&o.indexOf(u)===-1;u.buildOrUpdateElements(g),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||F(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(qo("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){F(this.scales,t=>{rt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!co(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const r=n==="_removeElements"?-o:o;Yh(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!co(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rt.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],F(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Pt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(bt.has(this)?this.attached&&!bt.running(this)&&bt.start(this):(this.draw(),Go({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,o;for(s=0,o=e.length;s<o;++s){const r=e[s];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=Kh(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Ii(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&Ni(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return yt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=$c.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Dt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Xe(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),bt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),xo(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ve[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};F(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){F(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},F(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!$e(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),r=o(e,t),a=n?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,n,r),l=ll(t),c=Xh(t,this._lastEvent,n,l);n&&(this._lastEvent=null,N(o.onHover,[t,a,this],this),l&&N(o.onClick,[t,a,this],this));const h=!$e(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}},E(wt,"defaults",W),E(wt,"instances",Ve),E(wt,"overrides",Bt),E(wt,"registry",ut),E(wt,"version",jh),E(wt,"getChart",Qo),wt);function Zo(){return F(ve.instances,i=>i._plugins.invalidate())}function qh(i,t,e){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;i.beginPath(),i.arc(o,r,a,n-c,e+c),l>s?(c=s/l,i.arc(o,r,l,e+c,n-c,!0)):i.arc(o,r,s,e+X,n-X),i.closePath(),i.clip()}function Gh(i){return zi(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Qh(i,t,e,n){const s=Gh(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,n*t/2),a=l=>{const c=(e-Math.min(o,l))*n/2;return tt(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:tt(s.innerStart,0,r),innerEnd:tt(s.innerEnd,0,r)}}function jt(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function Je(i,t,e,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+n+e-c,0),g=h>0?h+n+e+c:0;let d=0;const p=s-l;if(n){const L=h>0?h-n:0,I=u>0?u-n:0,B=(L+I)/2,et=B!==0?p*B/(B+n):p;d=(p-et)/2}const m=Math.max(.001,p*u-e/V)/u,b=(p-m)/2,_=l+b+d,x=s-b-d,{outerStart:k,outerEnd:w,innerStart:y,innerEnd:S}=Qh(t,g,u,x-_),M=u-k,v=u-w,P=_+k/M,A=x-w/v,D=g+y,T=g+S,j=_+y/D,Q=x-S/T;if(i.beginPath(),o){const L=(P+A)/2;if(i.arc(r,a,u,P,L),i.arc(r,a,u,L,A),w>0){const U=jt(v,A,r,a);i.arc(U.x,U.y,w,A,x+X)}const I=jt(T,x,r,a);if(i.lineTo(I.x,I.y),S>0){const U=jt(T,Q,r,a);i.arc(U.x,U.y,S,x+X,Q+Math.PI)}const B=(x-S/g+(_+y/g))/2;if(i.arc(r,a,g,x-S/g,B,!0),i.arc(r,a,g,B,_+y/g,!0),y>0){const U=jt(D,j,r,a);i.arc(U.x,U.y,y,j+Math.PI,_-X)}const et=jt(M,_,r,a);if(i.lineTo(et.x,et.y),k>0){const U=jt(M,P,r,a);i.arc(U.x,U.y,k,_-X,P)}}else{i.moveTo(r,a);const L=Math.cos(P)*u+r,I=Math.sin(P)*u+a;i.lineTo(L,I);const B=Math.cos(A)*u+r,et=Math.sin(A)*u+a;i.lineTo(B,et)}i.closePath()}function Zh(i,t,e,n,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){Je(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%q||q))}return Je(i,t,e,n,l,s),i.fill(),l}function Jh(i,t,e,n,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:u,borderDashOffset:g}=l,d=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=g,d?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let p=t.endAngle;if(o){Je(i,t,e,n,p,s);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(p=r+(a%q||q))}d&&qh(i,t,p),o||(Je(i,t,e,n,p,s),i.stroke())}class Xt extends ft{constructor(e){super();E(this,"circumference");E(this,"endAngle");E(this,"fullCircles");E(this,"innerRadius");E(this,"outerRadius");E(this,"pixelMargin");E(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.getProps(["x","y"],s),{angle:r,distance:a}=Cr(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:u,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),d=(this.options.spacing+this.options.borderWidth)/2,m=O(g,c-l)>=q||Ti(r,l,c),b=Yt(a,h+d,u+d);return m&&b}getCenterPoint(e){const{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,u=(o+r)/2,g=(a+l+h+c)/2;return{x:n+Math.cos(u)*g,y:s+Math.sin(u)*g}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>q?Math.floor(s/q):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(V,s||0)),h=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Zh(e,this,h,r,a),Jh(e,this,h,r,a),e.restore()}}E(Xt,"id","arc"),E(Xt,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),E(Xt,"defaultRoutes",{backgroundColor:"backgroundColor"}),E(Xt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Zr(i,t,e=t){i.lineCap=O(e.borderCapStyle,t.borderCapStyle),i.setLineDash(O(e.borderDash,t.borderDash)),i.lineDashOffset=O(e.borderDashOffset,t.borderDashOffset),i.lineJoin=O(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=O(e.borderWidth,t.borderWidth),i.strokeStyle=O(e.borderColor,t.borderColor)}function td(i,t,e){i.lineTo(e.x,e.y)}function ed(i){return i.stepped?Ll:i.tension||i.cubicInterpolationMode==="monotone"?Rl:td}function Jr(i,t,e={}){const n=i.length,{start:s=0,end:o=n-1}=e,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function id(i,t,e,n){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=Jr(s,e,n),h=ed(o);let{move:u=!0,reverse:g}=n||{},d,p,m;for(d=0;d<=c;++d)p=s[(a+(g?c-d:d))%r],!p.skip&&(u?(i.moveTo(p.x,p.y),u=!1):h(i,m,p,g,o.stepped),m=p);return l&&(p=s[(a+(g?c:0))%r],h(i,m,p,g,o.stepped)),!!l}function nd(i,t,e,n){const s=t.points,{count:o,start:r,ilen:a}=Jr(s,e,n),{move:l=!0,reverse:c}=n||{};let h=0,u=0,g,d,p,m,b,_;const x=w=>(r+(c?a-w:w))%o,k=()=>{m!==b&&(i.lineTo(h,b),i.lineTo(h,m),i.lineTo(h,_))};for(l&&(d=s[x(0)],i.moveTo(d.x,d.y)),g=0;g<=a;++g){if(d=s[x(g)],d.skip)continue;const w=d.x,y=d.y,S=w|0;S===p?(y<m?m=y:y>b&&(b=y),h=(u*h+w)/++u):(k(),i.lineTo(w,y),p=S,u=0,m=b=y),_=y}k()}function vi(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?nd:id}function sd(i){return i.stepped?fc:i.tension||i.cubicInterpolationMode==="monotone"?gc:It}function od(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),Zr(i,t.options),i.stroke(s)}function rd(i,t,e,n){const{segments:s,options:o}=t,r=vi(t);for(const a of s)Zr(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const ad=typeof Path2D=="function";function ld(i,t,e,n){ad&&!t.options.segment?od(i,t,e,n):rd(i,t,e,n)}class ae extends ft{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;oc(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=kc(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],o=this.points,r=xc(this,{property:e,start:s,end:s});if(!r.length)return;const a=[],l=sd(n);let c,h;for(c=0,h=r.length;c<h;++c){const{start:u,end:g}=r[c],d=o[u],p=o[g];if(d===p){a.push(d);continue}const m=Math.abs((s-d[e])/(p[e]-d[e])),b=l(d,p,m,n.stepped);b[e]=t[e],a.push(b)}return a.length===1?a[0]:a}pathSegment(t,e,n){return vi(this)(t,this,e,n)}path(t,e,n){const s=this.segments,o=vi(this);let r=this._loop;e=e||0,n=n||this.points.length-e;for(const a of s)r&=o(t,this,a,{start:e,end:e+n-1});return!!r}draw(t,e,n,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),ld(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}E(ae,"id","line"),E(ae,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),E(ae,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),E(ae,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Jo(i,t,e,n){const s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}class je extends ft{constructor(e){super();E(this,"parsed");E(this,"skip");E(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(e-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return Jo(this,e,"x",n)}inYRange(e,n){return Jo(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!yt(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,_i(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}E(je,"id","point"),E(je,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),E(je,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const tr=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},cd=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class er extends ft{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=N(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=K(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=tr(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let u=t;o.textAlign="left",o.textBaseline="middle";let g=-1,d=-h;return this.legendItems.forEach((p,m)=>{const b=n+e/2+o.measureText(p.text).width;(m===0||c[c.length-1]+b+2*a>r)&&(u+=h,c[c.length-(m>0?0:1)]=0,d+=h,g++),l[m]={left:0,top:d,row:g,width:b,height:s},c[c.length-1]+=b+a}),u}_fitCols(t,e,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let u=a,g=0,d=0,p=0,m=0;return this.legendItems.forEach((b,_)=>{const{itemWidth:x,itemHeight:k}=hd(n,e,o,b,s);_>0&&d+k+2*a>h&&(u+=g+a,c.push({width:g,height:d}),p+=g+a,m++,g=d=0),l[_]={left:p,top:d,col:m,width:x,height:k},g=Math.max(g,x),d+=k+a}),u+=g,c.push({width:g,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,r=qt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Z(n,this.left+s,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=Z(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ii(t,this),this._draw(),Ni(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=W.color,l=qt(t.rtl,this.left,this.width),c=K(r.font),{padding:h}=r,u=c.size,g=u/2;let d;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=tr(r,u),_=function(S,M,v){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const P=O(v.lineWidth,1);if(s.fillStyle=O(v.fillStyle,a),s.lineCap=O(v.lineCap,"butt"),s.lineDashOffset=O(v.lineDashOffset,0),s.lineJoin=O(v.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=O(v.strokeStyle,a),s.setLineDash(O(v.lineDash,[])),r.usePointStyle){const A={radius:m*Math.SQRT2/2,pointStyle:v.pointStyle,rotation:v.rotation,borderWidth:P},D=l.xPlus(S,p/2),T=M+g;Or(s,A,D,T,r.pointStyleWidth&&p)}else{const A=M+Math.max((u-m)/2,0),D=l.leftForLtr(S,p),T=Kt(v.borderRadius);s.beginPath(),Object.values(T).some(j=>j!==0)?Ge(s,{x:D,y:A,w:p,h:m,radius:T}):s.rect(D,A,p,m),s.fill(),P!==0&&s.stroke()}s.restore()},x=function(S,M,v){Ht(s,v.text,S,M+b/2,c,{strikethrough:v.hidden,textAlign:l.textAlign(v.textAlign)})},k=this.isHorizontal(),w=this._computeTitleHeight();k?d={x:Z(o,this.left+h,this.right-n[0]),y:this.top+h+w,line:0}:d={x:this.left+h,y:Z(o,this.top+w+h,this.bottom-e[0].height),line:0},zr(this.ctx,t.textDirection);const y=b+h;this.legendItems.forEach((S,M)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const v=s.measureText(S.text).width,P=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),A=p+g+v;let D=d.x,T=d.y;l.setWidth(this.width),k?M>0&&D+A+h>this.right&&(T=d.y+=y,d.line++,D=d.x=Z(o,this.left+h,this.right-n[d.line])):M>0&&T+y>this.bottom&&(D=d.x=D+e[d.line].width+h,d.line++,T=d.y=Z(o,this.top+w+h,this.bottom-e[d.line].height));const j=l.x(D);if(_(j,T,S),D=yl(P,D+p+g,k?D+A:this.right,t.rtl),x(l.x(D),T,S),k)d.x+=A+h;else if(typeof S.text!="string"){const Q=c.lineHeight;d.y+=ta(S,Q)+h}else d.y+=y}),Br(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=K(e.font),s=J(e.padding);if(!e.display)return;const o=qt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=n.size/2,c=s.top+l;let h,u=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+c,u=Z(t.align,u,this.right-g);else{const p=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);h=c+Z(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const d=Z(a,u,u+g);r.textAlign=o.textAlign(Li(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=n.string,Ht(r,e.text,d,h,n)}_computeTitleHeight(){const t=this.options.title,e=K(t.font),n=J(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(Yt(t,this.left,this.right)&&Yt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],Yt(t,s.left,s.left+s.width)&&Yt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!fd(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=cd(s,n);s&&!o&&N(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&N(e.onHover,[t,n,this],this)}else n&&N(e.onClick,[t,n,this],this)}}function hd(i,t,e,n,s){const o=dd(n,i,t,e),r=ud(s,n,t.lineHeight);return{itemWidth:o,itemHeight:r}}function dd(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+n.measureText(s).width}function ud(i,t,e){let n=i;return typeof t.text!="string"&&(n=ta(t,e)),n}function ta(i,t){const e=i.text?i.text.length:0;return t*e}function fd(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var ea={id:"legend",_element:er,start(i,t,e){const n=i.legend=new er({ctx:i.ctx,options:e,chart:i});rt.configure(i,n,e),rt.addBox(i,n)},stop(i){rt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;rt.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=J(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class ia extends ft{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=H(n.text)?n.text.length:1;this._padding=J(n.padding);const o=s*K(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,h,u;return this.isHorizontal()?(h=Z(a,n,o),u=e+t,c=o-n):(r.position==="left"?(h=n+t,u=Z(a,s,e),l=V*-.5):(h=o-t,u=Z(a,e,s),l=V*.5),c=s-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=K(e.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ht(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Li(e.align),textBaseline:"middle",translation:[r,a]})}}function gd(i,t){const e=new ia({ctx:i.ctx,options:t,chart:i});rt.configure(i,e,t),rt.addBox(i,e),i.titleBlock=e}var pd={id:"title",_element:ia,start(i,t,e){gd(i,e)},stop(i){const t=i.titleBlock;rt.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;rt.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const le={average(i){if(!i.length)return!1;let t,e,n=new Set,s=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),s+=l.y,++o}}return{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=mi(t,c);h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function ht(i,t){return t&&(H(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function _t(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(` 17`)>-1?i.split(` 18`):i}function md(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function ir(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=K(t.bodyFont),c=K(t.titleFont),h=K(t.footerFont),u=o.length,g=s.length,d=n.length,p=J(t.padding);let m=p.height,b=0,_=n.reduce((w,y)=>w+y.before.length+y.lines.length+y.after.length,0);if(_+=i.beforeBody.length+i.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),_){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=d*w+(_-d)*l.lineHeight+(_-1)*t.bodySpacing}g&&(m+=t.footerMarginTop+g*h.lineHeight+(g-1)*t.footerSpacing);let x=0;const k=function(w){b=Math.max(b,e.measureText(w).width+x)};return e.save(),e.font=c.string,F(i.title,k),e.font=l.string,F(i.beforeBody.concat(i.afterBody),k),x=t.displayColors?r+2+t.boxPadding:0,F(n,w=>{F(w.before,k),F(w.lines,k),F(w.after,k)}),x=0,e.font=h.string,F(i.footer,k),e.restore(),b+=p.width,{width:b,height:m}}function bd(i,t){const{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function _d(i,t,e,n){const{x:s,width:o}=n,r=e.caretSize+e.caretPadding;if(i==="left"&&s+o+r>t.width||i==="right"&&s-o-r<0)return!0}function xd(i,t,e,n){const{x:s,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),_d(c,i,t,e)&&(c="center"),c}function nr(i,t,e){const n=e.yAlign||t.yAlign||bd(i,e);return{xAlign:e.xAlign||t.xAlign||xd(i,t,e,n),yAlign:n}}function yd(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function vd(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function sr(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=s+o,{topLeft:h,topRight:u,bottomLeft:g,bottomRight:d}=Kt(r);let p=yd(t,a);const m=vd(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,g)+s:a==="right"&&(p+=Math.max(u,d)+s),{x:tt(p,0,n.width-t.width),y:tt(m,0,n.height-t.height)}}function Ie(i,t,e){const n=J(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function or(i){return ht([],_t(i))}function kd(i,t,e){return Dt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function rr(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const na={beforeTitle:mt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:mt,beforeBody:mt,beforeLabel:mt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return z(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:mt,afterBody:mt,beforeFooter:mt,footer:mt,afterFooter:mt};function it(i,t,e,n){const s=i[t].call(e,n);return typeof s>"u"?na[t].call(e,n):s}class ki extends ft{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new Wr(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=it(n,"beforeTitle",this,t),o=it(n,"title",this,t),r=it(n,"afterTitle",this,t);let a=[];return a=ht(a,_t(s)),a=ht(a,_t(o)),a=ht(a,_t(r)),a}getBeforeBody(t,e){return or(it(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return F(t,o=>{const r={before:[],lines:[],after:[]},a=rr(n,o);ht(r.before,_t(it(a,"beforeLabel",this,o))),ht(r.lines,it(a,"label",this,o)),ht(r.after,_t(it(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return or(it(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=it(n,"beforeFooter",this,t),o=it(n,"footer",this,t),r=it(n,"afterFooter",this,t);let a=[];return a=ht(a,_t(s)),a=ht(a,_t(o)),a=ht(a,_t(r)),a}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(md(this.chart,e[l]));return t.filter&&(a=a.filter((h,u,g)=>t.filter(h,u,g,n))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,n))),F(a,h=>{const u=rr(t.callbacks,h);s.push(it(u,"labelColor",this,h)),o.push(it(u,"labelPointStyle",this,h)),r.push(it(u,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=le[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=ir(this,n),c=Object.assign({},a,l),h=nr(this.chart,n,c),u=sr(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=Kt(a),{x:g,y:d}=t,{width:p,height:m}=e;let b,_,x,k,w,y;return o==="center"?(w=d+m/2,s==="left"?(b=g,_=b-r,k=w+r,y=w-r):(b=g+p,_=b+r,k=w-r,y=w+r),x=b):(s==="left"?_=g+Math.max(l,h)+r:s==="right"?_=g+p-Math.max(c,u)-r:_=this.caretX,o==="top"?(k=d,w=k-r,b=_-r,x=_+r):(k=d+m,w=k+r,b=_+r,x=_-r),y=k),{x1:b,x2:_,x3:x,y1:k,y2:w,y3:y}}drawTitle(t,e,n){const s=this.title,o=s.length;let r,a,l;if(o){const c=qt(n.rtl,this.x,this.width);for(t.x=Ie(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=K(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,h=K(o.bodyFont),u=Ie(this,"left",o),g=s.x(u),d=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+d;if(o.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=s.leftForLtr(g,c)+c/2,_=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,_i(t,m,b,_),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,_i(t,m,b,_)}else{t.lineWidth=R(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const m=s.leftForLtr(g,c),b=s.leftForLtr(s.xPlus(g,1),c-2),_=Kt(r.borderRadius);Object.values(_).some(x=>x!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ge(t,{x:m,y:p,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Ge(t,{x:b,y:p+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(b,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=n,u=K(n.bodyFont);let g=u.lineHeight,d=0;const p=qt(n.rtl,this.x,this.width),m=function(v){e.fillText(v,p.x(t.x+d),t.y+g/2),t.y+=g+o},b=p.textAlign(r);let _,x,k,w,y,S,M;for(e.textAlign=r,e.textBaseline="middle",e.font=u.string,t.x=Ie(this,b,n),e.fillStyle=n.bodyColor,F(this.beforeBody,m),d=a&&b!=="right"?r==="center"?c/2+h:c+2+h:0,w=0,S=s.length;w<S;++w){for(_=s[w],x=this.labelTextColors[w],e.fillStyle=x,F(_.before,m),k=_.lines,a&&k.length&&(this._drawColorBox(e,t,w,p,n),g=Math.max(u.lineHeight,l)),y=0,M=k.length;y<M;++y)m(k[y]),g=u.lineHeight;F(_.after,m)}d=0,g=u.lineHeight,F(this.afterBody,m),t.y-=o}drawFooter(t,e,n){const s=this.footer,o=s.length;let r,a;if(o){const l=qt(n.rtl,this.x,this.width);for(t.x=Ie(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",r=K(n.footerFont),e.fillStyle=n.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=n,{topLeft:u,topRight:g,bottomLeft:d,bottomRight:p}=Kt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),r==="top"&&this.drawCaret(t,e,n,s),e.lineTo(a+c-g,l),e.quadraticCurveTo(a+c,l,a+c,l+g),r==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(a+d,l+h),e.quadraticCurveTo(a,l+h,a,l+h-d),r==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const r=le[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=ir(this,t),l=Object.assign({},r,this._size),c=nr(e,t,l),h=sr(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=J(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),zr(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Br(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!$e(n,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,n),a=this._positionChanged(r,t),l=e||!$e(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,r=le[o.position].call(this,t,e);return r!==!1&&(n!==r.x||s!==r.y)}}E(ki,"positioners",le);var sa={id:"tooltip",_element:ki,positioners:le,afterInit(i,t,e){e&&(i.tooltip=new ki({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:na},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const wd=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Sd(i,t,e,n){const s=i.indexOf(t);if(s===-1)return wd(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Md=(i,t)=>i===null?null:tt(Math.round(i),0,t);function ar(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class wi extends Wt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(z(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Sd(n,t,O(e,t),this._addedLabels),Md(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){return ar.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}E(wi,"id","category"),E(wi,"defaults",{ticks:{callback:ar}});function Ed(i,t){const e=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:g}=i,d=o||1,p=h-1,{min:m,max:b}=t,_=!z(r),x=!z(a),k=!z(c),w=(b-m)/(u+1);let y=uo((b-m)/p/d)*d,S,M,v,P;if(y<1e-14&&!_&&!x)return[{value:m},{value:b}];P=Math.ceil(b/y)-Math.floor(m/y),P>p&&(y=uo(P*y/p/d)*d),z(l)||(S=Math.pow(10,l),y=Math.ceil(y*S)/S),s==="ticks"?(M=Math.floor(m/y)*y,v=Math.ceil(b/y)*y):(M=m,v=b),_&&x&&o&&ul((a-r)/o,y/1e3)?(P=Math.round(Math.min((a-r)/y,h)),y=(a-r)/P,M=r,v=a):k?(M=_?r:M,v=x?a:v,P=c-1,y=(v-M)/P):(P=(v-M)/y,he(P,Math.round(P),y/1e3)?P=Math.round(P):P=Math.ceil(P));const A=Math.max(fo(y),fo(M));S=Math.pow(10,z(l)?A:l),M=Math.round(M*S)/S,v=Math.round(v*S)/S;let D=0;for(_&&(g&&M!==r?(e.push({value:r}),M<r&&D++,he(Math.round((M+D*y)*S)/S,r,lr(r,w,i))&&D++):M<r&&D++);D<P;++D){const T=Math.round((M+D*y)*S)/S;if(x&&T>a)break;e.push({value:T})}return x&&g&&v!==a?e.length&&he(e[e.length-1].value,a,lr(a,w,i))?e[e.length-1].value=a:e.push({value:a}):(!x||v===a)&&e.push({value:v}),e}function lr(i,t,{horizontal:e,minRotation:n}){const s=Et(n),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class ti extends Wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return z(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=e?s:l,a=l=>o=n?o:l;if(t){const l=Gt(s),c=Gt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Ed(s,o);return t.bounds==="ticks"&&Er(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Fi(t,this.chart.options.locale,this.options.ticks.format)}}class Si extends ti{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=G(t)?t:0,this.max=G(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=Et(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}E(Si,"id","linear"),E(Si,"defaults",{ticks:{callback:ii.formatters.numeric}});const _e=i=>Math.floor(Mt(i)),Rt=(i,t)=>Math.pow(10,_e(i)+t);function cr(i){return i/Math.pow(10,_e(i))===1}function hr(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Cd(i,t){const e=t-i;let n=_e(e);for(;hr(i,t,n)>10;)n++;for(;hr(i,t,n)<10;)n--;return Math.min(n,_e(i))}function Pd(i,{min:t,max:e}){t=st(i.min,t);const n=[],s=_e(t);let o=Cd(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let u=Math.floor((c-h)/Math.pow(10,o)),g=st(i.min,Math.round((l+h+u*Math.pow(10,o))*r)/r);for(;g<e;)n.push({value:g,major:cr(g),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),g=Math.round((l+h+u*Math.pow(10,o))*r)/r;const d=st(i.max,g);return n.push({value:d,major:cr(d),significand:u}),n}class dr extends Wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=ti.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return G(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=G(t)?Math.max(0,t):null,this.max=G(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!G(this._userMin)&&(this.min=t===Rt(this.min,0)?Rt(this.min,-1):Rt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=a=>n=t?n:a,r=a=>s=e?s:a;n===s&&(n<=0?(o(1),r(10)):(o(Rt(n,-1)),r(Rt(s,1)))),n<=0&&o(Rt(s,-1)),s<=0&&r(Rt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Pd(e,this);return t.bounds==="ticks"&&Er(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Fi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Mt(t),this._valueRange=Mt(this.max)-Mt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Mt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}E(dr,"id","logarithmic"),E(dr,"defaults",{ticks:{callback:ii.formatters.logarithmic,major:{enabled:!0}}});function Mi(i){const t=i.ticks;if(t.display&&i.display){const e=J(t.backdropPadding);return O(t.font&&t.font.size,W.font.size)+e.height}return 0}function Dd(i,t,e){return e=H(e)?e:[e],{w:Ol(i,t.string,e),h:e.length*t.lineHeight}}function ur(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function Ad(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?V/o:0;for(let l=0;l<o;l++){const c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+s[l],a),u=K(c.font),g=Dd(i.ctx,u,i._pointLabels[l]);n[l]=g;const d=at(i.getIndexAngle(l)+a),p=Math.round(Ai(d)),m=ur(p,h.x,g.w,0,180),b=ur(p,h.y,g.h,90,270);Td(e,t,d,m,b)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Rd(i,n,s)}function Td(i,t,e,n,s){const o=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e));let a=0,l=0;n.start<t.l?(a=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Od(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,n+s+r,o),c=Math.round(Ai(at(l.angle+X))),h=Nd(l.y,a.h,c),u=Fd(c),g=Id(l.x,a.w,u);return{visible:!0,x:l.x,y:h,textAlign:u,left:g,top:h,right:g+a.w,bottom:h+a.h}}function Ld(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(yt({x:e,y:n},t)||yt({x:e,y:o},t)||yt({x:s,y:n},t)||yt({x:s,y:o},t))}function Rd(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Mi(o)/2,additionalAngle:r?V/s:0};let c;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const u=Od(i,h,l);n.push(u),a==="auto"&&(u.visible=Ld(u,c),u.visible&&(c=u))}return n}function Fd(i){return i===0||i===180?"center":i<180?"left":"right"}function Id(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function Nd(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function zd(i,t,e){const{left:n,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!z(a)){const l=Kt(t.borderRadius),c=J(t.backdropPadding);i.fillStyle=a;const h=n-c.left,u=s-c.top,g=o-n+c.width,d=r-s+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Ge(i,{x:h,y:u,w:g,h:d,radius:l}),i.fill()):i.fillRect(h,u,g,d)}}function Bd(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const r=n.setContext(i.getPointLabelContext(s));zd(e,r,o);const a=K(r.font),{x:l,y:c,textAlign:h}=o;Ht(e,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function oa(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,q);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function Hd(i,t,e,n,s){const o=i.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!n||!a||!l||e<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),oa(i,e,r,n),o.closePath(),o.stroke(),o.restore())}function Wd(i,t,e){return Dt(i,{label:e,index:t,type:"pointLabel"})}class Ne extends ti{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=J(Mi(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=G(t)&&!isNaN(t)?t:0,this.max=G(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Mi(this.options))}generateTickLabels(t){ti.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{const s=N(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ad(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=q/(this._pointLabels.length||1),n=this.options.startAngle||0;return at(t*e+Et(n))}getDistanceFromCenterForValue(t){if(z(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(z(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return Wd(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const s=this.getIndexAngle(t)-X+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),oa(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,r=this._pointLabels.length;let a,l,c;if(e.pointLabels.display&&Bd(this,r),s.display&&this.ticks.forEach((h,u)=>{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);const g=this.getContext(u),d=s.setContext(g),p=o.setContext(g);Hd(this,d,l,r,p)}}),n.display){for(t.save(),a=r-1;a>=0;a--){const h=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:g}=h;!g||!u||(t.lineWidth=g,t.strokeStyle=u,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=K(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const u=J(c.backdropPadding);t.fillRect(-r/2-u.left,-o-h.size/2-u.top,r+u.width,h.size+u.height)}Ht(t,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}E(Ne,"id","radialLinear"),E(Ne,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ii.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),E(Ne,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),E(Ne,"descriptors",{angleLines:{_fallback:"grid"}});const si={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},nt=Object.keys(si);function fr(i,t){return i-t}function gr(i,t){if(z(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),G(r)||(r=typeof n=="string"?e.parse(r,n):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(me(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function pr(i,t,e,n){const s=nt.length;for(let o=nt.indexOf(i);o<s-1;++o){const r=si[nt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=n)return nt[o]}return nt[s-1]}function Vd(i,t,e,n,s){for(let o=nt.length-1;o>=nt.indexOf(e);o--){const r=nt[o];if(si[r].common&&i._adapter.diff(s,n,r)>=t-1)return r}return nt[e?nt.indexOf(e):0]}function jd(i){for(let t=nt.indexOf(i)+1,e=nt.length;t<e;++t)if(si[nt[t]].common)return nt[t]}function mr(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:n,hi:s}=Oi(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function $d(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function br(i,t,e){const n=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,n.push({value:a,major:!1});return o===0||!e?n:$d(i,n,s,e)}class ei extends Wt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),s=this._adapter=new Bc._date(t.adapters.date);s.init(e),ce(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:gr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=G(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=G(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=ml(s,o,r);return this._unit=e.unit||(n.autoSkip?pr(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Vd(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:jd(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),br(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=tt(e,0,r),n=tt(n,0,r),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||pr(o.minUnit,e,n,this._getLabelCapacity(e)),a=O(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=me(l)||l===!0,h={};let u=e,g,d;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(n,e,r)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+r);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(g=u,d=0;g<n;g=+t.add(g,a,r),d++)mr(h,g,p);return(g===n||s.bounds==="ticks"||d===1)&&mr(h,g,p),Object.keys(h).sort(fr).map(m=>+m)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,s){const o=this.options,r=o.ticks.callback;if(r)return N(r,[t,e,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],u=c&&a[c],g=n[e],d=c&&u&&g&&g.major;return this._adapter.format(t,s||(d?u:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,s=Et(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,br(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(gr(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return _l(t.sort(fr))}}E(ei,"id","time"),E(ei,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ze(i,t,e){let n=0,s=i.length-1,o,r,a,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=Nt(i,"pos",t)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=Nt(i,"time",t)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class _r extends ei{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ze(e,this.min),this._tableRange=ze(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)h=s[r+1],l=s[r-1],c=s[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(ze(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return ze(this._table,n*this._tableRange+this._minPos,!0)}}E(_r,"id","timeseries"),E(_r,"defaults",ei.defaults);const ra="label";function xr(i,t){typeof i=="function"?i(t):i&&(i.current=t)}function Ud(i,t){const e=i.options;
18e&&t&&Object.assign(e,t)}function aa(i,t){i.labels=t}function la(i,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ra;const n=[];i.datasets=t.map(s=>{const o=i.datasets.find(r=>r[e]===s[e]);return!o||!s.data||n.includes(o)?{...s}:(n.push(o),Object.assign(o,s),o)})}function Yd(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra;const e={labels:[],datasets:[]};return aa(e,i.labels),la(e,i.datasets,t),e}function Xd(i,t){const{height:e=150,width:n=300,redraw:s=!1,datasetIdKey:o,type:r,data:a,options:l,plugins:c=[],fallbackContent:h,updateMode:u,...g}=i,d=dt.useRef(null),p=dt.useRef(),m=()=>{d.current&&(p.current=new ve(d.current,{type:r,data:Yd(a,o),options:l&&{...l},plugins:c}),xr(t,p.current))},b=()=>{xr(t,null),p.current&&(p.current.destroy(),p.current=null)};return dt.useEffect(()=>{!s&&p.current&&l&&Ud(p.current,l)},[s,l]),dt.useEffect(()=>{!s&&p.current&&aa(p.current.config.data,a.labels)},[s,a.labels]),dt.useEffect(()=>{!s&&p.current&&a.datasets&&la(p.current.config.data,a.datasets,o)},[s,a.datasets]),dt.useEffect(()=>{p.current&&(s?(b(),setTimeout(m)):p.current.update(u))},[s,l,a.labels,a.datasets,u]),dt.useEffect(()=>{p.current&&(b(),setTimeout(m))},[r]),dt.useEffect(()=>(m(),()=>b()),[]),f.createElement("canvas",Object.assign({ref:d,role:"img",height:e,width:n},g),h)}const Kd=dt.forwardRef(Xd);function qd(i,t){return ve.register(t),dt.forwardRef((e,n)=>f.createElement(Kd,Object.assign({},e,{ref:n,type:i})))}const yr=qd("line",He);ve.register(wi,Si,je,ae,Xt,pd,sa,ea);ve.register(Xt,sa,ea);const vr={responsive:!0,maintainAspectRatio:!1,scales:{y:{ticks:{callback:function(i,t,e){return Gd(i,2)}}},x:{display:!0,title:{display:!1},ticks:{callback:function(i,t,e){return Qd(this.getLabelForValue(i))}},grid:{display:!1}}},legend:{display:!1},plugins:{title:{display:!1},legend:{display:!1},tooltip:{borderColor:"#B0B9CF",borderWidth:1,boxPadding:15,titleColor:"#00101F",bodyColor:"#00101F",backgroundColor:"#F8F9FC",cornerRadius:0,titleFont:{size:14,family:"Untitled Sans",weight:500},bodyFont:{size:14,family:"Untitled Sans",weight:400},displayColors:!1,callbacks:{label:function(i){let t="";if(t&&(t+=` 19`),i.datasetIndex===0&&i.parsed.y!==null){const e=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(i.parsed.y);if(t+=e,i.dataIndex>0){const n=i.dataset.data[i.dataIndex-1],r=((i.parsed.y-n)/n*100).toFixed(2)+"%";t+=` (${r})`}}return t}}}}},Be=({data:i,index:t,type:e})=>{var s,o,r,a,l,c,h,u;let n=0;if(e==="sales"){const g=((o=(s=i==null?void 0:i.potentialBuyers)==null?void 0:s[t])==null?void 0:o.supply)||0,d=((a=(r=i==null?void 0:i.potentialBuyers)==null?void 0:r[t])==null?void 0:a.demand)||0;return n=g+d,f.createElement("div",{className:"suburb__data-left-item"},f.createElement("ul",{className:"suburb__bar"},[g,d].map((p,m)=>{const b=p/n;return f.createElement("li",{key:m,style:{width:`${b*100}%`}},p&&f.createElement("span",null,p.toFixed(0)))})),f.createElement("ul",{className:"suburb__bars"},f.createElement("li",null,t==="currentHouse"?"Houses":"Units"," Available"),f.createElement("li",null,"Buyers Interested")))}if(e==="rental"){const g=((c=(l=i==null?void 0:i.potentialRenters)==null?void 0:l[t])==null?void 0:c.supply)||0,d=((u=(h=i==null?void 0:i.potentialRenters)==null?void 0:h[t])==null?void 0:u.demand)||0;return n=g+d,f.createElement("div",{className:"suburb__data-left-item"},f.createElement("ul",{className:"suburb__bar"},[g,d].map((p,m)=>{const b=p/n;return f.createElement("li",{key:m,style:{width:`${b*100}%`}},p&&f.createElement("span",null,p.toFixed(0)))})),f.createElement("ul",{className:"suburb__bars"},f.createElement("li",null,t==="currentHouse"?"Houses":"Units"," Available"),f.createElement("li",null,"Renters Interested")))}},$t=(i,t)=>i?i>=1e6?"$"+(i/1e6).toFixed(t)+"m":i>1500?"$"+(i/1e3).toFixed(t).replace(".0","")+"k":"$"+i.toFixed(t).replace(".0","k"):"N/A",Gd=(i,t)=>i?i>=1e6?"$"+(i/1e6).toFixed(t)+"m":i>1500?"$"+(i/1e3).toFixed(t).replace(".00","")+"k":"$"+i.toFixed(t).replace(".00","k"):"N/A";function Qd(i){var t=/^Q1 (\d{4})$/,e=i.match(t);return e?e[1]:""}const lu=({pageContext:i,data:t,location:e})=>{var M,v,P,A,D,T,j,Q,L,I,B,et,U,gt,At,pt,vt,lt,kt,ct,Ui,Yi,Xi,Ki,qi,Gi,Qi,Zi,Ji,tn,en,nn,sn,on,rn,an,ln,cn,hn,dn,un,fn,gn,pn,mn,bn,_n,xn,yn,vn,kn,wn,Sn,Mn,En,Cn,Pn,Dn,An,Tn,On,Ln,Rn,Fn,In,Nn,zn,Bn,Hn,Wn,Vn,jn,$n,Un,Yn,Xn,Kn,qn,Gn,Qn,Zn,Jn,ts,es,is,ns,ss,os,rs,as,ls,cs,hs,ds,us,fs,gs,ps,ms,bs,_s,xs,ys,vs,ks,ws,Ss,Ms,Es,Cs,Ps,Ds,As,Ts,Os,Ls,Rs,Fs,Is,Ns,zs,Bs,Hs,Ws,Vs,js,$s,Us,Ys,Xs,Ks,qs,Gs;const n=Aa(),[s,o]=f.useState("House"),[r,a]=f.useState(2),[l,c]=f.useState(!1),[h,u]=f.useState(!1),g=t==null?void 0:t.related;f.useEffect(()=>{localStorage.getItem("suburbs_unlocked")&&u(!0)}
19,[h]);const d=t==null?void 0:t.datoCmsSuburb,{suburbUnlockTitle:p,suburbUnlockContent:m,suburbUnlockImage:b}=t==null?void 0:t.options,_=t==null?void 0:t.suburbForm;let x=[];(M=d.office)!=null&&M.remoteId&&(x=n==null?void 0:n.filter(C=>{var Y,Jt;if(d.office.remoteId&&((Jt=(Y=C.offices)==null?void 0:Y[0])!=null&&Jt.remoteId))return!!C.offices.find(ke=>ke.remoteId===d.office.remoteId)}),x=x.sort((C,Y)=>{var Qs,Zs;if((C==null?void 0:C.id)==="Mf-Z4mPyRVKVdT0rxkfTaw")return-1;if((Y==null?void 0:Y.id)==="Mf-Z4mPyRVKVdT0rxkfTaw")return 1;const Jt=(Qs=C==null?void 0:C.jobTitle)==null?void 0:Qs.startsWith("Director"),ke=(Zs=Y==null?void 0:Y.jobTitle)==null?void 0:Zs.startsWith("Director");return Jt&&!ke?-1:!Jt&&ke?1:0}));const k={labels:(D=(A=(P=(v=t.datoCmsSuburb.propTrackData)==null?void 0:v.data)==null?void 0:P.medianSalePrice)==null?void 0:A.house)==null?void 0:D.map(C=>C.dateLabel),datasets:[{label:"Median House Value",data:(L=(Q=(j=(T=t.datoCmsSuburb.propTrackData)==null?void 0:T.data)==null?void 0:j.medianSalePrice)==null?void 0:Q.house)==null?void 0:L.map(C=>C==null?void 0:C.value),borderColor:"#B0B9CF",borderWidth:2,backgroundColor:"#00101F",pointBorderWidth:0}]},w={labels:(U=(et=(B=(I=t.datoCmsSuburb.propTrackData)==null?void 0:I.data)==null?void 0:B.medianSalePrice)==null?void 0:et.unit)==null?void 0:U.map(C=>C.dateLabel),datasets:[{label:"Median Unit Value",data:(vt=(pt=(At=(gt=t.datoCmsSuburb.propTrackData)==null?void 0:gt.data)==null?void 0:At.medianSalePrice)==null?void 0:pt.unit)==null?void 0:vt.map(C=>C==null?void 0:C.value),borderColor:"#B0B9CF",borderWidth:2,backgroundColor:"#00101F",pointBorderWidth:0}]};let y=[{label:"Latest",value:"/news-articles/"},{label:"Lifestyle",value:"/category/lifestyle/"},{label:"Community",value:"/category/community/"},{label:"Foundation",value:"/category/foundation/"},{label:"Property Management",value:"/category/property-management/"},{label:"Projects",value:"/category/projects/"},{label:"Industry News",value:"/category/industry/"},{label:"Property Insights",value:"/category/insights/"}],S=(g==null?void 0:g.nodes.length)>0&&((lt=g.nodes[0].categories)==null?void 0:lt.length)>0&&y.find(C=>C.label===g.nodes[0].categories[0].title);return f.createElement(f.Fragment,null,f.createElement(ya,{publishedAt:(ct=(kt=t==null?void 0:t.datoCmsSuburb)==null?void 0:kt.meta)==null?void 0:ct.publishedAt}),f.createElement(ma,{seo:(Ui=t==null?void 0:t.datoCmsSuburb)==null?void 0:Ui.seoMetaTags},f.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"}),f.createElement("body",{className:"suburb-template"})),f.createElement("div",{className:"sticky-header sticky-header--team sticky-header--suburb"},f.createElement("p",null,f.createElement("span",null,d.title),f.createElement("span",null,"Suburb Guide")),((Xi=(Yi=t.datoCmsSuburb)==null?void 0:Yi.next)==null?void 0:Xi.permalink)&&f.createElement("p",null,f.createElement("span",null,"Related:"),f.createElement(Ut,{to:t.datoCmsSuburb.next.permalink},t.datoCmsSuburb.next.title))),f.createElement("section",{className:"suburb__header"},f.createElement("div",{className:"suburb__inner"},d.title&&f.createElement("h1",null,oi(d.title)))),d.featureImage&&f.createElement("section",{className:"suburb__banner"},f.createElement("div",{className:"suburb__inner"},f.createElement(gi,{asset:d.featureImage}))),f.createElement("section",{className:"suburb__content"},f.createElement("div",{className:"suburb__inner"},f.createElement("div",{className:"suburb__introduction"},f.createElement(we,{data:d.introduction})),f.createElement("div",{className:"suburb__wrapper"},f.createElement("div",{className:"suburb__text"},f.createElement("div",{className:`suburb__copy${l?" active":""}`},f.createElement(we,{data:d.richContent})),((Qi=(Gi=(qi=(Ki=d.richContent)==null?void 0:Ki.value)==null?void 0:qi.document)==null?void 0:Gi.children)==null?void 0:Qi.length)>3&&f.createElement("button",{className:`btn${l?" active":""}`,type:"button",onClick:()=>c(!l)},`${l?"View Less":"View More"}`)),f.createElement("div",{className:"suburb__map"},f.createElement(Oa,{suburb:d.title}))))),((Zi=d==null?void 0:d.propTrackData)==null?void 0:Zi.data.medianSalePrice)&&f.createElement("section",{className:"suburb__prices"},f.createElement("div",{className:"suburb__inner"},f.createElement("h3",null,"Property Prices"),f.createElement("div",{className:"suburb__filter"},f.createElement("div",{className:"suburb__filter-left"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,"Property Type"),f.createElement("ul",null,f.createElement("li",null,f.createElement("button",{className:`${s==="House"?"active":""}`,onClick:()=>o("House")},"Houses")),f.createElement("li",null,f.createElement("button",{className:`${s==="Unit"?"active":""}`,onClick:()=>o("Unit")},"Units"))))),f.createElement("div",{className:"suburb__filter-right"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((nn=(en=(tn=(Ji=d==null?void 0:d.propTrackData)==null?void 0:Ji.data)==null?void 0:tn.medianSalePrice)==null?void 0:en[`current${s}`])==null?void 0:nn.value,1)),f.createElement("p",null,"Median ",s," Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(an=(rn=(on=(sn=d==null?void 0:d.propTrackData)==null?void 0:sn.data)==null?void 0:on.medianSalePrice)==null?void 0:rn[`current${s}`])==null?void 0:an.valuePercentChange),f.createElement("p",null,"Quarterly Price Change ",f.createElement($,null))))),f.createElement("div",{className:"suburb__graph"},s==="House"&&f.createElement(yr,{options:vr,data:k}),s==="Unit"&&f.createElement(yr,{options:vr,data:w})),f.createElement("div",{className:"suburb__credit"},f.createElement(Js,null),f.createElement("p",null,"This information is supplied by Marshall White Marketing PL (ABN 80 238 491 017) on behalf of PropTrack Pty Ltd (ABN 43 127 386 298). ",f.createElement("br",null),f.createElement(Ut,{to:"https://www.proptrack.com.au/product-disclaimers/",target:"_blank",rel:"noopener noreferrer"},"Copyright and Legal Disclaimers about Property Data")),f.createElement("p",null,"The State of Victoria owns the copyright in the Property Sales Data and reproduction of that data in any way without the consent of the State of Victoria will constitute a breach of the Copyright Act 1968 (Cth). The State of Victoria does not warrant the accuracy or c
19ompleteness of the Property Sales Data and any person using or relying upon such information does so on the basis that the State of Victoria accepts no responsibility or liability whatsoever for any errors, faults, defects or omissions in the information supplied.")))),!h&&f.createElement("section",{className:"suburb__unlock"},f.createElement("div",{className:"register__inner"},f.createElement("div",{className:"suburb__unlock-wrapper"},f.createElement("div",{className:"suburb__unlock-form"},f.createElement("div",{className:"suburb__unlock-desktop-title"},p&&f.createElement("h4",null,oi(p)),m&&f.createElement("div",null,f.createElement(we,{data:m}))),f.createElement(ba,{onSubmitSuccess:()=>{localStorage.setItem("suburbs_unlocked",!0),u(!0),_a("Suburb Insights"),window.dataLayer&&window.dataLayer.push({event:"suburbUnlocked",suburb:d.title})},onPreSubmit:C=>(fetch("/api/suburb-unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({emailAddress:C.email,firstName:C["first-name"],lastName:C["last-name"],phone:C.phone,suburb:d.title})}),C),form:_})),f.createElement("div",{className:"suburb__unlock-image"},f.createElement("div",{className:"suburb__unlock-mobile-title"},p&&f.createElement("h4",null,oi(p)),m&&f.createElement("div",null,f.createElement(we,{data:m}))),f.createElement(gi,{asset:b}))))),h&&f.createElement(f.Fragment,null,f.createElement("section",{className:"suburb__listings"},f.createElement("div",{className:"suburb__inner"},f.createElement("h3",null,"Current Listings"),f.createElement(to,{defaultArgs:{sort:"_createdAt_DESC",params:""},instanceId:`suburb-our-listings-${d.title}`},f.createElement(io,{name:"params",onAllRefinementsUpdate:({setType:C,setValue:Y})=>{C("DatoCmsProperty"),Y({for:{eq:"sale"},address:{matches:{pattern:d.title,caseSensitive:!1}}})}}),f.createElement(no,{onRenderItem:({item:C})=>f.createElement(wa,{...C}),onRenderGridRow:({children:C})=>f.createElement(f.Fragment,null,C),maxItemsInRow:1,onRenderGrid:({children:C})=>f.createElement("div",{className:"property-archive__list project-archive__list-grid"},C)}),f.createElement(Sa,{onRenderResultsCount:({hasNoNodes:C,loading:Y})=>!C||Y?null:f.createElement("p",{className:"suburb__listings-empty"},"There are currently no properties listed in ",d.title,".")})))),f.createElement("section",{className:"suburb__compare"},f.createElement("div",{className:"suburb__inner"},f.createElement("div",{className:"suburb__compare-left"},f.createElement("h3",null,"Compare Properties"),f.createElement("p",null,"The properties listed below represent a snapshot of the real estate market in the local area, featuring comparable homes that have recently sold, providing valuable insights into current market patterns and property values.")),f.createElement("div",{className:"suburb__compare-right"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,"Property Type"),f.createElement("ul",null,f.createElement("li",null,f.createElement("button",{className:`${s==="House"?"active":""}`,onClick:()=>{o("House"),r<2&&a(2)}},"Houses")),f.createElement("li",null,f.createElement("button",{className:`${s==="Unit"?"active":""}`,onClick:()=>{o("Unit"),r>3&&a(3)}},"Units")))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,"No. of Bedrooms"),f.createElement("ul",null,s==="Unit"&&f.createElement("li",null,f.createElement("button",{className:`${r===1?"active":""}`,onClick:()=>a(1)},"1")),f.createElement("li",null,f.createElement("button",{className:`${r===2?"active":""}`,onClick:()=>a(2)},"2")),f.createElement("li",null,f.createElement("button",{className:`${r===3?"active":""}`,onClick:()=>a(3)},"3")),s==="House"&&f.createElement(f.Fragment,null,f.createElement("li",null,f.createElement("button",{className:`${r===4?"active":""}`,onClick:()=>a(4)},"4")),f.createElement("li",null,f.createElement("button",{className:`${r===5?"active":""}`,onClick:()=>a(5)},"5+")))))),f.createElement("div",{className:"suburb__filter"},f.createElement("div",{className:"suburb__filter-left"},f.createElement("p",null,f.createElement("strong",null,"Recent Sales for ",r," Bedroom ",s,"s"))),f.createElement("div",{className:"suburb__filter-right"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((fn=(un=(dn=(hn=(cn=(ln=d==null?void 0:d.propTrackData)==null?void 0:ln.data)==null?void 0:cn.medianSalePrice)==null?void 0:hn[`current${s}`])==null?void 0:dn.byBedrooms)==null?void 0:un[`count${r===5?"5Plus":r}`])==null?void 0:fn.value,1)),f.createElement("p",null,"Median ",s," Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(bn=(mn=(pn=(gn=d==null?void 0:d.propTrackData)==null?void 0:gn.data)==null?void 0:pn.medianSalePrice)==null?void 0:mn[`current${s}`])==null?void 0:bn.valuePercentChange),f.createElement("p",null,"Quarterly Price Change ",f.createElement($,null))))),f.createElement("div",{className:"suburb__archive"},f.createElement(to,{defaultArgs:{sort:"_createdAt_DESC",params:""},key:`${r}-${s}-${d.title}`,instanceId:`suburb-${d.title}`},f.createElement(io,{name:"params",onAllRefinementsUpdate:({setType:C,setValue:Y})=>{C("DatoCmsProperty"),Y({for:{eq:"sold"},beds:{eq:r},propertyType:{eq:s},address:{matches:{pattern:d.title,caseSensitive:!1}}})}}),f.createElement(no,{onRenderItem:({item:C})=>f.createElement(La,{...C}),onRenderGridRow:({children:C})=>f.createElement("div",null,C),maxItemsInRow:1,onRenderGrid:({children:C})=>f.createElement("div",null,C)}),f.createElement("div",{className:"property-archive__load"},f.createElement(Ma,null)))))),f.createElement("section",{className:"suburb__data"},f.createElement("div",{className:"suburb__inner"},f.createElement("h3",null,"Suburb Data"),f.createElement("div",{className:"suburb__data-item"},f.createElement("h4",null,"Sales Snapshot"),f.createElement("div",{className:"suburb__data-left"},f.createElement(Be,{data:(_n=d==null?void 0:d.propTrackData)==null?void 0:_n.data,index:"currentHouse",type:"sales"}),f.createElement("div",{className:"suburb__data-right-row mobile"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((kn=(vn=(yn=(xn=d==null?void 0:d.propTrackData)==null?void 0:xn.data)==null?void 0:yn.saleTransactionVolume)==null?void 0:vn.currentHouse)==null?void 0:kn.value.toFixed(0))||"N/A"," sold"),f.createElement("p",null,"in the past 12 months ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((En=(Mn=(Sn=(wn=d==null?void 0:d.propTrackData)==null?void 0:wn.data)==null?void 0:Sn.saleMedianDaysOnMarket)==null?void 0:Mn.house[0])==null?void 0:En.value)||"N/A"),f.createElement("p",null,"Median Days on Market ",f.createElement($,null)))),f.createElement(Be,{data:(Cn=d==null?void 0:d.propTrackData)==null?void 0:Cn.data,index:"currentUnit",type:"sales"}),f.createElement("div",{className:"suburb__data-right-row mobile"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((Tn=(An=(Dn=(Pn=d==null?void 0:d.propTrackData)==null?void 0:Pn.data)==null?void 0:Dn.saleTransactionVolume)==null?void 0:An.currentUnit)==null?void 0:Tn.value.toFixed(0))||"N/A"," sold"),f.createElement("p",null,"in the past 12 months ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((In=(Fn=(Rn=(Ln=(On=d==null?void 0:d.propTrackData)==null?void 0:On.data)==null?void 0:Ln.saleMedianDaysOnMarket)==null?void 0:Rn.unit)==null?void 0:Fn[0])==null?void 0:In.value)||"N/A"),f.createElement("p",null,"Median Days on Market ",f.createElement($,null))))),f.createElement("div",{className:"suburb__data-right"},f.createElement("div",{className:"suburb__data-right-row desktop"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((Hn=(Bn=(zn=(Nn=d==null?void 0:d.propTrackData)==null?void 0:Nn.data)==null?void 0:zn.saleTransactionVolume)==null?void 0:Bn.currentHouse)==null?void 0:Hn.value.toFixed(0))||"N/A"," sold"),f.createElement("p",null,"in the past 12 months ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(($n=(jn=(Vn=(Wn=d==null?void 0:d.propTrackData)==null?void 0:Wn.data)==null?void 0:Vn.saleMedianDaysOnMarket)==null?void 0:jn.house[0])==null?void 0:$n.value)||"N/A"),f.createElement("p",null,"Median Days on Market ",f.createElement($,null)))),f.createElement("div",{className:"suburb__data-right-row desktop"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((Kn=(Xn=(Yn=(Un=d==null?void 0:d.propTrackData)==null?void 0:Un.data)==null?void 0:Yn.saleTransactionVolume)==null?void 0:Xn.
19currentUnit)==null?void 0:Kn.value.toFixed(0))||"N/A"," sold"),f.createElement("p",null,"in the past 12 months ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,((Jn=(Zn=(Qn=(Gn=(qn=d==null?void 0:d.propTrackData)==null?void 0:qn.data)==null?void 0:Gn.saleMedianDaysOnMarket)==null?void 0:Qn.unit)==null?void 0:Zn[0])==null?void 0:Jn.value)||"N/A"),f.createElement("p",null,"Median Days on Market ",f.createElement($,null)))))),f.createElement("div",{className:"suburb__data-item"},f.createElement("h4",null,"Rental Snapshot"),f.createElement("div",{className:"suburb__data-left"},f.createElement(Be,{data:(ts=d==null?void 0:d.propTrackData)==null?void 0:ts.data,index:"currentHouse",type:"rental"}),f.createElement("div",{className:"suburb__data-right-row mobile"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((ss=(ns=(is=(es=d==null?void 0:d.propTrackData)==null?void 0:es.data)==null?void 0:is.medianRentalPrice)==null?void 0:ns.currentHouse)==null?void 0:ss.value,0),"/wk"),f.createElement("p",null,"Median Rental Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(ls=(as=(rs=(os=d==null?void 0:d.propTrackData)==null?void 0:os.data)==null?void 0:rs.medianRentalYield)==null?void 0:as.currentHouse)!=null&&ls.value?`${((us=(ds=(hs=(cs=d==null?void 0:d.propTrackData)==null?void 0:cs.data)==null?void 0:hs.medianRentalYield)==null?void 0:ds.currentHouse)==null?void 0:us.value)*100}%`:"N/A"),f.createElement("p",null,"Rental Yield ",f.createElement($,null)))),f.createElement(Be,{data:(fs=d==null?void 0:d.propTrackData)==null?void 0:fs.data,index:"currentUnit",type:"rental"}),f.createElement("div",{className:"suburb__data-right-row mobile"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((bs=(ms=(ps=(gs=d==null?void 0:d.propTrackData)==null?void 0:gs.data)==null?void 0:ps.medianRentalPrice)==null?void 0:ms.currentUnit)==null?void 0:bs.value,0),"/wk"),f.createElement("p",null,"Median Rental Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(vs=(ys=(xs=(_s=d==null?void 0:d.propTrackData)==null?void 0:_s.data)==null?void 0:xs.medianRentalYield)==null?void 0:ys.currentUnit)!=null&&vs.value?`${((Ms=(Ss=(ws=(ks=d==null?void 0:d.propTrackData)==null?void 0:ks.data)==null?void 0:ws.medianRentalYield)==null?void 0:Ss.currentUnit)==null?void 0:Ms.value)*100}%`:"N/A"),f.createElement("p",null,"Rental Yield ",f.createElement($,null))))),f.createElement("div",{className:"suburb__data-right"},f.createElement("div",{className:"suburb__data-right-row desktop"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((Ds=(Ps=(Cs=(Es=d==null?void 0:d.propTrackData)==null?void 0:Es.data)==null?void 0:Cs.medianRentalPrice)==null?void 0:Ps.currentHouse)==null?void 0:Ds.value,0),"/wk"),f.createElement("p",null,"Median Rental Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(Ls=(Os=(Ts=(As=d==null?void 0:d.propTrackData)==null?void 0:As.data)==null?void 0:Ts.medianRentalYield)==null?void 0:Os.currentHouse)!=null&&Ls.value?`${((Ns=(Is=(Fs=(Rs=d==null?void 0:d.propTrackData)==null?void 0:Rs.data)==null?void 0:Fs.medianRentalYield)==null?void 0:Is.currentHouse)==null?void 0:Ns.value)*100}%`:"N/A"),f.createElement("p",null,"Rental Yield ",f.createElement($,null)))),f.createElement("div",{className:"suburb__data-right-row desktop"},f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,$t((Ws=(Hs=(Bs=(zs=d==null?void 0:d.propTrackData)==null?void 0:zs.data)==null?void 0:Bs.medianRentalPrice)==null?void 0:Hs.currentUnit)==null?void 0:Ws.value,0),"/wk"),f.createElement("p",null,"Median Rental Price ",f.createElement($,null))),f.createElement("div",{className:"suburb__toggle"},f.createElement("h4",null,(Us=($s=(js=(Vs=d==null?void 0:d.propTrackData)==null?void 0:Vs.data)==null?void 0:js.medianRentalYield)==null?void 0:$s.currentUnit)!=null&&Us.value?`${((qs=(Ks=(Xs=(Ys=d==null?void 0:d.propTrackData)==null?void 0:Ys.data)==null?void 0:Xs.medianRentalYield)==null?void 0:Ks.currentUnit)==null?void 0:qs.value)*100}%`:"N/A"),f.createElement("p",null,"Rental Yield ",f.createElement($,null)))))),f.createElement("div",{className:"suburb__credit"},f.createElement(Js,null),f.createElement("p",null,"This information is supplied by Marshall White Marketing PL (ABN 80 238 491 017) on behalf of PropTrack Pty Ltd (ABN 43 127 386 298). ",f.createElement("br",null),f.createElement(Ut,{to:"https://www.proptrack.com.au/product-disclaimers/",target:"_blank",rel:"noopener noreferrer"},"Copyright and Legal Disclaimers about Property Data")),f.createElement("p",null,"The State of Victoria owns the copyright in the Property Sales Data and reproduction of that data in any way without the consent of the State of Victoria will constitute a breach of the Copyright Act 1968 (Cth). The State of Victoria does not warrant the accuracy or c
19ompleteness of the Property Sales Data and any person using or relying upon such information does so on the basis that the State of Victoria accepts no responsibility or liability whatsoever for any errors, faults, defects or omissions in the information supplied.")))),(x==null?void 0:x.length)>0&&f.createElement("section",{className:"agent-archive"},f.createElement("div",{className:"agent-archive__inner"},f.createElement("div",{className:"agent-archive__filter"},f.createElement("div",{className:"filter"},f.createElement("ul",null,f.createElement("li",null,f.createElement("strong",null,d.title," Agents"))),f.createElement(Ut,{className:"btn btn--white",to:`/agents/${xa({office:d.office.id,title:`${d.title} Agents`})}`},"View More ",f.createElement(eo,null)))),f.createElement("div",{className:"agent-archive__list agent-archive__list-grid"},x==null?void 0:x.slice(0,4).map((C,Y)=>f.createElement(Ea,{key:Y,...C}))))),((Gs=g==null?void 0:g.nodes)==null?void 0:Gs.length)>0&&f.createElement("section",{className:"archive archive--related"},f.createElement("div",{className:"archive__inner"},f.createElement("div",{className:"filter"},f.createElement("h3",null,"Related Reading"),f.createElement(Ut,{className:"btn btn--white",to:S.value},"View All",f.createElement(eo,null))),f.createElement("div",{className:"archive__items"},g==null?void 0:g.nodes.map((C,Y)=>f.createElement("div",{className:"archive__item",key:Y},f.createElement(va,{...C}))))))),f.createElement(Ca,{...t.options.suburbCta[0]}))},cu={queryId:"a26dd0768c14c3e461cad58b2580cfa2c42bce8c"};export{lu as default,cu as query};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.