blue-chestnut-solar-expert 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-draw.solar-expert.solar-system-form.entry.cjs.js.map +1 -1
- package/dist/cjs/map-draw_3.cjs.entry.js +254 -34
- package/dist/cjs/map-draw_3.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
- package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/components/map-draw/map-draw.js +9 -7
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +3 -1
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +106 -23
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/output.css +12 -0
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +40 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/general.js +23 -3
- package/dist/collection/utils/lang/general.js.map +1 -1
- package/dist/collection/utils/lang/german.js +74 -0
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +75 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -0
- package/dist/components/map-draw.js +1 -1
- package/dist/components/{p-DuF8Bxfn.js → p-C6zdkCkY.js} +288 -27
- package/dist/components/p-C6zdkCkY.js.map +1 -0
- package/dist/components/{p-C2Mo0x2g.js → p-CXGY4i5A.js} +13 -55
- package/dist/components/p-CXGY4i5A.js.map +1 -0
- package/dist/components/solar-calculator.js +2 -2
- package/dist/components/solar-calculator.js.map +1 -1
- package/dist/components/solar-expert.js +5 -4
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-draw.solar-expert.solar-system-form.entry.js.map +1 -1
- package/dist/esm/map-draw_3.entry.js +254 -34
- package/dist/esm/map-draw_3.entry.js.map +1 -1
- package/dist/esm/solar-calculator.entry.js +2 -2
- package/dist/esm/solar-calculator.entry.js.map +1 -1
- package/dist/esm/stencil-library.js +1 -1
- package/dist/stencil-library/map-draw.solar-expert.solar-system-form.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-dc4824e6.entry.js +44 -0
- package/dist/stencil-library/p-dc4824e6.entry.js.map +1 -0
- package/dist/stencil-library/p-de9a8d56.entry.js +2 -0
- package/dist/stencil-library/p-de9a8d56.entry.js.map +1 -0
- package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +9 -3
- package/dist/types/components.d.ts +8 -0
- package/dist/types/types/lang.d.ts +40 -0
- package/dist/types/utils/lang/german.d.ts +2 -0
- package/dist/types/utils/lang/spanish.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/p-C2Mo0x2g.js.map +0 -1
- package/dist/components/p-DuF8Bxfn.js.map +0 -1
- package/dist/stencil-library/p-319691e6.entry.js +0 -2
- package/dist/stencil-library/p-319691e6.entry.js.map +0 -1
- package/dist/stencil-library/p-642688b2.entry.js +0 -44
- package/dist/stencil-library/p-642688b2.entry.js.map +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{r as t,g as n,h as e,E as i}from"./p-D0YnIAAN.js";import{f as s,d as o,L as r,c as a,S as c}from"./p-DYAbWcg8.js";function l(t,n,e){if(!e){e=document.createElement("canvas")}e.width=t.width;e.height=t.height;const i=t.width/e.width;const s=t.height/e.height;const o=e.getContext("2d");const r=o.getImageData(0,0,e.width,e.height);for(let n=0;n<e.height;n++){for(let o=0;o<e.width;o++){const a=Math.floor(n*s)*t.width+Math.floor(o*i);const c=n*e.width*4+o*4;const l=.65;r.data[c+0]=Math.round(t.rasters[0][a]*l);r.data[c+1]=Math.round(t.rasters[1][a]*l);r.data[c+2]=Math.round(t.rasters[2][a]*l);r.data[c+3]=255}}o.putImageData(r,0,0);return e}function h(t,n,e,i,s,o){const{x:r,y:a}=t.pixelPosition;let c=e;let l=i*Math.cos(o*Math.PI/180);if(t.horizontal){c=i;l=e*Math.cos(o*Math.PI/180)}n.save();n.translate(r,a);n.rotate(s*Math.PI/180);n.fillStyle="rgba(115, 143, 255, 1)";n.fillRect(-c/2,-l/2,c,l);n.strokeStyle="rgba(0, 0, 0, 0.8)";n.lineWidth=1;n.strokeRect(-c/2,-l/2,c,l);n.restore()}function f({rgb:t,zoom:n=1,canvas:e}){const i=l(t,undefined,e);const s=i.getContext("2d");const o=s.getImageData(0,0,i.width,i.height);const r=i.width;const a=i.height;const c=Math.floor(r*n);const h=Math.floor(a*n);const f=Math.floor((r-c)/2);const u=Math.floor((a-h)/2);const d=new ImageData(c,h);for(let t=0;t<a;t++){for(let n=0;n<r;n++){const e=(t*r+n)*4;if(n>=f&&n<f+c&&t>=u&&t<u+h){const i=n-f;const s=t-u;const r=(s*c+i)*4;d.data[r]=o.data[e];d.data[r+1]=o.data[e+1];d.data[r+2]=o.data[e+2];d.data[r+3]=255}}}i.width=c;i.height=h;s.putImageData(d,0,0);return i}const u="rgba(0, 0, 0, 0.5)";const d=1;const p=1;const g=.2;const b=600;function m({x:t,y:n,lastPoint:e,secondLastPoint:i}){const s=e.x-i.x;const o=e.y-i.y;const r=-o;const a=s;const c=Math.sqrt(r*r+a*a);const l=r/c;const h=a/c;const f={x:t-e.x,y:n-e.y};const u=f.x*l+f.y*h;t=e.x+l*u;n=e.y+h*u;return{x:t,y:n}}function w({polygonCtx:t,polygonCanvas:n,polygon:e,shiftKeyPressed:i,mousePoint:s,strokeColor:o,fillColor:r}){if(!t||!n)return;t.beginPath();t.strokeStyle=o;t.lineWidth=2;e.points.forEach(((n,e)=>{if(e===0){t.moveTo(n.x,n.y)}else{t.lineTo(n.x,n.y)}}));if(e.closed){t.lineTo(e.points[0].x,e.points[0].y);if(r){t.fillStyle=r;t.fill()}}if(e.points.length>0){t.stroke()}if(e.points.length>1&&!e.closed&&i){const n=m({x:s.x,y:s.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});y({ctx:t,startPoint:n,endPoint:e.points[e.points.length-1],strokeStyle:u})}if(i&&e.points.length>1&&!e.closed){const n=m({x:s.x,y:s.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});x({ctx:t,x:n.x,y:n.y,radius:5,strokeStyle:u})}e.points.forEach((n=>{t.beginPath();const e=o;const i=Math.sqrt(Math.pow(n.x-s.x,2)+Math.pow(n.y-s.y,2));if(i<10){x({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:8})}else{x({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:5})}t.stroke()}))}function x({ctx:t,x:n,y:e,radius:i,strokeStyle:s="black",lineWidth:o=2}){t.beginPath();t.strokeStyle=s;t.lineWidth=o;t.arc(n,e,i,0,2*Math.PI);t.stroke()}function y({ctx:t,startPoint:n,endPoint:e,dashPattern:i=[5,5],strokeStyle:s="black",lineWidth:o=2}){t.beginPath();t.strokeStyle=s;t.lineWidth=o;t.setLineDash(i);t.moveTo(n.x,n.y);t.lineTo(e.x,e.y);t.stroke();t.setLineDash([])}function v(t,n){if(!n.closed||n.points.length<3)return false;const e=n.points.length;const i=t.x;const s=t.y;let o=false;let r=n.points[0];let a;for(let t=1;t<=e;t++){a=n.points[t%e];if(s>Math.min(r.y,a.y)){if(s<=Math.max(r.y,a.y)){if(i<=Math.max(r.x,a.x)){const t=(s-r.y)*(a.x-r.x)/(a.y-r.y)+r.x;if(r.x===a.x||i<=t){o=!o}}}}r=a}return o}const M=[{key:"shift",description:"add one point on perpendicular line"}];const k={name:"move",ariaLabel:"Move",icon:"move",cursor:"move",keyboardShortcut:"m",explanation:"Move points of the active polygon"};const _={name:"roof",ariaLabel:"Roof Area",icon:"house",cursor:"crosshair",keyboardShortcut:"r",keyboardCombinations:M,explanation:"Draw the roof of the building"};const S={name:"obstruction",ariaLabel:"Obstruction",icon:"octagon-minus",cursor:"crosshair",keyboardShortcut:"o",keyboardCombinations:M,explanation:"Draw the obstruction of the building"};const z={name:"delete",ariaLabel:"Delete",icon:"eraser",cursor:"default",keyboardShortcut:"d",explanation:"Delete the active polygon"};const O=[k,_,S,z];const C={openRoofColor:"#d6eeff",closedRoofColor:"#ffffff",openObstructionColor:"#f57242",closedObstructionColor:"rgba(255, 132, 107, 0.8)",roofPolygonFillColor:"rgba(92, 187, 255, 0.5)",obstructionPolygonFillColor:"rgba(255, 132, 107, 0.5)",roofPolygonHoverFillColor:"rgba(92, 187, 255, 0.8)",obstructionPolygonHoverFillColor:"rgba(255, 132, 107, 0.8)",roofPolygonSelectedFillColor:"rgba(92, 187, 255, 0.7)",obstructionPolygonSelectedFillColor:"rgba(255, 132, 107, 0.7)"};const D={widthMeters:1.134,heightMeters:1.762,kWattPeak:.455,efficiency:.224,price:77.68};function A(t,n,e,i,s){const o=n?.type===i.type&&n?._id===e;if(o){return i.type==="roof"?s.roofPolygonHoverFillColor:s.obstructionPolygonHoverFillColor}const r=t?.type===i.type&&t?._id===e;if(r){return i.type==="roof"?s.roofPolygonSelectedFillColor:s.obstructionPolygonSelectedFillColor}if(i.type==="roof"){return i.closed?s.roofPolygonFillColor:undefined}return i.closed?s.obstructionPolygonFillColor:undefined}var j=[];for(var P=0;P<256;++P){j.push((P+256).toString(16).slice(1))}function E(t,n=0){return(j[t[n+0]]+j[t[n+1]]+j[t[n+2]]+j[t[n+3]]+"-"+j[t[n+4]]+j[t[n+5]]+"-"+j[t[n+6]]+j[t[n+7]]+"-"+j[t[n+8]]+j[t[n+9]]+"-"+j[t[n+10]]+j[t[n+11]]+j[t[n+12]]+j[t[n+13]]+j[t[n+14]]+j[t[n+15]]).toLowerCase()}var L;var R=new Uint8Array(16);function N(){if(!L){L=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!L){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return L(R)}var I=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var T={randomUUID:I};function F(t,n,e){if(T.randomUUID&&true&&!t){return T.randomUUID()}t=t||{};var i=t.random||(t.rng||N)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;return E(i)}function W(t){let n=0;for(let e=0;e<t.length;e++){const i=(e+1)%t.length;n+=t[e].x*t[i].y;n-=t[i].x*t[e].y}return Math.abs(n/2)}function B(t){if(t>=337.5||t<22.5)return"North";if(t>=22.5&&t<67.5)return"Northeast";if(t>=67.5&&t<112.5)return"East";if(t>=112.5&&t<157.5)return"Southeast";if(t>=157.5&&t<202.5)return"South";if(t>=202.5&&t<247.5)return"Southwest";if(t>=247.5&&t<292.5)return"West";return"Northwest"}function $(t,n,e){const i=n.getContext("2d");if(!i){throw new Error("Canvas context not found")}const s=e=>n.height*(1-(e-t.south)/(t.north-t.south));const o=e=>n.width*(e-t.west)/(t.east-t.west);return{x:o(e.longitude),y:s(e.latitude)}}function H(t){const n=t.bounds.north-t.bounds.south;const e=t.height;const i=n*111320/e;return i}function Y(t,n){const e=n*(Math.PI/180);const i=t.x*Math.cos(e)-t.y*Math.sin(e);const s=t.x*Math.sin(e)+t.y*Math.cos(e);return{x:i,y:s}}function V(t,n){return{points:t.points.map((t=>Y(t,n))),type:t.type,closed:t.closed,_id:t._id,details:t.details}}function U(t,n){if(t.points.length===0){return{polygon:t,offset:{x:0,y:0}}}let e=0;let i=0;if(!n){const n=Math.min(...t.points.map((t=>t.x)));const s=Math.min(...t.points.map((t=>t.y)));const o=Math.max(...t.points.map((t=>t.x)));const r=Math.max(...t.points.map((t=>t.y)));e=n+(o-n)/2;i=s+(r-s)/2}else{e=n.x;i=n.y}const s=t.points.map((t=>({x:t.x-e,y:t.y-i})));return{polygon:{...t,points:s},offset:{x:e,y:i}}}function X(t,n){return t.x===n.x&&t.y===n.y}function K(t,n){const e=t.start;const i=t.end;const s=n.start;const o=n.end;if(X(e,s)||X(e,o)||X(i,s)||X(i,o)){return false}const r=(o.x-s.x)*(e.y-s.y)-(o.y-s.y)*(e.x-s.x);const a=(o.x-s.x)*(i.y-s.y)-(o.y-s.y)*(i.x-s.x);const c=(i.x-e.x)*(s.y-e.y)-(i.y-e.y)*(s.x-e.x);const l=(i.x-e.x)*(o.y-e.y)-(i.y-e.y)*(o.x-e.x);return r*a<0&&c*l<0}function Z(t,n,e,i){const s={minX:Math.min(...t.points.map((t=>t.x))),maxX:Math.max(...t.points.map((t=>t.x))),minY:Math.min(...t.points.map((t=>t.y))),maxY:Math.max(...t.points.map((t=>t.y)))};let o=null;let r=0;for(const t of n){const n=$(e,i,{latitude:t.boundingBox.sw.latitude,longitude:t.boundingBox.sw.longitude});const a=$(e,i,{latitude:t.boundingBox.ne.latitude,longitude:t.boundingBox.ne.longitude});const c={minX:n.x,maxX:a.x,minY:a.y,maxY:n.y};const l=Math.max(s.minX,c.minX);const h=Math.min(s.maxX,c.maxX);const f=Math.max(s.minY,c.minY);const u=Math.min(s.maxY,c.maxY);const d=h-l;const p=u-f;let g=0;if(d>0&&p>0){g=d*p}const b=(s.maxX-s.minX)*(s.maxY-s.minY);const m=(c.maxX-c.minX)*(c.maxY-c.minY);const w=b+m-g;const x=w>0?g/w:0;if(x>r){r=x;o=t}}return o}function q(t,n,e,i,s,o){const r=[];const a=e?n.heightMeters:n.widthMeters;const c=Math.ceil((t.maxX-t.minX)/a);const l=e?n.widthMeters:n.heightMeters;const h=Math.ceil((t.maxY-t.minY)/l);const f=a/2;const u=l/2;const d=i.x-Math.ceil((i.x-t.minX)/a)*a;const p=i.y-Math.ceil((i.y-t.minY)/l)*l;for(let t=0;t<h;t++){const i=[];for(let r=0;r<c;r++){const c=d+r*a+r*o+f;const h=p+t*l+t*s+u;const g={panel:n,pixelPosition:{x:c,y:h},horizontal:e};i.push(g)}r.push(i)}return r}function Q(t,n){const e=n?t.panel.heightMeters:t.panel.widthMeters;const i=n?t.panel.widthMeters:t.panel.heightMeters;const s={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y-i/2};const o={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y+i/2};const r={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y+i/2};const a={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y-i/2};const c=[{start:s,end:o},{start:o,end:r},{start:r,end:a},{start:a,end:s}];return c}function G(t,n,e){const i=Q(t,e);if(v(t.pixelPosition,n)){return true}for(let t=0;t<n.points.length;t++){const e=n.points[t];const s=n.points[(t+1)%n.points.length];const o={start:e,end:s};for(const t of i){if(K(t,o)){return true}}}return false}function J(t,n,e){const i=Q(t,e);for(let t=0;t<n.points.length;t++){const e=n.points[t];const s=n.points[(t+1)%n.points.length];const o={start:e,end:s};for(const t of i){if(K(t,o)){return false}}}return v(t.pixelPosition,n)}function tt(t,n,e){for(const i of n){if(G(t,i.polygon,e)){return true}}return false}function nt(t,n,e,i){const s=[];for(const o of t){let t=[];for(const s of o){const o=tt(s,i,e);if(J(s,n,e)&&!o){t.push(s)}}s.push(t)}return s}function et(t,n,e,i){const s=Math.min(...t.points.map((t=>t.x)));const o=Math.max(...t.points.map((t=>t.x)));const r=Math.min(...t.points.map((t=>t.y)));const a=Math.max(...t.points.map((t=>t.y)));const c={minX:s,maxX:o,minY:r,maxY:a};console.log("solar",e);const l={...e,widthMeters:e.widthMeters*Math.cos(i*Math.PI/180),heightMeters:e.heightMeters};const h={...e,widthMeters:e.widthMeters,heightMeters:e.heightMeters*Math.cos(i*Math.PI/180)};let f=[];let u=0;for(const e of t.points){for(const i of[false]){const s=q(c,i?l:h,i,e,d,p);const o=nt(s,t,i,n);const r=o.reduce(((t,n)=>t+n.length),0);if(r>u){u=r;f=o}}break}return f}function it(t,n,e,i){const s=[];for(const o of t){const t=U(o,e);const r=V(t.polygon,-n);const a=ot(r,-i);const c=Math.min(...a.points.map((t=>t.x)));const l=Math.max(...a.points.map((t=>t.x)));const h=Math.min(...a.points.map((t=>t.y)));const f=Math.max(...a.points.map((t=>t.y)));const u={minX:c,maxX:l,minY:h,maxY:f};s.push({polygon:r,boundingBox:u})}return s}function st(t){let n=0;for(let e=0;e<t.length;e++){const i=t[e];const s=t[(e+1)%t.length];n+=(s.x-i.x)*(s.y+i.y)}return n>0}function ot(t,n){const e=t.points;const i=st(e);n=n*Math.sqrt(2)*(i?-1:1);const s=[];for(let t=0;t<e.length;t++){const i=e[(t-1+e.length)%e.length];const o=e[t];const r=e[(t+1)%e.length];const a={x:o.x-i.x,y:o.y-i.y};const c={x:r.x-o.x,y:r.y-o.y};const l={x:-a.y,y:a.x};const h={x:-c.y,y:c.x};const f=Math.sqrt(l.x*l.x+l.y*l.y);const u=Math.sqrt(h.x*h.x+h.y*h.y);l.x/=f;l.y/=f;h.x/=u;h.y/=u;const d={x:l.x+h.x,y:l.y+h.y};const p=Math.sqrt(d.x*d.x+d.y*d.y);d.x/=p;d.y/=p;const g={x:o.x+d.x*n,y:o.y+d.y*n};s.push(g)}return{points:s,type:t.type,closed:t.closed,_id:t._id,details:t.details}}function rt(t,n,e,i,s,o){const r=ot(t,s);const a=U(r);const c=V(a.polygon,-i);const l=it(n,i,a.offset,s);const h=et(c,l,e,o);const f=[];for(const t of h.flat()){const n=Y(t.pixelPosition,i);const e={x:n.x+a.offset.x,y:n.y+a.offset.y};f.push({panel:t.panel,pixelPosition:e,horizontal:t.horizontal})}return f}const at={mapDraw:{noPolygonSelected:"No polygon selected",noAddressSelected:"Please select an address",information:"Information",calculateSolarPanels:"Calculate Solar Panels",panels:"Panels",area:"Area",azimuth:"Azimuth",pitch:"Pitch",tools:{roof:{name:"Roof",explanation:"Draw the roof of the building",ariaLabel:"Roof"},obstruction:{name:"Obstruction",explanation:"Draw the obstruction of the building",ariaLabel:"Obstruction"},delete:{name:"Delete",explanation:"Delete the selected polygon",ariaLabel:"Delete"},move:{name:"Move",explanation:"Move the selected polygon",ariaLabel:"Move"}}}};const ct={en:at,es:{},de:{}};function lt(t){return ct[t]}const ht='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const ft=1;const ut=class{constructor(n){t(this,n)}language="en";apiKey="";latitude=null;longitude=null;config=C;solarPanel=D;zoom=1;loadingState="empty";rgbTiff=null;draggedPointIndex=null;hoveredPointIndex=null;hoveredPolygon=null;shiftKeyPressed=false;altKeyPressed=false;mousePoint=null;currentTool=_;roofPolygons={};roofPolygonsSolarPanels={};obstructionPolygons={};selectedPolygon=null;buildingInsights=null;pixelInMeters=.2;showAzimuth=true;get el(){return n(this)}canvasElement;polygonCanvas;polygonCtx;getCurrentPolygon(){if(!this.selectedPolygon){return null}const{_id:t,type:n}=this.selectedPolygon;return n==="roof"?this.roofPolygons[t]:this.obstructionPolygons[t]}componentDidLoad(){if(this.latitude&&this.longitude){this.loadingState="loading"}requestAnimationFrame((()=>{if(this.canvasElement){const t=this.canvasElement.getBoundingClientRect();this.canvasElement.width=t.width;this.canvasElement.height=t.height;this.drawMap()}}))}sizeCanvas(t,n){if(this.polygonCanvas){this.polygonCanvas.width=t;this.polygonCanvas.height=n;this.polygonCtx=this.polygonCanvas.getContext("2d")}}async getBuildingInsights(){if(!this.latitude||!this.longitude){return}this.loadingState="loading";if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}this.obstructionPolygons={};this.roofPolygons={};this.selectedPolygon=null;this.hoveredPolygon=null;this.canvasElement.getContext("2d")?.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);this.polygonCtx?.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);this.rgbTiff=null}this.buildingInsights=await s(this.latitude,this.longitude,this.apiKey);if(!this.buildingInsights){alert("No building insights found. Please enter them manually.")}}async getBuildingImages(){if(!this.latitude||!this.longitude){return}if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}}this.rgbTiff=await o(this.latitude,this.longitude,this.apiKey);this.pixelInMeters=H(this.rgbTiff);this.loadingState="loaded"}async drawMap(){if(!this.canvasElement||!this.rgbTiff||!this.buildingInsights)return;this.sizeCanvas(this.rgbTiff.width,this.rgbTiff.height);f({rgb:this.rgbTiff,zoom:this.zoom,canvas:this.canvasElement})}handleMouseMove(t){if(!this.polygonCanvas||!this.polygonCtx)return;const n=this.polygonCanvas.getBoundingClientRect();const e=t.clientX-n.left;const i=t.clientY-n.top;this.mousePoint={x:e,y:i};const s=this.getCurrentPolygon();const o=s?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));let r=null;for(const t of Object.values(this.obstructionPolygons)){if(v({x:e,y:i},t)){r={_id:t._id,type:"obstruction"};break}}if(!r){for(const t of Object.values(this.roofPolygons)){if(v({x:e,y:i},t)){r={_id:t._id,type:"roof"};break}}}if(o!==this.hoveredPointIndex||JSON.stringify(r)!==JSON.stringify(this.hoveredPolygon)){this.hoveredPointIndex=o;this.hoveredPolygon=r;this.drawPolygons()}if(this.draggedPointIndex!==null&&s&&this.currentTool.name==="move"){s.points[this.draggedPointIndex]={x:e,y:i};this.drawPolygons()}if(this.shiftKeyPressed){this.drawPolygons()}}drawPolygons(){if(!this.polygonCanvas||!this.polygonCtx)return;this.polygonCtx.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);for(const t of Object.values(this.roofPolygons)){const n=A(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);w({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,strokeColor:t.closed?this.config.closedRoofColor:this.config.openRoofColor,fillColor:n,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint});const e=this.roofPolygonsSolarPanels[t._id];const i={widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};if(e){for(const n of e.positionedPanels){h(n,this.polygonCtx,i.widthMeters,i.heightMeters,t.details?.azimuth,t.details?.pitch)}}}for(const t of Object.values(this.obstructionPolygons)){const n=A(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);w({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint,strokeColor:t.closed?this.config.closedObstructionColor:this.config.openObstructionColor,fillColor:n})}}deletePolygon(t){if(this.selectedPolygon?._id===t){this.selectedPolygon=null}if(this.roofPolygons[t]){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}if(this.obstructionPolygons[t]){delete this.obstructionPolygons[t]}}handleKeyDown(t){if(t.target instanceof HTMLInputElement){return}if(t.shiftKey&&!this.shiftKeyPressed){this.shiftKeyPressed=true;this.drawPolygons();return}if(t.altKey&&!this.altKeyPressed){this.altKeyPressed=true;return}if((t.key==="Delete"||t.key==="Backspace")&&this.selectedPolygon){const t=this.getCurrentPolygon();if(t.closed){this.deletePolygon(t._id);this.drawPolygons();return}t.points.pop();this.drawPolygons();return}const n=t.key.toLowerCase();const e=O.find((t=>t.keyboardShortcut?.toLowerCase()===n));if(e){this.currentTool=e}}handleKeyUp(t){if(!t.shiftKey&&this.shiftKeyPressed){this.shiftKeyPressed=false;this.drawPolygons()}if(!t.altKey&&this.altKeyPressed){this.altKeyPressed=false}}handleMouseDown(t){if(!this.polygonCanvas||!this.polygonCtx)return;if(!this.polygonCanvas.contains(t.target))return;const n=this.polygonCanvas.getBoundingClientRect();let e=t.clientX-n.left;let i=t.clientY-n.top;if(this.currentTool.name==="delete"){if(!this.hoveredPolygon){return}const{_id:t,type:n}=this.hoveredPolygon;if(n==="roof"){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}else if(n==="obstruction"){delete this.obstructionPolygons[t]}this.hoveredPolygon=null;if(this.selectedPolygon?._id===t){this.selectedPolygon=null}this.drawPolygons();return}if(this.currentTool.name==="move"){if(this.selectedPolygon){const t=this.getCurrentPolygon();const n=t?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));if(n!==undefined&&n!==-1){this.draggedPointIndex=n;return}if(this.hoveredPolygon){this.selectedPolygon=this.hoveredPolygon;return}}this.selectedPolygon=null;this.drawPolygons();return}if(!this.selectedPolygon||this.getCurrentPolygon()?.closed){const t={_id:F(),points:[{x:e,y:i}],type:this.currentTool.name,closed:false};let n;if(this.currentTool.name==="roof"){this.roofPolygons={...this.roofPolygons,[t._id]:t};n=t._id}else if(this.currentTool.name==="obstruction"){this.obstructionPolygons={...this.obstructionPolygons,[t._id]:t};n=t._id}this.selectedPolygon={_id:n,type:this.currentTool.name};return}const{_id:s,type:o}=this.selectedPolygon;const r=o==="roof"?this.roofPolygons[s]:this.obstructionPolygons[s];if(r.closed){return}if(r.points.length>2){const t=r.points[0];const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));if(n<10){this.closePolygon();return}}if(t.shiftKey&&r?.points.length>=2){const t=m({x:e,y:i,lastPoint:r.points[r.points.length-1],secondLastPoint:r.points[r.points.length-2]});e=t.x;i=t.y}r.points=[...r.points,{x:e,y:i}];this.drawPolygons()}handleMouseUp(){this.draggedPointIndex=null}closePolygon(){const t=this.getCurrentPolygon();if(t.points.length>=3&&(this.currentTool.name==="roof"||this.currentTool.name==="obstruction")){t.closed=true}if(t.type==="roof"){const n=1/this.pixelInMeters;const e=W(t.points)/(n*n);const i=Z(t,this.buildingInsights?.solarPotential.roofSegmentStats,this.rgbTiff.bounds,this.canvasElement);if(i){t.details={area:e,azimuth:i.azimuthDegrees,pitch:i.pitchDegrees}}else{t.details={area:e,azimuth:0,pitch:0}}}this.drawPolygons();this.currentTool=k}calculateSolarPanels(){const t=this.getCurrentPolygon();if(!t.details){return}if(this.roofPolygonsSolarPanels[t._id]){delete this.roofPolygonsSolarPanels[t._id]}const n={...this.solarPanel,widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};const e=g/this.pixelInMeters;const i=rt(t,Object.values(this.obstructionPolygons),n,t.details?.azimuth,e,t.details?.pitch);this.roofPolygonsSolarPanels={...this.roofPolygonsSolarPanels,[t._id]:{positionedPanels:i,sunniness:t.details?.assignedRoofStats?.stats.sunshineQuantiles[5]??this.buildingInsights.solarPotential.buildingStats.sunshineQuantiles[5]??b}};this.drawPolygons()}handlePitchChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.pitch=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleAzimuthChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.azimuth=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleToolSelect(t){this.currentTool=t}render(){const t=lt(this.language);const n=this.getCurrentPolygon();return e("div",{key:"263b0447ff88dc33ddf73b40983c06106b7d8817",class:"flex flex-col justify-center items-center w-full h-full gap-4"},this.loadingState==="empty"&&e("p",{key:"1dbc8c4c85affb72d71ea0b8219783775a888c9e",class:"text-gray-500 text-center"},t.mapDraw.noAddressSelected),this.latitude&&this.longitude&&this.loadingState!=="loaded"&&e("div",{key:"4a8f25b707c5d84b945911455736d5a7026a36b1",class:"absolute w-full flex items-center justify-center bg-white bg-opacity-75 z-20 pt-7 rounded-4xl"},e("div",{key:"d6485b67c8183553b0f960b4ea85f119d259a701",class:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]"})),e("div",{key:"ebccbef3913fd0d95544d22b7c93544144fb0b8a",class:"flex gap-4 rounded-4xl bg-[#f3ebda] p-4"},O.map((n=>{const i=t.mapDraw.tools[n.name];return e("button",{class:`px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#964500] ${this.currentTool.name===n.name?"bg-[#271200] text-white hover:bg-[#964500]":"bg-[#f3ebda] hover:bg-[#964500]"}`,"aria-label":i.ariaLabel,title:i.explanation,onClick:()=>this.handleToolSelect(n)},e("div",{class:"flex items-center gap-1 flex-col"},e("i",{"data-lucide":n.icon}),e("span",null,i.name)))}))),e("div",{key:"7ebb6368614b33626c001b97c8089d80bde922dd",class:"flex gap-4 items-start justify-center h-full"},e("div",{key:"1b3a28fd870c97e586b3758af60860cf28fe1525",class:"relative flex-1 w-full h-full rounded-4xl flex items-center justify-center",style:{width:`${this.rgbTiff?.width*ft||0}px`,height:`${this.rgbTiff?.height*ft||0}px`}},e("canvas",{key:"c00c16a092d6ece5c6727943c4a86c42bc05f4ee",ref:t=>this.canvasElement=t,class:`absolute top-0 left-0 z-1 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}),e("canvas",{key:"1f9c08c866225c315d9a65a760629f7da6fb205c",ref:t=>this.polygonCanvas=t,class:`absolute top-0 left-0 z-10 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}))),e("div",{key:"959e476d9d301f9ca220332afb83c50516c53c3f",class:"flex gap-4 flex-row justify-center items-center"},e("div",{key:"db93f624352aaf75b46ed9e0341d2ae2a705d932",class:"w-52 bg-[#f3ebda] rounded-4xl p-4"},e("h3",{key:"6ea47f86b660789ba5c8653b1610a5a4c5dc5384",class:"text-lg font-semibold mb-4 text-center"},t.mapDraw.information),n?.details?e("div",{class:"space-y-4"},e("div",{class:"flex flex-col gap-2"},e("button",{class:"px-4 py-2 bg-[#271200] text-white rounded-4xl hover:bg-[#964500] transition-colors duration-200",onClick:()=>this.calculateSolarPanels()},t.mapDraw.calculateSolarPanels),this.roofPolygonsSolarPanels[n._id]&&e("p",{class:"text-lg text-center"},this.roofPolygonsSolarPanels[n._id].positionedPanels.length," ",t.mapDraw.panels)),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.area),e("p",{class:"text-lg"},n.details?.area.toFixed(2)," m²")),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},"Orientation"),e("div",{class:"flex gap-2 flex-row justify-start"},e("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handleAzimuthChange(t);t.target.blur()}},value:n.details?.azimuth}),"(",B(n.details?.azimuth),")")),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.pitch),e("div",{class:"flex gap-2 flex-row justify-start"},e("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handlePitchChange(t);t.target.blur()}},value:n.details?.pitch}),"°"))):e("p",{class:"text-gray-500 text-center"},t.mapDraw.noPolygonSelected))),e("solar-system-form",{key:"ece4abe4b849893b0a880953cfcc516014ed9039",systemConfigs:this.roofPolygonsSolarPanels}))}static get watchers(){return{latitude:["getBuildingInsights","getBuildingImages"],longitude:["getBuildingInsights","getBuildingImages"],rgbTiff:["drawMap"],buildingInsights:["drawMap"],canvasElement:["drawMap"]}}};ut.style=ht;
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide v0.509.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const dt=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}],["path",{d:"M22 21H7"}],["path",{d:"m5 11 9 9"}]];
|
|
8
|
-
/**
|
|
9
|
-
* @license lucide v0.509.0 - ISC
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the ISC license.
|
|
12
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/const pt=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];
|
|
14
|
-
/**
|
|
15
|
-
* @license lucide v0.509.0 - ISC
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the ISC license.
|
|
18
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/const gt=[["path",{d:"M12 2v20"}],["path",{d:"m15 19-3 3-3-3"}],["path",{d:"m19 9 3 3-3 3"}],["path",{d:"M2 12h20"}],["path",{d:"m5 9-3 3 3 3"}],["path",{d:"m9 5 3-3 3 3"}]];
|
|
20
|
-
/**
|
|
21
|
-
* @license lucide v0.509.0 - ISC
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the ISC license.
|
|
24
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/const bt=[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z"}],["path",{d:"M8 12h8"}]];const mt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const wt=class{constructor(n){t(this,n)}get el(){return n(this)}apiKey=i.GOOGLE_MAPS_API_KEY;language="en";latitude=null;longitude=null;isLoaded=false;autocomplete=null;place=null;inputElement;componentWillLoad(){this.loadGoogleMapsScript()}async loadGoogleMapsScript(){try{const t=new r({apiKey:this.apiKey,libraries:["places"]});const n=await t.importLibrary("places");this.isLoaded=true;this.initializeAutocomplete(n)}catch(t){console.error("Error loading Google Maps: ",t)}}initializeAutocomplete(t){if(!this.inputElement||!this.isLoaded)return;this.autocomplete=new t.Autocomplete(this.inputElement);this.autocomplete.addListener("place_changed",(()=>{const t=this.autocomplete?.getPlace();this.latitude=t?.geometry?.location?.lat()??0;this.longitude=t?.geometry?.location?.lng()??0}))}componentDidLoad(){a({icons:{Search:c,OctagonMinus:bt,Eraser:dt,House:pt,Move:gt},nameAttr:"data-lucide"})}render(){return e("div",{key:"5162353e7237490872cb354e1d0e2cb46e3f6959",class:"flex flex-col w-full h-full p-3"},e("div",{key:"5dd50770b71ecc7f079060fc4395206b0c53e871",class:"pb-3"},e("div",{key:"eaaa2ad3975af5790a0d7a86b35148a88f33f36b",class:"relative"},e("i",{key:"abed3e3eddbc5801e6643662d3c84e3a656d5801","data-lucide":"search",class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 "}),e("input",{key:"5f98818e56fcd28087f5167a8f04e63bb19b66aa",ref:t=>this.inputElement=t,type:"text",placeholder:"Search for a location",class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-4xl focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white"}))),e("map-draw",{key:"706b3bd8c50e72d87f8bd84e7721c4760842a0c9",latitude:this.latitude,longitude:this.longitude,apiKey:this.apiKey}))}};wt.style=mt;
|
|
26
|
-
/*!
|
|
27
|
-
* @kurkle/color v0.3.4
|
|
28
|
-
* https://github.com/kurkle/color#readme
|
|
29
|
-
* (c) 2024 Jukka Kurkela
|
|
30
|
-
* Released under the MIT License
|
|
31
|
-
*/function xt(t){return t+.5|0}const yt=(t,n,e)=>Math.max(Math.min(t,e),n);function vt(t){return yt(xt(t*2.55),0,255)}function Mt(t){return yt(xt(t*255),0,255)}function kt(t){return yt(xt(t/2.55)/100,0,1)}function _t(t){return yt(xt(t*100),0,100)}const St={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};const zt=[..."0123456789ABCDEF"];const Ot=t=>zt[t&15];const Ct=t=>zt[(t&240)>>4]+zt[t&15];const Dt=t=>(t&240)>>4===(t&15);const At=t=>Dt(t.r)&&Dt(t.g)&&Dt(t.b)&&Dt(t.a);function jt(t){var n=t.length;var e;if(t[0]==="#"){if(n===4||n===5){e={r:255&St[t[1]]*17,g:255&St[t[2]]*17,b:255&St[t[3]]*17,a:n===5?St[t[4]]*17:255}}else if(n===7||n===9){e={r:St[t[1]]<<4|St[t[2]],g:St[t[3]]<<4|St[t[4]],b:St[t[5]]<<4|St[t[6]],a:n===9?St[t[7]]<<4|St[t[8]]:255}}}return e}const Pt=(t,n)=>t<255?n(t):"";function Et(t){var n=At(t)?Ot:Ct;return t?"#"+n(t.r)+n(t.g)+n(t.b)+Pt(t.a,n):undefined}const Lt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rt(t,n,e){const i=n*Math.min(e,1-e);const s=(n,s=(n+t/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Nt(t,n,e){const i=(i,s=(i+t/60)%6)=>e-e*n*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function It(t,n,e){const i=Rt(t,1,.5);let s;if(n+e>1){s=1/(n+e);n*=s;e*=s}for(s=0;s<3;s++){i[s]*=1-n-e;i[s]+=n}return i}function Tt(t,n,e,i,s){if(t===s){return(n-e)/i+(n<e?6:0)}if(n===s){return(e-t)/i+2}return(t-n)/i+4}function Ft(t){const n=255;const e=t.r/n;const i=t.g/n;const s=t.b/n;const o=Math.max(e,i,s);const r=Math.min(e,i,s);const a=(o+r)/2;let c,l,h;if(o!==r){h=o-r;l=a>.5?h/(2-o-r):h/(o+r);c=Tt(e,i,s,h,o);c=c*60+.5}return[c|0,l||0,a]}function Wt(t,n,e,i){return(Array.isArray(n)?t(n[0],n[1],n[2]):t(n,e,i)).map(Mt)}function Bt(t,n,e){return Wt(Rt,t,n,e)}function $t(t,n,e){return Wt(It,t,n,e)}function Ht(t,n,e){return Wt(Nt,t,n,e)}function Yt(t){return(t%360+360)%360}function Vt(t){const n=Lt.exec(t);let e=255;let i;if(!n){return}if(n[5]!==i){e=n[6]?vt(+n[5]):Mt(+n[5])}const s=Yt(+n[2]);const o=+n[3]/100;const r=+n[4]/100;if(n[1]==="hwb"){i=$t(s,o,r)}else if(n[1]==="hsv"){i=Ht(s,o,r)}else{i=Bt(s,o,r)}return{r:i[0],g:i[1],b:i[2],a:e}}function Ut(t,n){var e=Ft(t);e[0]=Yt(e[0]+n);e=Bt(e);t.r=e[0];t.g=e[1];t.b=e[2]}function Xt(t){if(!t){return}const n=Ft(t);const e=n[0];const i=_t(n[1]);const s=_t(n[2]);return t.a<255?`hsla(${e}, ${i}%, ${s}%, ${kt(t.a)})`:`hsl(${e}, ${i}%, ${s}%)`}const Kt={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"};const Zt={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 qt(){const t={};const n=Object.keys(Zt);const e=Object.keys(Kt);let i,s,o,r,a;for(i=0;i<n.length;i++){r=a=n[i];for(s=0;s<e.length;s++){o=e[s];a=a.replace(o,Kt[o])}o=parseInt(Zt[r],16);t[a]=[o>>16&255,o>>8&255,o&255]}return t}let Qt;function Gt(t){if(!Qt){Qt=qt();Qt.transparent=[0,0,0,0]}const n=Qt[t.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}const Jt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function tn(t){const n=Jt.exec(t);let e=255;let i,s,o;if(!n){return}if(n[7]!==i){const t=+n[7];e=n[8]?vt(t):yt(t*255,0,255)}i=+n[1];s=+n[3];o=+n[5];i=255&(n[2]?vt(i):yt(i,0,255));s=255&(n[4]?vt(s):yt(s,0,255));o=255&(n[6]?vt(o):yt(o,0,255));return{r:i,g:s,b:o,a:e}}function nn(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${kt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const en=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055;const sn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function on(t,n,e){const i=sn(kt(t.r));const s=sn(kt(t.g));const o=sn(kt(t.b));return{r:Mt(en(i+e*(sn(kt(n.r))-i))),g:Mt(en(s+e*(sn(kt(n.g))-s))),b:Mt(en(o+e*(sn(kt(n.b))-o))),a:t.a+e*(n.a-t.a)}}function rn(t,n,e){if(t){let i=Ft(t);i[n]=Math.max(0,Math.min(i[n]+i[n]*e,n===0?360:1));i=Bt(i);t.r=i[0];t.g=i[1];t.b=i[2]}}function an(t,n){return t?Object.assign(n||{},t):t}function cn(t){var n={r:0,g:0,b:0,a:255};if(Array.isArray(t)){if(t.length>=3){n={r:t[0],g:t[1],b:t[2],a:255};if(t.length>3){n.a=Mt(t[3])}}}else{n=an(t,{r:0,g:0,b:0,a:1});n.a=Mt(n.a)}return n}function ln(t){if(t.charAt(0)==="r"){return tn(t)}return Vt(t)}class hn{constructor(t){if(t instanceof hn){return t}const n=typeof t;let e;if(n==="object"){e=cn(t)}else if(n==="string"){e=jt(t)||Gt(t)||ln(t)}this._rgb=e;this._valid=!!e}get valid(){return this._valid}get rgb(){var t=an(this._rgb);if(t){t.a=kt(t.a)}return t}set rgb(t){this._rgb=cn(t)}rgbString(){return this._valid?nn(this._rgb):undefined}hexString(){return this._valid?Et(this._rgb):undefined}hslString(){return this._valid?Xt(this._rgb):undefined}mix(t,n){if(t){const e=this.rgb;const i=t.rgb;let s;const o=n===s?.5:n;const r=2*o-1;const a=e.a-i.a;const c=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-c;e.r=255&c*e.r+s*i.r+.5;e.g=255&c*e.g+s*i.g+.5;e.b=255&c*e.b+s*i.b+.5;e.a=o*e.a+(1-o)*i.a;this.rgb=e}return this}interpolate(t,n){if(t){this._rgb=on(this._rgb,t._rgb,n)}return this}clone(){return new hn(this.rgb)}alpha(t){this._rgb.a=Mt(t);return this}clearer(t){const n=this._rgb;n.a*=1-t;return this}greyscale(){const t=this._rgb;const n=xt(t.r*.3+t.g*.59+t.b*.11);t.r=t.g=t.b=n;return this}opaquer(t){const n=this._rgb;n.a*=1+t;return this}negate(){const t=this._rgb;t.r=255-t.r;t.g=255-t.g;t.b=255-t.b;return this}lighten(t){rn(this._rgb,2,t);return this}darken(t){rn(this._rgb,2,-t);return this}saturate(t){rn(this._rgb,1,t);return this}desaturate(t){rn(this._rgb,1,-t);return this}rotate(t){Ut(this._rgb,t);return this}}
|
|
32
|
-
/*!
|
|
33
|
-
* Chart.js v4.4.9
|
|
34
|
-
* https://www.chartjs.org
|
|
35
|
-
* (c) 2025 Chart.js Contributors
|
|
36
|
-
* Released under the MIT License
|
|
37
|
-
*/function fn(){}const un=(()=>{let t=0;return()=>t++})();function dn(t){return t===null||t===undefined}function pn(t){if(Array.isArray&&Array.isArray(t)){return true}const n=Object.prototype.toString.call(t);if(n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"){return true}return false}function gn(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function bn(t){return(typeof t==="number"||t instanceof Number)&&isFinite(+t)}function mn(t,n){return bn(t)?t:n}function wn(t,n){return typeof t==="undefined"?n:t}const xn=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100:+t/n;const yn=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100*n:+t;function vn(t,n,e){if(t&&typeof t.call==="function"){return t.apply(e,n)}}function Mn(t,n,e,i){let s,o,r;if(pn(t)){o=t.length;{for(s=0;s<o;s++){n.call(e,t[s],s)}}}else if(gn(t)){r=Object.keys(t);o=r.length;for(s=0;s<o;s++){n.call(e,t[r[s]],r[s])}}}function kn(t,n){let e,i,s,o;if(!t||!n||t.length!==n.length){return false}for(e=0,i=t.length;e<i;++e){s=t[e];o=n[e];if(s.datasetIndex!==o.datasetIndex||s.index!==o.index){return false}}return true}function _n(t){if(pn(t)){return t.map(_n)}if(gn(t)){const n=Object.create(null);const e=Object.keys(t);const i=e.length;let s=0;for(;s<i;++s){n[e[s]]=_n(t[e[s]])}return n}return t}function Sn(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function zn(t,n,e,i){if(!Sn(t)){return}const s=n[t];const o=e[t];if(gn(s)&&gn(o)){On(s,o,i)}else{n[t]=_n(o)}}function On(t,n,e){const i=pn(n)?n:[n];const s=i.length;if(!gn(t)){return t}e=e||{};const o=e.merger||zn;let r;for(let n=0;n<s;++n){r=i[n];if(!gn(r)){continue}const s=Object.keys(r);for(let n=0,i=s.length;n<i;++n){o(s[n],t,r,e)}}return t}function Cn(t,n){return On(t,n,{merger:Dn})}function Dn(t,n,e){if(!Sn(t)){return}const i=n[t];const s=e[t];if(gn(i)&&gn(s)){Cn(i,s)}else if(!Object.prototype.hasOwnProperty.call(n,t)){n[t]=_n(s)}}const An={"":t=>t,x:t=>t.x,y:t=>t.y};function jn(t){const n=t.split(".");const e=[];let i="";for(const t of n){i+=t;if(i.endsWith("\\")){i=i.slice(0,-1)+"."}else{e.push(i);i=""}}return e}function Pn(t){const n=jn(t);return t=>{for(const e of n){if(e===""){break}t=t&&t[e]}return t}}function En(t,n){const e=An[n]||(An[n]=Pn(n));return e(t)}function Ln(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Rn=t=>typeof t!=="undefined";const Nn=t=>typeof t==="function";const In=(t,n)=>{if(t.size!==n.size){return false}for(const e of t){if(!n.has(e)){return false}}return true};function Tn(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Fn=Math.PI;const Wn=2*Fn;const Bn=Wn+Fn;const $n=Number.POSITIVE_INFINITY;const Hn=Fn/180;const Yn=Fn/2;const Vn=Fn/4;const Un=Fn*2/3;const Xn=Math.log10;const Kn=Math.sign;function Zn(t,n,e){return Math.abs(t-n)<e}function qn(t){const n=Math.round(t);t=Zn(t,n,t/1e3)?n:t;const e=Math.pow(10,Math.floor(Xn(t)));const i=t/e;const s=i<=1?1:i<=2?2:i<=5?5:10;return s*e}function Qn(t){const n=[];const e=Math.sqrt(t);let i;for(i=1;i<e;i++){if(t%i===0){n.push(i);n.push(t/i)}}if(e===(e|0)){n.push(e)}n.sort(((t,n)=>t-n)).pop();return n}function Gn(t){return typeof t==="symbol"||typeof t==="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Jn(t){return!Gn(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function te(t,n){const e=Math.round(t);return e-n<=t&&e+n>=t}function ne(t,n,e){let i,s,o;for(i=0,s=t.length;i<s;i++){o=t[i][e];if(!isNaN(o)){n.min=Math.min(n.min,o);n.max=Math.max(n.max,o)}}}function ee(t){return t*(Fn/180)}function ie(t){return t*(180/Fn)}function se(t){if(!bn(t)){return}let n=1;let e=0;while(Math.round(t*n)/n!==t){n*=10;e++}return e}function oe(t,n){const e=n.x-t.x;const i=n.y-t.y;const s=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);if(o<-.5*Fn){o+=Wn}return{angle:o,distance:s}}function re(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function ae(t,n){return(t-n+Bn)%Wn-Fn}function ce(t){return(t%Wn+Wn)%Wn}function le(t,n,e,i){const s=ce(t);const o=ce(n);const r=ce(e);const a=ce(o-s);const c=ce(r-s);const l=ce(s-o);const h=ce(s-r);return s===o||s===r||i&&o===r||a>c&&l<h}function he(t,n,e){return Math.max(n,Math.min(e,t))}function fe(t){return he(t,-32768,32767)}function ue(t,n,e,i=1e-6){return t>=Math.min(n,e)-i&&t<=Math.max(n,e)+i}function de(t,n,e){e=e||(e=>t[e]<n);let i=t.length-1;let s=0;let o;while(i-s>1){o=s+i>>1;if(e(o)){s=o}else{i=o}}return{lo:s,hi:i}}const pe=(t,n,e,i)=>de(t,e,i?i=>{const s=t[i][n];return s<e||s===e&&t[i+1][n]===e}:i=>t[i][n]<e);const ge=(t,n,e)=>de(t,e,(i=>t[i][n]>=e));function be(t,n,e){let i=0;let s=t.length;while(i<s&&t[i]<n){i++}while(s>i&&t[s-1]>e){s--}return i>0||s<t.length?t.slice(i,s):t}const me=["push","pop","shift","splice","unshift"];function we(t,n){if(t._chartjs){t._chartjs.listeners.push(n);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[n]}});me.forEach((n=>{const e="_onData"+Ln(n);const i=t[n];Object.defineProperty(t,n,{configurable:true,enumerable:false,value(...n){const s=i.apply(this,n);t._chartjs.listeners.forEach((t=>{if(typeof t[e]==="function"){t[e](...n)}}));return s}})}))}function xe(t,n){const e=t._chartjs;if(!e){return}const i=e.listeners;const s=i.indexOf(n);if(s!==-1){i.splice(s,1)}if(i.length>0){return}me.forEach((n=>{delete t[n]}));delete t._chartjs}function ye(t){const n=new Set(t);if(n.size===t.length){return t}return Array.from(n)}const ve=function(){if(typeof window==="undefined"){return function(t){return t()}}return window.requestAnimationFrame}();function Me(t,n){let e=[];let i=false;return function(...s){e=s;if(!i){i=true;ve.call(window,(()=>{i=false;t.apply(n,e)}))}}}function ke(t,n){let e;return function(...i){if(n){clearTimeout(e);e=setTimeout(t,n,i)}else{t.apply(this,i)}return n}}const _e=t=>t==="start"?"left":t==="end"?"right":"center";const Se=(t,n,e)=>t==="start"?n:t==="end"?e:(n+e)/2;const ze=(t,n,e,i)=>{const s=i?"left":"right";return t===s?e:t==="center"?(n+e)/2:n};function Oe(t,n,e){const i=n.length;let s=0;let o=i;if(t._sorted){const{iScale:r,vScale:a,_parsed:c}=t;const l=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;const h=r.axis;const{min:f,max:u,minDefined:d,maxDefined:p}=r.getUserBounds();if(d){s=Math.min(pe(c,h,f).lo,e?i:pe(n,h,r.getPixelForValue(f)).lo);if(l){const t=c.slice(0,s+1).reverse().findIndex((t=>!dn(t[a.axis])));s-=Math.max(0,t)}s=he(s,0,i-1)}if(p){let t=Math.max(pe(c,r.axis,u,true).hi+1,e?0:pe(n,h,r.getPixelForValue(u),true).hi+1);if(l){const n=c.slice(t-1).findIndex((t=>!dn(t[a.axis])));t+=Math.max(0,n)}o=he(t,s,i)-s}else{o=i-s}}return{start:s,count:o}}function Ce(t){const{xScale:n,yScale:e,_scaleRanges:i}=t;const s={xmin:n.min,xmax:n.max,ymin:e.min,ymax:e.max};if(!i){t._scaleRanges=s;return true}const o=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==e.min||i.ymax!==e.max;Object.assign(i,s);return o}const De=t=>t===0||t===1;const Ae=(t,n,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-n)*Wn/e));const je=(t,n,e)=>Math.pow(2,-10*t)*Math.sin((t-n)*Wn/e)+1;const Pe={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Yn)+1,easeOutSine:t=>Math.sin(t*Yn),easeInOutSine:t=>-.5*(Math.cos(Fn*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>De(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>De(t)?t:Ae(t,.075,.3),easeOutElastic:t=>De(t)?t:je(t,.075,.3),easeInOutElastic(t){const n=.1125;const e=.45;return De(t)?t:t<.5?.5*Ae(t*2,n,e):.5+.5*je(t*2-1,n,e)},easeInBack(t){const n=1.70158;return t*t*((n+1)*t-n)},easeOutBack(t){const n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},easeInOutBack(t){let n=1.70158;if((t/=.5)<1){return.5*(t*t*(((n*=1.525)+1)*t-n))}return.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:t=>1-Pe.easeOutBounce(1-t),easeOutBounce(t){const n=7.5625;const e=2.75;if(t<1/e){return n*t*t}if(t<2/e){return n*(t-=1.5/e)*t+.75}if(t<2.5/e){return n*(t-=2.25/e)*t+.9375}return n*(t-=2.625/e)*t+.984375},easeInOutBounce:t=>t<.5?Pe.easeInBounce(t*2)*.5:Pe.easeOutBounce(t*2-1)*.5+.5};function Ee(t){if(t&&typeof t==="object"){const n=t.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return false}function Le(t){return Ee(t)?t:new hn(t)}function Re(t){return Ee(t)?t:new hn(t).saturate(.5).darken(.1).hexString()}const Ne=["x","y","borderWidth","radius","tension"];const Ie=["color","borderColor","backgroundColor"];function Te(t){t.set("animation",{delay:undefined,duration:1e3,easing:"easeOutQuart",fn:undefined,from:undefined,loop:undefined,to:undefined,type:undefined});t.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});t.set("animations",{colors:{type:"color",properties:Ie},numbers:{type:"number",properties:Ne}});t.describe("animations",{_fallback:"animation"});t.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 Fe(t){t.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}})}const We=new Map;function Be(t,n){n=n||{};const e=t+JSON.stringify(n);let i=We.get(e);if(!i){i=new Intl.NumberFormat(t,n);We.set(e,i)}return i}function $e(t,n,e){return Be(n,e).format(t)}const He={values(t){return pn(t)?t:""+t},numeric(t,n,e){if(t===0){return"0"}const i=this.chart.options.locale;let s;let o=t;if(e.length>1){const n=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));if(n<1e-4||n>1e15){s="scientific"}o=Ye(t,e)}const r=Xn(Math.abs(o));const a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0);const c={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};Object.assign(c,this.options.ticks.format);return $e(t,i,c)},logarithmic(t,n,e){if(t===0){return"0"}const i=e[n].significand||t/Math.pow(10,Math.floor(Xn(t)));if([1,2,3,5,10,15].includes(i)||n>.8*e.length){return He.numeric.call(this,t,n,e)}return""}};function Ye(t,n){let e=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;if(Math.abs(e)>=1&&t!==Math.floor(t)){e=t-Math.floor(t)}return e}var Ve={formatters:He};function Ue(t){t.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",clip:true,grace:0,grid:{display:true,lineWidth:1,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:false},border:{display:true,dash:[],dashOffset:0,width:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:Ve.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});t.route("scale.ticks","color","","color");t.route("scale.grid","color","","borderColor");t.route("scale.border","color","","borderColor");t.route("scale.title","color","","color");t.describe("scale",{_fallback:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"});t.describe("scales",{_fallback:"scale"});t.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Xe=Object.create(null);const Ke=Object.create(null);function Ze(t,n){if(!n){return t}const e=n.split(".");for(let n=0,i=e.length;n<i;++n){const i=e[n];t=t[i]||(t[i]=Object.create(null))}return t}function qe(t,n,e){if(typeof n==="string"){return On(Ze(t,n),e)}return On(Ze(t,""),n)}class Qe{constructor(t,n){this.animation=undefined;this.backgroundColor="rgba(0,0,0,0.1)";this.borderColor="rgba(0,0,0,0.1)";this.color="#666";this.datasets={};this.devicePixelRatio=t=>t.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=(t,n)=>Re(n.backgroundColor);this.hoverBorderColor=(t,n)=>Re(n.borderColor);this.hoverColor=(t,n)=>Re(n.color);this.indexAxis="x";this.interaction={mode:"nearest",intersect:true,includeInvisible:false};this.maintainAspectRatio=true;this.onHover=null;this.onClick=null;this.parsing=true;this.plugins={};this.responsive=true;this.scale=undefined;this.scales={};this.showLine=true;this.drawActiveElementsOnTop=true;this.describe(t);this.apply(n)}set(t,n){return qe(this,t,n)}get(t){return Ze(this,t)}describe(t,n){return qe(Ke,t,n)}override(t,n){return qe(Xe,t,n)}route(t,n,e,i){const s=Ze(this,t);const o=Ze(this,e);const r="_"+n;Object.defineProperties(s,{[r]:{value:s[n],writable:true},[n]:{enumerable:true,get(){const t=this[r];const n=o[i];if(gn(t)){return Object.assign({},n,t)}return wn(t,n)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Ge=new Qe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}},[Te,Fe,Ue]);function Je(t){if(!t||dn(t.size)||dn(t.family)){return null}return(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ti(t,n,e,i,s){let o=n[s];if(!o){o=n[s]=t.measureText(s).width;e.push(s)}if(o>i){i=o}return i}function ni(t,n,e,i){i=i||{};let s=i.data=i.data||{};let o=i.garbageCollect=i.garbageCollect||[];if(i.font!==n){s=i.data={};o=i.garbageCollect=[];i.font=n}t.save();t.font=n;let r=0;const a=e.length;let c,l,h,f,u;for(c=0;c<a;c++){f=e[c];if(f!==undefined&&f!==null&&!pn(f)){r=ti(t,s,o,r,f)}else if(pn(f)){for(l=0,h=f.length;l<h;l++){u=f[l];if(u!==undefined&&u!==null&&!pn(u)){r=ti(t,s,o,r,u)}}}}t.restore();const d=o.length/2;if(d>e.length){for(c=0;c<d;c++){delete s[o[c]]}o.splice(0,d)}return r}function ei(t,n,e){const i=t.currentDevicePixelRatio;const s=e!==0?Math.max(e/2,.5):0;return Math.round((n-s)*i)/i+s}function ii(t,n){if(!n&&!t){return}n=n||t.getContext("2d");n.save();n.resetTransform();n.clearRect(0,0,t.width,t.height);n.restore()}function si(t,n,e,i){oi(t,n,e,i,null)}function oi(t,n,e,i,s){let o,r,a,c,l,h,f,u;const d=n.pointStyle;const p=n.rotation;const g=n.radius;let b=(p||0)*Hn;if(d&&typeof d==="object"){o=d.toString();if(o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]"){t.save();t.translate(e,i);t.rotate(b);t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height);t.restore();return}}if(isNaN(g)||g<=0){return}t.beginPath();switch(d){default:if(s){t.ellipse(e,i,s/2,g,0,0,Wn)}else{t.arc(e,i,g,0,Wn)}t.closePath();break;case"triangle":h=s?s/2:g;t.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=Un;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=Un;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);t.closePath();break;case"rectRounded":l=g*.516;c=g-l;r=Math.cos(b+Vn)*c;f=Math.cos(b+Vn)*(s?s/2-l:c);a=Math.sin(b+Vn)*c;u=Math.sin(b+Vn)*(s?s/2-l:c);t.arc(e-f,i-a,l,b-Fn,b-Yn);t.arc(e+u,i-r,l,b-Yn,b);t.arc(e+f,i+a,l,b,b+Yn);t.arc(e-u,i+r,l,b+Yn,b+Fn);t.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*g;h=s?s/2:c;t.rect(e-h,i-c,2*h,2*c);break}b+=Vn;case"rectRot":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+u,i-r);t.lineTo(e+f,i+a);t.lineTo(e-u,i+r);t.closePath();break;case"crossRot":b+=Vn;case"cross":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);break;case"star":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);b+=Vn;f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);break;case"line":r=s?s/2:Math.cos(b)*g;a=Math.sin(b)*g;t.moveTo(e-r,i-a);t.lineTo(e+r,i+a);break;case"dash":t.moveTo(e,i);t.lineTo(e+Math.cos(b)*(s?s/2:g),i+Math.sin(b)*g);break;case false:t.closePath();break}t.fill();if(n.borderWidth>0){t.stroke()}}function ri(t,n,e){e=e||.5;return!n||t&&t.x>n.left-e&&t.x<n.right+e&&t.y>n.top-e&&t.y<n.bottom+e}function ai(t,n){t.save();t.beginPath();t.rect(n.left,n.top,n.right-n.left,n.bottom-n.top);t.clip()}function ci(t){t.restore()}function li(t,n,e,i,s){if(!n){return t.lineTo(e.x,e.y)}if(s==="middle"){const i=(n.x+e.x)/2;t.lineTo(i,n.y);t.lineTo(i,e.y)}else if(s==="after"!==!!i){t.lineTo(n.x,e.y)}else{t.lineTo(e.x,n.y)}t.lineTo(e.x,e.y)}function hi(t,n,e,i){if(!n){return t.lineTo(e.x,e.y)}t.bezierCurveTo(i?n.cp1x:n.cp2x,i?n.cp1y:n.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function fi(t,n){if(n.translation){t.translate(n.translation[0],n.translation[1])}if(!dn(n.rotation)){t.rotate(n.rotation)}if(n.color){t.fillStyle=n.color}if(n.textAlign){t.textAlign=n.textAlign}if(n.textBaseline){t.textBaseline=n.textBaseline}}function ui(t,n,e,i,s){if(s.strikethrough||s.underline){const o=t.measureText(i);const r=n-o.actualBoundingBoxLeft;const a=n+o.actualBoundingBoxRight;const c=e-o.actualBoundingBoxAscent;const l=e+o.actualBoundingBoxDescent;const h=s.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle;t.beginPath();t.lineWidth=s.decorationWidth||2;t.moveTo(r,h);t.lineTo(a,h);t.stroke()}}function di(t,n){const e=t.fillStyle;t.fillStyle=n.color;t.fillRect(n.left,n.top,n.width,n.height);t.fillStyle=e}function pi(t,n,e,i,s,o={}){const r=pn(n)?n:[n];const a=o.strokeWidth>0&&o.strokeColor!=="";let c,l;t.save();t.font=s.string;fi(t,o);for(c=0;c<r.length;++c){l=r[c];if(o.backdrop){di(t,o.backdrop)}if(a){if(o.strokeColor){t.strokeStyle=o.strokeColor}if(!dn(o.strokeWidth)){t.lineWidth=o.strokeWidth}t.strokeText(l,e,i,o.maxWidth)}t.fillText(l,e,i,o.maxWidth);ui(t,e,i,l,o);i+=Number(s.lineHeight)}t.restore()}function gi(t,n){const{x:e,y:i,w:s,h:o,radius:r}=n;t.arc(e+r.topLeft,i+r.topLeft,r.topLeft,1.5*Fn,Fn,true);t.lineTo(e,i+o-r.bottomLeft);t.arc(e+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,Fn,Yn,true);t.lineTo(e+s-r.bottomRight,i+o);t.arc(e+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,Yn,0,true);t.lineTo(e+s,i+r.topRight);t.arc(e+s-r.topRight,i+r.topRight,r.topRight,0,-Yn,true);t.lineTo(e+r.topLeft,i)}const bi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/;const mi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function wi(t,n){const e=(""+t).match(bi);if(!e||e[1]==="normal"){return n*1.2}t=+e[2];switch(e[3]){case"px":return t;case"%":t/=100;break}return n*t}const xi=t=>+t||0;function yi(t,n){const e={};const i=gn(n);const s=i?Object.keys(n):n;const o=gn(t)?i?e=>wn(t[e],t[n[e]]):n=>t[n]:()=>t;for(const t of s){e[t]=xi(o(t))}return e}function vi(t){return yi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Mi(t){return yi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ki(t){const n=vi(t);n.width=n.left+n.right;n.height=n.top+n.bottom;return n}function _i(t,n){t=t||{};n=n||Ge.font;let e=wn(t.size,n.size);if(typeof e==="string"){e=parseInt(e,10)}let i=wn(t.style,n.style);if(i&&!(""+i).match(mi)){console.warn('Invalid font style specified: "'+i+'"');i=undefined}const s={family:wn(t.family,n.family),lineHeight:wi(wn(t.lineHeight,n.lineHeight),e),size:e,style:i,weight:wn(t.weight,n.weight),string:""};s.string=Je(s);return s}function Si(t,n,e,i){let s,o,r;for(s=0,o=t.length;s<o;++s){r=t[s];if(r===undefined){continue}if(r!==undefined){return r}}}function zi(t,n,e){const{min:i,max:s}=t;const o=yn(n,(s-i)/2);const r=(t,n)=>e&&t===0?0:t+n;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function Oi(t,n){return Object.assign(Object.create(t),n)}function Ci(t,n=[""],e,i,s=()=>t[0]){const o=e||t;if(typeof i==="undefined"){i=Yi("_fallback",t)}const r={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:s,override:e=>Ci([e,...t],n,o,i)};return new Proxy(r,{deleteProperty(n,e){delete n[e];delete n._keys;delete t[0][e];return true},get(e,i){return Ei(e,i,(()=>Hi(i,n,t,e)))},getOwnPropertyDescriptor(t,n){return Reflect.getOwnPropertyDescriptor(t._scopes[0],n)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,n){return Vi(t).includes(n)},ownKeys(t){return Vi(t)},set(t,n,e){const i=t._storage||(t._storage=s());t[n]=i[n]=e;delete t._keys;return true}})}function Di(t,n,e,i){const s={_cacheable:false,_proxy:t,_context:n,_subProxy:e,_stack:new Set,_descriptors:Ai(t,i),setContext:n=>Di(t,n,e,i),override:s=>Di(t.override(s),n,e,i)};return new Proxy(s,{deleteProperty(n,e){delete n[e];delete t[e];return true},get(t,n,e){return Ei(t,n,(()=>Li(t,n,e)))},getOwnPropertyDescriptor(n,e){return n._descriptors.allKeys?Reflect.has(t,e)?{enumerable:true,configurable:true}:undefined:Reflect.getOwnPropertyDescriptor(t,e)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(n,e){return Reflect.has(t,e)},ownKeys(){return Reflect.ownKeys(t)},set(n,e,i){t[e]=i;delete n[e];return true}})}function Ai(t,n={scriptable:true,indexable:true}){const{_scriptable:e=n.scriptable,_indexable:i=n.indexable,_allKeys:s=n.allKeys}=t;return{allKeys:s,scriptable:e,indexable:i,isScriptable:Nn(e)?e:()=>e,isIndexable:Nn(i)?i:()=>i}}const ji=(t,n)=>t?t+Ln(n):n;const Pi=(t,n)=>gn(n)&&t!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Ei(t,n,e){if(Object.prototype.hasOwnProperty.call(t,n)||n==="constructor"){return t[n]}const i=e();t[n]=i;return i}function Li(t,n,e){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=t;let a=i[n];if(Nn(a)&&r.isScriptable(n)){a=Ri(n,a,t,e)}if(pn(a)&&a.length){a=Ni(n,a,t,r.isIndexable)}if(Pi(n,a)){a=Di(a,s,o&&o[n],r)}return a}function Ri(t,n,e,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(t)){throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t)}a.add(t);let c=n(o,r||i);a.delete(t);if(Pi(t,c)){c=Wi(s._scopes,s,t,c)}return c}function Ni(t,n,e,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index!=="undefined"&&i(t)){return n[o.index%n.length]}else if(gn(n[0])){const e=n;const i=s._scopes.filter((t=>t!==e));n=[];for(const c of e){const e=Wi(i,s,t,c);n.push(Di(e,o,r&&r[t],a))}}return n}function Ii(t,n,e){return Nn(t)?t(n,e):t}const Ti=(t,n)=>t===true?n:typeof t==="string"?En(n,t):undefined;function Fi(t,n,e,i,s){for(const o of n){const n=Ti(e,o);if(n){t.add(n);const o=Ii(n._fallback,e,s);if(typeof o!=="undefined"&&o!==e&&o!==i){return o}}else if(n===false&&typeof i!=="undefined"&&e!==i){return null}}return false}function Wi(t,n,e,i){const s=n._rootScopes;const o=Ii(n._fallback,e,i);const r=[...t,...s];const a=new Set;a.add(i);let c=Bi(a,r,e,o||e,i);if(c===null){return false}if(typeof o!=="undefined"&&o!==e){c=Bi(a,r,o,c,i);if(c===null){return false}}return Ci(Array.from(a),[""],s,o,(()=>$i(n,e,i)))}function Bi(t,n,e,i,s){while(e){e=Fi(t,n,e,i,s)}return e}function $i(t,n,e){const i=t._getTarget();if(!(n in i)){i[n]={}}const s=i[n];if(pn(s)&&gn(e)){return e}return s||{}}function Hi(t,n,e,i){let s;for(const o of n){s=Yi(ji(o,t),e);if(typeof s!=="undefined"){return Pi(t,s)?Wi(e,i,t,s):s}}}function Yi(t,n){for(const e of n){if(!e){continue}const n=e[t];if(typeof n!=="undefined"){return n}}}function Vi(t){let n=t._keys;if(!n){n=t._keys=Ui(t._scopes)}return n}function Ui(t){const n=new Set;for(const e of t){for(const t of Object.keys(e).filter((t=>!t.startsWith("_")))){n.add(t)}}return Array.from(n)}function Xi(t,n,e,i){const{iScale:s}=t;const{key:o="r"}=this._parsing;const r=new Array(i);let a,c,l,h;for(a=0,c=i;a<c;++a){l=a+e;h=n[l];r[a]={r:s.parse(En(h,o),l)}}return r}const Ki=Number.EPSILON||1e-14;const Zi=(t,n)=>n<t.length&&!t[n].skip&&t[n];const qi=t=>t==="x"?"y":"x";function Qi(t,n,e,i){const s=t.skip?n:t;const o=n;const r=e.skip?n:e;const a=re(o,s);const c=re(r,o);let l=a/(a+c);let h=c/(a+c);l=isNaN(l)?0:l;h=isNaN(h)?0:h;const f=i*l;const u=i*h;return{previous:{x:o.x-f*(r.x-s.x),y:o.y-f*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function Gi(t,n,e){const i=t.length;let s,o,r,a,c;let l=Zi(t,0);for(let h=0;h<i-1;++h){c=l;l=Zi(t,h+1);if(!c||!l){continue}if(Zn(n[h],0,Ki)){e[h]=e[h+1]=0;continue}s=e[h]/n[h];o=e[h+1]/n[h];a=Math.pow(s,2)+Math.pow(o,2);if(a<=9){continue}r=3/Math.sqrt(a);e[h]=s*r*n[h];e[h+1]=o*r*n[h]}}function Ji(t,n,e="x"){const i=qi(e);const s=t.length;let o,r,a;let c=Zi(t,0);for(let l=0;l<s;++l){r=a;a=c;c=Zi(t,l+1);if(!a){continue}const s=a[e];const h=a[i];if(r){o=(s-r[e])/3;a[`cp1${e}`]=s-o;a[`cp1${i}`]=h-o*n[l]}if(c){o=(c[e]-s)/3;a[`cp2${e}`]=s+o;a[`cp2${i}`]=h+o*n[l]}}}function ts(t,n="x"){const e=qi(n);const i=t.length;const s=Array(i).fill(0);const o=Array(i);let r,a,c;let l=Zi(t,0);for(r=0;r<i;++r){a=c;c=l;l=Zi(t,r+1);if(!c){continue}if(l){const t=l[n]-c[n];s[r]=t!==0?(l[e]-c[e])/t:0}o[r]=!a?s[r]:!l?s[r-1]:Kn(s[r-1])!==Kn(s[r])?0:(s[r-1]+s[r])/2}Gi(t,s,o);Ji(t,o,n)}function ns(t,n,e){return Math.max(Math.min(t,e),n)}function es(t,n){let e,i,s,o,r;let a=ri(t[0],n);for(e=0,i=t.length;e<i;++e){r=o;o=a;a=e<i-1&&ri(t[e+1],n);if(!o){continue}s=t[e];if(r){s.cp1x=ns(s.cp1x,n.left,n.right);s.cp1y=ns(s.cp1y,n.top,n.bottom)}if(a){s.cp2x=ns(s.cp2x,n.left,n.right);s.cp2y=ns(s.cp2y,n.top,n.bottom)}}}function is(t,n,e,i,s){let o,r,a,c;if(n.spanGaps){t=t.filter((t=>!t.skip))}if(n.cubicInterpolationMode==="monotone"){ts(t,s)}else{let e=i?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o){a=t[o];c=Qi(e,a,t[Math.min(o+1,r-(i?0:1))%r],n.tension);a.cp1x=c.previous.x;a.cp1y=c.previous.y;a.cp2x=c.next.x;a.cp2y=c.next.y;e=a}}if(n.capBezierPoints){es(t,e)}}function ss(){return typeof window!=="undefined"&&typeof document!=="undefined"}function os(t){let n=t.parentNode;if(n&&n.toString()==="[object ShadowRoot]"){n=n.host}return n}function rs(t,n,e){let i;if(typeof t==="string"){i=parseInt(t,10);if(t.indexOf("%")!==-1){i=i/100*n.parentNode[e]}}else{i=t}return i}const as=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function cs(t,n){return as(t).getPropertyValue(n)}const ls=["top","right","bottom","left"];function hs(t,n,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=ls[s];i[o]=parseFloat(t[n+"-"+o+e])||0}i.width=i.left+i.right;i.height=i.top+i.bottom;return i}const fs=(t,n,e)=>(t>0||n>0)&&(!e||!e.shadowRoot);function us(t,n){const e=t.touches;const i=e&&e.length?e[0]:t;const{offsetX:s,offsetY:o}=i;let r=false;let a,c;if(fs(s,o,t.target)){a=s;c=o}else{const t=n.getBoundingClientRect();a=i.clientX-t.left;c=i.clientY-t.top;r=true}return{x:a,y:c,box:r}}function ds(t,n){if("native"in t){return t}const{canvas:e,currentDevicePixelRatio:i}=n;const s=as(e);const o=s.boxSizing==="border-box";const r=hs(s,"padding");const a=hs(s,"border","width");const{x:c,y:l,box:h}=us(t,e);const f=r.left+(h&&a.left);const u=r.top+(h&&a.top);let{width:d,height:p}=n;if(o){d-=r.width+a.width;p-=r.height+a.height}return{x:Math.round((c-f)/d*e.width/i),y:Math.round((l-u)/p*e.height/i)}}function ps(t,n,e){let i,s;if(n===undefined||e===undefined){const o=t&&os(t);if(!o){n=t.clientWidth;e=t.clientHeight}else{const t=o.getBoundingClientRect();const r=as(o);const a=hs(r,"border","width");const c=hs(r,"padding");n=t.width-c.width-a.width;e=t.height-c.height-a.height;i=rs(r.maxWidth,o,"clientWidth");s=rs(r.maxHeight,o,"clientHeight")}}return{width:n,height:e,maxWidth:i||$n,maxHeight:s||$n}}const gs=t=>Math.round(t*10)/10;function bs(t,n,e,i){const s=as(t);const o=hs(s,"margin");const r=rs(s.maxWidth,t,"clientWidth")||$n;const a=rs(s.maxHeight,t,"clientHeight")||$n;const c=ps(t,n,e);let{width:l,height:h}=c;if(s.boxSizing==="content-box"){const t=hs(s,"border","width");const n=hs(s,"padding");l-=n.width+t.width;h-=n.height+t.height}l=Math.max(0,l-o.width);h=Math.max(0,i?l/i:h-o.height);l=gs(Math.min(l,r,c.maxWidth));h=gs(Math.min(h,a,c.maxHeight));if(l&&!h){h=gs(l/2)}const f=n!==undefined||e!==undefined;if(f&&i&&c.height&&h>c.height){h=c.height;l=gs(Math.floor(h*i))}return{width:l,height:h}}function ms(t,n,e){const i=n||1;const s=Math.floor(t.height*i);const o=Math.floor(t.width*i);t.height=Math.floor(t.height);t.width=Math.floor(t.width);const r=t.canvas;if(r.style&&(e||!r.style.height&&!r.style.width)){r.style.height=`${t.height}px`;r.style.width=`${t.width}px`}if(t.currentDevicePixelRatio!==i||r.height!==s||r.width!==o){t.currentDevicePixelRatio=i;r.height=s;r.width=o;t.ctx.setTransform(i,0,0,i,0,0);return true}return false}const ws=function(){let t=false;try{const n={get passive(){t=true;return false}};if(ss()){window.addEventListener("test",null,n);window.removeEventListener("test",null,n)}}catch(t){}return t}();function xs(t,n){const e=cs(t,n);const i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:undefined}function ys(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:t.y+e*(n.y-t.y)}}function vs(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:i==="middle"?e<.5?t.y:n.y:i==="after"?e<1?t.y:n.y:e>0?n.y:t.y}}function Ms(t,n,e,i){const s={x:t.cp2x,y:t.cp2y};const o={x:n.cp1x,y:n.cp1y};const r=ys(t,s,e);const a=ys(s,o,e);const c=ys(o,n,e);const l=ys(r,a,e);const h=ys(a,c,e);return ys(l,h,e)}const ks=function(t,n){return{x(e){return t+t+n-e},setWidth(t){n=t},textAlign(t){if(t==="center"){return t}return t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}};const _s=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,n){return t+n},leftForLtr(t,n){return t}}};function Ss(t,n,e){return t?ks(n,e):_s()}function zs(t,n){let e,i;if(n==="ltr"||n==="rtl"){e=t.canvas.style;i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")];e.setProperty("direction",n,"important");t.prevTextDirection=i}}function Os(t,n){if(n!==undefined){delete t.prevTextDirection;t.canvas.style.setProperty("direction",n[0],n[1])}}function Cs(t){if(t==="angle"){return{between:le,compare:ae,normalize:ce}}return{between:ue,compare:(t,n)=>t-n,normalize:t=>t}}function Ds({start:t,end:n,count:e,loop:i,style:s}){return{start:t%e,end:n%e,loop:i&&(n-t+1)%e===0,style:s}}function As(t,n,e){const{property:i,start:s,end:o}=e;const{between:r,normalize:a}=Cs(i);const c=n.length;let{start:l,end:h,loop:f}=t;let u,d;if(f){l+=c;h+=c;for(u=0,d=c;u<d;++u){if(!r(a(n[l%c][i]),s,o)){break}l--;h--}l%=c;h%=c}if(h<l){h+=c}return{start:l,end:h,loop:f,style:t.style}}function js(t,n,e){if(!e){return[t]}const{property:i,start:s,end:o}=e;const r=n.length;const{compare:a,between:c,normalize:l}=Cs(i);const{start:h,end:f,loop:u,style:d}=As(t,n,e);const p=[];let g=false;let b=null;let m,w,x;const y=()=>c(s,x,m)&&a(s,x)!==0;const v=()=>a(o,m)===0||c(o,x,m);const M=()=>g||y();const k=()=>!g||v();for(let t=h,e=h;t<=f;++t){w=n[t%r];if(w.skip){continue}m=l(w[i]);if(m===x){continue}g=c(m,s,o);if(b===null&&M()){b=a(m,s)===0?t:e}if(b!==null&&k()){p.push(Ds({start:b,end:t,loop:u,count:r,style:d}));b=null}e=t;x=m}if(b!==null){p.push(Ds({start:b,end:f,loop:u,count:r,style:d}))}return p}function Ps(t,n){const e=[];const i=t.segments;for(let s=0;s<i.length;s++){const o=js(i[s],t.points,n);if(o.length){e.push(...o)}}return e}function Es(t,n,e,i){let s=0;let o=n-1;if(e&&!i){while(s<n&&!t[s].skip){s++}}while(s<n&&t[s].skip){s++}s%=n;if(e){o+=s}while(o>s&&t[o%n].skip){o--}o%=n;return{start:s,end:o}}function Ls(t,n,e,i){const s=t.length;const o=[];let r=n;let a=t[n];let c;for(c=n+1;c<=e;++c){const e=t[c%s];if(e.skip||e.stop){if(!a.skip){i=false;o.push({start:n%s,end:(c-1)%s,loop:i});n=r=e.stop?c:null}}else{r=c;if(a.skip){n=c}}a=e}if(r!==null){o.push({start:n%s,end:r%s,loop:i})}return o}function Rs(t,n){const e=t.points;const i=t.options.spanGaps;const s=e.length;if(!s){return[]}const o=!!t._loop;const{start:r,end:a}=Es(e,s,o,i);if(i===true){return Ns(t,[{start:r,end:a,loop:o}],e,n)}const c=a<r?a+s:a;const l=!!t._fullLoop&&r===0&&a===s-1;return Ns(t,Ls(e,r,c,l),e,n)}function Ns(t,n,e,i){if(!i||!i.setContext||!e){return n}return Is(t,n,e,i)}function Is(t,n,e,i){const s=t._chart.getContext();const o=Ts(t.options);const{_datasetIndex:r,options:{spanGaps:a}}=t;const c=e.length;const l=[];let h=o;let f=n[0].start;let u=f;function d(t,n,i,s){const o=a?-1:1;if(t===n){return}t+=c;while(e[t%c].skip){t-=o}while(e[n%c].skip){n+=o}if(t%c!==n%c){l.push({start:t%c,end:n%c,loop:i,style:s});h=s;f=n%c}}for(const t of n){f=a?f:t.start;let n=e[f%c];let o;for(u=f+1;u<=t.end;u++){const a=e[u%c];o=Ts(i.setContext(Oi(s,{type:"segment",p0:n,p1:a,p0DataIndex:(u-1)%c,p1DataIndex:u%c,datasetIndex:r})));if(Fs(o,h)){d(f,u-1,t.loop,h)}n=a;h=o}if(f<u-1){d(f,u-1,t.loop,h)}}return l}function Ts(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fs(t,n){if(!n){return false}const e=[];const i=function(t,n){if(!Ee(n)){return n}if(!e.includes(n)){e.push(n)}return e.indexOf(n)};return JSON.stringify(t,i)!==JSON.stringify(n,i)}function Ws(t,n,e){return t.options.clip?t[e]:n[e]}function Bs(t,n){const{xScale:e,yScale:i}=t;if(e&&i){return{left:Ws(e,n,"left"),right:Ws(e,n,"right"),top:Ws(i,n,"top"),bottom:Ws(i,n,"bottom")}}return n}function $s(t,n){const e=n._clip;if(e.disabled){return false}const i=Bs(n,t.chartArea);return{left:e.left===false?0:i.left-(e.left===true?0:e.left),right:e.right===false?t.width:i.right+(e.right===true?0:e.right),top:e.top===false?0:i.top-(e.top===true?0:e.top),bottom:e.bottom===false?t.height:i.bottom+(e.bottom===true?0:e.bottom)}}
|
|
38
|
-
/*!
|
|
39
|
-
* Chart.js v4.4.9
|
|
40
|
-
* https://www.chartjs.org
|
|
41
|
-
* (c) 2025 Chart.js Contributors
|
|
42
|
-
* Released under the MIT License
|
|
43
|
-
*/class Hs{constructor(){this._request=null;this._charts=new Map;this._running=false;this._lastDate=undefined}_notify(t,n,e,i){const s=n.listeners[i];const o=n.duration;s.forEach((i=>i({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(e-n.start,o)})))}_refresh(){if(this._request){return}this._running=true;this._request=ve.call(window,(()=>{this._update();this._request=null;if(this._running){this._refresh()}}))}_update(t=Date.now()){let n=0;this._charts.forEach(((e,i)=>{if(!e.running||!e.items.length){return}const s=e.items;let o=s.length-1;let r=false;let a;for(;o>=0;--o){a=s[o];if(a._active){if(a._total>e.duration){e.duration=a._total}a.tick(t);r=true}else{s[o]=s[s.length-1];s.pop()}}if(r){i.draw();this._notify(i,e,t,"progress")}if(!s.length){e.running=false;this._notify(i,e,t,"complete");e.initial=false}n+=s.length}));this._lastDate=t;if(n===0){this._running=false}}_getAnims(t){const n=this._charts;let e=n.get(t);if(!e){e={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}};n.set(t,e)}return e}listen(t,n,e){this._getAnims(t).listeners[n].push(e)}add(t,n){if(!n||!n.length){return}this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);if(!n){return}n.running=true;n.start=Date.now();n.duration=n.items.reduce(((t,n)=>Math.max(t,n._duration)),0);this._refresh()}running(t){if(!this._running){return false}const n=this._charts.get(t);if(!n||!n.running||!n.items.length){return false}return true}stop(t){const n=this._charts.get(t);if(!n||!n.items.length){return}const e=n.items;let i=e.length-1;for(;i>=0;--i){e[i].cancel()}n.items=[];this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ys=new Hs;const Vs="transparent";const Us={boolean(t,n,e){return e>.5?n:t},color(t,n,e){const i=Le(t||Vs);const s=i.valid&&Le(n||Vs);return s&&s.valid?s.mix(i,e).hexString():n},number(t,n,e){return t+(n-t)*e}};class Xs{constructor(t,n,e,i){const s=n[e];i=Si([t.to,i,s,t.from]);const o=Si([t.from,s,i]);this._active=true;this._fn=t.fn||Us[t.type||typeof o];this._easing=Pe[t.easing]||Pe.linear;this._start=Math.floor(Date.now()+(t.delay||0));this._duration=this._total=Math.floor(t.duration);this._loop=!!t.loop;this._target=n;this._prop=e;this._from=o;this._to=i;this._promises=undefined}active(){return this._active}update(t,n,e){if(this._active){this._notify(false);const i=this._target[this._prop];const s=e-this._start;const o=this._duration-s;this._start=e;this._duration=Math.floor(Math.max(o,t.duration));this._total+=s;this._loop=!!t.loop;this._to=Si([t.to,n,i,t.from]);this._from=Si([t.from,i,n])}}cancel(){if(this._active){this.tick(Date.now());this._active=false;this._notify(false)}}tick(t){const n=t-this._start;const e=this._duration;const i=this._prop;const s=this._from;const o=this._loop;const r=this._to;let a;this._active=s!==r&&(o||n<e);if(!this._active){this._target[i]=r;this._notify(true);return}if(n<0){this._target[i]=s;return}a=n/e%2;a=o&&a>1?2-a:a;a=this._easing(Math.min(1,Math.max(0,a)));this._target[i]=this._fn(s,r,a)}wait(){const t=this._promises||(this._promises=[]);return new Promise(((n,e)=>{t.push({res:n,rej:e})}))}_notify(t){const n=t?"res":"rej";const e=this._promises||[];for(let t=0;t<e.length;t++){e[t][n]()}}}class Ks{constructor(t,n){this._chart=t;this._properties=new Map;this.configure(n)}configure(t){if(!gn(t)){return}const n=Object.keys(Ge.animation);const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const s=t[i];if(!gn(s)){return}const o={};for(const t of n){o[t]=s[t]}(pn(s.properties)&&s.properties||[i]).forEach((t=>{if(t===i||!e.has(t)){e.set(t,o)}}))}))}_animateOptions(t,n){const e=n.options;const i=qs(t,e);if(!i){return[]}const s=this._createAnimations(i,e);if(e.$shared){Zs(t.options.$animations,e).then((()=>{t.options=e}),(()=>{}))}return s}_createAnimations(t,n){const e=this._properties;const i=[];const s=t.$animations||(t.$animations={});const o=Object.keys(n);const r=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if(c.charAt(0)==="$"){continue}if(c==="options"){i.push(...this._animateOptions(t,n));continue}const l=n[c];let h=s[c];const f=e.get(c);if(h){if(f&&h.active()){h.update(f,l,r);continue}else{h.cancel()}}if(!f||!f.duration){t[c]=l;continue}s[c]=h=new Xs(f,t,c,l);i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const e=this._createAnimations(t,n);if(e.length){Ys.add(this._chart,e);return true}}}function Zs(t,n){const e=[];const i=Object.keys(n);for(let n=0;n<i.length;n++){const s=t[i[n]];if(s&&s.active()){e.push(s.wait())}}return Promise.all(e)}function qs(t,n){if(!n){return}let e=t.options;if(!e){t.options=n;return}if(e.$shared){t.options=e=Object.assign({},e,{$shared:false,$animations:{}})}return e}function Qs(t,n){const e=t&&t.options||{};const i=e.reverse;const s=e.min===undefined?n:0;const o=e.max===undefined?n:0;return{start:i?o:s,end:i?s:o}}function Gs(t,n,e){if(e===false){return false}const i=Qs(t,e);const s=Qs(n,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function Js(t){let n,e,i,s;if(gn(t)){n=t.top;e=t.right;i=t.bottom;s=t.left}else{n=e=i=s=t}return{top:n,right:e,bottom:i,left:s,disabled:t===false}}function to(t,n){const e=[];const i=t._getSortedDatasetMetas(n);let s,o;for(s=0,o=i.length;s<o;++s){e.push(i[s].index)}return e}function no(t,n,e,i={}){const s=t.keys;const o=i.mode==="single";let r,a,c,l;if(n===null){return}let h=false;for(r=0,a=s.length;r<a;++r){c=+s[r];if(c===e){h=true;if(i.all){continue}break}l=t.values[c];if(bn(l)&&(o||n===0||Kn(n)===Kn(l))){n+=l}}if(!h&&!i.all){return 0}return n}function eo(t,n){const{iScale:e,vScale:i}=n;const s=e.axis==="x"?"x":"y";const o=i.axis==="x"?"x":"y";const r=Object.keys(t);const a=new Array(r.length);let c,l,h;for(c=0,l=r.length;c<l;++c){h=r[c];a[c]={[s]:h,[o]:t[h]}}return a}function io(t,n){const e=t&&t.options.stacked;return e||e===undefined&&n.stack!==undefined}function so(t,n,e){return`${t.id}.${n.id}.${e.stack||e.type}`}function oo(t){const{min:n,max:e,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?n:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function ro(t,n,e){const i=t[n]||(t[n]={});return i[e]||(i[e]={})}function ao(t,n,e,i){for(const s of n.getMatchingVisibleMetas(i).reverse()){const n=t[s.index];if(e&&n>0||!e&&n<0){return s.index}}return null}function co(t,n){const{chart:e,_cachedMeta:i}=t;const s=e._stacks||(e._stacks={});const{iScale:o,vScale:r,index:a}=i;const c=o.axis;const l=r.axis;const h=so(o,r,i);const f=n.length;let u;for(let t=0;t<f;++t){const e=n[t];const{[c]:o,[l]:f}=e;const d=e._stacks||(e._stacks={});u=d[l]=ro(s,h,o);u[a]=f;u._top=ao(u,r,true,i.type);u._bottom=ao(u,r,false,i.type);const p=u._visualValues||(u._visualValues={});p[a]=f}}function lo(t,n){const e=t.scales;return Object.keys(e).filter((t=>e[t].axis===n)).shift()}function ho(t,n){return Oi(t,{active:false,dataset:undefined,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function fo(t,n,e){return Oi(t,{active:false,dataIndex:n,parsed:undefined,raw:undefined,element:e,index:n,mode:"default",type:"data"})}function uo(t,n){const e=t.controller.index;const i=t.vScale&&t.vScale.axis;if(!i){return}n=n||t._parsed;for(const t of n){const n=t._stacks;if(!n||n[i]===undefined||n[i][e]===undefined){return}delete n[i][e];if(n[i]._visualValues!==undefined&&n[i]._visualValues[e]!==undefined){delete n[i]._visualValues[e]}}}const po=t=>t==="reset"||t==="none";const go=(t,n)=>n?t:Object.assign({},t);const bo=(t,n,e)=>t&&!n.hidden&&n._stacked&&{keys:to(e,true),values:null};class mo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t;this._ctx=t.ctx;this.index=n;this._cachedDataOpts={};this._cachedMeta=this.getMeta();this._type=this._cachedMeta.type;this.options=undefined;this._parsing=false;this._data=undefined;this._objectData=undefined;this._sharedOptions=undefined;this._drawStart=undefined;this._drawCount=undefined;this.enableOptionSharing=false;this.supportsDecimation=false;this.$context=undefined;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=io(t.vScale,t);this.addElements();if(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){if(this.index!==t){uo(this._cachedMeta)}this.index=t}linkScales(){const t=this.chart;const n=this._cachedMeta;const e=this.getDataset();const i=(t,n,e,i)=>t==="x"?n:t==="r"?i:e;const s=n.xAxisID=wn(e.xAxisID,lo(t,"x"));const o=n.yAxisID=wn(e.yAxisID,lo(t,"y"));const r=n.rAxisID=wn(e.rAxisID,lo(t,"r"));const a=n.indexAxis;const c=n.iAxisID=i(a,s,o,r);const l=n.vAxisID=i(a,o,s,r);n.xScale=this.getScaleForId(s);n.yScale=this.getScaleForId(o);n.rScale=this.getScaleForId(r);n.iScale=this.getScaleForId(c);n.vScale=this.getScaleForId(l)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;if(this._data){xe(this._data,this)}if(t._stacked){uo(t)}}_dataCheck(){const t=this.getDataset();const n=t.data||(t.data=[]);const e=this._data;if(gn(n)){const t=this._cachedMeta;this._data=eo(n,t)}else if(e!==n){if(e){xe(e,this);const t=this._cachedMeta;uo(t);t._parsed=[]}if(n&&Object.isExtensible(n)){we(n,this)}this._syncList=[];this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck();if(this.datasetElementType){t.dataset=new this.datasetElementType}}buildOrUpdateElements(t){const n=this._cachedMeta;const e=this.getDataset();let i=false;this._dataCheck();const s=n._stacked;n._stacked=io(n.vScale,n);if(n.stack!==e.stack){i=true;uo(n);n.stack=e.stack}this._resyncElements(t);if(i||s!==n._stacked){co(this,n._parsed);n._stacked=io(n.vScale,n)}}configure(){const t=this.chart.config;const n=t.datasetScopeKeys(this._type);const e=t.getOptionScopes(this.getDataset(),n,true);this.options=t.createResolver(e,this.getContext());this._parsing=this.options.parsing;this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:e,_data:i}=this;const{iScale:s,_stacked:o}=e;const r=s.axis;let a=t===0&&n===i.length?true:e._sorted;let c=t>0&&e._parsed[t-1];let l,h,f;if(this._parsing===false){e._parsed=i;e._sorted=true;f=i}else{if(pn(i[t])){f=this.parseArrayData(e,i,t,n)}else if(gn(i[t])){f=this.parseObjectData(e,i,t,n)}else{f=this.parsePrimitiveData(e,i,t,n)}const s=()=>h[r]===null||c&&h[r]<c[r];for(l=0;l<n;++l){e._parsed[l+t]=h=f[l];if(a){if(s()){a=false}c=h}}e._sorted=a}if(o){co(this,f)}}parsePrimitiveData(t,n,e,i){const{iScale:s,vScale:o}=t;const r=s.axis;const a=o.axis;const c=s.getLabels();const l=s===o;const h=new Array(i);let f,u,d;for(f=0,u=i;f<u;++f){d=f+e;h[f]={[r]:l||s.parse(c[d],d),[a]:o.parse(n[d],d)}}return h}parseArrayData(t,n,e,i){const{xScale:s,yScale:o}=t;const r=new Array(i);let a,c,l,h;for(a=0,c=i;a<c;++a){l=a+e;h=n[l];r[a]={x:s.parse(h[0],l),y:o.parse(h[1],l)}}return r}parseObjectData(t,n,e,i){const{xScale:s,yScale:o}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const c=new Array(i);let l,h,f,u;for(l=0,h=i;l<h;++l){f=l+e;u=n[f];c[l]={x:s.parse(En(u,r),f),y:o.parse(En(u,a),f)}}return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,e){const i=this.chart;const s=this._cachedMeta;const o=n[t.axis];const r={keys:to(i,true),values:n._stacks[t.axis]._visualValues};return no(r,o,s.index,{mode:e})}updateRangeFromParsed(t,n,e,i){const s=e[n.axis];let o=s===null?NaN:s;const r=i&&e._stacks[n.axis];if(i&&r){i.values=r;o=no(i,s,this._cachedMeta.index)}t.min=Math.min(t.min,o);t.max=Math.max(t.max,o)}getMinMax(t,n){const e=this._cachedMeta;const i=e._parsed;const s=e._sorted&&t===e.iScale;const o=i.length;const r=this._getOtherScale(t);const a=bo(n,e,this.chart);const c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};const{min:l,max:h}=oo(r);let f,u;function d(){u=i[f];const n=u[r.axis];return!bn(u[t.axis])||l>n||h<n}for(f=0;f<o;++f){if(d()){continue}this.updateRangeFromParsed(c,t,u,a);if(s){break}}if(s){for(f=o-1;f>=0;--f){if(d()){continue}this.updateRangeFromParsed(c,t,u,a);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed;const e=[];let i,s,o;for(i=0,s=n.length;i<s;++i){o=n[i][t.axis];if(bn(o)){e.push(o)}}return e}getMaxOverflow(){return false}getLabelAndValue(t){const n=this._cachedMeta;const e=n.iScale;const i=n.vScale;const s=this.getParsed(t);return{label:e?""+e.getLabelForValue(s[e.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default");n._clip=Js(wn(this.options.clip,Gs(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx;const n=this.chart;const e=this._cachedMeta;const i=e.data||[];const s=n.chartArea;const o=[];const r=this._drawStart||0;const a=this._drawCount||i.length-r;const c=this.options.drawActiveElementsOnTop;let l;if(e.dataset){e.dataset.draw(t,s,r,a)}for(l=r;l<r+a;++l){const n=i[l];if(n.hidden){continue}if(n.active&&c){o.push(n)}else{n.draw(t,s)}}for(l=0;l<o.length;++l){o[l].draw(t,s)}}getStyle(t,n){const e=n?"active":"default";return t===undefined&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,n,e){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const n=this._cachedMeta.data[t];s=n.$context||(n.$context=fo(this.getContext(),t,n));s.parsed=this.getParsed(t);s.raw=i.data[t];s.index=s.dataIndex=t}else{s=this.$context||(this.$context=ho(this.chart.getContext(),this.index));s.dataset=i;s.index=s.datasetIndex=this.index}s.active=!!n;s.mode=e;return s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",e){const i=n==="active";const s=this._cachedDataOpts;const o=t+"-"+n;const r=s[o];const a=this.enableOptionSharing&&Rn(e);if(r){return go(r,a)}const c=this.chart.config;const l=c.datasetElementScopeKeys(this._type,t);const h=i?[`${t}Hover`,"hover",t,""]:[t,""];const f=c.getOptionScopes(this.getDataset(),l);const u=Object.keys(Ge.elements[t]);const d=()=>this.getContext(e,i,n);const p=c.resolveNamedOptions(f,u,d,h);if(p.$shared){p.$shared=a;s[o]=Object.freeze(go(p,a))}return p}_resolveAnimations(t,n,e){const i=this.chart;const s=this._cachedDataOpts;const o=`animation-${n}`;const r=s[o];if(r){return r}let a;if(i.options.animation!==false){const i=this.chart.config;const s=i.datasetAnimationScopeKeys(this._type,n);const o=i.getOptionScopes(this.getDataset(),s);a=i.createResolver(o,this.getContext(t,e,n))}const c=new Ks(i,a&&a.animations);if(a&&a._cacheable){s[o]=Object.freeze(c)}return c}getSharedOptions(t){if(!t.$shared){return}return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||po(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const e=this.resolveDataElementOptions(t,n);const i=this._sharedOptions;const s=this.getSharedOptions(e);const o=this.includeOptions(n,s)||s!==i;this.updateSharedOptions(s,n,e);return{sharedOptions:s,includeOptions:o}}updateElement(t,n,e,i){if(po(i)){Object.assign(t,e)}else{this._resolveAnimations(n,i).update(t,e)}}updateSharedOptions(t,n,e){if(t&&!po(n)){this._resolveAnimations(undefined,n).update(t,e)}}_setStyle(t,n,e,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,e,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,e){this._setStyle(t,e,"active",false)}setHoverStyle(t,n,e){this._setStyle(t,e,"active",true)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",false)}}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",true)}}_resyncElements(t){const n=this._data;const e=this._cachedMeta.data;for(const[t,n,e]of this._syncList){this[t](n,e)}this._syncList=[];const i=e.length;const s=n.length;const o=Math.min(s,i);if(o){this.parse(0,o)}if(s>i){this._insertElements(i,s-i,t)}else if(s<i){this._removeElements(s,i-s)}}_insertElements(t,n,e=true){const i=this._cachedMeta;const s=i.data;const o=t+n;let r;const a=t=>{t.length+=n;for(r=t.length-1;r>=o;r--){t[r]=t[r-n]}};a(s);for(r=t;r<o;++r){s[r]=new this.dataElementType}if(this._parsing){a(i._parsed)}this.parse(t,n);if(e){this.updateElements(s,t,n,"reset")}}updateElements(t,n,e,i){}_removeElements(t,n){const e=this._cachedMeta;if(this._parsing){const i=e._parsed.splice(t,n);if(e._stacked){uo(e,i)}}e.data.splice(t,n)}_sync(t){if(this._parsing){this._syncList.push(t)}else{const[n,e,i]=t;this[n](e,i)}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,n){if(n){this._sync(["_removeElements",t,n])}const e=arguments.length-2;if(e){this._sync(["_insertElements",t,e])}}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function wo(t,n){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas(n);let i=[];for(let n=0,s=e.length;n<s;n++){i=i.concat(e[n].controller.getAllParsedValues(t))}t._cache.$bar=ye(i.sort(((t,n)=>t-n)))}return t._cache.$bar}function xo(t){const n=t.iScale;const e=wo(n,t.type);let i=n._length;let s,o,r,a;const c=()=>{if(r===32767||r===-32768){return}if(Rn(a)){i=Math.min(i,Math.abs(r-a)||i)}a=r};for(s=0,o=e.length;s<o;++s){r=n.getPixelForValue(e[s]);c()}a=undefined;for(s=0,o=n.ticks.length;s<o;++s){r=n.getPixelForTick(s);c()}return i}function yo(t,n,e,i){const s=e.barThickness;let o,r;if(dn(s)){o=n.min*e.categoryPercentage;r=e.barPercentage}else{o=s*i;r=1}return{chunk:o/i,ratio:r,start:n.pixels[t]-o/2}}function vo(t,n,e,i){const s=n.pixels;const o=s[t];let r=t>0?s[t-1]:null;let a=t<s.length-1?s[t+1]:null;const c=e.categoryPercentage;if(r===null){r=o-(a===null?n.end-n.start:a-o)}if(a===null){a=o+o-r}const l=o-(o-Math.min(r,a))/2*c;const h=Math.abs(a-r)/2*c;return{chunk:h/i,ratio:e.barPercentage,start:l}}function Mo(t,n,e,i){const s=e.parse(t[0],i);const o=e.parse(t[1],i);const r=Math.min(s,o);const a=Math.max(s,o);let c=r;let l=a;if(Math.abs(r)>Math.abs(a)){c=a;l=r}n[e.axis]=l;n._custom={barStart:c,barEnd:l,start:s,end:o,min:r,max:a}}function ko(t,n,e,i){if(pn(t)){Mo(t,n,e,i)}else{n[e.axis]=e.parse(t,i)}return n}function _o(t,n,e,i){const s=t.iScale;const o=t.vScale;const r=s.getLabels();const a=s===o;const c=[];let l,h,f,u;for(l=e,h=e+i;l<h;++l){u=n[l];f={};f[s.axis]=a||s.parse(r[l],l);c.push(ko(u,f,o,l))}return c}function So(t){return t&&t.barStart!==undefined&&t.barEnd!==undefined}function zo(t,n,e){if(t!==0){return Kn(t)}return(n.isHorizontal()?1:-1)*(n.min>=e?1:-1)}function Oo(t){let n,e,i,s,o;if(t.horizontal){n=t.base>t.x;e="left";i="right"}else{n=t.base<t.y;e="bottom";i="top"}if(n){s="end";o="start"}else{s="start";o="end"}return{start:e,end:i,reverse:n,top:s,bottom:o}}function Co(t,n,e,i){let s=n.borderSkipped;const o={};if(!s){t.borderSkipped=o;return}if(s===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}const{start:r,end:a,reverse:c,top:l,bottom:h}=Oo(t);if(s==="middle"&&e){t.enableBorderRadius=true;if((e._top||0)===i){s=l}else if((e._bottom||0)===i){s=h}else{o[Do(h,r,a,c)]=true;s=l}}o[Do(s,r,a,c)]=true;t.borderSkipped=o}function Do(t,n,e,i){if(i){t=Ao(t,n,e);t=jo(t,e,n)}else{t=jo(t,n,e)}return t}function Ao(t,n,e){return t===n?e:t===e?n:t}function jo(t,n,e){return t==="start"?n:t==="end"?e:t}function Po(t,{inflateAmount:n},e){t.inflateAmount=n==="auto"?e===1?.33:0:n}class Eo extends mo{static id="bar";static defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};parsePrimitiveData(t,n,e,i){return _o(t,n,e,i)}parseArrayData(t,n,e,i){return _o(t,n,e,i)}parseObjectData(t,n,e,i){const{iScale:s,vScale:o}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const c=s.axis==="x"?r:a;const l=o.axis==="x"?r:a;const h=[];let f,u,d,p;for(f=e,u=e+i;f<u;++f){p=n[f];d={};d[s.axis]=s.parse(En(p,c),f);h.push(ko(En(p,l),d,o,f))}return h}updateRangeFromParsed(t,n,e,i){super.updateRangeFromParsed(t,n,e,i);const s=e._custom;if(s&&n===this._cachedMeta.vScale){t.min=Math.min(t.min,s.min);t.max=Math.max(t.max,s.max)}}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta;const{iScale:e,vScale:i}=n;const s=this.getParsed(t);const o=s._custom;const r=So(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+e.getLabelForValue(s[e.axis]),value:r}}initialize(){this.enableOptionSharing=true;super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,e,i){const s=i==="reset";const{index:o,_cachedMeta:{vScale:r}}=this;const a=r.getBasePixel();const c=r.isHorizontal();const l=this._getRuler();const{sharedOptions:h,includeOptions:f}=this._getSharedOptions(n,i);for(let u=n;u<n+e;u++){const n=this.getParsed(u);const e=s||dn(n[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(u);const d=this._calculateBarIndexPixels(u,l);const p=(n._stacks||{})[r.axis];const g={horizontal:c,base:e.base,enableBorderRadius:!p||So(n._custom)||o===p._top||o===p._bottom,x:c?e.head:d.center,y:c?d.center:e.head,height:c?d.size:Math.abs(e.size),width:c?Math.abs(e.size):d.size};if(f){g.options=h||this.resolveDataElementOptions(u,t[u].active?"active":i)}const b=g.options||t[u].options;Co(g,b,p,o);Po(g,b,l.ratio);this.updateElement(t[u],u,g,i)}}_getStacks(t,n){const{iScale:e}=this._cachedMeta;const i=e.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped));const s=e.options.stacked;const o=[];const r=this._cachedMeta.controller.getParsed(n);const a=r&&r[e.axis];const c=t=>{const n=t._parsed.find((t=>t[e.axis]===a));const i=n&&n[t.vScale.axis];if(dn(i)||isNaN(i)){return true}};for(const e of i){if(n!==undefined&&c(e)){continue}if(s===false||o.indexOf(e.stack)===-1||s===undefined&&e.stack===undefined){o.push(e.stack)}if(e.index===t){break}}if(!o.length){o.push(undefined)}return o}_getStackCount(t){return this._getStacks(undefined,t).length}_getStackIndex(t,n,e){const i=this._getStacks(t,e);const s=n!==undefined?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options;const n=this._cachedMeta;const e=n.iScale;const i=[];let s,o;for(s=0,o=n.data.length;s<o;++s){i.push(e.getPixelForValue(this.getParsed(s)[e.axis],s))}const r=t.barThickness;const a=r||xo(n);return{min:a,pixels:i,start:e._startPixel,end:e._endPixel,stackCount:this._getStackCount(),scale:e,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:e,index:i},options:{base:s,minBarLength:o}}=this;const r=s||0;const a=this.getParsed(t);const c=a._custom;const l=So(c);let h=a[n.axis];let f=0;let u=e?this.applyStack(n,a,e):h;let d,p;if(u!==h){f=u-h;u=h}if(l){h=c.barStart;u=c.barEnd-c.barStart;if(h!==0&&Kn(h)!==Kn(c.barEnd)){f=0}f+=h}const g=!dn(s)&&!l?s:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)){d=n.getPixelForValue(f+u)}else{d=b}p=d-b;if(Math.abs(p)<o){p=zo(p,n,r)*o;if(h===r){b-=p/2}const t=n.getPixelForDecimal(0);const s=n.getPixelForDecimal(1);const c=Math.min(t,s);const f=Math.max(t,s);b=Math.max(Math.min(b,f),c);d=b+p;if(e&&!l){a._stacks[n.axis]._visualValues[i]=n.getValueForPixel(d)-n.getValueForPixel(b)}}if(b===n.getPixelForValue(r)){const t=Kn(p)*n.getLineWidthForValue(r)/2;b+=t;p-=t}return{size:p,base:b,head:d,center:d+p/2}}_calculateBarIndexPixels(t,n){const e=n.scale;const i=this.options;const s=i.skipNull;const o=wn(i.maxBarThickness,Infinity);let r,a;if(n.grouped){const e=s?this._getStackCount(t):n.stackCount;const c=i.barThickness==="flex"?vo(t,n,i,e):yo(t,n,i,e);const l=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:undefined);r=c.start+c.chunk*l+c.chunk/2;a=Math.min(o,c.chunk*c.ratio)}else{r=e.getPixelForValue(this.getParsed(t)[e.axis],t);a=Math.min(o,n.min*n.ratio)}return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta;const n=t.vScale;const e=t.data;const i=e.length;let s=0;for(;s<i;++s){if(this.getParsed(s)[n.axis]!==null&&!e[s].hidden){e[s].draw(this._ctx)}}}}class Lo extends mo{static id="bubble";static defaults={datasetElementType:false,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=true;super.initialize()}parsePrimitiveData(t,n,e,i){const s=super.parsePrimitiveData(t,n,e,i);for(let t=0;t<s.length;t++){s[t]._custom=this.resolveDataElementOptions(t+e).radius}return s}parseArrayData(t,n,e,i){const s=super.parseArrayData(t,n,e,i);for(let t=0;t<s.length;t++){const i=n[e+t];s[t]._custom=wn(i[2],this.resolveDataElementOptions(t+e).radius)}return s}parseObjectData(t,n,e,i){const s=super.parseObjectData(t,n,e,i);for(let t=0;t<s.length;t++){const i=n[e+t];s[t]._custom=wn(i&&i.r&&+i.r,this.resolveDataElementOptions(t+e).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let e=t.length-1;e>=0;--e){n=Math.max(n,t[e].size(this.resolveDataElementOptions(e))/2)}return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:s}=n;const o=this.getParsed(t);const r=i.getLabelForValue(o.x);const a=s.getLabelForValue(o.y);const c=o._custom;return{label:e[t]||"",value:"("+r+", "+a+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r}=this._cachedMeta;const{sharedOptions:a,includeOptions:c}=this._getSharedOptions(n,i);const l=o.axis;const h=r.axis;for(let f=n;f<n+e;f++){const n=t[f];const e=!s&&this.getParsed(f);const u={};const d=u[l]=s?o.getPixelForDecimal(.5):o.getPixelForValue(e[l]);const p=u[h]=s?r.getBasePixel():r.getPixelForValue(e[h]);u.skip=isNaN(d)||isNaN(p);if(c){u.options=a||this.resolveDataElementOptions(f,n.active?"active":i);if(s){u.options.radius=0}}this.updateElement(n,f,u,i)}}resolveDataElementOptions(t,n){const e=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);if(i.$shared){i=Object.assign({},i,{$shared:false})}const s=i.radius;if(n!=="active"){i.radius=0}i.radius+=wn(e&&e._custom,s);return i}}function Ro(t,n,e){let i=1;let s=1;let o=0;let r=0;if(n<Wn){const a=t;const c=a+n;const l=Math.cos(a);const h=Math.sin(a);const f=Math.cos(c);const u=Math.sin(c);const d=(t,n,i)=>le(t,a,c,true)?1:Math.max(n,n*e,i,i*e);const p=(t,n,i)=>le(t,a,c,true)?-1:Math.min(n,n*e,i,i*e);const g=d(0,l,f);const b=d(Yn,h,u);const m=p(Fn,l,f);const w=p(Fn+Yn,h,u);i=(g-m)/2;s=(b-w)/2;o=-(g+m)/2;r=-(b+w)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:r}}class No extends mo{static id="doughnut";static defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,s)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(s);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}}};constructor(t,n){super(t,n);this.enableOptionSharing=true;this.innerRadius=undefined;this.outerRadius=undefined;this.offsetX=undefined;this.offsetY=undefined}linkScales(){}parse(t,n){const e=this.getDataset().data;const i=this._cachedMeta;if(this._parsing===false){i._parsed=e}else{let s=t=>+e[t];if(gn(e[t])){const{key:t="value"}=this._parsing;s=n=>+En(e[n],t)}let o,r;for(o=t,r=t+n;o<r;++o){i._parsed[o]=s(o)}}}_getRotation(){return ee(this.options.rotation-90)}_getCircumference(){return ee(this.options.circumference)}_getRotationExtents(){let t=Wn;let n=-Wn;for(let e=0;e<this.chart.data.datasets.length;++e){if(this.chart.isDatasetVisible(e)&&this.chart.getDatasetMeta(e).type===this._type){const i=this.chart.getDatasetMeta(e).controller;const s=i._getRotation();const o=i._getCircumference();t=Math.min(t,s);n=Math.max(n,s+o)}}return{rotation:t,circumference:n-t}}update(t){const n=this.chart;const{chartArea:e}=n;const i=this._cachedMeta;const s=i.data;const o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing;const r=Math.max((Math.min(e.width,e.height)-o)/2,0);const a=Math.min(xn(this.options.cutout,r),1);const c=this._getRingWeight(this.index);const{circumference:l,rotation:h}=this._getRotationExtents();const{ratioX:f,ratioY:u,offsetX:d,offsetY:p}=Ro(h,l,a);const g=(e.width-o)/f;const b=(e.height-o)/u;const m=Math.max(Math.min(g,b)/2,0);const w=yn(this.options.radius,m);const x=Math.max(w*a,0);const y=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=d*w;this.offsetY=p*w;i.total=this.calculateTotal();this.outerRadius=w-y*this._getRingWeightOffset(this.index);this.innerRadius=Math.max(this.outerRadius-y*c,0);this.updateElements(s,0,s.length,t)}_circumference(t,n){const e=this.options;const i=this._cachedMeta;const s=this._getCircumference();if(n&&e.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden){return 0}return this.calculateCircumference(i._parsed[t]*s/Wn)}updateElements(t,n,e,i){const s=i==="reset";const o=this.chart;const r=o.chartArea;const a=o.options;const c=a.animation;const l=(r.left+r.right)/2;const h=(r.top+r.bottom)/2;const f=s&&c.animateScale;const u=f?0:this.innerRadius;const d=f?0:this.outerRadius;const{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation();let m;for(m=0;m<n;++m){b+=this._circumference(m,s)}for(m=n;m<n+e;++m){const n=this._circumference(m,s);const e=t[m];const o={x:l+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+n,circumference:n,outerRadius:d,innerRadius:u};if(g){o.options=p||this.resolveDataElementOptions(m,e.active?"active":i)}b+=n;this.updateElement(e,m,o,i)}}calculateTotal(){const t=this._cachedMeta;const n=t.data;let e=0;let i;for(i=0;i<n.length;i++){const s=t._parsed[i];if(s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden){e+=Math.abs(s)}}return e}calculateCircumference(t){const n=this._cachedMeta.total;if(n>0&&!isNaN(t)){return Wn*(Math.abs(t)/n)}return 0}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const s=$e(n._parsed[t],e.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const e=this.chart;let i,s,o,r,a;if(!t){for(i=0,s=e.data.datasets.length;i<s;++i){if(e.isDatasetVisible(i)){o=e.getDatasetMeta(i);t=o.data;r=o.controller;break}}}if(!t){return 0}for(i=0,s=t.length;i<s;++i){a=r.resolveDataElementOptions(i);if(a.borderAlign!=="inner"){n=Math.max(n,a.borderWidth||0,a.hoverBorderWidth||0)}}return n}getMaxOffset(t){let n=0;for(let e=0,i=t.length;e<i;++e){const t=this.resolveDataElementOptions(e);n=Math.max(n,t.offset||0,t.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let e=0;e<t;++e){if(this.chart.isDatasetVisible(e)){n+=this._getRingWeight(e)}}return n}_getRingWeight(t){return Math.max(wn(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Io extends mo{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:true,spanGaps:false};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=true;this.supportsDecimation=true;super.initialize()}update(t){const n=this._cachedMeta;const{dataset:e,data:i=[],_dataset:s}=n;const o=this.chart._animationsDisabled;let{start:r,count:a}=Oe(n,i,o);this._drawStart=r;this._drawCount=a;if(Ce(n)){r=0;a=i.length}e._chart=this.chart;e._datasetIndex=this.index;e._decimated=!!s._decimated;e.points=i;const c=this.resolveDatasetElementOptions(t);if(!this.options.showLine){c.borderWidth=0}c.segment=this.options.segment;this.updateElement(e,undefined,{animated:!o,options:c},t);this.updateElements(i,r,a,t)}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r,_stacked:a,_dataset:c}=this._cachedMeta;const{sharedOptions:l,includeOptions:h}=this._getSharedOptions(n,i);const f=o.axis;const u=r.axis;const{spanGaps:d,segment:p}=this.options;const g=Jn(d)?d:Number.POSITIVE_INFINITY;const b=this.chart._animationsDisabled||s||i==="none";const m=n+e;const w=t.length;let x=n>0&&this.getParsed(n-1);for(let e=0;e<w;++e){const d=t[e];const w=b?d:{};if(e<n||e>=m){w.skip=true;continue}const y=this.getParsed(e);const v=dn(y[u]);const M=w[f]=o.getPixelForValue(y[f],e);const k=w[u]=s||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,y,a):y[u],e);w.skip=isNaN(M)||isNaN(k)||v;w.stop=e>0&&Math.abs(y[f]-x[f])>g;if(p){w.parsed=y;w.raw=c.data[e]}if(h){w.options=l||this.resolveDataElementOptions(e,d.active?"active":i)}if(!b){this.updateElement(d,e,w,i)}x=y}}getMaxOverflow(){const t=this._cachedMeta;const n=t.dataset;const e=n.options&&n.options.borderWidth||0;const i=t.data||[];if(!i.length){return e}const s=i[0].size(this.resolveDataElementOptions(0));const o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(e,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis);super.draw()}}class To extends mo{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,s)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(s);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};constructor(t,n){super(t,n);this.innerRadius=undefined;this.outerRadius=undefined}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const s=$e(n._parsed[t].r,e.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,n,e,i){return Xi.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta.data;this._updateRadius();this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta;const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};t.data.forEach(((t,e)=>{const i=this.getParsed(e).r;if(!isNaN(i)&&this.chart.getDataVisibility(e)){if(i<n.min){n.min=i}if(i>n.max){n.max=i}}}));return n}_updateRadius(){const t=this.chart;const n=t.chartArea;const e=t.options;const i=Math.min(n.right-n.left,n.bottom-n.top);const s=Math.max(i/2,0);const o=Math.max(e.cutoutPercentage?s/100*e.cutoutPercentage:1,0);const r=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index;this.innerRadius=this.outerRadius-r}updateElements(t,n,e,i){const s=i==="reset";const o=this.chart;const r=o.options;const a=r.animation;const c=this._cachedMeta.rScale;const l=c.xCenter;const h=c.yCenter;const f=c.getIndexAngle(0)-.5*Fn;let u=f;let d;const p=360/this.countVisibleElements();for(d=0;d<n;++d){u+=this._computeAngle(d,i,p)}for(d=n;d<n+e;d++){const n=t[d];let e=u;let r=u+this._computeAngle(d,i,p);let g=o.getDataVisibility(d)?c.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=r;if(s){if(a.animateScale){g=0}if(a.animateRotate){e=r=f}}const b={x:l,y:h,innerRadius:0,outerRadius:g,startAngle:e,endAngle:r,options:this.resolveDataElementOptions(d,n.active?"active":i)};this.updateElement(n,d,b,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;t.data.forEach(((t,e)=>{if(!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)){n++}}));return n}_computeAngle(t,n,e){return this.chart.getDataVisibility(t)?ee(this.resolveDataElementOptions(t,n).angle||e):0}}class Fo extends No{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Wo extends mo{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:true,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale;const e=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(e[n.axis])}}parseObjectData(t,n,e,i){return Xi.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta;const e=n.dataset;const i=n.data||[];const s=n.iScale.getLabels();e.points=i;if(t!=="resize"){const n=this.resolveDatasetElementOptions(t);if(!this.options.showLine){n.borderWidth=0}const o={_loop:true,_fullLoop:s.length===i.length,options:n};this.updateElement(e,undefined,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,e,i){const s=this._cachedMeta.rScale;const o=i==="reset";for(let r=n;r<n+e;r++){const n=t[r];const e=this.resolveDataElementOptions(r,n.active?"active":i);const a=s.getPointPositionForValue(r,this.getParsed(r).r);const c=o?s.xCenter:a.x;const l=o?s.yCenter:a.y;const h={x:c,y:l,angle:a.angle,skip:isNaN(c)||isNaN(l),options:e};this.updateElement(n,r,h,i)}}}class Bo extends mo{static id="scatter";static defaults={datasetElementType:false,dataElementType:"point",showLine:false,fill:false};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:s}=n;const o=this.getParsed(t);const r=i.getLabelForValue(o.x);const a=s.getLabelForValue(o.y);return{label:e[t]||"",value:"("+r+", "+a+")"}}update(t){const n=this._cachedMeta;const{data:e=[]}=n;const i=this.chart._animationsDisabled;let{start:s,count:o}=Oe(n,e,i);this._drawStart=s;this._drawCount=o;if(Ce(n)){s=0;o=e.length}if(this.options.showLine){if(!this.datasetElementType){this.addElements()}const{dataset:s,_dataset:o}=n;s._chart=this.chart;s._datasetIndex=this.index;s._decimated=!!o._decimated;s.points=e;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment;this.updateElement(s,undefined,{animated:!i,options:r},t)}else if(this.datasetElementType){delete n.dataset;this.datasetElementType=false}this.updateElements(e,s,o,t)}addElements(){const{showLine:t}=this.options;if(!this.datasetElementType&&t){this.datasetElementType=this.chart.registry.getElement("line")}super.addElements()}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r,_stacked:a,_dataset:c}=this._cachedMeta;const l=this.resolveDataElementOptions(n,i);const h=this.getSharedOptions(l);const f=this.includeOptions(i,h);const u=o.axis;const d=r.axis;const{spanGaps:p,segment:g}=this.options;const b=Jn(p)?p:Number.POSITIVE_INFINITY;const m=this.chart._animationsDisabled||s||i==="none";let w=n>0&&this.getParsed(n-1);for(let l=n;l<n+e;++l){const n=t[l];const e=this.getParsed(l);const p=m?n:{};const x=dn(e[d]);const y=p[u]=o.getPixelForValue(e[u],l);const v=p[d]=s||x?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,e,a):e[d],l);p.skip=isNaN(y)||isNaN(v)||x;p.stop=l>0&&Math.abs(e[u]-w[u])>b;if(g){p.parsed=e;p.raw=c.data[l]}if(f){p.options=h||this.resolveDataElementOptions(l,n.active?"active":i)}if(!m){this.updateElement(n,l,p,i)}w=e}this.updateSharedOptions(h,i,l)}getMaxOverflow(){const t=this._cachedMeta;const n=t.data||[];if(!this.options.showLine){let t=0;for(let e=n.length-1;e>=0;--e){t=Math.max(t,n[e].size(this.resolveDataElementOptions(e))/2)}return t>0&&t}const e=t.dataset;const i=e.options&&e.options.borderWidth||0;if(!n.length){return i}const s=n[0].size(this.resolveDataElementOptions(0));const o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}var $o=Object.freeze({__proto__:null,BarController:Eo,BubbleController:Lo,DoughnutController:No,LineController:Io,PieController:Fo,PolarAreaController:To,RadarController:Wo,ScatterController:Bo});function Ho(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Yo{static override(t){Object.assign(Yo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Ho()}parse(){return Ho()}format(){return Ho()}add(){return Ho()}diff(){return Ho()}startOf(){return Ho()}endOf(){return Ho()}}var Vo={_date:Yo};function Uo(t,n,e,i){const{controller:s,data:o,_sorted:r}=t;const a=s._cachedMeta.iScale;const c=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;if(a&&n===a.axis&&n!=="r"&&r&&o.length){const r=a._reversePixels?ge:pe;if(!i){const i=r(o,n,e);if(c){const{vScale:n}=s._cachedMeta;const{_parsed:e}=t;const o=e.slice(0,i.lo+1).reverse().findIndex((t=>!dn(t[n.axis])));i.lo-=Math.max(0,o);const r=e.slice(i.hi).findIndex((t=>!dn(t[n.axis])));i.hi+=Math.max(0,r)}return i}else if(s._sharedOptions){const t=o[0];const i=typeof t.getRange==="function"&&t.getRange(n);if(i){const t=r(o,n,e-i);const s=r(o,n,e+i);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function Xo(t,n,e,i,s){const o=t.getSortedVisibleDatasetMetas();const r=e[n];for(let t=0,e=o.length;t<e;++t){const{index:e,data:a}=o[t];const{lo:c,hi:l}=Uo(o[t],n,r,s);for(let t=c;t<=l;++t){const n=a[t];if(!n.skip){i(n,e,t)}}}}function Ko(t){const n=t.indexOf("x")!==-1;const e=t.indexOf("y")!==-1;return function(t,i){const s=n?Math.abs(t.x-i.x):0;const o=e?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Zo(t,n,e,i,s){const o=[];if(!s&&!t.isPointInArea(n)){return o}const r=function(e,r,a){if(!s&&!ri(e,t.chartArea,0)){return}if(e.inRange(n.x,n.y,i)){o.push({element:e,datasetIndex:r,index:a})}};Xo(t,e,n,r,true);return o}function qo(t,n,e,i){let s=[];function o(t,e,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],i);const{angle:c}=oe(t,{x:n.x,y:n.y});if(le(c,r,a)){s.push({element:t,datasetIndex:e,index:o})}}Xo(t,e,n,o);return s}function Qo(t,n,e,i,s,o){let r=[];const a=Ko(e);let c=Number.POSITIVE_INFINITY;function l(e,l,h){const f=e.inRange(n.x,n.y,s);if(i&&!f){return}const u=e.getCenterPoint(s);const d=!!o||t.isPointInArea(u);if(!d&&!f){return}const p=a(n,u);if(p<c){r=[{element:e,datasetIndex:l,index:h}];c=p}else if(p===c){r.push({element:e,datasetIndex:l,index:h})}}Xo(t,e,n,l);return r}function Go(t,n,e,i,s,o){if(!o&&!t.isPointInArea(n)){return[]}return e==="r"&&!i?qo(t,n,e,s):Qo(t,n,e,i,s,o)}function Jo(t,n,e,i,s){const o=[];const r=e==="x"?"inXRange":"inYRange";let a=false;Xo(t,e,n,((t,i,c)=>{if(t[r]&&t[r](n[e],s)){o.push({element:t,datasetIndex:i,index:c});a=a||t.inRange(n.x,n.y,s)}}));if(i&&!a){return[]}return o}var tr={modes:{index(t,n,e,i){const s=ds(n,t);const o=e.axis||"x";const r=e.includeInvisible||false;const a=e.intersect?Zo(t,s,o,i,r):Go(t,s,o,false,i,r);const c=[];if(!a.length){return[]}t.getSortedVisibleDatasetMetas().forEach((t=>{const n=a[0].index;const e=t.data[n];if(e&&!e.skip){c.push({element:e,datasetIndex:t.index,index:n})}}));return c},dataset(t,n,e,i){const s=ds(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;let a=e.intersect?Zo(t,s,o,i,r):Go(t,s,o,false,i,r);if(a.length>0){const n=a[0].datasetIndex;const e=t.getDatasetMeta(n).data;a=[];for(let t=0;t<e.length;++t){a.push({element:e[t],datasetIndex:n,index:t})}}return a},point(t,n,e,i){const s=ds(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;return Zo(t,s,o,i,r)},nearest(t,n,e,i){const s=ds(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;return Go(t,s,o,e.intersect,i,r)},x(t,n,e,i){const s=ds(n,t);return Jo(t,s,"x",e.intersect,i)},y(t,n,e,i){const s=ds(n,t);return Jo(t,s,"y",e.intersect,i)}}};const nr=["left","top","right","bottom"];function er(t,n){return t.filter((t=>t.pos===n))}function ir(t,n){return t.filter((t=>nr.indexOf(t.pos)===-1&&t.box.axis===n))}function sr(t,n){return t.sort(((t,e)=>{const i=n?e:t;const s=n?t:e;return i.weight===s.weight?i.index-s.index:i.weight-s.weight}))}function or(t){const n=[];let e,i,s,o,r,a;for(e=0,i=(t||[]).length;e<i;++e){s=t[e];({position:o,options:{stack:r,stackWeight:a=1}}=s);n.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a})}return n}function rr(t){const n={};for(const e of t){const{stack:t,pos:i,stackWeight:s}=e;if(!t||!nr.includes(i)){continue}const o=n[t]||(n[t]={count:0,placed:0,weight:0,size:0});o.count++;o.weight+=s}return n}function ar(t,n){const e=rr(t);const{vBoxMaxWidth:i,hBoxMaxHeight:s}=n;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box;const c=e[a.stack];const l=c&&a.stackWeight/c.weight;if(a.horizontal){a.width=l?l*i:r&&n.availableWidth;a.height=s}else{a.width=i;a.height=l?l*s:r&&n.availableHeight}}return e}function cr(t){const n=or(t);const e=sr(n.filter((t=>t.box.fullSize)),true);const i=sr(er(n,"left"),true);const s=sr(er(n,"right"));const o=sr(er(n,"top"),true);const r=sr(er(n,"bottom"));const a=ir(n,"x");const c=ir(n,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:s.concat(c).concat(r).concat(a),chartArea:er(n,"chartArea"),vertical:i.concat(s).concat(c),horizontal:o.concat(r).concat(a)}}function lr(t,n,e,i){return Math.max(t[e],n[e])+Math.max(t[i],n[i])}function hr(t,n){t.top=Math.max(t.top,n.top);t.left=Math.max(t.left,n.left);t.bottom=Math.max(t.bottom,n.bottom);t.right=Math.max(t.right,n.right)}function fr(t,n,e,i){const{pos:s,box:o}=e;const r=t.maxPadding;if(!gn(s)){if(e.size){t[s]-=e.size}const n=i[e.stack]||{size:0,count:1};n.size=Math.max(n.size,e.horizontal?o.height:o.width);e.size=n.size/n.count;t[s]+=e.size}if(o.getPadding){hr(r,o.getPadding())}const a=Math.max(0,n.outerWidth-lr(r,t,"left","right"));const c=Math.max(0,n.outerHeight-lr(r,t,"top","bottom"));const l=a!==t.w;const h=c!==t.h;t.w=a;t.h=c;return e.horizontal?{same:l,other:h}:{same:h,other:l}}function ur(t){const n=t.maxPadding;function e(e){const i=Math.max(n[e]-t[e],0);t[e]+=i;return i}t.y+=e("top");t.x+=e("left");e("right");e("bottom")}function dr(t,n){const e=n.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};t.forEach((t=>{i[t]=Math.max(n[t],e[t])}));return i}return t?i(["left","right"]):i(["top","bottom"])}function pr(t,n,e,i){const s=[];let o,r,a,c,l,h;for(o=0,r=t.length,l=0;o<r;++o){a=t[o];c=a.box;c.update(a.width||n.w,a.height||n.h,dr(a.horizontal,n));const{same:r,other:f}=fr(n,e,a,i);l|=r&&s.length;h=h||f;if(!c.fullSize){s.push(a)}}return l&&pr(s,n,e,i)||h}function gr(t,n,e,i,s){t.top=e;t.left=n;t.right=n+i;t.bottom=e+s;t.width=i;t.height=s}function br(t,n,e,i){const s=e.padding;let{x:o,y:r}=n;for(const a of t){const t=a.box;const c=i[a.stack]||{placed:0,weight:1};const l=a.stackWeight/c.weight||1;if(a.horizontal){const i=n.w*l;const o=c.size||t.height;if(Rn(c.start)){r=c.start}if(t.fullSize){gr(t,s.left,r,e.outerWidth-s.right-s.left,o)}else{gr(t,n.left+c.placed,r,i,o)}c.start=r;c.placed+=i;r=t.bottom}else{const i=n.h*l;const r=c.size||t.width;if(Rn(c.start)){o=c.start}if(t.fullSize){gr(t,o,s.top,r,e.outerHeight-s.bottom-s.top)}else{gr(t,o,n.top+c.placed,r,i)}c.start=o;c.placed+=i;o=t.right}}n.x=o;n.y=r}var mr={addBox(t,n){if(!t.boxes){t.boxes=[]}n.fullSize=n.fullSize||false;n.position=n.position||"top";n.weight=n.weight||0;n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]};t.boxes.push(n)},removeBox(t,n){const e=t.boxes?t.boxes.indexOf(n):-1;if(e!==-1){t.boxes.splice(e,1)}},configure(t,n,e){n.fullSize=e.fullSize;n.position=e.position;n.weight=e.weight},update(t,n,e,i){if(!t){return}const s=ki(t.options.layout.padding);const o=Math.max(n-s.width,0);const r=Math.max(e-s.height,0);const a=cr(t.boxes);const c=a.vertical;const l=a.horizontal;Mn(t.boxes,(t=>{if(typeof t.beforeLayout==="function"){t.beforeLayout()}}));const h=c.reduce(((t,n)=>n.box.options&&n.box.options.display===false?t:t+1),0)||1;const f=Object.freeze({outerWidth:n,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2});const u=Object.assign({},s);hr(u,ki(i));const d=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s);const p=ar(c.concat(l),f);pr(a.fullSize,d,f,p);pr(c,d,f,p);if(pr(l,d,f,p)){pr(c,d,f,p)}ur(d);br(a.leftAndTop,d,f,p);d.x+=d.w;d.y+=d.h;br(a.rightAndBottom,d,f,p);t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w};Mn(a.chartArea,(n=>{const e=n.box;Object.assign(e,t.chartArea);e.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class wr{acquireContext(t,n){}releaseContext(t){return false}addEventListener(t,n,e){}removeEventListener(t,n,e){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,e,i){n=Math.max(0,n||t.width);e=e||t.height;return{width:n,height:Math.max(0,i?Math.floor(n/i):e)}}isAttached(t){return true}updateConfig(t){}}class xr extends wr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=false}}const yr="$chartjs";const vr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};const Mr=t=>t===null||t==="";function kr(t,n){const e=t.style;const i=t.getAttribute("height");const s=t.getAttribute("width");t[yr]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}};e.display=e.display||"block";e.boxSizing=e.boxSizing||"border-box";if(Mr(s)){const n=xs(t,"width");if(n!==undefined){t.width=n}}if(Mr(i)){if(t.style.height===""){t.height=t.width/(n||2)}else{const n=xs(t,"height");if(n!==undefined){t.height=n}}}return t}const _r=ws?{passive:true}:false;function Sr(t,n,e){if(t){t.addEventListener(n,e,_r)}}function zr(t,n,e){if(t&&t.canvas){t.canvas.removeEventListener(n,e,_r)}}function Or(t,n){const e=vr[t.type]||t.type;const{x:i,y:s}=ds(t,n);return{type:e,chart:n,native:t,x:i!==undefined?i:null,y:s!==undefined?s:null}}function Cr(t,n){for(const e of t){if(e===n||e.contains(n)){return true}}}function Dr(t,n,e){const i=t.canvas;const s=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Cr(e.addedNodes,i);n=n&&!Cr(e.removedNodes,i)}if(n){e()}}));s.observe(document,{childList:true,subtree:true});return s}function Ar(t,n,e){const i=t.canvas;const s=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Cr(e.removedNodes,i);n=n&&!Cr(e.addedNodes,i)}if(n){e()}}));s.observe(document,{childList:true,subtree:true});return s}const jr=new Map;let Pr=0;function Er(){const t=window.devicePixelRatio;if(t===Pr){return}Pr=t;jr.forEach(((n,e)=>{if(e.currentDevicePixelRatio!==t){n()}}))}function Lr(t,n){if(!jr.size){window.addEventListener("resize",Er)}jr.set(t,n)}function Rr(t){jr.delete(t);if(!jr.size){window.removeEventListener("resize",Er)}}function Nr(t,n,e){const i=t.canvas;const s=i&&os(i);if(!s){return}const o=Me(((t,n)=>{const i=s.clientWidth;e(t,n);if(i<s.clientWidth){e()}}),window);const r=new ResizeObserver((t=>{const n=t[0];const e=n.contentRect.width;const i=n.contentRect.height;if(e===0&&i===0){return}o(e,i)}));r.observe(s);Lr(t,o);return r}function Ir(t,n,e){if(e){e.disconnect()}if(n==="resize"){Rr(t)}}function Tr(t,n,e){const i=t.canvas;const s=Me((n=>{if(t.ctx!==null){e(Or(n,t))}}),t);Sr(i,n,s);return s}class Fr extends wr{acquireContext(t,n){const e=t&&t.getContext&&t.getContext("2d");if(e&&e.canvas===t){kr(t,n);return e}return null}releaseContext(t){const n=t.canvas;if(!n[yr]){return false}const e=n[yr].initial;["height","width"].forEach((t=>{const i=e[t];if(dn(i)){n.removeAttribute(t)}else{n.setAttribute(t,i)}}));const i=e.style||{};Object.keys(i).forEach((t=>{n.style[t]=i[t]}));n.width=n.width;delete n[yr];return true}addEventListener(t,n,e){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={});const s={attach:Dr,detach:Ar,resize:Nr};const o=s[n]||Tr;i[n]=o(t,n,e)}removeEventListener(t,n){const e=t.$proxies||(t.$proxies={});const i=e[n];if(!i){return}const s={attach:Ir,detach:Ir,resize:Ir};const o=s[n]||zr;o(t,n,i);e[n]=undefined}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,e,i){return bs(t,n,e,i)}isAttached(t){const n=t&&os(t);return!!(n&&n.isConnected)}}function Wr(t){if(!ss()||typeof OffscreenCanvas!=="undefined"&&t instanceof OffscreenCanvas){return xr}return Fr}class Br{static defaults={};static defaultRoutes=undefined;x;y;active=false;options;$animations;tooltipPosition(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}hasValue(){return Jn(this.x)&&Jn(this.y)}getProps(t,n){const e=this.$animations;if(!n||!e){return this}const i={};t.forEach((t=>{i[t]=e[t]&&e[t].active()?e[t]._to:this[t]}));return i}}function $r(t,n){const e=t.options.ticks;const i=Hr(t);const s=Math.min(e.maxTicksLimit||i,i);const o=e.major.enabled?Vr(n):[];const r=o.length;const a=o[0];const c=o[r-1];const l=[];if(r>s){Ur(n,l,o,r/s);return l}const h=Yr(o,n,s);if(r>0){let t,e;const i=r>1?Math.round((c-a)/(r-1)):null;Xr(n,l,h,dn(i)?0:a-i,a);for(t=0,e=r-1;t<e;t++){Xr(n,l,h,o[t],o[t+1])}Xr(n,l,h,c,dn(i)?n.length:c+i);return l}Xr(n,l,h);return l}function Hr(t){const n=t.options.offset;const e=t._tickSize();const i=t._length/e+(n?0:1);const s=t._maxLength/e;return Math.floor(Math.min(i,s))}function Yr(t,n,e){const i=Kr(t);const s=n.length/e;if(!i){return Math.max(s,1)}const o=Qn(i);for(let t=0,n=o.length-1;t<n;t++){const n=o[t];if(n>s){return n}}return Math.max(s,1)}function Vr(t){const n=[];let e,i;for(e=0,i=t.length;e<i;e++){if(t[e].major){n.push(e)}}return n}function Ur(t,n,e,i){let s=0;let o=e[0];let r;i=Math.ceil(i);for(r=0;r<t.length;r++){if(r===o){n.push(t[r]);s++;o=e[s*i]}}}function Xr(t,n,e,i,s){const o=wn(i,0);const r=Math.min(wn(s,t.length),t.length);let a=0;let c,l,h;e=Math.ceil(e);if(s){c=s-i;e=c/Math.floor(c/e)}h=o;while(h<0){a++;h=Math.round(o+a*e)}for(l=Math.max(o,0);l<r;l++){if(l===h){n.push(t[l]);a++;h=Math.round(o+a*e)}}}function Kr(t){const n=t.length;let e,i;if(n<2){return false}for(i=t[0],e=1;e<n;++e){if(t[e]-t[e-1]!==i){return false}}return i}const Zr=t=>t==="left"?"right":t==="right"?"left":t;const qr=(t,n,e)=>n==="top"||n==="left"?t[n]+e:t[n]-e;const Qr=(t,n)=>Math.min(n||t,t);function Gr(t,n){const e=[];const i=t.length/n;const s=t.length;let o=0;for(;o<s;o+=i){e.push(t[Math.floor(o)])}return e}function Jr(t,n,e){const i=t.ticks.length;const s=Math.min(n,i-1);const o=t._startPixel;const r=t._endPixel;const a=1e-6;let c=t.getPixelForTick(s);let l;if(e){if(i===1){l=Math.max(c-o,r-c)}else if(n===0){l=(t.getPixelForTick(1)-c)/2}else{l=(c-t.getPixelForTick(s-1))/2}c+=s<n?l:-l;if(c<o-a||c>r+a){return}}return c}function ta(t,n){Mn(t,(t=>{const e=t.gc;const i=e.length/2;let s;if(i>n){for(s=0;s<i;++s){delete t.data[e[s]]}e.splice(0,i)}}))}function na(t){return t.drawTicks?t.tickLength:0}function ea(t,n){if(!t.display){return 0}const e=_i(t.font,n);const i=ki(t.padding);const s=pn(t.text)?t.text.length:1;return s*e.lineHeight+i.height}function ia(t,n){return Oi(t,{scale:n,type:"scale"})}function sa(t,n,e){return Oi(t,{tick:e,index:n,type:"tick"})}function oa(t,n,e){let i=_e(t);if(e&&n!=="right"||!e&&n==="right"){i=Zr(i)}return i}function ra(t,n,e,i){const{top:s,left:o,bottom:r,right:a,chart:c}=t;const{chartArea:l,scales:h}=c;let f=0;let u,d,p;const g=r-s;const b=a-o;if(t.isHorizontal()){d=Se(i,o,a);if(gn(e)){const t=Object.keys(e)[0];const i=e[t];p=h[t].getPixelForValue(i)+g-n}else if(e==="center"){p=(l.bottom+l.top)/2+g-n}else{p=qr(t,e,n)}u=a-o}else{if(gn(e)){const t=Object.keys(e)[0];const i=e[t];d=h[t].getPixelForValue(i)-b+n}else if(e==="center"){d=(l.left+l.right)/2-b+n}else{d=qr(t,e,n)}p=Se(i,r,s);f=e==="left"?-Yn:Yn}return{titleX:d,titleY:p,maxWidth:u,rotation:f}}class aa extends Br{constructor(t){super();this.id=t.id;this.type=t.type;this.options=undefined;this.ctx=t.ctx;this.chart=t.chart;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this._margins={left:0,right:0,top:0,bottom:0};this.maxWidth=undefined;this.maxHeight=undefined;this.paddingTop=undefined;this.paddingBottom=undefined;this.paddingLeft=undefined;this.paddingRight=undefined;this.axis=undefined;this.labelRotation=undefined;this.min=undefined;this.max=undefined;this._range=undefined;this.ticks=[];this._gridLineItems=null;this._labelItems=null;this._labelSizes=null;this._length=0;this._maxLength=0;this._longestTextCache={};this._startPixel=undefined;this._endPixel=undefined;this._reversePixels=false;this._userMax=undefined;this._userMin=undefined;this._suggestedMax=undefined;this._suggestedMin=undefined;this._ticksLength=0;this._borderValue=0;this._cache={};this._dataLimitsCached=false;this.$context=undefined}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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:e,_suggestedMax:i}=this;t=mn(t,Number.POSITIVE_INFINITY);n=mn(n,Number.NEGATIVE_INFINITY);e=mn(e,Number.POSITIVE_INFINITY);i=mn(i,Number.NEGATIVE_INFINITY);return{min:mn(t,e),max:mn(n,i),minDefined:bn(t),maxDefined:bn(n)}}getMinMax(t){let{min:n,max:e,minDefined:i,maxDefined:s}=this.getUserBounds();let o;if(i&&s){return{min:n,max:e}}const r=this.getMatchingVisibleMetas();for(let a=0,c=r.length;a<c;++a){o=r[a].controller.getMinMax(this,t);if(!i){n=Math.min(n,o.min)}if(!s){e=Math.max(e,o.max)}}n=s&&n>e?e:n;e=i&&n>e?n:e;return{min:mn(n,mn(e,n)),max:mn(e,mn(n,e))}}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){const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));return n}beforeLayout(){this._cache={};this._dataLimitsCached=false}beforeUpdate(){vn(this.options.beforeUpdate,[this])}update(t,n,e){const{beginAtZero:i,grace:s,ticks:o}=this.options;const r=o.sampleSize;this.beforeUpdate();this.maxWidth=t;this.maxHeight=n;this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e);this.ticks=null;this._labelSizes=null;this._gridLineItems=null;this._labelItems=null;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom;if(!this._dataLimitsCached){this.beforeDataLimits();this.determineDataLimits();this.afterDataLimits();this._range=zi(this,s,i);this._dataLimitsCached=true}this.beforeBuildTicks();this.ticks=this.buildTicks()||[];this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Gr(this.ticks,r):this.ticks);this.configure();this.beforeCalculateLabelRotation();this.calculateLabelRotation();this.afterCalculateLabelRotation();if(o.display&&(o.autoSkip||o.source==="auto")){this.ticks=$r(this,this.ticks);this._labelSizes=null;this.afterAutoSkip()}if(a){this._convertTicksToLabels(this.ticks)}this.beforeFit();this.fit();this.afterFit();this.afterUpdate()}configure(){let t=this.options.reverse;let n,e;if(this.isHorizontal()){n=this.left;e=this.right}else{n=this.top;e=this.bottom;t=!t}this._startPixel=n;this._endPixel=e;this._reversePixels=t;this._length=e-n;this._alignToPixels=this.options.alignToPixels}afterUpdate(){vn(this.options.afterUpdate,[this])}beforeSetDimensions(){vn(this.options.beforeSetDimensions,[this])}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=0;this.right=this.width}else{this.height=this.maxHeight;this.top=0;this.bottom=this.height}this.paddingLeft=0;this.paddingTop=0;this.paddingRight=0;this.paddingBottom=0}afterSetDimensions(){vn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext());vn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){vn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let e,i,s;for(e=0,i=t.length;e<i;e++){s=t[e];s.label=vn(n.callback,[s.value,e,t],this)}}afterTickToLabelConversion(){vn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){vn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options;const n=t.ticks;const e=Qr(this.ticks.length,t.ticks.maxTicksLimit);const i=n.minRotation||0;const s=n.maxRotation;let o=i;let r,a,c;if(!this._isVisible()||!n.display||i>=s||e<=1||!this.isHorizontal()){this.labelRotation=i;return}const l=this._getLabelSizes();const h=l.widest.width;const f=l.highest.height;const u=he(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/e:u/(e-1);if(h+6>r){r=u/(e-(t.offset?.5:1));a=this.maxHeight-na(t.grid)-n.padding-ea(t.title,this.chart.options.font);c=Math.sqrt(h*h+f*f);o=ie(Math.min(Math.asin(he((l.highest.height+6)/r,-1,1)),Math.asin(he(a/c,-1,1))-Math.asin(he(f/c,-1,1))));o=Math.max(i,Math.min(s,o))}this.labelRotation=o}afterCalculateLabelRotation(){vn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){vn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0};const{chart:n,options:{ticks:e,title:i,grid:s}}=this;const o=this._isVisible();const r=this.isHorizontal();if(o){const o=ea(i,n.options.font);if(r){t.width=this.maxWidth;t.height=na(s)+o}else{t.height=this.maxHeight;t.width=na(s)+o}if(e.display&&this.ticks.length){const{first:n,last:i,widest:s,highest:o}=this._getLabelSizes();const a=e.padding*2;const c=ee(this.labelRotation);const l=Math.cos(c);const h=Math.sin(c);if(r){const n=e.mirror?0:h*s.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+n+a)}else{const n=e.mirror?0:l*s.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+n+a)}this._calculatePadding(n,i,h,l)}}this._handleMargins();if(r){this.width=this._length=n.width-this._margins.left-this._margins.right;this.height=t.height}else{this.width=t.width;this.height=this._length=n.height-this._margins.top-this._margins.bottom}}_calculatePadding(t,n,e,i){const{ticks:{align:s,padding:o},position:r}=this.options;const a=this.labelRotation!==0;const c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left;const l=this.right-this.getPixelForTick(this.ticks.length-1);let h=0;let f=0;if(a){if(c){h=i*t.width;f=e*n.height}else{h=e*t.height;f=i*n.width}}else if(s==="start"){f=n.width}else if(s==="end"){h=t.width}else if(s!=="inner"){h=t.width/2;f=n.width/2}this.paddingLeft=Math.max((h-r+o)*this.width/(this.width-r),0);this.paddingRight=Math.max((f-l+o)*this.width/(this.width-l),0)}else{let e=n.height/2;let i=t.height/2;if(s==="start"){e=0;i=t.height}else if(s==="end"){e=n.height;i=0}this.paddingTop=e+o;this.paddingBottom=i+o}}_handleMargins(){if(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(){vn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion();this.generateTickLabels(t);let n,e;for(n=0,e=t.length;n<e;n++){if(dn(t[n].label)){t.splice(n,1);e--;n--}}this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let e=this.ticks;if(n<e.length){e=Gr(e,n)}this._labelSizes=t=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,e){const{ctx:i,_longestTextCache:s}=this;const o=[];const r=[];const a=Math.floor(n/Qr(n,e));let c=0;let l=0;let h,f,u,d,p,g,b,m,w,x,y;for(h=0;h<n;h+=a){d=t[h].label;p=this._resolveTickFontOptions(h);i.font=g=p.string;b=s[g]=s[g]||{data:{},gc:[]};m=p.lineHeight;w=x=0;if(!dn(d)&&!pn(d)){w=ti(i,b.data,b.gc,w,d);x=m}else if(pn(d)){for(f=0,u=d.length;f<u;++f){y=d[f];if(!dn(y)&&!pn(y)){w=ti(i,b.data,b.gc,w,y);x+=m}}}o.push(w);r.push(x);c=Math.max(w,c);l=Math.max(x,l)}ta(s,n);const v=o.indexOf(c);const M=r.indexOf(l);const k=t=>({width:o[t]||0,height:r[t]||0});return{first:k(0),last:k(n-1),widest:k(v),highest:k(M),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getPixelForDecimal(t){if(this._reversePixels){t=1-t}const n=this._startPixel+t*this._length;return fe(this._alignToPixels?ei(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const e=n[t];return e.$context||(e.$context=sa(this.getContext(),t,e))}return this.$context||(this.$context=ia(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks;const n=ee(this.labelRotation);const e=Math.abs(Math.cos(n));const i=Math.abs(Math.sin(n));const s=this._getLabelSizes();const o=t.autoSkipPadding||0;const r=s?s.widest.width+o:0;const a=s?s.highest.height+o:0;return this.isHorizontal()?a*e>r*i?r/e:a/i:a*i<r*e?a/e:r/i}_isVisible(){const t=this.options.display;if(t!=="auto"){return!!t}return this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis;const e=this.chart;const i=this.options;const{grid:s,position:o,border:r}=i;const a=s.offset;const c=this.isHorizontal();const l=this.ticks;const h=l.length+(a?1:0);const f=na(s);const u=[];const d=r.setContext(this.getContext());const p=d.display?d.width:0;const g=p/2;const b=function(t){return ei(e,t,p)};let m,w,x,y;let v,M,k,_,S,z,O,C;if(o==="top"){m=b(this.bottom);M=this.bottom-f;_=m-g;z=b(t.top)+g;C=t.bottom}else if(o==="bottom"){m=b(this.top);z=t.top;C=b(t.bottom)-g;M=m+g;_=this.top+f}else if(o==="left"){m=b(this.right);v=this.right-f;k=m-g;S=b(t.left)+g;O=t.right}else if(o==="right"){m=b(this.left);S=t.left;O=b(t.right)-g;v=m+g;k=this.left+f}else if(n==="x"){if(o==="center"){m=b((t.top+t.bottom)/2+.5)}else if(gn(o)){const t=Object.keys(o)[0];const n=o[t];m=b(this.chart.scales[t].getPixelForValue(n))}z=t.top;C=t.bottom;M=m+g;_=M+f}else if(n==="y"){if(o==="center"){m=b((t.left+t.right)/2)}else if(gn(o)){const t=Object.keys(o)[0];const n=o[t];m=b(this.chart.scales[t].getPixelForValue(n))}v=m-g;k=v-f;S=t.left;O=t.right}const D=wn(i.ticks.maxTicksLimit,h);const A=Math.max(1,Math.ceil(h/D));for(w=0;w<h;w+=A){const t=this.getContext(w);const n=s.setContext(t);const i=r.setContext(t);const o=n.lineWidth;const l=n.color;const h=i.dash||[];const f=i.dashOffset;const d=n.tickWidth;const p=n.tickColor;const g=n.tickBorderDash||[];const b=n.tickBorderDashOffset;x=Jr(this,w,a);if(x===undefined){continue}y=ei(e,x,o);if(c){v=k=S=O=y}else{M=_=z=C=y}u.push({tx1:v,ty1:M,tx2:k,ty2:_,x1:S,y1:z,x2:O,y2:C,width:o,color:l,borderDash:h,borderDashOffset:f,tickWidth:d,tickColor:p,tickBorderDash:g,tickBorderDashOffset:b})}this._ticksLength=h;this._borderValue=m;return u}_computeLabelItems(t){const n=this.axis;const e=this.options;const{position:i,ticks:s}=e;const o=this.isHorizontal();const r=this.ticks;const{align:a,crossAlign:c,padding:l,mirror:h}=s;const f=na(e.grid);const u=f+l;const d=h?-l:u;const p=-ee(this.labelRotation);const g=[];let b,m,w,x,y,v,M,k,_,S,z,O;let C="middle";if(i==="top"){v=this.bottom-d;M=this._getXAxisLabelAlignment()}else if(i==="bottom"){v=this.top+d;M=this._getXAxisLabelAlignment()}else if(i==="left"){const t=this._getYAxisLabelAlignment(f);M=t.textAlign;y=t.x}else if(i==="right"){const t=this._getYAxisLabelAlignment(f);M=t.textAlign;y=t.x}else if(n==="x"){if(i==="center"){v=(t.top+t.bottom)/2+u}else if(gn(i)){const t=Object.keys(i)[0];const n=i[t];v=this.chart.scales[t].getPixelForValue(n)+u}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center"){y=(t.left+t.right)/2-u}else if(gn(i)){const t=Object.keys(i)[0];const n=i[t];y=this.chart.scales[t].getPixelForValue(n)}M=this._getYAxisLabelAlignment(f).textAlign}if(n==="y"){if(a==="start"){C="top"}else if(a==="end"){C="bottom"}}const D=this._getLabelSizes();for(b=0,m=r.length;b<m;++b){w=r[b];x=w.label;const t=s.setContext(this.getContext(b));k=this.getPixelForTick(b)+s.labelOffset;_=this._resolveTickFontOptions(b);S=_.lineHeight;z=pn(x)?x.length:1;const n=z/2;const e=t.color;const a=t.textStrokeColor;const l=t.textStrokeWidth;let f=M;if(o){y=k;if(M==="inner"){if(b===m-1){f=!this.options.reverse?"right":"left"}else if(b===0){f=!this.options.reverse?"left":"right"}else{f="center"}}if(i==="top"){if(c==="near"||p!==0){O=-z*S+S/2}else if(c==="center"){O=-D.highest.height/2-n*S+S}else{O=-D.highest.height+S/2}}else{if(c==="near"||p!==0){O=S/2}else if(c==="center"){O=D.highest.height/2-n*S}else{O=D.highest.height-z*S}}if(h){O*=-1}if(p!==0&&!t.showLabelBackdrop){y+=S/2*Math.sin(p)}}else{v=k;O=(1-z)*S/2}let u;if(t.showLabelBackdrop){const n=ki(t.backdropPadding);const e=D.heights[b];const i=D.widths[b];let s=O-n.top;let o=0-n.left;switch(C){case"middle":s-=e/2;break;case"bottom":s-=e;break}switch(M){case"center":o-=i/2;break;case"right":o-=i;break;case"inner":if(b===m-1){o-=i}else if(b>0){o-=i/2}break}u={left:o,top:s,width:i+n.width,height:e+n.height,color:t.backdropColor}}g.push({label:x,font:_,textOffset:O,options:{rotation:p,color:e,strokeColor:a,strokeWidth:l,textAlign:f,textBaseline:C,translation:[y,v],backdrop:u}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;const e=-ee(this.labelRotation);if(e){return t==="top"?"left":"right"}let i="center";if(n.align==="start"){i="left"}else if(n.align==="end"){i="right"}else if(n.align==="inner"){i="inner"}return i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:e,mirror:i,padding:s}}=this.options;const o=this._getLabelSizes();const r=t+s;const a=o.widest.width;let c;let l;if(n==="left"){if(i){l=this.right+s;if(e==="near"){c="left"}else if(e==="center"){c="center";l+=a/2}else{c="right";l+=a}}else{l=this.right-r;if(e==="near"){c="right"}else if(e==="center"){c="center";l-=a/2}else{c="left";l=this.left}}}else if(n==="right"){if(i){l=this.left+s;if(e==="near"){c="right"}else if(e==="center"){c="center";l-=a/2}else{c="left";l-=a}}else{l=this.left+r;if(e==="near"){c="left"}else if(e==="center"){c="center";l+=a/2}else{c="right";l=this.right}}}else{c="right"}return{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror){return}const t=this.chart;const n=this.options.position;if(n==="left"||n==="right"){return{top:0,left:this.left,bottom:t.height,right:this.right}}if(n==="top"||n==="bottom"){return{top:this.top,left:0,bottom:this.bottom,right:t.width}}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:e,top:i,width:s,height:o}=this;if(n){t.save();t.fillStyle=n;t.fillRect(e,i,s,o);t.restore()}}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display){return 0}const e=this.ticks;const i=e.findIndex((n=>n.value===t));if(i>=0){const t=n.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const n=this.options.grid;const e=this.ctx;const i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,n,i)=>{if(!i.width||!i.color){return}e.save();e.lineWidth=i.width;e.strokeStyle=i.color;e.setLineDash(i.borderDash||[]);e.lineDashOffset=i.borderDashOffset;e.beginPath();e.moveTo(t.x,t.y);e.lineTo(n.x,n.y);e.stroke();e.restore()};if(n.display){for(s=0,o=i.length;s<o;++s){const t=i[s];if(n.drawOnChartArea){r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t)}if(n.drawTicks){r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}}}drawBorder(){const{chart:t,ctx:n,options:{border:e,grid:i}}=this;const s=e.setContext(this.getContext());const o=e.display?s.width:0;if(!o){return}const r=i.setContext(this.getContext(0)).lineWidth;const a=this._borderValue;let c,l,h,f;if(this.isHorizontal()){c=ei(t,this.left,o)-o/2;l=ei(t,this.right,r)+r/2;h=f=a}else{h=ei(t,this.top,o)-o/2;f=ei(t,this.bottom,r)+r/2;c=l=a}n.save();n.lineWidth=s.width;n.strokeStyle=s.color;n.beginPath();n.moveTo(c,h);n.lineTo(l,f);n.stroke();n.restore()}drawLabels(t){const n=this.options.ticks;if(!n.display){return}const e=this.ctx;const i=this._computeLabelArea();if(i){ai(e,i)}const s=this.getLabelItems(t);for(const t of s){const n=t.options;const i=t.font;const s=t.label;const o=t.textOffset;pi(e,s,0,o,i,n)}if(i){ci(e)}}drawTitle(){const{ctx:t,options:{position:n,title:e,reverse:i}}=this;if(!e.display){return}const s=_i(e.font);const o=ki(e.padding);const r=e.align;let a=s.lineHeight/2;if(n==="bottom"||n==="center"||gn(n)){a+=o.bottom;if(pn(e.text)){a+=s.lineHeight*(e.text.length-1)}}else{a+=o.top}const{titleX:c,titleY:l,maxWidth:h,rotation:f}=ra(this,a,n,r);pi(t,e.text,0,0,s,{color:e.color,maxWidth:h,rotation:f,textAlign:oa(r,n,i),textBaseline:"middle",translation:[c,l]})}draw(t){if(!this._isVisible()){return}this.drawBackground();this.drawGrid(t);this.drawBorder();this.drawTitle();this.drawLabels(t)}_layers(){const t=this.options;const n=t.ticks&&t.ticks.z||0;const e=wn(t.grid&&t.grid.z,-1);const i=wn(t.border&&t.border.z,0);if(!this._isVisible()||this.draw!==aa.prototype.draw){return[{z:n,draw:t=>{this.draw(t)}}]}return[{z:e,draw:t=>{this.drawBackground();this.drawGrid(t);this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:t=>{this.drawLabels(t)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas();const e=this.axis+"AxisID";const i=[];let s,o;for(s=0,o=n.length;s<o;++s){const o=n[s];if(o[e]===this.id&&(!t||o.type===t)){i.push(o)}}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return _i(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ca{constructor(t,n,e){this.type=t;this.scope=n;this.override=e;this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let e;if(fa(n)){e=this.register(n)}const i=this.items;const s=t.id;const o=this.scope+"."+s;if(!s){throw new Error("class does not have id: "+t)}if(s in i){return o}i[s]=t;la(t,o,e);if(this.override){Ge.override(t.id,t.overrides)}return o}get(t){return this.items[t]}unregister(t){const n=this.items;const e=t.id;const i=this.scope;if(e in n){delete n[e]}if(i&&e in Ge[i]){delete Ge[i][e];if(this.override){delete Xe[e]}}}}function la(t,n,e){const i=On(Object.create(null),[e?Ge.get(e):{},Ge.get(n),t.defaults]);Ge.set(n,i);if(t.defaultRoutes){ha(n,t.defaultRoutes)}if(t.descriptors){Ge.describe(n,t.descriptors)}}function ha(t,n){Object.keys(n).forEach((e=>{const i=e.split(".");const s=i.pop();const o=[t].concat(i).join(".");const r=n[e].split(".");const a=r.pop();const c=r.join(".");Ge.route(o,s,c,a)}))}function fa(t){return"id"in t&&"defaults"in t}class ua{constructor(){this.controllers=new ca(mo,"datasets",true);this.elements=new ca(Br,"elements");this.plugins=new ca(Object,"plugins");this.scales=new ca(aa,"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,n,e){[...n].forEach((n=>{const i=e||this._getRegistryForType(n);if(e||i.isForType(n)||i===this.plugins&&n.id){this._exec(t,i,n)}else{Mn(n,(n=>{const i=e||this._getRegistryForType(n);this._exec(t,i,n)}))}}))}_exec(t,n,e){const i=Ln(t);vn(e["before"+i],[],e);n[t](e);vn(e["after"+i],[],e)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const e=this._typedRegistries[n];if(e.isForType(t)){return e}}return this.plugins}_get(t,n,e){const i=n.get(t);if(i===undefined){throw new Error('"'+t+'" is not a registered '+e+".")}return i}}var da=new ua;class pa{constructor(){this._init=[]}notify(t,n,e,i){if(n==="beforeInit"){this._init=this._createDescriptors(t,true);this._notify(this._init,t,"install")}const s=i?this._descriptors(t).filter(i):this._descriptors(t);const o=this._notify(s,t,n,e);if(n==="afterDestroy"){this._notify(s,t,"stop");this._notify(this._init,t,"uninstall")}return o}_notify(t,n,e,i){i=i||{};for(const s of t){const t=s.plugin;const o=t[e];const r=[n,i,s.options];if(vn(o,r,t)===false&&i.cancelable){return false}}return true}invalidate(){if(!dn(this._cache)){this._oldCache=this._cache;this._cache=undefined}}_descriptors(t){if(this._cache){return this._cache}const n=this._cache=this._createDescriptors(t);this._notifyStateChanges(t);return n}_createDescriptors(t,n){const e=t&&t.config;const i=wn(e.options&&e.options.plugins,{});const s=ga(e);return i===false&&!n?[]:ma(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[];const e=this._cache;const i=(t,n)=>t.filter((t=>!n.some((n=>t.plugin.id===n.plugin.id))));this._notify(i(n,e),t,"stop");this._notify(i(e,n),t,"start")}}function ga(t){const n={};const e=[];const i=Object.keys(da.plugins.items);for(let t=0;t<i.length;t++){e.push(da.getPlugin(i[t]))}const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];if(e.indexOf(i)===-1){e.push(i);n[i.id]=true}}return{plugins:e,localIds:n}}function ba(t,n){if(!n&&t===false){return null}if(t===true){return{}}return t}function ma(t,{plugins:n,localIds:e},i,s){const o=[];const r=t.getContext();for(const a of n){const n=a.id;const c=ba(i[n],s);if(c===null){continue}o.push({plugin:a,options:wa(t.config,{plugin:a,local:e[n]},c,r)})}return o}function wa(t,{plugin:n,local:e},i,s){const o=t.pluginScopeKeys(n);const r=t.getOptionScopes(i,o);if(e&&n.defaults){r.push(n.defaults)}return t.createResolver(r,s,[""],{scriptable:false,indexable:false,allKeys:true})}function xa(t,n){const e=Ge.datasets[t]||{};const i=(n.datasets||{})[t]||{};return i.indexAxis||n.indexAxis||e.indexAxis||"x"}function ya(t,n){let e=t;if(t==="_index_"){e=n}else if(t==="_value_"){e=n==="x"?"y":"x"}return e}function va(t,n){return t===n?"_index_":"_value_"}function Ma(t){if(t==="x"||t==="y"||t==="r"){return t}}function ka(t){if(t==="top"||t==="bottom"){return"x"}if(t==="left"||t==="right"){return"y"}}function _a(t,...n){if(Ma(t)){return t}for(const e of n){const n=e.axis||ka(e.position)||t.length>1&&Ma(t[0].toLowerCase());if(n){return n}}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Sa(t,n,e){if(e[n+"AxisID"]===t){return{axis:n}}}function za(t,n){if(n.data&&n.data.datasets){const e=n.data.datasets.filter((n=>n.xAxisID===t||n.yAxisID===t));if(e.length){return Sa(t,"x",e[0])||Sa(t,"y",e[0])}}return{}}function Oa(t,n){const e=Xe[t.type]||{scales:{}};const i=n.scales||{};const s=xa(t.type,n);const o=Object.create(null);Object.keys(i).forEach((n=>{const r=i[n];if(!gn(r)){return console.error(`Invalid scale configuration for scale: ${n}`)}if(r._proxy){return console.warn(`Ignoring resolver passed as options for scale: ${n}`)}const a=_a(n,r,za(n,t),Ge.scales[r.type]);const c=va(a,s);const l=e.scales||{};o[n]=Cn(Object.create(null),[{axis:a},r,l[a],l[c]])}));t.data.datasets.forEach((e=>{const s=e.type||t.type;const r=e.indexAxis||xa(s,n);const a=Xe[s]||{};const c=a.scales||{};Object.keys(c).forEach((t=>{const n=ya(t,r);const s=e[n+"AxisID"]||n;o[s]=o[s]||Object.create(null);Cn(o[s],[{axis:n},i[s],c[t]])}))}));Object.keys(o).forEach((t=>{const n=o[t];Cn(n,[Ge.scales[n.type],Ge.scale])}));return o}function Ca(t){const n=t.options||(t.options={});n.plugins=wn(n.plugins,{});n.scales=Oa(t,n)}function Da(t){t=t||{};t.datasets=t.datasets||[];t.labels=t.labels||[];return t}function Aa(t){t=t||{};t.data=Da(t.data);Ca(t);return t}const ja=new Map;const Pa=new Set;function Ea(t,n){let e=ja.get(t);if(!e){e=n();ja.set(t,e);Pa.add(e)}return e}const La=(t,n,e)=>{const i=En(n,e);if(i!==undefined){t.add(i)}};class Ra{constructor(t){this._config=Aa(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=Da(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();Ca(t)}clearCache(){this._scopeCache.clear();this._resolverCache.clear()}datasetScopeKeys(t){return Ea(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,n){return Ea(`${t}.transition.${n}`,(()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,n){return Ea(`${t}-${n}`,(()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]]))}pluginScopeKeys(t){const n=t.id;const e=this.type;return Ea(`${e}-plugin-${n}`,(()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,n){const e=this._scopeCache;let i=e.get(t);if(!i||n){i=new Map;e.set(t,i)}return i}getOptionScopes(t,n,e){const{options:i,type:s}=this;const o=this._cachedScopes(t,e);const r=o.get(n);if(r){return r}const a=new Set;n.forEach((n=>{if(t){a.add(t);n.forEach((n=>La(a,t,n)))}n.forEach((t=>La(a,i,t)));n.forEach((t=>La(a,Xe[s]||{},t)));n.forEach((t=>La(a,Ge,t)));n.forEach((t=>La(a,Ke,t)))}));const c=Array.from(a);if(c.length===0){c.push(Object.create(null))}if(Pa.has(n)){o.set(n,c)}return c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Xe[n]||{},Ge.datasets[n]||{},{type:n},Ge,Ke]}resolveNamedOptions(t,n,e,i=[""]){const s={$shared:true};const{resolver:o,subPrefixes:r}=Na(this._resolverCache,t,i);let a=o;if(Ta(o,n)){s.$shared=false;e=Nn(e)?e():e;const n=this.createResolver(t,e,r);a=Di(o,e,n)}for(const t of n){s[t]=a[t]}return s}createResolver(t,n,e=[""],i){const{resolver:s}=Na(this._resolverCache,t,e);return gn(n)?Di(s,n,undefined,i):s}}function Na(t,n,e){let i=t.get(n);if(!i){i=new Map;t.set(n,i)}const s=e.join();let o=i.get(s);if(!o){const t=Ci(n,e);o={resolver:t,subPrefixes:e.filter((t=>!t.toLowerCase().includes("hover")))};i.set(s,o)}return o}const Ia=t=>gn(t)&&Object.getOwnPropertyNames(t).some((n=>Nn(t[n])));function Ta(t,n){const{isScriptable:e,isIndexable:i}=Ai(t);for(const s of n){const n=e(s);const o=i(s);const r=(o||n)&&t[s];if(n&&(Nn(r)||Ia(r))||o&&pn(r)){return true}}return false}var Fa="4.4.9";const Wa=["top","bottom","left","right","chartArea"];function Ba(t,n){return t==="top"||t==="bottom"||Wa.indexOf(t)===-1&&n==="x"}function $a(t,n){return function(e,i){return e[t]===i[t]?e[n]-i[n]:e[t]-i[t]}}function Ha(t){const n=t.chart;const e=n.options.animation;n.notifyPlugins("afterRender");vn(e&&e.onComplete,[t],n)}function Ya(t){const n=t.chart;const e=n.options.animation;vn(e&&e.onProgress,[t],n)}function Va(t){if(ss()&&typeof t==="string"){t=document.getElementById(t)}else if(t&&t.length){t=t[0]}if(t&&t.canvas){t=t.canvas}return t}const Ua={};const Xa=t=>{const n=Va(t);return Object.values(Ua).filter((t=>t.canvas===n)).pop()};function Ka(t,n,e){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=n){const o=t[s];delete t[s];if(e>0||i>n){t[i+e]=o}}}}function Za(t,n,e,i){if(!e||t.type==="mouseout"){return null}if(i){return n}return t}class qa{static defaults=Ge;static instances=Ua;static overrides=Xe;static registry=da;static version=Fa;static getChart=Xa;static register(...t){da.add(...t);Qa()}static unregister(...t){da.remove(...t);Qa()}constructor(t,n){const e=this.config=new Ra(n);const i=Va(t);const s=Xa(i);if(s){throw new Error("Canvas is already in use. Chart with ID '"+s.id+"'"+" must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.")}const o=e.createResolver(e.chartOptionScopes(),this.getContext());this.platform=new(e.platform||Wr(i));this.platform.updateConfig(e);const r=this.platform.acquireContext(i,o.aspectRatio);const a=r&&r.canvas;const c=a&&a.height;const l=a&&a.width;this.id=un();this.ctx=r;this.canvas=a;this.width=l;this.height=c;this._options=o;this._aspectRatio=this.aspectRatio;this._layers=[];this._metasets=[];this._stacks=undefined;this.boxes=[];this.currentDevicePixelRatio=undefined;this.chartArea=undefined;this._active=[];this._lastEvent=undefined;this._listeners={};this._responsiveListeners=undefined;this._sortedMetasets=[];this.scales={};this._plugins=new pa;this.$proxies={};this._hiddenIndices={};this.attached=false;this._animationsDisabled=undefined;this.$context=undefined;this._doResize=ke((t=>this.update(t)),o.resizeDelay||0);this._dataChanges=[];Ua[this.id]=this;if(!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}Ys.listen(this,"complete",Ha);Ys.listen(this,"progress",Ya);this._initialize();if(this.attached){this.update()}}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:e,height:i,_aspectRatio:s}=this;if(!dn(t)){return t}if(n&&s){return s}return i?e/i:null}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 da}_initialize(){this.notifyPlugins("beforeInit");if(this.options.responsive){this.resize()}else{ms(this,this.options.devicePixelRatio)}this.bindEvents();this.notifyPlugins("afterInit");return this}clear(){ii(this.canvas,this.ctx);return this}stop(){Ys.stop(this);return this}resize(t,n){if(!Ys.running(this)){this._resize(t,n)}else{this._resizeBeforeDraw={width:t,height:n}}}_resize(t,n){const e=this.options;const i=this.canvas;const s=e.maintainAspectRatio&&this.aspectRatio;const o=this.platform.getMaximumSize(i,t,n,s);const r=e.devicePixelRatio||this.platform.getDevicePixelRatio();const a=this.width?"resize":"attach";this.width=o.width;this.height=o.height;this._aspectRatio=this.aspectRatio;if(!ms(this,r,true)){return}this.notifyPlugins("resize",{size:o});vn(e.onResize,[this,o],this);if(this.attached){if(this._doResize(a)){this.render()}}}ensureScalesHaveIDs(){const t=this.options;const n=t.scales||{};Mn(n,((t,n)=>{t.id=n}))}buildOrUpdateScales(){const t=this.options;const n=t.scales;const e=this.scales;const i=Object.keys(e).reduce(((t,n)=>{t[n]=false;return t}),{});let s=[];if(n){s=s.concat(Object.keys(n).map((t=>{const e=n[t];const i=_a(t,e);const s=i==="r";const o=i==="x";return{options:e,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))}Mn(s,(n=>{const s=n.options;const o=s.id;const r=_a(o,s);const a=wn(s.type,n.dtype);if(s.position===undefined||Ba(s.position,r)!==Ba(n.dposition)){s.position=n.dposition}i[o]=true;let c=null;if(o in e&&e[o].type===a){c=e[o]}else{const t=da.getScale(a);c=new t({id:o,type:a,ctx:this.ctx,chart:this});e[c.id]=c}c.init(s,t)}));Mn(i,((t,n)=>{if(!t){delete e[n]}}));Mn(e,(t=>{mr.configure(this,t,t.options);mr.addBox(this,t)}))}_updateMetasets(){const t=this._metasets;const n=this.data.datasets.length;const e=t.length;t.sort(((t,n)=>t.index-n.index));if(e>n){for(let t=n;t<e;++t){this._destroyDatasetMeta(t)}t.splice(n,e-n)}this._sortedMetasets=t.slice(0).sort($a("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;if(t.length>n.length){delete this._stacks}t.forEach(((t,e)=>{if(n.filter((n=>n===t._dataset)).length===0){this._destroyDatasetMeta(e)}}))}buildOrUpdateControllers(){const t=[];const n=this.data.datasets;let e,i;this._removeUnreferencedMetasets();for(e=0,i=n.length;e<i;e++){const i=n[e];let s=this.getDatasetMeta(e);const o=i.type||this.config.type;if(s.type&&s.type!==o){this._destroyDatasetMeta(e);s=this.getDatasetMeta(e)}s.type=o;s.indexAxis=i.indexAxis||xa(o,this.options);s.order=i.order||0;s.index=e;s.label=""+i.label;s.visible=this.isDatasetVisible(e);if(s.controller){s.controller.updateIndex(e);s.controller.linkScales()}else{const n=da.getController(o);const{datasetElementType:i,dataElementType:r}=Ge.datasets[o];Object.assign(n,{dataElementType:da.getElement(r),datasetElementType:i&&da.getElement(i)});s.controller=new n(this,e);t.push(s.controller)}}this._updateMetasets();return t}_resetElements(){Mn(this.data.datasets,((t,n)=>{this.getDatasetMeta(n).controller.reset()}),this)}reset(){this._resetElements();this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const e=this._options=n.createResolver(n.chartOptionScopes(),this.getContext());const i=this._animationsDisabled=!e.animation;this._updateScales();this._checkEventBindings();this._updateHiddenIndices();this._plugins.invalidate();if(this.notifyPlugins("beforeUpdate",{mode:t,cancelable:true})===false){return}const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,n=this.data.datasets.length;t<n;t++){const{controller:n}=this.getDatasetMeta(t);const e=!i&&s.indexOf(n)===-1;n.buildOrUpdateElements(e);o=Math.max(+n.getMaxOverflow(),o)}o=this._minPadding=e.layout.autoPadding?o:0;this._updateLayout(o);if(!i){Mn(s,(t=>{t.reset()}))}this._updateDatasets(t);this.notifyPlugins("afterUpdate",{mode:t});this._layers.sort($a("z","_idx"));const{_active:r,_lastEvent:a}=this;if(a){this._eventHandler(a,true)}else if(r.length){this._updateHoverStyles(r,r,true)}this.render()}_updateScales(){Mn(this.scales,(t=>{mr.removeBox(this,t)}));this.ensureScalesHaveIDs();this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options;const n=new Set(Object.keys(this._listeners));const e=new Set(t.events);if(!In(n,e)||!!this._responsiveListeners!==t.responsive){this.unbindEvents();this.bindEvents()}}_updateHiddenIndices(){const{_hiddenIndices:t}=this;const n=this._getUniformDataChanges()||[];for(const{method:e,start:i,count:s}of n){const n=e==="_removeElements"?-s:s;Ka(t,i,n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length){return}this._dataChanges=[];const n=this.data.datasets.length;const e=n=>new Set(t.filter((t=>t[0]===n)).map(((t,n)=>n+","+t.splice(1).join(","))));const i=e(0);for(let t=1;t<n;t++){if(!In(i,e(t))){return}}return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false){return}mr.update(this,this.width,this.height,t);const n=this.chartArea;const e=n.width<=0||n.height<=0;this._layers=[];Mn(this.boxes,(t=>{if(e&&t.position==="chartArea"){return}if(t.configure){t.configure()}this._layers.push(...t._layers())}),this);this._layers.forEach(((t,n)=>{t._idx=n}));this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:true})===false){return}for(let t=0,n=this.data.datasets.length;t<n;++t){this.getDatasetMeta(t).controller.configure()}for(let n=0,e=this.data.datasets.length;n<e;++n){this._updateDataset(n,Nn(t)?t({datasetIndex:n}):t)}this.notifyPlugins("afterDatasetsUpdate",{mode:t})}_updateDataset(t,n){const e=this.getDatasetMeta(t);const i={meta:e,index:t,mode:n,cancelable:true};if(this.notifyPlugins("beforeDatasetUpdate",i)===false){return}e.controller._update(n);i.cancelable=false;this.notifyPlugins("afterDatasetUpdate",i)}render(){if(this.notifyPlugins("beforeRender",{cancelable:true})===false){return}if(Ys.has(this)){if(this.attached&&!Ys.running(this)){Ys.start(this)}}else{this.draw();Ha({chart:this})}}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null;this._resize(t,n)}this.clear();if(this.width<=0||this.height<=0){return}if(this.notifyPlugins("beforeDraw",{cancelable:true})===false){return}const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t){n[t].draw(this.chartArea)}this._drawDatasets();for(;t<n.length;++t){n[t].draw(this.chartArea)}this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets;const e=[];let i,s;for(i=0,s=n.length;i<s;++i){const s=n[i];if(!t||s.visible){e.push(s)}}return e}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false){return}const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n){this._drawDataset(t[n])}this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx;const e={meta:t,index:t.index,cancelable:true};const i=$s(this,t);if(this.notifyPlugins("beforeDatasetDraw",e)===false){return}if(i){ai(n,i)}t.controller.draw();if(i){ci(n)}e.cancelable=false;this.notifyPlugins("afterDatasetDraw",e)}isPointInArea(t){return ri(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,e,i){const s=tr.modes[n];if(typeof s==="function"){return s(this,t,e,i)}return[]}getDatasetMeta(t){const n=this.data.datasets[t];const e=this._metasets;let i=e.filter((t=>t&&t._dataset===n)).pop();if(!i){i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:false};e.push(i)}return i}getContext(){return this.$context||(this.$context=Oi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n){return false}const e=this.getDatasetMeta(t);return typeof e.hidden==="boolean"?!e.hidden:!n.hidden}setDatasetVisibility(t,n){const e=this.getDatasetMeta(t);e.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,e){const i=e?"show":"hide";const s=this.getDatasetMeta(t);const o=s.controller._resolveAnimations(undefined,i);if(Rn(n)){s.data[n].hidden=!e;this.update()}else{this.setDatasetVisibility(t,e);o.update(s,{visible:e});this.update((n=>n.datasetIndex===t?i:undefined))}}hide(t,n){this._updateVisibility(t,n,false)}show(t,n){this._updateVisibility(t,n,true)}_destroyDatasetMeta(t){const n=this._metasets[t];if(n&&n.controller){n.controller._destroy()}delete this._metasets[t]}_stop(){let t,n;this.stop();Ys.remove(this);for(t=0,n=this.data.datasets.length;t<n;++t){this._destroyDatasetMeta(t)}}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop();this.config.clearCache();if(t){this.unbindEvents();ii(t,n);this.platform.releaseContext(n);this.canvas=null;this.ctx=null}delete Ua[this.id];this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents();if(this.options.responsive){this.bindResponsiveEvents()}else{this.attached=true}}bindUserEvents(){const t=this._listeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(t,n,e)=>{t.offsetX=n;t.offsetY=e;this._eventHandler(t)};Mn(this.options.events,(t=>e(t,i)))}bindResponsiveEvents(){if(!this._responsiveListeners){this._responsiveListeners={}}const t=this._responsiveListeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(e,i)=>{if(t[e]){n.removeEventListener(this,e,i);delete t[e]}};const s=(t,n)=>{if(this.canvas){this.resize(t,n)}};let o;const r=()=>{i("attach",r);this.attached=true;this.resize();e("resize",s);e("detach",o)};o=()=>{this.attached=false;i("resize",s);this._stop();this._resize(0,0);e("attach",r)};if(n.isAttached(this.canvas)){r()}else{o()}}unbindEvents(){Mn(this._listeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._listeners={};Mn(this._responsiveListeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._responsiveListeners=undefined}updateHoverStyle(t,n,e){const i=e?"set":"remove";let s,o,r,a;if(n==="dataset"){s=this.getDatasetMeta(t[0].datasetIndex);s.controller["_"+i+"DatasetHoverStyle"]()}for(r=0,a=t.length;r<a;++r){o=t[r];const n=o&&this.getDatasetMeta(o.datasetIndex).controller;if(n){n[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[];const e=t.map((({datasetIndex:t,index:n})=>{const e=this.getDatasetMeta(t);if(!e){throw new Error("No dataset found at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const i=!kn(e,n);if(i){this._active=e;this._lastEvent=null;this._updateHoverStyles(e,n)}}notifyPlugins(t,n,e){return this._plugins.notify(this,t,n,e)}isPluginEnabled(t){return this._plugins._cache.filter((n=>n.plugin.id===t)).length===1}_updateHoverStyles(t,n,e){const i=this.options.hover;const s=(t,n)=>t.filter((t=>!n.some((n=>t.datasetIndex===n.datasetIndex&&t.index===n.index))));const o=s(n,t);const r=e?t:s(t,n);if(o.length){this.updateHoverStyle(o,i.mode,false)}if(r.length&&i.mode){this.updateHoverStyle(r,i.mode,true)}}_eventHandler(t,n){const e={event:t,replay:n,cancelable:true,inChartArea:this.isPointInArea(t)};const i=n=>(n.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",e,i)===false){return}const s=this._handleEvent(t,n,e.inChartArea);e.cancelable=false;this.notifyPlugins("afterEvent",e,i);if(s||e.changed){this.render()}return this}_handleEvent(t,n,e){const{_active:i=[],options:s}=this;const o=n;const r=this._getActiveElements(t,i,e,o);const a=Tn(t);const c=Za(t,this._lastEvent,e,a);if(e){this._lastEvent=null;vn(s.onHover,[t,r,this],this);if(a){vn(s.onClick,[t,r,this],this)}}const l=!kn(r,i);if(l||n){this._active=r;this._updateHoverStyles(r,i,n)}this._lastEvent=c;return l}_getActiveElements(t,n,e,i){if(t.type==="mouseout"){return[]}if(!e){return n}const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function Qa(){return Mn(qa.instances,(t=>t._plugins.invalidate()))}function Ga(t,n,e){const{startAngle:i,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:c}=n;let l=s/a;t.beginPath();t.arc(o,r,a,i-l,e+l);if(c>s){l=s/c;t.arc(o,r,c,e+l,i-l,true)}else{t.arc(o,r,s,e+Yn,i-Yn)}t.closePath();t.clip()}function Ja(t){return yi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function tc(t,n,e,i){const s=Ja(t.options.borderRadius);const o=(e-n)/2;const r=Math.min(o,i*n/2);const a=t=>{const n=(e-Math.min(o,t))*i/2;return he(t,0,Math.min(o,n))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:he(s.innerStart,0,r),innerEnd:he(s.innerEnd,0,r)}}function nc(t,n,e,i){return{x:e+t*Math.cos(n),y:i+t*Math.sin(n)}}function ec(t,n,e,i,s,o){const{x:r,y:a,startAngle:c,pixelMargin:l,innerRadius:h}=n;const f=Math.max(n.outerRadius+i+e-l,0);const u=h>0?h+i+e+l:0;let d=0;const p=s-c;if(i){const t=h>0?h-i:0;const n=f>0?f-i:0;const e=(t+n)/2;const s=e!==0?p*e/(e+i):p;d=(p-s)/2}const g=Math.max(.001,p*f-e/Fn)/f;const b=(p-g)/2;const m=c+b+d;const w=s-b-d;const{outerStart:x,outerEnd:y,innerStart:v,innerEnd:M}=tc(n,u,f,w-m);const k=f-x;const _=f-y;const S=m+x/k;const z=w-y/_;const O=u+v;const C=u+M;const D=m+v/O;const A=w-M/C;t.beginPath();if(o){const n=(S+z)/2;t.arc(r,a,f,S,n);t.arc(r,a,f,n,z);if(y>0){const n=nc(_,z,r,a);t.arc(n.x,n.y,y,z,w+Yn)}const e=nc(C,w,r,a);t.lineTo(e.x,e.y);if(M>0){const n=nc(C,A,r,a);t.arc(n.x,n.y,M,w+Yn,A+Math.PI)}const i=(w-M/u+(m+v/u))/2;t.arc(r,a,u,w-M/u,i,true);t.arc(r,a,u,i,m+v/u,true);if(v>0){const n=nc(O,D,r,a);t.arc(n.x,n.y,v,D+Math.PI,m-Yn)}const s=nc(k,m,r,a);t.lineTo(s.x,s.y);if(x>0){const n=nc(k,S,r,a);t.arc(n.x,n.y,x,m-Yn,S)}}else{t.moveTo(r,a);const n=Math.cos(S)*f+r;const e=Math.sin(S)*f+a;t.lineTo(n,e);const i=Math.cos(z)*f+r;const s=Math.sin(z)*f+a;t.lineTo(i,s)}t.closePath()}function ic(t,n,e,i,s){const{fullCircles:o,startAngle:r,circumference:a}=n;let c=n.endAngle;if(o){ec(t,n,e,i,c,s);for(let n=0;n<o;++n){t.fill()}if(!isNaN(a)){c=r+(a%Wn||Wn)}}ec(t,n,e,i,c,s);t.fill();return c}function sc(t,n,e,i,s){const{fullCircles:o,startAngle:r,circumference:a,options:c}=n;const{borderWidth:l,borderJoinStyle:h,borderDash:f,borderDashOffset:u}=c;const d=c.borderAlign==="inner";if(!l){return}t.setLineDash(f||[]);t.lineDashOffset=u;if(d){t.lineWidth=l*2;t.lineJoin=h||"round"}else{t.lineWidth=l;t.lineJoin=h||"bevel"}let p=n.endAngle;if(o){ec(t,n,e,i,p,s);for(let n=0;n<o;++n){t.stroke()}if(!isNaN(a)){p=r+(a%Wn||Wn)}}if(d){Ga(t,n,p)}if(!o){ec(t,n,e,i,p,s);t.stroke()}}class oc extends Br{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:undefined,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:undefined,circular:true};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super();this.options=undefined;this.circumference=undefined;this.startAngle=undefined;this.endAngle=undefined;this.innerRadius=undefined;this.outerRadius=undefined;this.pixelMargin=0;this.fullCircles=0;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.getProps(["x","y"],e);const{angle:s,distance:o}=oe(i,{x:t,y:n});const{startAngle:r,endAngle:a,innerRadius:c,outerRadius:l,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e);const f=(this.options.spacing+this.options.borderWidth)/2;const u=wn(h,a-r);const d=le(s,r,a)&&r!==a;const p=u>=Wn||d;const g=ue(o,c+f,l+f);return p&&g}getCenterPoint(t){const{x:n,y:e,startAngle:i,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t);const{offset:a,spacing:c}=this.options;const l=(i+s)/2;const h=(o+r+c+a)/2;return{x:n+Math.cos(l)*h,y:e+Math.sin(l)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:e}=this;const i=(n.offset||0)/4;const s=(n.spacing||0)/2;const o=n.circular;this.pixelMargin=n.borderAlign==="inner"?.33:0;this.fullCircles=e>Wn?Math.floor(e/Wn):0;if(e===0||this.innerRadius<0||this.outerRadius<0){return}t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*i,Math.sin(r)*i);const a=1-Math.sin(Math.min(Fn,e||0));const c=i*a;t.fillStyle=n.backgroundColor;t.strokeStyle=n.borderColor;ic(t,this,c,s,o);sc(t,this,c,s,o);t.restore()}}function rc(t,n,e=n){t.lineCap=wn(e.borderCapStyle,n.borderCapStyle);t.setLineDash(wn(e.borderDash,n.borderDash));t.lineDashOffset=wn(e.borderDashOffset,n.borderDashOffset);t.lineJoin=wn(e.borderJoinStyle,n.borderJoinStyle);t.lineWidth=wn(e.borderWidth,n.borderWidth);t.strokeStyle=wn(e.borderColor,n.borderColor)}function ac(t,n,e){t.lineTo(e.x,e.y)}function cc(t){if(t.stepped){return li}if(t.tension||t.cubicInterpolationMode==="monotone"){return hi}return ac}function lc(t,n,e={}){const i=t.length;const{start:s=0,end:o=i-1}=e;const{start:r,end:a}=n;const c=Math.max(s,r);const l=Math.min(o,a);const h=s<r&&o<r||s>a&&o>a;return{count:i,start:c,loop:n.loop,ilen:l<c&&!h?i+l-c:l-c}}function hc(t,n,e,i){const{points:s,options:o}=n;const{count:r,start:a,loop:c,ilen:l}=lc(s,e,i);const h=cc(o);let{move:f=true,reverse:u}=i||{};let d,p,g;for(d=0;d<=l;++d){p=s[(a+(u?l-d:d))%r];if(p.skip){continue}else if(f){t.moveTo(p.x,p.y);f=false}else{h(t,g,p,u,o.stepped)}g=p}if(c){p=s[(a+(u?l:0))%r];h(t,g,p,u,o.stepped)}return!!c}function fc(t,n,e,i){const s=n.points;const{count:o,start:r,ilen:a}=lc(s,e,i);const{move:c=true,reverse:l}=i||{};let h=0;let f=0;let u,d,p,g,b,m;const w=t=>(r+(l?a-t:t))%o;const x=()=>{if(g!==b){t.lineTo(h,b);t.lineTo(h,g);t.lineTo(h,m)}};if(c){d=s[w(0)];t.moveTo(d.x,d.y)}for(u=0;u<=a;++u){d=s[w(u)];if(d.skip){continue}const n=d.x;const e=d.y;const i=n|0;if(i===p){if(e<g){g=e}else if(e>b){b=e}h=(f*h+n)/++f}else{x();t.lineTo(n,e);p=i;f=0;g=b=e}m=e}x()}function uc(t){const n=t.options;const e=n.borderDash&&n.borderDash.length;const i=!t._decimated&&!t._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!e;return i?fc:hc}function dc(t){if(t.stepped){return vs}if(t.tension||t.cubicInterpolationMode==="monotone"){return Ms}return ys}function pc(t,n,e,i){let s=n._path;if(!s){s=n._path=new Path2D;if(n.path(s,e,i)){s.closePath()}}rc(t,n.options);t.stroke(s)}function gc(t,n,e,i){const{segments:s,options:o}=n;const r=uc(n);for(const a of s){rc(t,o,a.style);t.beginPath();if(r(t,n,a,{start:e,end:e+i-1})){t.closePath()}t.stroke()}}const bc=typeof Path2D==="function";function mc(t,n,e,i){if(bc&&!n.options.segment){pc(t,n,e,i)}else{gc(t,n,e,i)}}class wc extends Br{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:true,cubicInterpolationMode:"default",fill:false,spanGaps:false,stepped:false,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super();this.animated=true;this.options=undefined;this._chart=undefined;this._loop=undefined;this._fullLoop=undefined;this._path=undefined;this._points=undefined;this._segments=undefined;this._decimated=false;this._pointsUpdated=false;this._datasetIndex=undefined;if(t){Object.assign(this,t)}}updateControlPoints(t,n){const e=this.options;if((e.tension||e.cubicInterpolationMode==="monotone")&&!e.stepped&&!this._pointsUpdated){const i=e.spanGaps?this._loop:this._fullLoop;is(this._points,e,t,i,n);this._pointsUpdated=true}}set points(t){this._points=t;delete this._segments;delete this._path;this._pointsUpdated=false}get points(){return this._points}get segments(){return this._segments||(this._segments=Rs(this,this.options.segment))}first(){const t=this.segments;const n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments;const n=this.points;const e=t.length;return e&&n[t[e-1].end]}interpolate(t,n){const e=this.options;const i=t[n];const s=this.points;const o=Ps(this,{property:n,start:i,end:i});if(!o.length){return}const r=[];const a=dc(e);let c,l;for(c=0,l=o.length;c<l;++c){const{start:l,end:h}=o[c];const f=s[l];const u=s[h];if(f===u){r.push(f);continue}const d=Math.abs((i-f[n])/(u[n]-f[n]));const p=a(f,u,d,e.stepped);p[n]=t[n];r.push(p)}return r.length===1?r[0]:r}pathSegment(t,n,e){const i=uc(this);return i(t,this,n,e)}path(t,n,e){const i=this.segments;const s=uc(this);let o=this._loop;n=n||0;e=e||this.points.length-n;for(const r of i){o&=s(t,this,r,{start:n,end:n+e-1})}return!!o}draw(t,n,e,i){const s=this.options||{};const o=this.points||[];if(o.length&&s.borderWidth){t.save();mc(t,this,e,i);t.restore()}if(this.animated){this._pointsUpdated=false;this._path=undefined}}}function xc(t,n,e,i){const s=t.options;const{[e]:o}=t.getProps([e],i);return Math.abs(n-o)<s.radius+s.hitRadius}class yc extends Br{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.parsed=undefined;this.skip=undefined;this.stop=undefined;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.options;const{x:s,y:o}=this.getProps(["x","y"],e);return Math.pow(t-s,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return xc(this,t,"x",n)}inYRange(t,n){return xc(this,t,"y",n)}getCenterPoint(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const e=n&&t.borderWidth||0;return(n+e)*2}draw(t,n){const e=this.options;if(this.skip||e.radius<.1||!ri(this,n,this.size(e)/2)){return}t.strokeStyle=e.borderColor;t.lineWidth=e.borderWidth;t.fillStyle=e.backgroundColor;si(t,e,this.x,this.y)}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function vc(t,n){const{x:e,y:i,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],n);let a,c,l,h,f;if(t.horizontal){f=r/2;a=Math.min(e,s);c=Math.max(e,s);l=i-f;h=i+f}else{f=o/2;a=e-f;c=e+f;l=Math.min(i,s);h=Math.max(i,s)}return{left:a,top:l,right:c,bottom:h}}function Mc(t,n,e,i){return t?0:he(n,e,i)}function kc(t,n,e){const i=t.options.borderWidth;const s=t.borderSkipped;const o=vi(i);return{t:Mc(s.top,o.top,0,e),r:Mc(s.right,o.right,0,n),b:Mc(s.bottom,o.bottom,0,e),l:Mc(s.left,o.left,0,n)}}function _c(t,n,e){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]);const s=t.options.borderRadius;const o=Mi(s);const r=Math.min(n,e);const a=t.borderSkipped;const c=i||gn(s);return{topLeft:Mc(!c||a.top||a.left,o.topLeft,0,r),topRight:Mc(!c||a.top||a.right,o.topRight,0,r),bottomLeft:Mc(!c||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Mc(!c||a.bottom||a.right,o.bottomRight,0,r)}}function Sc(t){const n=vc(t);const e=n.right-n.left;const i=n.bottom-n.top;const s=kc(t,e/2,i/2);const o=_c(t,e/2,i/2);return{outer:{x:n.left,y:n.top,w:e,h:i,radius:o},inner:{x:n.left+s.l,y:n.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function zc(t,n,e,i){const s=n===null;const o=e===null;const r=s&&o;const a=t&&!r&&vc(t,i);return a&&(s||ue(n,a.left,a.right))&&(o||ue(e,a.top,a.bottom))}function Oc(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Cc(t,n){t.rect(n.x,n.y,n.w,n.h)}function Dc(t,n,e={}){const i=t.x!==e.x?-n:0;const s=t.y!==e.y?-n:0;const o=(t.x+t.w!==e.x+e.w?n:0)-i;const r=(t.y+t.h!==e.y+e.h?n:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}class Ac extends Br{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:undefined};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.horizontal=undefined;this.base=undefined;this.width=undefined;this.height=undefined;this.inflateAmount=undefined;if(t){Object.assign(this,t)}}draw(t){const{inflateAmount:n,options:{borderColor:e,backgroundColor:i}}=this;const{inner:s,outer:o}=Sc(this);const r=Oc(o.radius)?gi:Cc;t.save();if(o.w!==s.w||o.h!==s.h){t.beginPath();r(t,Dc(o,n,s));t.clip();r(t,Dc(s,-n,o));t.fillStyle=e;t.fill("evenodd")}t.beginPath();r(t,Dc(s,n));t.fillStyle=i;t.fill();t.restore()}inRange(t,n,e){return zc(this,t,n,e)}inXRange(t,n){return zc(this,t,null,n)}inYRange(t,n){return zc(this,null,t,n)}getCenterPoint(t){const{x:n,y:e,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?e:(e+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}var jc=Object.freeze({__proto__:null,ArcElement:oc,BarElement:Ac,LineElement:wc,PointElement:yc});const Pc=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"];const Ec=Pc.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Lc(t){return Pc[t%Pc.length]}function Rc(t){return Ec[t%Ec.length]}function Nc(t,n){t.borderColor=Lc(n);t.backgroundColor=Rc(n);return++n}function Ic(t,n){t.backgroundColor=t.data.map((()=>Lc(n++)));return n}function Tc(t,n){t.backgroundColor=t.data.map((()=>Rc(n++)));return n}function Fc(t){let n=0;return(e,i)=>{const s=t.getDatasetMeta(i).controller;if(s instanceof No){n=Ic(e,n)}else if(s instanceof To){n=Tc(e,n)}else if(s){n=Nc(e,n)}}}function Wc(t){let n;for(n in t){if(t[n].borderColor||t[n].backgroundColor){return true}}return false}function Bc(t){return t&&(t.borderColor||t.backgroundColor)}function $c(){return Ge.borderColor!=="rgba(0,0,0,0.1)"||Ge.backgroundColor!=="rgba(0,0,0,0.1)"}var Hc={id:"colors",defaults:{enabled:true,forceOverride:false},beforeLayout(t,n,e){if(!e.enabled){return}const{data:{datasets:i},options:s}=t.config;const{elements:o}=s;const r=Wc(i)||Bc(s)||o&&Wc(o)||$c();if(!e.forceOverride&&r){return}const a=Fc(t);i.forEach(a)}};function Yc(t,n,e,i,s){const o=s.samples||i;if(o>=e){return t.slice(n,n+e)}const r=[];const a=(e-2)/(o-2);let c=0;const l=n+e-1;let h=n;let f,u,d,p,g;r[c++]=t[h];for(f=0;f<o-2;f++){let i=0;let s=0;let o;const l=Math.floor((f+1)*a)+1+n;const b=Math.min(Math.floor((f+2)*a)+1,e)+n;const m=b-l;for(o=l;o<b;o++){i+=t[o].x;s+=t[o].y}i/=m;s/=m;const w=Math.floor(f*a)+1+n;const x=Math.min(Math.floor((f+1)*a)+1,e)+n;const{x:y,y:v}=t[h];d=p=-1;for(o=w;o<x;o++){p=.5*Math.abs((y-i)*(t[o].y-v)-(y-t[o].x)*(s-v));if(p>d){d=p;u=t[o];g=o}}r[c++]=u;h=g}r[c++]=t[l];return r}function Vc(t,n,e,i){let s=0;let o=0;let r,a,c,l,h,f,u,d,p,g;const b=[];const m=n+e-1;const w=t[n].x;const x=t[m].x;const y=x-w;for(r=n;r<n+e;++r){a=t[r];c=(a.x-w)/y*i;l=a.y;const n=c|0;if(n===h){if(l<p){p=l;f=r}else if(l>g){g=l;u=r}s=(o*s+a.x)/++o}else{const e=r-1;if(!dn(f)&&!dn(u)){const n=Math.min(f,u);const i=Math.max(f,u);if(n!==d&&n!==e){b.push({...t[n],x:s})}if(i!==d&&i!==e){b.push({...t[i],x:s})}}if(r>0&&e!==d){b.push(t[e])}b.push(a);h=n;o=0;p=g=l;f=u=d=r}}return b}function Uc(t){if(t._decimated){const n=t._data;delete t._decimated;delete t._data;Object.defineProperty(t,"data",{configurable:true,enumerable:true,writable:true,value:n})}}function Xc(t){t.data.datasets.forEach((t=>{Uc(t)}))}function Kc(t,n){const e=n.length;let i=0;let s;const{iScale:o}=t;const{min:r,max:a,minDefined:c,maxDefined:l}=o.getUserBounds();if(c){i=he(pe(n,o.axis,r).lo,0,e-1)}if(l){s=he(pe(n,o.axis,a).hi+1,i,e)-i}else{s=e-i}return{start:i,count:s}}var Zc={id:"decimation",defaults:{algorithm:"min-max",enabled:false},beforeElementsUpdate:(t,n,e)=>{if(!e.enabled){Xc(t);return}const i=t.width;t.data.datasets.forEach(((n,s)=>{const{_data:o,indexAxis:r}=n;const a=t.getDatasetMeta(s);const c=o||n.data;if(Si([r,t.options.indexAxis])==="y"){return}if(!a.controller.supportsDecimation){return}const l=t.scales[a.xAxisID];if(l.type!=="linear"&&l.type!=="time"){return}if(t.options.parsing){return}let{start:h,count:f}=Kc(a,c);const u=e.threshold||4*i;if(f<=u){Uc(n);return}if(dn(o)){n._data=c;delete n.data;Object.defineProperty(n,"data",{configurable:true,enumerable:true,get:function(){return this._decimated},set:function(t){this._data=t}})}let d;switch(e.algorithm){case"lttb":d=Yc(c,h,f,i,e);break;case"min-max":d=Vc(c,h,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=d}))},destroy(t){Xc(t)}};function qc(t,n,e){const i=t.segments;const s=t.points;const o=n.points;const r=[];for(const t of i){let{start:i,end:a}=t;a=Jc(i,a,s);const c=Qc(e,s[i],s[a],t.loop);if(!n.segments){r.push({source:t,target:c,start:s[i],end:s[a]});continue}const l=Ps(n,c);for(const n of l){const i=Qc(e,o[n.start],o[n.end],n.loop);const a=js(t,s,i);for(const t of a){r.push({source:t,target:n,start:{[e]:tl(c,i,"start",Math.max)},end:{[e]:tl(c,i,"end",Math.min)}})}}}return r}function Qc(t,n,e,i){if(i){return}let s=n[t];let o=e[t];if(t==="angle"){s=ce(s);o=ce(o)}return{property:t,start:s,end:o}}function Gc(t,n){const{x:e=null,y:i=null}=t||{};const s=n.points;const o=[];n.segments.forEach((({start:t,end:n})=>{n=Jc(t,n,s);const r=s[t];const a=s[n];if(i!==null){o.push({x:r.x,y:i});o.push({x:a.x,y:i})}else if(e!==null){o.push({x:e,y:r.y});o.push({x:e,y:a.y})}}));return o}function Jc(t,n,e){for(;n>t;n--){const t=e[n];if(!isNaN(t.x)&&!isNaN(t.y)){break}}return n}function tl(t,n,e,i){if(t&&n){return i(t[e],n[e])}return t?t[e]:n?n[e]:0}function nl(t,n){let e=[];let i=false;if(pn(t)){i=true;e=t}else{e=Gc(t,n)}return e.length?new wc({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function el(t){return t&&t.fill!==false}function il(t,n,e){const i=t[n];let s=i.fill;const o=[n];let r;if(!e){return s}while(s!==false&&o.indexOf(s)===-1){if(!bn(s)){return s}r=t[s];if(!r){return false}if(r.visible){return s}o.push(s);s=r.fill}return false}function sl(t,n,e){const i=cl(t);if(gn(i)){return isNaN(i.value)?false:i}let s=parseFloat(i);if(bn(s)&&Math.floor(s)===s){return ol(i[0],n,s,e)}return["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ol(t,n,e,i){if(t==="-"||t==="+"){e=n+e}if(e===n||e<0||e>=i){return false}return e}function rl(t,n){let e=null;if(t==="start"){e=n.bottom}else if(t==="end"){e=n.top}else if(gn(t)){e=n.getPixelForValue(t.value)}else if(n.getBasePixel){e=n.getBasePixel()}return e}function al(t,n,e){let i;if(t==="start"){i=e}else if(t==="end"){i=n.options.reverse?n.min:n.max}else if(gn(t)){i=t.value}else{i=n.getBaseValue()}return i}function cl(t){const n=t.options;const e=n.fill;let i=wn(e&&e.target,e);if(i===undefined){i=!!n.backgroundColor}if(i===false||i===null){return false}if(i===true){return"origin"}return i}function ll(t){const{scale:n,index:e,line:i}=t;const s=[];const o=i.segments;const r=i.points;const a=hl(n,e);a.push(nl({x:null,y:n.bottom},i));for(let t=0;t<o.length;t++){const n=o[t];for(let t=n.start;t<=n.end;t++){fl(s,r[t],a)}}return new wc({points:s,options:{}})}function hl(t,n){const e=[];const i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const s=i[t];if(s.index===n){break}if(!s.hidden){e.unshift(s.dataset)}}return e}function fl(t,n,e){const i=[];for(let s=0;s<e.length;s++){const o=e[s];const{first:r,last:a,point:c}=ul(o,n,"x");if(!c||r&&a){continue}if(r){i.unshift(c)}else{t.push(c);if(!a){break}}}t.push(...i)}function ul(t,n,e){const i=t.interpolate(n,e);if(!i){return{}}const s=i[e];const o=t.segments;const r=t.points;let a=false;let c=false;for(let t=0;t<o.length;t++){const n=o[t];const i=r[n.start][e];const l=r[n.end][e];if(ue(s,i,l)){a=s===i;c=s===l;break}}return{first:a,last:c,point:i}}class dl{constructor(t){this.x=t.x;this.y=t.y;this.radius=t.radius}pathSegment(t,n,e){const{x:i,y:s,radius:o}=this;n=n||{start:0,end:Wn};t.arc(i,s,o,n.end,n.start,true);return!e.bounds}interpolate(t){const{x:n,y:e,radius:i}=this;const s=t.angle;return{x:n+Math.cos(s)*i,y:e+Math.sin(s)*i,angle:s}}}function pl(t){const{chart:n,fill:e,line:i}=t;if(bn(e)){return gl(n,e)}if(e==="stack"){return ll(t)}if(e==="shape"){return true}const s=bl(t);if(s instanceof dl){return s}return nl(s,i)}function gl(t,n){const e=t.getDatasetMeta(n);const i=e&&t.isDatasetVisible(n);return i?e.dataset:null}function bl(t){const n=t.scale||{};if(n.getPointPositionForValue){return wl(t)}return ml(t)}function ml(t){const{scale:n={},fill:e}=t;const i=rl(e,n);if(bn(i)){const t=n.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}function wl(t){const{scale:n,fill:e}=t;const i=n.options;const s=n.getLabels().length;const o=i.reverse?n.max:n.min;const r=al(e,n,o);const a=[];if(i.grid.circular){const t=n.getPointPositionForValue(0,o);return new dl({x:t.x,y:t.y,radius:n.getDistanceFromCenterForValue(r)})}for(let t=0;t<s;++t){a.push(n.getPointPositionForValue(t,r))}return a}function xl(t,n,e){const i=pl(n);const{chart:s,index:o,line:r,scale:a,axis:c}=n;const l=r.options;const h=l.fill;const f=l.backgroundColor;const{above:u=f,below:d=f}=h||{};const p=s.getDatasetMeta(o);const g=$s(s,p);if(i&&r.points.length){ai(t,e);yl(t,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:c,clip:g});ci(t)}}function yl(t,n){const{line:e,target:i,above:s,below:o,area:r,scale:a,clip:c}=n;const l=e._loop?"angle":n.axis;t.save();if(l==="x"&&o!==s){vl(t,i,r.top);Ml(t,{line:e,target:i,color:s,scale:a,property:l,clip:c});t.restore();t.save();vl(t,i,r.bottom)}Ml(t,{line:e,target:i,color:o,scale:a,property:l,clip:c});t.restore()}function vl(t,n,e){const{segments:i,points:s}=n;let o=true;let r=false;t.beginPath();for(const a of i){const{start:i,end:c}=a;const l=s[i];const h=s[Jc(i,c,s)];if(o){t.moveTo(l.x,l.y);o=false}else{t.lineTo(l.x,e);t.lineTo(l.x,l.y)}r=!!n.pathSegment(t,a,{move:r});if(r){t.closePath()}else{t.lineTo(h.x,e)}}t.lineTo(n.first().x,e);t.closePath();t.clip()}function Ml(t,n){const{line:e,target:i,property:s,color:o,scale:r,clip:a}=n;const c=qc(e,i,s);for(const{source:n,target:l,start:h,end:f}of c){const{style:{backgroundColor:c=o}={}}=n;const u=i!==true;t.save();t.fillStyle=c;kl(t,r,a,u&&Qc(s,h,f));t.beginPath();const d=!!e.pathSegment(t,n);let p;if(u){if(d){t.closePath()}else{_l(t,i,f,s)}const n=!!i.pathSegment(t,l,{move:d,reverse:true});p=d&&n;if(!p){_l(t,i,h,s)}}t.closePath();t.fill(p?"evenodd":"nonzero");t.restore()}}function kl(t,n,e,i){const s=n.chart.chartArea;const{property:o,start:r,end:a}=i||{};if(o==="x"||o==="y"){let n,i,c,l;if(o==="x"){n=r;i=s.top;c=a;l=s.bottom}else{n=s.left;i=r;c=s.right;l=a}t.beginPath();if(e){n=Math.max(n,e.left);c=Math.min(c,e.right);i=Math.max(i,e.top);l=Math.min(l,e.bottom)}t.rect(n,i,c-n,l-i);t.clip()}}function _l(t,n,e,i){const s=n.interpolate(e,i);if(s){t.lineTo(s.x,s.y)}}var Sl={id:"filler",afterDatasetsUpdate(t,n,e){const i=(t.data.datasets||[]).length;const s=[];let o,r,a,c;for(r=0;r<i;++r){o=t.getDatasetMeta(r);a=o.dataset;c=null;if(a&&a.options&&a instanceof wc){c={visible:t.isDatasetVisible(r),index:r,fill:sl(a,r,i),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}}o.$filler=c;s.push(c)}for(r=0;r<i;++r){c=s[r];if(!c||c.fill===false){continue}c.fill=il(s,r,e.propagate)}},beforeDraw(t,n,e){const i=e.drawTime==="beforeDraw";const s=t.getSortedVisibleDatasetMetas();const o=t.chartArea;for(let n=s.length-1;n>=0;--n){const e=s[n].$filler;if(!e){continue}e.line.updateControlPoints(o,e.axis);if(i&&e.fill){xl(t.ctx,e,o)}}},beforeDatasetsDraw(t,n,e){if(e.drawTime!=="beforeDatasetsDraw"){return}const i=t.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const e=i[n].$filler;if(el(e)){xl(t.ctx,e,t.chartArea)}}},beforeDatasetDraw(t,n,e){const i=n.meta.$filler;if(!el(i)||e.drawTime!=="beforeDatasetDraw"){return}xl(t.ctx,i,t.chartArea)},defaults:{propagate:true,drawTime:"beforeDatasetDraw"}};const zl=(t,n)=>{let{boxHeight:e=n,boxWidth:i=n}=t;if(t.usePointStyle){e=Math.min(e,n);i=t.pointStyleWidth||Math.min(i,n)}return{boxWidth:i,boxHeight:e,itemHeight:Math.max(n,e)}};const Ol=(t,n)=>t!==null&&n!==null&&t.datasetIndex===n.datasetIndex&&t.index===n.index;class Cl extends Br{constructor(t){super();this._added=false;this.legendHitBoxes=[];this._hoveredItem=null;this.doughnutMode=false;this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this.legendItems=undefined;this.columnSizes=undefined;this.lineWidths=undefined;this.maxHeight=undefined;this.maxWidth=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.height=undefined;this.width=undefined;this._margins=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n,e){this.maxWidth=t;this.maxHeight=n;this._margins=e;this.setDimensions();this.buildLabels();this.fit()}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=this._margins.left;this.right=this.width}else{this.height=this.maxHeight;this.top=this._margins.top;this.bottom=this.height}}buildLabels(){const t=this.options.labels||{};let n=vn(t.generateLabels,[this.chart],this)||[];if(t.filter){n=n.filter((n=>t.filter(n,this.chart.data)))}if(t.sort){n=n.sort(((n,e)=>t.sort(n,e,this.chart.data)))}if(this.options.reverse){n.reverse()}this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const e=t.labels;const i=_i(e.font);const s=i.size;const o=this._computeTitleHeight();const{boxWidth:r,itemHeight:a}=zl(e,s);let c,l;n.font=i.string;if(this.isHorizontal()){c=this.maxWidth;l=this._fitRows(o,s,r,a)+10}else{l=this.maxHeight;c=this._fitCols(o,i,r,a)+10}this.width=Math.min(c,t.maxWidth||this.maxWidth);this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,n,e,i){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const c=this.lineWidths=[0];const l=i+r;let h=t;s.textAlign="left";s.textBaseline="middle";let f=-1;let u=-l;this.legendItems.forEach(((t,d)=>{const p=e+n/2+s.measureText(t.text).width;if(d===0||c[c.length-1]+p+2*r>o){h+=l;c[c.length-(d>0?0:1)]=0;u+=l;f++}a[d]={left:0,top:u,row:f,width:p,height:i};c[c.length-1]+=p+r}));return h}_fitCols(t,n,e,i){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const c=this.columnSizes=[];const l=o-t;let h=r;let f=0;let u=0;let d=0;let p=0;this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:b}=Dl(e,n,s,t,i);if(o>0&&u+b+2*r>l){h+=f+r;c.push({width:f,height:u});d+=f+r;p++;f=u=0}a[o]={left:d,top:u,col:p,width:g,height:b};f=Math.max(f,g);u+=b+r}));h+=f;c.push({width:f,height:u});return h}adjustHitBoxes(){if(!this.options.display){return}const t=this._computeTitleHeight();const{legendHitBoxes:n,options:{align:e,labels:{padding:i},rtl:s}}=this;const o=Ss(s,this.left,this.width);if(this.isHorizontal()){let s=0;let r=Se(e,this.left+i,this.right-this.lineWidths[s]);for(const a of n){if(s!==a.row){s=a.row;r=Se(e,this.left+i,this.right-this.lineWidths[s])}a.top+=this.top+t+i;a.left=o.leftForLtr(o.x(r),a.width);r+=a.width+i}}else{let s=0;let r=Se(e,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const a of n){if(a.col!==s){s=a.col;r=Se(e,this.top+t+i,this.bottom-this.columnSizes[s].height)}a.top=r;a.left+=this.left+i;a.left=o.leftForLtr(o.x(a.left),a.width);r+=a.height+i}}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ai(t,this);this._draw();ci(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:e,ctx:i}=this;const{align:s,labels:o}=t;const r=Ge.color;const a=Ss(t.rtl,this.left,this.width);const c=_i(o.font);const{padding:l}=o;const h=c.size;const f=h/2;let u;this.drawTitle();i.textAlign=a.textAlign("left");i.textBaseline="middle";i.lineWidth=.5;i.font=c.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=zl(o,h);const b=function(t,n,e){if(isNaN(d)||d<=0||isNaN(p)||p<0){return}i.save();const s=wn(e.lineWidth,1);i.fillStyle=wn(e.fillStyle,r);i.lineCap=wn(e.lineCap,"butt");i.lineDashOffset=wn(e.lineDashOffset,0);i.lineJoin=wn(e.lineJoin,"miter");i.lineWidth=s;i.strokeStyle=wn(e.strokeStyle,r);i.setLineDash(wn(e.lineDash,[]));if(o.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:e.pointStyle,rotation:e.rotation,borderWidth:s};const c=a.xPlus(t,d/2);const l=n+f;oi(i,r,c,l,o.pointStyleWidth&&d)}else{const o=n+Math.max((h-p)/2,0);const r=a.leftForLtr(t,d);const c=Mi(e.borderRadius);i.beginPath();if(Object.values(c).some((t=>t!==0))){gi(i,{x:r,y:o,w:d,h:p,radius:c})}else{i.rect(r,o,d,p)}i.fill();if(s!==0){i.stroke()}}i.restore()};const m=function(t,n,e){pi(i,e.text,t,n+g/2,c,{strikethrough:e.hidden,textAlign:a.textAlign(e.textAlign)})};const w=this.isHorizontal();const x=this._computeTitleHeight();if(w){u={x:Se(s,this.left+l,this.right-e[0]),y:this.top+l+x,line:0}}else{u={x:this.left+l,y:Se(s,this.top+x+l,this.bottom-n[0].height),line:0}}zs(this.ctx,t.textDirection);const y=g+l;this.legendItems.forEach(((r,h)=>{i.strokeStyle=r.fontColor;i.fillStyle=r.fontColor;const p=i.measureText(r.text).width;const g=a.textAlign(r.textAlign||(r.textAlign=o.textAlign));const v=d+f+p;let M=u.x;let k=u.y;a.setWidth(this.width);if(w){if(h>0&&M+v+l>this.right){k=u.y+=y;u.line++;M=u.x=Se(s,this.left+l,this.right-e[u.line])}}else if(h>0&&k+y>this.bottom){M=u.x=M+n[u.line].width+l;u.line++;k=u.y=Se(s,this.top+x+l,this.bottom-n[u.line].height)}const _=a.x(M);b(_,k,r);M=ze(g,M+d+f,w?M+v:this.right,t.rtl);m(a.x(M),k,r);if(w){u.x+=v+l}else if(typeof r.text!=="string"){const t=c.lineHeight;u.y+=Pl(r,t)+l}else{u.y+=y}}));Os(this.ctx,t.textDirection)}drawTitle(){const t=this.options;const n=t.title;const e=_i(n.font);const i=ki(n.padding);if(!n.display){return}const s=Ss(t.rtl,this.left,this.width);const o=this.ctx;const r=n.position;const a=e.size/2;const c=i.top+a;let l;let h=this.left;let f=this.width;if(this.isHorizontal()){f=Math.max(...this.lineWidths);l=this.top+c;h=Se(t.align,h,this.right-f)}else{const n=this.columnSizes.reduce(((t,n)=>Math.max(t,n.height)),0);l=c+Se(t.align,this.top,this.bottom-n-t.labels.padding-this._computeTitleHeight())}const u=Se(r,h,h+f);o.textAlign=s.textAlign(_e(r));o.textBaseline="middle";o.strokeStyle=n.color;o.fillStyle=n.color;o.font=e.string;pi(o,n.text,u,l,e)}_computeTitleHeight(){const t=this.options.title;const n=_i(t.font);const e=ki(t.padding);return t.display?n.lineHeight+e.height:0}_getLegendItemAt(t,n){let e,i,s;if(ue(t,this.left,this.right)&&ue(n,this.top,this.bottom)){s=this.legendHitBoxes;for(e=0;e<s.length;++e){i=s[e];if(ue(t,i.left,i.left+i.width)&&ue(n,i.top,i.top+i.height)){return this.legendItems[e]}}}return null}handleEvent(t){const n=this.options;if(!El(t.type,n)){return}const e=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem;const s=Ol(i,e);if(i&&!s){vn(n.onLeave,[t,i,this],this)}this._hoveredItem=e;if(e&&!s){vn(n.onHover,[t,e,this],this)}}else if(e){vn(n.onClick,[t,e,this],this)}}}function Dl(t,n,e,i,s){const o=Al(i,t,n,e);const r=jl(s,i,n.lineHeight);return{itemWidth:o,itemHeight:r}}function Al(t,n,e,i){let s=t.text;if(s&&typeof s!=="string"){s=s.reduce(((t,n)=>t.length>n.length?t:n))}return n+e.size/2+i.measureText(s).width}function jl(t,n,e){let i=t;if(typeof n.text!=="string"){i=Pl(n,e)}return i}function Pl(t,n){const e=t.text?t.text.length:0;return n*e}function El(t,n){if((t==="mousemove"||t==="mouseout")&&(n.onHover||n.onLeave)){return true}if(n.onClick&&(t==="click"||t==="mouseup")){return true}return false}var Ll={id:"legend",_element:Cl,start(t,n,e){const i=t.legend=new Cl({ctx:t.ctx,options:e,chart:t});mr.configure(t,i,e);mr.addBox(t,i)},stop(t){mr.removeBox(t,t.legend);delete t.legend},beforeUpdate(t,n,e){const i=t.legend;mr.configure(t,i,e);i.options=e},afterUpdate(t){const n=t.legend;n.buildLabels();n.adjustHitBoxes()},afterEvent(t,n){if(!n.replay){t.legend.handleEvent(n.event)}},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,n,e){const i=n.datasetIndex;const s=e.chart;if(s.isDatasetVisible(i)){s.hide(i);n.hidden=true}else{s.show(i);n.hidden=false}},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const n=t.data.datasets;const{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const c=t.controller.getStyle(e?0:undefined);const l=ki(c.borderWidth);return{text:n[t.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Rl extends Br{constructor(t){super();this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this._padding=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n){const e=this.options;this.left=0;this.top=0;if(!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t;this.height=this.bottom=n;const i=pn(e.text)?e.text.length:1;this._padding=ki(e.padding);const s=i*_i(e.font).lineHeight+this._padding.height;if(this.isHorizontal()){this.height=s}else{this.width=s}}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:e,bottom:i,right:s,options:o}=this;const r=o.align;let a=0;let c,l,h;if(this.isHorizontal()){l=Se(r,e,s);h=n+t;c=s-e}else{if(o.position==="left"){l=e+t;h=Se(r,i,n);a=Fn*-.5}else{l=s-t;h=Se(r,n,i);a=Fn*.5}c=i-n}return{titleX:l,titleY:h,maxWidth:c,rotation:a}}draw(){const t=this.ctx;const n=this.options;if(!n.display){return}const e=_i(n.font);const i=e.lineHeight;const s=i/2+this._padding.top;const{titleX:o,titleY:r,maxWidth:a,rotation:c}=this._drawArgs(s);pi(t,n.text,0,0,e,{color:n.color,maxWidth:a,rotation:c,textAlign:_e(n.align),textBaseline:"middle",translation:[o,r]})}}function Nl(t,n){const e=new Rl({ctx:t.ctx,options:n,chart:t});mr.configure(t,e,n);mr.addBox(t,e);t.titleBlock=e}var Il={id:"title",_element:Rl,start(t,n,e){Nl(t,e)},stop(t){const n=t.titleBlock;mr.removeBox(t,n);delete t.titleBlock},beforeUpdate(t,n,e){const i=t.titleBlock;mr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Tl=new WeakMap;var Fl={id:"subtitle",start(t,n,e){const i=new Rl({ctx:t.ctx,options:e,chart:t});mr.configure(t,i,e);mr.addBox(t,i);Tl.set(t,i)},stop(t){mr.removeBox(t,Tl.get(t));Tl.delete(t)},beforeUpdate(t,n,e){const i=Tl.get(t);mr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"normal"},fullSize:true,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Wl={average(t){if(!t.length){return false}let n,e;let i=new Set;let s=0;let o=0;for(n=0,e=t.length;n<e;++n){const e=t[n].element;if(e&&e.hasValue()){const t=e.tooltipPosition();i.add(t.x);s+=t.y;++o}}if(o===0||i.size===0){return false}const r=[...i].reduce(((t,n)=>t+n))/i.size;return{x:r,y:s/o}},nearest(t,n){if(!t.length){return false}let e=n.x;let i=n.y;let s=Number.POSITIVE_INFINITY;let o,r,a;for(o=0,r=t.length;o<r;++o){const e=t[o].element;if(e&&e.hasValue()){const t=e.getCenterPoint();const i=re(n,t);if(i<s){s=i;a=e}}}if(a){const t=a.tooltipPosition();e=t.x;i=t.y}return{x:e,y:i}}};function Bl(t,n){if(n){if(pn(n)){Array.prototype.push.apply(t,n)}else{t.push(n)}}return t}function $l(t){if((typeof t==="string"||t instanceof String)&&t.indexOf("\n")>-1){return t.split("\n")}return t}function Hl(t,n){const{element:e,datasetIndex:i,index:s}=n;const o=t.getDatasetMeta(i).controller;const{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Yl(t,n){const e=t.chart.ctx;const{body:i,footer:s,title:o}=t;const{boxWidth:r,boxHeight:a}=n;const c=_i(n.bodyFont);const l=_i(n.titleFont);const h=_i(n.footerFont);const f=o.length;const u=s.length;const d=i.length;const p=ki(n.padding);let g=p.height;let b=0;let m=i.reduce(((t,n)=>t+n.before.length+n.lines.length+n.after.length),0);m+=t.beforeBody.length+t.afterBody.length;if(f){g+=f*l.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom}if(m){const t=n.displayColors?Math.max(a,c.lineHeight):c.lineHeight;g+=d*t+(m-d)*c.lineHeight+(m-1)*n.bodySpacing}if(u){g+=n.footerMarginTop+u*h.lineHeight+(u-1)*n.footerSpacing}let w=0;const x=function(t){b=Math.max(b,e.measureText(t).width+w)};e.save();e.font=l.string;Mn(t.title,x);e.font=c.string;Mn(t.beforeBody.concat(t.afterBody),x);w=n.displayColors?r+2+n.boxPadding:0;Mn(i,(t=>{Mn(t.before,x);Mn(t.lines,x);Mn(t.after,x)}));w=0;e.font=h.string;Mn(t.footer,x);e.restore();b+=p.width;return{width:b,height:g}}function Vl(t,n){const{y:e,height:i}=n;if(e<i/2){return"top"}else if(e>t.height-i/2){return"bottom"}return"center"}function Ul(t,n,e,i){const{x:s,width:o}=i;const r=e.caretSize+e.caretPadding;if(t==="left"&&s+o+r>n.width){return true}if(t==="right"&&s-o-r<0){return true}}function Xl(t,n,e,i){const{x:s,width:o}=e;const{width:r,chartArea:{left:a,right:c}}=t;let l="center";if(i==="center"){l=s<=(a+c)/2?"left":"right"}else if(s<=o/2){l="left"}else if(s>=r-o/2){l="right"}if(Ul(l,t,n,e)){l="center"}return l}function Kl(t,n,e){const i=e.yAlign||n.yAlign||Vl(t,e);return{xAlign:e.xAlign||n.xAlign||Xl(t,n,e,i),yAlign:i}}function Zl(t,n){let{x:e,width:i}=t;if(n==="right"){e-=i}else if(n==="center"){e-=i/2}return e}function ql(t,n,e){let{y:i,height:s}=t;if(n==="top"){i+=e}else if(n==="bottom"){i-=s+e}else{i-=s/2}return i}function Ql(t,n,e,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=t;const{xAlign:a,yAlign:c}=e;const l=s+o;const{topLeft:h,topRight:f,bottomLeft:u,bottomRight:d}=Mi(r);let p=Zl(n,a);const g=ql(n,c,l);if(c==="center"){if(a==="left"){p+=l}else if(a==="right"){p-=l}}else if(a==="left"){p-=Math.max(h,u)+s}else if(a==="right"){p+=Math.max(f,d)+s}return{x:he(p,0,i.width-n.width),y:he(g,0,i.height-n.height)}}function Gl(t,n,e){const i=ki(e.padding);return n==="center"?t.x+t.width/2:n==="right"?t.x+t.width-i.right:t.x+i.left}function Jl(t){return Bl([],$l(t))}function th(t,n,e){return Oi(t,{tooltip:n,tooltipItems:e,type:"tooltip"})}function nh(t,n){const e=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return e?t.override(e):t}const eh={beforeTitle:fn,title(t){if(t.length>0){const n=t[0];const e=n.chart.data.labels;const i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset"){return n.dataset.label||""}else if(n.label){return n.label}else if(i>0&&n.dataIndex<i){return e[n.dataIndex]}}return""},afterTitle:fn,beforeBody:fn,beforeLabel:fn,label(t){if(this&&this.options&&this.options.mode==="dataset"){return t.label+": "+t.formattedValue||t.formattedValue}let n=t.dataset.label||"";if(n){n+=": "}const e=t.formattedValue;if(!dn(e)){n+=e}return n},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.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(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:fn,afterBody:fn,beforeFooter:fn,footer:fn,afterFooter:fn};function ih(t,n,e,i){const s=t[n].call(e,i);if(typeof s==="undefined"){return eh[n].call(e,i)}return s}class sh extends Br{static positioners=Wl;constructor(t){super();this.opacity=0;this._active=[];this._eventPosition=undefined;this._size=undefined;this._cachedAnimations=undefined;this._tooltipItems=[];this.$animations=undefined;this.$context=undefined;this.chart=t.chart;this.options=t.options;this.dataPoints=undefined;this.title=undefined;this.beforeBody=undefined;this.body=undefined;this.afterBody=undefined;this.footer=undefined;this.xAlign=undefined;this.yAlign=undefined;this.x=undefined;this.y=undefined;this.height=undefined;this.width=undefined;this.caretX=undefined;this.caretY=undefined;this.labelColors=undefined;this.labelPointStyles=undefined;this.labelTextColors=undefined}initialize(t){this.options=t;this._cachedAnimations=undefined;this.$context=undefined}_resolveAnimations(){const t=this._cachedAnimations;if(t){return t}const n=this.chart;const e=this.options.setContext(this.getContext());const i=e.enabled&&n.options.animation&&e.animations;const s=new Ks(this.chart,i);if(i._cacheable){this._cachedAnimations=Object.freeze(s)}return s}getContext(){return this.$context||(this.$context=th(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:e}=n;const i=ih(e,"beforeTitle",this,t);const s=ih(e,"title",this,t);const o=ih(e,"afterTitle",this,t);let r=[];r=Bl(r,$l(i));r=Bl(r,$l(s));r=Bl(r,$l(o));return r}getBeforeBody(t,n){return Jl(ih(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:e}=n;const i=[];Mn(t,(t=>{const n={before:[],lines:[],after:[]};const s=nh(e,t);Bl(n.before,$l(ih(s,"beforeLabel",this,t)));Bl(n.lines,ih(s,"label",this,t));Bl(n.after,$l(ih(s,"afterLabel",this,t)));i.push(n)}));return i}getAfterBody(t,n){return Jl(ih(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:e}=n;const i=ih(e,"beforeFooter",this,t);const s=ih(e,"footer",this,t);const o=ih(e,"afterFooter",this,t);let r=[];r=Bl(r,$l(i));r=Bl(r,$l(s));r=Bl(r,$l(o));return r}_createItems(t){const n=this._active;const e=this.chart.data;const i=[];const s=[];const o=[];let r=[];let a,c;for(a=0,c=n.length;a<c;++a){r.push(Hl(this.chart,n[a]))}if(t.filter){r=r.filter(((n,i,s)=>t.filter(n,i,s,e)))}if(t.itemSort){r=r.sort(((n,i)=>t.itemSort(n,i,e)))}Mn(r,(n=>{const e=nh(t.callbacks,n);i.push(ih(e,"labelColor",this,n));s.push(ih(e,"labelPointStyle",this,n));o.push(ih(e,"labelTextColor",this,n))}));this.labelColors=i;this.labelPointStyles=s;this.labelTextColors=o;this.dataPoints=r;return r}update(t,n){const e=this.options.setContext(this.getContext());const i=this._active;let s;let o=[];if(!i.length){if(this.opacity!==0){s={opacity:0}}}else{const t=Wl[e.position].call(this,i,this._eventPosition);o=this._createItems(e);this.title=this.getTitle(o,e);this.beforeBody=this.getBeforeBody(o,e);this.body=this.getBody(o,e);this.afterBody=this.getAfterBody(o,e);this.footer=this.getFooter(o,e);const n=this._size=Yl(this,e);const r=Object.assign({},t,n);const a=Kl(this.chart,e,r);const c=Ql(e,r,a,this.chart);this.xAlign=a.xAlign;this.yAlign=a.yAlign;s={opacity:1,x:c.x,y:c.y,width:n.width,height:n.height,caretX:t.x,caretY:t.y}}this._tooltipItems=o;this.$context=undefined;if(s){this._resolveAnimations().update(this,s)}if(t&&e.external){e.external.call(this,{chart:this.chart,tooltip:this,replay:n})}}drawCaret(t,n,e,i){const s=this.getCaretPosition(t,e,i);n.lineTo(s.x1,s.y1);n.lineTo(s.x2,s.y2);n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,e){const{xAlign:i,yAlign:s}=this;const{caretSize:o,cornerRadius:r}=e;const{topLeft:a,topRight:c,bottomLeft:l,bottomRight:h}=Mi(r);const{x:f,y:u}=t;const{width:d,height:p}=n;let g,b,m,w,x,y;if(s==="center"){x=u+p/2;if(i==="left"){g=f;b=g-o;w=x+o;y=x-o}else{g=f+d;b=g+o;w=x-o;y=x+o}m=g}else{if(i==="left"){b=f+Math.max(a,l)+o}else if(i==="right"){b=f+d-Math.max(c,h)-o}else{b=this.caretX}if(s==="top"){w=u;x=w-o;g=b-o;m=b+o}else{w=u+p;x=w+o;g=b+o;m=b-o}y=w}return{x1:g,x2:b,x3:m,y1:w,y2:x,y3:y}}drawTitle(t,n,e){const i=this.title;const s=i.length;let o,r,a;if(s){const c=Ss(e.rtl,this.x,this.width);t.x=Gl(this,e.titleAlign,e);n.textAlign=c.textAlign(e.titleAlign);n.textBaseline="middle";o=_i(e.titleFont);r=e.titleSpacing;n.fillStyle=e.titleColor;n.font=o.string;for(a=0;a<s;++a){n.fillText(i[a],c.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+r;if(a+1===s){t.y+=e.titleMarginBottom-r}}}}_drawColorBox(t,n,e,i,s){const o=this.labelColors[e];const r=this.labelPointStyles[e];const{boxHeight:a,boxWidth:c}=s;const l=_i(s.bodyFont);const h=Gl(this,"left",s);const f=i.x(h);const u=a<l.lineHeight?(l.lineHeight-a)/2:0;const d=n.y+u;if(s.usePointStyle){const n={radius:Math.min(c,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1};const e=i.leftForLtr(f,c)+c/2;const l=d+a/2;t.strokeStyle=s.multiKeyBackground;t.fillStyle=s.multiKeyBackground;si(t,n,e,l);t.strokeStyle=o.borderColor;t.fillStyle=o.backgroundColor;si(t,n,e,l)}else{t.lineWidth=gn(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1;t.strokeStyle=o.borderColor;t.setLineDash(o.borderDash||[]);t.lineDashOffset=o.borderDashOffset||0;const n=i.leftForLtr(f,c);const e=i.leftForLtr(i.xPlus(f,1),c-2);const r=Mi(o.borderRadius);if(Object.values(r).some((t=>t!==0))){t.beginPath();t.fillStyle=s.multiKeyBackground;gi(t,{x:n,y:d,w:c,h:a,radius:r});t.fill();t.stroke();t.fillStyle=o.backgroundColor;t.beginPath();gi(t,{x:e,y:d+1,w:c-2,h:a-2,radius:r});t.fill()}else{t.fillStyle=s.multiKeyBackground;t.fillRect(n,d,c,a);t.strokeRect(n,d,c,a);t.fillStyle=o.backgroundColor;t.fillRect(e,d+1,c-2,a-2)}}t.fillStyle=this.labelTextColors[e]}drawBody(t,n,e){const{body:i}=this;const{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:c,boxPadding:l}=e;const h=_i(e.bodyFont);let f=h.lineHeight;let u=0;const d=Ss(e.rtl,this.x,this.width);const p=function(e){n.fillText(e,d.x(t.x+u),t.y+f/2);t.y+=f+s};const g=d.textAlign(o);let b,m,w,x,y,v,M;n.textAlign=o;n.textBaseline="middle";n.font=h.string;t.x=Gl(this,g,e);n.fillStyle=e.bodyColor;Mn(this.beforeBody,p);u=r&&g!=="right"?o==="center"?c/2+l:c+2+l:0;for(x=0,v=i.length;x<v;++x){b=i[x];m=this.labelTextColors[x];n.fillStyle=m;Mn(b.before,p);w=b.lines;if(r&&w.length){this._drawColorBox(n,t,x,d,e);f=Math.max(h.lineHeight,a)}for(y=0,M=w.length;y<M;++y){p(w[y]);f=h.lineHeight}Mn(b.after,p)}u=0;f=h.lineHeight;Mn(this.afterBody,p);t.y-=s}drawFooter(t,n,e){const i=this.footer;const s=i.length;let o,r;if(s){const a=Ss(e.rtl,this.x,this.width);t.x=Gl(this,e.footerAlign,e);t.y+=e.footerMarginTop;n.textAlign=a.textAlign(e.footerAlign);n.textBaseline="middle";o=_i(e.footerFont);n.fillStyle=e.footerColor;n.font=o.string;for(r=0;r<s;++r){n.fillText(i[r],a.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+e.footerSpacing}}}drawBackground(t,n,e,i){const{xAlign:s,yAlign:o}=this;const{x:r,y:a}=t;const{width:c,height:l}=e;const{topLeft:h,topRight:f,bottomLeft:u,bottomRight:d}=Mi(i.cornerRadius);n.fillStyle=i.backgroundColor;n.strokeStyle=i.borderColor;n.lineWidth=i.borderWidth;n.beginPath();n.moveTo(r+h,a);if(o==="top"){this.drawCaret(t,n,e,i)}n.lineTo(r+c-f,a);n.quadraticCurveTo(r+c,a,r+c,a+f);if(o==="center"&&s==="right"){this.drawCaret(t,n,e,i)}n.lineTo(r+c,a+l-d);n.quadraticCurveTo(r+c,a+l,r+c-d,a+l);if(o==="bottom"){this.drawCaret(t,n,e,i)}n.lineTo(r+u,a+l);n.quadraticCurveTo(r,a+l,r,a+l-u);if(o==="center"&&s==="left"){this.drawCaret(t,n,e,i)}n.lineTo(r,a+h);n.quadraticCurveTo(r,a,r+h,a);n.closePath();n.fill();if(i.borderWidth>0){n.stroke()}}_updateAnimationTarget(t){const n=this.chart;const e=this.$animations;const i=e&&e.x;const s=e&&e.y;if(i||s){const e=Wl[t.position].call(this,this._active,this._eventPosition);if(!e){return}const o=this._size=Yl(this,t);const r=Object.assign({},e,this._size);const a=Kl(n,t,r);const c=Ql(t,r,a,n);if(i._to!==c.x||s._to!==c.y){this.xAlign=a.xAlign;this.yAlign=a.yAlign;this.width=o.width;this.height=o.height;this.caretX=e.x;this.caretY=e.y;this._resolveAnimations().update(this,c)}}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let e=this.opacity;if(!e){return}this._updateAnimationTarget(n);const i={width:this.width,height:this.height};const s={x:this.x,y:this.y};e=Math.abs(e)<.001?0:e;const o=ki(n.padding);const r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;if(n.enabled&&r){t.save();t.globalAlpha=e;this.drawBackground(s,t,i,n);zs(t,n.textDirection);s.y+=o.top;this.drawTitle(s,t,n);this.drawBody(s,t,n);this.drawFooter(s,t,n);Os(t,n.textDirection);t.restore()}}getActiveElements(){return this._active||[]}setActiveElements(t,n){const e=this._active;const i=t.map((({datasetIndex:t,index:n})=>{const e=this.chart.getDatasetMeta(t);if(!e){throw new Error("Cannot find a dataset at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const s=!kn(e,i);const o=this._positionChanged(i,n);if(s||o){this._active=i;this._eventPosition=n;this._ignoreReplayEvents=true;this.update(true)}}handleEvent(t,n,e=true){if(n&&this._ignoreReplayEvents){return false}this._ignoreReplayEvents=false;const i=this.options;const s=this._active||[];const o=this._getActiveElements(t,s,n,e);const r=this._positionChanged(o,t);const a=n||!kn(o,s)||r;if(a){this._active=o;if(i.enabled||i.external){this._eventPosition={x:t.x,y:t.y};this.update(true,n)}}return a}_getActiveElements(t,n,e,i){const s=this.options;if(t.type==="mouseout"){return[]}if(!i){return n.filter((t=>this.chart.data.datasets[t.datasetIndex]&&this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)!==undefined))}const o=this.chart.getElementsAtEventForMode(t,s.mode,s,e);if(s.reverse){o.reverse()}return o}_positionChanged(t,n){const{caretX:e,caretY:i,options:s}=this;const o=Wl[s.position].call(this,t,n);return o!==false&&(e!==o.x||i!==o.y)}}var oh={id:"tooltip",_element:sh,positioners:Wl,afterInit(t,n,e){if(e){t.tooltip=new sh({chart:t,options:e})}},beforeUpdate(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},reset(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},afterDraw(t){const n=t.tooltip;if(n&&n._willRender()){const e={tooltip:n};if(t.notifyPlugins("beforeTooltipDraw",{...e,cancelable:true})===false){return}n.draw(t.ctx);t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,n){if(t.tooltip){const e=n.replay;if(t.tooltip.handleEvent(n.event,e,n.inChartArea)){n.changed=true}}},defaults:{enabled:true,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:(t,n)=>n.bodyFont.size,boxWidth:(t,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,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:eh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var rh=Object.freeze({__proto__:null,Colors:Hc,Decimation:Zc,Filler:Sl,Legend:Ll,SubTitle:Fl,Title:Il,Tooltip:oh});const ah=(t,n,e,i)=>{if(typeof n==="string"){e=t.push(n)-1;i.unshift({index:e,label:n})}else if(isNaN(n)){e=null}return e};function ch(t,n,e,i){const s=t.indexOf(n);if(s===-1){return ah(t,n,e,i)}const o=t.lastIndexOf(n);return s!==o?e:s}const lh=(t,n)=>t===null?null:he(Math.round(t),0,n);function hh(t){const n=this.getLabels();if(t>=0&&t<n.length){return n[t]}return t}class fh extends aa{static id="category";static defaults={ticks:{callback:hh}};constructor(t){super(t);this._startValue=undefined;this._valueRange=0;this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const t=this.getLabels();for(const{index:e,label:i}of n){if(t[e]===i){t.splice(e,1)}}this._addedLabels=[]}super.init(t)}parse(t,n){if(dn(t)){return null}const e=this.getLabels();n=isFinite(n)&&e[n]===t?n:ch(e,t,wn(n,t),this._addedLabels);return lh(n,e.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:e,max:i}=this.getMinMax(true);if(this.options.bounds==="ticks"){if(!t){e=0}if(!n){i=this.getLabels().length-1}}this.min=e;this.max=i}buildTicks(){const t=this.min;const n=this.max;const e=this.options.offset;const i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1);this._valueRange=Math.max(s.length-(e?0:1),1);this._startValue=this.min-(e?.5:0);for(let e=t;e<=n;e++){i.push({value:e})}return i}getLabelForValue(t){return hh.call(this,t)}configure(){super.configure();if(!this.isHorizontal()){this._reversePixels=!this._reversePixels}}getPixelForValue(t){if(typeof t!=="number"){t=this.parse(t)}return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function uh(t,n){const e=[];const i=1e-14;const{bounds:s,step:o,min:r,max:a,precision:c,count:l,maxTicks:h,maxDigits:f,includeBounds:u}=t;const d=o||1;const p=h-1;const{min:g,max:b}=n;const m=!dn(r);const w=!dn(a);const x=!dn(l);const y=(b-g)/(f+1);let v=qn((b-g)/p/d)*d;let M,k,_,S;if(v<i&&!m&&!w){return[{value:g},{value:b}]}S=Math.ceil(b/v)-Math.floor(g/v);if(S>p){v=qn(S*v/p/d)*d}if(!dn(c)){M=Math.pow(10,c);v=Math.ceil(v*M)/M}if(s==="ticks"){k=Math.floor(g/v)*v;_=Math.ceil(b/v)*v}else{k=g;_=b}if(m&&w&&o&&te((a-r)/o,v/1e3)){S=Math.round(Math.min((a-r)/v,h));v=(a-r)/S;k=r;_=a}else if(x){k=m?r:k;_=w?a:_;S=l-1;v=(_-k)/S}else{S=(_-k)/v;if(Zn(S,Math.round(S),v/1e3)){S=Math.round(S)}else{S=Math.ceil(S)}}const z=Math.max(se(v),se(k));M=Math.pow(10,dn(c)?z:c);k=Math.round(k*M)/M;_=Math.round(_*M)/M;let O=0;if(m){if(u&&k!==r){e.push({value:r});if(k<r){O++}if(Zn(Math.round((k+O*v)*M)/M,r,dh(r,y,t))){O++}}else if(k<r){O++}}for(;O<S;++O){const t=Math.round((k+O*v)*M)/M;if(w&&t>a){break}e.push({value:t})}if(w&&u&&_!==a){if(e.length&&Zn(e[e.length-1].value,a,dh(a,y,t))){e[e.length-1].value=a}else{e.push({value:a})}}else if(!w||_===a){e.push({value:_})}return e}function dh(t,n,{horizontal:e,minRotation:i}){const s=ee(i);const o=(e?Math.sin(s):Math.cos(s))||.001;const r=.75*n*(""+t).length;return Math.min(n/o,r)}class ph extends aa{constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._endValue=undefined;this._valueRange=0}parse(t,n){if(dn(t)){return null}if((typeof t==="number"||t instanceof Number)&&!isFinite(+t)){return null}return+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options;const{minDefined:n,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this;const o=t=>i=n?i:t;const r=t=>s=e?s:t;if(t){const t=Kn(i);const n=Kn(s);if(t<0&&n<0){r(0)}else if(t>0&&n>0){o(0)}}if(i===s){let n=s===0?1:Math.abs(s*.05);r(s+n);if(!t){o(i-n)}}this.min=i;this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:e}=t;let i;if(e){i=Math.ceil(this.max/e)-Math.floor(this.min/e)+1;if(i>1e3){console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${i} ticks. Limiting to 1000.`);i=1e3}}else{i=this.computeTickLimit();n=n||11}if(n){i=Math.min(n,i)}return i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options;const n=t.ticks;let e=this.getTickLimit();e=Math.max(2,e);const i={maxTicks:e,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==false};const s=this._range||this;const o=uh(i,s);if(t.bounds==="ticks"){ne(o,this,"value")}if(t.reverse){o.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return o}configure(){const t=this.ticks;let n=this.min;let e=this.max;super.configure();if(this.options.offset&&t.length){const i=(e-n)/Math.max(t.length-1,1)/2;n-=i;e+=i}this._startValue=n;this._endValue=e;this._valueRange=e-n}getLabelForValue(t){return $e(t,this.chart.options.locale,this.options.ticks.format)}}class gh extends ph{static id="linear";static defaults={ticks:{callback:Ve.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=bn(t)?t:0;this.max=bn(n)?n:1;this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal();const n=t?this.width:this.height;const e=ee(this.options.ticks.minRotation);const i=(t?Math.sin(e):Math.cos(e))||.001;const s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const bh=t=>Math.floor(Xn(t));const mh=(t,n)=>Math.pow(10,bh(t)+n);function wh(t){const n=t/Math.pow(10,bh(t));return n===1}function xh(t,n,e){const i=Math.pow(10,e);const s=Math.floor(t/i);const o=Math.ceil(n/i);return o-s}function yh(t,n){const e=n-t;let i=bh(e);while(xh(t,n,i)>10){i++}while(xh(t,n,i)<10){i--}return Math.min(i,bh(t))}function vh(t,{min:n,max:e}){n=mn(t.min,n);const i=[];const s=bh(n);let o=yh(n,e);let r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o);const c=s>o?Math.pow(10,s):0;const l=Math.round((n-c)*r)/r;const h=Math.floor((n-c)/a/10)*a*10;let f=Math.floor((l-h)/Math.pow(10,o));let u=mn(t.min,Math.round((c+h+f*Math.pow(10,o))*r)/r);while(u<e){i.push({value:u,major:wh(u),significand:f});if(f>=10){f=f<15?15:20}else{f++}if(f>=20){o++;f=2;r=o>=0?1:r}u=Math.round((c+h+f*Math.pow(10,o))*r)/r}const d=mn(t.max,u);i.push({value:d,major:wh(d),significand:f});return i}class Mh extends aa{static id="logarithmic";static defaults={ticks:{callback:Ve.formatters.logarithmic,major:{enabled:true}}};constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._valueRange=0}parse(t,n){const e=ph.prototype.parse.apply(this,[t,n]);if(e===0){this._zero=true;return undefined}return bn(e)&&e>0?e:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=bn(t)?Math.max(0,t):null;this.max=bn(n)?Math.max(0,n):null;if(this.options.beginAtZero){this._zero=true}if(this._zero&&this.min!==this._suggestedMin&&!bn(this._userMin)){this.min=t===mh(this.min,0)?mh(this.min,-1):mh(this.min,0)}this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let e=this.min;let i=this.max;const s=n=>e=t?e:n;const o=t=>i=n?i:t;if(e===i){if(e<=0){s(1);o(10)}else{s(mh(e,-1));o(mh(i,1))}}if(e<=0){s(mh(i,-1))}if(i<=0){o(mh(e,1))}this.min=e;this.max=i}buildTicks(){const t=this.options;const n={min:this._userMin,max:this._userMax};const e=vh(n,this);if(t.bounds==="ticks"){ne(e,this,"value")}if(t.reverse){e.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return e}getLabelForValue(t){return t===undefined?"0":$e(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure();this._startValue=Xn(t);this._valueRange=Xn(this.max)-Xn(t)}getPixelForValue(t){if(t===undefined||t===0){t=this.min}if(t===null||isNaN(t)){return NaN}return this.getPixelForDecimal(t===this.min?0:(Xn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}function kh(t){const n=t.ticks;if(n.display&&t.display){const t=ki(n.backdropPadding);return wn(n.font&&n.font.size,Ge.font.size)+t.height}return 0}function _h(t,n,e){e=pn(e)?e:[e];return{w:ni(t,n.string,e),h:e.length*n.lineHeight}}function Sh(t,n,e,i,s){if(t===i||t===s){return{start:n-e/2,end:n+e/2}}else if(t<i||t>s){return{start:n-e,end:n}}return{start:n,end:n+e}}function zh(t){const n={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom};const e=Object.assign({},n);const i=[];const s=[];const o=t._pointLabels.length;const r=t.options.pointLabels;const a=r.centerPointLabels?Fn/o:0;for(let c=0;c<o;c++){const o=r.setContext(t.getPointLabelContext(c));s[c]=o.padding;const l=t.getPointPosition(c,t.drawingArea+s[c],a);const h=_i(o.font);const f=_h(t.ctx,h,t._pointLabels[c]);i[c]=f;const u=ce(t.getIndexAngle(c)+a);const d=Math.round(ie(u));const p=Sh(d,l.x,f.w,0,180);const g=Sh(d,l.y,f.h,90,270);Oh(e,n,u,p,g)}t.setCenterPoint(n.l-e.l,e.r-n.r,n.t-e.t,e.b-n.b);t._pointLabelItems=Ah(t,i,s)}function Oh(t,n,e,i,s){const o=Math.abs(Math.sin(e));const r=Math.abs(Math.cos(e));let a=0;let c=0;if(i.start<n.l){a=(n.l-i.start)/o;t.l=Math.min(t.l,n.l-a)}else if(i.end>n.r){a=(i.end-n.r)/o;t.r=Math.max(t.r,n.r+a)}if(s.start<n.t){c=(n.t-s.start)/r;t.t=Math.min(t.t,n.t-c)}else if(s.end>n.b){c=(s.end-n.b)/r;t.b=Math.max(t.b,n.b+c)}}function Ch(t,n,e){const i=t.drawingArea;const{extra:s,additionalAngle:o,padding:r,size:a}=e;const c=t.getPointPosition(n,i+s+r,o);const l=Math.round(ie(ce(c.angle+Yn)));const h=Eh(c.y,a.h,l);const f=jh(l);const u=Ph(c.x,a.w,f);return{visible:true,x:c.x,y:h,textAlign:f,left:u,top:h,right:u+a.w,bottom:h+a.h}}function Dh(t,n){if(!n){return true}const{left:e,top:i,right:s,bottom:o}=t;const r=ri({x:e,y:i},n)||ri({x:e,y:o},n)||ri({x:s,y:i},n)||ri({x:s,y:o},n);return!r}function Ah(t,n,e){const i=[];const s=t._pointLabels.length;const o=t.options;const{centerPointLabels:r,display:a}=o.pointLabels;const c={extra:kh(o)/2,additionalAngle:r?Fn/s:0};let l;for(let o=0;o<s;o++){c.padding=e[o];c.size=n[o];const s=Ch(t,o,c);i.push(s);if(a==="auto"){s.visible=Dh(s,l);if(s.visible){l=s}}}return i}function jh(t){if(t===0||t===180){return"center"}else if(t<180){return"left"}return"right"}function Ph(t,n,e){if(e==="right"){t-=n}else if(e==="center"){t-=n/2}return t}function Eh(t,n,e){if(e===90||e===270){t-=n/2}else if(e>270||e<90){t-=n}return t}function Lh(t,n,e){const{left:i,top:s,right:o,bottom:r}=e;const{backdropColor:a}=n;if(!dn(a)){const e=Mi(n.borderRadius);const c=ki(n.backdropPadding);t.fillStyle=a;const l=i-c.left;const h=s-c.top;const f=o-i+c.width;const u=r-s+c.height;if(Object.values(e).some((t=>t!==0))){t.beginPath();gi(t,{x:l,y:h,w:f,h:u,radius:e});t.fill()}else{t.fillRect(l,h,f,u)}}}function Rh(t,n){const{ctx:e,options:{pointLabels:i}}=t;for(let s=n-1;s>=0;s--){const n=t._pointLabelItems[s];if(!n.visible){continue}const o=i.setContext(t.getPointLabelContext(s));Lh(e,o,n);const r=_i(o.font);const{x:a,y:c,textAlign:l}=n;pi(e,t._pointLabels[s],a,c+r.lineHeight/2,r,{color:o.color,textAlign:l,textBaseline:"middle"})}}function Nh(t,n,e,i){const{ctx:s}=t;if(e){s.arc(t.xCenter,t.yCenter,n,0,Wn)}else{let e=t.getPointPosition(0,n);s.moveTo(e.x,e.y);for(let o=1;o<i;o++){e=t.getPointPosition(o,n);s.lineTo(e.x,e.y)}}}function Ih(t,n,e,i,s){const o=t.ctx;const r=n.circular;const{color:a,lineWidth:c}=n;if(!r&&!i||!a||!c||e<0){return}o.save();o.strokeStyle=a;o.lineWidth=c;o.setLineDash(s.dash||[]);o.lineDashOffset=s.dashOffset;o.beginPath();Nh(t,e,r,i);o.closePath();o.stroke();o.restore()}function Th(t,n,e){return Oi(t,{label:e,index:n,type:"pointLabel"})}class Fh extends ph{static id="radialLinear";static defaults={display:true,animate:true,position:"chartArea",angleLines:{display:true,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:false},startAngle:0,ticks:{showLabelBackdrop:true,callback:Ve.formatters.numeric},pointLabels:{backdropColor:undefined,backdropPadding:2,display:true,font:{size:10},callback(t){return t},padding:5,centerPointLabels:false}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t);this.xCenter=undefined;this.yCenter=undefined;this.drawingArea=undefined;this._pointLabels=[];this._pointLabelItems=[]}setDimensions(){const t=this._padding=ki(kh(this.options)/2);const n=this.width=this.maxWidth-t.width;const e=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left);this.yCenter=Math.floor(this.top+e/2+t.top);this.drawingArea=Math.floor(Math.min(n,e)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(false);this.min=bn(t)&&!isNaN(t)?t:0;this.max=bn(n)&&!isNaN(n)?n:0;this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/kh(this.options))}generateTickLabels(t){ph.prototype.generateTickLabels.call(this,t);this._pointLabels=this.getLabels().map(((t,n)=>{const e=vn(this.options.pointLabels.callback,[t,n],this);return e||e===0?e:""})).filter(((t,n)=>this.chart.getDataVisibility(n)))}fit(){const t=this.options;if(t.display&&t.pointLabels.display){zh(this)}else{this.setCenterPoint(0,0,0,0)}}setCenterPoint(t,n,e,i){this.xCenter+=Math.floor((t-n)/2);this.yCenter+=Math.floor((e-i)/2);this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,e,i))}getIndexAngle(t){const n=Wn/(this._pointLabels.length||1);const e=this.options.startAngle||0;return ce(t*n+ee(e))}getDistanceFromCenterForValue(t){if(dn(t)){return NaN}const n=this.drawingArea/(this.max-this.min);if(this.options.reverse){return(this.max-t)*n}return(t-this.min)*n}getValueForDistanceFromCenter(t){if(dn(t)){return NaN}const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const e=n[t];return Th(this.getContext(),t,e)}}getPointPosition(t,n,e=0){const i=this.getIndexAngle(t)-Yn+e;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:e,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:e,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const e=this.ctx;e.save();e.beginPath();Nh(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length);e.closePath();e.fillStyle=t;e.fill();e.restore()}}drawGrid(){const t=this.ctx;const n=this.options;const{angleLines:e,grid:i,border:s}=n;const o=this._pointLabels.length;let r,a,c;if(n.pointLabels.display){Rh(this,o)}if(i.display){this.ticks.forEach(((t,n)=>{if(n!==0||n===0&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const e=this.getContext(n);const r=i.setContext(e);const c=s.setContext(e);Ih(this,r,a,o,c)}}))}if(e.display){t.save();for(r=o-1;r>=0;r--){const i=e.setContext(this.getPointLabelContext(r));const{color:s,lineWidth:o}=i;if(!o||!s){continue}t.lineWidth=o;t.strokeStyle=s;t.setLineDash(i.borderDash);t.lineDashOffset=i.borderDashOffset;a=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max);c=this.getPointPosition(r,a);t.beginPath();t.moveTo(this.xCenter,this.yCenter);t.lineTo(c.x,c.y);t.stroke()}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx;const n=this.options;const e=n.ticks;if(!e.display){return}const i=this.getIndexAngle(0);let s,o;t.save();t.translate(this.xCenter,this.yCenter);t.rotate(i);t.textAlign="center";t.textBaseline="middle";this.ticks.forEach(((i,r)=>{if(r===0&&this.min>=0&&!n.reverse){return}const a=e.setContext(this.getContext(r));const c=_i(a.font);s=this.getDistanceFromCenterForValue(this.ticks[r].value);if(a.showLabelBackdrop){t.font=c.string;o=t.measureText(i.label).width;t.fillStyle=a.backdropColor;const n=ki(a.backdropPadding);t.fillRect(-o/2-n.left,-s-c.size/2-n.top,o+n.width,c.size+n.height)}pi(t,i.label,0,-s,c,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})}));t.restore()}drawTitle(){}}const Wh={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}};const Bh=Object.keys(Wh);function $h(t,n){return t-n}function Hh(t,n){if(dn(n)){return null}const e=t._adapter;const{parser:i,round:s,isoWeekday:o}=t._parseOpts;let r=n;if(typeof i==="function"){r=i(r)}if(!bn(r)){r=typeof i==="string"?e.parse(r,i):e.parse(r)}if(r===null){return null}if(s){r=s==="week"&&(Jn(o)||o===true)?e.startOf(r,"isoWeek",o):e.startOf(r,s)}return+r}function Yh(t,n,e,i){const s=Bh.length;for(let o=Bh.indexOf(t);o<s-1;++o){const t=Wh[Bh[o]];const s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((e-n)/(s*t.size))<=i){return Bh[o]}}return Bh[s-1]}function Vh(t,n,e,i,s){for(let o=Bh.length-1;o>=Bh.indexOf(e);o--){const e=Bh[o];if(Wh[e].common&&t._adapter.diff(s,i,e)>=n-1){return e}}return Bh[e?Bh.indexOf(e):0]}function Uh(t){for(let n=Bh.indexOf(t)+1,e=Bh.length;n<e;++n){if(Wh[Bh[n]].common){return Bh[n]}}}function Xh(t,n,e){if(!e){t[n]=true}else if(e.length){const{lo:i,hi:s}=de(e,n);const o=e[i]>=n?e[i]:e[s];t[o]=true}}function Kh(t,n,e,i){const s=t._adapter;const o=+s.startOf(n[0].value,i);const r=n[n.length-1].value;let a,c;for(a=o;a<=r;a=+s.add(a,1,i)){c=e[a];if(c>=0){n[c].major=true}}return n}function Zh(t,n,e){const i=[];const s={};const o=n.length;let r,a;for(r=0;r<o;++r){a=n[r];s[a]=r;i.push({value:a,major:false})}return o===0||!e?i:Kh(t,i,s,e)}class qh extends aa{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:false,major:{enabled:false}}};constructor(t){super(t);this._cache={data:[],labels:[],all:[]};this._unit="day";this._majorUnit=undefined;this._offsets={};this._normalized=false;this._parseOpts=undefined}init(t,n={}){const e=t.time||(t.time={});const i=this._adapter=new Vo._date(t.adapters.date);i.init(n);Cn(e.displayFormats,i.formats());this._parseOpts={parser:e.parser,round:e.round,isoWeekday:e.isoWeekday};super.init(t);this._normalized=n.normalized}parse(t,n){if(t===undefined){return null}return Hh(this,t)}beforeLayout(){super.beforeLayout();this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options;const n=this._adapter;const e=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){if(!o&&!isNaN(t.min)){i=Math.min(i,t.min)}if(!r&&!isNaN(t.max)){s=Math.max(s,t.max)}}if(!o||!r){a(this._getLabelBounds());if(t.bounds!=="ticks"||t.ticks.source!=="labels"){a(this.getMinMax(false))}}i=bn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),e);s=bn(s)&&!isNaN(s)?s:+n.endOf(Date.now(),e)+1;this.min=Math.min(i,s-1);this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY;let e=Number.NEGATIVE_INFINITY;if(t.length){n=t[0];e=t[t.length-1]}return{min:n,max:e}}buildTicks(){const t=this.options;const n=t.time;const e=t.ticks;const i=e.source==="labels"?this.getLabelTimestamps():this._generate();if(t.bounds==="ticks"&&i.length){this.min=this._userMin||i[0];this.max=this._userMax||i[i.length-1]}const s=this.min;const o=this.max;const r=be(i,s,o);this._unit=n.unit||(e.autoSkip?Yh(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Vh(this,r.length,n.minUnit,this.min,this.max));this._majorUnit=!e.major.enabled||this._unit==="year"?undefined:Uh(this._unit);this.initOffsets(i);if(t.reverse){r.reverse()}return Zh(this,r,this._majorUnit)}afterAutoSkip(){if(this.options.offsetAfterAutoskip){this.initOffsets(this.ticks.map((t=>+t.value)))}}initOffsets(t=[]){let n=0;let e=0;let i,s;if(this.options.offset&&t.length){i=this.getDecimalForValue(t[0]);if(t.length===1){n=1-i}else{n=(this.getDecimalForValue(t[1])-i)/2}s=this.getDecimalForValue(t[t.length-1]);if(t.length===1){e=s}else{e=(s-this.getDecimalForValue(t[t.length-2]))/2}}const o=t.length<3?.5:.25;n=he(n,0,o);e=he(e,0,o);this._offsets={start:n,end:e,factor:1/(n+1+e)}}_generate(){const t=this._adapter;const n=this.min;const e=this.max;const i=this.options;const s=i.time;const o=s.unit||Yh(s.minUnit,n,e,this._getLabelCapacity(n));const r=wn(i.ticks.stepSize,1);const a=o==="week"?s.isoWeekday:false;const c=Jn(a)||a===true;const l={};let h=n;let f,u;if(c){h=+t.startOf(h,"isoWeek",a)}h=+t.startOf(h,c?"day":o);if(t.diff(e,n,o)>1e5*r){throw new Error(n+" and "+e+" are too far apart with stepSize of "+r+" "+o)}const d=i.ticks.source==="data"&&this.getDataTimestamps();for(f=h,u=0;f<e;f=+t.add(f,r,o),u++){Xh(l,f,d)}if(f===e||i.bounds==="ticks"||u===1){Xh(l,f,d)}return Object.keys(l).sort($h).map((t=>+t))}getLabelForValue(t){const n=this._adapter;const e=this.options.time;if(e.tooltipFormat){return n.format(t,e.tooltipFormat)}return n.format(t,e.displayFormats.datetime)}format(t,n){const e=this.options;const i=e.time.displayFormats;const s=this._unit;const o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,e,i){const s=this.options;const o=s.ticks.callback;if(o){return vn(o,[t,n,e],this)}const r=s.time.displayFormats;const a=this._unit;const c=this._majorUnit;const l=a&&r[a];const h=c&&r[c];const f=e[n];const u=c&&h&&f&&f.major;return this._adapter.format(t,i||(u?h:l))}generateTickLabels(t){let n,e,i;for(n=0,e=t.length;n<e;++n){i=t[n];i.label=this._tickFormatFunction(i.value,n,t)}}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets;const e=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+e)*n.factor)}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+e*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks;const e=this.ctx.measureText(t).width;const i=ee(this.isHorizontal()?n.maxRotation:n.minRotation);const s=Math.cos(i);const o=Math.sin(i);const r=this._resolveTickFontOptions(0).size;return{w:e*s+r*o,h:e*o+r*s}}_getLabelCapacity(t){const n=this.options.time;const e=n.displayFormats;const i=e[n.unit]||e.millisecond;const s=this._tickFormatFunction(t,0,Zh(this,[t],this._majorUnit),i);const o=this._getLabelSize(s);const r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[];let n,e;if(t.length){return t}const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length){return this._cache.data=i[0].controller.getAllParsedValues(this)}for(n=0,e=i.length;n<e;++n){t=t.concat(i[n].controller.getAllParsedValues(this))}return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,e;if(t.length){return t}const i=this.getLabels();for(n=0,e=i.length;n<e;++n){t.push(Hh(this,i[n]))}return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ye(t.sort($h))}}function Qh(t,n,e){let i=0;let s=t.length-1;let o,r,a,c;if(e){if(n>=t[i].pos&&n<=t[s].pos){({lo:i,hi:s}=pe(t,"pos",n))}({pos:o,time:a}=t[i]);({pos:r,time:c}=t[s])}else{if(n>=t[i].time&&n<=t[s].time){({lo:i,hi:s}=pe(t,"time",n))}({time:o,pos:a}=t[i]);({time:r,pos:c}=t[s])}const l=r-o;return l?a+(c-a)*(n-o)/l:a}class Gh extends qh{static id="timeseries";static defaults=qh.defaults;constructor(t){super(t);this._table=[];this._minPos=undefined;this._tableRange=undefined}initOffsets(){const t=this._getTimestampsForTable();const n=this._table=this.buildLookupTable(t);this._minPos=Qh(n,this.min);this._tableRange=Qh(n,this.max)-this._minPos;super.initOffsets(t)}buildLookupTable(t){const{min:n,max:e}=this;const i=[];const s=[];let o,r,a,c,l;for(o=0,r=t.length;o<r;++o){c=t[o];if(c>=n&&c<=e){i.push(c)}}if(i.length<2){return[{time:n,pos:0},{time:e,pos:1}]}for(o=0,r=i.length;o<r;++o){l=i[o+1];a=i[o-1];c=i[o];if(Math.round((l+a)/2)!==c){s.push({time:c,pos:o/(r-1)})}}return s}_generate(){const t=this.min;const n=this.max;let e=super.getDataTimestamps();if(!e.includes(t)||!e.length){e.splice(0,0,t)}if(!e.includes(n)||e.length===1){e.push(n)}return e.sort(((t,n)=>t-n))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length){return t}const n=this.getDataTimestamps();const e=this.getLabelTimestamps();if(n.length&&e.length){t=this.normalize(n.concat(e))}else{t=n.length?n:e}t=this._cache.all=t;return t}getDecimalForValue(t){return(Qh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return Qh(this._table,e*this._tableRange+this._minPos,true)}}var Jh=Object.freeze({__proto__:null,CategoryScale:fh,LinearScale:gh,LogarithmicScale:Mh,RadialLinearScale:Fh,TimeScale:qh,TimeSeriesScale:Gh});const tf=[$o,jc,rh,Jh];qa.register(...tf);const nf='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const ef=[0,0,0,0,0,0,0,.1,.2,.4,.8,1,1,1,1,.7,.5,.3,.16,.02,0,0,0,0];const sf={mostly_at_home:[.1,.1,.1,.1,.1,.15,.23,.26,.16,.16,.15,.19,.23,.24,.35,.28,.275,.8,.78,.74,.75,.73,.26,.1],mostly_away:[.1,.1,.1,.1,.1,.15,.29,.32,.25,.15,.12,.14,.15,.12,.16,.21,.285,1,.81,.77,.79,.73,.26,.1]};const of=class{constructor(n){t(this,n)}systemConfigs={};householdConsumption=3500;consumptionProfile="mostly_at_home";hasHeatPump=false;hasElectricCar=false;electricCarConsumption=7.6;electricityPrice=.3;compensationRate=.07;autonomy=0;costSavings=0;numberOfPanels=5;panelPeakPower=.4;name="";email="";nameError="";emailError="";chart=null;chartRef=null;updateSystemConfigs(){if(Object.keys(this.systemConfigs).length===0){this.numberOfPanels=0;return}this.numberOfPanels=Object.keys(this.systemConfigs).reduce(((t,n)=>t+this.systemConfigs[n].positionedPanels.length),0);this.panelPeakPower=Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel.kWattPeak;this.recalculate();this.updateChart()}recalculate(){const t=sf[this.consumptionProfile];const n=t.reduce(((t,n)=>t+n),0);const e=this.numberOfPanels*this.panelPeakPower;const i=ef.map((t=>t*e));let s=0;for(let e=0;e<t.length;e++){t[e]=t[e]*this.householdConsumption/n/365;if(t[e]<=i[e]){s+=t[e]}else if(t[e]>i[e]){s+=i[e]}}const o=i.map(((n,e)=>t[e]-n));const r=-o.filter((t=>t<0)).reduce(((t,n)=>t+n),0);this.costSavings=r*this.compensationRate*365+s*365*this.electricityPrice;this.autonomy=s/(this.householdConsumption/365)*100}updateChart(){if(!this.chartRef)return;const t=this.chartRef.getContext("2d");if(!t)return;if(this.chart){this.chart.destroy()}const n=Array.from({length:24},((t,n)=>`${n}:00`));const e=sf[this.consumptionProfile];const i=e.reduce(((t,n)=>t+n),0);const s=this.numberOfPanels*this.panelPeakPower;const o=ef.map((t=>t*s));for(let t=0;t<e.length;t++){e[t]=e[t]*this.householdConsumption/i/365}let r=[{label:"Energy Consumption",data:e,borderColor:"#964500",backgroundColor:"rgba(150, 69, 0, 0.1)",fill:true,tension:.4},{label:"Energy Production",data:o,borderColor:"#000000",backgroundColor:"rgba(0, 0, 0, 0.1)",fill:true}];this.chart=new qa(t,{type:"line",data:{labels:n,datasets:r},options:{responsive:true,plugins:{title:{display:true,text:"Daily Consumption Profile"}},scales:{y:{beginAtZero:true,title:{display:true,text:"Relative Consumption"}},x:{title:{display:true,text:"Hour of Day"}}}}})}componentWillLoad(){this.updateSystemConfigs()}validateForm(){let t=true;if(!this.name.trim()){this.nameError="Name is required";t=false}else{this.nameError=""}const n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(!this.email.trim()){this.emailError="Email is required";t=false}else if(!n.test(this.email)){this.emailError="Please enter a valid email address";t=false}else{this.emailError=""}return t}handleRequestOffer(){if(!this.validateForm()){return}console.log("Requesting offer for:",{name:this.name,email:this.email,systemConfig:this.systemConfigs,consumption:this.householdConsumption,autonomy:this.autonomy,costSavings:this.costSavings})}render(){if(Object.keys(this.systemConfigs).length===0){return e("div",null)}return e("div",{class:"flex flex-col justify-center items-center w-full h-full gap-4 p-4"},e("h1",{class:"text-2xl font-bold text-[#271200] mb-4"},"Solar System Configuration"),e("div",{class:"w-full max-w-2xl bg-[#f3ebda] rounded-4xl p-6 space-y-6"},e("div",{class:"space-y-4"},e("h2",{class:"text-lg font-semibold text-[#271200]"},"System Information"),e("div",{class:"grid grid-cols-2 gap-4"},e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Number of Solar Panels"),e("input",{type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.numberOfPanels,readOnly:true})),e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Panel Peak Power (kW)"),e("input",{type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.panelPeakPower,readonly:true}))),e("div",{class:"bg-white rounded-4xl p-4"},e("div",{class:"flex items-center justify-between"},e("span",{class:"text-gray-600"},"Total System Peak Power"),e("span",{class:"text-xl font-bold text-[#271200]"},(D.kWattPeak*this.numberOfPanels).toFixed(1)," kW")))),e("div",{class:"space-y-4"},e("h2",{class:"text-lg font-semibold text-[#271200]"},"Household Electricity Consumption"),e("div",{class:"grid grid-cols-2 gap-4"},e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Annual Consumption (kWh)"),e("input",{type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.householdConsumption,onInput:t=>{this.householdConsumption=parseInt(t.target.value);this.recalculate();this.updateChart()}})),e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Consumption Profile"),e("select",{class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",onChange:t=>{this.consumptionProfile=t.target.value;this.recalculate();this.updateChart()}},e("option",{value:"mostly_at_home",selected:this.consumptionProfile==="mostly_at_home"},"Mostly at Home"),e("option",{value:"mostly_away",selected:this.consumptionProfile==="mostly_away"},"Mostly Away")))),e("div",{class:"mt-4"},e("canvas",{ref:t=>this.chartRef=t}))),e("div",{class:"space-y-4"},e("h2",{class:"text-lg font-semibold text-[#271200]"},"Electricity Costs"),e("div",{class:"grid grid-cols-2 gap-4"},e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Electricity Price (€/kWh)"),e("input",{type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.electricityPrice,onInput:t=>{this.electricityPrice=parseFloat(t.target.value);this.recalculate();this.updateChart()}})),e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Compensation Rate (€/kWh)"),e("input",{type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.compensationRate,onInput:t=>{this.compensationRate=parseFloat(t.target.value);this.recalculate();this.updateChart()}})))),e("div",{class:"space-y-4 pt-4 border-t border-gray-200"},e("h2",{class:"text-lg font-semibold text-[#271200]"},"Results"),e("div",{class:"bg-white rounded-4xl p-4"},e("div",{class:"flex items-center justify-between"},e("span",{class:"text-gray-600"},"Autonomy"),e("span",{class:"text-xl font-bold text-[#271200]"},this.autonomy.toFixed(1),"%")),e("div",{class:"flex items-center justify-between mt-4"},e("div",{class:"flex items-center gap-2"},e("span",{class:"text-gray-600"},"Cost Savings"),e("div",{class:"relative group"},e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400 cursor-help",viewBox:"0 0 20 20",fill:"currentColor"},e("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})),e("div",{class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},"Cost savings are calculated based on current electricity prices and compensation rates. The calculation includes both direct usage of solar energy and compensation for excess energy fed back into the grid."))),e("span",{class:"text-xl font-bold text-green-600"},this.costSavings.toFixed(2),"€/year")))),e("div",{class:"space-y-4 pt-4 border-t border-gray-200"},e("h2",{class:"text-lg font-semibold text-[#271200]"},"Request an Offer"),e("div",{class:"grid grid-cols-2 gap-4"},e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Name"),e("input",{type:"text",class:`w-full px-4 py-2 rounded-4xl border ${this.nameError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.name,onInput:t=>{this.name=t.target.value;this.validateForm()},placeholder:"Your name"}),this.nameError&&e("p",{class:"text-red-500 text-sm mt-1"},this.nameError)),e("div",null,e("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Email"),e("input",{type:"email",class:`w-full px-4 py-2 rounded-4xl border ${this.emailError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.email,onInput:t=>{this.email=t.target.value;this.validateForm()},placeholder:"your.email@example.com"}),this.emailError&&e("p",{class:"text-red-500 text-sm mt-1"},this.emailError))),e("div",{class:"flex justify-center"},e("button",{onClick:()=>this.handleRequestOffer(),disabled:!this.name.trim()||!this.email.trim()||!!this.nameError||!!this.emailError,class:"px-4 py-2 bg-[#271200] text-white rounded-4xl hover:bg-[#964500] transition-colors duration-200"},"Request Offer")))))}static get watchers(){return{systemConfigs:["updateSystemConfigs"]}}};of.style=nf;export{ut as map_draw,wt as solar_expert,of as solar_system_form};
|
|
44
|
-
//# sourceMappingURL=p-642688b2.entry.js.map
|