UNPKG

@jsburbano-dev/payflux

Version:

A modern and customizable component library built with Vue 3 and Tailwind CSS, designed for building financial dashboards and modern web apps with ease.

16 lines 163 kB
(function(V,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],g):(V=typeof globalThis<"u"?globalThis:V||self,g(V.PayFlux={},V.Vue))})(this,function(V,g){"use strict";const Jt=g.defineComponent({__name:"Card",props:{direction:{default:"row"},class:{default:""},isDark:{type:Boolean,default:!1}},setup(i){const t=i;return(e,s)=>(g.openBlock(),g.createElementBlock("article",{class:g.normalizeClass(["rounded-2xl p-6 bg-white dark:bg-zinc-900 shadow-md text-zinc-800 dark:text-white flex items-center justify-between gap-6 transition-colors flex-1",e.direction==="column"?"flex-col":"flex-row",t.class,t.isDark?"bg-zinc-900 text-zinc-100":"bg-white text-zinc-900"])},[g.renderSlot(e.$slots,"default")],2))}});function Te(i,t){const e={yellow:{light:"bg-yellow-50 text-yellow-500",dark:"bg-yellow-500 text-yellow-50"},blue:{light:"bg-blue-50 text-blue-500",dark:"bg-blue-500 text-blue-50"},indigo:{light:"bg-indigo-50 text-indigo-500",dark:"bg-indigo-500 text-indigo-50"},green:{light:"bg-green-50 text-green-500",dark:"bg-green-500 text-green-50"},zinc:{light:"bg-zinc-50 text-zinc-500",dark:"bg-zinc-950 text-zinc-50"}},n=e[i??"zinc"]??e.zinc;return{classes:t?n.dark:n.light}}const li=g.defineComponent({__name:"IconCard",props:{icon:{},label:{},colorName:{},isActive:{type:Boolean},isDark:{type:Boolean},height:{},width:{},onClick:{type:Function}},emits:["click"],setup(i,{emit:t}){const e=i,s=t,n=g.computed(()=>["flex flex-col items-center justify-center rounded-xl p-4 transition-colors duration-200",Te(e.colorName,e.isDark).classes,e.isActive?"ring-2 ring-offset-2 ring-primary-600":""].filter(Boolean).join(" ")),o=g.computed(()=>["w-6 h-6 mb-2",Te(e.colorName,e.isDark).classes].filter(Boolean).join(" ")),r=g.computed(()=>["text-sm font-semibold text-center",Te(e.colorName,e.isDark).classes].filter(Boolean).join(" ")),a=()=>{s("click"),e.onClick?.()};return(l,c)=>(g.openBlock(),g.createElementBlock("button",{type:"button",class:g.normalizeClass(n.value),onClick:a,style:g.normalizeStyle({width:l.width?l.width+"px":"100%",height:l.height?l.height+"px":"96px"})},[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.icon),{class:g.normalizeClass(o.value)},null,8,["class"])),g.createElementVNode("span",{class:g.normalizeClass(r.value)},g.toDisplayString(l.label),3)],6))}}),Qs={class:"text-xl font-bold text-zinc-900 dark:text-white self-start"},Js={class:g.normalizeClass(["grid gap-4 grid-cols-2 sm:grid-cols-3 md:grid-cols-4"])},tn=g.defineComponent({__name:"GridIconCard",props:{cards:{},isDark:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},title:{default:"Services"}},emits:["cardClick"],setup(i,{emit:t}){const e=i,s=t,n=g.ref(null),o=r=>{e.selectable&&(n.value=r.label),s("cardClick",r)};return(r,a)=>(g.openBlock(),g.createBlock(Jt,{direction:"column"},{default:g.withCtx(()=>[g.createElementVNode("h2",Qs,g.toDisplayString(r.title||"Available Balance"),1),g.createElementVNode("div",Js,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(r.cards,l=>(g.openBlock(),g.createBlock(li,{key:l.label,icon:l.icon,label:l.label,colorName:l.colorName,isDark:r.isDark,isActive:r.selectable&&n.value===l.label,onClick:()=>o(l),height:96,width:96},null,8,["icon","label","colorName","isDark","isActive","onClick"]))),128))])]),_:1}))}});/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License */function Et(i){return i+.5|0}const dt=(i,t,e)=>Math.max(Math.min(i,e),t);function zt(i){return dt(Et(i*2.55),0,255)}function ft(i){return dt(Et(i*255),0,255)}function rt(i){return dt(Et(i/2.55)/100,0,1)}function ci(i){return dt(Et(i*100),0,100)}const Z={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},Ee=[..."0123456789ABCDEF"],en=i=>Ee[i&15],sn=i=>Ee[(i&240)>>4]+Ee[i&15],te=i=>(i&240)>>4===(i&15),nn=i=>te(i.r)&&te(i.g)&&te(i.b)&&te(i.a);function on(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&Z[i[1]]*17,g:255&Z[i[2]]*17,b:255&Z[i[3]]*17,a:t===5?Z[i[4]]*17:255}:(t===7||t===9)&&(e={r:Z[i[1]]<<4|Z[i[2]],g:Z[i[3]]<<4|Z[i[4]],b:Z[i[5]]<<4|Z[i[6]],a:t===9?Z[i[7]]<<4|Z[i[8]]:255})),e}const rn=(i,t)=>i<255?t(i):"";function an(i){var t=nn(i)?en:sn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+rn(i.a,t):void 0}const ln=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function hi(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function cn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function hn(i,t,e){const s=hi(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function dn(i,t,e,s,n){return i===n?(t-e)/s+(t<e?6:0):t===n?(e-i)/s+2:(i-t)/s+4}function ze(i){const e=i.r/255,s=i.g/255,n=i.b/255,o=Math.max(e,s,n),r=Math.min(e,s,n),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=dn(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function Re(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(ft)}function Le(i,t,e){return Re(hi,i,t,e)}function fn(i,t,e){return Re(hn,i,t,e)}function un(i,t,e){return Re(cn,i,t,e)}function di(i){return(i%360+360)%360}function gn(i){const t=ln.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?zt(+t[5]):ft(+t[5]));const n=di(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=fn(n,o,r):t[1]==="hsv"?s=un(n,o,r):s=Le(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function pn(i,t){var e=ze(i);e[0]=di(e[0]+t),e=Le(e),i.r=e[0],i.g=e[1],i.b=e[2]}function mn(i){if(!i)return;const t=ze(i),e=t[0],s=ci(t[1]),n=ci(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${rt(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const fi={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"},ui={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 bn(){const i={},t=Object.keys(ui),e=Object.keys(fi);let s,n,o,r,a;for(s=0;s<t.length;s++){for(r=a=t[s],n=0;n<e.length;n++)o=e[n],a=a.replace(o,fi[o]);o=parseInt(ui[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}let ee;function _n(i){ee||(ee=bn(),ee.transparent=[0,0,0,0]);const t=ee[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const xn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function yn(i){const t=xn.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];e=t[8]?zt(r):dt(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?zt(s):dt(s,0,255)),n=255&(t[4]?zt(n):dt(n,0,255)),o=255&(t[6]?zt(o):dt(o,0,255)),{r:s,g:n,b:o,a:e}}}function kn(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${rt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ie=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,St=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function wn(i,t,e){const s=St(rt(i.r)),n=St(rt(i.g)),o=St(rt(i.b));return{r:ft(Ie(s+e*(St(rt(t.r))-s))),g:ft(Ie(n+e*(St(rt(t.g))-n))),b:ft(Ie(o+e*(St(rt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function ie(i,t,e){if(i){let s=ze(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Le(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function gi(i,t){return i&&Object.assign(t||{},i)}function pi(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ft(i[3]))):(t=gi(i,{r:0,g:0,b:0,a:1}),t.a=ft(t.a)),t}function Sn(i){return i.charAt(0)==="r"?yn(i):gn(i)}class Rt{constructor(t){if(t instanceof Rt)return t;const e=typeof t;let s;e==="object"?s=pi(t):e==="string"&&(s=on(t)||_n(t)||Sn(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=gi(this._rgb);return t&&(t.a=rt(t.a)),t}set rgb(t){this._rgb=pi(t)}rgbString(){return this._valid?kn(this._rgb):void 0}hexString(){return this._valid?an(this._rgb):void 0}hslString(){return this._valid?mn(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=wn(this._rgb,t._rgb,e)),this}clone(){return new Rt(this.rgb)}alpha(t){return this._rgb.a=ft(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Et(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ie(this._rgb,2,t),this}darken(t){return ie(this._rgb,2,-t),this}saturate(t){return ie(this._rgb,1,t),this}desaturate(t){return ie(this._rgb,1,-t),this}rotate(t){return pn(this._rgb,t),this}}/*! * Chart.js v4.5.0 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */function at(){}const vn=(()=>{let i=0;return()=>i++})();function $(i){return i==null}function W(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function D(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function lt(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function it(i,t){return lt(i)?i:t}function A(i,t){return typeof i>"u"?t:i}const Mn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,mi=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function R(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function P(i,t,e,s){let n,o,r;if(W(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(D(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function se(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ne(i){if(W(i))return i.map(ne);if(D(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=ne(i[e[n]]);return t}return i}function bi(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Cn(i,t,e,s){if(!bi(i))return;const n=t[i],o=e[i];D(n)&&D(o)?Lt(n,o,s):t[i]=ne(o)}function Lt(i,t,e){const s=W(t)?t:[t],n=s.length;if(!D(i))return i;e=e||{};const o=e.merger||Cn;let r;for(let a=0;a<n;++a){if(r=s[a],!D(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function It(i,t){return Lt(i,t,{merger:Dn})}function Dn(i,t,e){if(!bi(i))return;const s=t[i],n=e[i];D(s)&&D(n)?It(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=ne(n))}const _i={"":i=>i,x:i=>i.x,y:i=>i.y};function On(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function An(i){const t=On(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Bt(i,t){return(_i[t]||(_i[t]=An(t)))(i)}function Be(i){return i.charAt(0).toUpperCase()+i.slice(1)}const oe=i=>typeof i<"u",ut=i=>typeof i=="function",xi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Pn(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const z=Math.PI,H=2*z,re=Number.POSITIVE_INFINITY,Tn=z/180,N=z/2,gt=z/4,yi=z*2/3,ki=Math.sign;function En(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function zn(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function ae(i){return!zn(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function pt(i){return i*(z/180)}function Rn(i){return i*(180/z)}function wi(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*z&&(o+=H),{angle:o,distance:n}}function Ln(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function st(i){return(i%H+H)%H}function le(i,t,e,s){const n=st(i),o=st(t),r=st(e),a=st(o-n),l=st(r-n),c=st(n-o),h=st(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function Q(i,t,e){return Math.max(t,Math.min(e,i))}function In(i){return Q(i,-32768,32767)}function Ft(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Fe(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const He=(i,t,e,s)=>Fe(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),Bn=(i,t,e)=>Fe(i,e,s=>i[s][t]>=e);function Fn(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Si=["push","pop","shift","splice","unshift"];function Hn(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Si.forEach(e=>{const s="_onData"+Be(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function vi(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Si.forEach(o=>{delete i[o]}),delete i._chartjs)}function Nn(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Mi=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Ci(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Mi.call(window,()=>{s=!1,i.apply(t,e)}))}}function Wn(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Ne=i=>i==="start"?"left":i==="end"?"right":"center",Y=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Vn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t,ce=i=>i===0||i===1,Di=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*H/e)),Oi=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*H/e)+1,Ht={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*N)+1,easeOutSine:i=>Math.sin(i*N),easeInOutSine:i=>-.5*(Math.cos(z*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ce(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ce(i)?i:Di(i,.075,.3),easeOutElastic:i=>ce(i)?i:Oi(i,.075,.3),easeInOutElastic(i){return ce(i)?i:i<.5?.5*Di(i*2,.1125,.45):.5+.5*Oi(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ht.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ht.easeInBounce(i*2)*.5:Ht.easeOutBounce(i*2-1)*.5+.5};function Ai(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Pi(i){return Ai(i)?i:new Rt(i)}function We(i){return Ai(i)?i:new Rt(i).saturate(.5).darken(.1).hexString()}const jn=["x","y","borderWidth","radius","tension"],$n=["color","borderColor","backgroundColor"];function Yn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:$n},numbers:{type:"number",properties:jn}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Xn(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ti=new Map;function Un(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Ti.get(e);return s||(s=new Intl.NumberFormat(i,t),Ti.set(e,s)),s}function Kn(i,t,e){return Un(t,e).format(i)}var qn={formatters:{values(i){return W(i)?i:""+i}}};function Gn(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:qn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const mt=Object.create(null),Ve=Object.create(null);function Nt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function je(i,t,e){return typeof t=="string"?Lt(Nt(i,t),e):Lt(Nt(i,""),t)}class Zn{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.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=(s,n)=>We(n.backgroundColor),this.hoverBorderColor=(s,n)=>We(n.borderColor),this.hoverColor=(s,n)=>We(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return je(this,t,e)}get(t){return Nt(this,t)}describe(t,e){return je(Ve,t,e)}override(t,e){return je(mt,t,e)}route(t,e,s,n){const o=Nt(this,t),r=Nt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return D(l)?Object.assign({},c,l):A(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var B=new Zn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Yn,Xn,Gn]);function Qn(i){return!i||$(i.size)||$(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ei(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function bt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function zi(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Ri(i,t,e,s){Li(i,t,e,s,null)}function Li(i,t,e,s,n){let o,r,a,l,c,h,d,f;const u=t.pointStyle,b=t.rotation,p=t.radius;let m=(b||0)*Tn;if(u&&typeof u=="object"&&(o=u.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),u){default:n?i.ellipse(e,s,n/2,p,0,0,H):i.arc(e,s,p,0,H),i.closePath();break;case"triangle":h=n?n/2:p,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=yi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),m+=yi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(m+gt)*l,d=Math.cos(m+gt)*(n?n/2-c:l),a=Math.sin(m+gt)*l,f=Math.sin(m+gt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-z,m-N),i.arc(e+f,s-r,c,m-N,m),i.arc(e+d,s+a,c,m,m+N),i.arc(e-f,s+r,c,m+N,m+z),i.closePath();break;case"rect":if(!b){l=Math.SQRT1_2*p,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=gt;case"rectRot":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-a),i.lineTo(e+f,s-r),i.lineTo(e+d,s+a),i.lineTo(e-f,s+r),i.closePath();break;case"crossRot":m+=gt;case"cross":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"star":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r),m+=gt,d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,f=Math.sin(m)*(n?n/2:p),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+f,s-r),i.lineTo(e-f,s+r);break;case"line":r=n?n/2:Math.cos(m)*p,a=Math.sin(m)*p,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Ii(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function $e(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Ye(i){i.restore()}function Jn(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),$(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function to(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function eo(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Wt(i,t,e,s,n,o={}){const r=W(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Jn(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&eo(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),$(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),to(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function Xe(i,t){const{x:e,y:s,w:n,h:o,radius:r}=t;i.arc(e+r.topLeft,s+r.topLeft,r.topLeft,1.5*z,z,!0),i.lineTo(e,s+o-r.bottomLeft),i.arc(e+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,z,N,!0),i.lineTo(e+n-r.bottomRight,s+o),i.arc(e+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,N,0,!0),i.lineTo(e+n,s+r.topRight),i.arc(e+n-r.topRight,s+r.topRight,r.topRight,0,-N,!0),i.lineTo(e+r.topLeft,s)}const io=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,so=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function no(i,t){const e=(""+i).match(io);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const oo=i=>+i||0;function Ue(i,t){const e={},s=D(t),n=s?Object.keys(t):t,o=D(i)?s?r=>A(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=oo(o(r));return e}function ro(i){return Ue(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Vt(i){return Ue(i,["topLeft","topRight","bottomLeft","bottomRight"])}function J(i){const t=ro(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||B.font;let e=A(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=A(i.style,t.style);s&&!(""+s).match(so)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:A(i.family,t.family),lineHeight:no(A(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:A(i.weight,t.weight),string:""};return n.string=Qn(n),n}function he(i,t,e,s){let n,o,r;for(n=0,o=i.length;n<o;++n)if(r=i[n],r!==void 0&&r!==void 0)return r}function ao(i,t,e){const{min:s,max:n}=i,o=mi(t,(n-s)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function vt(i,t){return Object.assign(Object.create(i),t)}function Ke(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=Wi("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>Ke([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Fi(a,l,()=>mo(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Vi(a).includes(l)},ownKeys(a){return Vi(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Mt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Bi(i,s),setContext:o=>Mt(i,o,e,s),override:o=>Mt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Fi(o,r,()=>co(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Bi(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ut(e)?e:()=>e,isIndexable:ut(s)?s:()=>s}}const lo=(i,t)=>i?i+Be(t):t,qe=(i,t)=>D(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Fi(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function co(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ut(a)&&r.isScriptable(t)&&(a=ho(t,a,i,e)),W(a)&&a.length&&(a=fo(t,a,i,r.isIndexable)),qe(t,a)&&(a=Mt(a,n,o&&o[t],r)),a}function ho(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),qe(i,l)&&(l=Ge(n._scopes,n,i,l)),l}function fo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(D(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Ge(c,n,i,h);t.push(Mt(d,o,r&&r[i],a))}}return t}function Hi(i,t,e){return ut(i)?i(t,e):i}const uo=(i,t)=>i===!0?t:typeof i=="string"?Bt(t,i):void 0;function go(i,t,e,s,n){for(const o of t){const r=uo(e,o);if(r){i.add(r);const a=Hi(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function Ge(i,t,e,s){const n=t._rootScopes,o=Hi(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ni(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ni(a,r,o,l,s),l===null)?!1:Ke(Array.from(a),[""],n,o,()=>po(t,e,s))}function Ni(i,t,e,s,n){for(;e;)e=go(i,t,e,s,n);return e}function po(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return W(n)&&D(e)?e:n||{}}function mo(i,t,e,s){let n;for(const o of t)if(n=Wi(lo(o,i),e),typeof n<"u")return qe(i,n)?Ge(e,s,i,n):n}function Wi(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Vi(i){let t=i._keys;return t||(t=i._keys=bo(i._scopes)),t}function bo(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function Ze(){return typeof window<"u"&&typeof document<"u"}function Qe(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function de(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const fe=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function _o(i,t){return fe(i).getPropertyValue(t)}const xo=["top","right","bottom","left"];function _t(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=xo[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const yo=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function ko(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(yo(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function xt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=fe(e),o=n.boxSizing==="border-box",r=_t(n,"padding"),a=_t(n,"border","width"),{x:l,y:c,box:h}=ko(i,e),d=r.left+(h&&a.left),f=r.top+(h&&a.top);let{width:u,height:b}=t;return o&&(u-=r.width+a.width,b-=r.height+a.height),{x:Math.round((l-d)/u*e.width/s),y:Math.round((c-f)/b*e.height/s)}}function wo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&Qe(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=fe(o),l=_t(a,"border","width"),c=_t(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=de(a.maxWidth,o,"clientWidth"),n=de(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||re,maxHeight:n||re}}const ue=i=>Math.round(i*10)/10;function So(i,t,e,s){const n=fe(i),o=_t(n,"margin"),r=de(n.maxWidth,i,"clientWidth")||re,a=de(n.maxHeight,i,"clientHeight")||re,l=wo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const f=_t(n,"border","width"),u=_t(n,"padding");c-=u.width+f.width,h-=u.height+f.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ue(Math.min(c,r,l.maxWidth)),h=ue(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ue(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ue(Math.floor(h*s))),{width:c,height:h}}function ji(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const vo=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};Ze()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i}();function $i(i,t){const e=_o(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}const Mo=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},Co=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Ct(i,t,e){return i?Mo(t,e):Co()}function Yi(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Xi(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function ge(i,t,e){return i.options.clip?i[e]:t[e]}function Do(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:ge(e,t,"left"),right:ge(e,t,"right"),top:ge(s,t,"top"),bottom:ge(s,t,"bottom")}:t}function Oo(i,t){const e=t._clip;if(e.disabled)return!1;const s=Do(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*! * Chart.js v4.5.0 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */class Ao{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Mi.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ct=new Ao;const Ui="transparent",Po={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Pi(i||Ui),n=s.valid&&Pi(t||Ui);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class To{constructor(t,e,s,n){const o=e[s];n=he([t.to,n,o,t.from]);const r=he([t.from,o,n]);this._active=!0,this._fn=t.fn||Po[t.type||typeof r],this._easing=Ht[t.easing]||Ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=he([t.to,e,n,t.from]),this._from=he([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class Ki{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!D(t))return;const e=Object.keys(B.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!D(o))return;const r={};for(const a of e)r[a]=o[a];(W(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=zo(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Eo(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,h,a);continue}else d.cancel();if(!f||!f.duration){t[c]=h;continue}o[c]=d=new To(f,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return ct.add(this._chart,s),!0}}function Eo(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function zo(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function qi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Ro(i,t,e){if(e===!1)return!1;const s=qi(i,e),n=qi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Lo(i){let t,e,s,n;return D(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function Gi(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Zi(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===e){if(h=!0,s.all)continue;break}c=i.values[l],lt(c)&&(o||t===0||ki(t)===ki(c))&&(t+=c)}return!h&&!s.all?0:t}function Io(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:i[h]};return a}function Je(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Bo(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Fo(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Ho(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Qi(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Ji(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=Bo(o,r,s),d=t.length;let f;for(let u=0;u<d;++u){const b=t[u],{[l]:p,[c]:m}=b,_=b._stacks||(b._stacks={});f=_[c]=Ho(n,h,p),f[a]=m,f._top=Qi(f,r,!0,s.type),f._bottom=Qi(f,r,!1,s.type);const x=f._visualValues||(f._visualValues={});x[a]=m}}function ti(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function No(i,t){return vt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Wo(i,t,e){return vt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function jt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const ei=i=>i==="reset"||i==="none",ts=(i,t)=>t?i:Object.assign({},i),Vo=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Gi(e,!0),values:null};class es{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Je(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&jt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,f,u,b)=>d==="x"?f:d==="r"?b:u,o=e.xAxisID=A(s.xAxisID,ti(t,"x")),r=e.yAxisID=A(s.yAxisID,ti(t,"y")),a=e.rAxisID=A(s.rAxisID,ti(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&vi(this._data,this),t._stacked&&jt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(D(e)){const n=this._cachedMeta;this._data=Io(e,n)}else if(s!==e){if(s){vi(s,this);const n=this._cachedMeta;jt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Hn(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Je(e.vScale,e),e.stack!==s.stack&&(n=!0,jt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Ji(this,e._parsed),e._stacked=Je(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,f;if(this._parsing===!1)s._parsed=n,s._sorted=!0,f=n;else{W(n[t])?f=this.parseArrayData(s,n,t,e):D(n[t])?f=this.parseObjectData(s,n,t,e):f=this.parsePrimitiveData(s,n,t,e);const u=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<e;++h)s._parsed[h+t]=d=f[h],l&&(u()&&(l=!1),c=d);s._sorted=l}r&&Ji(this,f)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(n);let f,u,b;for(f=0,u=n;f<u;++f)b=f+s,d[f]={[a]:h||o.parse(c[b],b),[l]:r.parse(e[b],b)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,e,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,f,u;for(h=0,d=n;h<d;++h)f=h+s,u=e[f],c[h]={x:o.parse(Bt(u,a),f),y:r.parse(Bt(u,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Gi(n,!0),values:e._stacks[t.axis]._visualValues};return Zi(a,r,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let r=o===null?NaN:o;const a=n&&s._stacks[e.axis];n&&a&&(n.values=a,r=Zi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=Vo(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Fo(a);let f,u;function b(){u=n[f];const p=u[a.axis];return!lt(u[t.axis])||h>p||d<p}for(f=0;f<r&&!(!b()&&(this.updateRangeFromParsed(c,t,u,l),o));++f);if(o){for(f=r-1;f>=0;--f)if(!b()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n][t.axis],lt(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Lo(A(this.options.clip,Ro(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=n[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Wo(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=No(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&oe(s);if(a)return ts(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),h),u=Object.keys(B.elements[t]),b=()=>this.getContext(s,n,e),p=c.resolveNamedOptions(f,u,b,d);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(ts(p,l))),p}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),f=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(f,this.getContext(t,s,e))}const c=new Ki(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ei(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){ei(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!ei(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getS