mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
47 lines
312 KiB
JavaScript
47 lines
312 KiB
JavaScript
var Gy=Object.defineProperty;var Jy=(n,t,e)=>t in n?Gy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var $=(n,t,e)=>(Jy(n,typeof t!="symbol"?t+"":t,e),e);import{c as $i}from"./antdv-4c8751a8.js";var Zy=Object.defineProperty,Qy=(n,t,e)=>t in n?Zy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,gt=(n,t,e)=>(Qy(n,typeof t!="symbol"?t+"":t,e),e);let Mr=[];const $f=n=>{for(const t of Mr)if(t.status==="running")try{for(const e of t.funcs)e(n-t.startTime)}catch(e){t.destroy(),console.error(e)}requestAnimationFrame($f)};requestAnimationFrame($f);class tv{constructor(){gt(this,"funcs",[]),gt(this,"status","stop"),gt(this,"startTime",0),this.status="running",Mr.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(i=>i===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",Mr=Mr.filter(t=>t!==this)}}class jf{constructor(){gt(this,"timing"),gt(this,"relation","absolute"),gt(this,"easeTime",0),gt(this,"applying",{}),gt(this,"getTime",Date.now),gt(this,"ticker",new tv),gt(this,"value",{}),gt(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(i=>i===!1)&&(this.unlisten("end",e),t("all animated."))};this.listen("end",e)})}async n(t){const e=Object.values(this.applying).filter(r=>r===!0).length;if(e<t)throw new ReferenceError(`You are trying to wait ${t} animate, but there are only ${e} animate animating.`);let i=0;await new Promise(r=>{const o=()=>{i++,i===t&&(this.unlisten("end",o),r(`${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 i=()=>{this.applying[t]===!1&&(this.unlisten("end",i),e(`${t} animated.`))};this.listen("end",i)})}listen(t,e){var i;(i=this.listener)[t]!=null||(i[t]=[]),this.listener[t].push(e)}unlisten(t,e){const i=this.listener[t].findIndex(r=>r===e);if(i===-1)throw new ReferenceError("You are trying to remove a nonexistent listener.");this.listener[t].splice(i,1)}hook(...t){const e=Object.entries(this.listener).filter(i=>t.includes(i[0]));for(const[i,r]of e)for(const o of r)o(this,i)}}function ja(n){return n!=null}async function wO(n){return new Promise(t=>setTimeout(t,n))}class SO extends jf{constructor(){super(),gt(this,"shakeTiming"),gt(this,"path"),gt(this,"multiTiming"),gt(this,"value",{}),gt(this,"size",1),gt(this,"angle",0),gt(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),gt(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),gt(this,"ox",0),gt(this,"oy",0),gt(this,"sx",0),gt(this,"sy",0),gt(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(ja(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:i,shakeTiming:r}=this,o=this.getTime();this.hook("start","shakestart");const l=()=>{const c=this.getTime()-o;c>i&&(this.ticker.remove(l),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const u=c/i,f=r(u);this.sx=f*t,this.sy=f*e};return this.ticker.add(l),this.animateFn.system.shake=l,this}moveAs(t){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=t;const{easeTime:e,relation:i,timing:r}=this,o=this.getTime(),[l,c]=[this.x,this.y],[u,f]=(()=>{if(i==="absolute")return t(1);{const[p,m]=t(1);return[l+p,c+m]}})();this.hook("start","movestart");const d=()=>{const p=this.getTime()-o;if(p>e){this.end(!0,"moveAs");return}const m=p/e,[b,v]=t(r(m));i==="absolute"?(this.ox=b,this.oy=v):(this.ox=l+b,this.oy=c+v)};return this.ticker.add(d,!0),this.animateFn.system.moveAs=d,this.targetValue.system.moveAs=[u,f],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,i=!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 r=this.value[t],o=this.getTime(),{timing:l,relation:c,easeTime:u}=this,f=c==="absolute"?e-r:e;this.hook("start");const d=()=>{const p=this.getTime()-o;if(p>u){this.end(!1,t);return}const m=p/u,b=l(m);this.value[t]=r+b*f};return this.ticker.add(d,i),this.animateFn.custom[t]=d,this.targetValue.custom[t]=f+r,this}applyMulti(t=!1){this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const e=this.bindInfo,i=e.map(d=>this.value[d]),r=this.getTime(),{multiTiming:o,relation:l,easeTime:c}=this,u=o(1);if(u.length!==i.length)throw new TypeError(`The number of binded animate attributes and timing function returns's length does not match. binded: ${e.length}, timing: ${u.length}`);this.hook("start");const f=()=>{const d=this.getTime()-r;if(d>c){this.end(!1,"@@bind");return}const p=d/c,m=o(p);e.forEach((b,v)=>{l==="absolute"?this.value[b]=m[v]:this.value[b]=i[v]+m[v]})};return this.ticker.add(f,t),this.animateFn.custom["@@bind"]=f,this.targetValue.system["@@bind"]=u,this}applySys(t,e,i){i!=="move"&&this.applying[i]===!0&&this.end(!0,i),this.applying[i]=!0;const r=this[t],o=this.getTime(),l=this.timing,c=this.relation,u=this.easeTime,f=c==="absolute"?e-r:e;this.hook("start",`${i}start`);const d=()=>{const p=this.getTime()-o;if(p>u){this.end(!0,i);return}const m=p/u,b=l(m);this[t]=r+f*b,t!=="oy"&&this.hook(i)};this.ticker.add(d,!0),t==="ox"?this.animateFn.system.move[0]=d:t==="oy"?this.animateFn.system.move[1]=d:this.animateFn.system[i]=d,i==="move"?(t==="ox"&&(this.targetValue.system.move[0]=f+r),t==="oy"&&(this.targetValue.system.move[1]=f+r)):i!=="shake"&&(this.targetValue.system[i]=f+r)}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[i,r]=this.targetValue.system.move;this.ox=i,this.oy=r,this.hook("moveend","end")}else if(e==="moveAs"){const[i,r]=this.targetValue.system.moveAs;this.ox=i,this.oy=r,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((i,r)=>{this.value[i]=this.targetValue.system["@@bind"][r]}):(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 AO extends jf{constructor(){super(),gt(this,"now",{}),gt(this,"target",{}),gt(this,"transitionFn",{}),gt(this,"value"),gt(this,"handleSet",(t,e,i)=>(this.transition(e,i),!0)),gt(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(!ja(this.now[t]))return this.now[t]=e,this;this.applying[t]&&this.end(t,!0),this.applying[t]=!0,this.hook("start");const i=this.getTime(),r=this.easeTime,o=this.timing,l=this.now[t],c=e+(this.relation==="absolute"?0:l),u=c-l;this.target[t]=c;const f=()=>{const d=this.getTime()-i;d>=r&&this.end(t);const p=d/r;this.now[t]=o(p)*u+l,this.hook("running")};return this.transitionFn[t]=f,this.ticker.add(f),this}end(t,e=!1){const i=this.transitionFn[t];if(!ja(i))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 Ya=(...n)=>n.reduce((t,e)=>t+e,0),Pa=n=>{if(n===0)return 1;let t=n;for(;n>1;)n--,t*=n;return t},Yf=(n,t)=>Math.round(Pa(t)/(Pa(n)*Pa(t-n))),Or=(n,t,e=i=>1-t(1-i))=>n==="in"?t:n==="out"?e:n==="in-out"?i=>i<.5?t(i*2)/2:.5+e((i-.5)*2)/2:i=>i<.5?e(i*2)/2:.5+t((i-.5)*2)/2,ev=Math.cosh(2),nv=Math.acosh(2),iv=Math.tanh(3);function MO(){return n=>n}function OO(...n){const t=[0].concat(n);t.push(1);const e=t.length,i=Array(e).fill(0).map((r,o)=>Yf(o,e-1));return r=>{const o=i.map((l,c)=>l*t[c]*(1-r)**(e-c-1)*r**c);return Ya(...o)}}function TO(n,t){if(!Number.isInteger(n))throw new TypeError("The first parameter of power timing function only allow integer.");return Or(t,e=>e**n)}function PO(n,t){if(n==="sin")return Or(t,e=>(Math.cosh(e*2)-1)/(ev-1));if(n==="tan"){const e=i=>Math.tanh(i*3)*1/iv;return Or(t,i=>1-e(1-i),e)}if(n==="sec"){const e=i=>1/Math.cosh(i);return Or(t,i=>1-(e(i*nv)-.5)*2)}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")}function kO(n,t,...e){const i=[n].concat(e);i.push(t);const r=i.length,o=Array(r).fill(0).map((l,c)=>Yf(c,r-1));return l=>{const c=o.map((f,d)=>f*i[d][0]*(1-l)**(r-d-1)*l**d),u=o.map((f,d)=>f*i[d][1]*(1-l)**(r-d-1)*l**d);return[Ya(...c),Ya(...u)]}}var qa={},sv={get exports(){return qa},set exports(n){qa=n}};/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/(function(n,t){(function(){var e,i="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,m=2,b=4,v=1,w=2,A=1,O=2,k=4,D=8,L=16,C=32,E=64,I=128,F=256,Y=512,Q=30,tt="...",lt=800,It=16,jt=1,ft=2,xt=3,pt=1/0,Lt=9007199254740991,Wt=17976931348623157e292,Oe=0/0,Jt=4294967295,cn=Jt-1,kn=Jt>>>1,En=[["ary",I],["bind",A],["bindKey",O],["curry",D],["curryRight",L],["flip",Y],["partial",C],["partialRight",E],["rearg",F]],pe="[object Arguments]",Fe="[object Array]",ug="[object AsyncFunction]",wi="[object Boolean]",Si="[object Date]",fg="[object DOMException]",vs="[object Error]",ws="[object Function]",Il="[object GeneratorFunction]",Te="[object Map]",Ai="[object Number]",dg="[object Null]",$e="[object Object]",Fl="[object Promise]",gg="[object Proxy]",Mi="[object RegExp]",Pe="[object Set]",Oi="[object String]",Ss="[object Symbol]",pg="[object Undefined]",Ti="[object WeakMap]",mg="[object WeakSet]",Pi="[object ArrayBuffer]",Qn="[object DataView]",oo="[object Float32Array]",ao="[object Float64Array]",lo="[object Int8Array]",co="[object Int16Array]",ho="[object Int32Array]",uo="[object Uint8Array]",fo="[object Uint8ClampedArray]",go="[object Uint16Array]",po="[object Uint32Array]",_g=/\b__p \+= '';/g,bg=/\b(__p \+=) '' \+/g,xg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bl=/&(?:amp|lt|gt|quot|#39);/g,zl=/[&<>"']/g,yg=RegExp(Bl.source),vg=RegExp(zl.source),wg=/<%-([\s\S]+?)%>/g,Sg=/<%([\s\S]+?)%>/g,Nl=/<%=([\s\S]+?)%>/g,Ag=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mg=/^\w*$/,Og=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mo=/[\\^$.*+?()[\]{}|]/g,Tg=RegExp(mo.source),_o=/^\s+/,Pg=/\s/,kg=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Eg=/\{\n\/\* \[wrapped with (.+)\] \*/,Cg=/,? & /,Rg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dg=/[()=,{}\[\]\/\s]/,Lg=/\\(\\)?/g,Ig=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wl=/\w*$/,Fg=/^[-+]0x[0-9a-f]+$/i,Bg=/^0b[01]+$/i,zg=/^\[object .+?Constructor\]$/,Ng=/^0o[0-7]+$/i,Wg=/^(?:0|[1-9]\d*)$/,Hg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,As=/($^)/,Ug=/['\n\r\u2028\u2029\\]/g,Ms="\\ud800-\\udfff",Vg="\\u0300-\\u036f",$g="\\ufe20-\\ufe2f",jg="\\u20d0-\\u20ff",Hl=Vg+$g+jg,Ul="\\u2700-\\u27bf",Vl="a-z\\xdf-\\xf6\\xf8-\\xff",Yg="\\xac\\xb1\\xd7\\xf7",qg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xg="\\u2000-\\u206f",Kg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$l="A-Z\\xc0-\\xd6\\xd8-\\xde",jl="\\ufe0e\\ufe0f",Yl=Yg+qg+Xg+Kg,bo="['’]",Gg="["+Ms+"]",ql="["+Yl+"]",Os="["+Hl+"]",Xl="\\d+",Jg="["+Ul+"]",Kl="["+Vl+"]",Gl="[^"+Ms+Yl+Xl+Ul+Vl+$l+"]",xo="\\ud83c[\\udffb-\\udfff]",Zg="(?:"+Os+"|"+xo+")",Jl="[^"+Ms+"]",yo="(?:\\ud83c[\\udde6-\\uddff]){2}",vo="[\\ud800-\\udbff][\\udc00-\\udfff]",ti="["+$l+"]",Zl="\\u200d",Ql="(?:"+Kl+"|"+Gl+")",Qg="(?:"+ti+"|"+Gl+")",tc="(?:"+bo+"(?:d|ll|m|re|s|t|ve))?",ec="(?:"+bo+"(?:D|LL|M|RE|S|T|VE))?",nc=Zg+"?",ic="["+jl+"]?",tp="(?:"+Zl+"(?:"+[Jl,yo,vo].join("|")+")"+ic+nc+")*",ep="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",np="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sc=ic+nc+tp,ip="(?:"+[Jg,yo,vo].join("|")+")"+sc,sp="(?:"+[Jl+Os+"?",Os,yo,vo,Gg].join("|")+")",rp=RegExp(bo,"g"),op=RegExp(Os,"g"),wo=RegExp(xo+"(?="+xo+")|"+sp+sc,"g"),ap=RegExp([ti+"?"+Kl+"+"+tc+"(?="+[ql,ti,"$"].join("|")+")",Qg+"+"+ec+"(?="+[ql,ti+Ql,"$"].join("|")+")",ti+"?"+Ql+"+"+tc,ti+"+"+ec,np,ep,Xl,ip].join("|"),"g"),lp=RegExp("["+Zl+Ms+Hl+jl+"]"),cp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],up=-1,wt={};wt[oo]=wt[ao]=wt[lo]=wt[co]=wt[ho]=wt[uo]=wt[fo]=wt[go]=wt[po]=!0,wt[pe]=wt[Fe]=wt[Pi]=wt[wi]=wt[Qn]=wt[Si]=wt[vs]=wt[ws]=wt[Te]=wt[Ai]=wt[$e]=wt[Mi]=wt[Pe]=wt[Oi]=wt[Ti]=!1;var yt={};yt[pe]=yt[Fe]=yt[Pi]=yt[Qn]=yt[wi]=yt[Si]=yt[oo]=yt[ao]=yt[lo]=yt[co]=yt[ho]=yt[Te]=yt[Ai]=yt[$e]=yt[Mi]=yt[Pe]=yt[Oi]=yt[Ss]=yt[uo]=yt[fo]=yt[go]=yt[po]=!0,yt[vs]=yt[ws]=yt[Ti]=!1;var fp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dp={"&":"&","<":"<",">":">",'"':""","'":"'"},gp={"&":"&","<":"<",">":">",""":'"',"'":"'"},pp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mp=parseFloat,_p=parseInt,rc=typeof $i=="object"&&$i&&$i.Object===Object&&$i,bp=typeof self=="object"&&self&&self.Object===Object&&self,Vt=rc||bp||Function("return this")(),So=t&&!t.nodeType&&t,Cn=So&&!0&&n&&!n.nodeType&&n,oc=Cn&&Cn.exports===So,Ao=oc&&rc.process,me=function(){try{var T=Cn&&Cn.require&&Cn.require("util").types;return T||Ao&&Ao.binding&&Ao.binding("util")}catch(B){}}(),ac=me&&me.isArrayBuffer,lc=me&&me.isDate,cc=me&&me.isMap,hc=me&&me.isRegExp,uc=me&&me.isSet,fc=me&&me.isTypedArray;function ae(T,B,R){switch(R.length){case 0:return T.call(B);case 1:return T.call(B,R[0]);case 2:return T.call(B,R[0],R[1]);case 3:return T.call(B,R[0],R[1],R[2])}return T.apply(B,R)}function xp(T,B,R,V){for(var G=-1,ut=T==null?0:T.length;++G<ut;){var Ft=T[G];B(V,Ft,R(Ft),T)}return V}function _e(T,B){for(var R=-1,V=T==null?0:T.length;++R<V&&B(T[R],R,T)!==!1;);return T}function yp(T,B){for(var R=T==null?0:T.length;R--&&B(T[R],R,T)!==!1;);return T}function dc(T,B){for(var R=-1,V=T==null?0:T.length;++R<V;)if(!B(T[R],R,T))return!1;return!0}function hn(T,B){for(var R=-1,V=T==null?0:T.length,G=0,ut=[];++R<V;){var Ft=T[R];B(Ft,R,T)&&(ut[G++]=Ft)}return ut}function Ts(T,B){var R=T==null?0:T.length;return!!R&&ei(T,B,0)>-1}function Mo(T,B,R){for(var V=-1,G=T==null?0:T.length;++V<G;)if(R(B,T[V]))return!0;return!1}function Mt(T,B){for(var R=-1,V=T==null?0:T.length,G=Array(V);++R<V;)G[R]=B(T[R],R,T);return G}function un(T,B){for(var R=-1,V=B.length,G=T.length;++R<V;)T[G+R]=B[R];return T}function Oo(T,B,R,V){var G=-1,ut=T==null?0:T.length;for(V&&ut&&(R=T[++G]);++G<ut;)R=B(R,T[G],G,T);return R}function vp(T,B,R,V){var G=T==null?0:T.length;for(V&&G&&(R=T[--G]);G--;)R=B(R,T[G],G,T);return R}function To(T,B){for(var R=-1,V=T==null?0:T.length;++R<V;)if(B(T[R],R,T))return!0;return!1}var wp=Po("length");function Sp(T){return T.split("")}function Ap(T){return T.match(Rg)||[]}function gc(T,B,R){var V;return R(T,function(G,ut,Ft){if(B(G,ut,Ft))return V=ut,!1}),V}function Ps(T,B,R,V){for(var G=T.length,ut=R+(V?1:-1);V?ut--:++ut<G;)if(B(T[ut],ut,T))return ut;return-1}function ei(T,B,R){return B===B?Fp(T,B,R):Ps(T,pc,R)}function Mp(T,B,R,V){for(var G=R-1,ut=T.length;++G<ut;)if(V(T[G],B))return G;return-1}function pc(T){return T!==T}function mc(T,B){var R=T==null?0:T.length;return R?Eo(T,B)/R:Oe}function Po(T){return function(B){return B==null?e:B[T]}}function ko(T){return function(B){return T==null?e:T[B]}}function _c(T,B,R,V,G){return G(T,function(ut,Ft,bt){R=V?(V=!1,ut):B(R,ut,Ft,bt)}),R}function Op(T,B){var R=T.length;for(T.sort(B);R--;)T[R]=T[R].value;return T}function Eo(T,B){for(var R,V=-1,G=T.length;++V<G;){var ut=B(T[V]);ut!==e&&(R=R===e?ut:R+ut)}return R}function Co(T,B){for(var R=-1,V=Array(T);++R<T;)V[R]=B(R);return V}function Tp(T,B){return Mt(B,function(R){return[R,T[R]]})}function bc(T){return T&&T.slice(0,wc(T)+1).replace(_o,"")}function le(T){return function(B){return T(B)}}function Ro(T,B){return Mt(B,function(R){return T[R]})}function ki(T,B){return T.has(B)}function xc(T,B){for(var R=-1,V=T.length;++R<V&&ei(B,T[R],0)>-1;);return R}function yc(T,B){for(var R=T.length;R--&&ei(B,T[R],0)>-1;);return R}function Pp(T,B){for(var R=T.length,V=0;R--;)T[R]===B&&++V;return V}var kp=ko(fp),Ep=ko(dp);function Cp(T){return"\\"+pp[T]}function Rp(T,B){return T==null?e:T[B]}function ni(T){return lp.test(T)}function Dp(T){return cp.test(T)}function Lp(T){for(var B,R=[];!(B=T.next()).done;)R.push(B.value);return R}function Do(T){var B=-1,R=Array(T.size);return T.forEach(function(V,G){R[++B]=[G,V]}),R}function vc(T,B){return function(R){return T(B(R))}}function fn(T,B){for(var R=-1,V=T.length,G=0,ut=[];++R<V;){var Ft=T[R];(Ft===B||Ft===d)&&(T[R]=d,ut[G++]=R)}return ut}function ks(T){var B=-1,R=Array(T.size);return T.forEach(function(V){R[++B]=V}),R}function Ip(T){var B=-1,R=Array(T.size);return T.forEach(function(V){R[++B]=[V,V]}),R}function Fp(T,B,R){for(var V=R-1,G=T.length;++V<G;)if(T[V]===B)return V;return-1}function Bp(T,B,R){for(var V=R+1;V--;)if(T[V]===B)return V;return V}function ii(T){return ni(T)?Np(T):wp(T)}function ke(T){return ni(T)?Wp(T):Sp(T)}function wc(T){for(var B=T.length;B--&&Pg.test(T.charAt(B)););return B}var zp=ko(gp);function Np(T){for(var B=wo.lastIndex=0;wo.test(T);)++B;return B}function Wp(T){return T.match(wo)||[]}function Hp(T){return T.match(ap)||[]}var Up=function T(B){B=B==null?Vt:si.defaults(Vt.Object(),B,si.pick(Vt,hp));var R=B.Array,V=B.Date,G=B.Error,ut=B.Function,Ft=B.Math,bt=B.Object,Lo=B.RegExp,Vp=B.String,be=B.TypeError,Es=R.prototype,$p=ut.prototype,ri=bt.prototype,Cs=B["__core-js_shared__"],Rs=$p.toString,mt=ri.hasOwnProperty,jp=0,Sc=function(){var s=/[^.]+$/.exec(Cs&&Cs.keys&&Cs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),Ds=ri.toString,Yp=Rs.call(bt),qp=Vt._,Xp=Lo("^"+Rs.call(mt).replace(mo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ls=oc?B.Buffer:e,dn=B.Symbol,Is=B.Uint8Array,Ac=Ls?Ls.allocUnsafe:e,Fs=vc(bt.getPrototypeOf,bt),Mc=bt.create,Oc=ri.propertyIsEnumerable,Bs=Es.splice,Tc=dn?dn.isConcatSpreadable:e,Ei=dn?dn.iterator:e,Rn=dn?dn.toStringTag:e,zs=function(){try{var s=Bn(bt,"defineProperty");return s({},"",{}),s}catch(a){}}(),Kp=B.clearTimeout!==Vt.clearTimeout&&B.clearTimeout,Gp=V&&V.now!==Vt.Date.now&&V.now,Jp=B.setTimeout!==Vt.setTimeout&&B.setTimeout,Ns=Ft.ceil,Ws=Ft.floor,Io=bt.getOwnPropertySymbols,Zp=Ls?Ls.isBuffer:e,Pc=B.isFinite,Qp=Es.join,tm=vc(bt.keys,bt),Bt=Ft.max,Yt=Ft.min,em=V.now,nm=B.parseInt,kc=Ft.random,im=Es.reverse,Fo=Bn(B,"DataView"),Ci=Bn(B,"Map"),Bo=Bn(B,"Promise"),oi=Bn(B,"Set"),Ri=Bn(B,"WeakMap"),Di=Bn(bt,"create"),Hs=Ri&&new Ri,ai={},sm=zn(Fo),rm=zn(Ci),om=zn(Bo),am=zn(oi),lm=zn(Ri),Us=dn?dn.prototype:e,Li=Us?Us.valueOf:e,Ec=Us?Us.toString:e;function x(s){if(Pt(s)&&!J(s)&&!(s instanceof rt)){if(s instanceof xe)return s;if(mt.call(s,"__wrapped__"))return Ch(s)}return new xe(s)}var li=function(){function s(){}return function(a){if(!Tt(a))return{};if(Mc)return Mc(a);s.prototype=a;var h=new s;return s.prototype=e,h}}();function Vs(){}function xe(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=e}x.templateSettings={escape:wg,evaluate:Sg,interpolate:Nl,variable:"",imports:{_:x}},x.prototype=Vs.prototype,x.prototype.constructor=x,xe.prototype=li(Vs.prototype),xe.prototype.constructor=xe;function rt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Jt,this.__views__=[]}function cm(){var s=new rt(this.__wrapped__);return s.__actions__=ee(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=ee(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=ee(this.__views__),s}function hm(){if(this.__filtered__){var s=new rt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function um(){var s=this.__wrapped__.value(),a=this.__dir__,h=J(s),g=a<0,_=h?s.length:0,y=S0(0,_,this.__views__),S=y.start,M=y.end,P=M-S,N=g?M:S-1,W=this.__iteratees__,H=W.length,U=0,j=Yt(P,this.__takeCount__);if(!h||!g&&_==P&&j==P)return th(s,this.__actions__);var X=[];t:for(;P--&&U<j;){N+=a;for(var nt=-1,K=s[N];++nt<H;){var st=W[nt],at=st.iteratee,ue=st.type,te=at(K);if(ue==ft)K=te;else if(!te){if(ue==jt)continue t;break t}}X[U++]=K}return X}rt.prototype=li(Vs.prototype),rt.prototype.constructor=rt;function Dn(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var g=s[a];this.set(g[0],g[1])}}function fm(){this.__data__=Di?Di(null):{},this.size=0}function dm(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function gm(s){var a=this.__data__;if(Di){var h=a[s];return h===u?e:h}return mt.call(a,s)?a[s]:e}function pm(s){var a=this.__data__;return Di?a[s]!==e:mt.call(a,s)}function mm(s,a){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Di&&a===e?u:a,this}Dn.prototype.clear=fm,Dn.prototype.delete=dm,Dn.prototype.get=gm,Dn.prototype.has=pm,Dn.prototype.set=mm;function je(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var g=s[a];this.set(g[0],g[1])}}function _m(){this.__data__=[],this.size=0}function bm(s){var a=this.__data__,h=$s(a,s);if(h<0)return!1;var g=a.length-1;return h==g?a.pop():Bs.call(a,h,1),--this.size,!0}function xm(s){var a=this.__data__,h=$s(a,s);return h<0?e:a[h][1]}function ym(s){return $s(this.__data__,s)>-1}function vm(s,a){var h=this.__data__,g=$s(h,s);return g<0?(++this.size,h.push([s,a])):h[g][1]=a,this}je.prototype.clear=_m,je.prototype.delete=bm,je.prototype.get=xm,je.prototype.has=ym,je.prototype.set=vm;function Ye(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var g=s[a];this.set(g[0],g[1])}}function wm(){this.size=0,this.__data__={hash:new Dn,map:new(Ci||je),string:new Dn}}function Sm(s){var a=nr(this,s).delete(s);return this.size-=a?1:0,a}function Am(s){return nr(this,s).get(s)}function Mm(s){return nr(this,s).has(s)}function Om(s,a){var h=nr(this,s),g=h.size;return h.set(s,a),this.size+=h.size==g?0:1,this}Ye.prototype.clear=wm,Ye.prototype.delete=Sm,Ye.prototype.get=Am,Ye.prototype.has=Mm,Ye.prototype.set=Om;function Ln(s){var a=-1,h=s==null?0:s.length;for(this.__data__=new Ye;++a<h;)this.add(s[a])}function Tm(s){return this.__data__.set(s,u),this}function Pm(s){return this.__data__.has(s)}Ln.prototype.add=Ln.prototype.push=Tm,Ln.prototype.has=Pm;function Ee(s){var a=this.__data__=new je(s);this.size=a.size}function km(){this.__data__=new je,this.size=0}function Em(s){var a=this.__data__,h=a.delete(s);return this.size=a.size,h}function Cm(s){return this.__data__.get(s)}function Rm(s){return this.__data__.has(s)}function Dm(s,a){var h=this.__data__;if(h instanceof je){var g=h.__data__;if(!Ci||g.length<r-1)return g.push([s,a]),this.size=++h.size,this;h=this.__data__=new Ye(g)}return h.set(s,a),this.size=h.size,this}Ee.prototype.clear=km,Ee.prototype.delete=Em,Ee.prototype.get=Cm,Ee.prototype.has=Rm,Ee.prototype.set=Dm;function Cc(s,a){var h=J(s),g=!h&&Nn(s),_=!h&&!g&&bn(s),y=!h&&!g&&!_&&fi(s),S=h||g||_||y,M=S?Co(s.length,Vp):[],P=M.length;for(var N in s)(a||mt.call(s,N))&&!(S&&(N=="length"||_&&(N=="offset"||N=="parent")||y&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||Ge(N,P)))&&M.push(N);return M}function Rc(s){var a=s.length;return a?s[Xo(0,a-1)]:e}function Lm(s,a){return ir(ee(s),In(a,0,s.length))}function Im(s){return ir(ee(s))}function zo(s,a,h){(h!==e&&!Ce(s[a],h)||h===e&&!(a in s))&&qe(s,a,h)}function Ii(s,a,h){var g=s[a];(!(mt.call(s,a)&&Ce(g,h))||h===e&&!(a in s))&&qe(s,a,h)}function $s(s,a){for(var h=s.length;h--;)if(Ce(s[h][0],a))return h;return-1}function Fm(s,a,h,g){return gn(s,function(_,y,S){a(g,_,h(_),S)}),g}function Dc(s,a){return s&&ze(a,Ht(a),s)}function Bm(s,a){return s&&ze(a,ie(a),s)}function qe(s,a,h){a=="__proto__"&&zs?zs(s,a,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[a]=h}function No(s,a){for(var h=-1,g=a.length,_=R(g),y=s==null;++h<g;)_[h]=y?e:xa(s,a[h]);return _}function In(s,a,h){return s===s&&(h!==e&&(s=s<=h?s:h),a!==e&&(s=s>=a?s:a)),s}function ye(s,a,h,g,_,y){var S,M=a&p,P=a&m,N=a&b;if(h&&(S=_?h(s,g,_,y):h(s)),S!==e)return S;if(!Tt(s))return s;var W=J(s);if(W){if(S=M0(s),!M)return ee(s,S)}else{var H=qt(s),U=H==ws||H==Il;if(bn(s))return ih(s,M);if(H==$e||H==pe||U&&!_){if(S=P||U?{}:wh(s),!M)return P?g0(s,Bm(S,s)):d0(s,Dc(S,s))}else{if(!yt[H])return _?s:{};S=O0(s,H,M)}}y||(y=new Ee);var j=y.get(s);if(j)return j;y.set(s,S),Jh(s)?s.forEach(function(K){S.add(ye(K,a,h,K,s,y))}):Kh(s)&&s.forEach(function(K,st){S.set(st,ye(K,a,h,st,s,y))});var X=N?P?ra:sa:P?ie:Ht,nt=W?e:X(s);return _e(nt||s,function(K,st){nt&&(st=K,K=s[st]),Ii(S,st,ye(K,a,h,st,s,y))}),S}function zm(s){var a=Ht(s);return function(h){return Lc(h,s,a)}}function Lc(s,a,h){var g=h.length;if(s==null)return!g;for(s=bt(s);g--;){var _=h[g],y=a[_],S=s[_];if(S===e&&!(_ in s)||!y(S))return!1}return!0}function Ic(s,a,h){if(typeof s!="function")throw new be(l);return Ui(function(){s.apply(e,h)},a)}function Fi(s,a,h,g){var _=-1,y=Ts,S=!0,M=s.length,P=[],N=a.length;if(!M)return P;h&&(a=Mt(a,le(h))),g?(y=Mo,S=!1):a.length>=r&&(y=ki,S=!1,a=new Ln(a));t:for(;++_<M;){var W=s[_],H=h==null?W:h(W);if(W=g||W!==0?W:0,S&&H===H){for(var U=N;U--;)if(a[U]===H)continue t;P.push(W)}else y(a,H,g)||P.push(W)}return P}var gn=lh(Be),Fc=lh(Ho,!0);function Nm(s,a){var h=!0;return gn(s,function(g,_,y){return h=!!a(g,_,y),h}),h}function js(s,a,h){for(var g=-1,_=s.length;++g<_;){var y=s[g],S=a(y);if(S!=null&&(M===e?S===S&&!he(S):h(S,M)))var M=S,P=y}return P}function Wm(s,a,h,g){var _=s.length;for(h=et(h),h<0&&(h=-h>_?0:_+h),g=g===e||g>_?_:et(g),g<0&&(g+=_),g=h>g?0:Qh(g);h<g;)s[h++]=a;return s}function Bc(s,a){var h=[];return gn(s,function(g,_,y){a(g,_,y)&&h.push(g)}),h}function $t(s,a,h,g,_){var y=-1,S=s.length;for(h||(h=P0),_||(_=[]);++y<S;){var M=s[y];a>0&&h(M)?a>1?$t(M,a-1,h,g,_):un(_,M):g||(_[_.length]=M)}return _}var Wo=ch(),zc=ch(!0);function Be(s,a){return s&&Wo(s,a,Ht)}function Ho(s,a){return s&&zc(s,a,Ht)}function Ys(s,a){return hn(a,function(h){return Je(s[h])})}function Fn(s,a){a=mn(a,s);for(var h=0,g=a.length;s!=null&&h<g;)s=s[Ne(a[h++])];return h&&h==g?s:e}function Nc(s,a,h){var g=a(s);return J(s)?g:un(g,h(s))}function Zt(s){return s==null?s===e?pg:dg:Rn&&Rn in bt(s)?w0(s):I0(s)}function Uo(s,a){return s>a}function Hm(s,a){return s!=null&&mt.call(s,a)}function Um(s,a){return s!=null&&a in bt(s)}function Vm(s,a,h){return s>=Yt(a,h)&&s<Bt(a,h)}function Vo(s,a,h){for(var g=h?Mo:Ts,_=s[0].length,y=s.length,S=y,M=R(y),P=1/0,N=[];S--;){var W=s[S];S&&a&&(W=Mt(W,le(a))),P=Yt(W.length,P),M[S]=!h&&(a||_>=120&&W.length>=120)?new Ln(S&&W):e}W=s[0];var H=-1,U=M[0];t:for(;++H<_&&N.length<P;){var j=W[H],X=a?a(j):j;if(j=h||j!==0?j:0,!(U?ki(U,X):g(N,X,h))){for(S=y;--S;){var nt=M[S];if(!(nt?ki(nt,X):g(s[S],X,h)))continue t}U&&U.push(X),N.push(j)}}return N}function $m(s,a,h,g){return Be(s,function(_,y,S){a(g,h(_),y,S)}),g}function Bi(s,a,h){a=mn(a,s),s=Oh(s,a);var g=s==null?s:s[Ne(we(a))];return g==null?e:ae(g,s,h)}function Wc(s){return Pt(s)&&Zt(s)==pe}function jm(s){return Pt(s)&&Zt(s)==Pi}function Ym(s){return Pt(s)&&Zt(s)==Si}function zi(s,a,h,g,_){return s===a?!0:s==null||a==null||!Pt(s)&&!Pt(a)?s!==s&&a!==a:qm(s,a,h,g,zi,_)}function qm(s,a,h,g,_,y){var S=J(s),M=J(a),P=S?Fe:qt(s),N=M?Fe:qt(a);P=P==pe?$e:P,N=N==pe?$e:N;var W=P==$e,H=N==$e,U=P==N;if(U&&bn(s)){if(!bn(a))return!1;S=!0,W=!1}if(U&&!W)return y||(y=new Ee),S||fi(s)?xh(s,a,h,g,_,y):y0(s,a,P,h,g,_,y);if(!(h&v)){var j=W&&mt.call(s,"__wrapped__"),X=H&&mt.call(a,"__wrapped__");if(j||X){var nt=j?s.value():s,K=X?a.value():a;return y||(y=new Ee),_(nt,K,h,g,y)}}return U?(y||(y=new Ee),v0(s,a,h,g,_,y)):!1}function Xm(s){return Pt(s)&&qt(s)==Te}function $o(s,a,h,g){var _=h.length,y=_,S=!g;if(s==null)return!y;for(s=bt(s);_--;){var M=h[_];if(S&&M[2]?M[1]!==s[M[0]]:!(M[0]in s))return!1}for(;++_<y;){M=h[_];var P=M[0],N=s[P],W=M[1];if(S&&M[2]){if(N===e&&!(P in s))return!1}else{var H=new Ee;if(g)var U=g(N,W,P,s,a,H);if(!(U===e?zi(W,N,v|w,g,H):U))return!1}}return!0}function Hc(s){if(!Tt(s)||E0(s))return!1;var a=Je(s)?Xp:zg;return a.test(zn(s))}function Km(s){return Pt(s)&&Zt(s)==Mi}function Gm(s){return Pt(s)&&qt(s)==Pe}function Jm(s){return Pt(s)&&cr(s.length)&&!!wt[Zt(s)]}function Uc(s){return typeof s=="function"?s:s==null?se:typeof s=="object"?J(s)?jc(s[0],s[1]):$c(s):hu(s)}function jo(s){if(!Hi(s))return tm(s);var a=[];for(var h in bt(s))mt.call(s,h)&&h!="constructor"&&a.push(h);return a}function Zm(s){if(!Tt(s))return L0(s);var a=Hi(s),h=[];for(var g in s)g=="constructor"&&(a||!mt.call(s,g))||h.push(g);return h}function Yo(s,a){return s<a}function Vc(s,a){var h=-1,g=ne(s)?R(s.length):[];return gn(s,function(_,y,S){g[++h]=a(_,y,S)}),g}function $c(s){var a=aa(s);return a.length==1&&a[0][2]?Ah(a[0][0],a[0][1]):function(h){return h===s||$o(h,s,a)}}function jc(s,a){return ca(s)&&Sh(a)?Ah(Ne(s),a):function(h){var g=xa(h,s);return g===e&&g===a?ya(h,s):zi(a,g,v|w)}}function qs(s,a,h,g,_){s!==a&&Wo(a,function(y,S){if(_||(_=new Ee),Tt(y))Qm(s,a,S,h,qs,g,_);else{var M=g?g(ua(s,S),y,S+"",s,a,_):e;M===e&&(M=y),zo(s,S,M)}},ie)}function Qm(s,a,h,g,_,y,S){var M=ua(s,h),P=ua(a,h),N=S.get(P);if(N){zo(s,h,N);return}var W=y?y(M,P,h+"",s,a,S):e,H=W===e;if(H){var U=J(P),j=!U&&bn(P),X=!U&&!j&&fi(P);W=P,U||j||X?J(M)?W=M:Ct(M)?W=ee(M):j?(H=!1,W=ih(P,!0)):X?(H=!1,W=sh(P,!0)):W=[]:Vi(P)||Nn(P)?(W=M,Nn(M)?W=tu(M):(!Tt(M)||Je(M))&&(W=wh(P))):H=!1}H&&(S.set(P,W),_(W,P,g,y,S),S.delete(P)),zo(s,h,W)}function Yc(s,a){var h=s.length;if(h)return a+=a<0?h:0,Ge(a,h)?s[a]:e}function qc(s,a,h){a.length?a=Mt(a,function(y){return J(y)?function(S){return Fn(S,y.length===1?y[0]:y)}:y}):a=[se];var g=-1;a=Mt(a,le(q()));var _=Vc(s,function(y,S,M){var P=Mt(a,function(N){return N(y)});return{criteria:P,index:++g,value:y}});return Op(_,function(y,S){return f0(y,S,h)})}function t0(s,a){return Xc(s,a,function(h,g){return ya(s,g)})}function Xc(s,a,h){for(var g=-1,_=a.length,y={};++g<_;){var S=a[g],M=Fn(s,S);h(M,S)&&Ni(y,mn(S,s),M)}return y}function e0(s){return function(a){return Fn(a,s)}}function qo(s,a,h,g){var _=g?Mp:ei,y=-1,S=a.length,M=s;for(s===a&&(a=ee(a)),h&&(M=Mt(s,le(h)));++y<S;)for(var P=0,N=a[y],W=h?h(N):N;(P=_(M,W,P,g))>-1;)M!==s&&Bs.call(M,P,1),Bs.call(s,P,1);return s}function Kc(s,a){for(var h=s?a.length:0,g=h-1;h--;){var _=a[h];if(h==g||_!==y){var y=_;Ge(_)?Bs.call(s,_,1):Jo(s,_)}}return s}function Xo(s,a){return s+Ws(kc()*(a-s+1))}function n0(s,a,h,g){for(var _=-1,y=Bt(Ns((a-s)/(h||1)),0),S=R(y);y--;)S[g?y:++_]=s,s+=h;return S}function Ko(s,a){var h="";if(!s||a<1||a>Lt)return h;do a%2&&(h+=s),a=Ws(a/2),a&&(s+=s);while(a);return h}function it(s,a){return fa(Mh(s,a,se),s+"")}function i0(s){return Rc(di(s))}function s0(s,a){var h=di(s);return ir(h,In(a,0,h.length))}function Ni(s,a,h,g){if(!Tt(s))return s;a=mn(a,s);for(var _=-1,y=a.length,S=y-1,M=s;M!=null&&++_<y;){var P=Ne(a[_]),N=h;if(P==="__proto__"||P==="constructor"||P==="prototype")return s;if(_!=S){var W=M[P];N=g?g(W,P,M):e,N===e&&(N=Tt(W)?W:Ge(a[_+1])?[]:{})}Ii(M,P,N),M=M[P]}return s}var Gc=Hs?function(s,a){return Hs.set(s,a),s}:se,r0=zs?function(s,a){return zs(s,"toString",{configurable:!0,enumerable:!1,value:wa(a),writable:!0})}:se;function o0(s){return ir(di(s))}function ve(s,a,h){var g=-1,_=s.length;a<0&&(a=-a>_?0:_+a),h=h>_?_:h,h<0&&(h+=_),_=a>h?0:h-a>>>0,a>>>=0;for(var y=R(_);++g<_;)y[g]=s[g+a];return y}function a0(s,a){var h;return gn(s,function(g,_,y){return h=a(g,_,y),!h}),!!h}function Xs(s,a,h){var g=0,_=s==null?g:s.length;if(typeof a=="number"&&a===a&&_<=kn){for(;g<_;){var y=g+_>>>1,S=s[y];S!==null&&!he(S)&&(h?S<=a:S<a)?g=y+1:_=y}return _}return Go(s,a,se,h)}function Go(s,a,h,g){var _=0,y=s==null?0:s.length;if(y===0)return 0;a=h(a);for(var S=a!==a,M=a===null,P=he(a),N=a===e;_<y;){var W=Ws((_+y)/2),H=h(s[W]),U=H!==e,j=H===null,X=H===H,nt=he(H);if(S)var K=g||X;else N?K=X&&(g||U):M?K=X&&U&&(g||!j):P?K=X&&U&&!j&&(g||!nt):j||nt?K=!1:K=g?H<=a:H<a;K?_=W+1:y=W}return Yt(y,cn)}function Jc(s,a){for(var h=-1,g=s.length,_=0,y=[];++h<g;){var S=s[h],M=a?a(S):S;if(!h||!Ce(M,P)){var P=M;y[_++]=S===0?0:S}}return y}function Zc(s){return typeof s=="number"?s:he(s)?Oe:+s}function ce(s){if(typeof s=="string")return s;if(J(s))return Mt(s,ce)+"";if(he(s))return Ec?Ec.call(s):"";var a=s+"";return a=="0"&&1/s==-pt?"-0":a}function pn(s,a,h){var g=-1,_=Ts,y=s.length,S=!0,M=[],P=M;if(h)S=!1,_=Mo;else if(y>=r){var N=a?null:b0(s);if(N)return ks(N);S=!1,_=ki,P=new Ln}else P=a?[]:M;t:for(;++g<y;){var W=s[g],H=a?a(W):W;if(W=h||W!==0?W:0,S&&H===H){for(var U=P.length;U--;)if(P[U]===H)continue t;a&&P.push(H),M.push(W)}else _(P,H,h)||(P!==M&&P.push(H),M.push(W))}return M}function Jo(s,a){return a=mn(a,s),s=Oh(s,a),s==null||delete s[Ne(we(a))]}function Qc(s,a,h,g){return Ni(s,a,h(Fn(s,a)),g)}function Ks(s,a,h,g){for(var _=s.length,y=g?_:-1;(g?y--:++y<_)&&a(s[y],y,s););return h?ve(s,g?0:y,g?y+1:_):ve(s,g?y+1:0,g?_:y)}function th(s,a){var h=s;return h instanceof rt&&(h=h.value()),Oo(a,function(g,_){return _.func.apply(_.thisArg,un([g],_.args))},h)}function Zo(s,a,h){var g=s.length;if(g<2)return g?pn(s[0]):[];for(var _=-1,y=R(g);++_<g;)for(var S=s[_],M=-1;++M<g;)M!=_&&(y[_]=Fi(y[_]||S,s[M],a,h));return pn($t(y,1),a,h)}function eh(s,a,h){for(var g=-1,_=s.length,y=a.length,S={};++g<_;){var M=g<y?a[g]:e;h(S,s[g],M)}return S}function Qo(s){return Ct(s)?s:[]}function ta(s){return typeof s=="function"?s:se}function mn(s,a){return J(s)?s:ca(s,a)?[s]:Eh(dt(s))}var l0=it;function _n(s,a,h){var g=s.length;return h=h===e?g:h,!a&&h>=g?s:ve(s,a,h)}var nh=Kp||function(s){return Vt.clearTimeout(s)};function ih(s,a){if(a)return s.slice();var h=s.length,g=Ac?Ac(h):new s.constructor(h);return s.copy(g),g}function ea(s){var a=new s.constructor(s.byteLength);return new Is(a).set(new Is(s)),a}function c0(s,a){var h=a?ea(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function h0(s){var a=new s.constructor(s.source,Wl.exec(s));return a.lastIndex=s.lastIndex,a}function u0(s){return Li?bt(Li.call(s)):{}}function sh(s,a){var h=a?ea(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function rh(s,a){if(s!==a){var h=s!==e,g=s===null,_=s===s,y=he(s),S=a!==e,M=a===null,P=a===a,N=he(a);if(!M&&!N&&!y&&s>a||y&&S&&P&&!M&&!N||g&&S&&P||!h&&P||!_)return 1;if(!g&&!y&&!N&&s<a||N&&h&&_&&!g&&!y||M&&h&&_||!S&&_||!P)return-1}return 0}function f0(s,a,h){for(var g=-1,_=s.criteria,y=a.criteria,S=_.length,M=h.length;++g<S;){var P=rh(_[g],y[g]);if(P){if(g>=M)return P;var N=h[g];return P*(N=="desc"?-1:1)}}return s.index-a.index}function oh(s,a,h,g){for(var _=-1,y=s.length,S=h.length,M=-1,P=a.length,N=Bt(y-S,0),W=R(P+N),H=!g;++M<P;)W[M]=a[M];for(;++_<S;)(H||_<y)&&(W[h[_]]=s[_]);for(;N--;)W[M++]=s[_++];return W}function ah(s,a,h,g){for(var _=-1,y=s.length,S=-1,M=h.length,P=-1,N=a.length,W=Bt(y-M,0),H=R(W+N),U=!g;++_<W;)H[_]=s[_];for(var j=_;++P<N;)H[j+P]=a[P];for(;++S<M;)(U||_<y)&&(H[j+h[S]]=s[_++]);return H}function ee(s,a){var h=-1,g=s.length;for(a||(a=R(g));++h<g;)a[h]=s[h];return a}function ze(s,a,h,g){var _=!h;h||(h={});for(var y=-1,S=a.length;++y<S;){var M=a[y],P=g?g(h[M],s[M],M,h,s):e;P===e&&(P=s[M]),_?qe(h,M,P):Ii(h,M,P)}return h}function d0(s,a){return ze(s,la(s),a)}function g0(s,a){return ze(s,yh(s),a)}function Gs(s,a){return function(h,g){var _=J(h)?xp:Fm,y=a?a():{};return _(h,s,q(g,2),y)}}function ci(s){return it(function(a,h){var g=-1,_=h.length,y=_>1?h[_-1]:e,S=_>2?h[2]:e;for(y=s.length>3&&typeof y=="function"?(_--,y):e,S&&Qt(h[0],h[1],S)&&(y=_<3?e:y,_=1),a=bt(a);++g<_;){var M=h[g];M&&s(a,M,g,y)}return a})}function lh(s,a){return function(h,g){if(h==null)return h;if(!ne(h))return s(h,g);for(var _=h.length,y=a?_:-1,S=bt(h);(a?y--:++y<_)&&g(S[y],y,S)!==!1;);return h}}function ch(s){return function(a,h,g){for(var _=-1,y=bt(a),S=g(a),M=S.length;M--;){var P=S[s?M:++_];if(h(y[P],P,y)===!1)break}return a}}function p0(s,a,h){var g=a&A,_=Wi(s);function y(){var S=this&&this!==Vt&&this instanceof y?_:s;return S.apply(g?h:this,arguments)}return y}function hh(s){return function(a){a=dt(a);var h=ni(a)?ke(a):e,g=h?h[0]:a.charAt(0),_=h?_n(h,1).join(""):a.slice(1);return g[s]()+_}}function hi(s){return function(a){return Oo(lu(au(a).replace(rp,"")),s,"")}}function Wi(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var h=li(s.prototype),g=s.apply(h,a);return Tt(g)?g:h}}function m0(s,a,h){var g=Wi(s);function _(){for(var y=arguments.length,S=R(y),M=y,P=ui(_);M--;)S[M]=arguments[M];var N=y<3&&S[0]!==P&&S[y-1]!==P?[]:fn(S,P);if(y-=N.length,y<h)return ph(s,a,Js,_.placeholder,e,S,N,e,e,h-y);var W=this&&this!==Vt&&this instanceof _?g:s;return ae(W,this,S)}return _}function uh(s){return function(a,h,g){var _=bt(a);if(!ne(a)){var y=q(h,3);a=Ht(a),h=function(M){return y(_[M],M,_)}}var S=s(a,h,g);return S>-1?_[y?a[S]:S]:e}}function fh(s){return Ke(function(a){var h=a.length,g=h,_=xe.prototype.thru;for(s&&a.reverse();g--;){var y=a[g];if(typeof y!="function")throw new be(l);if(_&&!S&&er(y)=="wrapper")var S=new xe([],!0)}for(g=S?g:h;++g<h;){y=a[g];var M=er(y),P=M=="wrapper"?oa(y):e;P&&ha(P[0])&&P[1]==(I|D|C|F)&&!P[4].length&&P[9]==1?S=S[er(P[0])].apply(S,P[3]):S=y.length==1&&ha(y)?S[M]():S.thru(y)}return function(){var N=arguments,W=N[0];if(S&&N.length==1&&J(W))return S.plant(W).value();for(var H=0,U=h?a[H].apply(this,N):W;++H<h;)U=a[H].call(this,U);return U}})}function Js(s,a,h,g,_,y,S,M,P,N){var W=a&I,H=a&A,U=a&O,j=a&(D|L),X=a&Y,nt=U?e:Wi(s);function K(){for(var st=arguments.length,at=R(st),ue=st;ue--;)at[ue]=arguments[ue];if(j)var te=ui(K),fe=Pp(at,te);if(g&&(at=oh(at,g,_,j)),y&&(at=ah(at,y,S,j)),st-=fe,j&&st<N){var Rt=fn(at,te);return ph(s,a,Js,K.placeholder,h,at,Rt,M,P,N-st)}var Re=H?h:this,Qe=U?Re[s]:s;return st=at.length,M?at=F0(at,M):X&&st>1&&at.reverse(),W&&P<st&&(at.length=P),this&&this!==Vt&&this instanceof K&&(Qe=nt||Wi(Qe)),Qe.apply(Re,at)}return K}function dh(s,a){return function(h,g){return $m(h,s,a(g),{})}}function Zs(s,a){return function(h,g){var _;if(h===e&&g===e)return a;if(h!==e&&(_=h),g!==e){if(_===e)return g;typeof h=="string"||typeof g=="string"?(h=ce(h),g=ce(g)):(h=Zc(h),g=Zc(g)),_=s(h,g)}return _}}function na(s){return Ke(function(a){return a=Mt(a,le(q())),it(function(h){var g=this;return s(a,function(_){return ae(_,g,h)})})})}function Qs(s,a){a=a===e?" ":ce(a);var h=a.length;if(h<2)return h?Ko(a,s):a;var g=Ko(a,Ns(s/ii(a)));return ni(a)?_n(ke(g),0,s).join(""):g.slice(0,s)}function _0(s,a,h,g){var _=a&A,y=Wi(s);function S(){for(var M=-1,P=arguments.length,N=-1,W=g.length,H=R(W+P),U=this&&this!==Vt&&this instanceof S?y:s;++N<W;)H[N]=g[N];for(;P--;)H[N++]=arguments[++M];return ae(U,_?h:this,H)}return S}function gh(s){return function(a,h,g){return g&&typeof g!="number"&&Qt(a,h,g)&&(h=g=e),a=Ze(a),h===e?(h=a,a=0):h=Ze(h),g=g===e?a<h?1:-1:Ze(g),n0(a,h,g,s)}}function tr(s){return function(a,h){return typeof a=="string"&&typeof h=="string"||(a=Se(a),h=Se(h)),s(a,h)}}function ph(s,a,h,g,_,y,S,M,P,N){var W=a&D,H=W?S:e,U=W?e:S,j=W?y:e,X=W?e:y;a|=W?C:E,a&=~(W?E:C),a&k||(a&=~(A|O));var nt=[s,a,_,j,H,X,U,M,P,N],K=h.apply(e,nt);return ha(s)&&Th(K,nt),K.placeholder=g,Ph(K,s,a)}function ia(s){var a=Ft[s];return function(h,g){if(h=Se(h),g=g==null?0:Yt(et(g),292),g&&Pc(h)){var _=(dt(h)+"e").split("e"),y=a(_[0]+"e"+(+_[1]+g));return _=(dt(y)+"e").split("e"),+(_[0]+"e"+(+_[1]-g))}return a(h)}}var b0=oi&&1/ks(new oi([,-0]))[1]==pt?function(s){return new oi(s)}:Ma;function mh(s){return function(a){var h=qt(a);return h==Te?Do(a):h==Pe?Ip(a):Tp(a,s(a))}}function Xe(s,a,h,g,_,y,S,M){var P=a&O;if(!P&&typeof s!="function")throw new be(l);var N=g?g.length:0;if(N||(a&=~(C|E),g=_=e),S=S===e?S:Bt(et(S),0),M=M===e?M:et(M),N-=_?_.length:0,a&E){var W=g,H=_;g=_=e}var U=P?e:oa(s),j=[s,a,h,g,_,W,H,y,S,M];if(U&&D0(j,U),s=j[0],a=j[1],h=j[2],g=j[3],_=j[4],M=j[9]=j[9]===e?P?0:s.length:Bt(j[9]-N,0),!M&&a&(D|L)&&(a&=~(D|L)),!a||a==A)var X=p0(s,a,h);else a==D||a==L?X=m0(s,a,M):(a==C||a==(A|C))&&!_.length?X=_0(s,a,h,g):X=Js.apply(e,j);var nt=U?Gc:Th;return Ph(nt(X,j),s,a)}function _h(s,a,h,g){return s===e||Ce(s,ri[h])&&!mt.call(g,h)?a:s}function bh(s,a,h,g,_,y){return Tt(s)&&Tt(a)&&(y.set(a,s),qs(s,a,e,bh,y),y.delete(a)),s}function x0(s){return Vi(s)?e:s}function xh(s,a,h,g,_,y){var S=h&v,M=s.length,P=a.length;if(M!=P&&!(S&&P>M))return!1;var N=y.get(s),W=y.get(a);if(N&&W)return N==a&&W==s;var H=-1,U=!0,j=h&w?new Ln:e;for(y.set(s,a),y.set(a,s);++H<M;){var X=s[H],nt=a[H];if(g)var K=S?g(nt,X,H,a,s,y):g(X,nt,H,s,a,y);if(K!==e){if(K)continue;U=!1;break}if(j){if(!To(a,function(st,at){if(!ki(j,at)&&(X===st||_(X,st,h,g,y)))return j.push(at)})){U=!1;break}}else if(!(X===nt||_(X,nt,h,g,y))){U=!1;break}}return y.delete(s),y.delete(a),U}function y0(s,a,h,g,_,y,S){switch(h){case Qn:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Pi:return!(s.byteLength!=a.byteLength||!y(new Is(s),new Is(a)));case wi:case Si:case Ai:return Ce(+s,+a);case vs:return s.name==a.name&&s.message==a.message;case Mi:case Oi:return s==a+"";case Te:var M=Do;case Pe:var P=g&v;if(M||(M=ks),s.size!=a.size&&!P)return!1;var N=S.get(s);if(N)return N==a;g|=w,S.set(s,a);var W=xh(M(s),M(a),g,_,y,S);return S.delete(s),W;case Ss:if(Li)return Li.call(s)==Li.call(a)}return!1}function v0(s,a,h,g,_,y){var S=h&v,M=sa(s),P=M.length,N=sa(a),W=N.length;if(P!=W&&!S)return!1;for(var H=P;H--;){var U=M[H];if(!(S?U in a:mt.call(a,U)))return!1}var j=y.get(s),X=y.get(a);if(j&&X)return j==a&&X==s;var nt=!0;y.set(s,a),y.set(a,s);for(var K=S;++H<P;){U=M[H];var st=s[U],at=a[U];if(g)var ue=S?g(at,st,U,a,s,y):g(st,at,U,s,a,y);if(!(ue===e?st===at||_(st,at,h,g,y):ue)){nt=!1;break}K||(K=U=="constructor")}if(nt&&!K){var te=s.constructor,fe=a.constructor;te!=fe&&"constructor"in s&&"constructor"in a&&!(typeof te=="function"&&te instanceof te&&typeof fe=="function"&&fe instanceof fe)&&(nt=!1)}return y.delete(s),y.delete(a),nt}function Ke(s){return fa(Mh(s,e,Lh),s+"")}function sa(s){return Nc(s,Ht,la)}function ra(s){return Nc(s,ie,yh)}var oa=Hs?function(s){return Hs.get(s)}:Ma;function er(s){for(var a=s.name+"",h=ai[a],g=mt.call(ai,a)?h.length:0;g--;){var _=h[g],y=_.func;if(y==null||y==s)return _.name}return a}function ui(s){var a=mt.call(x,"placeholder")?x:s;return a.placeholder}function q(){var s=x.iteratee||Sa;return s=s===Sa?Uc:s,arguments.length?s(arguments[0],arguments[1]):s}function nr(s,a){var h=s.__data__;return k0(a)?h[typeof a=="string"?"string":"hash"]:h.map}function aa(s){for(var a=Ht(s),h=a.length;h--;){var g=a[h],_=s[g];a[h]=[g,_,Sh(_)]}return a}function Bn(s,a){var h=Rp(s,a);return Hc(h)?h:e}function w0(s){var a=mt.call(s,Rn),h=s[Rn];try{s[Rn]=e;var g=!0}catch(y){}var _=Ds.call(s);return g&&(a?s[Rn]=h:delete s[Rn]),_}var la=Io?function(s){return s==null?[]:(s=bt(s),hn(Io(s),function(a){return Oc.call(s,a)}))}:Oa,yh=Io?function(s){for(var a=[];s;)un(a,la(s)),s=Fs(s);return a}:Oa,qt=Zt;(Fo&&qt(new Fo(new ArrayBuffer(1)))!=Qn||Ci&&qt(new Ci)!=Te||Bo&&qt(Bo.resolve())!=Fl||oi&&qt(new oi)!=Pe||Ri&&qt(new Ri)!=Ti)&&(qt=function(s){var a=Zt(s),h=a==$e?s.constructor:e,g=h?zn(h):"";if(g)switch(g){case sm:return Qn;case rm:return Te;case om:return Fl;case am:return Pe;case lm:return Ti}return a});function S0(s,a,h){for(var g=-1,_=h.length;++g<_;){var y=h[g],S=y.size;switch(y.type){case"drop":s+=S;break;case"dropRight":a-=S;break;case"take":a=Yt(a,s+S);break;case"takeRight":s=Bt(s,a-S);break}}return{start:s,end:a}}function A0(s){var a=s.match(Eg);return a?a[1].split(Cg):[]}function vh(s,a,h){a=mn(a,s);for(var g=-1,_=a.length,y=!1;++g<_;){var S=Ne(a[g]);if(!(y=s!=null&&h(s,S)))break;s=s[S]}return y||++g!=_?y:(_=s==null?0:s.length,!!_&&cr(_)&&Ge(S,_)&&(J(s)||Nn(s)))}function M0(s){var a=s.length,h=new s.constructor(a);return a&&typeof s[0]=="string"&&mt.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function wh(s){return typeof s.constructor=="function"&&!Hi(s)?li(Fs(s)):{}}function O0(s,a,h){var g=s.constructor;switch(a){case Pi:return ea(s);case wi:case Si:return new g(+s);case Qn:return c0(s,h);case oo:case ao:case lo:case co:case ho:case uo:case fo:case go:case po:return sh(s,h);case Te:return new g;case Ai:case Oi:return new g(s);case Mi:return h0(s);case Pe:return new g;case Ss:return u0(s)}}function T0(s,a){var h=a.length;if(!h)return s;var g=h-1;return a[g]=(h>1?"& ":"")+a[g],a=a.join(h>2?", ":" "),s.replace(kg,`{
|
||
/* [wrapped with `+a+`] */
|
||
`)}function P0(s){return J(s)||Nn(s)||!!(Tc&&s&&s[Tc])}function Ge(s,a){var h=typeof s;return a=a==null?Lt:a,!!a&&(h=="number"||h!="symbol"&&Wg.test(s))&&s>-1&&s%1==0&&s<a}function Qt(s,a,h){if(!Tt(h))return!1;var g=typeof a;return(g=="number"?ne(h)&&Ge(a,h.length):g=="string"&&a in h)?Ce(h[a],s):!1}function ca(s,a){if(J(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||he(s)?!0:Mg.test(s)||!Ag.test(s)||a!=null&&s in bt(a)}function k0(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function ha(s){var a=er(s),h=x[a];if(typeof h!="function"||!(a in rt.prototype))return!1;if(s===h)return!0;var g=oa(h);return!!g&&s===g[0]}function E0(s){return!!Sc&&Sc in s}var C0=Cs?Je:Ta;function Hi(s){var a=s&&s.constructor,h=typeof a=="function"&&a.prototype||ri;return s===h}function Sh(s){return s===s&&!Tt(s)}function Ah(s,a){return function(h){return h==null?!1:h[s]===a&&(a!==e||s in bt(h))}}function R0(s){var a=ar(s,function(g){return h.size===f&&h.clear(),g}),h=a.cache;return a}function D0(s,a){var h=s[1],g=a[1],_=h|g,y=_<(A|O|I),S=g==I&&h==D||g==I&&h==F&&s[7].length<=a[8]||g==(I|F)&&a[7].length<=a[8]&&h==D;if(!(y||S))return s;g&A&&(s[2]=a[2],_|=h&A?0:k);var M=a[3];if(M){var P=s[3];s[3]=P?oh(P,M,a[4]):M,s[4]=P?fn(s[3],d):a[4]}return M=a[5],M&&(P=s[5],s[5]=P?ah(P,M,a[6]):M,s[6]=P?fn(s[5],d):a[6]),M=a[7],M&&(s[7]=M),g&I&&(s[8]=s[8]==null?a[8]:Yt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=_,s}function L0(s){var a=[];if(s!=null)for(var h in bt(s))a.push(h);return a}function I0(s){return Ds.call(s)}function Mh(s,a,h){return a=Bt(a===e?s.length-1:a,0),function(){for(var g=arguments,_=-1,y=Bt(g.length-a,0),S=R(y);++_<y;)S[_]=g[a+_];_=-1;for(var M=R(a+1);++_<a;)M[_]=g[_];return M[a]=h(S),ae(s,this,M)}}function Oh(s,a){return a.length<2?s:Fn(s,ve(a,0,-1))}function F0(s,a){for(var h=s.length,g=Yt(a.length,h),_=ee(s);g--;){var y=a[g];s[g]=Ge(y,h)?_[y]:e}return s}function ua(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Th=kh(Gc),Ui=Jp||function(s,a){return Vt.setTimeout(s,a)},fa=kh(r0);function Ph(s,a,h){var g=a+"";return fa(s,T0(g,B0(A0(g),h)))}function kh(s){var a=0,h=0;return function(){var g=em(),_=It-(g-h);if(h=g,_>0){if(++a>=lt)return arguments[0]}else a=0;return s.apply(e,arguments)}}function ir(s,a){var h=-1,g=s.length,_=g-1;for(a=a===e?g:a;++h<a;){var y=Xo(h,_),S=s[y];s[y]=s[h],s[h]=S}return s.length=a,s}var Eh=R0(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(Og,function(h,g,_,y){a.push(_?y.replace(Lg,"$1"):g||h)}),a});function Ne(s){if(typeof s=="string"||he(s))return s;var a=s+"";return a=="0"&&1/s==-pt?"-0":a}function zn(s){if(s!=null){try{return Rs.call(s)}catch(a){}try{return s+""}catch(a){}}return""}function B0(s,a){return _e(En,function(h){var g="_."+h[0];a&h[1]&&!Ts(s,g)&&s.push(g)}),s.sort()}function Ch(s){if(s instanceof rt)return s.clone();var a=new xe(s.__wrapped__,s.__chain__);return a.__actions__=ee(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function z0(s,a,h){(h?Qt(s,a,h):a===e)?a=1:a=Bt(et(a),0);var g=s==null?0:s.length;if(!g||a<1)return[];for(var _=0,y=0,S=R(Ns(g/a));_<g;)S[y++]=ve(s,_,_+=a);return S}function N0(s){for(var a=-1,h=s==null?0:s.length,g=0,_=[];++a<h;){var y=s[a];y&&(_[g++]=y)}return _}function W0(){var s=arguments.length;if(!s)return[];for(var a=R(s-1),h=arguments[0],g=s;g--;)a[g-1]=arguments[g];return un(J(h)?ee(h):[h],$t(a,1))}var H0=it(function(s,a){return Ct(s)?Fi(s,$t(a,1,Ct,!0)):[]}),U0=it(function(s,a){var h=we(a);return Ct(h)&&(h=e),Ct(s)?Fi(s,$t(a,1,Ct,!0),q(h,2)):[]}),V0=it(function(s,a){var h=we(a);return Ct(h)&&(h=e),Ct(s)?Fi(s,$t(a,1,Ct,!0),e,h):[]});function $0(s,a,h){var g=s==null?0:s.length;return g?(a=h||a===e?1:et(a),ve(s,a<0?0:a,g)):[]}function j0(s,a,h){var g=s==null?0:s.length;return g?(a=h||a===e?1:et(a),a=g-a,ve(s,0,a<0?0:a)):[]}function Y0(s,a){return s&&s.length?Ks(s,q(a,3),!0,!0):[]}function q0(s,a){return s&&s.length?Ks(s,q(a,3),!0):[]}function X0(s,a,h,g){var _=s==null?0:s.length;return _?(h&&typeof h!="number"&&Qt(s,a,h)&&(h=0,g=_),Wm(s,a,h,g)):[]}function Rh(s,a,h){var g=s==null?0:s.length;if(!g)return-1;var _=h==null?0:et(h);return _<0&&(_=Bt(g+_,0)),Ps(s,q(a,3),_)}function Dh(s,a,h){var g=s==null?0:s.length;if(!g)return-1;var _=g-1;return h!==e&&(_=et(h),_=h<0?Bt(g+_,0):Yt(_,g-1)),Ps(s,q(a,3),_,!0)}function Lh(s){var a=s==null?0:s.length;return a?$t(s,1):[]}function K0(s){var a=s==null?0:s.length;return a?$t(s,pt):[]}function G0(s,a){var h=s==null?0:s.length;return h?(a=a===e?1:et(a),$t(s,a)):[]}function J0(s){for(var a=-1,h=s==null?0:s.length,g={};++a<h;){var _=s[a];g[_[0]]=_[1]}return g}function Ih(s){return s&&s.length?s[0]:e}function Z0(s,a,h){var g=s==null?0:s.length;if(!g)return-1;var _=h==null?0:et(h);return _<0&&(_=Bt(g+_,0)),ei(s,a,_)}function Q0(s){var a=s==null?0:s.length;return a?ve(s,0,-1):[]}var t_=it(function(s){var a=Mt(s,Qo);return a.length&&a[0]===s[0]?Vo(a):[]}),e_=it(function(s){var a=we(s),h=Mt(s,Qo);return a===we(h)?a=e:h.pop(),h.length&&h[0]===s[0]?Vo(h,q(a,2)):[]}),n_=it(function(s){var a=we(s),h=Mt(s,Qo);return a=typeof a=="function"?a:e,a&&h.pop(),h.length&&h[0]===s[0]?Vo(h,e,a):[]});function i_(s,a){return s==null?"":Qp.call(s,a)}function we(s){var a=s==null?0:s.length;return a?s[a-1]:e}function s_(s,a,h){var g=s==null?0:s.length;if(!g)return-1;var _=g;return h!==e&&(_=et(h),_=_<0?Bt(g+_,0):Yt(_,g-1)),a===a?Bp(s,a,_):Ps(s,pc,_,!0)}function r_(s,a){return s&&s.length?Yc(s,et(a)):e}var o_=it(Fh);function Fh(s,a){return s&&s.length&&a&&a.length?qo(s,a):s}function a_(s,a,h){return s&&s.length&&a&&a.length?qo(s,a,q(h,2)):s}function l_(s,a,h){return s&&s.length&&a&&a.length?qo(s,a,e,h):s}var c_=Ke(function(s,a){var h=s==null?0:s.length,g=No(s,a);return Kc(s,Mt(a,function(_){return Ge(_,h)?+_:_}).sort(rh)),g});function h_(s,a){var h=[];if(!(s&&s.length))return h;var g=-1,_=[],y=s.length;for(a=q(a,3);++g<y;){var S=s[g];a(S,g,s)&&(h.push(S),_.push(g))}return Kc(s,_),h}function da(s){return s==null?s:im.call(s)}function u_(s,a,h){var g=s==null?0:s.length;return g?(h&&typeof h!="number"&&Qt(s,a,h)?(a=0,h=g):(a=a==null?0:et(a),h=h===e?g:et(h)),ve(s,a,h)):[]}function f_(s,a){return Xs(s,a)}function d_(s,a,h){return Go(s,a,q(h,2))}function g_(s,a){var h=s==null?0:s.length;if(h){var g=Xs(s,a);if(g<h&&Ce(s[g],a))return g}return-1}function p_(s,a){return Xs(s,a,!0)}function m_(s,a,h){return Go(s,a,q(h,2),!0)}function __(s,a){var h=s==null?0:s.length;if(h){var g=Xs(s,a,!0)-1;if(Ce(s[g],a))return g}return-1}function b_(s){return s&&s.length?Jc(s):[]}function x_(s,a){return s&&s.length?Jc(s,q(a,2)):[]}function y_(s){var a=s==null?0:s.length;return a?ve(s,1,a):[]}function v_(s,a,h){return s&&s.length?(a=h||a===e?1:et(a),ve(s,0,a<0?0:a)):[]}function w_(s,a,h){var g=s==null?0:s.length;return g?(a=h||a===e?1:et(a),a=g-a,ve(s,a<0?0:a,g)):[]}function S_(s,a){return s&&s.length?Ks(s,q(a,3),!1,!0):[]}function A_(s,a){return s&&s.length?Ks(s,q(a,3)):[]}var M_=it(function(s){return pn($t(s,1,Ct,!0))}),O_=it(function(s){var a=we(s);return Ct(a)&&(a=e),pn($t(s,1,Ct,!0),q(a,2))}),T_=it(function(s){var a=we(s);return a=typeof a=="function"?a:e,pn($t(s,1,Ct,!0),e,a)});function P_(s){return s&&s.length?pn(s):[]}function k_(s,a){return s&&s.length?pn(s,q(a,2)):[]}function E_(s,a){return a=typeof a=="function"?a:e,s&&s.length?pn(s,e,a):[]}function ga(s){if(!(s&&s.length))return[];var a=0;return s=hn(s,function(h){if(Ct(h))return a=Bt(h.length,a),!0}),Co(a,function(h){return Mt(s,Po(h))})}function Bh(s,a){if(!(s&&s.length))return[];var h=ga(s);return a==null?h:Mt(h,function(g){return ae(a,e,g)})}var C_=it(function(s,a){return Ct(s)?Fi(s,a):[]}),R_=it(function(s){return Zo(hn(s,Ct))}),D_=it(function(s){var a=we(s);return Ct(a)&&(a=e),Zo(hn(s,Ct),q(a,2))}),L_=it(function(s){var a=we(s);return a=typeof a=="function"?a:e,Zo(hn(s,Ct),e,a)}),I_=it(ga);function F_(s,a){return eh(s||[],a||[],Ii)}function B_(s,a){return eh(s||[],a||[],Ni)}var z_=it(function(s){var a=s.length,h=a>1?s[a-1]:e;return h=typeof h=="function"?(s.pop(),h):e,Bh(s,h)});function zh(s){var a=x(s);return a.__chain__=!0,a}function N_(s,a){return a(s),s}function sr(s,a){return a(s)}var W_=Ke(function(s){var a=s.length,h=a?s[0]:0,g=this.__wrapped__,_=function(y){return No(y,s)};return a>1||this.__actions__.length||!(g instanceof rt)||!Ge(h)?this.thru(_):(g=g.slice(h,+h+(a?1:0)),g.__actions__.push({func:sr,args:[_],thisArg:e}),new xe(g,this.__chain__).thru(function(y){return a&&!y.length&&y.push(e),y}))});function H_(){return zh(this)}function U_(){return new xe(this.value(),this.__chain__)}function V_(){this.__values__===e&&(this.__values__=Zh(this.value()));var s=this.__index__>=this.__values__.length,a=s?e:this.__values__[this.__index__++];return{done:s,value:a}}function $_(){return this}function j_(s){for(var a,h=this;h instanceof Vs;){var g=Ch(h);g.__index__=0,g.__values__=e,a?_.__wrapped__=g:a=g;var _=g;h=h.__wrapped__}return _.__wrapped__=s,a}function Y_(){var s=this.__wrapped__;if(s instanceof rt){var a=s;return this.__actions__.length&&(a=new rt(this)),a=a.reverse(),a.__actions__.push({func:sr,args:[da],thisArg:e}),new xe(a,this.__chain__)}return this.thru(da)}function q_(){return th(this.__wrapped__,this.__actions__)}var X_=Gs(function(s,a,h){mt.call(s,h)?++s[h]:qe(s,h,1)});function K_(s,a,h){var g=J(s)?dc:Nm;return h&&Qt(s,a,h)&&(a=e),g(s,q(a,3))}function G_(s,a){var h=J(s)?hn:Bc;return h(s,q(a,3))}var J_=uh(Rh),Z_=uh(Dh);function Q_(s,a){return $t(rr(s,a),1)}function tb(s,a){return $t(rr(s,a),pt)}function eb(s,a,h){return h=h===e?1:et(h),$t(rr(s,a),h)}function Nh(s,a){var h=J(s)?_e:gn;return h(s,q(a,3))}function Wh(s,a){var h=J(s)?yp:Fc;return h(s,q(a,3))}var nb=Gs(function(s,a,h){mt.call(s,h)?s[h].push(a):qe(s,h,[a])});function ib(s,a,h,g){s=ne(s)?s:di(s),h=h&&!g?et(h):0;var _=s.length;return h<0&&(h=Bt(_+h,0)),hr(s)?h<=_&&s.indexOf(a,h)>-1:!!_&&ei(s,a,h)>-1}var sb=it(function(s,a,h){var g=-1,_=typeof a=="function",y=ne(s)?R(s.length):[];return gn(s,function(S){y[++g]=_?ae(a,S,h):Bi(S,a,h)}),y}),rb=Gs(function(s,a,h){qe(s,h,a)});function rr(s,a){var h=J(s)?Mt:Vc;return h(s,q(a,3))}function ob(s,a,h,g){return s==null?[]:(J(a)||(a=a==null?[]:[a]),h=g?e:h,J(h)||(h=h==null?[]:[h]),qc(s,a,h))}var ab=Gs(function(s,a,h){s[h?0:1].push(a)},function(){return[[],[]]});function lb(s,a,h){var g=J(s)?Oo:_c,_=arguments.length<3;return g(s,q(a,4),h,_,gn)}function cb(s,a,h){var g=J(s)?vp:_c,_=arguments.length<3;return g(s,q(a,4),h,_,Fc)}function hb(s,a){var h=J(s)?hn:Bc;return h(s,lr(q(a,3)))}function ub(s){var a=J(s)?Rc:i0;return a(s)}function fb(s,a,h){(h?Qt(s,a,h):a===e)?a=1:a=et(a);var g=J(s)?Lm:s0;return g(s,a)}function db(s){var a=J(s)?Im:o0;return a(s)}function gb(s){if(s==null)return 0;if(ne(s))return hr(s)?ii(s):s.length;var a=qt(s);return a==Te||a==Pe?s.size:jo(s).length}function pb(s,a,h){var g=J(s)?To:a0;return h&&Qt(s,a,h)&&(a=e),g(s,q(a,3))}var mb=it(function(s,a){if(s==null)return[];var h=a.length;return h>1&&Qt(s,a[0],a[1])?a=[]:h>2&&Qt(a[0],a[1],a[2])&&(a=[a[0]]),qc(s,$t(a,1),[])}),or=Gp||function(){return Vt.Date.now()};function _b(s,a){if(typeof a!="function")throw new be(l);return s=et(s),function(){if(--s<1)return a.apply(this,arguments)}}function Hh(s,a,h){return a=h?e:a,a=s&&a==null?s.length:a,Xe(s,I,e,e,e,e,a)}function Uh(s,a){var h;if(typeof a!="function")throw new be(l);return s=et(s),function(){return--s>0&&(h=a.apply(this,arguments)),s<=1&&(a=e),h}}var pa=it(function(s,a,h){var g=A;if(h.length){var _=fn(h,ui(pa));g|=C}return Xe(s,g,a,h,_)}),Vh=it(function(s,a,h){var g=A|O;if(h.length){var _=fn(h,ui(Vh));g|=C}return Xe(a,g,s,h,_)});function $h(s,a,h){a=h?e:a;var g=Xe(s,D,e,e,e,e,e,a);return g.placeholder=$h.placeholder,g}function jh(s,a,h){a=h?e:a;var g=Xe(s,L,e,e,e,e,e,a);return g.placeholder=jh.placeholder,g}function Yh(s,a,h){var g,_,y,S,M,P,N=0,W=!1,H=!1,U=!0;if(typeof s!="function")throw new be(l);a=Se(a)||0,Tt(h)&&(W=!!h.leading,H="maxWait"in h,y=H?Bt(Se(h.maxWait)||0,a):y,U="trailing"in h?!!h.trailing:U);function j(Rt){var Re=g,Qe=_;return g=_=e,N=Rt,S=s.apply(Qe,Re),S}function X(Rt){return N=Rt,M=Ui(st,a),W?j(Rt):S}function nt(Rt){var Re=Rt-P,Qe=Rt-N,uu=a-Re;return H?Yt(uu,y-Qe):uu}function K(Rt){var Re=Rt-P,Qe=Rt-N;return P===e||Re>=a||Re<0||H&&Qe>=y}function st(){var Rt=or();if(K(Rt))return at(Rt);M=Ui(st,nt(Rt))}function at(Rt){return M=e,U&&g?j(Rt):(g=_=e,S)}function ue(){M!==e&&nh(M),N=0,g=P=_=M=e}function te(){return M===e?S:at(or())}function fe(){var Rt=or(),Re=K(Rt);if(g=arguments,_=this,P=Rt,Re){if(M===e)return X(P);if(H)return nh(M),M=Ui(st,a),j(P)}return M===e&&(M=Ui(st,a)),S}return fe.cancel=ue,fe.flush=te,fe}var bb=it(function(s,a){return Ic(s,1,a)}),xb=it(function(s,a,h){return Ic(s,Se(a)||0,h)});function yb(s){return Xe(s,Y)}function ar(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new be(l);var h=function(){var g=arguments,_=a?a.apply(this,g):g[0],y=h.cache;if(y.has(_))return y.get(_);var S=s.apply(this,g);return h.cache=y.set(_,S)||y,S};return h.cache=new(ar.Cache||Ye),h}ar.Cache=Ye;function lr(s){if(typeof s!="function")throw new be(l);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function vb(s){return Uh(2,s)}var wb=l0(function(s,a){a=a.length==1&&J(a[0])?Mt(a[0],le(q())):Mt($t(a,1),le(q()));var h=a.length;return it(function(g){for(var _=-1,y=Yt(g.length,h);++_<y;)g[_]=a[_].call(this,g[_]);return ae(s,this,g)})}),ma=it(function(s,a){var h=fn(a,ui(ma));return Xe(s,C,e,a,h)}),qh=it(function(s,a){var h=fn(a,ui(qh));return Xe(s,E,e,a,h)}),Sb=Ke(function(s,a){return Xe(s,F,e,e,e,a)});function Ab(s,a){if(typeof s!="function")throw new be(l);return a=a===e?a:et(a),it(s,a)}function Mb(s,a){if(typeof s!="function")throw new be(l);return a=a==null?0:Bt(et(a),0),it(function(h){var g=h[a],_=_n(h,0,a);return g&&un(_,g),ae(s,this,_)})}function Ob(s,a,h){var g=!0,_=!0;if(typeof s!="function")throw new be(l);return Tt(h)&&(g="leading"in h?!!h.leading:g,_="trailing"in h?!!h.trailing:_),Yh(s,a,{leading:g,maxWait:a,trailing:_})}function Tb(s){return Hh(s,1)}function Pb(s,a){return ma(ta(a),s)}function kb(){if(!arguments.length)return[];var s=arguments[0];return J(s)?s:[s]}function Eb(s){return ye(s,b)}function Cb(s,a){return a=typeof a=="function"?a:e,ye(s,b,a)}function Rb(s){return ye(s,p|b)}function Db(s,a){return a=typeof a=="function"?a:e,ye(s,p|b,a)}function Lb(s,a){return a==null||Lc(s,a,Ht(a))}function Ce(s,a){return s===a||s!==s&&a!==a}var Ib=tr(Uo),Fb=tr(function(s,a){return s>=a}),Nn=Wc(function(){return arguments}())?Wc:function(s){return Pt(s)&&mt.call(s,"callee")&&!Oc.call(s,"callee")},J=R.isArray,Bb=ac?le(ac):jm;function ne(s){return s!=null&&cr(s.length)&&!Je(s)}function Ct(s){return Pt(s)&&ne(s)}function zb(s){return s===!0||s===!1||Pt(s)&&Zt(s)==wi}var bn=Zp||Ta,Nb=lc?le(lc):Ym;function Wb(s){return Pt(s)&&s.nodeType===1&&!Vi(s)}function Hb(s){if(s==null)return!0;if(ne(s)&&(J(s)||typeof s=="string"||typeof s.splice=="function"||bn(s)||fi(s)||Nn(s)))return!s.length;var a=qt(s);if(a==Te||a==Pe)return!s.size;if(Hi(s))return!jo(s).length;for(var h in s)if(mt.call(s,h))return!1;return!0}function Ub(s,a){return zi(s,a)}function Vb(s,a,h){h=typeof h=="function"?h:e;var g=h?h(s,a):e;return g===e?zi(s,a,e,h):!!g}function _a(s){if(!Pt(s))return!1;var a=Zt(s);return a==vs||a==fg||typeof s.message=="string"&&typeof s.name=="string"&&!Vi(s)}function $b(s){return typeof s=="number"&&Pc(s)}function Je(s){if(!Tt(s))return!1;var a=Zt(s);return a==ws||a==Il||a==ug||a==gg}function Xh(s){return typeof s=="number"&&s==et(s)}function cr(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Lt}function Tt(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function Pt(s){return s!=null&&typeof s=="object"}var Kh=cc?le(cc):Xm;function jb(s,a){return s===a||$o(s,a,aa(a))}function Yb(s,a,h){return h=typeof h=="function"?h:e,$o(s,a,aa(a),h)}function qb(s){return Gh(s)&&s!=+s}function Xb(s){if(C0(s))throw new G(o);return Hc(s)}function Kb(s){return s===null}function Gb(s){return s==null}function Gh(s){return typeof s=="number"||Pt(s)&&Zt(s)==Ai}function Vi(s){if(!Pt(s)||Zt(s)!=$e)return!1;var a=Fs(s);if(a===null)return!0;var h=mt.call(a,"constructor")&&a.constructor;return typeof h=="function"&&h instanceof h&&Rs.call(h)==Yp}var ba=hc?le(hc):Km;function Jb(s){return Xh(s)&&s>=-Lt&&s<=Lt}var Jh=uc?le(uc):Gm;function hr(s){return typeof s=="string"||!J(s)&&Pt(s)&&Zt(s)==Oi}function he(s){return typeof s=="symbol"||Pt(s)&&Zt(s)==Ss}var fi=fc?le(fc):Jm;function Zb(s){return s===e}function Qb(s){return Pt(s)&&qt(s)==Ti}function tx(s){return Pt(s)&&Zt(s)==mg}var ex=tr(Yo),nx=tr(function(s,a){return s<=a});function Zh(s){if(!s)return[];if(ne(s))return hr(s)?ke(s):ee(s);if(Ei&&s[Ei])return Lp(s[Ei]());var a=qt(s),h=a==Te?Do:a==Pe?ks:di;return h(s)}function Ze(s){if(!s)return s===0?s:0;if(s=Se(s),s===pt||s===-pt){var a=s<0?-1:1;return a*Wt}return s===s?s:0}function et(s){var a=Ze(s),h=a%1;return a===a?h?a-h:a:0}function Qh(s){return s?In(et(s),0,Jt):0}function Se(s){if(typeof s=="number")return s;if(he(s))return Oe;if(Tt(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=Tt(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=bc(s);var h=Bg.test(s);return h||Ng.test(s)?_p(s.slice(2),h?2:8):Fg.test(s)?Oe:+s}function tu(s){return ze(s,ie(s))}function ix(s){return s?In(et(s),-Lt,Lt):s===0?s:0}function dt(s){return s==null?"":ce(s)}var sx=ci(function(s,a){if(Hi(a)||ne(a)){ze(a,Ht(a),s);return}for(var h in a)mt.call(a,h)&&Ii(s,h,a[h])}),eu=ci(function(s,a){ze(a,ie(a),s)}),ur=ci(function(s,a,h,g){ze(a,ie(a),s,g)}),rx=ci(function(s,a,h,g){ze(a,Ht(a),s,g)}),ox=Ke(No);function ax(s,a){var h=li(s);return a==null?h:Dc(h,a)}var lx=it(function(s,a){s=bt(s);var h=-1,g=a.length,_=g>2?a[2]:e;for(_&&Qt(a[0],a[1],_)&&(g=1);++h<g;)for(var y=a[h],S=ie(y),M=-1,P=S.length;++M<P;){var N=S[M],W=s[N];(W===e||Ce(W,ri[N])&&!mt.call(s,N))&&(s[N]=y[N])}return s}),cx=it(function(s){return s.push(e,bh),ae(nu,e,s)});function hx(s,a){return gc(s,q(a,3),Be)}function ux(s,a){return gc(s,q(a,3),Ho)}function fx(s,a){return s==null?s:Wo(s,q(a,3),ie)}function dx(s,a){return s==null?s:zc(s,q(a,3),ie)}function gx(s,a){return s&&Be(s,q(a,3))}function px(s,a){return s&&Ho(s,q(a,3))}function mx(s){return s==null?[]:Ys(s,Ht(s))}function _x(s){return s==null?[]:Ys(s,ie(s))}function xa(s,a,h){var g=s==null?e:Fn(s,a);return g===e?h:g}function bx(s,a){return s!=null&&vh(s,a,Hm)}function ya(s,a){return s!=null&&vh(s,a,Um)}var xx=dh(function(s,a,h){a!=null&&typeof a.toString!="function"&&(a=Ds.call(a)),s[a]=h},wa(se)),yx=dh(function(s,a,h){a!=null&&typeof a.toString!="function"&&(a=Ds.call(a)),mt.call(s,a)?s[a].push(h):s[a]=[h]},q),vx=it(Bi);function Ht(s){return ne(s)?Cc(s):jo(s)}function ie(s){return ne(s)?Cc(s,!0):Zm(s)}function wx(s,a){var h={};return a=q(a,3),Be(s,function(g,_,y){qe(h,a(g,_,y),g)}),h}function Sx(s,a){var h={};return a=q(a,3),Be(s,function(g,_,y){qe(h,_,a(g,_,y))}),h}var Ax=ci(function(s,a,h){qs(s,a,h)}),nu=ci(function(s,a,h,g){qs(s,a,h,g)}),Mx=Ke(function(s,a){var h={};if(s==null)return h;var g=!1;a=Mt(a,function(y){return y=mn(y,s),g||(g=y.length>1),y}),ze(s,ra(s),h),g&&(h=ye(h,p|m|b,x0));for(var _=a.length;_--;)Jo(h,a[_]);return h});function Ox(s,a){return iu(s,lr(q(a)))}var Tx=Ke(function(s,a){return s==null?{}:t0(s,a)});function iu(s,a){if(s==null)return{};var h=Mt(ra(s),function(g){return[g]});return a=q(a),Xc(s,h,function(g,_){return a(g,_[0])})}function Px(s,a,h){a=mn(a,s);var g=-1,_=a.length;for(_||(_=1,s=e);++g<_;){var y=s==null?e:s[Ne(a[g])];y===e&&(g=_,y=h),s=Je(y)?y.call(s):y}return s}function kx(s,a,h){return s==null?s:Ni(s,a,h)}function Ex(s,a,h,g){return g=typeof g=="function"?g:e,s==null?s:Ni(s,a,h,g)}var su=mh(Ht),ru=mh(ie);function Cx(s,a,h){var g=J(s),_=g||bn(s)||fi(s);if(a=q(a,4),h==null){var y=s&&s.constructor;_?h=g?new y:[]:Tt(s)?h=Je(y)?li(Fs(s)):{}:h={}}return(_?_e:Be)(s,function(S,M,P){return a(h,S,M,P)}),h}function Rx(s,a){return s==null?!0:Jo(s,a)}function Dx(s,a,h){return s==null?s:Qc(s,a,ta(h))}function Lx(s,a,h,g){return g=typeof g=="function"?g:e,s==null?s:Qc(s,a,ta(h),g)}function di(s){return s==null?[]:Ro(s,Ht(s))}function Ix(s){return s==null?[]:Ro(s,ie(s))}function Fx(s,a,h){return h===e&&(h=a,a=e),h!==e&&(h=Se(h),h=h===h?h:0),a!==e&&(a=Se(a),a=a===a?a:0),In(Se(s),a,h)}function Bx(s,a,h){return a=Ze(a),h===e?(h=a,a=0):h=Ze(h),s=Se(s),Vm(s,a,h)}function zx(s,a,h){if(h&&typeof h!="boolean"&&Qt(s,a,h)&&(a=h=e),h===e&&(typeof a=="boolean"?(h=a,a=e):typeof s=="boolean"&&(h=s,s=e)),s===e&&a===e?(s=0,a=1):(s=Ze(s),a===e?(a=s,s=0):a=Ze(a)),s>a){var g=s;s=a,a=g}if(h||s%1||a%1){var _=kc();return Yt(s+_*(a-s+mp("1e-"+((_+"").length-1))),a)}return Xo(s,a)}var Nx=hi(function(s,a,h){return a=a.toLowerCase(),s+(h?ou(a):a)});function ou(s){return va(dt(s).toLowerCase())}function au(s){return s=dt(s),s&&s.replace(Hg,kp).replace(op,"")}function Wx(s,a,h){s=dt(s),a=ce(a);var g=s.length;h=h===e?g:In(et(h),0,g);var _=h;return h-=a.length,h>=0&&s.slice(h,_)==a}function Hx(s){return s=dt(s),s&&vg.test(s)?s.replace(zl,Ep):s}function Ux(s){return s=dt(s),s&&Tg.test(s)?s.replace(mo,"\\$&"):s}var Vx=hi(function(s,a,h){return s+(h?"-":"")+a.toLowerCase()}),$x=hi(function(s,a,h){return s+(h?" ":"")+a.toLowerCase()}),jx=hh("toLowerCase");function Yx(s,a,h){s=dt(s),a=et(a);var g=a?ii(s):0;if(!a||g>=a)return s;var _=(a-g)/2;return Qs(Ws(_),h)+s+Qs(Ns(_),h)}function qx(s,a,h){s=dt(s),a=et(a);var g=a?ii(s):0;return a&&g<a?s+Qs(a-g,h):s}function Xx(s,a,h){s=dt(s),a=et(a);var g=a?ii(s):0;return a&&g<a?Qs(a-g,h)+s:s}function Kx(s,a,h){return h||a==null?a=0:a&&(a=+a),nm(dt(s).replace(_o,""),a||0)}function Gx(s,a,h){return(h?Qt(s,a,h):a===e)?a=1:a=et(a),Ko(dt(s),a)}function Jx(){var s=arguments,a=dt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var Zx=hi(function(s,a,h){return s+(h?"_":"")+a.toLowerCase()});function Qx(s,a,h){return h&&typeof h!="number"&&Qt(s,a,h)&&(a=h=e),h=h===e?Jt:h>>>0,h?(s=dt(s),s&&(typeof a=="string"||a!=null&&!ba(a))&&(a=ce(a),!a&&ni(s))?_n(ke(s),0,h):s.split(a,h)):[]}var ty=hi(function(s,a,h){return s+(h?" ":"")+va(a)});function ey(s,a,h){return s=dt(s),h=h==null?0:In(et(h),0,s.length),a=ce(a),s.slice(h,h+a.length)==a}function ny(s,a,h){var g=x.templateSettings;h&&Qt(s,a,h)&&(a=e),s=dt(s),a=ur({},a,g,_h);var _=ur({},a.imports,g.imports,_h),y=Ht(_),S=Ro(_,y),M,P,N=0,W=a.interpolate||As,H="__p += '",U=Lo((a.escape||As).source+"|"+W.source+"|"+(W===Nl?Ig:As).source+"|"+(a.evaluate||As).source+"|$","g"),j="//# sourceURL="+(mt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++up+"]")+`
|
||
`;s.replace(U,function(K,st,at,ue,te,fe){return at||(at=ue),H+=s.slice(N,fe).replace(Ug,Cp),st&&(M=!0,H+=`' +
|
||
__e(`+st+`) +
|
||
'`),te&&(P=!0,H+=`';
|
||
`+te+`;
|
||
__p += '`),at&&(H+=`' +
|
||
((__t = (`+at+`)) == null ? '' : __t) +
|
||
'`),N=fe+K.length,K}),H+=`';
|
||
`;var X=mt.call(a,"variable")&&a.variable;if(!X)H=`with (obj) {
|
||
`+H+`
|
||
}
|
||
`;else if(Dg.test(X))throw new G(c);H=(P?H.replace(_g,""):H).replace(bg,"$1").replace(xg,"$1;"),H="function("+(X||"obj")+`) {
|
||
`+(X?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(M?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+H+`return __p
|
||
}`;var nt=cu(function(){return ut(y,j+"return "+H).apply(e,S)});if(nt.source=H,_a(nt))throw nt;return nt}function iy(s){return dt(s).toLowerCase()}function sy(s){return dt(s).toUpperCase()}function ry(s,a,h){if(s=dt(s),s&&(h||a===e))return bc(s);if(!s||!(a=ce(a)))return s;var g=ke(s),_=ke(a),y=xc(g,_),S=yc(g,_)+1;return _n(g,y,S).join("")}function oy(s,a,h){if(s=dt(s),s&&(h||a===e))return s.slice(0,wc(s)+1);if(!s||!(a=ce(a)))return s;var g=ke(s),_=yc(g,ke(a))+1;return _n(g,0,_).join("")}function ay(s,a,h){if(s=dt(s),s&&(h||a===e))return s.replace(_o,"");if(!s||!(a=ce(a)))return s;var g=ke(s),_=xc(g,ke(a));return _n(g,_).join("")}function ly(s,a){var h=Q,g=tt;if(Tt(a)){var _="separator"in a?a.separator:_;h="length"in a?et(a.length):h,g="omission"in a?ce(a.omission):g}s=dt(s);var y=s.length;if(ni(s)){var S=ke(s);y=S.length}if(h>=y)return s;var M=h-ii(g);if(M<1)return g;var P=S?_n(S,0,M).join(""):s.slice(0,M);if(_===e)return P+g;if(S&&(M+=P.length-M),ba(_)){if(s.slice(M).search(_)){var N,W=P;for(_.global||(_=Lo(_.source,dt(Wl.exec(_))+"g")),_.lastIndex=0;N=_.exec(W);)var H=N.index;P=P.slice(0,H===e?M:H)}}else if(s.indexOf(ce(_),M)!=M){var U=P.lastIndexOf(_);U>-1&&(P=P.slice(0,U))}return P+g}function cy(s){return s=dt(s),s&&yg.test(s)?s.replace(Bl,zp):s}var hy=hi(function(s,a,h){return s+(h?" ":"")+a.toUpperCase()}),va=hh("toUpperCase");function lu(s,a,h){return s=dt(s),a=h?e:a,a===e?Dp(s)?Hp(s):Ap(s):s.match(a)||[]}var cu=it(function(s,a){try{return ae(s,e,a)}catch(h){return _a(h)?h:new G(h)}}),uy=Ke(function(s,a){return _e(a,function(h){h=Ne(h),qe(s,h,pa(s[h],s))}),s});function fy(s){var a=s==null?0:s.length,h=q();return s=a?Mt(s,function(g){if(typeof g[1]!="function")throw new be(l);return[h(g[0]),g[1]]}):[],it(function(g){for(var _=-1;++_<a;){var y=s[_];if(ae(y[0],this,g))return ae(y[1],this,g)}})}function dy(s){return zm(ye(s,p))}function wa(s){return function(){return s}}function gy(s,a){return s==null||s!==s?a:s}var py=fh(),my=fh(!0);function se(s){return s}function Sa(s){return Uc(typeof s=="function"?s:ye(s,p))}function _y(s){return $c(ye(s,p))}function by(s,a){return jc(s,ye(a,p))}var xy=it(function(s,a){return function(h){return Bi(h,s,a)}}),yy=it(function(s,a){return function(h){return Bi(s,h,a)}});function Aa(s,a,h){var g=Ht(a),_=Ys(a,g);h==null&&!(Tt(a)&&(_.length||!g.length))&&(h=a,a=s,s=this,_=Ys(a,Ht(a)));var y=!(Tt(h)&&"chain"in h)||!!h.chain,S=Je(s);return _e(_,function(M){var P=a[M];s[M]=P,S&&(s.prototype[M]=function(){var N=this.__chain__;if(y||N){var W=s(this.__wrapped__),H=W.__actions__=ee(this.__actions__);return H.push({func:P,args:arguments,thisArg:s}),W.__chain__=N,W}return P.apply(s,un([this.value()],arguments))})}),s}function vy(){return Vt._===this&&(Vt._=qp),this}function Ma(){}function wy(s){return s=et(s),it(function(a){return Yc(a,s)})}var Sy=na(Mt),Ay=na(dc),My=na(To);function hu(s){return ca(s)?Po(Ne(s)):e0(s)}function Oy(s){return function(a){return s==null?e:Fn(s,a)}}var Ty=gh(),Py=gh(!0);function Oa(){return[]}function Ta(){return!1}function ky(){return{}}function Ey(){return""}function Cy(){return!0}function Ry(s,a){if(s=et(s),s<1||s>Lt)return[];var h=Jt,g=Yt(s,Jt);a=q(a),s-=Jt;for(var _=Co(g,a);++h<s;)a(h);return _}function Dy(s){return J(s)?Mt(s,Ne):he(s)?[s]:ee(Eh(dt(s)))}function Ly(s){var a=++jp;return dt(s)+a}var Iy=Zs(function(s,a){return s+a},0),Fy=ia("ceil"),By=Zs(function(s,a){return s/a},1),zy=ia("floor");function Ny(s){return s&&s.length?js(s,se,Uo):e}function Wy(s,a){return s&&s.length?js(s,q(a,2),Uo):e}function Hy(s){return mc(s,se)}function Uy(s,a){return mc(s,q(a,2))}function Vy(s){return s&&s.length?js(s,se,Yo):e}function $y(s,a){return s&&s.length?js(s,q(a,2),Yo):e}var jy=Zs(function(s,a){return s*a},1),Yy=ia("round"),qy=Zs(function(s,a){return s-a},0);function Xy(s){return s&&s.length?Eo(s,se):0}function Ky(s,a){return s&&s.length?Eo(s,q(a,2)):0}return x.after=_b,x.ary=Hh,x.assign=sx,x.assignIn=eu,x.assignInWith=ur,x.assignWith=rx,x.at=ox,x.before=Uh,x.bind=pa,x.bindAll=uy,x.bindKey=Vh,x.castArray=kb,x.chain=zh,x.chunk=z0,x.compact=N0,x.concat=W0,x.cond=fy,x.conforms=dy,x.constant=wa,x.countBy=X_,x.create=ax,x.curry=$h,x.curryRight=jh,x.debounce=Yh,x.defaults=lx,x.defaultsDeep=cx,x.defer=bb,x.delay=xb,x.difference=H0,x.differenceBy=U0,x.differenceWith=V0,x.drop=$0,x.dropRight=j0,x.dropRightWhile=Y0,x.dropWhile=q0,x.fill=X0,x.filter=G_,x.flatMap=Q_,x.flatMapDeep=tb,x.flatMapDepth=eb,x.flatten=Lh,x.flattenDeep=K0,x.flattenDepth=G0,x.flip=yb,x.flow=py,x.flowRight=my,x.fromPairs=J0,x.functions=mx,x.functionsIn=_x,x.groupBy=nb,x.initial=Q0,x.intersection=t_,x.intersectionBy=e_,x.intersectionWith=n_,x.invert=xx,x.invertBy=yx,x.invokeMap=sb,x.iteratee=Sa,x.keyBy=rb,x.keys=Ht,x.keysIn=ie,x.map=rr,x.mapKeys=wx,x.mapValues=Sx,x.matches=_y,x.matchesProperty=by,x.memoize=ar,x.merge=Ax,x.mergeWith=nu,x.method=xy,x.methodOf=yy,x.mixin=Aa,x.negate=lr,x.nthArg=wy,x.omit=Mx,x.omitBy=Ox,x.once=vb,x.orderBy=ob,x.over=Sy,x.overArgs=wb,x.overEvery=Ay,x.overSome=My,x.partial=ma,x.partialRight=qh,x.partition=ab,x.pick=Tx,x.pickBy=iu,x.property=hu,x.propertyOf=Oy,x.pull=o_,x.pullAll=Fh,x.pullAllBy=a_,x.pullAllWith=l_,x.pullAt=c_,x.range=Ty,x.rangeRight=Py,x.rearg=Sb,x.reject=hb,x.remove=h_,x.rest=Ab,x.reverse=da,x.sampleSize=fb,x.set=kx,x.setWith=Ex,x.shuffle=db,x.slice=u_,x.sortBy=mb,x.sortedUniq=b_,x.sortedUniqBy=x_,x.split=Qx,x.spread=Mb,x.tail=y_,x.take=v_,x.takeRight=w_,x.takeRightWhile=S_,x.takeWhile=A_,x.tap=N_,x.throttle=Ob,x.thru=sr,x.toArray=Zh,x.toPairs=su,x.toPairsIn=ru,x.toPath=Dy,x.toPlainObject=tu,x.transform=Cx,x.unary=Tb,x.union=M_,x.unionBy=O_,x.unionWith=T_,x.uniq=P_,x.uniqBy=k_,x.uniqWith=E_,x.unset=Rx,x.unzip=ga,x.unzipWith=Bh,x.update=Dx,x.updateWith=Lx,x.values=di,x.valuesIn=Ix,x.without=C_,x.words=lu,x.wrap=Pb,x.xor=R_,x.xorBy=D_,x.xorWith=L_,x.zip=I_,x.zipObject=F_,x.zipObjectDeep=B_,x.zipWith=z_,x.entries=su,x.entriesIn=ru,x.extend=eu,x.extendWith=ur,Aa(x,x),x.add=Iy,x.attempt=cu,x.camelCase=Nx,x.capitalize=ou,x.ceil=Fy,x.clamp=Fx,x.clone=Eb,x.cloneDeep=Rb,x.cloneDeepWith=Db,x.cloneWith=Cb,x.conformsTo=Lb,x.deburr=au,x.defaultTo=gy,x.divide=By,x.endsWith=Wx,x.eq=Ce,x.escape=Hx,x.escapeRegExp=Ux,x.every=K_,x.find=J_,x.findIndex=Rh,x.findKey=hx,x.findLast=Z_,x.findLastIndex=Dh,x.findLastKey=ux,x.floor=zy,x.forEach=Nh,x.forEachRight=Wh,x.forIn=fx,x.forInRight=dx,x.forOwn=gx,x.forOwnRight=px,x.get=xa,x.gt=Ib,x.gte=Fb,x.has=bx,x.hasIn=ya,x.head=Ih,x.identity=se,x.includes=ib,x.indexOf=Z0,x.inRange=Bx,x.invoke=vx,x.isArguments=Nn,x.isArray=J,x.isArrayBuffer=Bb,x.isArrayLike=ne,x.isArrayLikeObject=Ct,x.isBoolean=zb,x.isBuffer=bn,x.isDate=Nb,x.isElement=Wb,x.isEmpty=Hb,x.isEqual=Ub,x.isEqualWith=Vb,x.isError=_a,x.isFinite=$b,x.isFunction=Je,x.isInteger=Xh,x.isLength=cr,x.isMap=Kh,x.isMatch=jb,x.isMatchWith=Yb,x.isNaN=qb,x.isNative=Xb,x.isNil=Gb,x.isNull=Kb,x.isNumber=Gh,x.isObject=Tt,x.isObjectLike=Pt,x.isPlainObject=Vi,x.isRegExp=ba,x.isSafeInteger=Jb,x.isSet=Jh,x.isString=hr,x.isSymbol=he,x.isTypedArray=fi,x.isUndefined=Zb,x.isWeakMap=Qb,x.isWeakSet=tx,x.join=i_,x.kebabCase=Vx,x.last=we,x.lastIndexOf=s_,x.lowerCase=$x,x.lowerFirst=jx,x.lt=ex,x.lte=nx,x.max=Ny,x.maxBy=Wy,x.mean=Hy,x.meanBy=Uy,x.min=Vy,x.minBy=$y,x.stubArray=Oa,x.stubFalse=Ta,x.stubObject=ky,x.stubString=Ey,x.stubTrue=Cy,x.multiply=jy,x.nth=r_,x.noConflict=vy,x.noop=Ma,x.now=or,x.pad=Yx,x.padEnd=qx,x.padStart=Xx,x.parseInt=Kx,x.random=zx,x.reduce=lb,x.reduceRight=cb,x.repeat=Gx,x.replace=Jx,x.result=Px,x.round=Yy,x.runInContext=T,x.sample=ub,x.size=gb,x.snakeCase=Zx,x.some=pb,x.sortedIndex=f_,x.sortedIndexBy=d_,x.sortedIndexOf=g_,x.sortedLastIndex=p_,x.sortedLastIndexBy=m_,x.sortedLastIndexOf=__,x.startCase=ty,x.startsWith=ey,x.subtract=qy,x.sum=Xy,x.sumBy=Ky,x.template=ny,x.times=Ry,x.toFinite=Ze,x.toInteger=et,x.toLength=Qh,x.toLower=iy,x.toNumber=Se,x.toSafeInteger=ix,x.toString=dt,x.toUpper=sy,x.trim=ry,x.trimEnd=oy,x.trimStart=ay,x.truncate=ly,x.unescape=cy,x.uniqueId=Ly,x.upperCase=hy,x.upperFirst=va,x.each=Nh,x.eachRight=Wh,x.first=Ih,Aa(x,function(){var s={};return Be(x,function(a,h){mt.call(x.prototype,h)||(s[h]=a)}),s}(),{chain:!1}),x.VERSION=i,_e(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){x[s].placeholder=x}),_e(["drop","take"],function(s,a){rt.prototype[s]=function(h){h=h===e?1:Bt(et(h),0);var g=this.__filtered__&&!a?new rt(this):this.clone();return g.__filtered__?g.__takeCount__=Yt(h,g.__takeCount__):g.__views__.push({size:Yt(h,Jt),type:s+(g.__dir__<0?"Right":"")}),g},rt.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),_e(["filter","map","takeWhile"],function(s,a){var h=a+1,g=h==jt||h==xt;rt.prototype[s]=function(_){var y=this.clone();return y.__iteratees__.push({iteratee:q(_,3),type:h}),y.__filtered__=y.__filtered__||g,y}}),_e(["head","last"],function(s,a){var h="take"+(a?"Right":"");rt.prototype[s]=function(){return this[h](1).value()[0]}}),_e(["initial","tail"],function(s,a){var h="drop"+(a?"":"Right");rt.prototype[s]=function(){return this.__filtered__?new rt(this):this[h](1)}}),rt.prototype.compact=function(){return this.filter(se)},rt.prototype.find=function(s){return this.filter(s).head()},rt.prototype.findLast=function(s){return this.reverse().find(s)},rt.prototype.invokeMap=it(function(s,a){return typeof s=="function"?new rt(this):this.map(function(h){return Bi(h,s,a)})}),rt.prototype.reject=function(s){return this.filter(lr(q(s)))},rt.prototype.slice=function(s,a){s=et(s);var h=this;return h.__filtered__&&(s>0||a<0)?new rt(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),a!==e&&(a=et(a),h=a<0?h.dropRight(-a):h.take(a-s)),h)},rt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},rt.prototype.toArray=function(){return this.take(Jt)},Be(rt.prototype,function(s,a){var h=/^(?:filter|find|map|reject)|While$/.test(a),g=/^(?:head|last)$/.test(a),_=x[g?"take"+(a=="last"?"Right":""):a],y=g||/^find/.test(a);_&&(x.prototype[a]=function(){var S=this.__wrapped__,M=g?[1]:arguments,P=S instanceof rt,N=M[0],W=P||J(S),H=function(st){var at=_.apply(x,un([st],M));return g&&U?at[0]:at};W&&h&&typeof N=="function"&&N.length!=1&&(P=W=!1);var U=this.__chain__,j=!!this.__actions__.length,X=y&&!U,nt=P&&!j;if(!y&&W){S=nt?S:new rt(this);var K=s.apply(S,M);return K.__actions__.push({func:sr,args:[H],thisArg:e}),new xe(K,U)}return X&&nt?s.apply(this,M):(K=this.thru(H),X?g?K.value()[0]:K.value():K)})}),_e(["pop","push","shift","sort","splice","unshift"],function(s){var a=Es[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",g=/^(?:pop|shift)$/.test(s);x.prototype[s]=function(){var _=arguments;if(g&&!this.__chain__){var y=this.value();return a.apply(J(y)?y:[],_)}return this[h](function(S){return a.apply(J(S)?S:[],_)})}}),Be(rt.prototype,function(s,a){var h=x[a];if(h){var g=h.name+"";mt.call(ai,g)||(ai[g]=[]),ai[g].push({name:a,func:h})}}),ai[Js(e,O).name]=[{name:"wrapper",func:e}],rt.prototype.clone=cm,rt.prototype.reverse=hm,rt.prototype.value=um,x.prototype.at=W_,x.prototype.chain=H_,x.prototype.commit=U_,x.prototype.next=V_,x.prototype.plant=j_,x.prototype.reverse=Y_,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=q_,x.prototype.first=x.prototype.head,Ei&&(x.prototype[Ei]=$_),x},si=Up();Cn?((Cn.exports=si)._=si,So._=si):Vt._=si}).call($i)})(sv,qa);function qf(n,t){return function(){return n.apply(t,arguments)}}const{toString:Xf}=Object.prototype,{getPrototypeOf:dl}=Object,gl=(n=>t=>{const e=Xf.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),ln=n=>(n=n.toLowerCase(),t=>gl(t)===n),Jr=n=>t=>typeof t===n,{isArray:vi}=Array,as=Jr("undefined");function rv(n){return n!==null&&!as(n)&&n.constructor!==null&&!as(n.constructor)&&Mn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Kf=ln("ArrayBuffer");function ov(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Kf(n.buffer),t}const av=Jr("string"),Mn=Jr("function"),Gf=Jr("number"),pl=n=>n!==null&&typeof n=="object",lv=n=>n===!0||n===!1,Tr=n=>{if(gl(n)!=="object")return!1;const t=dl(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},cv=ln("Date"),hv=ln("File"),uv=ln("Blob"),fv=ln("FileList"),dv=n=>pl(n)&&Mn(n.pipe),gv=n=>{const t="[object FormData]";return n&&(typeof FormData=="function"&&n instanceof FormData||Xf.call(n)===t||Mn(n.toString)&&n.toString()===t)},pv=ln("URLSearchParams"),mv=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ms(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),vi(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{const o=e?Object.getOwnPropertyNames(n):Object.keys(n),l=o.length;let c;for(i=0;i<l;i++)c=o[i],t.call(null,n[c],c,n)}}function Jf(n,t){t=t.toLowerCase();const e=Object.keys(n);let i=e.length,r;for(;i-- >0;)if(r=e[i],t===r.toLowerCase())return r;return null}const Zf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Qf=n=>!as(n)&&n!==Zf;function Xa(){const{caseless:n}=Qf(this)&&this||{},t={},e=(i,r)=>{const o=n&&Jf(t,r)||r;Tr(t[o])&&Tr(i)?t[o]=Xa(t[o],i):Tr(i)?t[o]=Xa({},i):vi(i)?t[o]=i.slice():t[o]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&ms(arguments[i],e);return t}const _v=(n,t,e,{allOwnKeys:i}={})=>(ms(t,(r,o)=>{e&&Mn(r)?n[o]=qf(r,e):n[o]=r},{allOwnKeys:i}),n),bv=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),xv=(n,t,e,i)=>{n.prototype=Object.create(t.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},yv=(n,t,e,i)=>{let r,o,l;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),o=r.length;o-- >0;)l=r[o],(!i||i(l,n,t))&&!c[l]&&(t[l]=n[l],c[l]=!0);n=e!==!1&&dl(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},vv=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const i=n.indexOf(t,e);return i!==-1&&i===e},wv=n=>{if(!n)return null;if(vi(n))return n;let t=n.length;if(!Gf(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},Sv=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&dl(Uint8Array)),Av=(n,t)=>{const i=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=i.next())&&!r.done;){const o=r.value;t.call(n,o[0],o[1])}},Mv=(n,t)=>{let e;const i=[];for(;(e=n.exec(t))!==null;)i.push(e);return i},Ov=ln("HTMLFormElement"),Tv=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,i,r){return i.toUpperCase()+r}),fu=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Pv=ln("RegExp"),td=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),i={};ms(e,(r,o)=>{t(r,o,n)!==!1&&(i[o]=r)}),Object.defineProperties(n,i)},kv=n=>{td(n,(t,e)=>{if(Mn(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const i=n[e];if(Mn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Ev=(n,t)=>{const e={},i=r=>{r.forEach(o=>{e[o]=!0})};return vi(n)?i(n):i(String(n).split(t)),e},Cv=()=>{},Rv=(n,t)=>(n=+n,Number.isFinite(n)?n:t),ka="abcdefghijklmnopqrstuvwxyz",du="0123456789",ed={DIGIT:du,ALPHA:ka,ALPHA_DIGIT:ka+ka.toUpperCase()+du},Dv=(n=16,t=ed.ALPHA_DIGIT)=>{let e="";const{length:i}=t;for(;n--;)e+=t[Math.random()*i|0];return e};function Lv(n){return!!(n&&Mn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const Iv=n=>{const t=new Array(10),e=(i,r)=>{if(pl(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[r]=i;const o=vi(i)?[]:{};return ms(i,(l,c)=>{const u=e(l,r+1);!as(u)&&(o[c]=u)}),t[r]=void 0,o}}return i};return e(n,0)},z={isArray:vi,isArrayBuffer:Kf,isBuffer:rv,isFormData:gv,isArrayBufferView:ov,isString:av,isNumber:Gf,isBoolean:lv,isObject:pl,isPlainObject:Tr,isUndefined:as,isDate:cv,isFile:hv,isBlob:uv,isRegExp:Pv,isFunction:Mn,isStream:dv,isURLSearchParams:pv,isTypedArray:Sv,isFileList:fv,forEach:ms,merge:Xa,extend:_v,trim:mv,stripBOM:bv,inherits:xv,toFlatObject:yv,kindOf:gl,kindOfTest:ln,endsWith:vv,toArray:wv,forEachEntry:Av,matchAll:Mv,isHTMLForm:Ov,hasOwnProperty:fu,hasOwnProp:fu,reduceDescriptors:td,freezeMethods:kv,toObjectSet:Ev,toCamelCase:Tv,noop:Cv,toFiniteNumber:Rv,findKey:Jf,global:Zf,isContextDefined:Qf,ALPHABET:ed,generateString:Dv,isSpecCompliantForm:Lv,toJSONObject:Iv};function ct(n,t,e,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),i&&(this.request=i),r&&(this.response=r)}z.inherits(ct,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:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const nd=ct.prototype,id={};["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(n=>{id[n]={value:n}});Object.defineProperties(ct,id);Object.defineProperty(nd,"isAxiosError",{value:!0});ct.from=(n,t,e,i,r,o)=>{const l=Object.create(nd);return z.toFlatObject(n,l,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),ct.call(l,n.message,t,e,i,r),l.cause=n,l.name=n.name,o&&Object.assign(l,o),l};const Fv=null;function Ka(n){return z.isPlainObject(n)||z.isArray(n)}function sd(n){return z.endsWith(n,"[]")?n.slice(0,-2):n}function gu(n,t,e){return n?n.concat(t).map(function(r,o){return r=sd(r),!e&&o?"["+r+"]":r}).join(e?".":""):t}function Bv(n){return z.isArray(n)&&!n.some(Ka)}const zv=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function Zr(n,t,e){if(!z.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=z.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,A){return!z.isUndefined(A[w])});const i=e.metaTokens,r=e.visitor||d,o=e.dots,l=e.indexes,u=(e.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(r))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(z.isDate(v))return v.toISOString();if(!u&&z.isBlob(v))throw new ct("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(v)||z.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,w,A){let O=v;if(v&&!A&&typeof v=="object"){if(z.endsWith(w,"{}"))w=i?w:w.slice(0,-2),v=JSON.stringify(v);else if(z.isArray(v)&&Bv(v)||(z.isFileList(v)||z.endsWith(w,"[]"))&&(O=z.toArray(v)))return w=sd(w),O.forEach(function(D,L){!(z.isUndefined(D)||D===null)&&t.append(l===!0?gu([w],L,o):l===null?w:w+"[]",f(D))}),!1}return Ka(v)?!0:(t.append(gu(A,w,o),f(v)),!1)}const p=[],m=Object.assign(zv,{defaultVisitor:d,convertValue:f,isVisitable:Ka});function b(v,w){if(!z.isUndefined(v)){if(p.indexOf(v)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(v),z.forEach(v,function(O,k){(!(z.isUndefined(O)||O===null)&&r.call(t,O,z.isString(k)?k.trim():k,w,m))===!0&&b(O,w?w.concat(k):[k])}),p.pop()}}if(!z.isObject(n))throw new TypeError("data must be an object");return b(n),t}function pu(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function ml(n,t){this._pairs=[],n&&Zr(n,this,t)}const rd=ml.prototype;rd.append=function(t,e){this._pairs.push([t,e])};rd.toString=function(t){const e=t?function(i){return t.call(this,i,pu)}:pu;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function Nv(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function od(n,t,e){if(!t)return n;const i=e&&e.encode||Nv,r=e&&e.serialize;let o;if(r?o=r(t,e):o=z.isURLSearchParams(t)?t.toString():new ml(t,e).toString(i),o){const l=n.indexOf("#");l!==-1&&(n=n.slice(0,l)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}class Wv{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(i){i!==null&&t(i)})}}const mu=Wv,ad={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hv=typeof URLSearchParams<"u"?URLSearchParams:ml,Uv=typeof FormData<"u"?FormData:null,Vv=typeof Blob<"u"?Blob:null,$v=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),jv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ue={isBrowser:!0,classes:{URLSearchParams:Hv,FormData:Uv,Blob:Vv},isStandardBrowserEnv:$v,isStandardBrowserWebWorkerEnv:jv,protocols:["http","https","file","blob","url","data"]};function Yv(n,t){return Zr(n,new Ue.classes.URLSearchParams,Object.assign({visitor:function(e,i,r,o){return Ue.isNode&&z.isBuffer(e)?(this.append(i,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function qv(n){return z.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xv(n){const t={},e=Object.keys(n);let i;const r=e.length;let o;for(i=0;i<r;i++)o=e[i],t[o]=n[o];return t}function ld(n){function t(e,i,r,o){let l=e[o++];const c=Number.isFinite(+l),u=o>=e.length;return l=!l&&z.isArray(r)?r.length:l,u?(z.hasOwnProp(r,l)?r[l]=[r[l],i]:r[l]=i,!c):((!r[l]||!z.isObject(r[l]))&&(r[l]=[]),t(e,i,r[l],o)&&z.isArray(r[l])&&(r[l]=Xv(r[l])),!c)}if(z.isFormData(n)&&z.isFunction(n.entries)){const e={};return z.forEachEntry(n,(i,r)=>{t(qv(i),r,e,0)}),e}return null}const Kv={"Content-Type":void 0};function Gv(n,t,e){if(z.isString(n))try{return(t||JSON.parse)(n),z.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(e||JSON.stringify)(n)}const Qr={transitional:ad,adapter:["xhr","http"],transformRequest:[function(t,e){const i=e.getContentType()||"",r=i.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return r&&r?JSON.stringify(ld(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Yv(t,this.formSerializer).toString();if((c=z.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zr(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),Gv(t)):t}],transformResponse:[function(t){const e=this.transitional||Qr.transitional,i=e&&e.forcedJSONParsing,r=this.responseType==="json";if(t&&z.isString(t)&&(i&&!this.responseType||r)){const l=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(l)throw c.name==="SyntaxError"?ct.from(c,ct.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],function(t){Qr.headers[t]={}});z.forEach(["post","put","patch"],function(t){Qr.headers[t]=z.merge(Kv)});const _l=Qr,Jv=z.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"]),Zv=n=>{const t={};let e,i,r;return n&&n.split(`
|
||
`).forEach(function(l){r=l.indexOf(":"),e=l.substring(0,r).trim().toLowerCase(),i=l.substring(r+1).trim(),!(!e||t[e]&&Jv[e])&&(e==="set-cookie"?t[e]?t[e].push(i):t[e]=[i]:t[e]=t[e]?t[e]+", "+i:i)}),t},_u=Symbol("internals");function ji(n){return n&&String(n).trim().toLowerCase()}function Pr(n){return n===!1||n==null?n:z.isArray(n)?n.map(Pr):String(n)}function Qv(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=e.exec(n);)t[i[1]]=i[2];return t}const t1=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ea(n,t,e,i,r){if(z.isFunction(i))return i.call(this,t,e);if(r&&(t=e),!!z.isString(t)){if(z.isString(i))return t.indexOf(i)!==-1;if(z.isRegExp(i))return i.test(t)}}function e1(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,i)=>e.toUpperCase()+i)}function n1(n,t){const e=z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+e,{value:function(r,o,l){return this[i].call(this,t,r,o,l)},configurable:!0})})}class to{constructor(t){t&&this.set(t)}set(t,e,i){const r=this;function o(c,u,f){const d=ji(u);if(!d)throw new Error("header name must be a non-empty string");const p=z.findKey(r,d);(!p||r[p]===void 0||f===!0||f===void 0&&r[p]!==!1)&&(r[p||u]=Pr(c))}const l=(c,u)=>z.forEach(c,(f,d)=>o(f,d,u));return z.isPlainObject(t)||t instanceof this.constructor?l(t,e):z.isString(t)&&(t=t.trim())&&!t1(t)?l(Zv(t),e):t!=null&&o(e,t,i),this}get(t,e){if(t=ji(t),t){const i=z.findKey(this,t);if(i){const r=this[i];if(!e)return r;if(e===!0)return Qv(r);if(z.isFunction(e))return e.call(this,r,i);if(z.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ji(t),t){const i=z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!e||Ea(this,this[i],i,e)))}return!1}delete(t,e){const i=this;let r=!1;function o(l){if(l=ji(l),l){const c=z.findKey(i,l);c&&(!e||Ea(i,i[c],c,e))&&(delete i[c],r=!0)}}return z.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let i=e.length,r=!1;for(;i--;){const o=e[i];(!t||Ea(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const e=this,i={};return z.forEach(this,(r,o)=>{const l=z.findKey(i,o);if(l){e[l]=Pr(r),delete e[o];return}const c=t?e1(o):String(o).trim();c!==o&&delete e[o],e[c]=Pr(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return z.forEach(this,(i,r)=>{i!=null&&i!==!1&&(e[r]=t&&z.isArray(i)?i.join(", "):i)}),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 i=new this(t);return e.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[_u]=this[_u]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=ji(l);i[c]||(n1(r,l),i[c]=!0)}return z.isArray(t)?t.forEach(o):o(t),this}}to.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.freezeMethods(to.prototype);z.freezeMethods(to);const an=to;function Ca(n,t){const e=this||_l,i=t||e,r=an.from(i.headers);let o=i.data;return z.forEach(n,function(c){o=c.call(e,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function cd(n){return!!(n&&n.__CANCEL__)}function _s(n,t,e){ct.call(this,n==null?"canceled":n,ct.ERR_CANCELED,t,e),this.name="CanceledError"}z.inherits(_s,ct,{__CANCEL__:!0});function i1(n,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?n(e):t(new ct("Request failed with status code "+e.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const s1=Ue.isStandardBrowserEnv?function(){return{write:function(e,i,r,o,l,c){const u=[];u.push(e+"="+encodeURIComponent(i)),z.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),z.isString(o)&&u.push("path="+o),z.isString(l)&&u.push("domain="+l),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){const i=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function r1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function o1(n,t){return t?n.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):n}function hd(n,t){return n&&!r1(t)?o1(n,t):t}const a1=Ue.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let i;function r(o){let l=o;return t&&(e.setAttribute("href",l),l=e.href),e.setAttribute("href",l),{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 i=r(window.location.href),function(l){const c=z.isString(l)?r(l):l;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}();function l1(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function c1(n,t){n=n||10;const e=new Array(n),i=new Array(n);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),d=i[o];l||(l=f),e[r]=u,i[r]=f;let p=o,m=0;for(;p!==r;)m+=e[p++],p=p%n;if(r=(r+1)%n,r===o&&(o=(o+1)%n),f-l<t)return;const b=d&&f-d;return b?Math.round(m*1e3/b):void 0}}function bu(n,t){let e=0;const i=c1(50,250);return r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,c=o-e,u=i(c),f=o<=l;e=o;const d={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&f?(l-o)/u:void 0,event:r};d[t?"download":"upload"]=!0,n(d)}}const h1=typeof XMLHttpRequest<"u",u1=h1&&function(n){return new Promise(function(e,i){let r=n.data;const o=an.from(n.headers).normalize(),l=n.responseType;let c;function u(){n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}z.isFormData(r)&&(Ue.isStandardBrowserEnv||Ue.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let f=new XMLHttpRequest;if(n.auth){const b=n.auth.username||"",v=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+v))}const d=hd(n.baseURL,n.url);f.open(n.method.toUpperCase(),od(d,n.params,n.paramsSerializer),!0),f.timeout=n.timeout;function p(){if(!f)return;const b=an.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:n,request:f};i1(function(O){e(O),u()},function(O){i(O),u()},w),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(i(new ct("Request aborted",ct.ECONNABORTED,n,f)),f=null)},f.onerror=function(){i(new ct("Network Error",ct.ERR_NETWORK,n,f)),f=null},f.ontimeout=function(){let v=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const w=n.transitional||ad;n.timeoutErrorMessage&&(v=n.timeoutErrorMessage),i(new ct(v,w.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,n,f)),f=null},Ue.isStandardBrowserEnv){const b=(n.withCredentials||a1(d))&&n.xsrfCookieName&&s1.read(n.xsrfCookieName);b&&o.set(n.xsrfHeaderName,b)}r===void 0&&o.setContentType(null),"setRequestHeader"in f&&z.forEach(o.toJSON(),function(v,w){f.setRequestHeader(w,v)}),z.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),l&&l!=="json"&&(f.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&f.addEventListener("progress",bu(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",bu(n.onUploadProgress)),(n.cancelToken||n.signal)&&(c=b=>{f&&(i(!b||b.type?new _s(null,n,f):b),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const m=l1(d);if(m&&Ue.protocols.indexOf(m)===-1){i(new ct("Unsupported protocol "+m+":",ct.ERR_BAD_REQUEST,n));return}f.send(r||null)})},kr={http:Fv,xhr:u1};z.forEach(kr,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch(e){}Object.defineProperty(n,"adapterName",{value:t})}});const f1={getAdapter:n=>{n=z.isArray(n)?n:[n];const{length:t}=n;let e,i;for(let r=0;r<t&&(e=n[r],!(i=z.isString(e)?kr[e.toLowerCase()]:e));r++);if(!i)throw i===!1?new ct(`Adapter ${e} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(z.hasOwnProp(kr,e)?`Adapter '${e}' is not available in the build`:`Unknown adapter '${e}'`);if(!z.isFunction(i))throw new TypeError("adapter is not a function");return i},adapters:kr};function Ra(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new _s(null,n)}function xu(n){return Ra(n),n.headers=an.from(n.headers),n.data=Ca.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),f1.getAdapter(n.adapter||_l.adapter)(n).then(function(i){return Ra(n),i.data=Ca.call(n,n.transformResponse,i),i.headers=an.from(i.headers),i},function(i){return cd(i)||(Ra(n),i&&i.response&&(i.response.data=Ca.call(n,n.transformResponse,i.response),i.response.headers=an.from(i.response.headers))),Promise.reject(i)})}const yu=n=>n instanceof an?n.toJSON():n;function _i(n,t){t=t||{};const e={};function i(f,d,p){return z.isPlainObject(f)&&z.isPlainObject(d)?z.merge.call({caseless:p},f,d):z.isPlainObject(d)?z.merge({},d):z.isArray(d)?d.slice():d}function r(f,d,p){if(z.isUndefined(d)){if(!z.isUndefined(f))return i(void 0,f,p)}else return i(f,d,p)}function o(f,d){if(!z.isUndefined(d))return i(void 0,d)}function l(f,d){if(z.isUndefined(d)){if(!z.isUndefined(f))return i(void 0,f)}else return i(void 0,d)}function c(f,d,p){if(p in t)return i(f,d);if(p in n)return i(void 0,f)}const u={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(f,d)=>r(yu(f),yu(d),!0)};return z.forEach(Object.keys(n).concat(Object.keys(t)),function(d){const p=u[d]||r,m=p(n[d],t[d],d);z.isUndefined(m)&&p!==c||(e[d]=m)}),e}const ud="1.3.5",bl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{bl[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const vu={};bl.transitional=function(t,e,i){function r(o,l){return"[Axios v"+ud+"] Transitional option '"+o+"'"+l+(i?". "+i:"")}return(o,l,c)=>{if(t===!1)throw new ct(r(l," has been removed"+(e?" in "+e:"")),ct.ERR_DEPRECATED);return e&&!vu[l]&&(vu[l]=!0,console.warn(r(l," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,l,c):!0}};function d1(n,t,e){if(typeof n!="object")throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const o=i[r],l=t[o];if(l){const c=n[o],u=c===void 0||l(c,o,n);if(u!==!0)throw new ct("option "+o+" must be "+u,ct.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new ct("Unknown option "+o,ct.ERR_BAD_OPTION)}}const Ga={assertOptions:d1,validators:bl},xn=Ga.validators;class Hr{constructor(t){this.defaults=t,this.interceptors={request:new mu,response:new mu}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=_i(this.defaults,e);const{transitional:i,paramsSerializer:r,headers:o}=e;i!==void 0&&Ga.assertOptions(i,{silentJSONParsing:xn.transitional(xn.boolean),forcedJSONParsing:xn.transitional(xn.boolean),clarifyTimeoutError:xn.transitional(xn.boolean)},!1),r!=null&&(z.isFunction(r)?e.paramsSerializer={serialize:r}:Ga.assertOptions(r,{encode:xn.function,serialize:xn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let l;l=o&&z.merge(o.common,o[e.method]),l&&z.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),e.headers=an.concat(l,o);const c=[];let u=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(e)===!1||(u=u&&w.synchronous,c.unshift(w.fulfilled,w.rejected))});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let d,p=0,m;if(!u){const v=[xu.bind(this),void 0];for(v.unshift.apply(v,c),v.push.apply(v,f),m=v.length,d=Promise.resolve(e);p<m;)d=d.then(v[p++],v[p++]);return d}m=c.length;let b=e;for(p=0;p<m;){const v=c[p++],w=c[p++];try{b=v(b)}catch(A){w.call(this,A);break}}try{d=xu.call(this,b)}catch(v){return Promise.reject(v)}for(p=0,m=f.length;p<m;)d=d.then(f[p++],f[p++]);return d}getUri(t){t=_i(this.defaults,t);const e=hd(t.baseURL,t.url);return od(e,t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(t){Hr.prototype[t]=function(e,i){return this.request(_i(i||{},{method:t,url:e,data:(i||{}).data}))}});z.forEach(["post","put","patch"],function(t){function e(i){return function(o,l,c){return this.request(_i(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}Hr.prototype[t]=e(),Hr.prototype[t+"Form"]=e(!0)});const Er=Hr;class xl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(o){e=o});const i=this;this.promise.then(r=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{i.subscribe(c),o=c}).then(r);return l.cancel=function(){i.unsubscribe(o)},l},t(function(o,l,c){i.reason||(i.reason=new _s(o,l,c),e(i.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 xl(function(r){t=r}),cancel:t}}}const g1=xl;function p1(n){return function(e){return n.apply(null,e)}}function m1(n){return z.isObject(n)&&n.isAxiosError===!0}const Ja={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(Ja).forEach(([n,t])=>{Ja[t]=n});const _1=Ja;function fd(n){const t=new Er(n),e=qf(Er.prototype.request,t);return z.extend(e,Er.prototype,t,{allOwnKeys:!0}),z.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return fd(_i(n,r))},e}const Nt=fd(_l);Nt.Axios=Er;Nt.CanceledError=_s;Nt.CancelToken=g1;Nt.isCancel=cd;Nt.VERSION=ud;Nt.toFormData=Zr;Nt.AxiosError=ct;Nt.Cancel=Nt.CanceledError;Nt.all=function(t){return Promise.all(t)};Nt.spread=p1;Nt.isAxiosError=m1;Nt.mergeConfig=_i;Nt.AxiosHeaders=an;Nt.formToJSON=n=>ld(z.isHTMLForm(n)?new FormData(n):n);Nt.HttpStatusCode=_1;Nt.default=Nt;const EO=Nt;var wu={},b1={get exports(){return wu},set exports(n){wu=n}};(function(n){var t=function(){var e=String.fromCharCode,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function l(u,f){if(!o[u]){o[u]={};for(var d=0;d<u.length;d++)o[u][u.charAt(d)]=d}return o[u][f]}var c={compressToBase64:function(u){if(u==null)return"";var f=c._compress(u,6,function(d){return i.charAt(d)});switch(f.length%4){default:case 0:return f;case 1:return f+"===";case 2:return f+"==";case 3:return f+"="}},decompressFromBase64:function(u){return u==null?"":u==""?null:c._decompress(u.length,32,function(f){return l(i,u.charAt(f))})},compressToUTF16:function(u){return u==null?"":c._compress(u,15,function(f){return e(f+32)})+" "},decompressFromUTF16:function(u){return u==null?"":u==""?null:c._decompress(u.length,16384,function(f){return u.charCodeAt(f)-32})},compressToUint8Array:function(u){for(var f=c.compress(u),d=new Uint8Array(f.length*2),p=0,m=f.length;p<m;p++){var b=f.charCodeAt(p);d[p*2]=b>>>8,d[p*2+1]=b%256}return d},decompressFromUint8Array:function(u){if(u==null)return c.decompress(u);for(var f=new Array(u.length/2),d=0,p=f.length;d<p;d++)f[d]=u[d*2]*256+u[d*2+1];var m=[];return f.forEach(function(b){m.push(e(b))}),c.decompress(m.join(""))},compressToEncodedURIComponent:function(u){return u==null?"":c._compress(u,6,function(f){return r.charAt(f)})},decompressFromEncodedURIComponent:function(u){return u==null?"":u==""?null:(u=u.replace(/ /g,"+"),c._decompress(u.length,32,function(f){return l(r,u.charAt(f))}))},compress:function(u){return c._compress(u,16,function(f){return e(f)})},_compress:function(u,f,d){if(u==null)return"";var p,m,b={},v={},w="",A="",O="",k=2,D=3,L=2,C=[],E=0,I=0,F;for(F=0;F<u.length;F+=1)if(w=u.charAt(F),Object.prototype.hasOwnProperty.call(b,w)||(b[w]=D++,v[w]=!0),A=O+w,Object.prototype.hasOwnProperty.call(b,A))O=A;else{if(Object.prototype.hasOwnProperty.call(v,O)){if(O.charCodeAt(0)<256){for(p=0;p<L;p++)E=E<<1,I==f-1?(I=0,C.push(d(E)),E=0):I++;for(m=O.charCodeAt(0),p=0;p<8;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1}else{for(m=1,p=0;p<L;p++)E=E<<1|m,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=0;for(m=O.charCodeAt(0),p=0;p<16;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1}k--,k==0&&(k=Math.pow(2,L),L++),delete v[O]}else for(m=b[O],p=0;p<L;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1;k--,k==0&&(k=Math.pow(2,L),L++),b[A]=D++,O=String(w)}if(O!==""){if(Object.prototype.hasOwnProperty.call(v,O)){if(O.charCodeAt(0)<256){for(p=0;p<L;p++)E=E<<1,I==f-1?(I=0,C.push(d(E)),E=0):I++;for(m=O.charCodeAt(0),p=0;p<8;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1}else{for(m=1,p=0;p<L;p++)E=E<<1|m,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=0;for(m=O.charCodeAt(0),p=0;p<16;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1}k--,k==0&&(k=Math.pow(2,L),L++),delete v[O]}else for(m=b[O],p=0;p<L;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1;k--,k==0&&(k=Math.pow(2,L),L++)}for(m=2,p=0;p<L;p++)E=E<<1|m&1,I==f-1?(I=0,C.push(d(E)),E=0):I++,m=m>>1;for(;;)if(E=E<<1,I==f-1){C.push(d(E));break}else I++;return C.join("")},decompress:function(u){return u==null?"":u==""?null:c._decompress(u.length,32768,function(f){return u.charCodeAt(f)})},_decompress:function(u,f,d){var p=[],m=4,b=4,v=3,w="",A=[],O,k,D,L,C,E,I,F={val:d(0),position:f,index:1};for(O=0;O<3;O+=1)p[O]=O;for(D=0,C=Math.pow(2,2),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;switch(D){case 0:for(D=0,C=Math.pow(2,8),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;I=e(D);break;case 1:for(D=0,C=Math.pow(2,16),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;I=e(D);break;case 2:return""}for(p[3]=I,k=I,A.push(I);;){if(F.index>u)return"";for(D=0,C=Math.pow(2,v),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;switch(I=D){case 0:for(D=0,C=Math.pow(2,8),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;p[b++]=e(D),I=b-1,m--;break;case 1:for(D=0,C=Math.pow(2,16),E=1;E!=C;)L=F.val&F.position,F.position>>=1,F.position==0&&(F.position=f,F.val=d(F.index++)),D|=(L>0?1:0)*E,E<<=1;p[b++]=e(D),I=b-1,m--;break;case 2:return A.join("")}if(m==0&&(m=Math.pow(2,v),v++),p[I])w=p[I];else if(I===b)w=k+k.charAt(0);else return null;A.push(w),p[b++]=k+w.charAt(0),m--,k=w,m==0&&(m=Math.pow(2,v),v++)}}};return c}();n!=null?n.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(b1);/*!
|
||
* @kurkle/color v0.3.2
|
||
* https://github.com/kurkle/color#readme
|
||
* (c) 2023 Jukka Kurkela
|
||
* Released under the MIT License
|
||
*/function bs(n){return n+.5|0}const yn=(n,t,e)=>Math.max(Math.min(n,e),t);function Ji(n){return yn(bs(n*2.55),0,255)}function An(n){return yn(bs(n*255),0,255)}function sn(n){return yn(bs(n/2.55)/100,0,1)}function Su(n){return yn(bs(n*100),0,100)}const Ae={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},Za=[..."0123456789ABCDEF"],x1=n=>Za[n&15],y1=n=>Za[(n&240)>>4]+Za[n&15],fr=n=>(n&240)>>4===(n&15),v1=n=>fr(n.r)&&fr(n.g)&&fr(n.b)&&fr(n.a);function w1(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Ae[n[1]]*17,g:255&Ae[n[2]]*17,b:255&Ae[n[3]]*17,a:t===5?Ae[n[4]]*17:255}:(t===7||t===9)&&(e={r:Ae[n[1]]<<4|Ae[n[2]],g:Ae[n[3]]<<4|Ae[n[4]],b:Ae[n[5]]<<4|Ae[n[6]],a:t===9?Ae[n[7]]<<4|Ae[n[8]]:255})),e}const S1=(n,t)=>n<255?t(n):"";function A1(n){var t=v1(n)?x1:y1;return n?"#"+t(n.r)+t(n.g)+t(n.b)+S1(n.a,t):void 0}const M1=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dd(n,t,e){const i=t*Math.min(e,1-e),r=(o,l=(o+n/30)%12)=>e-i*Math.max(Math.min(l-3,9-l,1),-1);return[r(0),r(8),r(4)]}function O1(n,t,e){const i=(r,o=(r+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function T1(n,t,e){const i=dd(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function P1(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function yl(n){const e=n.r/255,i=n.g/255,r=n.b/255,o=Math.max(e,i,r),l=Math.min(e,i,r),c=(o+l)/2;let u,f,d;return o!==l&&(d=o-l,f=c>.5?d/(2-o-l):d/(o+l),u=P1(e,i,r,d,o),u=u*60+.5),[u|0,f||0,c]}function vl(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(An)}function wl(n,t,e){return vl(dd,n,t,e)}function k1(n,t,e){return vl(T1,n,t,e)}function E1(n,t,e){return vl(O1,n,t,e)}function gd(n){return(n%360+360)%360}function C1(n){const t=M1.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Ji(+t[5]):An(+t[5]));const r=gd(+t[2]),o=+t[3]/100,l=+t[4]/100;return t[1]==="hwb"?i=k1(r,o,l):t[1]==="hsv"?i=E1(r,o,l):i=wl(r,o,l),{r:i[0],g:i[1],b:i[2],a:e}}function R1(n,t){var e=yl(n);e[0]=gd(e[0]+t),e=wl(e),n.r=e[0],n.g=e[1],n.b=e[2]}function D1(n){if(!n)return;const t=yl(n),e=t[0],i=Su(t[1]),r=Su(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${sn(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const Au={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"},Mu={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 L1(){const n={},t=Object.keys(Mu),e=Object.keys(Au);let i,r,o,l,c;for(i=0;i<t.length;i++){for(l=c=t[i],r=0;r<e.length;r++)o=e[r],c=c.replace(o,Au[o]);o=parseInt(Mu[l],16),n[c]=[o>>16&255,o>>8&255,o&255]}return n}let dr;function I1(n){dr||(dr=L1(),dr.transparent=[0,0,0,0]);const t=dr[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const F1=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function B1(n){const t=F1.exec(n);let e=255,i,r,o;if(t){if(t[7]!==i){const l=+t[7];e=t[8]?Ji(l):yn(l*255,0,255)}return i=+t[1],r=+t[3],o=+t[5],i=255&(t[2]?Ji(i):yn(i,0,255)),r=255&(t[4]?Ji(r):yn(r,0,255)),o=255&(t[6]?Ji(o):yn(o,0,255)),{r:i,g:r,b:o,a:e}}}function z1(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${sn(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Da=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,gi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function N1(n,t,e){const i=gi(sn(n.r)),r=gi(sn(n.g)),o=gi(sn(n.b));return{r:An(Da(i+e*(gi(sn(t.r))-i))),g:An(Da(r+e*(gi(sn(t.g))-r))),b:An(Da(o+e*(gi(sn(t.b))-o))),a:n.a+e*(t.a-n.a)}}function gr(n,t,e){if(n){let i=yl(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=wl(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function pd(n,t){return n&&Object.assign(t||{},n)}function Ou(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=An(n[3]))):(t=pd(n,{r:0,g:0,b:0,a:1}),t.a=An(t.a)),t}function W1(n){return n.charAt(0)==="r"?B1(n):C1(n)}class ls{constructor(t){if(t instanceof ls)return t;const e=typeof t;let i;e==="object"?i=Ou(t):e==="string"&&(i=w1(t)||I1(t)||W1(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=pd(this._rgb);return t&&(t.a=sn(t.a)),t}set rgb(t){this._rgb=Ou(t)}rgbString(){return this._valid?z1(this._rgb):void 0}hexString(){return this._valid?A1(this._rgb):void 0}hslString(){return this._valid?D1(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let o;const l=e===o?.5:e,c=2*l-1,u=i.a-r.a,f=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;o=1-f,i.r=255&f*i.r+o*r.r+.5,i.g=255&f*i.g+o*r.g+.5,i.b=255&f*i.b+o*r.b+.5,i.a=l*i.a+(1-l)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=N1(this._rgb,t._rgb,e)),this}clone(){return new ls(this.rgb)}alpha(t){return this._rgb.a=An(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=bs(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 gr(this._rgb,2,t),this}darken(t){return gr(this._rgb,2,-t),this}saturate(t){return gr(this._rgb,1,t),this}desaturate(t){return gr(this._rgb,1,-t),this}rotate(t){return R1(this._rgb,t),this}}/*!
|
||
* Chart.js v4.2.1
|
||
* https://www.chartjs.org
|
||
* (c) 2023 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/function tn(){}const H1=(()=>{let n=0;return()=>n++})();function ht(n){return n===null||typeof n>"u"}function St(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ot(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function kt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function de(n,t){return kt(n)?n:t}function Z(n,t){return typeof n>"u"?t:n}const U1=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,md=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function vt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function _t(n,t,e,i){let r,o,l;if(St(n))if(o=n.length,i)for(r=o-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<o;r++)t.call(e,n[r],r);else if(ot(n))for(l=Object.keys(n),o=l.length,r=0;r<o;r++)t.call(e,n[l[r]],l[r])}function Ur(n,t){let e,i,r,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],o=t[e],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function Vr(n){if(St(n))return n.map(Vr);if(ot(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=Vr(n[e[r]]);return t}return n}function _d(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function V1(n,t,e,i){if(!_d(n))return;const r=t[n],o=e[n];ot(r)&&ot(o)?cs(r,o,i):t[n]=Vr(o)}function cs(n,t,e){const i=St(t)?t:[t],r=i.length;if(!ot(n))return n;e=e||{};const o=e.merger||V1;let l;for(let c=0;c<r;++c){if(l=i[c],!ot(l))continue;const u=Object.keys(l);for(let f=0,d=u.length;f<d;++f)o(u[f],n,l,e)}return n}function ns(n,t){return cs(n,t,{merger:$1})}function $1(n,t,e){if(!_d(n))return;const i=t[n],r=e[n];ot(i)&&ot(r)?ns(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=Vr(r))}const Tu={"":n=>n,x:n=>n.x,y:n=>n.y};function j1(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Y1(n){const t=j1(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function On(n,t){return(Tu[t]||(Tu[t]=Y1(t)))(n)}function Sl(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Me=n=>typeof n<"u",Tn=n=>typeof n=="function",Pu=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function q1(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ot=Math.PI,At=2*Ot,X1=At+Ot,$r=Number.POSITIVE_INFINITY,K1=Ot/180,Et=Ot/2,Wn=Ot/4,ku=Ot*2/3,vn=Math.log10,Ve=Math.sign;function is(n,t,e){return Math.abs(n-t)<e}function Eu(n){const t=Math.round(n);n=is(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(vn(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function G1(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,o)=>r-o).pop(),t}function bi(n){return!isNaN(parseFloat(n))&&isFinite(n)}function J1(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function bd(n,t,e){let i,r,o;for(i=0,r=n.length;i<r;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function De(n){return n*(Ot/180)}function Al(n){return n*(180/Ot)}function Cu(n){if(!kt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function xd(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*Ot&&(o+=At),{angle:o,distance:r}}function Qa(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Z1(n,t){return(n-t+X1)%At-Ot}function ge(n){return(n%At+At)%At}function hs(n,t,e,i){const r=ge(n),o=ge(t),l=ge(e),c=ge(o-r),u=ge(l-r),f=ge(r-o),d=ge(r-l);return r===o||r===l||i&&o===l||c>u&&f<d}function Ut(n,t,e){return Math.max(t,Math.min(e,n))}function Q1(n){return Ut(n,-32768,32767)}function rn(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Ml(n,t,e){e=e||(l=>n[l]<t);let i=n.length-1,r=0,o;for(;i-r>1;)o=r+i>>1,e(o)?r=o:i=o;return{lo:r,hi:i}}const on=(n,t,e,i)=>Ml(n,e,i?r=>{const o=n[r][t];return o<e||o===e&&n[r+1][t]===e}:r=>n[r][t]<e),tw=(n,t,e)=>Ml(n,e,i=>n[i][t]>=e);function ew(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const yd=["push","pop","shift","splice","unshift"];function nw(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),yd.forEach(e=>{const i="_onData"+Sl(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const l=r.apply(this,o);return n._chartjs.listeners.forEach(c=>{typeof c[i]=="function"&&c[i](...o)}),l}})})}function Ru(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(yd.forEach(o=>{delete n[o]}),delete n._chartjs)}function vd(n){const t=new Set;let e,i;for(e=0,i=n.length;e<i;++e)t.add(n[e]);return t.size===i?n:Array.from(t)}const wd=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Sd(n,t){let e=[],i=!1;return function(...r){e=r,i||(i=!0,wd.call(window,()=>{i=!1,n.apply(t,e)}))}}function iw(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const Ol=n=>n==="start"?"left":n==="end"?"right":"center",Xt=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,sw=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Ad(n,t,e){const i=t.length;let r=0,o=i;if(n._sorted){const{iScale:l,_parsed:c}=n,u=l.axis,{min:f,max:d,minDefined:p,maxDefined:m}=l.getUserBounds();p&&(r=Ut(Math.min(on(c,l.axis,f).lo,e?i:on(t,u,l.getPixelForValue(f)).lo),0,i-1)),m?o=Ut(Math.max(on(c,l.axis,d,!0).hi+1,e?0:on(t,u,l.getPixelForValue(d),!0).hi+1),r,i)-r:o=i-r}return{start:r,count:o}}function Md(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),o}const pr=n=>n===0||n===1,Du=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*At/e)),Lu=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*At/e)+1,ss={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Et)+1,easeOutSine:n=>Math.sin(n*Et),easeInOutSine:n=>-.5*(Math.cos(Ot*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>pr(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>pr(n)?n:Du(n,.075,.3),easeOutElastic:n=>pr(n)?n:Lu(n,.075,.3),easeInOutElastic(n){return pr(n)?n:n<.5?.5*Du(n*2,.1125,.45):.5+.5*Lu(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-ss.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ss.easeInBounce(n*2)*.5:ss.easeOutBounce(n*2-1)*.5+.5};function Od(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Iu(n){return Od(n)?n:new ls(n)}function La(n){return Od(n)?n:new ls(n).saturate(.5).darken(.1).hexString()}const rw=["x","y","borderWidth","radius","tension"],ow=["color","borderColor","backgroundColor"];function aw(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:ow},numbers:{type:"number",properties:rw}}),n.describe("animations",{_fallback:"animation"}),n.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 lw(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Fu=new Map;function cw(n,t){t=t||{};const e=n+JSON.stringify(t);let i=Fu.get(e);return i||(i=new Intl.NumberFormat(n,t),Fu.set(e,i)),i}function xs(n,t,e){return cw(t,e).format(n)}const Td={values(n){return St(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,o=n;if(e.length>1){const f=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(f<1e-4||f>1e15)&&(r="scientific"),o=hw(n,e)}const l=vn(Math.abs(o)),c=Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),xs(n,i,u)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(vn(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Td.numeric.call(this,n,t,e):""}};function hw(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var eo={formatters:Td};function uw(n){n.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:eo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Gn=Object.create(null),tl=Object.create(null);function rs(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function Ia(n,t,e){return typeof t=="string"?cs(rs(n,t),e):cs(rs(n,""),t)}class fw{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.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=(i,r)=>La(r.backgroundColor),this.hoverBorderColor=(i,r)=>La(r.borderColor),this.hoverColor=(i,r)=>La(r.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 Ia(this,t,e)}get(t){return rs(this,t)}describe(t,e){return Ia(tl,t,e)}override(t,e){return Ia(Gn,t,e)}route(t,e,i,r){const o=rs(this,t),l=rs(this,i),c="_"+e;Object.defineProperties(o,{[c]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const u=this[c],f=l[r];return ot(u)?Object.assign({},f,u):Z(u,f)},set(u){this[c]=u}}})}apply(t){t.forEach(e=>e(this))}}var Dt=new fw({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[aw,lw,uw]);function dw(n){return!n||ht(n.size)||ht(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function jr(n,t,e,i,r){let o=t[r];return o||(o=t[r]=n.measureText(r).width,e.push(r)),o>i&&(i=o),i}function gw(n,t,e,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let l=0;const c=e.length;let u,f,d,p,m;for(u=0;u<c;u++)if(p=e[u],p!=null&&St(p)!==!0)l=jr(n,r,o,l,p);else if(St(p))for(f=0,d=p.length;f<d;f++)m=p[f],m!=null&&!St(m)&&(l=jr(n,r,o,l,m));n.restore();const b=o.length/2;if(b>e.length){for(u=0;u<b;u++)delete r[o[u]];o.splice(0,b)}return l}function Hn(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function Bu(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function el(n,t,e,i){Pd(n,t,e,i,null)}function Pd(n,t,e,i,r){let o,l,c,u,f,d,p,m;const b=t.pointStyle,v=t.rotation,w=t.radius;let A=(v||0)*K1;if(b&&typeof b=="object"&&(o=b.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(A),n.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),n.restore();return}if(!(isNaN(w)||w<=0)){switch(n.beginPath(),b){default:r?n.ellipse(e,i,r/2,w,0,0,At):n.arc(e,i,w,0,At),n.closePath();break;case"triangle":d=r?r/2:w,n.moveTo(e+Math.sin(A)*d,i-Math.cos(A)*w),A+=ku,n.lineTo(e+Math.sin(A)*d,i-Math.cos(A)*w),A+=ku,n.lineTo(e+Math.sin(A)*d,i-Math.cos(A)*w),n.closePath();break;case"rectRounded":f=w*.516,u=w-f,l=Math.cos(A+Wn)*u,p=Math.cos(A+Wn)*(r?r/2-f:u),c=Math.sin(A+Wn)*u,m=Math.sin(A+Wn)*(r?r/2-f:u),n.arc(e-p,i-c,f,A-Ot,A-Et),n.arc(e+m,i-l,f,A-Et,A),n.arc(e+p,i+c,f,A,A+Et),n.arc(e-m,i+l,f,A+Et,A+Ot),n.closePath();break;case"rect":if(!v){u=Math.SQRT1_2*w,d=r?r/2:u,n.rect(e-d,i-u,2*d,2*u);break}A+=Wn;case"rectRot":p=Math.cos(A)*(r?r/2:w),l=Math.cos(A)*w,c=Math.sin(A)*w,m=Math.sin(A)*(r?r/2:w),n.moveTo(e-p,i-c),n.lineTo(e+m,i-l),n.lineTo(e+p,i+c),n.lineTo(e-m,i+l),n.closePath();break;case"crossRot":A+=Wn;case"cross":p=Math.cos(A)*(r?r/2:w),l=Math.cos(A)*w,c=Math.sin(A)*w,m=Math.sin(A)*(r?r/2:w),n.moveTo(e-p,i-c),n.lineTo(e+p,i+c),n.moveTo(e+m,i-l),n.lineTo(e-m,i+l);break;case"star":p=Math.cos(A)*(r?r/2:w),l=Math.cos(A)*w,c=Math.sin(A)*w,m=Math.sin(A)*(r?r/2:w),n.moveTo(e-p,i-c),n.lineTo(e+p,i+c),n.moveTo(e+m,i-l),n.lineTo(e-m,i+l),A+=Wn,p=Math.cos(A)*(r?r/2:w),l=Math.cos(A)*w,c=Math.sin(A)*w,m=Math.sin(A)*(r?r/2:w),n.moveTo(e-p,i-c),n.lineTo(e+p,i+c),n.moveTo(e+m,i-l),n.lineTo(e-m,i+l);break;case"line":l=r?r/2:Math.cos(A)*w,c=Math.sin(A)*w,n.moveTo(e-l,i-c),n.lineTo(e+l,i+c);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(A)*(r?r/2:w),i+Math.sin(A)*w);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function us(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function no(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function io(n){n.restore()}function pw(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function mw(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function Jn(n,t,e,i,r,o={}){const l=St(t)?t:[t],c=o.strokeWidth>0&&o.strokeColor!=="";let u,f;for(n.save(),n.font=r.string,_w(n,o),u=0;u<l.length;++u)f=l[u],o.backdrop&&xw(n,o.backdrop),c&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),ht(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(f,e,i,o.maxWidth)),n.fillText(f,e,i,o.maxWidth),bw(n,e,i,f,o),i+=r.lineHeight;n.restore()}function _w(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),ht(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function bw(n,t,e,i,r){if(r.strikethrough||r.underline){const o=n.measureText(i),l=t-o.actualBoundingBoxLeft,c=t+o.actualBoundingBoxRight,u=e-o.actualBoundingBoxAscent,f=e+o.actualBoundingBoxDescent,d=r.strikethrough?(u+f)/2:f;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(l,d),n.lineTo(c,d),n.stroke()}}function xw(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function fs(n,t){const{x:e,y:i,w:r,h:o,radius:l}=t;n.arc(e+l.topLeft,i+l.topLeft,l.topLeft,-Et,Ot,!0),n.lineTo(e,i+o-l.bottomLeft),n.arc(e+l.bottomLeft,i+o-l.bottomLeft,l.bottomLeft,Ot,Et,!0),n.lineTo(e+r-l.bottomRight,i+o),n.arc(e+r-l.bottomRight,i+o-l.bottomRight,l.bottomRight,Et,0,!0),n.lineTo(e+r,i+l.topRight),n.arc(e+r-l.topRight,i+l.topRight,l.topRight,0,-Et,!0),n.lineTo(e+l.topLeft,i)}const yw=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,vw=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ww(n,t){const e=(""+n).match(yw);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Sw=n=>+n||0;function Tl(n,t){const e={},i=ot(t),r=i?Object.keys(t):t,o=ot(n)?i?l=>Z(n[l],n[t[l]]):l=>n[l]:()=>n;for(const l of r)e[l]=Sw(o(l));return e}function kd(n){return Tl(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Xn(n){return Tl(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(n){const t=kd(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function zt(n,t){n=n||{},t=t||Dt.font;let e=Z(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=Z(n.style,t.style);i&&!(""+i).match(vw)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:Z(n.family,t.family),lineHeight:ww(Z(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:Z(n.weight,t.weight),string:""};return r.string=dw(r),r}function Zi(n,t,e,i){let r=!0,o,l,c;for(o=0,l=n.length;o<l;++o)if(c=n[o],c!==void 0&&(t!==void 0&&typeof c=="function"&&(c=c(t),r=!1),e!==void 0&&St(c)&&(c=c[e%c.length],r=!1),c!==void 0))return i&&!r&&(i.cacheable=!1),c}function Aw(n,t,e){const{min:i,max:r}=n,o=md(t,(r-i)/2),l=(c,u)=>e&&c===0?0:c+u;return{min:l(i,-Math.abs(o)),max:l(r,o)}}function Pn(n,t){return Object.assign(Object.create(n),t)}function Pl(n,t=[""],e=n,i,r=()=>n[0]){Me(i)||(i=Dd("_fallback",n));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:e,_fallback:i,_getTarget:r,override:l=>Pl([l,...n],t,e,i)};return new Proxy(o,{deleteProperty(l,c){return delete l[c],delete l._keys,delete n[0][c],!0},get(l,c){return Cd(l,c,()=>Rw(c,t,n,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(l,c){return Nu(l).includes(c)},ownKeys(l){return Nu(l)},set(l,c,u){const f=l._storage||(l._storage=r());return l[c]=f[c]=u,delete l._keys,!0}})}function xi(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ed(n,i),setContext:o=>xi(n,o,e,i),override:o=>xi(n.override(o),t,e,i)};return new Proxy(r,{deleteProperty(o,l){return delete o[l],delete n[l],!0},get(o,l,c){return Cd(o,l,()=>Ow(o,l,c))},getOwnPropertyDescriptor(o,l){return o._descriptors.allKeys?Reflect.has(n,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,l)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,l){return Reflect.has(n,l)},ownKeys(){return Reflect.ownKeys(n)},set(o,l,c){return n[l]=c,delete o[l],!0}})}function Ed(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:Tn(e)?e:()=>e,isIndexable:Tn(i)?i:()=>i}}const Mw=(n,t)=>n?n+Sl(t):t,kl=(n,t)=>ot(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Cd(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Ow(n,t,e){const{_proxy:i,_context:r,_subProxy:o,_descriptors:l}=n;let c=i[t];return Tn(c)&&l.isScriptable(t)&&(c=Tw(t,c,n,e)),St(c)&&c.length&&(c=Pw(t,c,n,l.isIndexable)),kl(t,c)&&(c=xi(c,r,o&&o[t],l)),c}function Tw(n,t,e,i){const{_proxy:r,_context:o,_subProxy:l,_stack:c}=e;if(c.has(n))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+n);return c.add(n),t=t(o,l||i),c.delete(n),kl(n,t)&&(t=El(r._scopes,r,n,t)),t}function Pw(n,t,e,i){const{_proxy:r,_context:o,_subProxy:l,_descriptors:c}=e;if(Me(o.index)&&i(n))t=t[o.index%t.length];else if(ot(t[0])){const u=t,f=r._scopes.filter(d=>d!==u);t=[];for(const d of u){const p=El(f,r,n,d);t.push(xi(p,o,l&&l[n],c))}}return t}function Rd(n,t,e){return Tn(n)?n(t,e):n}const kw=(n,t)=>n===!0?t:typeof n=="string"?On(t,n):void 0;function Ew(n,t,e,i,r){for(const o of t){const l=kw(e,o);if(l){n.add(l);const c=Rd(l._fallback,e,r);if(Me(c)&&c!==e&&c!==i)return c}else if(l===!1&&Me(i)&&e!==i)return null}return!1}function El(n,t,e,i){const r=t._rootScopes,o=Rd(t._fallback,e,i),l=[...n,...r],c=new Set;c.add(i);let u=zu(c,l,e,o||e,i);return u===null||Me(o)&&o!==e&&(u=zu(c,l,o,u,i),u===null)?!1:Pl(Array.from(c),[""],r,o,()=>Cw(t,e,i))}function zu(n,t,e,i,r){for(;e;)e=Ew(n,t,e,i,r);return e}function Cw(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return St(r)&&ot(e)?e:r||{}}function Rw(n,t,e,i){let r;for(const o of t)if(r=Dd(Mw(o,n),e),Me(r))return kl(n,r)?El(e,i,n,r):r}function Dd(n,t){for(const e of t){if(!e)continue;const i=e[n];if(Me(i))return i}}function Nu(n){let t=n._keys;return t||(t=n._keys=Dw(n._scopes)),t}function Dw(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Ld(n,t,e,i){const{iScale:r}=n,{key:o="r"}=this._parsing,l=new Array(i);let c,u,f,d;for(c=0,u=i;c<u;++c)f=c+e,d=t[f],l[c]={r:r.parse(On(d,o),f)};return l}const Lw=Number.EPSILON||1e-14,yi=(n,t)=>t<n.length&&!n[t].skip&&n[t],Id=n=>n==="x"?"y":"x";function Iw(n,t,e,i){const r=n.skip?t:n,o=t,l=e.skip?t:e,c=Qa(o,r),u=Qa(l,o);let f=c/(c+u),d=u/(c+u);f=isNaN(f)?0:f,d=isNaN(d)?0:d;const p=i*f,m=i*d;return{previous:{x:o.x-p*(l.x-r.x),y:o.y-p*(l.y-r.y)},next:{x:o.x+m*(l.x-r.x),y:o.y+m*(l.y-r.y)}}}function Fw(n,t,e){const i=n.length;let r,o,l,c,u,f=yi(n,0);for(let d=0;d<i-1;++d)if(u=f,f=yi(n,d+1),!(!u||!f)){if(is(t[d],0,Lw)){e[d]=e[d+1]=0;continue}r=e[d]/t[d],o=e[d+1]/t[d],c=Math.pow(r,2)+Math.pow(o,2),!(c<=9)&&(l=3/Math.sqrt(c),e[d]=r*l*t[d],e[d+1]=o*l*t[d])}}function Bw(n,t,e="x"){const i=Id(e),r=n.length;let o,l,c,u=yi(n,0);for(let f=0;f<r;++f){if(l=c,c=u,u=yi(n,f+1),!c)continue;const d=c[e],p=c[i];l&&(o=(d-l[e])/3,c[`cp1${e}`]=d-o,c[`cp1${i}`]=p-o*t[f]),u&&(o=(u[e]-d)/3,c[`cp2${e}`]=d+o,c[`cp2${i}`]=p+o*t[f])}}function zw(n,t="x"){const e=Id(t),i=n.length,r=Array(i).fill(0),o=Array(i);let l,c,u,f=yi(n,0);for(l=0;l<i;++l)if(c=u,u=f,f=yi(n,l+1),!!u){if(f){const d=f[t]-u[t];r[l]=d!==0?(f[e]-u[e])/d:0}o[l]=c?f?Ve(r[l-1])!==Ve(r[l])?0:(r[l-1]+r[l])/2:r[l-1]:r[l]}Fw(n,r,o),Bw(n,o,t)}function mr(n,t,e){return Math.max(Math.min(n,e),t)}function Nw(n,t){let e,i,r,o,l,c=us(n[0],t);for(e=0,i=n.length;e<i;++e)l=o,o=c,c=e<i-1&&us(n[e+1],t),o&&(r=n[e],l&&(r.cp1x=mr(r.cp1x,t.left,t.right),r.cp1y=mr(r.cp1y,t.top,t.bottom)),c&&(r.cp2x=mr(r.cp2x,t.left,t.right),r.cp2y=mr(r.cp2y,t.top,t.bottom)))}function Ww(n,t,e,i,r){let o,l,c,u;if(t.spanGaps&&(n=n.filter(f=>!f.skip)),t.cubicInterpolationMode==="monotone")zw(n,r);else{let f=i?n[n.length-1]:n[0];for(o=0,l=n.length;o<l;++o)c=n[o],u=Iw(f,c,n[Math.min(o+1,l-(i?0:1))%l],t.tension),c.cp1x=u.previous.x,c.cp1y=u.previous.y,c.cp2x=u.next.x,c.cp2y=u.next.y,f=c}t.capBezierPoints&&Nw(n,e)}function Fd(){return typeof window<"u"&&typeof document<"u"}function Cl(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Yr(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const so=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Hw(n,t){return so(n).getPropertyValue(t)}const Uw=["top","right","bottom","left"];function Kn(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const o=Uw[r];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Vw=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function $w(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:o}=i;let l=!1,c,u;if(Vw(r,o,n.target))c=r,u=o;else{const f=t.getBoundingClientRect();c=i.clientX-f.left,u=i.clientY-f.top,l=!0}return{x:c,y:u,box:l}}function $n(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=so(e),o=r.boxSizing==="border-box",l=Kn(r,"padding"),c=Kn(r,"border","width"),{x:u,y:f,box:d}=$w(n,e),p=l.left+(d&&c.left),m=l.top+(d&&c.top);let{width:b,height:v}=t;return o&&(b-=l.width+c.width,v-=l.height+c.height),{x:Math.round((u-p)/b*e.width/i),y:Math.round((f-m)/v*e.height/i)}}function jw(n,t,e){let i,r;if(t===void 0||e===void 0){const o=Cl(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const l=o.getBoundingClientRect(),c=so(o),u=Kn(c,"border","width"),f=Kn(c,"padding");t=l.width-f.width-u.width,e=l.height-f.height-u.height,i=Yr(c.maxWidth,o,"clientWidth"),r=Yr(c.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||$r,maxHeight:r||$r}}const _r=n=>Math.round(n*10)/10;function Yw(n,t,e,i){const r=so(n),o=Kn(r,"margin"),l=Yr(r.maxWidth,n,"clientWidth")||$r,c=Yr(r.maxHeight,n,"clientHeight")||$r,u=jw(n,t,e);let{width:f,height:d}=u;if(r.boxSizing==="content-box"){const m=Kn(r,"border","width"),b=Kn(r,"padding");f-=b.width+m.width,d-=b.height+m.height}return f=Math.max(0,f-o.width),d=Math.max(0,i?f/i:d-o.height),f=_r(Math.min(f,l,u.maxWidth)),d=_r(Math.min(d,c,u.maxHeight)),f&&!d&&(d=_r(f/2)),(t!==void 0||e!==void 0)&&i&&u.height&&d>u.height&&(d=u.height,f=_r(Math.floor(d*i))),{width:f,height:d}}function Wu(n,t,e){const i=t||1,r=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const l=n.canvas;return l.style&&(e||!l.style.height&&!l.style.width)&&(l.style.height=`${n.height}px`,l.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||l.height!==r||l.width!==o?(n.currentDevicePixelRatio=i,l.height=r,l.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const qw=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return n}();function Hu(n,t){const e=Hw(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function jn(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Xw(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Kw(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},l=jn(n,r,e),c=jn(r,o,e),u=jn(o,t,e),f=jn(l,c,e),d=jn(c,u,e);return jn(f,d,e)}const Gw=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Jw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function mi(n,t,e){return n?Gw(t,e):Jw()}function Bd(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function zd(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Nd(n){return n==="angle"?{between:hs,compare:Z1,normalize:ge}:{between:rn,compare:(t,e)=>t-e,normalize:t=>t}}function Uu({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function Zw(n,t,e){const{property:i,start:r,end:o}=e,{between:l,normalize:c}=Nd(i),u=t.length;let{start:f,end:d,loop:p}=n,m,b;if(p){for(f+=u,d+=u,m=0,b=u;m<b&&l(c(t[f%u][i]),r,o);++m)f--,d--;f%=u,d%=u}return d<f&&(d+=u),{start:f,end:d,loop:p,style:n.style}}function Wd(n,t,e){if(!e)return[n];const{property:i,start:r,end:o}=e,l=t.length,{compare:c,between:u,normalize:f}=Nd(i),{start:d,end:p,loop:m,style:b}=Zw(n,t,e),v=[];let w=!1,A=null,O,k,D;const L=()=>u(r,D,O)&&c(r,D)!==0,C=()=>c(o,O)===0||u(o,D,O),E=()=>w||L(),I=()=>!w||C();for(let F=d,Y=d;F<=p;++F)k=t[F%l],!k.skip&&(O=f(k[i]),O!==D&&(w=u(O,r,o),A===null&&E()&&(A=c(O,r)===0?F:Y),A!==null&&I()&&(v.push(Uu({start:A,end:F,loop:m,count:l,style:b})),A=null),Y=F,D=O));return A!==null&&v.push(Uu({start:A,end:p,loop:m,count:l,style:b})),v}function Hd(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const o=Wd(i[r],n.points,t);o.length&&e.push(...o)}return e}function Qw(n,t,e,i){let r=0,o=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(o+=r);o>r&&n[o%t].skip;)o--;return o%=t,{start:r,end:o}}function tS(n,t,e,i){const r=n.length,o=[];let l=t,c=n[t],u;for(u=t+1;u<=e;++u){const f=n[u%r];f.skip||f.stop?c.skip||(i=!1,o.push({start:t%r,end:(u-1)%r,loop:i}),t=l=f.stop?u:null):(l=u,c.skip&&(t=u)),c=f}return l!==null&&o.push({start:t%r,end:l%r,loop:i}),o}function eS(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const o=!!n._loop,{start:l,end:c}=Qw(e,r,o,i);if(i===!0)return Vu(n,[{start:l,end:c,loop:o}],e,t);const u=c<l?c+r:c,f=!!n._fullLoop&&l===0&&c===r-1;return Vu(n,tS(e,l,u,f),e,t)}function Vu(n,t,e,i){return!i||!i.setContext||!e?t:nS(n,t,e,i)}function nS(n,t,e,i){const r=n._chart.getContext(),o=$u(n.options),{_datasetIndex:l,options:{spanGaps:c}}=n,u=e.length,f=[];let d=o,p=t[0].start,m=p;function b(v,w,A,O){const k=c?-1:1;if(v!==w){for(v+=u;e[v%u].skip;)v-=k;for(;e[w%u].skip;)w+=k;v%u!==w%u&&(f.push({start:v%u,end:w%u,loop:A,style:O}),d=O,p=w%u)}}for(const v of t){p=c?p:v.start;let w=e[p%u],A;for(m=p+1;m<=v.end;m++){const O=e[m%u];A=$u(i.setContext(Pn(r,{type:"segment",p0:w,p1:O,p0DataIndex:(m-1)%u,p1DataIndex:m%u,datasetIndex:l}))),iS(A,d)&&b(p,m-1,v.loop,d),w=O,d=A}p<m-1&&b(p,m-1,v.loop,d)}return f}function $u(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function iS(n,t){return t&&JSON.stringify(n)!==JSON.stringify(t)}/*!
|
||
* Chart.js v4.2.1
|
||
* https://www.chartjs.org
|
||
* (c) 2023 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/class sS{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const o=e.listeners[r],l=e.duration;o.forEach(c=>c({chart:t,initial:e.initial,numSteps:l,currentStep:Math.min(i-e.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=wd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const o=i.items;let l=o.length-1,c=!1,u;for(;l>=0;--l)u=o[l],u._active?(u._total>i.duration&&(i.duration=u._total),u.tick(t),c=!0):(o[l]=o[o.length-1],o.pop());c&&(r.draw(),this._notify(r,i,t,"progress")),o.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}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((i,r)=>Math.max(i,r._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 i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var en=new sS;const ju="transparent",rS={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=Iu(n||ju),r=i.valid&&Iu(t||ju);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class oS{constructor(t,e,i,r){const o=e[i];r=Zi([t.to,r,o,t.from]);const l=Zi([t.from,o,r]);this._active=!0,this._fn=t.fn||rS[t.type||typeof l],this._easing=ss[t.easing]||ss.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=i,this._from=l,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,l=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(l,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Zi([t.to,e,r,t.from]),this._from=Zi([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,o=this._from,l=this._loop,c=this._to;let u;if(this._active=o!==c&&(l||e<i),!this._active){this._target[r]=c,this._notify(!0);return}if(e<0){this._target[r]=o;return}u=e/i%2,u=l&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[r]=this._fn(o,c,u)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}class Ud{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!ot(t))return;const e=Object.keys(Dt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const o=t[r];if(!ot(o))return;const l={};for(const c of e)l[c]=o[c];(St(o.properties)&&o.properties||[r]).forEach(c=>{(c===r||!i.has(c))&&i.set(c,l)})})}_animateOptions(t,e){const i=e.options,r=lS(t,i);if(!r)return[];const o=this._createAnimations(r,i);return i.$shared&&aS(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,r=[],o=t.$animations||(t.$animations={}),l=Object.keys(e),c=Date.now();let u;for(u=l.length-1;u>=0;--u){const f=l[u];if(f.charAt(0)==="$")continue;if(f==="options"){r.push(...this._animateOptions(t,e));continue}const d=e[f];let p=o[f];const m=i.get(f);if(p)if(m&&p.active()){p.update(m,d,c);continue}else p.cancel();if(!m||!m.duration){t[f]=d;continue}o[f]=p=new oS(m,t,f,d),r.push(p)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return en.add(this._chart,i),!0}}function aS(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const o=n[i[r]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function lS(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Yu(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:r,end:i?r:o}}function cS(n,t,e){if(e===!1)return!1;const i=Yu(n,e),r=Yu(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function hS(n){let t,e,i,r;return ot(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function Vd(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,o;for(r=0,o=i.length;r<o;++r)e.push(i[r].index);return e}function qu(n,t,e,i={}){const r=n.keys,o=i.mode==="single";let l,c,u,f;if(t!==null){for(l=0,c=r.length;l<c;++l){if(u=+r[l],u===e){if(i.all)continue;break}f=n.values[u],kt(f)&&(o||t===0||Ve(t)===Ve(f))&&(t+=f)}return t}}function uS(n){const t=Object.keys(n),e=new Array(t.length);let i,r,o;for(i=0,r=t.length;i<r;++i)o=t[i],e[i]={x:o,y:n[o]};return e}function Xu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function fS(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function dS(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function gS(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Ku(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const o=n[r.index];if(e&&o>0||!e&&o<0)return r.index}return null}function Gu(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:o,vScale:l,index:c}=i,u=o.axis,f=l.axis,d=fS(o,l,i),p=t.length;let m;for(let b=0;b<p;++b){const v=t[b],{[u]:w,[f]:A}=v,O=v._stacks||(v._stacks={});m=O[f]=gS(r,d,w),m[c]=A,m._top=Ku(m,l,!0,i.type),m._bottom=Ku(m,l,!1,i.type);const k=m._visualValues||(m._visualValues={});k[c]=A}}function Fa(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function pS(n,t){return Pn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function mS(n,t,e){return Pn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Yi(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const o=r._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const Ba=n=>n==="reset"||n==="none",Ju=(n,t)=>t?n:Object.assign({},n),_S=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Vd(e,!0),values:null};class Le{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=Xu(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&&Yi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(p,m,b,v)=>p==="x"?m:p==="r"?v:b,o=e.xAxisID=Z(i.xAxisID,Fa(t,"x")),l=e.yAxisID=Z(i.yAxisID,Fa(t,"y")),c=e.rAxisID=Z(i.rAxisID,Fa(t,"r")),u=e.indexAxis,f=e.iAxisID=r(u,o,l,c),d=e.vAxisID=r(u,l,o,c);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(l),e.rScale=this.getScaleForId(c),e.iScale=this.getScaleForId(f),e.vScale=this.getScaleForId(d)}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&&Ru(this._data,this),t._stacked&&Yi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(ot(e))this._data=uS(e);else if(i!==e){if(i){Ru(i,this);const r=this._cachedMeta;Yi(r),r._parsed=[]}e&&Object.isExtensible(e)&&nw(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,i=this.getDataset();let r=!1;this._dataCheck();const o=e._stacked;e._stacked=Xu(e.vScale,e),e.stack!==i.stack&&(r=!0,Yi(e),e.stack=i.stack),this._resyncElements(t),(r||o!==e._stacked)&&Gu(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:l}=i,c=o.axis;let u=t===0&&e===r.length?!0:i._sorted,f=t>0&&i._parsed[t-1],d,p,m;if(this._parsing===!1)i._parsed=r,i._sorted=!0,m=r;else{St(r[t])?m=this.parseArrayData(i,r,t,e):ot(r[t])?m=this.parseObjectData(i,r,t,e):m=this.parsePrimitiveData(i,r,t,e);const b=()=>p[c]===null||f&&p[c]<f[c];for(d=0;d<e;++d)i._parsed[d+t]=p=m[d],u&&(b()&&(u=!1),f=p);i._sorted=u}l&&Gu(this,m)}parsePrimitiveData(t,e,i,r){const{iScale:o,vScale:l}=t,c=o.axis,u=l.axis,f=o.getLabels(),d=o===l,p=new Array(r);let m,b,v;for(m=0,b=r;m<b;++m)v=m+i,p[m]={[c]:d||o.parse(f[v],v),[u]:l.parse(e[v],v)};return p}parseArrayData(t,e,i,r){const{xScale:o,yScale:l}=t,c=new Array(r);let u,f,d,p;for(u=0,f=r;u<f;++u)d=u+i,p=e[d],c[u]={x:o.parse(p[0],d),y:l.parse(p[1],d)};return c}parseObjectData(t,e,i,r){const{xScale:o,yScale:l}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,f=new Array(r);let d,p,m,b;for(d=0,p=r;d<p;++d)m=d+i,b=e[m],f[d]={x:o.parse(On(b,c),m),y:l.parse(On(b,u),m)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,o=this._cachedMeta,l=e[t.axis],c={keys:Vd(r,!0),values:e._stacks[t.axis]._visualValues};return qu(c,l,o.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const o=i[e.axis];let l=o===null?NaN:o;const c=r&&i._stacks[e.axis];r&&c&&(r.values=c,l=qu(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,l),t.max=Math.max(t.max,l)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,l=r.length,c=this._getOtherScale(t),u=_S(e,i,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:p}=dS(c);let m,b;function v(){b=r[m];const w=b[c.axis];return!kt(b[t.axis])||d>w||p<w}for(m=0;m<l&&!(!v()&&(this.updateRangeFromParsed(f,t,b,u),o));++m);if(o){for(m=l-1;m>=0;--m)if(!v()){this.updateRangeFromParsed(f,t,b,u);break}}return f}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,o,l;for(r=0,o=e.length;r<o;++r)l=e[r][t.axis],kt(l)&&i.push(l);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=hS(Z(this.options.clip,cS(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],o=e.chartArea,l=[],c=this._drawStart||0,u=this._drawCount||r.length-c,f=this.options.drawActiveElementsOnTop;let d;for(i.dataset&&i.dataset.draw(t,o,c,u),d=c;d<c+u;++d){const p=r[d];p.hidden||(p.active&&f?l.push(p):p.draw(t,o))}for(d=0;d<l.length;++d)l[d].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const l=this._cachedMeta.data[t];o=l.$context||(l.$context=mS(this.getContext(),t,l)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=pS(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",o=this._cachedDataOpts,l=t+"-"+e,c=o[l],u=this.enableOptionSharing&&Me(i);if(c)return Ju(c,u);const f=this.chart.config,d=f.datasetElementScopeKeys(this._type,t),p=r?[`${t}Hover`,"hover",t,""]:[t,""],m=f.getOptionScopes(this.getDataset(),d),b=Object.keys(Dt.elements[t]),v=()=>this.getContext(i,r,e),w=f.resolveNamedOptions(m,b,v,p);return w.$shared&&(w.$shared=u,o[l]=Object.freeze(Ju(w,u))),w}_resolveAnimations(t,e,i){const r=this.chart,o=this._cachedDataOpts,l=`animation-${e}`,c=o[l];if(c)return c;let u;if(r.options.animation!==!1){const d=this.chart.config,p=d.datasetAnimationScopeKeys(this._type,e),m=d.getOptionScopes(this.getDataset(),p);u=d.createResolver(m,this.getContext(t,i,e))}const f=new Ud(r,u&&u.animations);return u&&u._cacheable&&(o[l]=Object.freeze(f)),f}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ba(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,o=this.getSharedOptions(i),l=this.includeOptions(e,o)||o!==r;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:l}}updateElement(t,e,i,r){Ba(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!Ba(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const o=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[c,u,f]of this._syncList)this[c](u,f);this._syncList=[];const r=i.length,o=e.length,l=Math.min(o,r);l&&this.parse(0,l),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,e,i=!0){const r=this._cachedMeta,o=r.data,l=t+e;let c;const u=f=>{for(f.length+=e,c=f.length-1;c>=l;c--)f[c]=f[c-e]};for(u(o),c=t;c<l;++c)o[c]=new this.dataElementType;this._parsing&&u(r._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&Yi(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}$(Le,"defaults",{}),$(Le,"datasetElementType",null),$(Le,"dataElementType",null);function bS(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,o=e.length;r<o;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=vd(i.sort((r,o)=>r-o))}return n._cache.$bar}function xS(n){const t=n.iScale,e=bS(t,n.type);let i=t._length,r,o,l,c;const u=()=>{l===32767||l===-32768||(Me(c)&&(i=Math.min(i,Math.abs(l-c)||i)),c=l)};for(r=0,o=e.length;r<o;++r)l=t.getPixelForValue(e[r]),u();for(c=void 0,r=0,o=t.ticks.length;r<o;++r)l=t.getPixelForTick(r),u();return i}function yS(n,t,e,i){const r=e.barThickness;let o,l;return ht(r)?(o=t.min*e.categoryPercentage,l=e.barPercentage):(o=r*i,l=1),{chunk:o/i,ratio:l,start:t.pixels[n]-o/2}}function vS(n,t,e,i){const r=t.pixels,o=r[n];let l=n>0?r[n-1]:null,c=n<r.length-1?r[n+1]:null;const u=e.categoryPercentage;l===null&&(l=o-(c===null?t.end-t.start:c-o)),c===null&&(c=o+o-l);const f=o-(o-Math.min(l,c))/2*u;return{chunk:Math.abs(c-l)/2*u/i,ratio:e.barPercentage,start:f}}function wS(n,t,e,i){const r=e.parse(n[0],i),o=e.parse(n[1],i),l=Math.min(r,o),c=Math.max(r,o);let u=l,f=c;Math.abs(l)>Math.abs(c)&&(u=c,f=l),t[e.axis]=f,t._custom={barStart:u,barEnd:f,start:r,end:o,min:l,max:c}}function $d(n,t,e,i){return St(n)?wS(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Zu(n,t,e,i){const r=n.iScale,o=n.vScale,l=r.getLabels(),c=r===o,u=[];let f,d,p,m;for(f=e,d=e+i;f<d;++f)m=t[f],p={},p[r.axis]=c||r.parse(l[f],f),u.push($d(m,p,o,f));return u}function za(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function SS(n,t,e){return n!==0?Ve(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function AS(n){let t,e,i,r,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",o="start"):(r="start",o="end"),{start:e,end:i,reverse:t,top:r,bottom:o}}function MS(n,t,e,i){let r=t.borderSkipped;const o={};if(!r){n.borderSkipped=o;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:c,reverse:u,top:f,bottom:d}=AS(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=f:(e._bottom||0)===i?r=d:(o[Qu(d,l,c,u)]=!0,r=f)),o[Qu(r,l,c,u)]=!0,n.borderSkipped=o}function Qu(n,t,e,i){return i?(n=OS(n,t,e),n=tf(n,e,t)):n=tf(n,t,e),n}function OS(n,t,e){return n===t?e:n===e?t:n}function tf(n,t,e){return n==="start"?t:n==="end"?e:n}function TS(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Cr extends Le{parsePrimitiveData(t,e,i,r){return Zu(t,e,i,r)}parseArrayData(t,e,i,r){return Zu(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:o,vScale:l}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,f=o.axis==="x"?c:u,d=l.axis==="x"?c:u,p=[];let m,b,v,w;for(m=i,b=i+r;m<b;++m)w=e[m],v={},v[o.axis]=o.parse(On(w,f),m),p.push($d(On(w,d),v,l,m));return p}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,o=this.getParsed(t),l=o._custom,c=za(l)?"["+l.start+", "+l.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const o=r==="reset",{index:l,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),f=c.isHorizontal(),d=this._getRuler(),{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,r);for(let b=e;b<e+i;b++){const v=this.getParsed(b),w=o||ht(v[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(b),A=this._calculateBarIndexPixels(b,d),O=(v._stacks||{})[c.axis],k={horizontal:f,base:w.base,enableBorderRadius:!O||za(v._custom)||l===O._top||l===O._bottom,x:f?w.head:A.center,y:f?A.center:w.head,height:f?A.size:Math.abs(w.size),width:f?Math.abs(w.size):A.size};m&&(k.options=p||this.resolveDataElementOptions(b,t[b].active?"active":r));const D=k.options||t[b].options;MS(k,D,O,l),TS(k,D,d.ratio),this.updateElement(t[b],b,k,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=i.options.stacked,l=[],c=u=>{const f=u.controller.getParsed(e),d=f&&f[u.vScale.axis];if(ht(d)||isNaN(d))return!0};for(const u of r)if(!(e!==void 0&&c(u))&&((o===!1||l.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&l.push(u.stack),u.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),o=e!==void 0?r.indexOf(e):-1;return o===-1?r.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let o,l;for(o=0,l=e.data.length;o<l;++o)r.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const c=t.barThickness;return{min:c||xS(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:r},options:{base:o,minBarLength:l}}=this,c=o||0,u=this.getParsed(t),f=u._custom,d=za(f);let p=u[e.axis],m=0,b=i?this.applyStack(e,u,i):p,v,w;b!==p&&(m=b-p,b=p),d&&(p=f.barStart,b=f.barEnd-f.barStart,p!==0&&Ve(p)!==Ve(f.barEnd)&&(m=0),m+=p);const A=!ht(o)&&!d?o:m;let O=e.getPixelForValue(A);if(this.chart.getDataVisibility(t)?v=e.getPixelForValue(m+b):v=O,w=v-O,Math.abs(w)<l){w=SS(w,e,c)*l,p===c&&(O-=w/2);const k=e.getPixelForDecimal(0),D=e.getPixelForDecimal(1),L=Math.min(k,D),C=Math.max(k,D);O=Math.max(Math.min(O,C),L),v=O+w,i&&!d&&(u._stacks[e.axis]._visualValues[r]=e.getValueForPixel(v)-e.getValueForPixel(O))}if(O===e.getPixelForValue(c)){const k=Ve(w)*e.getLineWidthForValue(c)/2;O+=k,w-=k}return{size:w,base:O,head:v,center:v+w/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,o=r.skipNull,l=Z(r.maxBarThickness,1/0);let c,u;if(e.grouped){const f=o?this._getStackCount(t):e.stackCount,d=r.barThickness==="flex"?vS(t,e,r,f):yS(t,e,r,f),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);c=d.start+d.chunk*p+d.chunk/2,u=Math.min(l,d.chunk*d.ratio)}else c=i.getPixelForValue(this.getParsed(t)[i.axis],t),u=Math.min(l,e.min*e.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let o=0;for(;o<r;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}$(Cr,"id","bar"),$(Cr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),$(Cr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Rr extends Le{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const o=super.parsePrimitiveData(t,e,i,r);for(let l=0;l<o.length;l++)o[l]._custom=this.resolveDataElementOptions(l+i).radius;return o}parseArrayData(t,e,i,r){const o=super.parseArrayData(t,e,i,r);for(let l=0;l<o.length;l++){const c=e[i+l];o[l]._custom=Z(c[2],this.resolveDataElementOptions(l+i).radius)}return o}parseObjectData(t,e,i,r){const o=super.parseObjectData(t,e,i,r);for(let l=0;l<o.length;l++){const c=e[i+l];o[l]._custom=Z(c&&c.r&&+c.r,this.resolveDataElementOptions(l+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=e,l=this.getParsed(t),c=r.getLabelForValue(l.x),u=o.getLabelForValue(l.y),f=l._custom;return{label:i[t]||"",value:"("+c+", "+u+(f?", "+f:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:l,vScale:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(e,r),d=l.axis,p=c.axis;for(let m=e;m<e+i;m++){const b=t[m],v=!o&&this.getParsed(m),w={},A=w[d]=o?l.getPixelForDecimal(.5):l.getPixelForValue(v[d]),O=w[p]=o?c.getBasePixel():c.getPixelForValue(v[p]);w.skip=isNaN(A)||isNaN(O),f&&(w.options=u||this.resolveDataElementOptions(m,b.active?"active":r),o&&(w.options.radius=0)),this.updateElement(b,m,w,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return e!=="active"&&(r.radius=0),r.radius+=Z(i&&i._custom,o),r}}$(Rr,"id","bubble"),$(Rr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),$(Rr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function PS(n,t,e){let i=1,r=1,o=0,l=0;if(t<At){const c=n,u=c+t,f=Math.cos(c),d=Math.sin(c),p=Math.cos(u),m=Math.sin(u),b=(D,L,C)=>hs(D,c,u,!0)?1:Math.max(L,L*e,C,C*e),v=(D,L,C)=>hs(D,c,u,!0)?-1:Math.min(L,L*e,C,C*e),w=b(0,f,p),A=b(Et,d,m),O=v(Ot,f,p),k=v(Ot+Et,d,m);i=(w-O)/2,r=(A-k)/2,o=-(w+O)/2,l=-(A+k)/2}return{ratioX:i,ratioY:r,offsetX:o,offsetY:l}}class qn extends Le{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 i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let o=u=>+i[u];if(ot(i[t])){const{key:u="value"}=this._parsing;o=f=>+On(i[f],u)}let l,c;for(l=t,c=t+e;l<c;++l)r._parsed[l]=o(l)}}_getRotation(){return De(this.options.rotation-90)}_getCircumference(){return De(this.options.circumference)}_getRotationExtents(){let t=At,e=-At;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,o=r._getRotation(),l=r._getCircumference();t=Math.min(t,o),e=Math.max(e,o+l)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,o=r.data,l=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(i.width,i.height)-l)/2,0),u=Math.min(U1(this.options.cutout,c),1),f=this._getRingWeight(this.index),{circumference:d,rotation:p}=this._getRotationExtents(),{ratioX:m,ratioY:b,offsetX:v,offsetY:w}=PS(p,d,u),A=(i.width-l)/m,O=(i.height-l)/b,k=Math.max(Math.min(A,O)/2,0),D=md(this.options.radius,k),L=Math.max(D*u,0),C=(D-L)/this._getVisibleDatasetWeightTotal();this.offsetX=v*D,this.offsetY=w*D,r.total=this.calculateTotal(),this.outerRadius=D-C*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-C*f,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/At)}updateElements(t,e,i,r){const o=r==="reset",l=this.chart,c=l.chartArea,f=l.options.animation,d=(c.left+c.right)/2,p=(c.top+c.bottom)/2,m=o&&f.animateScale,b=m?0:this.innerRadius,v=m?0:this.outerRadius,{sharedOptions:w,includeOptions:A}=this._getSharedOptions(e,r);let O=this._getRotation(),k;for(k=0;k<e;++k)O+=this._circumference(k,o);for(k=e;k<e+i;++k){const D=this._circumference(k,o),L=t[k],C={x:d+this.offsetX,y:p+this.offsetY,startAngle:O,endAngle:O+D,circumference:D,outerRadius:v,innerRadius:b};A&&(C.options=w||this.resolveDataElementOptions(k,L.active?"active":r)),O+=D,this.updateElement(L,k,C,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const o=t._parsed[r];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?At*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=xs(e._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,o,l,c,u;if(!t){for(r=0,o=i.data.datasets.length;r<o;++r)if(i.isDatasetVisible(r)){l=i.getDatasetMeta(r),t=l.data,c=l.controller;break}}if(!t)return 0;for(r=0,o=t.length;r<o;++r)u=c.resolveDataElementOptions(r),u.borderAlign!=="inner"&&(e=Math.max(e,u.borderWidth||0,u.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Z(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}$(qn,"id","doughnut"),$(qn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),$(qn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"}),$(qn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((o,l)=>{const u=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:r,lineWidth:u.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class Dr extends Le{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=e,l=this.chart._animationsDisabled;let{start:c,count:u}=Ad(e,r,l);this._drawStart=c,this._drawCount=u,Md(e)&&(c=0,u=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(i,void 0,{animated:!l,options:f},t),this.updateElements(r,c,u,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:l,vScale:c,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,r),m=l.axis,b=c.axis,{spanGaps:v,segment:w}=this.options,A=bi(v)?v:Number.POSITIVE_INFINITY,O=this.chart._animationsDisabled||o||r==="none",k=e+i,D=t.length;let L=e>0&&this.getParsed(e-1);for(let C=0;C<D;++C){const E=t[C],I=O?E:{};if(C<e||C>=k){I.skip=!0;continue}const F=this.getParsed(C),Y=ht(F[b]),Q=I[m]=l.getPixelForValue(F[m],C),tt=I[b]=o||Y?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,F,u):F[b],C);I.skip=isNaN(Q)||isNaN(tt)||Y,I.stop=C>0&&Math.abs(F[m]-L[m])>A,w&&(I.parsed=F,I.raw=f.data[C]),p&&(I.options=d||this.resolveDataElementOptions(C,E.active?"active":r)),O||this.updateElement(E,C,I,r),L=F}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),l=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}$(Dr,"id","line"),$(Dr,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),$(Dr,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class os extends Le{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=xs(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,i,r){return Ld.bind(this)(t,e,i,r)}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((i,r)=>{const o=this.getParsed(r).r;!isNaN(o)&&this.chart.getDataVisibility(r)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(r/2,0),l=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),c=(o-l)/t.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,e,i,r){const o=r==="reset",l=this.chart,u=l.options.animation,f=this._cachedMeta.rScale,d=f.xCenter,p=f.yCenter,m=f.getIndexAngle(0)-.5*Ot;let b=m,v;const w=360/this.countVisibleElements();for(v=0;v<e;++v)b+=this._computeAngle(v,r,w);for(v=e;v<e+i;v++){const A=t[v];let O=b,k=b+this._computeAngle(v,r,w),D=l.getDataVisibility(v)?f.getDistanceFromCenterForValue(this.getParsed(v).r):0;b=k,o&&(u.animateScale&&(D=0),u.animateRotate&&(O=k=m));const L={x:d,y:p,innerRadius:0,outerRadius:D,startAngle:O,endAngle:k,options:this.resolveDataElementOptions(v,A.active?"active":r)};this.updateElement(A,v,L,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?De(this.resolveDataElementOptions(t,e).angle||i):0}}$(os,"id","polarArea"),$(os,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),$(os,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((o,l)=>{const u=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:r,lineWidth:u.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class nl extends qn{}$(nl,"id","pie"),$(nl,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Lr extends Le{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return Ld.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],o=e.iScale.getLabels();if(i.points=r,t!=="resize"){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0);const c={_loop:!0,_fullLoop:o.length===r.length,options:l};this.updateElement(i,void 0,c,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const o=this._cachedMeta.rScale,l=r==="reset";for(let c=e;c<e+i;c++){const u=t[c],f=this.resolveDataElementOptions(c,u.active?"active":r),d=o.getPointPositionForValue(c,this.getParsed(c).r),p=l?o.xCenter:d.x,m=l?o.yCenter:d.y,b={x:p,y:m,angle:d.angle,skip:isNaN(p)||isNaN(m),options:f};this.updateElement(u,c,b,r)}}}$(Lr,"id","radar"),$(Lr,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),$(Lr,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ir extends Le{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:o}=e,l=this.getParsed(t),c=r.getLabelForValue(l.x),u=o.getLabelForValue(l.y);return{label:i[t]||"",value:"("+c+", "+u+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:o,count:l}=Ad(e,i,r);if(this._drawStart=o,this._drawCount=l,Md(e)&&(o=0,l=i.length),this.options.showLine){const{dataset:c,_dataset:u}=e;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!u._decimated,c.points=i;const f=this.resolveDatasetElementOptions(t);f.segment=this.options.segment,this.updateElement(c,void 0,{animated:!r,options:f},t)}this.updateElements(i,o,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,r){const o=r==="reset",{iScale:l,vScale:c,_stacked:u,_dataset:f}=this._cachedMeta,d=this.resolveDataElementOptions(e,r),p=this.getSharedOptions(d),m=this.includeOptions(r,p),b=l.axis,v=c.axis,{spanGaps:w,segment:A}=this.options,O=bi(w)?w:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||o||r==="none";let D=e>0&&this.getParsed(e-1);for(let L=e;L<e+i;++L){const C=t[L],E=this.getParsed(L),I=k?C:{},F=ht(E[v]),Y=I[b]=l.getPixelForValue(E[b],L),Q=I[v]=o||F?c.getBasePixel():c.getPixelForValue(u?this.applyStack(c,E,u):E[v],L);I.skip=isNaN(Y)||isNaN(Q)||F,I.stop=L>0&&Math.abs(E[b]-D[b])>O,A&&(I.parsed=E,I.raw=f.data[L]),m&&(I.options=p||this.resolveDataElementOptions(L,C.active?"active":r)),k||this.updateElement(C,L,I,r),D=E}this.updateSharedOptions(p,r,d)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let c=0;for(let u=e.length-1;u>=0;--u)c=Math.max(c,e[u].size(this.resolveDataElementOptions(u))/2);return c>0&&c}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),l=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,l)/2}}$(Ir,"id","scatter"),$(Ir,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),$(Ir,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var kS=Object.freeze({__proto__:null,BarController:Cr,BubbleController:Rr,DoughnutController:qn,LineController:Dr,PolarAreaController:os,PieController:nl,RadarController:Lr,ScatterController:Ir});function Un(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Rl{static override(t){Object.assign(Rl.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return Un()}parse(){return Un()}format(){return Un()}add(){return Un()}diff(){return Un()}startOf(){return Un()}endOf(){return Un()}}var ES={_date:Rl};function CS(n,t,e,i){const{controller:r,data:o,_sorted:l}=n,c=r._cachedMeta.iScale;if(c&&t===c.axis&&t!=="r"&&l&&o.length){const u=c._reversePixels?tw:on;if(i){if(r._sharedOptions){const f=o[0],d=typeof f.getRange=="function"&&f.getRange(t);if(d){const p=u(o,t,e-d),m=u(o,t,e+d);return{lo:p.lo,hi:m.hi}}}}else return u(o,t,e)}return{lo:0,hi:o.length-1}}function ys(n,t,e,i,r){const o=n.getSortedVisibleDatasetMetas(),l=e[t];for(let c=0,u=o.length;c<u;++c){const{index:f,data:d}=o[c],{lo:p,hi:m}=CS(o[c],t,l,r);for(let b=p;b<=m;++b){const v=d[b];v.skip||i(v,f,b)}}}function RS(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const o=t?Math.abs(i.x-r.x):0,l=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(l,2))}}function Na(n,t,e,i,r){const o=[];return!r&&!n.isPointInArea(t)||ys(n,e,t,function(c,u,f){!r&&!us(c,n.chartArea,0)||c.inRange(t.x,t.y,i)&&o.push({element:c,datasetIndex:u,index:f})},!0),o}function DS(n,t,e,i){let r=[];function o(l,c,u){const{startAngle:f,endAngle:d}=l.getProps(["startAngle","endAngle"],i),{angle:p}=xd(l,{x:t.x,y:t.y});hs(p,f,d)&&r.push({element:l,datasetIndex:c,index:u})}return ys(n,e,t,o),r}function LS(n,t,e,i,r,o){let l=[];const c=RS(e);let u=Number.POSITIVE_INFINITY;function f(d,p,m){const b=d.inRange(t.x,t.y,r);if(i&&!b)return;const v=d.getCenterPoint(r);if(!(!!o||n.isPointInArea(v))&&!b)return;const A=c(t,v);A<u?(l=[{element:d,datasetIndex:p,index:m}],u=A):A===u&&l.push({element:d,datasetIndex:p,index:m})}return ys(n,e,t,f),l}function Wa(n,t,e,i,r,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?DS(n,t,e,r):LS(n,t,e,i,r,o)}function ef(n,t,e,i,r){const o=[],l=e==="x"?"inXRange":"inYRange";let c=!1;return ys(n,e,t,(u,f,d)=>{u[l](t[e],r)&&(o.push({element:u,datasetIndex:f,index:d}),c=c||u.inRange(t.x,t.y,r))}),i&&!c?[]:o}var IS={evaluateInteractionItems:ys,modes:{index(n,t,e,i){const r=$n(t,n),o=e.axis||"x",l=e.includeInvisible||!1,c=e.intersect?Na(n,r,o,i,l):Wa(n,r,o,!1,i,l),u=[];return c.length?(n.getSortedVisibleDatasetMetas().forEach(f=>{const d=c[0].index,p=f.data[d];p&&!p.skip&&u.push({element:p,datasetIndex:f.index,index:d})}),u):[]},dataset(n,t,e,i){const r=$n(t,n),o=e.axis||"xy",l=e.includeInvisible||!1;let c=e.intersect?Na(n,r,o,i,l):Wa(n,r,o,!1,i,l);if(c.length>0){const u=c[0].datasetIndex,f=n.getDatasetMeta(u).data;c=[];for(let d=0;d<f.length;++d)c.push({element:f[d],datasetIndex:u,index:d})}return c},point(n,t,e,i){const r=$n(t,n),o=e.axis||"xy",l=e.includeInvisible||!1;return Na(n,r,o,i,l)},nearest(n,t,e,i){const r=$n(t,n),o=e.axis||"xy",l=e.includeInvisible||!1;return Wa(n,r,o,e.intersect,i,l)},x(n,t,e,i){const r=$n(t,n);return ef(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=$n(t,n);return ef(n,r,"y",e.intersect,i)}}};const jd=["left","top","right","bottom"];function qi(n,t){return n.filter(e=>e.pos===t)}function nf(n,t){return n.filter(e=>jd.indexOf(e.pos)===-1&&e.box.axis===t)}function Xi(n,t){return n.sort((e,i)=>{const r=t?i:e,o=t?e:i;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function FS(n){const t=[];let e,i,r,o,l,c;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:o,options:{stack:l,stackWeight:c=1}}=r,t.push({index:e,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:l&&o+l,stackWeight:c});return t}function BS(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:o}=e;if(!i||!jd.includes(r))continue;const l=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=o}return t}function zS(n,t){const e=BS(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let o,l,c;for(o=0,l=n.length;o<l;++o){c=n[o];const{fullSize:u}=c.box,f=e[c.stack],d=f&&c.stackWeight/f.weight;c.horizontal?(c.width=d?d*i:u&&t.availableWidth,c.height=r):(c.width=i,c.height=d?d*r:u&&t.availableHeight)}return e}function NS(n){const t=FS(n),e=Xi(t.filter(f=>f.box.fullSize),!0),i=Xi(qi(t,"left"),!0),r=Xi(qi(t,"right")),o=Xi(qi(t,"top"),!0),l=Xi(qi(t,"bottom")),c=nf(t,"x"),u=nf(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:r.concat(u).concat(l).concat(c),chartArea:qi(t,"chartArea"),vertical:i.concat(r).concat(u),horizontal:o.concat(l).concat(c)}}function sf(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Yd(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function WS(n,t,e,i){const{pos:r,box:o}=e,l=n.maxPadding;if(!ot(r)){e.size&&(n[r]-=e.size);const p=i[e.stack]||{size:0,count:1};p.size=Math.max(p.size,e.horizontal?o.height:o.width),e.size=p.size/p.count,n[r]+=e.size}o.getPadding&&Yd(l,o.getPadding());const c=Math.max(0,t.outerWidth-sf(l,n,"left","right")),u=Math.max(0,t.outerHeight-sf(l,n,"top","bottom")),f=c!==n.w,d=u!==n.h;return n.w=c,n.h=u,e.horizontal?{same:f,other:d}:{same:d,other:f}}function HS(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function US(n,t){const e=t.maxPadding;function i(r){const o={left:0,top:0,right:0,bottom:0};return r.forEach(l=>{o[l]=Math.max(t[l],e[l])}),o}return i(n?["left","right"]:["top","bottom"])}function Qi(n,t,e,i){const r=[];let o,l,c,u,f,d;for(o=0,l=n.length,f=0;o<l;++o){c=n[o],u=c.box,u.update(c.width||t.w,c.height||t.h,US(c.horizontal,t));const{same:p,other:m}=WS(t,e,c,i);f|=p&&r.length,d=d||m,u.fullSize||r.push(c)}return f&&Qi(r,t,e,i)||d}function br(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function rf(n,t,e,i){const r=e.padding;let{x:o,y:l}=t;for(const c of n){const u=c.box,f=i[c.stack]||{count:1,placed:0,weight:1},d=c.stackWeight/f.weight||1;if(c.horizontal){const p=t.w*d,m=f.size||u.height;Me(f.start)&&(l=f.start),u.fullSize?br(u,r.left,l,e.outerWidth-r.right-r.left,m):br(u,t.left+f.placed,l,p,m),f.start=l,f.placed+=p,l=u.bottom}else{const p=t.h*d,m=f.size||u.width;Me(f.start)&&(o=f.start),u.fullSize?br(u,o,r.top,m,e.outerHeight-r.bottom-r.top):br(u,o,t.top+f.placed,m,p),f.start=o,f.placed+=p,o=u.right}}t.x=o,t.y=l}var Kt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=Gt(n.options.layout.padding),o=Math.max(t-r.width,0),l=Math.max(e-r.height,0),c=NS(n.boxes),u=c.vertical,f=c.horizontal;_t(n.boxes,w=>{typeof w.beforeLayout=="function"&&w.beforeLayout()});const d=u.reduce((w,A)=>A.box.options&&A.box.options.display===!1?w:w+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,availableHeight:l,vBoxMaxWidth:o/2/d,hBoxMaxHeight:l/2}),m=Object.assign({},r);Yd(m,Gt(i));const b=Object.assign({maxPadding:m,w:o,h:l,x:r.left,y:r.top},r),v=zS(u.concat(f),p);Qi(c.fullSize,b,p,v),Qi(u,b,p,v),Qi(f,b,p,v)&&Qi(u,b,p,v),HS(b),rf(c.leftAndTop,b,p,v),b.x+=b.w,b.y+=b.h,rf(c.rightAndBottom,b,p,v),n.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},_t(c.chartArea,w=>{const A=w.box;Object.assign(A,n.chartArea),A.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class qd{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class VS extends qd{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Fr="$chartjs",$S={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},of=n=>n===null||n==="";function jS(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Fr]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",of(r)){const o=Hu(n,"width");o!==void 0&&(n.width=o)}if(of(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=Hu(n,"height");o!==void 0&&(n.height=o)}return n}const Xd=qw?{passive:!0}:!1;function YS(n,t,e){n.addEventListener(t,e,Xd)}function qS(n,t,e){n.canvas.removeEventListener(t,e,Xd)}function XS(n,t){const e=$S[n.type]||n.type,{x:i,y:r}=$n(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function qr(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function KS(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||qr(c.addedNodes,i),l=l&&!qr(c.removedNodes,i);l&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function GS(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let l=!1;for(const c of o)l=l||qr(c.removedNodes,i),l=l&&!qr(c.addedNodes,i);l&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const ds=new Map;let af=0;function Kd(){const n=window.devicePixelRatio;n!==af&&(af=n,ds.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function JS(n,t){ds.size||window.addEventListener("resize",Kd),ds.set(n,t)}function ZS(n){ds.delete(n),ds.size||window.removeEventListener("resize",Kd)}function QS(n,t,e){const i=n.canvas,r=i&&Cl(i);if(!r)return;const o=Sd((c,u)=>{const f=r.clientWidth;e(c,u),f<r.clientWidth&&e()},window),l=new ResizeObserver(c=>{const u=c[0],f=u.contentRect.width,d=u.contentRect.height;f===0&&d===0||o(f,d)});return l.observe(r),JS(n,o),l}function Ha(n,t,e){e&&e.disconnect(),t==="resize"&&ZS(n)}function tA(n,t,e){const i=n.canvas,r=Sd(o=>{n.ctx!==null&&e(XS(o,n))},n);return YS(i,t,r),r}class eA extends qd{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(jS(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Fr])return!1;const i=e[Fr].initial;["height","width"].forEach(o=>{const l=i[o];ht(l)?e.removeAttribute(o):e.setAttribute(o,l)});const r=i.style||{};return Object.keys(r).forEach(o=>{e.style[o]=r[o]}),e.width=e.width,delete e[Fr],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),l={attach:KS,detach:GS,resize:QS}[e]||tA;r[e]=l(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:Ha,detach:Ha,resize:Ha}[e]||qS)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return Yw(t,e,i,r)}isAttached(t){const e=Cl(t);return!!(e&&e.isConnected)}}function nA(n){return!Fd()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?VS:eA}class Ie{constructor(){$(this,"active",!1)}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return bi(this.x)&&bi(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(o=>{r[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),r}}$(Ie,"defaults",{}),$(Ie,"defaultRoutes");function iA(n,t){const e=n.options.ticks,i=sA(n),r=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?oA(t):[],l=o.length,c=o[0],u=o[l-1],f=[];if(l>r)return aA(t,f,o,l/r),f;const d=rA(o,t,r);if(l>0){let p,m;const b=l>1?Math.round((u-c)/(l-1)):null;for(xr(t,f,d,ht(b)?0:c-b,c),p=0,m=l-1;p<m;p++)xr(t,f,d,o[p],o[p+1]);return xr(t,f,d,u,ht(b)?t.length:u+b),f}return xr(t,f,d),f}function sA(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function rA(n,t,e){const i=lA(n),r=t.length/e;if(!i)return Math.max(r,1);const o=G1(i);for(let l=0,c=o.length-1;l<c;l++){const u=o[l];if(u>r)return u}return Math.max(r,1)}function oA(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function aA(n,t,e,i){let r=0,o=e[0],l;for(i=Math.ceil(i),l=0;l<n.length;l++)l===o&&(t.push(n[l]),r++,o=e[r*i])}function xr(n,t,e,i,r){const o=Z(i,0),l=Math.min(Z(r,n.length),n.length);let c=0,u,f,d;for(e=Math.ceil(e),r&&(u=r-i,e=u/Math.floor(u/e)),d=o;d<0;)c++,d=Math.round(o+c*e);for(f=Math.max(o,0);f<l;f++)f===d&&(t.push(n[f]),c++,d=Math.round(o+c*e))}function lA(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const cA=n=>n==="left"?"right":n==="right"?"left":n,lf=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,cf=(n,t)=>Math.min(t||n,n);function hf(n,t){const e=[],i=n.length/t,r=n.length;let o=0;for(;o<r;o+=i)e.push(n[Math.floor(o)]);return e}function hA(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),o=n._startPixel,l=n._endPixel,c=1e-6;let u=n.getPixelForTick(r),f;if(!(e&&(i===1?f=Math.max(u-o,l-u):t===0?f=(n.getPixelForTick(1)-u)/2:f=(u-n.getPixelForTick(r-1))/2,u+=r<t?f:-f,u<o-c||u>l+c)))return u}function uA(n,t){_t(n,e=>{const i=e.gc,r=i.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[i[o]];i.splice(0,r)}})}function Ki(n){return n.drawTicks?n.tickLength:0}function uf(n,t){if(!n.display)return 0;const e=zt(n.font,t),i=Gt(n.padding);return(St(n.text)?n.text.length:1)*e.lineHeight+i.height}function fA(n,t){return Pn(n,{scale:t,type:"scale"})}function dA(n,t,e){return Pn(n,{tick:e,index:t,type:"tick"})}function gA(n,t,e){let i=Ol(n);return(e&&t!=="right"||!e&&t==="right")&&(i=cA(i)),i}function pA(n,t,e,i){const{top:r,left:o,bottom:l,right:c,chart:u}=n,{chartArea:f,scales:d}=u;let p=0,m,b,v;const w=l-r,A=c-o;if(n.isHorizontal()){if(b=Xt(i,o,c),ot(e)){const O=Object.keys(e)[0],k=e[O];v=d[O].getPixelForValue(k)+w-t}else e==="center"?v=(f.bottom+f.top)/2+w-t:v=lf(n,e,t);m=c-o}else{if(ot(e)){const O=Object.keys(e)[0],k=e[O];b=d[O].getPixelForValue(k)-A+t}else e==="center"?b=(f.left+f.right)/2-A+t:b=lf(n,e,t);v=Xt(i,l,r),p=e==="left"?-Et:Et}return{titleX:b,titleY:v,maxWidth:m,rotation:p}}class Zn extends Ie{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=de(t,Number.POSITIVE_INFINITY),e=de(e,Number.NEGATIVE_INFINITY),i=de(i,Number.POSITIVE_INFINITY),r=de(r,Number.NEGATIVE_INFINITY),{min:de(t,i),max:de(e,r),minDefined:kt(t),maxDefined:kt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:o}=this.getUserBounds(),l;if(r&&o)return{min:e,max:i};const c=this.getMatchingVisibleMetas();for(let u=0,f=c.length;u<f;++u)l=c[u].controller.getMinMax(this,t),r||(e=Math.min(e,l.min)),o||(i=Math.max(i,l.max));return e=o&&e>i?i:e,i=r&&e>i?e:i,{min:de(e,de(i,e)),max:de(i,de(e,i))}}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(){vt(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:o,ticks:l}=this.options,c=l.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Aw(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?hf(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=iA(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){vt(this.options.afterUpdate,[this])}beforeSetDimensions(){vt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){vt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),vt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){vt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=vt(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){vt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){vt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=cf(this.ticks.length,t.ticks.maxTicksLimit),r=e.minRotation||0,o=e.maxRotation;let l=r,c,u,f;if(!this._isVisible()||!e.display||r>=o||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const d=this._getLabelSizes(),p=d.widest.width,m=d.highest.height,b=Ut(this.chart.width-p,0,this.maxWidth);c=t.offset?this.maxWidth/i:b/(i-1),p+6>c&&(c=b/(i-(t.offset?.5:1)),u=this.maxHeight-Ki(t.grid)-e.padding-uf(t.title,this.chart.options.font),f=Math.sqrt(p*p+m*m),l=Al(Math.min(Math.asin(Ut((d.highest.height+6)/c,-1,1)),Math.asin(Ut(u/f,-1,1))-Math.asin(Ut(m/f,-1,1)))),l=Math.max(r,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){vt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){vt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:o}}=this,l=this._isVisible(),c=this.isHorizontal();if(l){const u=uf(r,e.options.font);if(c?(t.width=this.maxWidth,t.height=Ki(o)+u):(t.height=this.maxHeight,t.width=Ki(o)+u),i.display&&this.ticks.length){const{first:f,last:d,widest:p,highest:m}=this._getLabelSizes(),b=i.padding*2,v=De(this.labelRotation),w=Math.cos(v),A=Math.sin(v);if(c){const O=i.mirror?0:A*p.width+w*m.height;t.height=Math.min(this.maxHeight,t.height+O+b)}else{const O=i.mirror?0:w*p.width+A*m.height;t.width=Math.min(this.maxWidth,t.width+O+b)}this._calculatePadding(f,d,A,w)}}this._handleMargins(),c?(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,i,r){const{ticks:{align:o,padding:l},position:c}=this.options,u=this.labelRotation!==0,f=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,b=0;u?f?(m=r*t.width,b=i*e.height):(m=i*t.height,b=r*e.width):o==="start"?b=e.width:o==="end"?m=t.width:o!=="inner"&&(m=t.width/2,b=e.width/2),this.paddingLeft=Math.max((m-d+l)*this.width/(this.width-d),0),this.paddingRight=Math.max((b-p+l)*this.width/(this.width-p),0)}else{let d=e.height/2,p=t.height/2;o==="start"?(d=0,p=t.height):o==="end"&&(d=e.height,p=0),this.paddingTop=d+l,this.paddingBottom=p+l}}_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(){vt(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,i;for(e=0,i=t.length;e<i;e++)ht(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=hf(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:r,_longestTextCache:o}=this,l=[],c=[],u=Math.floor(e/cf(e,i));let f=0,d=0,p,m,b,v,w,A,O,k,D,L,C;for(p=0;p<e;p+=u){if(v=t[p].label,w=this._resolveTickFontOptions(p),r.font=A=w.string,O=o[A]=o[A]||{data:{},gc:[]},k=w.lineHeight,D=L=0,!ht(v)&&!St(v))D=jr(r,O.data,O.gc,D,v),L=k;else if(St(v))for(m=0,b=v.length;m<b;++m)C=v[m],!ht(C)&&!St(C)&&(D=jr(r,O.data,O.gc,D,C),L+=k);l.push(D),c.push(L),f=Math.max(D,f),d=Math.max(L,d)}uA(o,e);const E=l.indexOf(f),I=c.indexOf(d),F=Y=>({width:l[Y]||0,height:c[Y]||0});return{first:F(0),last:F(e-1),widest:F(E),highest:F(I),widths:l,heights:c}}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 Q1(this._alignToPixels?Hn(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=dA(this.getContext(),t,i))}return this.$context||(this.$context=fA(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=De(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),l=t.autoSkipPadding||0,c=o?o.widest.width+l:0,u=o?o.highest.height+l:0;return this.isHorizontal()?u*i>c*r?c/i:u/r:u*r<c*i?u/i:c/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:o,position:l,border:c}=r,u=o.offset,f=this.isHorizontal(),p=this.ticks.length+(u?1:0),m=Ki(o),b=[],v=c.setContext(this.getContext()),w=v.display?v.width:0,A=w/2,O=function(xt){return Hn(i,xt,w)};let k,D,L,C,E,I,F,Y,Q,tt,lt,It;if(l==="top")k=O(this.bottom),I=this.bottom-m,Y=k-A,tt=O(t.top)+A,It=t.bottom;else if(l==="bottom")k=O(this.top),tt=t.top,It=O(t.bottom)-A,I=k+A,Y=this.top+m;else if(l==="left")k=O(this.right),E=this.right-m,F=k-A,Q=O(t.left)+A,lt=t.right;else if(l==="right")k=O(this.left),Q=t.left,lt=O(t.right)-A,E=k+A,F=this.left+m;else if(e==="x"){if(l==="center")k=O((t.top+t.bottom)/2+.5);else if(ot(l)){const xt=Object.keys(l)[0],pt=l[xt];k=O(this.chart.scales[xt].getPixelForValue(pt))}tt=t.top,It=t.bottom,I=k+A,Y=I+m}else if(e==="y"){if(l==="center")k=O((t.left+t.right)/2);else if(ot(l)){const xt=Object.keys(l)[0],pt=l[xt];k=O(this.chart.scales[xt].getPixelForValue(pt))}E=k-A,F=E-m,Q=t.left,lt=t.right}const jt=Z(r.ticks.maxTicksLimit,p),ft=Math.max(1,Math.ceil(p/jt));for(D=0;D<p;D+=ft){const xt=this.getContext(D),pt=o.setContext(xt),Lt=c.setContext(xt),Wt=pt.lineWidth,Oe=pt.color,Jt=Lt.dash||[],cn=Lt.dashOffset,kn=pt.tickWidth,En=pt.tickColor,pe=pt.tickBorderDash||[],Fe=pt.tickBorderDashOffset;L=hA(this,D,u),L!==void 0&&(C=Hn(i,L,Wt),f?E=F=Q=lt=C:I=Y=tt=It=C,b.push({tx1:E,ty1:I,tx2:F,ty2:Y,x1:Q,y1:tt,x2:lt,y2:It,width:Wt,color:Oe,borderDash:Jt,borderDashOffset:cn,tickWidth:kn,tickColor:En,tickBorderDash:pe,tickBorderDashOffset:Fe}))}return this._ticksLength=p,this._borderValue=k,b}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:o}=i,l=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:f,padding:d,mirror:p}=o,m=Ki(i.grid),b=m+d,v=p?-d:b,w=-De(this.labelRotation),A=[];let O,k,D,L,C,E,I,F,Y,Q,tt,lt,It="middle";if(r==="top")E=this.bottom-v,I=this._getXAxisLabelAlignment();else if(r==="bottom")E=this.top+v,I=this._getXAxisLabelAlignment();else if(r==="left"){const ft=this._getYAxisLabelAlignment(m);I=ft.textAlign,C=ft.x}else if(r==="right"){const ft=this._getYAxisLabelAlignment(m);I=ft.textAlign,C=ft.x}else if(e==="x"){if(r==="center")E=(t.top+t.bottom)/2+b;else if(ot(r)){const ft=Object.keys(r)[0],xt=r[ft];E=this.chart.scales[ft].getPixelForValue(xt)+b}I=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")C=(t.left+t.right)/2-b;else if(ot(r)){const ft=Object.keys(r)[0],xt=r[ft];C=this.chart.scales[ft].getPixelForValue(xt)}I=this._getYAxisLabelAlignment(m).textAlign}e==="y"&&(u==="start"?It="top":u==="end"&&(It="bottom"));const jt=this._getLabelSizes();for(O=0,k=c.length;O<k;++O){D=c[O],L=D.label;const ft=o.setContext(this.getContext(O));F=this.getPixelForTick(O)+o.labelOffset,Y=this._resolveTickFontOptions(O),Q=Y.lineHeight,tt=St(L)?L.length:1;const xt=tt/2,pt=ft.color,Lt=ft.textStrokeColor,Wt=ft.textStrokeWidth;let Oe=I;l?(C=F,I==="inner"&&(O===k-1?Oe=this.options.reverse?"left":"right":O===0?Oe=this.options.reverse?"right":"left":Oe="center"),r==="top"?f==="near"||w!==0?lt=-tt*Q+Q/2:f==="center"?lt=-jt.highest.height/2-xt*Q+Q:lt=-jt.highest.height+Q/2:f==="near"||w!==0?lt=Q/2:f==="center"?lt=jt.highest.height/2-xt*Q:lt=jt.highest.height-tt*Q,p&&(lt*=-1),w!==0&&!ft.showLabelBackdrop&&(C+=Q/2*Math.sin(w))):(E=F,lt=(1-tt)*Q/2);let Jt;if(ft.showLabelBackdrop){const cn=Gt(ft.backdropPadding),kn=jt.heights[O],En=jt.widths[O];let pe=lt-cn.top,Fe=0-cn.left;switch(It){case"middle":pe-=kn/2;break;case"bottom":pe-=kn;break}switch(I){case"center":Fe-=En/2;break;case"right":Fe-=En;break}Jt={left:Fe,top:pe,width:En+cn.width,height:kn+cn.height,color:ft.backdropColor}}A.push({label:L,font:Y,textOffset:lt,options:{rotation:w,color:pt,strokeColor:Lt,strokeWidth:Wt,textAlign:Oe,textBaseline:It,translation:[C,E],backdrop:Jt}})}return A}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-De(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:o}}=this.options,l=this._getLabelSizes(),c=t+o,u=l.widest.width;let f,d;return e==="left"?r?(d=this.right+o,i==="near"?f="left":i==="center"?(f="center",d+=u/2):(f="right",d+=u)):(d=this.right-c,i==="near"?f="right":i==="center"?(f="center",d-=u/2):(f="left",d=this.left)):e==="right"?r?(d=this.left+o,i==="near"?f="right":i==="center"?(f="center",d-=u/2):(f="left",d-=u)):(d=this.left+c,i==="near"?f="left":i==="center"?(f="center",d+=u/2):(f="right",d=this.right)):f="right",{textAlign:f,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:o,height:l}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,o,l),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(o=>o.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,l;const c=(u,f,d)=>{!d.width||!d.color||(i.save(),i.lineWidth=d.width,i.strokeStyle=d.color,i.setLineDash(d.borderDash||[]),i.lineDashOffset=d.borderDashOffset,i.beginPath(),i.moveTo(u.x,u.y),i.lineTo(f.x,f.y),i.stroke(),i.restore())};if(e.display)for(o=0,l=r.length;o<l;++o){const u=r[o];e.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),e.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:r}}=this,o=i.setContext(this.getContext()),l=i.display?o.width:0;if(!l)return;const c=r.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,d,p,m;this.isHorizontal()?(f=Hn(t,this.left,l)-l/2,d=Hn(t,this.right,c)+c/2,p=m=u):(p=Hn(t,this.top,l)-l/2,m=Hn(t,this.bottom,c)+c/2,f=d=u),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(f,p),e.lineTo(d,m),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&no(i,r);const o=this.getLabelItems(t);for(const l of o){const c=l.options,u=l.font,f=l.label,d=l.textOffset;Jn(i,f,0,d,u,c)}r&&io(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const o=zt(i.font),l=Gt(i.padding),c=i.align;let u=o.lineHeight/2;e==="bottom"||e==="center"||ot(e)?(u+=l.bottom,St(i.text)&&(u+=o.lineHeight*(i.text.length-1))):u+=l.top;const{titleX:f,titleY:d,maxWidth:p,rotation:m}=pA(this,u,e,c);Jn(t,i.text,0,0,o,{color:i.color,maxWidth:p,rotation:m,textAlign:gA(c,e,r),textBaseline:"middle",translation:[f,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Z(t.grid&&t.grid.z,-1),r=Z(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Zn.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let o,l;for(o=0,l=e.length;o<l;++o){const c=e[o];c[i]===this.id&&(!t||c.type===t)&&r.push(c)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return zt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class yr{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;bA(e)&&(i=this.register(e));const r=this.items,o=t.id,l=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,mA(t,l,i),this.override&&Dt.override(t.id,t.overrides)),l}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in Dt[r]&&(delete Dt[r][i],this.override&&delete Gn[i])}}function mA(n,t,e){const i=cs(Object.create(null),[e?Dt.get(e):{},Dt.get(t),n.defaults]);Dt.set(t,i),n.defaultRoutes&&_A(t,n.defaultRoutes),n.descriptors&&Dt.describe(t,n.descriptors)}function _A(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),o=[n].concat(i).join("."),l=t[e].split("."),c=l.pop(),u=l.join(".");Dt.route(o,r,u,c)})}function bA(n){return"id"in n&&"defaults"in n}class xA{constructor(){this.controllers=new yr(Le,"datasets",!0),this.elements=new yr(Ie,"elements"),this.plugins=new yr(Object,"plugins"),this.scales=new yr(Zn,"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,i){[...e].forEach(r=>{const o=i||this._getRegistryForType(r);i||o.isForType(r)||o===this.plugins&&r.id?this._exec(t,o,r):_t(r,l=>{const c=i||this._getRegistryForType(l);this._exec(t,c,l)})})}_exec(t,e,i){const r=Sl(t);vt(i["before"+r],[],i),e[t](i),vt(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var He=new xA;class yA{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=r?this._descriptors(t).filter(r):this._descriptors(t),l=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),l}_notify(t,e,i,r){r=r||{};for(const o of t){const l=o.plugin,c=l[i],u=[e,r,o.options];if(vt(c,u,l)===!1&&r.cancelable)return!1}return!0}invalidate(){ht(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=Z(i.options&&i.options.plugins,{}),o=vA(i);return r===!1&&!e?[]:SA(t,o,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(o,l)=>o.filter(c=>!l.some(u=>c.plugin.id===u.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function vA(n){const t={},e=[],i=Object.keys(He.plugins.items);for(let o=0;o<i.length;o++)e.push(He.getPlugin(i[o]));const r=n.plugins||[];for(let o=0;o<r.length;o++){const l=r[o];e.indexOf(l)===-1&&(e.push(l),t[l.id]=!0)}return{plugins:e,localIds:t}}function wA(n,t){return!t&&n===!1?null:n===!0?{}:n}function SA(n,{plugins:t,localIds:e},i,r){const o=[],l=n.getContext();for(const c of t){const u=c.id,f=wA(i[u],r);f!==null&&o.push({plugin:c,options:AA(n.config,{plugin:c,local:e[u]},f,l)})}return o}function AA(n,{plugin:t,local:e},i,r){const o=n.pluginScopeKeys(t),l=n.getOptionScopes(i,o);return e&&t.defaults&&l.push(t.defaults),n.createResolver(l,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function il(n,t){const e=Dt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function MA(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function OA(n,t){return n===t?"_index_":"_value_"}function TA(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Xr(n,t){if(n==="x"||n==="y"||n==="r"||(n=t.axis||TA(t.position)||n.length>1&&Xr(n[0].toLowerCase(),t),n))return n;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function PA(n,t){const e=Gn[n.type]||{scales:{}},i=t.scales||{},r=il(n.type,t),o=Object.create(null);return Object.keys(i).forEach(l=>{const c=i[l];if(!ot(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const u=Xr(l,c),f=OA(u,r),d=e.scales||{};o[l]=ns(Object.create(null),[{axis:u},c,d[u],d[f]])}),n.data.datasets.forEach(l=>{const c=l.type||n.type,u=l.indexAxis||il(c,t),d=(Gn[c]||{}).scales||{};Object.keys(d).forEach(p=>{const m=MA(p,u),b=l[m+"AxisID"]||m;o[b]=o[b]||Object.create(null),ns(o[b],[{axis:m},i[b],d[p]])})}),Object.keys(o).forEach(l=>{const c=o[l];ns(c,[Dt.scales[c.type],Dt.scale])}),o}function Gd(n){const t=n.options||(n.options={});t.plugins=Z(t.plugins,{}),t.scales=PA(n,t)}function Jd(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function kA(n){return n=n||{},n.data=Jd(n.data),Gd(n),n}const ff=new Map,Zd=new Set;function vr(n,t){let e=ff.get(n);return e||(e=t(),ff.set(n,e),Zd.add(e)),e}const Gi=(n,t,e)=>{const i=On(t,e);i!==void 0&&n.add(i)};class EA{constructor(t){this._config=kA(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=Jd(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(),Gd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return vr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return vr(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return vr(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return vr(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:o}=this,l=this._cachedScopes(t,i),c=l.get(e);if(c)return c;const u=new Set;e.forEach(d=>{t&&(u.add(t),d.forEach(p=>Gi(u,t,p))),d.forEach(p=>Gi(u,r,p)),d.forEach(p=>Gi(u,Gn[o]||{},p)),d.forEach(p=>Gi(u,Dt,p)),d.forEach(p=>Gi(u,tl,p))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),Zd.has(e)&&l.set(e,f),f}chartOptionScopes(){const{options:t,type:e}=this;return[t,Gn[e]||{},Dt.datasets[e]||{},{type:e},Dt,tl]}resolveNamedOptions(t,e,i,r=[""]){const o={$shared:!0},{resolver:l,subPrefixes:c}=df(this._resolverCache,t,r);let u=l;if(RA(l,e)){o.$shared=!1,i=Tn(i)?i():i;const f=this.createResolver(t,i,c);u=xi(l,i,f)}for(const f of e)o[f]=u[f];return o}createResolver(t,e,i=[""],r){const{resolver:o}=df(this._resolverCache,t,i);return ot(e)?xi(o,e,void 0,r):o}}function df(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let o=i.get(r);return o||(o={resolver:Pl(t,e),subPrefixes:e.filter(c=>!c.toLowerCase().includes("hover"))},i.set(r,o)),o}const CA=n=>ot(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||Tn(n[e]),!1);function RA(n,t){const{isScriptable:e,isIndexable:i}=Ed(n);for(const r of t){const o=e(r),l=i(r),c=(l||o)&&n[r];if(o&&(Tn(c)||CA(c))||l&&St(c))return!0}return!1}var DA="4.2.1";const LA=["top","bottom","left","right","chartArea"];function gf(n,t){return n==="top"||n==="bottom"||LA.indexOf(n)===-1&&t==="x"}function pf(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function mf(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),vt(e&&e.onComplete,[n],t)}function IA(n){const t=n.chart,e=t.options.animation;vt(e&&e.onProgress,[n],t)}function Qd(n){return Fd()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Br={},_f=n=>{const t=Qd(n);return Object.values(Br).filter(e=>e.canvas===t).pop()};function FA(n,t,e){const i=Object.keys(n);for(const r of i){const o=+r;if(o>=t){const l=n[r];delete n[r],(e>0||o>t)&&(n[o+e]=l)}}}function BA(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function zA(n){const{xScale:t,yScale:e}=n;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}class Yn{static register(...t){He.add(...t),bf()}static unregister(...t){He.remove(...t),bf()}constructor(t,e){const i=this.config=new EA(e),r=Qd(t),o=_f(r);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 l=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||nA(r)),this.platform.updateConfig(i);const c=this.platform.acquireContext(r,l.aspectRatio),u=c&&c.canvas,f=u&&u.height,d=u&&u.width;if(this.id=H1(),this.ctx=c,this.canvas=u,this.width=d,this.height=f,this._options=l,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 yA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=iw(p=>this.update(p),l.resizeDelay||0),this._dataChanges=[],Br[this.id]=this,!c||!u){console.error("Failed to create chart: can't acquire context from the given item");return}en.listen(this,"complete",mf),en.listen(this,"progress",IA),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:o}=this;return ht(t)?e&&o?o:r?i/r: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 He}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Wu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Bu(this.canvas,this.ctx),this}stop(){return en.stop(this),this}resize(t,e){en.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(r,t,e,o),c=i.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Wu(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),vt(i.onResize,[this,l],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};_t(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((l,c)=>(l[c]=!1,l),{});let o=[];e&&(o=o.concat(Object.keys(e).map(l=>{const c=e[l],u=Xr(l,c),f=u==="r",d=u==="x";return{options:c,dposition:f?"chartArea":d?"bottom":"left",dtype:f?"radialLinear":d?"category":"linear"}}))),_t(o,l=>{const c=l.options,u=c.id,f=Xr(u,c),d=Z(c.type,l.dtype);(c.position===void 0||gf(c.position,f)!==gf(l.dposition))&&(c.position=l.dposition),r[u]=!0;let p=null;if(u in i&&i[u].type===d)p=i[u];else{const m=He.getScale(d);p=new m({id:u,type:d,ctx:this.ctx,chart:this}),i[p.id]=p}p.init(c,t)}),_t(r,(l,c)=>{l||delete i[c]}),_t(i,l=>{Kt.configure(this,l,l.options),Kt.addBox(this,l)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,o)=>r.index-o.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(pf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const o=e[i];let l=this.getDatasetMeta(i);const c=o.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(i),l=this.getDatasetMeta(i)),l.type=c,l.indexAxis=o.indexAxis||il(c,this.options),l.order=o.order||0,l.index=i,l.label=""+o.label,l.visible=this.isDatasetVisible(i),l.controller)l.controller.updateIndex(i),l.controller.linkScales();else{const u=He.getController(c),{datasetElementType:f,dataElementType:d}=Dt.datasets[c];Object.assign(u,{dataElementType:He.getElement(d),datasetElementType:f&&He.getElement(f)}),l.controller=new u(this,i),t.push(l.controller)}}return this._updateMetasets(),t}_resetElements(){_t(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.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 l=0;for(let f=0,d=this.data.datasets.length;f<d;f++){const{controller:p}=this.getDatasetMeta(f),m=!r&&o.indexOf(p)===-1;p.buildOrUpdateElements(m),l=Math.max(+p.getMaxOverflow(),l)}l=this._minPadding=i.layout.autoPadding?l:0,this._updateLayout(l),r||_t(o,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(pf("z","_idx"));const{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){_t(this.scales,t=>{Kt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Pu(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:o}of e){const l=i==="_removeElements"?-o:o;FA(t,r,l)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(l=>l[0]===o).map((l,c)=>c+","+l.splice(1).join(","))),r=i(0);for(let o=1;o<e;o++)if(!Pu(r,i(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Kt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_t(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Tn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(en.has(this)?this.attached&&!en.running(this)&&en.start(this):(this.draw(),mf({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,o;for(r=0,o=e.length;r<o;++r){const l=e[r];(!t||l.visible)&&i.push(l)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,o=zA(t)||this.chartArea,l={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(r&&no(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),r&&io(e),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return us(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const o=IS.modes[e];return typeof o=="function"?o(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(o=>o&&o._dataset===e).pop();return r||(r={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},i.push(r)),r}getContext(){return this.$context||(this.$context=Pn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),l=o.controller._resolveAnimations(void 0,r);Me(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),l.update(o,{visible:i}),this.update(c=>c.datasetIndex===t?r: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(),en.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Bu(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Br[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,l)=>{e.addEventListener(this,o,l),t[o]=l},r=(o,l,c)=>{o.offsetX=l,o.offsetY=c,this._eventHandler(o)};_t(this.options.events,o=>i(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(u,f)=>{e.addEventListener(this,u,f),t[u]=f},r=(u,f)=>{t[u]&&(e.removeEventListener(this,u,f),delete t[u])},o=(u,f)=>{this.canvas&&this.resize(u,f)};let l;const c=()=>{r("attach",c),this.attached=!0,this.resize(),i("resize",o),i("detach",l)};l=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),i("attach",c)},e.isAttached(this.canvas)?c():l()}unbindEvents(){_t(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},_t(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let o,l,c,u;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),c=0,u=t.length;c<u;++c){l=t[c];const f=l&&this.getDatasetMeta(l.datasetIndex).controller;f&&f[r+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:l})=>{const c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[l],index:l}});!Ur(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const r=this.options.hover,o=(u,f)=>u.filter(d=>!f.some(p=>d.datasetIndex===p.datasetIndex&&d.index===p.index)),l=o(e,t),c=i?t:o(t,e);l.length&&this.updateHoverStyle(l,r.mode,!1),c.length&&r.mode&&this.updateHoverStyle(c,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=l=>(l.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:o}=this,l=e,c=this._getActiveElements(t,r,i,l),u=q1(t),f=BA(t,this._lastEvent,i,u);i&&(this._lastEvent=null,vt(o.onHover,[t,c,this],this),u&&vt(o.onClick,[t,c,this],this));const d=!Ur(c,r);return(d||e)&&(this._active=c,this._updateHoverStyles(c,r,e)),this._lastEvent=f,d}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}}$(Yn,"defaults",Dt),$(Yn,"instances",Br),$(Yn,"overrides",Gn),$(Yn,"registry",He),$(Yn,"version",DA),$(Yn,"getChart",_f);function bf(){return _t(Yn.instances,n=>n._plugins.invalidate())}function NA(n,t,e){const{startAngle:i,pixelMargin:r,x:o,y:l,outerRadius:c,innerRadius:u}=t;let f=r/c;n.beginPath(),n.arc(o,l,c,i-f,e+f),u>r?(f=r/u,n.arc(o,l,u,e+f,i-f,!0)):n.arc(o,l,r,e+Et,i-Et),n.closePath(),n.clip()}function WA(n){return Tl(n,["outerStart","outerEnd","innerStart","innerEnd"])}function HA(n,t,e,i){const r=WA(n.options.borderRadius),o=(e-t)/2,l=Math.min(o,i*t/2),c=u=>{const f=(e-Math.min(o,u))*i/2;return Ut(u,0,Math.min(o,f))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:Ut(r.innerStart,0,l),innerEnd:Ut(r.innerEnd,0,l)}}function pi(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function Kr(n,t,e,i,r,o){const{x:l,y:c,startAngle:u,pixelMargin:f,innerRadius:d}=t,p=Math.max(t.outerRadius+i+e-f,0),m=d>0?d+i+e+f:0;let b=0;const v=r-u;if(i){const ft=d>0?d-i:0,xt=p>0?p-i:0,pt=(ft+xt)/2,Lt=pt!==0?v*pt/(pt+i):v;b=(v-Lt)/2}const w=Math.max(.001,v*p-e/Ot)/p,A=(v-w)/2,O=u+A+b,k=r-A-b,{outerStart:D,outerEnd:L,innerStart:C,innerEnd:E}=HA(t,m,p,k-O),I=p-D,F=p-L,Y=O+D/I,Q=k-L/F,tt=m+C,lt=m+E,It=O+C/tt,jt=k-E/lt;if(n.beginPath(),o){const ft=(Y+Q)/2;if(n.arc(l,c,p,Y,ft),n.arc(l,c,p,ft,Q),L>0){const Wt=pi(F,Q,l,c);n.arc(Wt.x,Wt.y,L,Q,k+Et)}const xt=pi(lt,k,l,c);if(n.lineTo(xt.x,xt.y),E>0){const Wt=pi(lt,jt,l,c);n.arc(Wt.x,Wt.y,E,k+Et,jt+Math.PI)}const pt=(k-E/m+(O+C/m))/2;if(n.arc(l,c,m,k-E/m,pt,!0),n.arc(l,c,m,pt,O+C/m,!0),C>0){const Wt=pi(tt,It,l,c);n.arc(Wt.x,Wt.y,C,It+Math.PI,O-Et)}const Lt=pi(I,O,l,c);if(n.lineTo(Lt.x,Lt.y),D>0){const Wt=pi(I,Y,l,c);n.arc(Wt.x,Wt.y,D,O-Et,Y)}}else{n.moveTo(l,c);const ft=Math.cos(Y)*p+l,xt=Math.sin(Y)*p+c;n.lineTo(ft,xt);const pt=Math.cos(Q)*p+l,Lt=Math.sin(Q)*p+c;n.lineTo(pt,Lt)}n.closePath()}function UA(n,t,e,i,r){const{fullCircles:o,startAngle:l,circumference:c}=t;let u=t.endAngle;if(o){Kr(n,t,e,i,u,r);for(let f=0;f<o;++f)n.fill();isNaN(c)||(u=l+(c%At||At))}return Kr(n,t,e,i,u,r),n.fill(),u}function VA(n,t,e,i,r){const{fullCircles:o,startAngle:l,circumference:c,options:u}=t,{borderWidth:f,borderJoinStyle:d}=u,p=u.borderAlign==="inner";if(!f)return;p?(n.lineWidth=f*2,n.lineJoin=d||"round"):(n.lineWidth=f,n.lineJoin=d||"bevel");let m=t.endAngle;if(o){Kr(n,t,e,i,m,r);for(let b=0;b<o;++b)n.stroke();isNaN(c)||(m=l+(c%At||At))}p&&NA(n,t,m),o||(Kr(n,t,e,i,m,r),n.stroke())}class zr extends Ie{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.getProps(["x","y"],i),{angle:o,distance:l}=xd(r,{x:t,y:e}),{startAngle:c,endAngle:u,innerRadius:f,outerRadius:d,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),m=this.options.spacing/2,v=Z(p,u-c)>=At||hs(o,c,u),w=rn(l,f+m,d+m);return v&&w}getCenterPoint(t){const{x:e,y:i,startAngle:r,endAngle:o,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:u,spacing:f}=this.options,d=(r+o)/2,p=(l+c+f+u)/2;return{x:e+Math.cos(d)*p,y:i+Math.sin(d)*p}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,r=(e.offset||0)/4,o=(e.spacing||0)/2,l=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>At?Math.floor(i/At):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*r,Math.sin(c)*r);const u=1-Math.sin(Math.min(Ot,i||0)),f=r*u;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,UA(t,this,f,o,l),VA(t,this,f,o,l),t.restore()}}$(zr,"id","arc"),$(zr,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),$(zr,"defaultRoutes",{backgroundColor:"backgroundColor"});function tg(n,t,e=t){n.lineCap=Z(e.borderCapStyle,t.borderCapStyle),n.setLineDash(Z(e.borderDash,t.borderDash)),n.lineDashOffset=Z(e.borderDashOffset,t.borderDashOffset),n.lineJoin=Z(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=Z(e.borderWidth,t.borderWidth),n.strokeStyle=Z(e.borderColor,t.borderColor)}function $A(n,t,e){n.lineTo(e.x,e.y)}function jA(n){return n.stepped?pw:n.tension||n.cubicInterpolationMode==="monotone"?mw:$A}function eg(n,t,e={}){const i=n.length,{start:r=0,end:o=i-1}=e,{start:l,end:c}=t,u=Math.max(r,l),f=Math.min(o,c),d=r<l&&o<l||r>c&&o>c;return{count:i,start:u,loop:t.loop,ilen:f<u&&!d?i+f-u:f-u}}function YA(n,t,e,i){const{points:r,options:o}=t,{count:l,start:c,loop:u,ilen:f}=eg(r,e,i),d=jA(o);let{move:p=!0,reverse:m}=i||{},b,v,w;for(b=0;b<=f;++b)v=r[(c+(m?f-b:b))%l],!v.skip&&(p?(n.moveTo(v.x,v.y),p=!1):d(n,w,v,m,o.stepped),w=v);return u&&(v=r[(c+(m?f:0))%l],d(n,w,v,m,o.stepped)),!!u}function qA(n,t,e,i){const r=t.points,{count:o,start:l,ilen:c}=eg(r,e,i),{move:u=!0,reverse:f}=i||{};let d=0,p=0,m,b,v,w,A,O;const k=L=>(l+(f?c-L:L))%o,D=()=>{w!==A&&(n.lineTo(d,A),n.lineTo(d,w),n.lineTo(d,O))};for(u&&(b=r[k(0)],n.moveTo(b.x,b.y)),m=0;m<=c;++m){if(b=r[k(m)],b.skip)continue;const L=b.x,C=b.y,E=L|0;E===v?(C<w?w=C:C>A&&(A=C),d=(p*d+L)/++p):(D(),n.lineTo(L,C),v=E,p=0,w=A=C),O=C}D()}function sl(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?qA:YA}function XA(n){return n.stepped?Xw:n.tension||n.cubicInterpolationMode==="monotone"?Kw:jn}function KA(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),tg(n,t.options),n.stroke(r)}function GA(n,t,e,i){const{segments:r,options:o}=t,l=sl(t);for(const c of r)tg(n,o,c.style),n.beginPath(),l(n,t,c,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const JA=typeof Path2D=="function";function ZA(n,t,e,i){JA&&!t.options.segment?KA(n,t,e,i):GA(n,t,e,i)}class wn extends Ie{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Ww(this._points,i,t,r,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=eS(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,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],o=this.points,l=Hd(this,{property:e,start:r,end:r});if(!l.length)return;const c=[],u=XA(i);let f,d;for(f=0,d=l.length;f<d;++f){const{start:p,end:m}=l[f],b=o[p],v=o[m];if(b===v){c.push(b);continue}const w=Math.abs((r-b[e])/(v[e]-b[e])),A=u(b,v,w,i.stepped);A[e]=t[e],c.push(A)}return c.length===1?c[0]:c}pathSegment(t,e,i){return sl(this)(t,this,e,i)}path(t,e,i){const r=this.segments,o=sl(this);let l=this._loop;e=e||0,i=i||this.points.length-e;for(const c of r)l&=o(t,this,c,{start:e,end:e+i-1});return!!l}draw(t,e,i,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),ZA(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}$(wn,"id","line"),$(wn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),$(wn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),$(wn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function xf(n,t,e,i){const r=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<r.radius+r.hitRadius}class Nr extends Ie{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.options,{x:o,y:l}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-l,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,e){return xf(this,t,"x",e)}inYRange(t,e){return xf(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){const i=this.options;this.skip||i.radius<.1||!us(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,el(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}$(Nr,"id","point"),$(Nr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),$(Nr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ng(n,t){const{x:e,y:i,base:r,width:o,height:l}=n.getProps(["x","y","base","width","height"],t);let c,u,f,d,p;return n.horizontal?(p=l/2,c=Math.min(e,r),u=Math.max(e,r),f=i-p,d=i+p):(p=o/2,c=e-p,u=e+p,f=Math.min(i,r),d=Math.max(i,r)),{left:c,top:f,right:u,bottom:d}}function Sn(n,t,e,i){return n?0:Ut(t,e,i)}function QA(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,o=kd(i);return{t:Sn(r.top,o.top,0,e),r:Sn(r.right,o.right,0,t),b:Sn(r.bottom,o.bottom,0,e),l:Sn(r.left,o.left,0,t)}}function tM(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,o=Xn(r),l=Math.min(t,e),c=n.borderSkipped,u=i||ot(r);return{topLeft:Sn(!u||c.top||c.left,o.topLeft,0,l),topRight:Sn(!u||c.top||c.right,o.topRight,0,l),bottomLeft:Sn(!u||c.bottom||c.left,o.bottomLeft,0,l),bottomRight:Sn(!u||c.bottom||c.right,o.bottomRight,0,l)}}function eM(n){const t=ng(n),e=t.right-t.left,i=t.bottom-t.top,r=QA(n,e/2,i/2),o=tM(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Ua(n,t,e,i){const r=t===null,o=e===null,c=n&&!(r&&o)&&ng(n,i);return c&&(r||rn(t,c.left,c.right))&&(o||rn(e,c.top,c.bottom))}function nM(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function iM(n,t){n.rect(t.x,t.y,t.w,t.h)}function Va(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,l=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+o,h:n.h+l,radius:n.radius}}class Wr extends Ie{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:l}=eM(this),c=nM(l.radius)?fs:iM;t.save(),(l.w!==o.w||l.h!==o.h)&&(t.beginPath(),c(t,Va(l,e,o)),t.clip(),c(t,Va(o,-e,l)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),c(t,Va(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Ua(this,t,e,i)}inXRange(t,e){return Ua(this,t,null,e)}inYRange(t,e){return Ua(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+r)/2:e,y:o?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}$(Wr,"id","bar"),$(Wr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),$(Wr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sM=Object.freeze({__proto__:null,ArcElement:zr,LineElement:wn,PointElement:Nr,BarElement:Wr});const rl=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],yf=rl.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function ig(n){return rl[n%rl.length]}function sg(n){return yf[n%yf.length]}function rM(n,t){return n.borderColor=ig(t),n.backgroundColor=sg(t),++t}function oM(n,t){return n.backgroundColor=n.data.map(()=>ig(t++)),t}function aM(n,t){return n.backgroundColor=n.data.map(()=>sg(t++)),t}function lM(n){let t=0;return(e,i)=>{const r=n.getDatasetMeta(i).controller;r instanceof qn?t=oM(e,t):r instanceof os?t=aM(e,t):r&&(t=rM(e,t))}}function vf(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function cM(n){return n&&(n.borderColor||n.backgroundColor)}var hM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:r}=n.config,{elements:o}=r;if(!e.forceOverride&&(vf(i)||cM(r)||o&&vf(o)))return;const l=lM(n);i.forEach(l)}};function uM(n,t,e,i,r){const o=r.samples||i;if(o>=e)return n.slice(t,t+e);const l=[],c=(e-2)/(o-2);let u=0;const f=t+e-1;let d=t,p,m,b,v,w;for(l[u++]=n[d],p=0;p<o-2;p++){let A=0,O=0,k;const D=Math.floor((p+1)*c)+1+t,L=Math.min(Math.floor((p+2)*c)+1,e)+t,C=L-D;for(k=D;k<L;k++)A+=n[k].x,O+=n[k].y;A/=C,O/=C;const E=Math.floor(p*c)+1+t,I=Math.min(Math.floor((p+1)*c)+1,e)+t,{x:F,y:Y}=n[d];for(b=v=-1,k=E;k<I;k++)v=.5*Math.abs((F-A)*(n[k].y-Y)-(F-n[k].x)*(O-Y)),v>b&&(b=v,m=n[k],w=k);l[u++]=m,d=w}return l[u++]=n[f],l}function fM(n,t,e,i){let r=0,o=0,l,c,u,f,d,p,m,b,v,w;const A=[],O=t+e-1,k=n[t].x,L=n[O].x-k;for(l=t;l<t+e;++l){c=n[l],u=(c.x-k)/L*i,f=c.y;const C=u|0;if(C===d)f<v?(v=f,p=l):f>w&&(w=f,m=l),r=(o*r+c.x)/++o;else{const E=l-1;if(!ht(p)&&!ht(m)){const I=Math.min(p,m),F=Math.max(p,m);I!==b&&I!==E&&A.push({...n[I],x:r}),F!==b&&F!==E&&A.push({...n[F],x:r})}l>0&&E!==b&&A.push(n[E]),A.push(c),d=C,o=0,v=w=f,p=m=b=l}}return A}function rg(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function wf(n){n.data.datasets.forEach(t=>{rg(t)})}function dM(n,t){const e=t.length;let i=0,r;const{iScale:o}=n,{min:l,max:c,minDefined:u,maxDefined:f}=o.getUserBounds();return u&&(i=Ut(on(t,o.axis,l).lo,0,e-1)),f?r=Ut(on(t,o.axis,c).hi+1,i,e)-i:r=e-i,{start:i,count:r}}var gM={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){wf(n);return}const i=n.width;n.data.datasets.forEach((r,o)=>{const{_data:l,indexAxis:c}=r,u=n.getDatasetMeta(o),f=l||r.data;if(Zi([c,n.options.indexAxis])==="y"||!u.controller.supportsDecimation)return;const d=n.scales[u.xAxisID];if(d.type!=="linear"&&d.type!=="time"||n.options.parsing)return;let{start:p,count:m}=dM(u,f);const b=e.threshold||4*i;if(m<=b){rg(r);return}ht(l)&&(r._data=f,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(w){this._data=w}}));let v;switch(e.algorithm){case"lttb":v=uM(f,p,m,i,e);break;case"min-max":v=fM(f,p,m,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=v})},destroy(n){wf(n)}};function pM(n,t,e){const i=n.segments,r=n.points,o=t.points,l=[];for(const c of i){let{start:u,end:f}=c;f=Dl(u,f,r);const d=ol(e,r[u],r[f],c.loop);if(!t.segments){l.push({source:c,target:d,start:r[u],end:r[f]});continue}const p=Hd(t,d);for(const m of p){const b=ol(e,o[m.start],o[m.end],m.loop),v=Wd(c,r,b);for(const w of v)l.push({source:w,target:m,start:{[e]:Sf(d,b,"start",Math.max)},end:{[e]:Sf(d,b,"end",Math.min)}})}}return l}function ol(n,t,e,i){if(i)return;let r=t[n],o=e[n];return n==="angle"&&(r=ge(r),o=ge(o)),{property:n,start:r,end:o}}function mM(n,t){const{x:e=null,y:i=null}=n||{},r=t.points,o=[];return t.segments.forEach(({start:l,end:c})=>{c=Dl(l,c,r);const u=r[l],f=r[c];i!==null?(o.push({x:u.x,y:i}),o.push({x:f.x,y:i})):e!==null&&(o.push({x:e,y:u.y}),o.push({x:e,y:f.y}))}),o}function Dl(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Sf(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function og(n,t){let e=[],i=!1;return St(n)?(i=!0,e=n):e=mM(n,t),e.length?new wn({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Af(n){return n&&n.fill!==!1}function _M(n,t,e){let r=n[t].fill;const o=[t];let l;if(!e)return r;for(;r!==!1&&o.indexOf(r)===-1;){if(!kt(r))return r;if(l=n[r],!l)return!1;if(l.visible)return r;o.push(r),r=l.fill}return!1}function bM(n,t,e){const i=wM(n);if(ot(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return kt(r)&&Math.floor(r)===r?xM(i[0],t,r,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function xM(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function yM(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:ot(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function vM(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:ot(n)?i=n.value:i=t.getBaseValue(),i}function wM(n){const t=n.options,e=t.fill;let i=Z(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function SM(n){const{scale:t,index:e,line:i}=n,r=[],o=i.segments,l=i.points,c=AM(t,e);c.push(og({x:null,y:t.bottom},i));for(let u=0;u<o.length;u++){const f=o[u];for(let d=f.start;d<=f.end;d++)MM(r,l[d],c)}return new wn({points:r,options:{}})}function AM(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const o=i[r];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function MM(n,t,e){const i=[];for(let r=0;r<e.length;r++){const o=e[r],{first:l,last:c,point:u}=OM(o,t,"x");if(!(!u||l&&c)){if(l)i.unshift(u);else if(n.push(u),!c)break}}n.push(...i)}function OM(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const r=i[e],o=n.segments,l=n.points;let c=!1,u=!1;for(let f=0;f<o.length;f++){const d=o[f],p=l[d.start][e],m=l[d.end][e];if(rn(r,p,m)){c=r===p,u=r===m;break}}return{first:c,last:u,point:i}}class ag{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:r,y:o,radius:l}=this;return e=e||{start:0,end:At},t.arc(r,o,l,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:r}=this,o=t.angle;return{x:e+Math.cos(o)*r,y:i+Math.sin(o)*r,angle:o}}}function TM(n){const{chart:t,fill:e,line:i}=n;if(kt(e))return PM(t,e);if(e==="stack")return SM(n);if(e==="shape")return!0;const r=kM(n);return r instanceof ag?r:og(r,i)}function PM(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function kM(n){return(n.scale||{}).getPointPositionForValue?CM(n):EM(n)}function EM(n){const{scale:t={},fill:e}=n,i=yM(e,t);if(kt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function CM(n){const{scale:t,fill:e}=n,i=t.options,r=t.getLabels().length,o=i.reverse?t.max:t.min,l=vM(e,t,o),c=[];if(i.grid.circular){const u=t.getPointPositionForValue(0,o);return new ag({x:u.x,y:u.y,radius:t.getDistanceFromCenterForValue(l)})}for(let u=0;u<r;++u)c.push(t.getPointPositionForValue(u,l));return c}function $a(n,t,e){const i=TM(t),{line:r,scale:o,axis:l}=t,c=r.options,u=c.fill,f=c.backgroundColor,{above:d=f,below:p=f}=u||{};i&&r.points.length&&(no(n,e),RM(n,{line:r,target:i,above:d,below:p,area:e,scale:o,axis:l}),io(n))}function RM(n,t){const{line:e,target:i,above:r,below:o,area:l,scale:c}=t,u=e._loop?"angle":t.axis;n.save(),u==="x"&&o!==r&&(Mf(n,i,l.top),Of(n,{line:e,target:i,color:r,scale:c,property:u}),n.restore(),n.save(),Mf(n,i,l.bottom)),Of(n,{line:e,target:i,color:o,scale:c,property:u}),n.restore()}function Mf(n,t,e){const{segments:i,points:r}=t;let o=!0,l=!1;n.beginPath();for(const c of i){const{start:u,end:f}=c,d=r[u],p=r[Dl(u,f,r)];o?(n.moveTo(d.x,d.y),o=!1):(n.lineTo(d.x,e),n.lineTo(d.x,d.y)),l=!!t.pathSegment(n,c,{move:l}),l?n.closePath():n.lineTo(p.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Of(n,t){const{line:e,target:i,property:r,color:o,scale:l}=t,c=pM(e,i,r);for(const{source:u,target:f,start:d,end:p}of c){const{style:{backgroundColor:m=o}={}}=u,b=i!==!0;n.save(),n.fillStyle=m,DM(n,l,b&&ol(r,d,p)),n.beginPath();const v=!!e.pathSegment(n,u);let w;if(b){v?n.closePath():Tf(n,i,p,r);const A=!!i.pathSegment(n,f,{move:v,reverse:!0});w=v&&A,w||Tf(n,i,d,r)}n.closePath(),n.fill(w?"evenodd":"nonzero"),n.restore()}}function DM(n,t,e){const{top:i,bottom:r}=t.chart.chartArea,{property:o,start:l,end:c}=e||{};o==="x"&&(n.beginPath(),n.rect(l,i,c-l,r-i),n.clip())}function Tf(n,t,e,i){const r=t.interpolate(e,i);r&&n.lineTo(r.x,r.y)}var LM={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,r=[];let o,l,c,u;for(l=0;l<i;++l)o=n.getDatasetMeta(l),c=o.dataset,u=null,c&&c.options&&c instanceof wn&&(u={visible:n.isDatasetVisible(l),index:l,fill:bM(c,l,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:c}),o.$filler=u,r.push(u);for(l=0;l<i;++l)u=r[l],!(!u||u.fill===!1)&&(u.fill=_M(r,l,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",r=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let l=r.length-1;l>=0;--l){const c=r[l].$filler;c&&(c.line.updateControlPoints(o,c.axis),i&&c.fill&&$a(n.ctx,c,o))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const o=i[r].$filler;Af(o)&&$a(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Af(i)||e.drawTime!=="beforeDatasetDraw"||$a(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Pf=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},IM=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class kf extends Ie{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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=vt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,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 i=t.labels,r=zt(i.font),o=r.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=Pf(i,o);let f,d;e.font=r.string,this.isHorizontal()?(f=this.maxWidth,d=this._fitRows(l,o,c,u)+10):(d=this.maxHeight,f=this._fitCols(l,r,c,u)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:o,maxWidth:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],d=r+c;let p=t;o.textAlign="left",o.textBaseline="middle";let m=-1,b=-d;return this.legendItems.forEach((v,w)=>{const A=i+e/2+o.measureText(v.text).width;(w===0||f[f.length-1]+A+2*c>l)&&(p+=d,f[f.length-(w>0?0:1)]=0,b+=d,m++),u[w]={left:0,top:b,row:m,width:A,height:r},f[f.length-1]+=A+c}),p}_fitCols(t,e,i,r){const{ctx:o,maxHeight:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],d=l-t;let p=c,m=0,b=0,v=0,w=0;return this.legendItems.forEach((A,O)=>{const{itemWidth:k,itemHeight:D}=FM(i,e,o,A,r);O>0&&b+D+2*c>d&&(p+=m+c,f.push({width:m,height:b}),v+=m+c,w++,m=b=0),u[O]={left:v,top:b,col:w,width:k,height:D},m=Math.max(m,k),b+=D+c}),p+=m,f.push({width:m,height:b}),p}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:o}}=this,l=mi(o,this.left,this.width);if(this.isHorizontal()){let c=0,u=Xt(i,this.left+r,this.right-this.lineWidths[c]);for(const f of e)c!==f.row&&(c=f.row,u=Xt(i,this.left+r,this.right-this.lineWidths[c])),f.top+=this.top+t+r,f.left=l.leftForLtr(l.x(u),f.width),u+=f.width+r}else{let c=0,u=Xt(i,this.top+t+r,this.bottom-this.columnSizes[c].height);for(const f of e)f.col!==c&&(c=f.col,u=Xt(i,this.top+t+r,this.bottom-this.columnSizes[c].height)),f.top=u,f.left+=this.left+r,f.left=l.leftForLtr(l.x(f.left),f.width),u+=f.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;no(t,this),this._draw(),io(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:o,labels:l}=t,c=Dt.color,u=mi(t.rtl,this.left,this.width),f=zt(l.font),{padding:d}=l,p=f.size,m=p/2;let b;this.drawTitle(),r.textAlign=u.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=f.string;const{boxWidth:v,boxHeight:w,itemHeight:A}=Pf(l,p),O=function(E,I,F){if(isNaN(v)||v<=0||isNaN(w)||w<0)return;r.save();const Y=Z(F.lineWidth,1);if(r.fillStyle=Z(F.fillStyle,c),r.lineCap=Z(F.lineCap,"butt"),r.lineDashOffset=Z(F.lineDashOffset,0),r.lineJoin=Z(F.lineJoin,"miter"),r.lineWidth=Y,r.strokeStyle=Z(F.strokeStyle,c),r.setLineDash(Z(F.lineDash,[])),l.usePointStyle){const Q={radius:w*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:Y},tt=u.xPlus(E,v/2),lt=I+m;Pd(r,Q,tt,lt,l.pointStyleWidth&&v)}else{const Q=I+Math.max((p-w)/2,0),tt=u.leftForLtr(E,v),lt=Xn(F.borderRadius);r.beginPath(),Object.values(lt).some(It=>It!==0)?fs(r,{x:tt,y:Q,w:v,h:w,radius:lt}):r.rect(tt,Q,v,w),r.fill(),Y!==0&&r.stroke()}r.restore()},k=function(E,I,F){Jn(r,F.text,E,I+A/2,f,{strikethrough:F.hidden,textAlign:u.textAlign(F.textAlign)})},D=this.isHorizontal(),L=this._computeTitleHeight();D?b={x:Xt(o,this.left+d,this.right-i[0]),y:this.top+d+L,line:0}:b={x:this.left+d,y:Xt(o,this.top+L+d,this.bottom-e[0].height),line:0},Bd(this.ctx,t.textDirection);const C=A+d;this.legendItems.forEach((E,I)=>{r.strokeStyle=E.fontColor,r.fillStyle=E.fontColor;const F=r.measureText(E.text).width,Y=u.textAlign(E.textAlign||(E.textAlign=l.textAlign)),Q=v+m+F;let tt=b.x,lt=b.y;u.setWidth(this.width),D?I>0&&tt+Q+d>this.right&&(lt=b.y+=C,b.line++,tt=b.x=Xt(o,this.left+d,this.right-i[b.line])):I>0&<+C>this.bottom&&(tt=b.x=tt+e[b.line].width+d,b.line++,lt=b.y=Xt(o,this.top+L+d,this.bottom-e[b.line].height));const It=u.x(tt);if(O(It,lt,E),tt=sw(Y,tt+v+m,D?tt+Q:this.right,t.rtl),k(u.x(tt),lt,E),D)b.x+=Q+d;else if(typeof E.text!="string"){const jt=f.lineHeight;b.y+=lg(E,jt)}else b.y+=C}),zd(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=zt(e.font),r=Gt(e.padding);if(!e.display)return;const o=mi(t.rtl,this.left,this.width),l=this.ctx,c=e.position,u=i.size/2,f=r.top+u;let d,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),d=this.top+f,p=Xt(t.align,p,this.right-m);else{const v=this.columnSizes.reduce((w,A)=>Math.max(w,A.height),0);d=f+Xt(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const b=Xt(c,p,p+m);l.textAlign=o.textAlign(Ol(c)),l.textBaseline="middle",l.strokeStyle=e.color,l.fillStyle=e.color,l.font=i.string,Jn(l,e.text,b,d,i)}_computeTitleHeight(){const t=this.options.title,e=zt(t.font),i=Gt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,o;if(rn(t,this.left,this.right)&&rn(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],rn(t,r.left,r.left+r.width)&&rn(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!NM(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,o=IM(r,i);r&&!o&&vt(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&vt(e.onHover,[t,i,this],this)}else i&&vt(e.onClick,[t,i,this],this)}}function FM(n,t,e,i,r){const o=BM(i,n,t,e),l=zM(r,i,t.lineHeight);return{itemWidth:o,itemHeight:l}}function BM(n,t,e,i){let r=n.text;return r&&typeof r!="string"&&(r=r.reduce((o,l)=>o.length>l.length?o:l)),t+e.size/2+i.measureText(r).width}function zM(n,t,e){let i=n;return typeof t.text!="string"&&(i=lg(t,e)),i}function lg(n,t){const e=n.text?n.text.length+.5:0;return t*e}function NM(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var WM={id:"legend",_element:kf,start(n,t,e){const i=n.legend=new kf({ctx:n.ctx,options:e,chart:n});Kt.configure(n,i,e),Kt.addBox(n,i)},stop(n){Kt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;Kt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:o,useBorderRadius:l,borderRadius:c}}=n.legend.options;return n._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(e?0:void 0),d=Gt(f.borderWidth);return{text:t[u.index].label,fillStyle:f.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:f.borderColor,pointStyle:i||f.pointStyle,rotation:f.rotation,textAlign:r||f.textAlign,borderRadius:l&&(c||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class Ll extends Ie{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=St(i.text)?i.text.length:1;this._padding=Gt(i.padding);const o=r*zt(i.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:i,bottom:r,right:o,options:l}=this,c=l.align;let u=0,f,d,p;return this.isHorizontal()?(d=Xt(c,i,o),p=e+t,f=o-i):(l.position==="left"?(d=i+t,p=Xt(c,r,e),u=Ot*-.5):(d=o-t,p=Xt(c,e,r),u=Ot*.5),f=r-e),{titleX:d,titleY:p,maxWidth:f,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=zt(e.font),o=i.lineHeight/2+this._padding.top,{titleX:l,titleY:c,maxWidth:u,rotation:f}=this._drawArgs(o);Jn(t,e.text,0,0,i,{color:e.color,maxWidth:u,rotation:f,textAlign:Ol(e.align),textBaseline:"middle",translation:[l,c]})}}function HM(n,t){const e=new Ll({ctx:n.ctx,options:t,chart:n});Kt.configure(n,e,t),Kt.addBox(n,e),n.titleBlock=e}var UM={id:"title",_element:Ll,start(n,t,e){HM(n,e)},stop(n){const t=n.titleBlock;Kt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;Kt.configure(n,i,e),i.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 wr=new WeakMap;var VM={id:"subtitle",start(n,t,e){const i=new Ll({ctx:n.ctx,options:e,chart:n});Kt.configure(n,i,e),Kt.addBox(n,i),wr.set(n,i)},stop(n){Kt.removeBox(n,wr.get(n)),wr.delete(n)},beforeUpdate(n,t,e){const i=wr.get(n);Kt.configure(n,i,e),i.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 ts={average(n){if(!n.length)return!1;let t,e,i=0,r=0,o=0;for(t=0,e=n.length;t<e;++t){const l=n[t].element;if(l&&l.hasValue()){const c=l.tooltipPosition();i+=c.x,r+=c.y,++o}}return{x:i/o,y:r/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,o,l,c;for(o=0,l=n.length;o<l;++o){const u=n[o].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),d=Qa(t,f);d<r&&(r=d,c=u)}}if(c){const u=c.tooltipPosition();e=u.x,i=u.y}return{x:e,y:i}}};function We(n,t){return t&&(St(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function nn(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
||
`)>-1?n.split(`
|
||
`):n}function $M(n,t){const{element:e,datasetIndex:i,index:r}=t,o=n.getDatasetMeta(i).controller,{label:l,value:c}=o.getLabelAndValue(r);return{chart:n,label:l,parsed:o.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:c,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Ef(n,t){const e=n.chart.ctx,{body:i,footer:r,title:o}=n,{boxWidth:l,boxHeight:c}=t,u=zt(t.bodyFont),f=zt(t.titleFont),d=zt(t.footerFont),p=o.length,m=r.length,b=i.length,v=Gt(t.padding);let w=v.height,A=0,O=i.reduce((L,C)=>L+C.before.length+C.lines.length+C.after.length,0);if(O+=n.beforeBody.length+n.afterBody.length,p&&(w+=p*f.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),O){const L=t.displayColors?Math.max(c,u.lineHeight):u.lineHeight;w+=b*L+(O-b)*u.lineHeight+(O-1)*t.bodySpacing}m&&(w+=t.footerMarginTop+m*d.lineHeight+(m-1)*t.footerSpacing);let k=0;const D=function(L){A=Math.max(A,e.measureText(L).width+k)};return e.save(),e.font=f.string,_t(n.title,D),e.font=u.string,_t(n.beforeBody.concat(n.afterBody),D),k=t.displayColors?l+2+t.boxPadding:0,_t(i,L=>{_t(L.before,D),_t(L.lines,D),_t(L.after,D)}),k=0,e.font=d.string,_t(n.footer,D),e.restore(),A+=v.width,{width:A,height:w}}function jM(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function YM(n,t,e,i){const{x:r,width:o}=i,l=e.caretSize+e.caretPadding;if(n==="left"&&r+o+l>t.width||n==="right"&&r-o-l<0)return!0}function qM(n,t,e,i){const{x:r,width:o}=e,{width:l,chartArea:{left:c,right:u}}=n;let f="center";return i==="center"?f=r<=(c+u)/2?"left":"right":r<=o/2?f="left":r>=l-o/2&&(f="right"),YM(f,n,t,e)&&(f="center"),f}function Cf(n,t,e){const i=e.yAlign||t.yAlign||jM(n,e);return{xAlign:e.xAlign||t.xAlign||qM(n,t,e,i),yAlign:i}}function XM(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function KM(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Rf(n,t,e,i){const{caretSize:r,caretPadding:o,cornerRadius:l}=n,{xAlign:c,yAlign:u}=e,f=r+o,{topLeft:d,topRight:p,bottomLeft:m,bottomRight:b}=Xn(l);let v=XM(t,c);const w=KM(t,u,f);return u==="center"?c==="left"?v+=f:c==="right"&&(v-=f):c==="left"?v-=Math.max(d,m)+r:c==="right"&&(v+=Math.max(p,b)+r),{x:Ut(v,0,i.width-t.width),y:Ut(w,0,i.height-t.height)}}function Sr(n,t,e){const i=Gt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Df(n){return We([],nn(n))}function GM(n,t,e){return Pn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Lf(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const cg={beforeTitle:tn,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:tn,beforeBody:tn,beforeLabel:tn,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return ht(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:tn,afterBody:tn,beforeFooter:tn,footer:tn,afterFooter:tn};function re(n,t,e,i){const r=n[t].call(e,i);return typeof r>"u"?cg[t].call(e,i):r}class al extends Ie{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,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,o=new Ud(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=GM(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=re(i,"beforeTitle",this,t),o=re(i,"title",this,t),l=re(i,"afterTitle",this,t);let c=[];return c=We(c,nn(r)),c=We(c,nn(o)),c=We(c,nn(l)),c}getBeforeBody(t,e){return Df(re(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,r=[];return _t(t,o=>{const l={before:[],lines:[],after:[]},c=Lf(i,o);We(l.before,nn(re(c,"beforeLabel",this,o))),We(l.lines,re(c,"label",this,o)),We(l.after,nn(re(c,"afterLabel",this,o))),r.push(l)}),r}getAfterBody(t,e){return Df(re(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,r=re(i,"beforeFooter",this,t),o=re(i,"footer",this,t),l=re(i,"afterFooter",this,t);let c=[];return c=We(c,nn(r)),c=We(c,nn(o)),c=We(c,nn(l)),c}_createItems(t){const e=this._active,i=this.chart.data,r=[],o=[],l=[];let c=[],u,f;for(u=0,f=e.length;u<f;++u)c.push($M(this.chart,e[u]));return t.filter&&(c=c.filter((d,p,m)=>t.filter(d,p,m,i))),t.itemSort&&(c=c.sort((d,p)=>t.itemSort(d,p,i))),_t(c,d=>{const p=Lf(t.callbacks,d);r.push(re(p,"labelColor",this,d)),o.push(re(p,"labelPointStyle",this,d)),l.push(re(p,"labelTextColor",this,d))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=c,c}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let o,l=[];if(!r.length)this.opacity!==0&&(o={opacity:0});else{const c=ts[i.position].call(this,r,this._eventPosition);l=this._createItems(i),this.title=this.getTitle(l,i),this.beforeBody=this.getBeforeBody(l,i),this.body=this.getBody(l,i),this.afterBody=this.getAfterBody(l,i),this.footer=this.getFooter(l,i);const u=this._size=Ef(this,i),f=Object.assign({},c,u),d=Cf(this.chart,i,f),p=Rf(i,f,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const o=this.getCaretPosition(t,i,r);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:o}=this,{caretSize:l,cornerRadius:c}=i,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:p}=Xn(c),{x:m,y:b}=t,{width:v,height:w}=e;let A,O,k,D,L,C;return o==="center"?(L=b+w/2,r==="left"?(A=m,O=A-l,D=L+l,C=L-l):(A=m+v,O=A+l,D=L-l,C=L+l),k=A):(r==="left"?O=m+Math.max(u,d)+l:r==="right"?O=m+v-Math.max(f,p)-l:O=this.caretX,o==="top"?(D=b,L=D-l,A=O-l,k=O+l):(D=b+w,L=D+l,A=O+l,k=O-l),C=D),{x1:A,x2:O,x3:k,y1:D,y2:L,y3:C}}drawTitle(t,e,i){const r=this.title,o=r.length;let l,c,u;if(o){const f=mi(i.rtl,this.x,this.width);for(t.x=Sr(this,i.titleAlign,i),e.textAlign=f.textAlign(i.titleAlign),e.textBaseline="middle",l=zt(i.titleFont),c=i.titleSpacing,e.fillStyle=i.titleColor,e.font=l.string,u=0;u<o;++u)e.fillText(r[u],f.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+c,u+1===o&&(t.y+=i.titleMarginBottom-c)}}_drawColorBox(t,e,i,r,o){const l=this.labelColors[i],c=this.labelPointStyles[i],{boxHeight:u,boxWidth:f,boxPadding:d}=o,p=zt(o.bodyFont),m=Sr(this,"left",o),b=r.x(m),v=u<p.lineHeight?(p.lineHeight-u)/2:0,w=e.y+v;if(o.usePointStyle){const A={radius:Math.min(f,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},O=r.leftForLtr(b,f)+f/2,k=w+u/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,el(t,A,O,k),t.strokeStyle=l.borderColor,t.fillStyle=l.backgroundColor,el(t,A,O,k)}else{t.lineWidth=ot(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,t.strokeStyle=l.borderColor,t.setLineDash(l.borderDash||[]),t.lineDashOffset=l.borderDashOffset||0;const A=r.leftForLtr(b,f-d),O=r.leftForLtr(r.xPlus(b,1),f-d-2),k=Xn(l.borderRadius);Object.values(k).some(D=>D!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,fs(t,{x:A,y:w,w:f,h:u,radius:k}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),fs(t,{x:O,y:w+1,w:f-2,h:u-2,radius:k}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(A,w,f,u),t.strokeRect(A,w,f,u),t.fillStyle=l.backgroundColor,t.fillRect(O,w+1,f-2,u-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:o,bodyAlign:l,displayColors:c,boxHeight:u,boxWidth:f,boxPadding:d}=i,p=zt(i.bodyFont);let m=p.lineHeight,b=0;const v=mi(i.rtl,this.x,this.width),w=function(F){e.fillText(F,v.x(t.x+b),t.y+m/2),t.y+=m+o},A=v.textAlign(l);let O,k,D,L,C,E,I;for(e.textAlign=l,e.textBaseline="middle",e.font=p.string,t.x=Sr(this,A,i),e.fillStyle=i.bodyColor,_t(this.beforeBody,w),b=c&&A!=="right"?l==="center"?f/2+d:f+2+d:0,L=0,E=r.length;L<E;++L){for(O=r[L],k=this.labelTextColors[L],e.fillStyle=k,_t(O.before,w),D=O.lines,c&&D.length&&(this._drawColorBox(e,t,L,v,i),m=Math.max(p.lineHeight,u)),C=0,I=D.length;C<I;++C)w(D[C]),m=p.lineHeight;_t(O.after,w)}b=0,m=p.lineHeight,_t(this.afterBody,w),t.y-=o}drawFooter(t,e,i){const r=this.footer,o=r.length;let l,c;if(o){const u=mi(i.rtl,this.x,this.width);for(t.x=Sr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=u.textAlign(i.footerAlign),e.textBaseline="middle",l=zt(i.footerFont),e.fillStyle=i.footerColor,e.font=l.string,c=0;c<o;++c)e.fillText(r[c],u.x(t.x),t.y+l.lineHeight/2),t.y+=l.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:o,yAlign:l}=this,{x:c,y:u}=t,{width:f,height:d}=i,{topLeft:p,topRight:m,bottomLeft:b,bottomRight:v}=Xn(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(c+p,u),l==="top"&&this.drawCaret(t,e,i,r),e.lineTo(c+f-m,u),e.quadraticCurveTo(c+f,u,c+f,u+m),l==="center"&&o==="right"&&this.drawCaret(t,e,i,r),e.lineTo(c+f,u+d-v),e.quadraticCurveTo(c+f,u+d,c+f-v,u+d),l==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(c+b,u+d),e.quadraticCurveTo(c,u+d,c,u+d-b),l==="center"&&o==="left"&&this.drawCaret(t,e,i,r),e.lineTo(c,u+p),e.quadraticCurveTo(c,u,c+p,u),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,o=i&&i.y;if(r||o){const l=ts[t.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=Ef(this,t),u=Object.assign({},l,this._size),f=Cf(e,t,u),d=Rf(t,u,f,e);(r._to!==d.x||o._to!==d.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const l=Gt(e.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&c&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,e),Bd(t,e.textDirection),o.y+=l.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),zd(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:c,index:u})=>{const f=this.chart.getDatasetMeta(c);if(!f)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:f.data[u],index:u}}),o=!Ur(i,r),l=this._positionChanged(r,e);(o||l)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],l=this._getActiveElements(t,o,e,i),c=this._positionChanged(l,t),u=e||!Ur(l,o)||c;return u&&(this._active=l,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),u}_getActiveElements(t,e,i,r){const o=this.options;if(t.type==="mouseout")return[];if(!r)return e;const l=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&l.reverse(),l}_positionChanged(t,e){const{caretX:i,caretY:r,options:o}=this,l=ts[o.position].call(this,t,e);return l!==!1&&(i!==l.x||r!==l.y)}}$(al,"positioners",ts);var JM={id:"tooltip",_element:al,positioners:ts,afterInit(n,t,e){e&&(n.tooltip=new al({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:cg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ZM=Object.freeze({__proto__:null,Colors:hM,Decimation:gM,Filler:LM,Legend:WM,SubTitle:VM,Title:UM,Tooltip:JM});const QM=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function tO(n,t,e,i){const r=n.indexOf(t);if(r===-1)return QM(n,t,e,i);const o=n.lastIndexOf(t);return r!==o?e:r}const eO=(n,t)=>n===null?null:Ut(Math.round(n),0,t);function If(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class ll extends Zn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:o}of e)i[r]===o&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(ht(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:tO(i,t,Z(e,t),this._addedLabels),eO(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let l=t;l<=e;l++)r.push({value:l});return r}getLabelForValue(t){return If.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}$(ll,"id","category"),$(ll,"defaults",{ticks:{callback:If}});function nO(n,t){const e=[],{bounds:r,step:o,min:l,max:c,precision:u,count:f,maxTicks:d,maxDigits:p,includeBounds:m}=n,b=o||1,v=d-1,{min:w,max:A}=t,O=!ht(l),k=!ht(c),D=!ht(f),L=(A-w)/(p+1);let C=Eu((A-w)/v/b)*b,E,I,F,Y;if(C<1e-14&&!O&&!k)return[{value:w},{value:A}];Y=Math.ceil(A/C)-Math.floor(w/C),Y>v&&(C=Eu(Y*C/v/b)*b),ht(u)||(E=Math.pow(10,u),C=Math.ceil(C*E)/E),r==="ticks"?(I=Math.floor(w/C)*C,F=Math.ceil(A/C)*C):(I=w,F=A),O&&k&&o&&J1((c-l)/o,C/1e3)?(Y=Math.round(Math.min((c-l)/C,d)),C=(c-l)/Y,I=l,F=c):D?(I=O?l:I,F=k?c:F,Y=f-1,C=(F-I)/Y):(Y=(F-I)/C,is(Y,Math.round(Y),C/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const Q=Math.max(Cu(C),Cu(I));E=Math.pow(10,ht(u)?Q:u),I=Math.round(I*E)/E,F=Math.round(F*E)/E;let tt=0;for(O&&(m&&I!==l?(e.push({value:l}),I<l&&tt++,is(Math.round((I+tt*C)*E)/E,l,Ff(l,L,n))&&tt++):I<l&&tt++);tt<Y;++tt)e.push({value:Math.round((I+tt*C)*E)/E});return k&&m&&F!==c?e.length&&is(e[e.length-1].value,c,Ff(c,L,n))?e[e.length-1].value=c:e.push({value:c}):(!k||F===c)&&e.push({value:F}),e}function Ff(n,t,{horizontal:e,minRotation:i}){const r=De(i),o=(e?Math.sin(r):Math.cos(r))||.001,l=.75*t*(""+n).length;return Math.min(t/o,l)}class Gr extends Zn{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 ht(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const l=u=>r=e?r:u,c=u=>o=i?o:u;if(t){const u=Ve(r),f=Ve(o);u<0&&f<0?c(0):u>0&&f>0&&l(0)}if(r===o){let u=o===0?1:Math.abs(o*.05);c(o+u),t||l(r-u)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,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,l=nO(r,o);return t.bounds==="ticks"&&bd(l,this,"value"),t.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return xs(t,this.chart.options.locale,this.options.ticks.format)}}class cl extends Gr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=kt(t)?t:0,this.max=kt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=De(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}$(cl,"id","linear"),$(cl,"defaults",{ticks:{callback:eo.formatters.numeric}});const gs=n=>Math.floor(vn(n)),Vn=(n,t)=>Math.pow(10,gs(n)+t);function Bf(n){return n/Math.pow(10,gs(n))===1}function zf(n,t,e){const i=Math.pow(10,e),r=Math.floor(n/i);return Math.ceil(t/i)-r}function iO(n,t){const e=t-n;let i=gs(e);for(;zf(n,t,i)>10;)i++;for(;zf(n,t,i)<10;)i--;return Math.min(i,gs(n))}function sO(n,{min:t,max:e}){t=de(n.min,t);const i=[],r=gs(t);let o=iO(t,e),l=o<0?Math.pow(10,Math.abs(o)):1;const c=Math.pow(10,o),u=r>o?Math.pow(10,r):0,f=Math.round((t-u)*l)/l,d=Math.floor((t-u)/c/10)*c*10;let p=Math.floor((f-d)/Math.pow(10,o)),m=de(n.min,Math.round((u+d+p*Math.pow(10,o))*l)/l);for(;m<e;)i.push({value:m,major:Bf(m),significand:p}),p>=10?p=p<15?15:20:p++,p>=20&&(o++,p=2,l=o>=0?1:l),m=Math.round((u+d+p*Math.pow(10,o))*l)/l;const b=de(n.max,m);return i.push({value:b,major:Bf(b),significand:p}),i}class hl extends Zn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Gr.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return kt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=kt(t)?Math.max(0,t):null,this.max=kt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!kt(this._userMin)&&(this.min=t===Vn(this.min,0)?Vn(this.min,-1):Vn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const o=c=>i=t?i:c,l=c=>r=e?r:c;i===r&&(i<=0?(o(1),l(10)):(o(Vn(i,-1)),l(Vn(r,1)))),i<=0&&o(Vn(r,-1)),r<=0&&l(Vn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=sO(e,this);return t.bounds==="ticks"&&bd(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":xs(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=vn(t),this._valueRange=vn(this.max)-vn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(vn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}$(hl,"id","logarithmic"),$(hl,"defaults",{ticks:{callback:eo.formatters.logarithmic,major:{enabled:!0}}});function ul(n){const t=n.ticks;if(t.display&&n.display){const e=Gt(t.backdropPadding);return Z(t.font&&t.font.size,Dt.font.size)+e.height}return 0}function rO(n,t,e){return e=St(e)?e:[e],{w:gw(n,t.string,e),h:e.length*t.lineHeight}}function Nf(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function oO(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],o=n._pointLabels.length,l=n.options.pointLabels,c=l.centerPointLabels?Ot/o:0;for(let u=0;u<o;u++){const f=l.setContext(n.getPointLabelContext(u));r[u]=f.padding;const d=n.getPointPosition(u,n.drawingArea+r[u],c),p=zt(f.font),m=rO(n.ctx,p,n._pointLabels[u]);i[u]=m;const b=ge(n.getIndexAngle(u)+c),v=Math.round(Al(b)),w=Nf(v,d.x,m.w,0,180),A=Nf(v,d.y,m.h,90,270);aO(e,t,b,w,A)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=lO(n,i,r)}function aO(n,t,e,i,r){const o=Math.abs(Math.sin(e)),l=Math.abs(Math.cos(e));let c=0,u=0;i.start<t.l?(c=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-c)):i.end>t.r&&(c=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+c)),r.start<t.t?(u=(t.t-r.start)/l,n.t=Math.min(n.t,t.t-u)):r.end>t.b&&(u=(r.end-t.b)/l,n.b=Math.max(n.b,t.b+u))}function lO(n,t,e){const i=[],r=n._pointLabels.length,o=n.options,l=ul(o)/2,c=n.drawingArea,u=o.pointLabels.centerPointLabels?Ot/r:0;for(let f=0;f<r;f++){const d=n.getPointPosition(f,c+l+e[f],u),p=Math.round(Al(ge(d.angle+Et))),m=t[f],b=uO(d.y,m.h,p),v=cO(p),w=hO(d.x,m.w,v);i.push({x:d.x,y:b,textAlign:v,left:w,top:b,right:w+m.w,bottom:b+m.h})}return i}function cO(n){return n===0||n===180?"center":n<180?"left":"right"}function hO(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function uO(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function fO(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const o=i.setContext(n.getPointLabelContext(r)),l=zt(o.font),{x:c,y:u,textAlign:f,left:d,top:p,right:m,bottom:b}=n._pointLabelItems[r],{backdropColor:v}=o;if(!ht(v)){const w=Xn(o.borderRadius),A=Gt(o.backdropPadding);e.fillStyle=v;const O=d-A.left,k=p-A.top,D=m-d+A.width,L=b-p+A.height;Object.values(w).some(C=>C!==0)?(e.beginPath(),fs(e,{x:O,y:k,w:D,h:L,radius:w}),e.fill()):e.fillRect(O,k,D,L)}Jn(e,n._pointLabels[r],c,u+l.lineHeight/2,l,{color:o.color,textAlign:f,textBaseline:"middle"})}}function hg(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,At);else{let o=n.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let l=1;l<i;l++)o=n.getPointPosition(l,t),r.lineTo(o.x,o.y)}}function dO(n,t,e,i,r){const o=n.ctx,l=t.circular,{color:c,lineWidth:u}=t;!l&&!i||!c||!u||e<0||(o.save(),o.strokeStyle=c,o.lineWidth=u,o.setLineDash(r.dash),o.lineDashOffset=r.dashOffset,o.beginPath(),hg(n,e,l,i),o.closePath(),o.stroke(),o.restore())}function gO(n,t,e){return Pn(n,{label:e,index:t,type:"pointLabel"})}class es extends Gr{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Gt(ul(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=kt(t)&&!isNaN(t)?t:0,this.max=kt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ul(this.options))}generateTickLabels(t){Gr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=vt(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?oO(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=At/(this._pointLabels.length||1),i=this.options.startAngle||0;return ge(t*e+De(i))}getDistanceFromCenterForValue(t){if(ht(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(ht(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return gO(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-Et+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),hg(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r,border:o}=e,l=this._pointLabels.length;let c,u,f;if(e.pointLabels.display&&fO(this,l),r.display&&this.ticks.forEach((d,p)=>{if(p!==0){u=this.getDistanceFromCenterForValue(d.value);const m=this.getContext(p),b=r.setContext(m),v=o.setContext(m);dO(this,b,u,l,v)}}),i.display){for(t.save(),c=l-1;c>=0;c--){const d=i.setContext(this.getPointLabelContext(c)),{color:p,lineWidth:m}=d;!m||!p||(t.lineWidth=m,t.strokeStyle=p,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,u=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),f=this.getPointPosition(c,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,l;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((c,u)=>{if(u===0&&!e.reverse)return;const f=i.setContext(this.getContext(u)),d=zt(f.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),f.showLabelBackdrop){t.font=d.string,l=t.measureText(c.label).width,t.fillStyle=f.backdropColor;const p=Gt(f.backdropPadding);t.fillRect(-l/2-p.left,-o-d.size/2-p.top,l+p.width,d.size+p.height)}Jn(t,c.label,0,-o,d,{color:f.color})}),t.restore()}drawTitle(){}}$(es,"id","radialLinear"),$(es,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:eo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),$(es,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),$(es,"descriptors",{angleLines:{_fallback:"grid"}});const ro={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}},oe=Object.keys(ro);function pO(n,t){return n-t}function Wf(n,t){if(ht(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:o}=n._parseOpts;let l=t;return typeof i=="function"&&(l=i(l)),kt(l)||(l=typeof i=="string"?e.parse(l,i):e.parse(l)),l===null?null:(r&&(l=r==="week"&&(bi(o)||o===!0)?e.startOf(l,"isoWeek",o):e.startOf(l,r)),+l)}function Hf(n,t,e,i){const r=oe.length;for(let o=oe.indexOf(n);o<r-1;++o){const l=ro[oe[o]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((e-t)/(c*l.size))<=i)return oe[o]}return oe[r-1]}function mO(n,t,e,i,r){for(let o=oe.length-1;o>=oe.indexOf(e);o--){const l=oe[o];if(ro[l].common&&n._adapter.diff(r,i,l)>=t-1)return l}return oe[e?oe.indexOf(e):0]}function _O(n){for(let t=oe.indexOf(n)+1,e=oe.length;t<e;++t)if(ro[oe[t]].common)return oe[t]}function Uf(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=Ml(e,t),o=e[i]>=t?e[i]:e[r];n[o]=!0}}function bO(n,t,e,i){const r=n._adapter,o=+r.startOf(t[0].value,i),l=t[t.length-1].value;let c,u;for(c=o;c<=l;c=+r.add(c,1,i))u=e[c],u>=0&&(t[u].major=!0);return t}function Vf(n,t,e){const i=[],r={},o=t.length;let l,c;for(l=0;l<o;++l)c=t[l],r[c]=l,i.push({value:c,major:!1});return o===0||!e?i:bO(n,i,r,e)}class ps extends Zn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),r=this._adapter=new ES._date(t.adapters.date);r.init(e),ns(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Wf(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:l,maxDefined:c}=this.getUserBounds();function u(f){!l&&!isNaN(f.min)&&(r=Math.min(r,f.min)),!c&&!isNaN(f.max)&&(o=Math.max(o,f.max))}(!l||!c)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),r=kt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),o=kt(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,l=this.max,c=ew(r,o,l);return this._unit=e.unit||(i.autoSkip?Hf(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):mO(this,c.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:_O(this._unit),this.initOffsets(r),t.reverse&&c.reverse(),Vf(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,r,o;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;e=Ut(e,0,l),i=Ut(i,0,l),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,o=r.time,l=o.unit||Hf(o.minUnit,e,i,this._getLabelCapacity(e)),c=Z(r.ticks.stepSize,1),u=l==="week"?o.isoWeekday:!1,f=bi(u)||u===!0,d={};let p=e,m,b;if(f&&(p=+t.startOf(p,"isoWeek",u)),p=+t.startOf(p,f?"day":l),t.diff(i,e,l)>1e5*c)throw new Error(e+" and "+i+" are too far apart with stepSize of "+c+" "+l);const v=r.ticks.source==="data"&&this.getDataTimestamps();for(m=p,b=0;m<i;m=+t.add(m,c,l),b++)Uf(d,m,v);return(m===i||r.bounds==="ticks"||b===1)&&Uf(d,m,v),Object.keys(d).sort((w,A)=>w-A).map(w=>+w)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,o=this._unit,l=e||r[o];return this._adapter.format(t,l)}_tickFormatFunction(t,e,i,r){const o=this.options,l=o.ticks.callback;if(l)return vt(l,[t,e,i],this);const c=o.time.displayFormats,u=this._unit,f=this._majorUnit,d=u&&c[u],p=f&&c[f],m=i[e],b=f&&p&&m&&m.major;return this._adapter.format(t,r||(b?p:d))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=De(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(r),l=Math.sin(r),c=this._resolveTickFontOptions(0).size;return{w:i*o+c*l,h:i*l+c*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Vf(this,[t],this._majorUnit),r),l=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(Wf(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return vd(t.sort(pO))}}$(ps,"id","time"),$(ps,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ar(n,t,e){let i=0,r=n.length-1,o,l,c,u;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=on(n,"pos",t)),{pos:o,time:c}=n[i],{pos:l,time:u}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=on(n,"time",t)),{time:o,pos:c}=n[i],{time:l,pos:u}=n[r]);const f=l-o;return f?c+(u-c)*(t-o)/f:c}class fl extends ps{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=Ar(e,this.min),this._tableRange=Ar(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],o=[];let l,c,u,f,d;for(l=0,c=t.length;l<c;++l)f=t[l],f>=e&&f<=i&&r.push(f);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(l=0,c=r.length;l<c;++l)d=r[l+1],u=r[l-1],f=r[l],Math.round((d+u)/2)!==f&&o.push({time:f,pos:l/(c-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Ar(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Ar(this._table,i*this._tableRange+this._minPos,!0)}}$(fl,"id","timeseries"),$(fl,"defaults",ps.defaults);var xO=Object.freeze({__proto__:null,CategoryScale:ll,LinearScale:cl,LogarithmicScale:hl,RadialLinearScale:es,TimeScale:ps,TimeSeriesScale:fl});const CO=[kS,sM,ZM,xO];export{Yn as C,PO as G,kO as H,tv as I,MO as O,wO as R,SO as Y,EO as a,wu as b,TO as c,AO as j,qa as l,OO as q,CO as r};
|