var Nr=Object.defineProperty;var Vr=(i,t,e)=>t in i?Nr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var A=(i,t,e)=>(Vr(i,typeof t!="symbol"?t+"":t,e),e);var Hr=Object.defineProperty,jr=(i,t,e)=>t in i?Hr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,F=(i,t,e)=>(jr(i,typeof t!="symbol"?t+"":t,e),e);let Ze=[];const _o=i=>{for(const t of Ze)if(t.status==="running")try{for(const e of t.funcs)e(i-t.startTime)}catch(e){t.destroy(),console.error(e)}requestAnimationFrame(_o)};requestAnimationFrame(_o);class Wr{constructor(){F(this,"funcs",[]),F(this,"status","stop"),F(this,"startTime",0),this.status="running",Ze.push(this),requestAnimationFrame(t=>this.startTime=t)}add(t,e=!1){return e?this.funcs.unshift(t):this.funcs.push(t),this}remove(t){const e=this.funcs.findIndex(n=>n===t);if(e===-1)throw new ReferenceError("You are going to remove nonexistent ticker function.");return this.funcs.splice(e,1),this}clear(){this.funcs=[]}destroy(){this.clear(),this.stop()}stop(){this.status="stop",Ze=Ze.filter(t=>t!==this)}}class wo{constructor(){F(this,"timing"),F(this,"relation","absolute"),F(this,"easeTime",0),F(this,"applying",{}),F(this,"getTime",Date.now),F(this,"ticker",new Wr),F(this,"value",{}),F(this,"listener",{}),this.timing=t=>t}async all(){if(Object.values(this.applying).every(t=>t===!0))throw new ReferenceError("There is no animates to be waited.");await new Promise(t=>{const e=()=>{Object.values(this.applying).every(n=>n===!1)&&(this.unlisten("end",e),t("all animated."))};this.listen("end",e)})}async n(t){const e=Object.values(this.applying).filter(s=>s===!0).length;if(e{const o=()=>{n++,n===t&&(this.unlisten("end",o),s(`${t} animated.`))};this.listen("end",o)})}async w(t){if(this.applying[t]===!1)throw new ReferenceError(`The ${t} animate is not animating.`);await new Promise(e=>{const n=()=>{this.applying[t]===!1&&(this.unlisten("end",n),e(`${t} animated.`))};this.listen("end",n)})}listen(t,e){var n;(n=this.listener)[t]!=null||(n[t]=[]),this.listener[t].push(e)}unlisten(t,e){const n=this.listener[t].findIndex(s=>s===e);if(n===-1)throw new ReferenceError("You are trying to remove a nonexistent listener.");this.listener[t].splice(n,1)}hook(...t){const e=Object.entries(this.listener).filter(n=>t.includes(n[0]));for(const[n,s]of e)for(const o of s)o(this,n)}}function Gi(i){return i!=null}async function mf(i){return new Promise(t=>setTimeout(t,i))}class bf extends wo{constructor(){super(),F(this,"shakeTiming"),F(this,"path"),F(this,"multiTiming"),F(this,"value",{}),F(this,"size",1),F(this,"angle",0),F(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),F(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),F(this,"ox",0),F(this,"oy",0),F(this,"sx",0),F(this,"sy",0),F(this,"bindInfo",[]),this.timing=t=>t,this.shakeTiming=t=>t,this.multiTiming=t=>[t,t],this.path=t=>[t,t],this.applying={move:!1,scale:!1,rotate:!1,shake:!1},this.ticker.add(()=>{const{running:t}=this.listener;if(Gi(t))for(const e of t)e(this,"running")})}get x(){return this.ox+this.sx}get y(){return this.oy+this.sy}mode(t,e=!1){return typeof t(0)=="number"?e?this.shakeTiming=t:this.timing=t:this.multiTiming=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}bind(...t){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=t,this}unbind(){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=[],this}move(t,e){return this.applying.move&&this.end(!0,"move"),this.applySys("ox",t,"move"),this.applySys("oy",e,"move"),this}rotate(t){return this.applySys("angle",t,"rotate"),this}scale(t){return this.applySys("size",t,"resize"),this}shake(t,e){this.applying.shake===!0&&this.end(!0,"shake"),this.applying.shake=!0;const{easeTime:n,shakeTiming:s}=this,o=this.getTime();this.hook("start","shakestart");const r=()=>{const a=this.getTime()-o;a>n&&(this.ticker.remove(r),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const l=a/n,c=s(l);this.sx=c*t,this.sy=c*e};return this.ticker.add(r),this.animateFn.system.shake=r,this}moveAs(t){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=t;const{easeTime:e,relation:n,timing:s}=this,o=this.getTime(),[r,a]=[this.x,this.y],[l,c]=(()=>{if(n==="absolute")return t(1);{const[u,d]=t(1);return[r+u,a+d]}})();this.hook("start","movestart");const h=()=>{const u=this.getTime()-o;if(u>e){this.end(!0,"moveAs");return}const d=u/e,[f,p]=t(s(d));n==="absolute"?(this.ox=f,this.oy=p):(this.ox=r+f,this.oy=a+p)};return this.ticker.add(h,!0),this.animateFn.system.moveAs=h,this.targetValue.system.moveAs=[l,c],this}register(t,e){if(typeof this.value[t]=="number")return this.error(`Property ${t} has been regietered twice.`,"reregister");this.value[t]=e,this.applying[t]=!1}apply(t,e,n=!1){this.applying[t]===!0&&this.end(!1,t),t in this.value||this.error(`You are trying to execute nonexistent property ${t}.`),this.applying[t]=!0;const s=this.value[t],o=this.getTime(),{timing:r,relation:a,easeTime:l}=this,c=a==="absolute"?e-s:e;this.hook("start");const h=()=>{const u=this.getTime()-o;if(u>l){this.end(!1,t);return}const d=u/l,f=r(d);this.value[t]=s+f*c};return this.ticker.add(h,n),this.animateFn.custom[t]=h,this.targetValue.custom[t]=c+s,this}applyMulti(t=!1){this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const e=this.bindInfo,n=e.map(h=>this.value[h]),s=this.getTime(),{multiTiming:o,relation:r,easeTime:a}=this,l=o(1);if(l.length!==n.length)throw new TypeError(`The number of binded animate attributes and timing function returns's length does not match. binded: ${e.length}, timing: ${l.length}`);this.hook("start");const c=()=>{const h=this.getTime()-s;if(h>a){this.end(!1,"@@bind");return}const u=h/a,d=o(u);e.forEach((f,p)=>{r==="absolute"?this.value[f]=d[p]:this.value[f]=n[p]+d[p]})};return this.ticker.add(c,t),this.animateFn.custom["@@bind"]=c,this.targetValue.system["@@bind"]=l,this}applySys(t,e,n){n!=="move"&&this.applying[n]===!0&&this.end(!0,n),this.applying[n]=!0;const s=this[t],o=this.getTime(),r=this.timing,a=this.relation,l=this.easeTime,c=a==="absolute"?e-s:e;this.hook("start",`${n}start`);const h=()=>{const u=this.getTime()-o;if(u>l){this.end(!0,n);return}const d=u/l,f=r(d);this[t]=s+c*f,t!=="oy"&&this.hook(n)};this.ticker.add(h,!0),t==="ox"?this.animateFn.system.move[0]=h:t==="oy"?this.animateFn.system.move[1]=h:this.animateFn.system[n]=h,n==="move"?(t==="ox"&&(this.targetValue.system.move[0]=c+s),t==="oy"&&(this.targetValue.system.move[1]=c+s)):n!=="shake"&&(this.targetValue.system[n]=c+s)}error(t,e){throw e==="repeat"?new Error(`Cannot execute the same animation twice. Info: ${t}`):e==="reregister"?new Error(`Cannot register a animated property twice. Info: ${t}`):new Error(t)}end(t,e){if(t===!0)if(this.applying[e]=!1,e==="move"?(this.ticker.remove(this.animateFn.system.move[0]),this.ticker.remove(this.animateFn.system.move[1])):e==="moveAs"?this.ticker.remove(this.animateFn.system.moveAs):e==="@@bind"?this.ticker.remove(this.animateFn.system["@@bind"]):this.ticker.remove(this.animateFn.system[e]),e==="move"){const[n,s]=this.targetValue.system.move;this.ox=n,this.oy=s,this.hook("moveend","end")}else if(e==="moveAs"){const[n,s]=this.targetValue.system.moveAs;this.ox=n,this.oy=s,this.hook("moveend","end")}else e==="rotate"?(this.angle=this.targetValue.system.rotate,this.hook("rotateend","end")):e==="resize"?(this.size=this.targetValue.system.resize,this.hook("resizeend","end")):e==="@@bind"?this.bindInfo.forEach((n,s)=>{this.value[n]=this.targetValue.system["@@bind"][s]}):(this.sx=0,this.sy=0,this.hook("shakeend","end"));else this.applying[e]=!1,this.ticker.remove(this.animateFn.custom[e]),this.value[e]=this.targetValue.custom[e],this.hook("end")}}class xf extends wo{constructor(){super(),F(this,"now",{}),F(this,"target",{}),F(this,"transitionFn",{}),F(this,"value"),F(this,"handleSet",(t,e,n)=>(this.transition(e,n),!0)),F(this,"handleGet",(t,e)=>this.now[e]),this.timing=t=>t,this.value=new Proxy(this.target,{set:this.handleSet,get:this.handleGet})}mode(t){return this.timing=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}transition(t,e){if(e===this.target[t])return this;if(!Gi(this.now[t]))return this.now[t]=e,this;this.applying[t]&&this.end(t,!0),this.applying[t]=!0,this.hook("start");const n=this.getTime(),s=this.easeTime,o=this.timing,r=this.now[t],a=e+(this.relation==="absolute"?0:r),l=a-r;this.target[t]=a;const c=()=>{const h=this.getTime()-n;h>=s&&this.end(t);const u=h/s;this.now[t]=o(u)*l+r,this.hook("running")};return this.transitionFn[t]=c,this.ticker.add(c),this}end(t,e=!1){const n=this.transitionFn[t];if(!Gi(n))throw new ReferenceError(`You are trying to end an ended transition: ${t}`);this.ticker.remove(this.transitionFn[t]),delete this.transitionFn[t],this.applying[t]=!1,this.hook("end"),e||(this.now[t]=this.target[t])}}const Ji=(...i)=>i.reduce((t,e)=>t+e,0),Ri=i=>{if(i===0)return 1;let t=i;for(;i>1;)i--,t*=i;return t},vo=(i,t)=>Math.round(Ri(t)/(Ri(i)*Ri(t-i))),Qe=(i,t,e=n=>1-t(1-n))=>i==="in"?t:i==="out"?e:i==="in-out"?n=>n<.5?t(n*2)/2:.5+e((n-.5)*2)/2:n=>n<.5?e(n*2)/2:.5+t((n-.5)*2)/2,Ur=Math.cosh(2),$r=Math.acosh(2),Yr=Math.tanh(3);function yf(){return i=>i}function _f(...i){const t=[0].concat(i);t.push(1);const e=t.length,n=Array(e).fill(0).map((s,o)=>vo(o,e-1));return s=>{const o=n.map((r,a)=>r*t[a]*(1-s)**(e-a-1)*s**a);return Ji(...o)}}function wf(i,t){if(!Number.isInteger(i))throw new TypeError("The first parameter of power timing function only allow integer.");return Qe(t,e=>e**i)}function vf(i,t){if(i==="sin")return Qe(t,e=>(Math.cosh(e*2)-1)/(Ur-1));if(i==="tan"){const e=n=>Math.tanh(n*3)*1/Yr;return Qe(t,n=>1-e(1-n),e)}if(i==="sec"){const e=n=>1/Math.cosh(n);return Qe(t,n=>1-(e(n*$r)-.5)*2)}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")}function Sf(i,t,...e){const n=[i].concat(e);n.push(t);const s=n.length,o=Array(s).fill(0).map((r,a)=>vo(a,s-1));return r=>{const a=o.map((c,h)=>c*n[h][0]*(1-r)**(s-h-1)*r**h),l=o.map((c,h)=>c*n[h][1]*(1-r)**(s-h-1)*r**h);return[Ji(...a),Ji(...l)]}}function kf(i){return i==null}function So(i,t){return function(){return i.apply(t,arguments)}}const{toString:Xr}=Object.prototype,{getPrototypeOf:yn}=Object,vi=(i=>t=>{const e=Xr.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),mt=i=>(i=i.toLowerCase(),t=>vi(t)===i),Si=i=>t=>typeof t===i,{isArray:ie}=Array,ke=Si("undefined");function qr(i){return i!==null&&!ke(i)&&i.constructor!==null&&!ke(i.constructor)&&at(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const ko=mt("ArrayBuffer");function Kr(i){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(i):t=i&&i.buffer&&ko(i.buffer),t}const Gr=Si("string"),at=Si("function"),Mo=Si("number"),ki=i=>i!==null&&typeof i=="object",Jr=i=>i===!0||i===!1,ti=i=>{if(vi(i)!=="object")return!1;const t=yn(i);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},Zr=mt("Date"),Qr=mt("File"),ta=mt("Blob"),ea=mt("FileList"),ia=i=>ki(i)&&at(i.pipe),na=i=>{let t;return i&&(typeof FormData=="function"&&i instanceof FormData||at(i.append)&&((t=vi(i))==="formdata"||t==="object"&&at(i.toString)&&i.toString()==="[object FormData]"))},sa=mt("URLSearchParams"),oa=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Re(i,t,{allOwnKeys:e=!1}={}){if(i===null||typeof i>"u")return;let n,s;if(typeof i!="object"&&(i=[i]),ie(i))for(n=0,s=i.length;n0;)if(s=e[n],t===s.toLowerCase())return s;return null}const Oo=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Po=i=>!ke(i)&&i!==Oo;function Zi(){const{caseless:i}=Po(this)&&this||{},t={},e=(n,s)=>{const o=i&&Ao(t,s)||s;ti(t[o])&&ti(n)?t[o]=Zi(t[o],n):ti(n)?t[o]=Zi({},n):ie(n)?t[o]=n.slice():t[o]=n};for(let n=0,s=arguments.length;n(Re(t,(s,o)=>{e&&at(s)?i[o]=So(s,e):i[o]=s},{allOwnKeys:n}),i),aa=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),la=(i,t,e,n)=>{i.prototype=Object.create(t.prototype,n),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:t.prototype}),e&&Object.assign(i.prototype,e)},ca=(i,t,e,n)=>{let s,o,r;const a={};if(t=t||{},i==null)return t;do{for(s=Object.getOwnPropertyNames(i),o=s.length;o-- >0;)r=s[o],(!n||n(r,i,t))&&!a[r]&&(t[r]=i[r],a[r]=!0);i=e!==!1&&yn(i)}while(i&&(!e||e(i,t))&&i!==Object.prototype);return t},ha=(i,t,e)=>{i=String(i),(e===void 0||e>i.length)&&(e=i.length),e-=t.length;const n=i.indexOf(t,e);return n!==-1&&n===e},ua=i=>{if(!i)return null;if(ie(i))return i;let t=i.length;if(!Mo(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=i[t];return e},da=(i=>t=>i&&t instanceof i)(typeof Uint8Array<"u"&&yn(Uint8Array)),fa=(i,t)=>{const n=(i&&i[Symbol.iterator]).call(i);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(i,o[0],o[1])}},pa=(i,t)=>{let e;const n=[];for(;(e=i.exec(t))!==null;)n.push(e);return n},ga=mt("HTMLFormElement"),ma=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,s){return n.toUpperCase()+s}),Hn=(({hasOwnProperty:i})=>(t,e)=>i.call(t,e))(Object.prototype),ba=mt("RegExp"),To=(i,t)=>{const e=Object.getOwnPropertyDescriptors(i),n={};Re(e,(s,o)=>{t(s,o,i)!==!1&&(n[o]=s)}),Object.defineProperties(i,n)},xa=i=>{To(i,(t,e)=>{if(at(i)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=i[e];if(at(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},ya=(i,t)=>{const e={},n=s=>{s.forEach(o=>{e[o]=!0})};return ie(i)?n(i):n(String(i).split(t)),e},_a=()=>{},wa=(i,t)=>(i=+i,Number.isFinite(i)?i:t),Li="abcdefghijklmnopqrstuvwxyz",jn="0123456789",Do={DIGIT:jn,ALPHA:Li,ALPHA_DIGIT:Li+Li.toUpperCase()+jn},va=(i=16,t=Do.ALPHA_DIGIT)=>{let e="";const{length:n}=t;for(;i--;)e+=t[Math.random()*n|0];return e};function Sa(i){return!!(i&&at(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const ka=i=>{const t=new Array(10),e=(n,s)=>{if(ki(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const o=ie(n)?[]:{};return Re(n,(r,a)=>{const l=e(r,s+1);!ke(l)&&(o[a]=l)}),t[s]=void 0,o}}return n};return e(i,0)},Ma=mt("AsyncFunction"),Aa=i=>i&&(ki(i)||at(i))&&at(i.then)&&at(i.catch),M={isArray:ie,isArrayBuffer:ko,isBuffer:qr,isFormData:na,isArrayBufferView:Kr,isString:Gr,isNumber:Mo,isBoolean:Jr,isObject:ki,isPlainObject:ti,isUndefined:ke,isDate:Zr,isFile:Qr,isBlob:ta,isRegExp:ba,isFunction:at,isStream:ia,isURLSearchParams:sa,isTypedArray:da,isFileList:ea,forEach:Re,merge:Zi,extend:ra,trim:oa,stripBOM:aa,inherits:la,toFlatObject:ca,kindOf:vi,kindOfTest:mt,endsWith:ha,toArray:ua,forEachEntry:fa,matchAll:pa,isHTMLForm:ga,hasOwnProperty:Hn,hasOwnProp:Hn,reduceDescriptors:To,freezeMethods:xa,toObjectSet:ya,toCamelCase:ma,noop:_a,toFiniteNumber:wa,findKey:Ao,global:Oo,isContextDefined:Po,ALPHABET:Do,generateString:va,isSpecCompliantForm:Sa,toJSONObject:ka,isAsyncFn:Ma,isThenable:Aa};function R(i,t,e,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),s&&(this.response=s)}M.inherits(R,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Co=R.prototype,Eo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{Eo[i]={value:i}});Object.defineProperties(R,Eo);Object.defineProperty(Co,"isAxiosError",{value:!0});R.from=(i,t,e,n,s,o)=>{const r=Object.create(Co);return M.toFlatObject(i,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),R.call(r,i.message,t,e,n,s),r.cause=i,r.name=i.name,o&&Object.assign(r,o),r};const Oa=null;function Qi(i){return M.isPlainObject(i)||M.isArray(i)}function Ro(i){return M.endsWith(i,"[]")?i.slice(0,-2):i}function Wn(i,t,e){return i?i.concat(t).map(function(s,o){return s=Ro(s),!e&&o?"["+s+"]":s}).join(e?".":""):t}function Pa(i){return M.isArray(i)&&!i.some(Qi)}const Ta=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function Mi(i,t,e){if(!M.isObject(i))throw new TypeError("target must be an object");t=t||new FormData,e=M.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!M.isUndefined(m[g])});const n=e.metaTokens,s=e.visitor||h,o=e.dots,r=e.indexes,l=(e.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(s))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(M.isDate(p))return p.toISOString();if(!l&&M.isBlob(p))throw new R("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(p)||M.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,g,m){let b=p;if(p&&!m&&typeof p=="object"){if(M.endsWith(g,"{}"))g=n?g:g.slice(0,-2),p=JSON.stringify(p);else if(M.isArray(p)&&Pa(p)||(M.isFileList(p)||M.endsWith(g,"[]"))&&(b=M.toArray(p)))return g=Ro(g),b.forEach(function(k,w){!(M.isUndefined(k)||k===null)&&t.append(r===!0?Wn([g],w,o):r===null?g:g+"[]",c(k))}),!1}return Qi(p)?!0:(t.append(Wn(m,g,o),c(p)),!1)}const u=[],d=Object.assign(Ta,{defaultVisitor:h,convertValue:c,isVisitable:Qi});function f(p,g){if(!M.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));u.push(p),M.forEach(p,function(b,x){(!(M.isUndefined(b)||b===null)&&s.call(t,b,M.isString(x)?x.trim():x,g,d))===!0&&f(b,g?g.concat(x):[x])}),u.pop()}}if(!M.isObject(i))throw new TypeError("data must be an object");return f(i),t}function Un(i){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function _n(i,t){this._pairs=[],i&&Mi(i,this,t)}const Lo=_n.prototype;Lo.append=function(t,e){this._pairs.push([t,e])};Lo.toString=function(t){const e=t?function(n){return t.call(this,n,Un)}:Un;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Da(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fo(i,t,e){if(!t)return i;const n=e&&e.encode||Da,s=e&&e.serialize;let o;if(s?o=s(t,e):o=M.isURLSearchParams(t)?t.toString():new _n(t,e).toString(n),o){const r=i.indexOf("#");r!==-1&&(i=i.slice(0,r)),i+=(i.indexOf("?")===-1?"?":"&")+o}return i}class Ca{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(n){n!==null&&t(n)})}}const $n=Ca,Io={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ea=typeof URLSearchParams<"u"?URLSearchParams:_n,Ra=typeof FormData<"u"?FormData:null,La=typeof Blob<"u"?Blob:null,Fa=(()=>{let i;return typeof navigator<"u"&&((i=navigator.product)==="ReactNative"||i==="NativeScript"||i==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Ia=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pt={isBrowser:!0,classes:{URLSearchParams:Ea,FormData:Ra,Blob:La},isStandardBrowserEnv:Fa,isStandardBrowserWebWorkerEnv:Ia,protocols:["http","https","file","blob","url","data"]};function za(i,t){return Mi(i,new pt.classes.URLSearchParams,Object.assign({visitor:function(e,n,s,o){return pt.isNode&&M.isBuffer(e)?(this.append(n,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Ba(i){return M.matchAll(/\w+|\[(\w*)]/g,i).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Na(i){const t={},e=Object.keys(i);let n;const s=e.length;let o;for(n=0;n=e.length;return r=!r&&M.isArray(s)?s.length:r,l?(M.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!a):((!s[r]||!M.isObject(s[r]))&&(s[r]=[]),t(e,n,s[r],o)&&M.isArray(s[r])&&(s[r]=Na(s[r])),!a)}if(M.isFormData(i)&&M.isFunction(i.entries)){const e={};return M.forEachEntry(i,(n,s)=>{t(Ba(n),s,e,0)}),e}return null}const Va={"Content-Type":void 0};function Ha(i,t,e){if(M.isString(i))try{return(t||JSON.parse)(i),M.trim(i)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(i)}const Ai={transitional:Io,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",s=n.indexOf("application/json")>-1,o=M.isObject(t);if(o&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return s&&s?JSON.stringify(zo(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return za(t,this.formSerializer).toString();if((a=M.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Mi(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(e.setContentType("application/json",!1),Ha(t)):t}],transformResponse:[function(t){const e=this.transitional||Ai.transitional,n=e&&e.forcedJSONParsing,s=this.responseType==="json";if(t&&M.isString(t)&&(n&&!this.responseType||s)){const r=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?R.from(a,R.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};M.forEach(["delete","get","head"],function(t){Ai.headers[t]={}});M.forEach(["post","put","patch"],function(t){Ai.headers[t]=M.merge(Va)});const wn=Ai,ja=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wa=i=>{const t={};let e,n,s;return i&&i.split(` `).forEach(function(r){s=r.indexOf(":"),e=r.substring(0,s).trim().toLowerCase(),n=r.substring(s+1).trim(),!(!e||t[e]&&ja[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Yn=Symbol("internals");function ae(i){return i&&String(i).trim().toLowerCase()}function ei(i){return i===!1||i==null?i:M.isArray(i)?i.map(ei):String(i)}function Ua(i){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(i);)t[n[1]]=n[2];return t}const $a=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function Fi(i,t,e,n,s){if(M.isFunction(n))return n.call(this,t,e);if(s&&(t=e),!!M.isString(t)){if(M.isString(n))return t.indexOf(n)!==-1;if(M.isRegExp(n))return n.test(t)}}function Ya(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function Xa(i,t){const e=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+e,{value:function(s,o,r){return this[n].call(this,t,s,o,r)},configurable:!0})})}class Oi{constructor(t){t&&this.set(t)}set(t,e,n){const s=this;function o(a,l,c){const h=ae(l);if(!h)throw new Error("header name must be a non-empty string");const u=M.findKey(s,h);(!u||s[u]===void 0||c===!0||c===void 0&&s[u]!==!1)&&(s[u||l]=ei(a))}const r=(a,l)=>M.forEach(a,(c,h)=>o(c,h,l));return M.isPlainObject(t)||t instanceof this.constructor?r(t,e):M.isString(t)&&(t=t.trim())&&!$a(t)?r(Wa(t),e):t!=null&&o(e,t,n),this}get(t,e){if(t=ae(t),t){const n=M.findKey(this,t);if(n){const s=this[n];if(!e)return s;if(e===!0)return Ua(s);if(M.isFunction(e))return e.call(this,s,n);if(M.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ae(t),t){const n=M.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Fi(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let s=!1;function o(r){if(r=ae(r),r){const a=M.findKey(n,r);a&&(!e||Fi(n,n[a],a,e))&&(delete n[a],s=!0)}}return M.isArray(t)?t.forEach(o):o(t),s}clear(t){const e=Object.keys(this);let n=e.length,s=!1;for(;n--;){const o=e[n];(!t||Fi(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const e=this,n={};return M.forEach(this,(s,o)=>{const r=M.findKey(n,o);if(r){e[r]=ei(s),delete e[o];return}const a=t?Ya(o):String(o).trim();a!==o&&delete e[o],e[a]=ei(s),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,(n,s)=>{n!=null&&n!==!1&&(e[s]=t&&M.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Yn]=this[Yn]={accessors:{}}).accessors,s=this.prototype;function o(r){const a=ae(r);n[a]||(Xa(s,r),n[a]=!0)}return M.isArray(t)?t.forEach(o):o(t),this}}Oi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.freezeMethods(Oi.prototype);M.freezeMethods(Oi);const kt=Oi;function Ii(i,t){const e=this||wn,n=t||e,s=kt.from(n.headers);let o=n.data;return M.forEach(i,function(a){o=a.call(e,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Bo(i){return!!(i&&i.__CANCEL__)}function Le(i,t,e){R.call(this,i==null?"canceled":i,R.ERR_CANCELED,t,e),this.name="CanceledError"}M.inherits(Le,R,{__CANCEL__:!0});function qa(i,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?i(e):t(new R("Request failed with status code "+e.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const Ka=pt.isStandardBrowserEnv?function(){return{write:function(e,n,s,o,r,a){const l=[];l.push(e+"="+encodeURIComponent(n)),M.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),M.isString(o)&&l.push("path="+o),M.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ga(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function Ja(i,t){return t?i.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):i}function No(i,t){return i&&!Ga(t)?Ja(i,t):t}const Za=pt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function s(o){let r=o;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=s(window.location.href),function(r){const a=M.isString(r)?s(r):r;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function Qa(i){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}function tl(i,t){i=i||10;const e=new Array(i),n=new Array(i);let s=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),h=n[o];r||(r=c),e[s]=l,n[s]=c;let u=o,d=0;for(;u!==s;)d+=e[u++],u=u%i;if(s=(s+1)%i,s===o&&(o=(o+1)%i),c-r{const o=s.loaded,r=s.lengthComputable?s.total:void 0,a=o-e,l=n(a),c=o<=r;e=o;const h={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-o)/l:void 0,event:s};h[t?"download":"upload"]=!0,i(h)}}const el=typeof XMLHttpRequest<"u",il=el&&function(i){return new Promise(function(e,n){let s=i.data;const o=kt.from(i.headers).normalize(),r=i.responseType;let a;function l(){i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}M.isFormData(s)&&(pt.isStandardBrowserEnv||pt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(i.auth){const f=i.auth.username||"",p=i.auth.password?unescape(encodeURIComponent(i.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+p))}const h=No(i.baseURL,i.url);c.open(i.method.toUpperCase(),Fo(h,i.params,i.paramsSerializer),!0),c.timeout=i.timeout;function u(){if(!c)return;const f=kt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!r||r==="text"||r==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:i,request:c};qa(function(b){e(b),l()},function(b){n(b),l()},g),c=null}if("onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(u)},c.onabort=function(){c&&(n(new R("Request aborted",R.ECONNABORTED,i,c)),c=null)},c.onerror=function(){n(new R("Network Error",R.ERR_NETWORK,i,c)),c=null},c.ontimeout=function(){let p=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const g=i.transitional||Io;i.timeoutErrorMessage&&(p=i.timeoutErrorMessage),n(new R(p,g.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,i,c)),c=null},pt.isStandardBrowserEnv){const f=(i.withCredentials||Za(h))&&i.xsrfCookieName&&Ka.read(i.xsrfCookieName);f&&o.set(i.xsrfHeaderName,f)}s===void 0&&o.setContentType(null),"setRequestHeader"in c&&M.forEach(o.toJSON(),function(p,g){c.setRequestHeader(g,p)}),M.isUndefined(i.withCredentials)||(c.withCredentials=!!i.withCredentials),r&&r!=="json"&&(c.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&c.addEventListener("progress",Xn(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Xn(i.onUploadProgress)),(i.cancelToken||i.signal)&&(a=f=>{c&&(n(!f||f.type?new Le(null,i,c):f),c.abort(),c=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const d=Qa(h);if(d&&pt.protocols.indexOf(d)===-1){n(new R("Unsupported protocol "+d+":",R.ERR_BAD_REQUEST,i));return}c.send(s||null)})},ii={http:Oa,xhr:il};M.forEach(ii,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch(e){}Object.defineProperty(i,"adapterName",{value:t})}});const nl={getAdapter:i=>{i=M.isArray(i)?i:[i];const{length:t}=i;let e,n;for(let s=0;si instanceof kt?i.toJSON():i;function Zt(i,t){t=t||{};const e={};function n(c,h,u){return M.isPlainObject(c)&&M.isPlainObject(h)?M.merge.call({caseless:u},c,h):M.isPlainObject(h)?M.merge({},h):M.isArray(h)?h.slice():h}function s(c,h,u){if(M.isUndefined(h)){if(!M.isUndefined(c))return n(void 0,c,u)}else return n(c,h,u)}function o(c,h){if(!M.isUndefined(h))return n(void 0,h)}function r(c,h){if(M.isUndefined(h)){if(!M.isUndefined(c))return n(void 0,c)}else return n(void 0,h)}function a(c,h,u){if(u in t)return n(c,h);if(u in i)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,h)=>s(Kn(c),Kn(h),!0)};return M.forEach(Object.keys(Object.assign({},i,t)),function(h){const u=l[h]||s,d=u(i[h],t[h],h);M.isUndefined(d)&&u!==a||(e[h]=d)}),e}const Vo="1.4.0",vn={};["object","boolean","number","function","string","symbol"].forEach((i,t)=>{vn[i]=function(n){return typeof n===i||"a"+(t<1?"n ":" ")+i}});const Gn={};vn.transitional=function(t,e,n){function s(o,r){return"[Axios v"+Vo+"] Transitional option '"+o+"'"+r+(n?". "+n:"")}return(o,r,a)=>{if(t===!1)throw new R(s(r," has been removed"+(e?" in "+e:"")),R.ERR_DEPRECATED);return e&&!Gn[r]&&(Gn[r]=!0,console.warn(s(r," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,r,a):!0}};function sl(i,t,e){if(typeof i!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const n=Object.keys(i);let s=n.length;for(;s-- >0;){const o=n[s],r=t[o];if(r){const a=i[o],l=a===void 0||r(a,o,i);if(l!==!0)throw new R("option "+o+" must be "+l,R.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const tn={assertOptions:sl,validators:vn},Mt=tn.validators;class fi{constructor(t){this.defaults=t,this.interceptors={request:new $n,response:new $n}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Zt(this.defaults,e);const{transitional:n,paramsSerializer:s,headers:o}=e;n!==void 0&&tn.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),s!=null&&(M.isFunction(s)?e.paramsSerializer={serialize:s}:tn.assertOptions(s,{encode:Mt.function,serialize:Mt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let r;r=o&&M.merge(o.common,o[e.method]),r&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),e.headers=kt.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let h,u=0,d;if(!l){const p=[qn.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),d=p.length,h=Promise.resolve(e);u{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const r=new Promise(a=>{n.subscribe(a),o=a}).then(s);return r.cancel=function(){n.unsubscribe(o)},r},t(function(o,r,a){n.reason||(n.reason=new Le(o,r,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new Sn(function(s){t=s}),cancel:t}}}const ol=Sn;function rl(i){return function(e){return i.apply(null,e)}}function al(i){return M.isObject(i)&&i.isAxiosError===!0}const en={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(en).forEach(([i,t])=>{en[t]=i});const ll=en;function Ho(i){const t=new ni(i),e=So(ni.prototype.request,t);return M.extend(e,ni.prototype,t,{allOwnKeys:!0}),M.extend(e,t,null,{allOwnKeys:!0}),e.create=function(s){return Ho(Zt(i,s))},e}const q=Ho(wn);q.Axios=ni;q.CanceledError=Le;q.CancelToken=ol;q.isCancel=Bo;q.VERSION=Vo;q.toFormData=Mi;q.AxiosError=R;q.Cancel=q.CanceledError;q.all=function(t){return Promise.all(t)};q.spread=rl;q.isAxiosError=al;q.mergeConfig=Zt;q.AxiosHeaders=kt;q.formToJSON=i=>zo(M.isHTMLForm(i)?new FormData(i):i);q.HttpStatusCode=ll;q.default=q;const Mf=q;var kn={exports:{}};kn.exports;(function(i){var t=function(){var e=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function r(l,c){if(!o[l]){o[l]={};for(var h=0;h>>8,h[u*2+1]=f%256}return h},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var c=new Array(l.length/2),h=0,u=c.length;h>1}else{for(d=1,u=0;u>1}x--,x==0&&(x=Math.pow(2,w),w++),delete p[b]}else for(d=f[b],u=0;u>1;x--,x==0&&(x=Math.pow(2,w),w++),f[m]=k++,b=String(g)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(u=0;u>1}else{for(d=1,u=0;u>1}x--,x==0&&(x=Math.pow(2,w),w++),delete p[b]}else for(d=f[b],u=0;u>1;x--,x==0&&(x=Math.pow(2,w),w++)}for(d=2,u=0;u>1;for(;;)if(y=y<<1,v==c-1){_.push(h(y));break}else v++;return _.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,h){var u=[],d=4,f=4,p=3,g="",m=[],b,x,k,w,_,y,v,S={val:h(0),position:c,index:1};for(b=0;b<3;b+=1)u[b]=b;for(k=0,_=Math.pow(2,2),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;switch(k){case 0:for(k=0,_=Math.pow(2,8),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;v=e(k);break;case 1:for(k=0,_=Math.pow(2,16),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;v=e(k);break;case 2:return""}for(u[3]=v,x=v,m.push(v);;){if(S.index>l)return"";for(k=0,_=Math.pow(2,p),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;switch(v=k){case 0:for(k=0,_=Math.pow(2,8),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;u[f++]=e(k),v=f-1,d--;break;case 1:for(k=0,_=Math.pow(2,16),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;u[f++]=e(k),v=f-1,d--;break;case 2:return m.join("")}if(d==0&&(d=Math.pow(2,p),p++),u[v])g=u[v];else if(v===f)g=x+x.charAt(0);else return null;m.push(g),u[f++]=x+g.charAt(0),d--,x=g,d==0&&(d=Math.pow(2,p),p++)}}};return a}();i!=null?i.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(kn);var Af=kn.exports;/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License */function Fe(i){return i+.5|0}const At=(i,t,e)=>Math.max(Math.min(i,e),t);function fe(i){return At(Fe(i*2.55),0,255)}function Dt(i){return At(Fe(i*255),0,255)}function _t(i){return At(Fe(i/2.55)/100,0,1)}function Jn(i){return At(Fe(i*100),0,100)}const rt={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},nn=[..."0123456789ABCDEF"],cl=i=>nn[i&15],hl=i=>nn[(i&240)>>4]+nn[i&15],Ne=i=>(i&240)>>4===(i&15),ul=i=>Ne(i.r)&&Ne(i.g)&&Ne(i.b)&&Ne(i.a);function dl(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&rt[i[1]]*17,g:255&rt[i[2]]*17,b:255&rt[i[3]]*17,a:t===5?rt[i[4]]*17:255}:(t===7||t===9)&&(e={r:rt[i[1]]<<4|rt[i[2]],g:rt[i[3]]<<4|rt[i[4]],b:rt[i[5]]<<4|rt[i[6]],a:t===9?rt[i[7]]<<4|rt[i[8]]:255})),e}const fl=(i,t)=>i<255?t(i):"";function pl(i){var t=ul(i)?cl:hl;return i?"#"+t(i.r)+t(i.g)+t(i.b)+fl(i.a,t):void 0}const gl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function jo(i,t,e){const n=t*Math.min(e,1-e),s=(o,r=(o+i/30)%12)=>e-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function ml(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function bl(i,t,e){const n=jo(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function xl(i,t,e,n,s){return i===s?(t-e)/n+(t.5?h/(2-o-r):h/(o+r),l=xl(e,n,s,h,o),l=l*60+.5),[l|0,c||0,a]}function An(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Dt)}function On(i,t,e){return An(jo,i,t,e)}function yl(i,t,e){return An(bl,i,t,e)}function _l(i,t,e){return An(ml,i,t,e)}function Wo(i){return(i%360+360)%360}function wl(i){const t=gl.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?fe(+t[5]):Dt(+t[5]));const s=Wo(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=yl(s,o,r):t[1]==="hsv"?n=_l(s,o,r):n=On(s,o,r),{r:n[0],g:n[1],b:n[2],a:e}}function vl(i,t){var e=Mn(i);e[0]=Wo(e[0]+t),e=On(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Sl(i){if(!i)return;const t=Mn(i),e=t[0],n=Jn(t[1]),s=Jn(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${_t(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const Zn={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"},Qn={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 kl(){const i={},t=Object.keys(Qn),e=Object.keys(Zn);let n,s,o,r,a;for(n=0;n>16&255,o>>8&255,o&255]}return i}let Ve;function Ml(i){Ve||(Ve=kl(),Ve.transparent=[0,0,0,0]);const t=Ve[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Al=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ol(i){const t=Al.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const r=+t[7];e=t[8]?fe(r):At(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?fe(n):At(n,0,255)),s=255&(t[4]?fe(s):At(s,0,255)),o=255&(t[6]?fe(o):At(o,0,255)),{r:n,g:s,b:o,a:e}}}function Pl(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${_t(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Bi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Kt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Tl(i,t,e){const n=Kt(_t(i.r)),s=Kt(_t(i.g)),o=Kt(_t(i.b));return{r:Dt(Bi(n+e*(Kt(_t(t.r))-n))),g:Dt(Bi(s+e*(Kt(_t(t.g))-s))),b:Dt(Bi(o+e*(Kt(_t(t.b))-o))),a:i.a+e*(t.a-i.a)}}function He(i,t,e){if(i){let n=Mn(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=On(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Uo(i,t){return i&&Object.assign(t||{},i)}function ts(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=Dt(i[3]))):(t=Uo(i,{r:0,g:0,b:0,a:1}),t.a=Dt(t.a)),t}function Dl(i){return i.charAt(0)==="r"?Ol(i):wl(i)}class Me{constructor(t){if(t instanceof Me)return t;const e=typeof t;let n;e==="object"?n=ts(t):e==="string"&&(n=dl(t)||Ml(t)||Dl(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Uo(this._rgb);return t&&(t.a=_t(t.a)),t}set rgb(t){this._rgb=ts(t)}rgbString(){return this._valid?Pl(this._rgb):void 0}hexString(){return this._valid?pl(this._rgb):void 0}hslString(){return this._valid?Sl(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=Tl(this._rgb,t._rgb,e)),this}clone(){return new Me(this.rgb)}alpha(t){return this._rgb.a=Dt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Fe(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 He(this._rgb,2,t),this}darken(t){return He(this._rgb,2,-t),this}saturate(t){return He(this._rgb,1,t),this}desaturate(t){return He(this._rgb,1,-t),this}rotate(t){return vl(this._rgb,t),this}}/*! * Chart.js v4.3.0 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License */function bt(){}const Cl=(()=>{let i=0;return()=>i++})();function L(i){return i===null||typeof i>"u"}function N(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 C(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function W(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function st(i,t){return W(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const El=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,$o=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function B(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function I(i,t,e,n){let s,o,r;if(N(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;si,x:i=>i.x,y:i=>i.y};function Fl(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function Il(i){const t=Fl(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Ct(i,t){return(es[t]||(es[t]=Il(t)))(i)}function Pn(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Oe=i=>typeof i<"u",Et=i=>typeof i=="function",is=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function zl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const j=Math.PI,V=2*j,Bl=V+j,mi=Number.POSITIVE_INFINITY,Nl=j/180,U=j/2,Lt=j/4,ns=j*2/3,Ot=Math.log10,gt=Math.sign;function _e(i,t,e){return Math.abs(i-t)s-o).pop(),t}function Qt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Hl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Xo(i,t,e){let n,s,o;for(n=0,s=i.length;nl&&c=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Dn(i,t,e){e=e||(r=>i[r]1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const vt=(i,t,e,n)=>Dn(i,e,n?s=>{const o=i[s][t];return oi[s][t]Dn(i,e,n=>i[n][t]>=e);function $l(i,t,e){let n=0,s=i.length;for(;nn&&i[s-1]>e;)s--;return n>0||s{const n="_onData"+Pn(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function rs(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Ko.forEach(o=>{delete i[o]}),delete i._chartjs)}function Go(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Jo=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Zo(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,Jo.call(window,()=>{n=!1,i.apply(t,e)}))}}function Xl(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Cn=i=>i==="start"?"left":i==="end"?"right":"center",Z=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,ql=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function Qo(i,t,e){const n=t.length;let s=0,o=n;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:u,maxDefined:d}=r.getUserBounds();u&&(s=K(Math.min(vt(a,r.axis,c).lo,e?n:vt(t,l,r.getPixelForValue(c)).lo),0,n-1)),d?o=K(Math.max(vt(a,r.axis,h,!0).hi+1,e?0:vt(t,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function tr(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}const je=i=>i===0||i===1,as=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*V/e)),ls=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*V/e)+1,we={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*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(j*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=>je(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=>je(i)?i:as(i,.075,.3),easeOutElastic:i=>je(i)?i:ls(i,.075,.3),easeInOutElastic(i){return je(i)?i:i<.5?.5*as(i*2,.1125,.45):.5+.5*ls(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-we.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?we.easeInBounce(i*2)*.5:we.easeOutBounce(i*2-1)*.5+.5};function En(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function cs(i){return En(i)?i:new Me(i)}function Ni(i){return En(i)?i:new Me(i).saturate(.5).darken(.1).hexString()}const Kl=["x","y","borderWidth","radius","tension"],Gl=["color","borderColor","backgroundColor"];function Jl(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:Gl},numbers:{type:"number",properties:Kl}}),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 Zl(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hs=new Map;function Ql(i,t){t=t||{};const e=i+JSON.stringify(t);let n=hs.get(e);return n||(n=new Intl.NumberFormat(i,t),hs.set(e,n)),n}function Ie(i,t,e){return Ql(t,e).format(i)}const er={values(i){return N(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=tc(i,e)}const r=Ot(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ie(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(Ot(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?er.numeric.call(this,i,t,e):""}};function tc(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Pi={formatters:er};function ec(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",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:Pi.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 Ut=Object.create(null),on=Object.create(null);function ve(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Ni(s.backgroundColor),this.hoverBorderColor=(n,s)=>Ni(s.borderColor),this.hoverColor=(n,s)=>Ni(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Vi(this,t,e)}get(t){return ve(this,t)}describe(t,e){return Vi(on,t,e)}override(t,e){return Vi(Ut,t,e)}route(t,e,n,s){const o=ve(this,t),r=ve(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[s];return C(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var $=new ic({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jl,Zl,ec]);function nc(i){return!i||L(i.size)||L(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function bi(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function sc(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,u,d;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function St(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,ac(i,o),l=0;l+i||0;function Rn(i,t){const e={},n=C(t),s=n?Object.keys(t):t,o=C(i)?n?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of s)e[r]=fc(o(r));return e}function nr(i){return Rn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function jt(i){return Rn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function tt(i){const t=nr(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||$.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=P(i.style,t.style);n&&!(""+n).match(uc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:P(i.family,t.family),lineHeight:dc(P(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:P(i.weight,t.weight),string:""};return s.string=nc(s),s}function pe(i,t,e,n){let s=!0,o,r,a;for(o=0,r=i.length;oe&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Rt(i,t){return Object.assign(Object.create(i),t)}function Ln(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=ar("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Ln([a,...i],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return or(a,l,()=>vc(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return fs(a).includes(l)},ownKeys(a){return fs(a)},set(a,l,c){const h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function te(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:sr(i,n),setContext:o=>te(i,o,e,n),override:o=>te(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return or(o,r,()=>mc(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 sr(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Et(e)?e:()=>e,isIndexable:Et(n)?n:()=>n}}const gc=(i,t)=>i?i+Pn(t):t,Fn=(i,t)=>C(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function or(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const n=e();return i[t]=n,n}function mc(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i;let a=n[t];return Et(a)&&r.isScriptable(t)&&(a=bc(t,a,i,e)),N(a)&&a.length&&(a=xc(t,a,i,r.isIndexable)),Fn(t,a)&&(a=te(a,s,o&&o[t],r)),a}function bc(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||n);return a.delete(i),Fn(i,l)&&(l=In(s._scopes,s,i,l)),l}function xc(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(C(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=In(c,s,i,h);t.push(te(u,o,r&&r[i],a))}}return t}function rr(i,t,e){return Et(i)?i(t,e):i}const yc=(i,t)=>i===!0?t:typeof i=="string"?Ct(t,i):void 0;function _c(i,t,e,n,s){for(const o of t){const r=yc(e,o);if(r){i.add(r);const a=rr(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(r===!1&&typeof n<"u"&&e!==n)return null}return!1}function In(i,t,e,n){const s=t._rootScopes,o=rr(t._fallback,e,n),r=[...i,...s],a=new Set;a.add(n);let l=ds(a,r,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=ds(a,r,o,l,n),l===null)?!1:Ln(Array.from(a),[""],s,o,()=>wc(t,e,n))}function ds(i,t,e,n,s){for(;e;)e=_c(i,t,e,n,s);return e}function wc(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return N(s)&&C(e)?e:s||{}}function vc(i,t,e,n){let s;for(const o of t)if(s=ar(gc(o,i),e),typeof s<"u")return Fn(i,s)?In(e,n,i,s):s}function ar(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function fs(i){let t=i._keys;return t||(t=i._keys=Sc(i._scopes)),t}function Sc(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function lr(i,t,e,n){const{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,h;for(a=0,l=n;ati==="x"?"y":"x";function Mc(i,t,e,n){const s=i.skip?t:i,o=t,r=e.skip?t:e,a=sn(o,s),l=sn(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+d*(r.x-s.x),y:o.y+d*(r.y-s.y)}}}function Ac(i,t,e){const n=i.length;let s,o,r,a,l,c=ee(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Pc(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function Cc(i,t){return Ci(i).getPropertyValue(t)}const Ec=["top","right","bottom","left"];function Wt(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=Ec[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Rc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Lc(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let r=!1,a,l;if(Rc(s,o,i.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Bt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=Ci(e),o=s.boxSizing==="border-box",r=Wt(s,"padding"),a=Wt(s,"border","width"),{x:l,y:c,box:h}=Lc(i,e),u=r.left+(h&&a.left),d=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-u)/f*e.width/n),y:Math.round((c-d)/p*e.height/n)}}function Fc(i,t,e){let n,s;if(t===void 0||e===void 0){const o=zn(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ci(o),l=Wt(a,"border","width"),c=Wt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,n=xi(a.maxWidth,o,"clientWidth"),s=xi(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||mi,maxHeight:s||mi}}const Ue=i=>Math.round(i*10)/10;function Ic(i,t,e,n){const s=Ci(i),o=Wt(s,"margin"),r=xi(s.maxWidth,i,"clientWidth")||mi,a=xi(s.maxHeight,i,"clientHeight")||mi,l=Fc(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const d=Wt(s,"border","width"),f=Wt(s,"padding");c-=f.width+d.width,h-=f.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n: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)&&n&&l.height&&h>l.height&&(h=l.height,c=Ue(Math.floor(h*n))),{width:c,height:h}}function ps(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const zc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return i}();function gs(i,t){const e=Cc(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Nt(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Bc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Nc(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=Nt(i,s,e),a=Nt(s,o,e),l=Nt(o,t,e),c=Nt(r,a,e),h=Nt(a,l,e);return Nt(c,h,e)}const Vc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},Hc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Jt(i,t,e){return i?Vc(t,e):Hc()}function ur(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function dr(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function fr(i){return i==="angle"?{between:Pe,compare:jl,normalize:ot}:{between:wt,compare:(t,e)=>t-e,normalize:t=>t}}function ms({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function jc(i,t,e){const{property:n,start:s,end:o}=e,{between:r,normalize:a}=fr(n),l=t.length;let{start:c,end:h,loop:u}=i,d,f;if(u){for(c+=l,h+=l,d=0,f=l;dl(s,k,b)&&a(s,k)!==0,_=()=>a(o,b)===0||l(o,k,b),y=()=>g||w(),v=()=>!g||_();for(let S=h,O=h;S<=u;++S)x=t[S%r],!x.skip&&(b=c(x[n]),b!==k&&(g=l(b,s,o),m===null&&y()&&(m=a(b,s)===0?S:O),m!==null&&v()&&(p.push(ms({start:m,end:S,loop:d,count:r,style:f})),m=null),O=S,k=b));return m!==null&&p.push(ms({start:m,end:u,loop:d,count:r,style:f})),p}function gr(i,t){const e=[],n=i.segments;for(let s=0;ss&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Uc(i,t,e,n){const s=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function $c(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const o=!!i._loop,{start:r,end:a}=Wc(e,s,o,n);if(n===!0)return bs(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(n-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Jo.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xt=new qc;const ys="transparent",Kc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=cs(i||ys),s=n.valid&&cs(t||ys);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Gc{constructor(t,e,n,s){const o=e[n];s=pe([t.to,s,o,t.from]);const r=pe([t.from,o,s]);this._active=!0,this._fn=t.fn||Kc[t.type||typeof r],this._easing=we[t.easing]||we.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=pe([t.to,e,s,t.from]),this._from=pe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s{const o=t[s];if(!C(o))return;const r={};for(const a of e)r[a]=o[a];(N(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,e){const n=e.options,s=Zc(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Jc(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let u=o[c];const d=n.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}o[c]=u=new Gc(d,t,c,h),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return xt.add(this._chart,n),!0}}function Jc(i,t){const e=[],n=Object.keys(t);for(let s=0;s0||!e&&o<0)return s.index}return null}function ks(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=ih(o,r,n),u=t.length;let d;for(let f=0;fe[n].axis===t).shift()}function oh(i,t){return Rt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function rh(i,t,e){return Rt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function le(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const ji=i=>i==="reset"||i==="none",Ms=(i,t)=>t?i:Object.assign({},i),ah=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:br(e,!0),values:null};class ht{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=vs(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&&le(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,d,f,p)=>u==="x"?d:u==="r"?p:f,o=e.xAxisID=P(n.xAxisID,Hi(t,"x")),r=e.yAxisID=P(n.yAxisID,Hi(t,"y")),a=e.rAxisID=P(n.rAxisID,Hi(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,r,a),h=e.vAxisID=s(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rs(this._data,this),t._stacked&&le(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(C(e))this._data=eh(e);else if(n!==e){if(n){rs(n,this);const s=this._cachedMeta;le(s),s._parsed=[]}e&&Object.isExtensible(e)&&Yl(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=vs(e.vScale,e),e.stack!==n.stack&&(s=!0,le(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&ks(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,u,d;if(this._parsing===!1)n._parsed=s,n._sorted=!0,d=s;else{N(s[t])?d=this.parseArrayData(n,s,t,e):C(s[t])?d=this.parseObjectData(n,s,t,e):d=this.parsePrimitiveData(n,s,t,e);const f=()=>u[a]===null||c&&u[a]g||u=0;--d)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,r;for(s=0,o=e.length;s=0&&tthis.getContext(n,s,e),g=c.resolveNamedOptions(d,f,p,u);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(Ms(g,l))),g}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,n,e))}const c=new mr(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:r}}updateElement(t,e,n,s){ji(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;as-o))}return i._cache.$bar}function ch(i){const t=i.iScale,e=lh(t,i.type);let n=t._length,s,o,r,a;const l=()=>{r===32767||r===-32768||(Oe(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=e.length;s0?s[i-1]:null,a=iMath.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function xr(i,t,e,n){return N(i)?dh(i,t,e,n):t[e.axis]=e.parse(i,n),t}function As(i,t,e,n){const s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,u,d;for(c=e,h=e+n;c=e?1:-1)}function ph(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.basel.controller.options.grouped),o=n.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(L(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,s=[];let o,r;for(o=0,r=e.data.length;o=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),h=r.axis,u=a.axis;for(let d=e;dPe(k,a,l,!0)?1:Math.max(w,w*e,_,_*e),p=(k,w,_)=>Pe(k,a,l,!0)?-1:Math.min(w,w*e,_,_*e),g=f(0,c,u),m=f(U,h,d),b=p(j,c,u),x=p(j+U,h,d);n=(g-b)/2,s=(m-x)/2,o=-(g+b)/2,r=-(m+x)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}class Ht extends ht{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(C(n[t])){const{key:l="value"}=this._parsing;o=c=>+Ct(n[c],l)}let r,a;for(r=t,a=t+e;r0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ie(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,o,r,a,l;if(!t){for(s=0,o=n.data.datasets.length;st!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),A(Ht,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class ri extends ht{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=Qo(e,s,r);this._drawStart=a,this._drawCount=l,tr(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,s),d=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Qt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",x=e+n,k=t.length;let w=e>0&&this.getParsed(e-1);for(let _=0;_=x){v.skip=!0;continue}const S=this.getParsed(_),O=L(S[f]),T=v[d]=r.getPixelForValue(S[d],_),D=v[f]=o||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[f],_);v.skip=isNaN(T)||isNaN(D)||O,v.stop=_>0&&Math.abs(S[d]-w[d])>m,g&&(v.parsed=S,v.raw=c.data[_]),u&&(v.options=h||this.resolveDataElementOptions(_,y.active?"active":s)),b||this.updateElement(y,_,v,s),w=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}A(ri,"id","line"),A(ri,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),A(ri,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Se extends ht{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ie(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return lr.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(oe.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,s){const o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*j;let f=d,p;const g=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?ct(this.resolveDataElementOptions(t,e).angle||n):0}}A(Se,"id","polarArea"),A(Se,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),A(Se,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class an extends Ht{}A(an,"id","pie"),A(an,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ai extends ht{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return lr.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(n,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){const o=this._cachedMeta.rScale,r=s==="reset";for(let a=e;a0&&this.getParsed(e-1);for(let w=e;w0&&Math.abs(y[f]-k[f])>b,m&&(v.parsed=y,v.raw=c.data[w]),d&&(v.options=u||this.resolveDataElementOptions(w,_.active?"active":s)),x||this.updateElement(_,w,v,s),k=y}this.updateSharedOptions(u,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,r)/2}}A(li,"id","scatter"),A(li,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),A(li,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var yh=Object.freeze({__proto__:null,BarController:si,BubbleController:oi,DoughnutController:Ht,LineController:ri,PieController:an,PolarAreaController:Se,RadarController:ai,ScatterController:li});function It(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Bn{constructor(t){A(this,"options");this.options=t||{}}static override(t){Object.assign(Bn.prototype,t)}init(){}formats(){return It()}parse(){return It()}format(){return It()}add(){return It()}diff(){return It()}startOf(){return It()}endOf(){return It()}}var _h={_date:Bn};function wh(i,t,e,n){const{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Ul:vt;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const u=l(o,t,e-h),d=l(o,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function ze(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}var Mh={evaluateInteractionItems:ze,modes:{index(i,t,e,n){const s=Bt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ui(i,s,o,n,r):$i(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Bt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ui(i,s,o,n,r):$i(i,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function Ds(i,t){return i.filter(e=>yr.indexOf(e.pos)===-1&&e.box.axis===t)}function he(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Ah(i){const t=[];let e,n,s,o,r,a;for(e=0,n=(i||[]).length;ec.box.fullSize),!0),n=he(ce(t,"left"),!0),s=he(ce(t,"right")),o=he(ce(t,"top"),!0),r=he(ce(t,"bottom")),a=Ds(t,"x"),l=Ds(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ce(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Cs(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function _r(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Dh(i,t,e,n){const{pos:s,box:o}=e,r=i.maxPadding;if(!C(s)){e.size&&(i[s]-=e.size);const u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,i[s]+=e.size}o.getPadding&&_r(r,o.getPadding());const a=Math.max(0,t.outerWidth-Cs(r,i,"left","right")),l=Math.max(0,t.outerHeight-Cs(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Ch(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Eh(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return n(i?["left","right"]:["top","bottom"])}function ge(i,t,e,n){const s=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),d=Object.assign({},s);_r(d,tt(n));const f=Object.assign({maxPadding:d,w:o,h:r,x:s.left,y:s.top},s),p=Ph(l.concat(c),u);ge(a.fullSize,f,u,p),ge(l,f,u,p),ge(c,f,u,p)&&ge(l,f,u,p),Ch(f),Es(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Es(a.rightAndBottom,f,u,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},I(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class wr{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class Rh extends wr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ci="$chartjs",Lh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Rs=i=>i===null||i==="";function Fh(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[ci]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Rs(s)){const o=gs(i,"width");o!==void 0&&(i.width=o)}if(Rs(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=gs(i,"height");o!==void 0&&(i.height=o)}return i}const vr=zc?{passive:!0}:!1;function Ih(i,t,e){i.addEventListener(t,e,vr)}function zh(i,t,e){i.canvas.removeEventListener(t,e,vr)}function Bh(i,t){const e=Lh[i.type]||i.type,{x:n,y:s}=Bt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function yi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Nh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yi(a.addedNodes,n),r=r&&!yi(a.removedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Vh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yi(a.removedNodes,n),r=r&&!yi(a.addedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const De=new Map;let Ls=0;function Sr(){const i=window.devicePixelRatio;i!==Ls&&(Ls=i,De.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Hh(i,t){De.size||window.addEventListener("resize",Sr),De.set(i,t)}function jh(i){De.delete(i),De.size||window.removeEventListener("resize",Sr)}function Wh(i,t,e){const n=i.canvas,s=n&&zn(n);if(!s)return;const o=Zo((a,l)=>{const c=s.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(s),Hh(i,o),r}function Yi(i,t,e){e&&e.disconnect(),t==="resize"&&jh(i)}function Uh(i,t,e){const n=i.canvas,s=Zo(o=>{i.ctx!==null&&e(Bh(o,i))},i);return Ih(n,t,s),s}class $h extends wr{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Fh(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[ci])return!1;const n=e[ci].initial;["height","width"].forEach(o=>{const r=n[o];L(r)?e.removeAttribute(o):e.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[ci],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),r={attach:Nh,detach:Vh,resize:Wh}[e]||Uh;s[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:Yi,detach:Yi,resize:Yi}[e]||zh)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return Ic(t,e,n,s)}isAttached(t){const e=zn(t);return!!(e&&e.isConnected)}}function Yh(i){return!hr()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Rh:$h}class ut{constructor(){A(this,"x");A(this,"y");A(this,"active",!1);A(this,"options");A(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Qt(this.x)&&Qt(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}A(ut,"defaults",{}),A(ut,"defaultRoutes");function Xh(i,t){const e=i.options.ticks,n=qh(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?Gh(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Jh(t,c,o,r/s),c;const h=Kh(o,t,s);if(r>0){let u,d;const f=r>1?Math.round((l-a)/(r-1)):null;for(Ye(t,c,h,L(f)?0:a-f,a),u=0,d=r-1;us)return l}return Math.max(s,1)}function Gh(i){const t=[];let e,n;for(e=0,n=i.length;ei==="left"?"right":i==="right"?"left":i,Fs=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Is=(i,t)=>Math.min(t||i,i);function zs(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;or+a)))return l}function eu(i,t){I(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;on?n:e,n=s&&e>n?e:n,{min:st(e,st(n,e)),max:st(n,st(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=pc(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=K(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-ue(t.grid)-e.padding-Bs(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),r=Tn(Math.min(Math.asin(K((h.highest.height+6)/a,-1,1)),Math.asin(K(l/c,-1,1))-Math.asin(K(d/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Bs(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=ue(o)+l):(t.height=this.maxHeight,t.width=ue(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=n.padding*2,p=ct(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=n.mirror?0:m*u.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=n.mirror?0:g*u.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?c?(d=s*t.width,f=n*e.height):(d=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?d=t.width:o!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+r)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;o==="start"?(h=0,u=t.height):o==="end"&&(h=e.height,u=0),this.paddingTop=h+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e({width:r[O]||0,height:a[O]||0});return{first:S(0),last:S(e-1),widest:S(y),highest:S(v),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Wl(this._alignToPixels?Ft(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/n:l/s:l*s0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),d=ue(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(H){return Ft(n,H,g)};let x,k,w,_,y,v,S,O,T,D,E,G;if(r==="top")x=b(this.bottom),v=this.bottom-d,O=x-m,D=b(t.top)+m,G=t.bottom;else if(r==="bottom")x=b(this.top),D=t.top,G=b(t.bottom)-m,v=x+m,O=this.top+d;else if(r==="left")x=b(this.right),y=this.right-d,S=x-m,T=b(t.left)+m,E=t.right;else if(r==="right")x=b(this.left),T=t.left,E=b(t.right)-m,y=x+m,S=this.left+d;else if(e==="x"){if(r==="center")x=b((t.top+t.bottom)/2+.5);else if(C(r)){const H=Object.keys(r)[0],Y=r[H];x=b(this.chart.scales[H].getPixelForValue(Y))}D=t.top,G=t.bottom,v=x+m,O=v+d}else if(e==="y"){if(r==="center")x=b((t.left+t.right)/2);else if(C(r)){const H=Object.keys(r)[0],Y=r[H];x=b(this.chart.scales[H].getPixelForValue(Y))}y=x-m,S=y-d,T=t.left,E=t.right}const nt=P(s.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/nt));for(k=0;ko.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,r=s.length;o{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=e.length;o{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");$.route(o,s,l,a)})}function lu(i){return"id"in i&&"defaults"in i}class cu{constructor(){this.controllers=new Xe(ht,"datasets",!0),this.elements=new Xe(ut,"elements"),this.plugins=new Xe(Object,"plugins"),this.scales=new Xe(Yt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):I(s,r=>{const a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,n){const s=Pn(t);B(n["before"+s],[],n),e[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function uu(i){const t={},e=[],n=Object.keys(ft.plugins.items);for(let o=0;o1&&Ns(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Vs(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function xu(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return Vs(i,"x",e[0])||Vs(i,"y",e[0])}return{}}function yu(i,t){const e=Ut[i.type]||{scales:{}},n=t.scales||{},s=ln(i.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!C(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=cn(r,a,xu(r,i),$.scales[a.type]),c=mu(l,s),h=e.scales||{};o[r]=ye(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||ln(a,t),h=(Ut[a]||{}).scales||{};Object.keys(h).forEach(u=>{const d=gu(u,l),f=r[d+"AxisID"]||d;o[f]=o[f]||Object.create(null),ye(o[f],[{axis:d},n[f],h[u]])})}),Object.keys(o).forEach(r=>{const a=o[r];ye(a,[$.scales[a.type],$.scale])}),o}function kr(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=yu(i,t)}function Mr(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function _u(i){return i=i||{},i.data=Mr(i.data),kr(i),i}const Hs=new Map,Ar=new Set;function qe(i,t){let e=Hs.get(i);return e||(e=t(),Hs.set(i,e),Ar.add(e)),e}const de=(i,t,e)=>{const n=Ct(t,e);n!==void 0&&i.add(n)};class wu{constructor(t){this._config=_u(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=Mr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),kr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return qe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return qe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return qe(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>de(l,t,u))),h.forEach(u=>de(l,s,u)),h.forEach(u=>de(l,Ut[o]||{},u)),h.forEach(u=>de(l,$,u)),h.forEach(u=>de(l,on,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ar.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ut[e]||{},$.datasets[e]||{},{type:e},$,on]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=js(this._resolverCache,t,s);let l=r;if(Su(r,e)){o.$shared=!1,n=Et(n)?n():n;const c=this.createResolver(t,n,a);l=te(r,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=js(this._resolverCache,t,n);return C(e)?te(o,e,void 0,s):o}}function js(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:Ln(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const vu=i=>C(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Et(i[e]),!1);function Su(i,t){const{isScriptable:e,isIndexable:n}=sr(i);for(const s of t){const o=e(s),r=n(s),a=(r||o)&&i[s];if(o&&(Et(a)||vu(a))||r&&N(a))return!0}return!1}var ku="4.3.0";const Mu=["top","bottom","left","right","chartArea"];function Ws(i,t){return i==="top"||i==="bottom"||Mu.indexOf(i)===-1&&t==="x"}function Us(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function $s(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function Au(i){const t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function Or(i){return hr()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const hi={},Ys=i=>{const t=Or(i);return Object.values(hi).filter(e=>e.canvas===t).pop()};function Ou(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const r=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=r)}}}function Pu(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function Tu(i){const{xScale:t,yScale:e}=i;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}class Vt{static register(...t){ft.add(...t),Xs()}static unregister(...t){ft.remove(...t),Xs()}constructor(t,e){const n=this.config=new wu(e),s=Or(t),o=Ys(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Yh(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Cl(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new hu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Xl(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],hi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}xt.listen(this,"complete",$s),xt.listen(this,"progress",Au),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return L(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ps(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return us(this.canvas,this.ctx),this}stop(){return xt.stop(this),this}resize(t,e){xt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ps(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};I(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=cn(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),I(o,r=>{const a=r.options,l=a.id,c=cn(l,a),h=P(a.type,r.dtype);(a.position===void 0||Ws(a.position,c)!==Ws(r.dposition))&&(a.position=r.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===h)u=n[l];else{const d=ft.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),I(s,(r,a)=>{r||delete n[a]}),I(n,r=>{Q.configure(this,r,r.options),Q.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;se.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Us("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){I(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!is(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const r=n==="_removeElements"?-o:o;Ou(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Q.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],I(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=Tu(t)||this.chartArea,r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Ti(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&Di(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return St(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=Mh.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Rt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Oe(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),xt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};I(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){I(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},I(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!pi(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),r=o(e,t),a=n?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,n,r),l=zl(t),c=Pu(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,a,this],this),l&&B(o.onClick,[t,a,this],this));const h=!pi(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}A(Vt,"defaults",$),A(Vt,"instances",hi),A(Vt,"overrides",Ut),A(Vt,"registry",ft),A(Vt,"version",ku),A(Vt,"getChart",Ys);function Xs(){return I(Vt.instances,i=>i._plugins.invalidate())}function Du(i,t,e){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;i.beginPath(),i.arc(o,r,a,n-c,e+c),l>s?(c=s/l,i.arc(o,r,l,e+c,n-c,!0)):i.arc(o,r,s,e+U,n-U),i.closePath(),i.clip()}function Cu(i){return Rn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Eu(i,t,e,n){const s=Cu(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,n*t/2),a=l=>{const c=(e-Math.min(o,l))*n/2;return K(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:K(s.innerStart,0,r),innerEnd:K(s.innerEnd,0,r)}}function Gt(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function _i(i,t,e,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+n+e-c,0),d=h>0?h+n+e+c:0;let f=0;const p=s-l;if(n){const z=h>0?h-n:0,H=u>0?u-n:0,Y=(z+H)/2,lt=Y!==0?p*Y/(Y+n):p;f=(p-lt)/2}const g=Math.max(.001,p*u-e/j)/u,m=(p-g)/2,b=l+m+f,x=s-m-f,{outerStart:k,outerEnd:w,innerStart:_,innerEnd:y}=Eu(t,d,u,x-b),v=u-k,S=u-w,O=b+k/v,T=x-w/S,D=d+_,E=d+y,G=b+_/D,nt=x-y/E;if(i.beginPath(),o){const z=(O+T)/2;if(i.arc(r,a,u,O,z),i.arc(r,a,u,z,T),w>0){const J=Gt(S,T,r,a);i.arc(J.x,J.y,w,T,x+U)}const H=Gt(E,x,r,a);if(i.lineTo(H.x,H.y),y>0){const J=Gt(E,nt,r,a);i.arc(J.x,J.y,y,x+U,nt+Math.PI)}const Y=(x-y/d+(b+_/d))/2;if(i.arc(r,a,d,x-y/d,Y,!0),i.arc(r,a,d,Y,b+_/d,!0),_>0){const J=Gt(D,G,r,a);i.arc(J.x,J.y,_,G+Math.PI,b-U)}const lt=Gt(v,b,r,a);if(i.lineTo(lt.x,lt.y),k>0){const J=Gt(v,O,r,a);i.arc(J.x,J.y,k,b-U,O)}}else{i.moveTo(r,a);const z=Math.cos(O)*u+r,H=Math.sin(O)*u+a;i.lineTo(z,H);const Y=Math.cos(T)*u+r,lt=Math.sin(T)*u+a;i.lineTo(Y,lt)}i.closePath()}function Ru(i,t,e,n,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){_i(i,t,e,n,l,s);for(let c=0;c=V||Pe(r,l,c),m=wt(a,h+f,u+f);return g&&m}getCenterPoint(e){const{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,u=(o+r)/2,d=(a+l+h+c)/2;return{x:n+Math.cos(u)*d,y:s+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>V?Math.floor(s/V):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(j,s||0)),h=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Ru(e,this,h,r,a),Lu(e,this,h,r,a),e.restore()}}A(me,"id","arc"),A(me,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),A(me,"defaultRoutes",{backgroundColor:"backgroundColor"}),A(me,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Pr(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function Fu(i,t,e){i.lineTo(e.x,e.y)}function Iu(i){return i.stepped?oc:i.tension||i.cubicInterpolationMode==="monotone"?rc:Fu}function Tr(i,t,e={}){const n=i.length,{start:s=0,end:o=n-1}=e,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),h=sa&&o>a;return{count:n,start:l,loop:t.loop,ilen:c(r+(c?a-w:w))%o,k=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=s[x(0)],i.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=s[x(d)],f.skip)continue;const w=f.x,_=f.y,y=w|0;y===p?(_m&&(m=_),h=(u*h+w)/++u):(k(),i.lineTo(w,_),p=y,u=0,g=m=_),b=_}k()}function hn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Bu:zu}function Nu(i){return i.stepped?Bc:i.tension||i.cubicInterpolationMode==="monotone"?Nc:Nt}function Vu(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),Pr(i,t.options),i.stroke(s)}function Hu(i,t,e,n){const{segments:s,options:o}=t,r=hn(t);for(const a of s)Pr(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const ju=typeof Path2D=="function";function Wu(i,t,e,n){ju&&!t.options.segment?Vu(i,t,e,n):Hu(i,t,e,n)}class Pt extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;Dc(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$c(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],o=this.points,r=gr(this,{property:e,start:s,end:s});if(!r.length)return;const a=[],l=Nu(n);let c,h;for(c=0,h=r.length;ct!=="borderDash"&&t!=="fill"});function qs(i,t,e,n){const s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Cr(i){return un[i%un.length]}function Er(i){return Ks[i%Ks.length]}function Gu(i,t){return i.borderColor=Cr(t),i.backgroundColor=Er(t),++t}function Ju(i,t){return i.backgroundColor=i.data.map(()=>Cr(t++)),t}function Zu(i,t){return i.backgroundColor=i.data.map(()=>Er(t++)),t}function Qu(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof Ht?t=Ju(e,t):s instanceof Se?t=Zu(e,t):s&&(t=Gu(e,t))}}function Gs(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function td(i){return i&&(i.borderColor||i.backgroundColor)}var ed={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!e.forceOverride&&(Gs(n)||td(s)||o&&Gs(o)))return;const r=Qu(i);n.forEach(r)}};function id(i,t,e,n,s){const o=s.samples||n;if(o>=e)return i.slice(t,t+e);const r=[],a=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,u,d,f,p,g;for(r[l++]=i[h],u=0;uf&&(f=p,d=i[x],g=x);r[l++]=d,h=g}return r[l++]=i[c],r}function nd(i,t,e,n){let s=0,o=0,r,a,l,c,h,u,d,f,p,g;const m=[],b=t+e-1,x=i[t].x,w=i[b].x-x;for(r=t;rg&&(g=c,d=r),s=(o*s+a.x)/++o;else{const y=r-1;if(!L(u)&&!L(d)){const v=Math.min(u,d),S=Math.max(u,d);v!==f&&v!==y&&m.push({...i[v],x:s}),S!==f&&S!==y&&m.push({...i[S],x:s})}r>0&&y!==f&&m.push(i[y]),m.push(a),h=_,o=0,p=g=c,u=d=f=r}}return m}function Rr(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Js(i){i.data.datasets.forEach(t=>{Rr(t)})}function sd(i,t){const e=t.length;let n=0,s;const{iScale:o}=i,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=K(vt(t,o.axis,r).lo,0,e-1)),c?s=K(vt(t,o.axis,a).hi+1,n,e)-n:s=e-n,{start:n,count:s}}var od={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Js(i);return}const n=i.width;i.data.datasets.forEach((s,o)=>{const{_data:r,indexAxis:a}=s,l=i.getDatasetMeta(o),c=r||s.data;if(pe([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:u,count:d}=sd(l,c);const f=e.threshold||4*n;if(d<=f){Rr(s);return}L(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=id(c,u,d,n,e);break;case"min-max":p=nd(c,u,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=p})},destroy(i){Js(i)}};function rd(i,t,e){const n=i.segments,s=i.points,o=t.points,r=[];for(const a of n){let{start:l,end:c}=a;c=Nn(l,c,s);const h=dn(e,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:h,start:s[l],end:s[c]});continue}const u=gr(t,h);for(const d of u){const f=dn(e,o[d.start],o[d.end],d.loop),p=pr(a,s,f);for(const g of p)r.push({source:g,target:d,start:{[e]:Zs(h,f,"start",Math.max)},end:{[e]:Zs(h,f,"end",Math.min)}})}}return r}function dn(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=ot(s),o=ot(o)),{property:i,start:s,end:o}}function ad(i,t){const{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=Nn(r,a,s);const l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Nn(i,t,e){for(;t>i;t--){const n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Zs(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function Lr(i,t){let e=[],n=!1;return N(i)?(n=!0,e=i):e=ad(i,t),e.length?new Pt({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function Qs(i){return i&&i.fill!==!1}function ld(i,t,e){let s=i[t].fill;const o=[t];let r;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!W(s))return s;if(r=i[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function cd(i,t,e){const n=fd(i);if(C(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return W(s)&&Math.floor(s)===s?hd(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function hd(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function ud(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:C(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function dd(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:C(i)?n=i.value:n=t.getBaseValue(),n}function fd(i){const t=i.options,e=t.fill;let n=P(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function pd(i){const{scale:t,index:e,line:n}=i,s=[],o=n.segments,r=n.points,a=gd(t,e);a.push(Lr({x:null,y:t.bottom},n));for(let l=0;l=0;--r){const a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&Ki(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;Qs(o)&&Ki(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const n=t.meta.$filler;!Qs(n)||e.drawTime!=="beforeDatasetDraw"||Ki(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const no=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},Ad=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class so extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=X(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=no(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let u=t;o.textAlign="left",o.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=n+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(u+=h,c[c.length-(g>0?0:1)]=0,f+=h,d++),l[g]={left:0,top:f,row:d,width:m,height:s},c[c.length-1]+=m+a}),u}_fitCols(t,e,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let u=a,d=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:k}=Od(n,e,o,m,s);b>0&&f+k+2*a>h&&(u+=d+a,c.push({width:d,height:f}),p+=d+a,g++,d=f=0),l[b]={left:p,top:f,col:g,width:x,height:k},d=Math.max(d,x),f+=k+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,r=Jt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Z(n,this.left+s,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=Z(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ti(t,this),this._draw(),Di(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=$.color,l=Jt(t.rtl,this.left,this.width),c=X(r.font),{padding:h}=r,u=c.size,d=u/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=no(r,u),b=function(y,v,S){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const O=P(S.lineWidth,1);if(s.fillStyle=P(S.fillStyle,a),s.lineCap=P(S.lineCap,"butt"),s.lineDashOffset=P(S.lineDashOffset,0),s.lineJoin=P(S.lineJoin,"miter"),s.lineWidth=O,s.strokeStyle=P(S.strokeStyle,a),s.setLineDash(P(S.lineDash,[])),r.usePointStyle){const T={radius:g*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:O},D=l.xPlus(y,p/2),E=v+d;ir(s,T,D,E,r.pointStyleWidth&&p)}else{const T=v+Math.max((u-g)/2,0),D=l.leftForLtr(y,p),E=jt(S.borderRadius);s.beginPath(),Object.values(E).some(G=>G!==0)?Te(s,{x:D,y:T,w:p,h:g,radius:E}):s.rect(D,T,p,g),s.fill(),O!==0&&s.stroke()}s.restore()},x=function(y,v,S){$t(s,S.text,y,v+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},k=this.isHorizontal(),w=this._computeTitleHeight();k?f={x:Z(o,this.left+h,this.right-n[0]),y:this.top+h+w,line:0}:f={x:this.left+h,y:Z(o,this.top+w+h,this.bottom-e[0].height),line:0},ur(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((y,v)=>{s.strokeStyle=y.fontColor,s.fillStyle=y.fontColor;const S=s.measureText(y.text).width,O=l.textAlign(y.textAlign||(y.textAlign=r.textAlign)),T=p+d+S;let D=f.x,E=f.y;l.setWidth(this.width),k?v>0&&D+T+h>this.right&&(E=f.y+=_,f.line++,D=f.x=Z(o,this.left+h,this.right-n[f.line])):v>0&&E+_>this.bottom&&(D=f.x=D+e[f.line].width+h,f.line++,E=f.y=Z(o,this.top+w+h,this.bottom-e[f.line].height));const G=l.x(D);if(b(G,E,y),D=ql(O,D+p+d,k?D+T:this.right,t.rtl),x(l.x(D),E,y),k)f.x+=T+h;else if(typeof y.text!="string"){const nt=c.lineHeight;f.y+=Ir(y,nt)}else f.y+=_}),dr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=X(e.font),s=tt(e.padding);if(!e.display)return;const o=Jt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=n.size/2,c=s.top+l;let h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=Z(t.align,u,this.right-d);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+Z(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Z(a,u,u+d);r.textAlign=o.textAlign(Cn(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=n.string,$t(r,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),n=tt(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(wt(t,this.left,this.right)&&wt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;no.length>r.length?o:r)),t+e.size/2+n.measureText(s).width}function Td(i,t,e){let n=i;return typeof t.text!="string"&&(n=Ir(t,e)),n}function Ir(i,t){const e=i.text?i.text.length+.5:0;return t*e}function Dd(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Cd={id:"legend",_element:so,start(i,t,e){const n=i.legend=new so({ctx:i.ctx,options:e,chart:i});Q.configure(i,n,e),Q.addBox(i,n)},stop(i){Q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;Q.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=tt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Vn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=N(n.text)?n.text.length:1;this._padding=tt(n.padding);const o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,h,u;return this.isHorizontal()?(h=Z(a,n,o),u=e+t,c=o-n):(r.position==="left"?(h=n+t,u=Z(a,s,e),l=j*-.5):(h=o-t,u=Z(a,e,s),l=j*.5),c=s-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=X(e.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);$t(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Cn(e.align),textBaseline:"middle",translation:[r,a]})}}function Ed(i,t){const e=new Vn({ctx:i.ctx,options:t,chart:i});Q.configure(i,e,t),Q.addBox(i,e),i.titleBlock=e}var Rd={id:"title",_element:Vn,start(i,t,e){Ed(i,e)},stop(i){const t=i.titleBlock;Q.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;Q.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ke=new WeakMap;var Ld={id:"subtitle",start(i,t,e){const n=new Vn({ctx:i.ctx,options:e,chart:i});Q.configure(i,n,e),Q.addBox(i,n),Ke.set(i,n)},stop(i){Q.removeBox(i,Ke.get(i)),Ke.delete(i)},beforeUpdate(i,t,e){const n=Ke.get(i);Q.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const be={average(i){if(!i.length)return!1;let t,e,n=0,s=0,o=0;for(t=0,e=i.length;t-1?i.split(` `):i}function Fd(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function oo(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),u=o.length,d=s.length,f=n.length,p=tt(t.padding);let g=p.height,m=0,b=n.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let x=0;const k=function(w){m=Math.max(m,e.measureText(w).width+x)};return e.save(),e.font=c.string,I(i.title,k),e.font=l.string,I(i.beforeBody.concat(i.afterBody),k),x=t.displayColors?r+2+t.boxPadding:0,I(n,w=>{I(w.before,k),I(w.lines,k),I(w.after,k)}),x=0,e.font=h.string,I(i.footer,k),e.restore(),m+=p.width,{width:m,height:g}}function Id(i,t){const{y:e,height:n}=t;return ei.height-n/2?"bottom":"center"}function zd(i,t,e,n){const{x:s,width:o}=n,r=e.caretSize+e.caretPadding;if(i==="left"&&s+o+r>t.width||i==="right"&&s-o-r<0)return!0}function Bd(i,t,e,n){const{x:s,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),zd(c,i,t,e)&&(c="center"),c}function ro(i,t,e){const n=e.yAlign||t.yAlign||Id(i,e);return{xAlign:e.xAlign||t.xAlign||Bd(i,t,e,n),yAlign:n}}function Nd(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function Vd(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function ao(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=s+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=jt(r);let p=Nd(t,a);const g=Vd(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,d)+s:a==="right"&&(p+=Math.max(u,f)+s),{x:K(p,0,n.width-t.width),y:K(g,0,n.height-t.height)}}function Ge(i,t,e){const n=tt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function lo(i){return dt([],yt(i))}function Hd(i,t,e){return Rt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function co(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const zr={beforeTitle:bt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex"u"?zr[t].call(e,n):s}class fn extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new mr(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Hd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=et(n,"beforeTitle",this,t),o=et(n,"title",this,t),r=et(n,"afterTitle",this,t);let a=[];return a=dt(a,yt(s)),a=dt(a,yt(o)),a=dt(a,yt(r)),a}getBeforeBody(t,e){return lo(et(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return I(t,o=>{const r={before:[],lines:[],after:[]},a=co(n,o);dt(r.before,yt(et(a,"beforeLabel",this,o))),dt(r.lines,et(a,"label",this,o)),dt(r.after,yt(et(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return lo(et(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=et(n,"beforeFooter",this,t),o=et(n,"footer",this,t),r=et(n,"afterFooter",this,t);let a=[];return a=dt(a,yt(s)),a=dt(a,yt(o)),a=dt(a,yt(r)),a}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;lt.filter(h,u,d,n))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,n))),I(a,h=>{const u=co(t.callbacks,h);s.push(et(u,"labelColor",this,h)),o.push(et(u,"labelPointStyle",this,h)),r.push(et(u,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=be[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=oo(this,n),c=Object.assign({},a,l),h=ro(this.chart,n,c),u=ao(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=jt(a),{x:d,y:f}=t,{width:p,height:g}=e;let m,b,x,k,w,_;return o==="center"?(w=f+g/2,s==="left"?(m=d,b=m-r,k=w+r,_=w-r):(m=d+p,b=m+r,k=w-r,_=w+r),x=m):(s==="left"?b=d+Math.max(l,h)+r:s==="right"?b=d+p-Math.max(c,u)-r:b=this.caretX,o==="top"?(k=f,w=k-r,m=b-r,x=b+r):(k=f+g,w=k+r,m=b+r,x=b-r),_=k),{x1:m,x2:b,x3:x,y1:k,y2:w,y3:_}}drawTitle(t,e,n){const s=this.title,o=s.length;let r,a,l;if(o){const c=Jt(n.rtl,this.x,this.width);for(t.x=Ge(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=X(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Te(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=n,u=X(n.bodyFont);let d=u.lineHeight,f=0;const p=Jt(n.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+f),t.y+d/2),t.y+=d+o},m=p.textAlign(r);let b,x,k,w,_,y,v;for(e.textAlign=r,e.textBaseline="middle",e.font=u.string,t.x=Ge(this,m,n),e.fillStyle=n.bodyColor,I(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,w=0,y=s.length;w0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const r=be[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=oo(this,t),l=Object.assign({},r,this._size),c=ro(e,t,l),h=ao(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=tt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),ur(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),dr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!pi(n,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,n),a=this._positionChanged(r,t),l=e||!pi(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,r=be[o.position].call(this,t,e);return r!==!1&&(n!==r.x||s!==r.y)}}A(fn,"positioners",be);var jd={id:"tooltip",_element:fn,positioners:be,afterInit(i,t,e){e&&(i.tooltip=new fn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:zr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Wd=Object.freeze({__proto__:null,Colors:ed,Decimation:od,Filler:Md,Legend:Cd,SubTitle:Ld,Title:Rd,Tooltip:jd});const Ud=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function $d(i,t,e,n){const s=i.indexOf(t);if(s===-1)return Ud(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Yd=(i,t)=>i===null?null:K(Math.round(i),0,t);function ho(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}A(pn,"id","category"),A(pn,"defaults",{ticks:{callback:ho}});function Xd(i,t){const e=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!L(r),x=!L(a),k=!L(c),w=(m-g)/(u+1);let _=ss((m-g)/p/f)*f,y,v,S,O;if(_<1e-14&&!b&&!x)return[{value:g},{value:m}];O=Math.ceil(m/_)-Math.floor(g/_),O>p&&(_=ss(O*_/p/f)*f),L(l)||(y=Math.pow(10,l),_=Math.ceil(_*y)/y),s==="ticks"?(v=Math.floor(g/_)*_,S=Math.ceil(m/_)*_):(v=g,S=m),b&&x&&o&&Hl((a-r)/o,_/1e3)?(O=Math.round(Math.min((a-r)/_,h)),_=(a-r)/O,v=r,S=a):k?(v=b?r:v,S=x?a:S,O=c-1,_=(S-v)/O):(O=(S-v)/_,_e(O,Math.round(O),_/1e3)?O=Math.round(O):O=Math.ceil(O));const T=Math.max(os(_),os(v));y=Math.pow(10,L(l)?T:l),v=Math.round(v*y)/y,S=Math.round(S*y)/y;let D=0;for(b&&(d&&v!==r?(e.push({value:r}),va)break;e.push({value:E})}return x&&d&&S!==a?e.length&&_e(e[e.length-1].value,a,uo(a,w,i))?e[e.length-1].value=a:e.push({value:a}):(!x||S===a)&&e.push({value:S}),e}function uo(i,t,{horizontal:e,minRotation:n}){const s=ct(n),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class wi extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return L(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=e?s:l,a=l=>o=n?o:l;if(t){const l=gt(s),c=gt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Xd(s,o);return t.bounds==="ticks"&&Xo(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Ie(t,this.chart.options.locale,this.options.ticks.format)}}class gn extends wi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=ct(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}A(gn,"id","linear"),A(gn,"defaults",{ticks:{callback:Pi.formatters.numeric}});const Ce=i=>Math.floor(Ot(i)),zt=(i,t)=>Math.pow(10,Ce(i)+t);function fo(i){return i/Math.pow(10,Ce(i))===1}function po(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function qd(i,t){const e=t-i;let n=Ce(e);for(;po(i,t,n)>10;)n++;for(;po(i,t,n)<10;)n--;return Math.min(n,Ce(i))}function Kd(i,{min:t,max:e}){t=st(i.min,t);const n=[],s=Ce(t);let o=qd(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let u=Math.floor((c-h)/Math.pow(10,o)),d=st(i.min,Math.round((l+h+u*Math.pow(10,o))*r)/r);for(;d=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),d=Math.round((l+h+u*Math.pow(10,o))*r)/r;const f=st(i.max,d);return n.push({value:f,major:fo(f),significand:u}),n}class mn extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=wi.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return W(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!W(this._userMin)&&(this.min=t===zt(this.min,0)?zt(this.min,-1):zt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=a=>n=t?n:a,r=a=>s=e?s:a;n===s&&(n<=0?(o(1),r(10)):(o(zt(n,-1)),r(zt(s,1)))),n<=0&&o(zt(s,-1)),s<=0&&r(zt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Kd(e,this);return t.bounds==="ticks"&&Xo(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ie(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ot(t),this._valueRange=Ot(this.max)-Ot(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ot(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}A(mn,"id","logarithmic"),A(mn,"defaults",{ticks:{callback:Pi.formatters.logarithmic,major:{enabled:!0}}});function bn(i){const t=i.ticks;if(t.display&&i.display){const e=tt(t.backdropPadding);return P(t.font&&t.font.size,$.font.size)+e.height}return 0}function Gd(i,t,e){return e=N(e)?e:[e],{w:sc(i,t.string,e),h:e.length*t.lineHeight}}function go(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:is?{start:t-e,end:t}:{start:t,end:t+e}}function Jd(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?j/o:0;for(let l=0;lt.r&&(a=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),s.startt.b&&(l=(s.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Qd(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,n+s+r,o),c=Math.round(Tn(ot(l.angle+U))),h=of(l.y,a.h,c),u=nf(c),d=sf(l.x,a.w,u);return{visible:!0,x:l.x,y:h,textAlign:u,left:d,top:h,right:d+a.w,bottom:h+a.h}}function tf(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(St({x:e,y:n},t)||St({x:e,y:o},t)||St({x:s,y:n},t)||St({x:s,y:o},t))}function ef(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:bn(o)/2,additionalAngle:r?j/s:0};let c;for(let h=0;h270||e<90)&&(i-=t),i}function rf(i,t,e){const{left:n,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!L(a)){const l=jt(t.borderRadius),c=tt(t.backdropPadding);i.fillStyle=a;const h=n-c.left,u=s-c.top,d=o-n+c.width,f=r-s+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Te(i,{x:h,y:u,w:d,h:f,radius:l}),i.fill()):i.fillRect(h,u,d,f)}}function af(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const r=n.setContext(i.getPointLabelContext(s));rf(e,r,o);const a=X(r.font),{x:l,y:c,textAlign:h}=o;$t(e,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function Br(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,V);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r{const s=B(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=V/(this._pointLabels.length||1),n=this.options.startAngle||0;return ot(t*e+ct(n))}getDistanceFromCenterForValue(t){if(L(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(L(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(u!==0){l=this.getDistanceFromCenterForValue(h.value);const d=this.getContext(u),f=s.setContext(d),p=o.setContext(d);lf(this,f,l,r,p)}}),n.display){for(t.save(),a=r-1;a>=0;a--){const h=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:d}=h;!d||!u||(t.lineWidth=d,t.strokeStyle=u,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const u=tt(c.backdropPadding);t.fillRect(-r/2-u.left,-o-h.size/2-u.top,r+u.width,h.size+u.height)}$t(t,a.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}}A(xe,"id","radialLinear"),A(xe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),A(xe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),A(xe,"descriptors",{angleLines:{_fallback:"grid"}});const Ei={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},it=Object.keys(Ei);function hf(i,t){return i-t}function mo(i,t){if(L(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),W(r)||(r=typeof n=="string"?e.parse(r,n):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(Qt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function bo(i,t,e,n){const s=it.length;for(let o=it.indexOf(i);o=it.indexOf(e);o--){const r=it[o];if(Ei[r].common&&i._adapter.diff(s,n,r)>=t-1)return r}return it[e?it.indexOf(e):0]}function df(i){for(let t=it.indexOf(i)+1,e=it.length;t=t?e[n]:e[s];i[o]=!0}}function ff(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function yo(i,t,e){const n=[],s={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=K(e,0,r),n=K(n,0,r),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||bo(o.minUnit,e,n,this._getLabelCapacity(e)),a=P(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Qt(l)||l===!0,h={};let u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(n,e,r)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+r);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;dg-m).map(g=>+g)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,s){const o=this.options,r=o.ticks.callback;if(r)return B(r,[t,e,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],u=c&&a[c],d=n[e],f=c&&u&&d&&d.major;return this._adapter.format(t,s||(f?u:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=vt(i,"pos",t)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=vt(i,"time",t)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class xn extends Ee{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Je(e,this.min),this._tableRange=Je(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r