From 76300319b6d25e6cfa963f6f33b77db07f8dc9de Mon Sep 17 00:00:00 2001 From: Kamil Pyszkowski Date: Sun, 15 Aug 2021 14:47:29 +0200 Subject: [PATCH] Minor fixes --- .gitignore | 3 - build/asset-manifest.json | 30 +++++ build/favicon.ico | Bin 0 -> 3870 bytes build/index.html | 1 + build/static/js/2.3c86400b.chunk.js | 3 + .../static/js/2.3c86400b.chunk.js.LICENSE.txt | 66 +++++++++++ build/static/js/2.3c86400b.chunk.js.map | 1 + build/static/js/main.03501f4a.chunk.js | 2 + build/static/js/main.03501f4a.chunk.js.map | 1 + build/static/js/runtime-main.c8b5e785.js | 2 + build/static/js/runtime-main.c8b5e785.js.map | 1 + .../media/calendar-placeholder.3ca33692.svg | 37 ++++++ build/static/media/car.0f828968.svg | 1 + build/static/media/chemistry.37831714.svg | 1 + build/static/media/close.16d17dbe.svg | 67 +++++++++++ build/static/media/computer.16e15d56.svg | 1 + build/static/media/heart.034ab291.svg | 1 + .../media/list-placeholder.07f1dcca.svg | 108 ++++++++++++++++++ build/static/media/logo.8a5a1cd3.svg | 88 ++++++++++++++ build/static/media/paint.849956e0.svg | 1 + build/static/media/shopping.0415469d.svg | 1 + build/static/media/tick.9844bb96.svg | 1 + build/static/media/trash.667f51f1.svg | 1 + build/static/media/tshirt.af272425.svg | 1 + 24 files changed, 416 insertions(+), 3 deletions(-) create mode 100644 build/asset-manifest.json create mode 100644 build/favicon.ico create mode 100644 build/index.html create mode 100644 build/static/js/2.3c86400b.chunk.js create mode 100644 build/static/js/2.3c86400b.chunk.js.LICENSE.txt create mode 100644 build/static/js/2.3c86400b.chunk.js.map create mode 100644 build/static/js/main.03501f4a.chunk.js create mode 100644 build/static/js/main.03501f4a.chunk.js.map create mode 100644 build/static/js/runtime-main.c8b5e785.js create mode 100644 build/static/js/runtime-main.c8b5e785.js.map create mode 100644 build/static/media/calendar-placeholder.3ca33692.svg create mode 100644 build/static/media/car.0f828968.svg create mode 100644 build/static/media/chemistry.37831714.svg create mode 100644 build/static/media/close.16d17dbe.svg create mode 100644 build/static/media/computer.16e15d56.svg create mode 100644 build/static/media/heart.034ab291.svg create mode 100644 build/static/media/list-placeholder.07f1dcca.svg create mode 100644 build/static/media/logo.8a5a1cd3.svg create mode 100644 build/static/media/paint.849956e0.svg create mode 100644 build/static/media/shopping.0415469d.svg create mode 100644 build/static/media/tick.9844bb96.svg create mode 100644 build/static/media/trash.667f51f1.svg create mode 100644 build/static/media/tshirt.af272425.svg diff --git a/.gitignore b/.gitignore index 4f2b221..7fd981a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ # testing /coverage -# production -/build - # misc .DS_Store .env.local diff --git a/build/asset-manifest.json b/build/asset-manifest.json new file mode 100644 index 0000000..bd2e632 --- /dev/null +++ b/build/asset-manifest.json @@ -0,0 +1,30 @@ +{ + "files": { + "main.js": "/static/js/main.03501f4a.chunk.js", + "main.js.map": "/static/js/main.03501f4a.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.c8b5e785.js", + "runtime-main.js.map": "/static/js/runtime-main.c8b5e785.js.map", + "static/js/2.3c86400b.chunk.js": "/static/js/2.3c86400b.chunk.js", + "static/js/2.3c86400b.chunk.js.map": "/static/js/2.3c86400b.chunk.js.map", + "index.html": "/index.html", + "static/js/2.3c86400b.chunk.js.LICENSE.txt": "/static/js/2.3c86400b.chunk.js.LICENSE.txt", + "static/media/calendar-placeholder.3ca33692.svg": "/static/media/calendar-placeholder.3ca33692.svg", + "static/media/car.0f828968.svg": "/static/media/car.0f828968.svg", + "static/media/chemistry.37831714.svg": "/static/media/chemistry.37831714.svg", + "static/media/close.16d17dbe.svg": "/static/media/close.16d17dbe.svg", + "static/media/computer.16e15d56.svg": "/static/media/computer.16e15d56.svg", + "static/media/heart.034ab291.svg": "/static/media/heart.034ab291.svg", + "static/media/list-placeholder.07f1dcca.svg": "/static/media/list-placeholder.07f1dcca.svg", + "static/media/logo.8a5a1cd3.svg": "/static/media/logo.8a5a1cd3.svg", + "static/media/paint.849956e0.svg": "/static/media/paint.849956e0.svg", + "static/media/shopping.0415469d.svg": "/static/media/shopping.0415469d.svg", + "static/media/tick.9844bb96.svg": "/static/media/tick.9844bb96.svg", + "static/media/trash.667f51f1.svg": "/static/media/trash.667f51f1.svg", + "static/media/tshirt.af272425.svg": "/static/media/tshirt.af272425.svg" + }, + "entrypoints": [ + "static/js/runtime-main.c8b5e785.js", + "static/js/2.3c86400b.chunk.js", + "static/js/main.03501f4a.chunk.js" + ] +} \ No newline at end of file diff --git a/build/favicon.ico b/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..3e2a12a --- /dev/null +++ b/build/index.html @@ -0,0 +1 @@ +My Expenses
\ No newline at end of file diff --git a/build/static/js/2.3c86400b.chunk.js b/build/static/js/2.3c86400b.chunk.js new file mode 100644 index 0000000..ce14715 --- /dev/null +++ b/build/static/js/2.3c86400b.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.3c86400b.chunk.js.LICENSE.txt */ +(this.webpackJsonpexpenses=this.webpackJsonpexpenses||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(87)},function(e,t,n){"use strict";e.exports=n(99)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Me})),n.d(t,"b",(function(){return Re})),n.d(t,"c",(function(){return ye})),n.d(t,"e",(function(){return Le}));var r=n(53),a=n(0),i=n.n(a),o=n(80),u=n.n(o),l=n(81),s=n(82),c=n(55),f=n(22),d=n.n(f);function h(){return(h=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var E=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,a=r;e>=a;)(a<<=1)<0&&O(16,""+e);this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),a=r+n,i=r;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(k))return r}}(n),i=void 0!==a?a.nextSibling:null;r.setAttribute(k,"active"),r.setAttribute("data-styled-version","5.3.0");var o=I();return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},N=function(){function e(e){var t=this.element=z(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(s+=e+",")})),r+=""+u+l+'{content:"'+s+'"}/*!sc*/\n'}}}return r}(this)},e}(),$=/(a)(d)/gi,Y=function(e){return String.fromCharCode(e+(e>25?39:97))};function K(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Y(t%52)+n;return(Y(t%52)+n).replace($,"$1-$2")}var q=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Q=function(e){return q(5381,e)};function X(e){for(var t=0;t>>0);if(!t.hasNameForId(r,o)){var u=n(i,"."+o,void 0,r);t.insertRules(r,o,u)}a.push(o),this.staticRulesId=o}else{for(var l=this.rules.length,s=q(this.baseHash,n.hash),c="",f=0;f>>0);if(!t.hasNameForId(r,v)){var g=n(c,"."+v,void 0,r);t.insertRules(r,v,g)}a.push(v)}}return a.join(" ")},e}(),J=/^\s*\/\/.*$/gm,ee=[":","[",".","#"];function te(e){var t,n,r,a,i=void 0===e?y:e,o=i.options,u=void 0===o?y:o,s=i.plugins,c=void 0===s?g:s,f=new l.a(u),d=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,a,i,o,u,l,s,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===s)return r+"/*|*/";break;case 3:switch(s){case 102:case 112:return e(a[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),p=function(e,r,i){return 0===r&&-1!==ee.indexOf(i[n.length])||i.match(a)?e:"."+t};function v(e,i,o,u){void 0===u&&(u="&");var l=e.replace(J,""),s=i&&o?o+" "+i+" { "+l+" }":l;return t=u,n=i,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),f(o||!i?"":i,s)}return f.use([].concat(c,[function(e,t,a){2===e&&a.length&&a[0].lastIndexOf(n)>0&&(a[0]=a[0].replace(r,p))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),v.hash=c.length?c.reduce((function(e,t){return t.name||O(15),q(e,t.name)}),5381).toString():"",v}var ne=i.a.createContext(),re=(ne.Consumer,i.a.createContext()),ae=(re.Consumer,new H),ie=te();function oe(){return Object(a.useContext)(ne)||ae}function ue(){return Object(a.useContext)(re)||ie}function le(e){var t=Object(a.useState)(e.stylisPlugins),n=t[0],r=t[1],o=oe(),l=Object(a.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),s=Object(a.useMemo)((function(){return te({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(a.useEffect)((function(){u()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.a.createElement(ne.Provider,{value:l},i.a.createElement(re.Provider,{value:s},e.children))}var se=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ie);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return O(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ie),this.name+e.hash},e}(),ce=/([A-Z])/,fe=/([A-Z])/g,de=/^ms-/,he=function(e){return"-"+e.toLowerCase()};function pe(e){return ce.test(e)?e.replace(fe,he).replace(de,"-ms-"):e}var ve=function(e){return null==e||!1===e||""===e};function ge(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,u=e.length;o1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,xe=/(^-|-$)/g;function ke(e){return e.replace(be,"-").replace(xe,"")}var _e=function(e){return K(Q(e)>>>0)};function we(e){return"string"==typeof e&&!0}var Se=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Oe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ee(e,t,n){var r=e[n];Se(t)&&Se(r)?Ce(r,t):e[n]=t}function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(a[n]=e[n]);return a}(t,["componentId"]),i=r&&r+"-"+(we(e)?e:ke(b(e)));return Te(e,h({},a,{attrs:_,componentId:i}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ce({},e.defaultProps,t):t}}),S.toString=function(){return"."+S.styledComponentId},o&&d()(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var Ae=function(e){return function e(t,n,a){if(void 0===a&&(a=y),!Object(r.isValidElementType)(n))return O(1,String(n));var i=function(){return t(n,a,ye.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,h({},a,{},r))},i.attrs=function(r){return e(t,n,h({},a,{attrs:Array.prototype.concat(a.attrs,r).filter(Boolean)}))},i}(Te,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Ae[e]=Ae(e)}));var De=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=X(e),H.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var a=r(ge(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,a)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&H.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?O(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return O(2);var n=((t={})[k]="",t["data-styled-version"]="5.3.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=I();return r&&(n.nonce=r),[i.a.createElement("style",h({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new H({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?O(2):i.a.createElement(le,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return O(3)}}();t.d=Ae}).call(this,n(100))},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw o}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24);var a=n(20);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.score?-1:e.index-t.index}))},k=function(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")},_=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},w=["uri","path"],S=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},u=o.state,l=o.replace,s=void 0!==l&&l;if("number"===typeof t)e.history.go(t);else{u=S({},u,{key:Date.now()+""});try{a||s?e.history.replaceState(u,null,t):e.history.pushState(u,null,t)}catch(f){e.location[s?"replace":"assign"](t)}}r=O(e),a=!0;var c=new Promise((function(e){return i=e}));return n.forEach((function(e){return e({location:r,action:"PUSH"})})),c}}}(E?window:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=e.indexOf("?"),n={pathname:t>-1?e.substr(0,t):e,search:t>-1?e.substr(t):""},r=0,a=[n],i=[null];return{get location(){return a[r]},addEventListener:function(e,t){},removeEventListener:function(e,t){},history:{get entries(){return a},get index(){return r},get state(){return i[r]},pushState:function(e,t,n){var o=n.split("?"),u=o[0],l=o[1],s=void 0===l?"":l;r++,a.push({pathname:u,search:s.length?"?"+s:s}),i.push(e)},replaceState:function(e,t,n){var o=n.split("?"),u=o[0],l=o[1],s=void 0===l?"":l;a[r]={pathname:u,search:s},i[r]=e},go:function(e){var t=r+e;t<0||t>i.length-1||(r=t)}}}}()),P=(C.navigate,Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function A(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var D=function(e,t){var n=l()(t);return n.displayName=e,n},R=D("Location"),L=function(e){var t=e.children;return a.a.createElement(R.Consumer,null,(function(e){return e?t(e):a.a.createElement(F,null,t)}))},F=function(e){function t(){var n,r;j(this,t);for(var a=arguments.length,i=Array(a),o=0;o-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(12),a=n(143),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=o&&o.exports===i?r.Buffer:void 0,l=(u?u.isBuffer:void 0)||a;e.exports=l}).call(this,n(45)(e))},function(e,t,n){var r=n(145),a=n(146),i=n(147),o=i&&i.isTypedArray,u=o?a(o):r;e.exports=u},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,u&&a(n[0],n[1],u)&&(o=i<3?void 0:o,i=1),t=Object(t);++rc))return!1;var d=l.get(e),h=l.get(t);if(d&&h)return d==t&&h==e;var p=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p=t||n<0||v&&e-c>=o}function _(){var e=p();if(k(e))return w(e);l=setTimeout(_,function(e){var n=t-(e-s);return v?h(n,o-(e-c)):n}(e))}function w(e){return l=void 0,m&&a?b(e):(a=i=void 0,u)}function S(){var e=p(),n=k(e);if(a=arguments,i=this,s=e,n){if(void 0===l)return x(s);if(v)return l=setTimeout(_,t),b(s)}return void 0===l&&(l=setTimeout(_,t)),u}return t=y(t)||0,g(r)&&(f=!!r.leading,o=(v="maxWait"in r)?d(y(r.maxWait)||0,t):o,m="trailing"in r?!!r.trailing:m),S.cancel=function(){void 0!==l&&clearTimeout(l),c=0,a=s=i=l=void 0},S.flush=function(){return void 0===l?u:w(p())},S}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||o.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,r){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError(n);return g(r)&&(a="leading"in r?!!r.leading:a,i="trailing"in r?!!r.trailing:i),v(e,t,{leading:a,maxWait:t,trailing:i})}}).call(this,n(39))},function(e,t){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),l=0;lh)&&(N=(B=B.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0=0;a--)t.call(n,e[a],a);else for(a=0;an;)e=e[t.substr(n,r-n)],r=B(t,n=r+1);return e}function H(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $=function(e){return"undefined"!==typeof e},Y=function(e){return"function"===typeof e},K=Math.PI,q=2*K,Q=q+K,X=Number.POSITIVE_INFINITY,G=K/180,Z=K/2,J=K/4,ee=2*K/3,te=Math.log10,ne=Math.sign;function re(e){var t=Math.round(e);e=ie(e,t,e/1e3)?t:e;var n=Math.pow(10,Math.floor(te(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ae(e){return!isNaN(parseFloat(e))&&isFinite(e)}function ie(e,t,n){return Math.abs(e-t)l&&s=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){return ve(e)?e:ge(e,.075,.3)},easeOutElastic:function(e){return ve(e)?e:ye(e,.075,.3)},easeInOutElastic:function(e){var t=.1125;return ve(e)?e:e<.5?.5*ge(2*e,t,.45):.5+.5*ye(2*e-1,t,.45)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-me.easeOutBounce(1-e)},easeOutBounce:function(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*me.easeInBounce(2*e):.5*me.easeOutBounce(2*e-1)+.5}},be={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},xe="0123456789ABCDEF",ke=function(e){return xe[15&e]},_e=function(e){return xe[(240&e)>>4]+xe[15&e]},we=function(e){return(240&e)>>4===(15&e)};function Se(e){var t=function(e){return we(e.r)&&we(e.g)&&we(e.b)&&we(e.a)}(e)?ke:_e;return e?"#"+t(e.r)+t(e.g)+t(e.b)+(e.a<255?t(e.a):""):e}function Oe(e){return e+.5|0}var Ee=function(e,t,n){return Math.max(Math.min(e,n),t)};function Ce(e){return Ee(Oe(2.55*e),0,255)}function Pe(e){return Ee(Oe(255*e),0,255)}function Me(e){return Ee(Oe(e/2.55)/100,0,1)}function je(e){return Ee(Oe(100*e),0,100)}var Te=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var Ae=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function De(e,t,n){var r=t*Math.min(n,1-n),a=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function Re(e,t,n){var r=function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return[r(5),r(3),r(1)]}function Le(e,t,n){var r,a=De(e,1,.5);for(t+n>1&&(t*=r=1/(t+n),n*=r),r=0;r<3;r++)a[r]*=1-t-n,a[r]+=t;return a}function Fe(e){var t,n,r,a=e.r/255,i=e.g/255,o=e.b/255,u=Math.max(a,i,o),l=Math.min(a,i,o),s=(u+l)/2;return u!==l&&(r=u-l,n=s>.5?r/(2-u-l):r/(u+l),t=60*(t=u===a?(i-o)/r+(i>16&255,n>>8&255,255&n]}return i}()).transparent=[0,0,0,0]);var t=We[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}function $e(e,t,n){if(e){var r=Fe(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=ze(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Ye(e,t){return e?Object.assign(t||{},e):e}function Ke(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Pe(e[3]))):(t=Ye(e,{r:0,g:0,b:0,a:1})).a=Pe(t.a),t}function qe(e){return"r"===e.charAt(0)?function(e){var t,n,r,a=Te.exec(e),i=255;if(a){if(a[7]!==t){var o=+a[7];i=255&(a[8]?Ce(o):255*o)}return t=+a[1],n=+a[3],r=+a[5],{r:t=255&(a[2]?Ce(t):t),g:n=255&(a[4]?Ce(n):n),b:r=255&(a[6]?Ce(r):r),a:i}}}(e):Ve(e)}var Qe=function(){function e(t){if(Object(m.a)(this,e),t instanceof e)return t;var n,r=typeof t;"object"===r?n=Ke(t):"string"===r&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*be[e[1]],g:255&17*be[e[2]],b:255&17*be[e[3]],a:5===n?17*be[e[4]]:255}:7!==n&&9!==n||(t={r:be[e[1]]<<4|be[e[2]],g:be[e[3]]<<4|be[e[4]],b:be[e[5]]<<4|be[e[6]],a:9===n?be[e[7]]<<4|be[e[8]]:255})),t}(t)||He(t)||qe(t)),this._rgb=n,this._valid=!!n}return Object(b.a)(e,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var e=Ye(this._rgb);return e&&(e.a=Me(e.a)),e},set:function(e){this._rgb=Ke(e)}},{key:"rgbString",value:function(){return this._valid?(e=this._rgb)&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(Me(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")):this._rgb;var e}},{key:"hexString",value:function(){return this._valid?Se(this._rgb):this._rgb}},{key:"hslString",value:function(){return this._valid?function(e){if(e){var t=Fe(e),n=t[0],r=je(t[1]),a=je(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(a,"%, ").concat(Me(e.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(a,"%)")}}(this._rgb):this._rgb}},{key:"mix",value:function(e,t){var n=this;if(e){var r,a=n.rgb,i=e.rgb,o=t===r?.5:t,u=2*o-1,l=a.a-i.a,s=((u*l===-1?u:(u+l)/(1+u*l))+1)/2;r=1-s,a.r=255&s*a.r+r*i.r+.5,a.g=255&s*a.g+r*i.g+.5,a.b=255&s*a.b+r*i.b+.5,a.a=o*a.a+(1-o)*i.a,n.rgb=a}return n}},{key:"clone",value:function(){return new e(this.rgb)}},{key:"alpha",value:function(e){return this._rgb.a=Pe(e),this}},{key:"clearer",value:function(e){return this._rgb.a*=1-e,this}},{key:"greyscale",value:function(){var e=this._rgb,t=Oe(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}},{key:"opaquer",value:function(e){return this._rgb.a*=1+e,this}},{key:"negate",value:function(){var e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}},{key:"lighten",value:function(e){return $e(this._rgb,2,e),this}},{key:"darken",value:function(e){return $e(this._rgb,2,-e),this}},{key:"saturate",value:function(e){return $e(this._rgb,1,e),this}},{key:"desaturate",value:function(e){return $e(this._rgb,1,-e),this}},{key:"rotate",value:function(e){return function(e,t){var n=Fe(e);n[0]=Ne(n[0]+t),n=ze(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}]),e}();function Xe(e){return new Qe(e)}var Ge=function(e){return e instanceof CanvasGradient||e instanceof CanvasPattern};function Ze(e){return Ge(e)?e:Xe(e)}function Je(e){return Ge(e)?e:Xe(e).saturate(.5).darken(.1).hexString()}var et=Object.create(null),tt=Object.create(null);function nt(e,t){if(!t)return e;for(var n=t.split("."),r=0,a=n.length;rr&&(r=i),r}function ot(e,t,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(a=r.data={},i=r.garbageCollect=[],r.font=t),e.save(),e.font=t;var o,u,l,s,c,f=0,d=n.length;for(o=0;on.length){for(o=0;o0&&e.stroke()}}function ct(e,t,n){return n=n||.5,e&&t&&e.x>t.left-n&&e.xt.top-n&&e.y5&&void 0!==arguments[5]?arguments[5]:{},l=C(t)?t:[t],s=u.strokeWidth>0&&""!==u.strokeColor;for(e.save(),e.font=a.string,gt(e,u),i=0;i1;)n(r=i+a>>1)?i=r:a=r;return{lo:i,hi:a}}var Mt=function(e,t,n){return Pt(e,n,(function(r){return e[r][t]=n}))};var Tt=["push","pop","shift","splice","unshift"];function At(e,t){var n=e._chartjs;if(n){var r=n.listeners,a=r.indexOf(t);-1!==a&&r.splice(a,1),r.length>0||(Tt.forEach((function(t){delete e[t]})),delete e._chartjs)}}function Dt(e){var t,n,r=new Set;for(t=0,n=e.length;t1&&void 0!==arguments[1]?arguments[1]:[""],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return e[0]};$(a)||(a=Yt("_fallback",e));var u=(t={},Object(g.a)(t,Symbol.toStringTag,"Object"),Object(g.a)(t,"_cacheable",!0),Object(g.a)(t,"_scopes",e),Object(g.a)(t,"_rootScopes",r),Object(g.a)(t,"_fallback",a),Object(g.a)(t,"_getTarget",o),Object(g.a)(t,"override",(function(t){return Rt([t].concat(Object(i.a)(e)),n,r,a)})),t);return new Proxy(u,{deleteProperty:function(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get:function(t,r){return Nt(t,r,(function(){return $t(r,n,e,t)}))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e[0])},has:function(e,t){return Kt(e).includes(t)},ownKeys:function(e){return Kt(e)},set:function(e,t,n){return(e._storage||(e._storage=o()))[t]=n,delete e[t],delete e._keys,!0}})}function Lt(e,t,n,r){var a={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Ft(e,r),setContext:function(t){return Lt(e,t,n,r)},override:function(a){return Lt(e.override(a),t,n,r)}};return new Proxy(a,{deleteProperty:function(t,n){return delete t[n],delete e[n],!0},get:function(e,t,n){return Nt(e,t,(function(){return function(e,t,n){var r=e._proxy,a=e._context,i=e._subProxy,o=e._descriptors,u=r[t];Y(u)&&o.isScriptable(t)&&(u=function(e,t,n,r){var a=n._proxy,i=n._context,o=n._subProxy,u=n._stack;if(u.has(e))throw new Error("Recursion detected: "+Array.from(u).join("->")+"->"+e);u.add(e),t=t(i,o||r),u.delete(e),P(t)&&(t=Ut(a._scopes,a,e,t));return t}(t,u,e,n));C(u)&&u.length&&(u=function(e,t,n,r){var a=n._proxy,i=n._context,o=n._subProxy,u=n._descriptors;if($(i.index)&&r(e))t=t[i.index%t.length];else if(P(t[0])){var l=t,s=a._scopes.filter((function(e){return e!==l}));t=[];var c,f=Object(y.a)(l);try{for(f.s();!(c=f.n()).done;){var d=Ut(s,a,e,c.value);t.push(Lt(d,i,o&&o[e],u))}}catch(h){f.e(h)}finally{f.f()}}return t}(t,u,e,o.isIndexable));zt(t,u)&&(u=Lt(u,a,i&&i[t],o));return u}(e,t,n)}))},getOwnPropertyDescriptor:function(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e)},has:function(t,n){return Reflect.has(e,n)},ownKeys:function(){return Reflect.ownKeys(e)},set:function(t,n,r){return e[n]=r,delete t[n],!0}})}function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},n=e._scriptable,r=void 0===n?t.scriptable:n,a=e._indexable,i=void 0===a?t.indexable:a,o=e._allKeys,u=void 0===o?t.allKeys:o;return{allKeys:u,scriptable:r,indexable:i,isScriptable:Y(r)?r:function(){return r},isIndexable:Y(i)?i:function(){return i}}}var It=function(e,t){return e?e+H(t):t},zt=function(e,t){return P(t)&&"adapters"!==e};function Nt(e,t,n){var r=e[t];return $(r)||(r=n(),$(r)&&(e[t]=r)),r}function Vt(e,t,n){return Y(e)?e(t,n):e}var Wt=function(e,t){return!0===e?t:"string"===typeof e?U(t,e):void 0};function Bt(e,t,n,r){var a,i=Object(y.a)(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,u=Wt(n,o);if(u){e.add(u);var l=Vt(u._fallback,n,u);if($(l)&&l!==n&&l!==r)return l}else if(!1===u&&$(r)&&n!==r)return null}}catch(s){i.e(s)}finally{i.f()}return!1}function Ut(e,t,n,r){var a=t._rootScopes,o=Vt(t._fallback,n,r),u=[].concat(Object(i.a)(e),Object(i.a)(a)),l=new Set;l.add(r);var s=Ht(l,u,n,o||n);return null!==s&&((!$(o)||o===n||null!==(s=Ht(l,u,o,s)))&&Rt(Array.from(l),[""],a,o,(function(){return function(e,t,n){var r=e._getTarget();t in r||(r[t]={});var a=r[t];if(C(a)&&P(n))return n;return a}(t,n,r)})))}function Ht(e,t,n,r){for(;n;)n=Bt(e,t,n,r);return n}function $t(e,t,n,r){var a,i,o=Object(y.a)(t);try{for(o.s();!(i=o.n()).done;){var u=i.value;if(a=Yt(It(u,e),n),$(a))return zt(e,a)?Ut(n,r,e,a):a}}catch(l){o.e(l)}finally{o.f()}}function Yt(e,t){var n,r=Object(y.a)(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a){var i=a[e];if($(i))return i}}}catch(o){r.e(o)}finally{r.f()}}function Kt(e){var t=e._keys;return t||(t=e._keys=function(e){var t,n=new Set,r=Object(y.a)(e);try{for(r.s();!(t=r.n()).done;){var a,i=t.value,o=Object(y.a)(Object.keys(i).filter((function(e){return!e.startsWith("_")})));try{for(o.s();!(a=o.n()).done;){var u=a.value;n.add(u)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){r.e(l)}finally{r.f()}return Array.from(n)}(e._scopes)),t}var qt=Number.EPSILON||1e-14,Qt=function(e,t){return t2&&void 0!==arguments[2]?arguments[2]:"x",o=Xt(i),u=e.length,l=Qt(e,0),s=0;s1&&void 0!==arguments[1]?arguments[1]:"x",i=Xt(a),o=e.length,u=Array(o).fill(0),l=Array(o),s=Qt(e,0);for(t=0;t0||t>0)&&(!n||!n.shadowRoot)}(u,l,a.target))n=u,r=l;else{var c=t.getBoundingClientRect();n=o.clientX-c.left,r=o.clientY-c.top,s=!0}return{x:n,y:r,box:s}}(e,n),s=l.x,c=l.y,f=l.box,d=o.left+(f&&u.left),h=o.top+(f&&u.top),p=t.width,v=t.height;return i&&(p-=o.width+u.width,v-=o.height+u.height),{x:Math.round((s-d)/p*n.width/r),y:Math.round((c-h)/v*n.height/r)}}var cn=function(e){return Math.round(10*e)/10};function fn(e,t,n,r){var a=on(e),i=ln(a,"margin"),o=an(a.maxWidth,e,"clientWidth")||X,u=an(a.maxHeight,e,"clientHeight")||X,l=function(e,t,n){var r,a;if(void 0===t||void 0===n){var i=rn(e);if(i){var o=i.getBoundingClientRect(),u=on(i),l=ln(u,"border","width"),s=ln(u,"padding");t=o.width-s.width-l.width,n=o.height-s.height-l.height,r=an(u.maxWidth,i,"clientWidth"),a=an(u.maxHeight,i,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||X,maxHeight:a||X}}(e,t,n),s=l.width,c=l.height;if("content-box"===a.boxSizing){var f=ln(a,"border","width"),d=ln(a,"padding");s-=d.width+f.width,c-=d.height+f.height}return s=Math.max(0,s-i.width),c=Math.max(0,r?Math.floor(s/r):c-i.height),s=cn(Math.min(s,o,l.maxWidth)),c=cn(Math.min(c,u,l.maxHeight)),s&&!c&&(c=cn(s/2)),{width:s,height:c}}function dn(e,t,n){var r=t||1,a=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=a/r,e.width=i/r;var o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height="".concat(e.height,"px"),o.style.width="".concat(e.width,"px")),(e.currentDevicePixelRatio!==r||o.height!==a||o.width!==i)&&(e.currentDevicePixelRatio=r,o.height=a,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0)}var hn=function(){var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(n){}return e}();function pn(e,t){var n=function(e,t){return on(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function vn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function yn(e,t,n,r){var a={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},o=vn(e,a,n),u=vn(a,i,n),l=vn(i,t,n),s=vn(o,u,n),c=vn(u,l,n);return vn(s,c,n)}var mn=new Map;function bn(e,t,n){return function(e,t){t=t||{};var n=e+JSON.stringify(t),r=mn.get(n);return r||(r=new Intl.NumberFormat(e,t),mn.set(n,r)),r}(t,n).format(e)}function xn(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}}function kn(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function _n(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function wn(e){return"angle"===e?{between:he,compare:fe,normalize:de}:{between:function(e,t,n){return e>=Math.min(t,n)&&e<=Math.max(n,t)},compare:function(e,t){return e-t},normalize:function(e){return e}}}function Sn(e){var t=e.start,n=e.end,r=e.count;return{start:t%r,end:n%r,loop:e.loop&&(n-t+1)%r===0,style:e.style}}function On(e,t,n){if(!n)return[e];for(var r,a,i,o=n.property,u=n.start,l=n.end,s=t.length,c=wn(o),f=c.compare,d=c.between,h=c.normalize,p=function(e,t,n){var r,a,i=n.property,o=n.start,u=n.end,l=wn(i),s=l.between,c=l.normalize,f=t.length,d=e.start,h=e.end,p=e.loop;if(p){for(d+=f,h+=f,r=0,a=f;r0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=this,n=0;t._charts.forEach((function(r,a){if(r.running&&r.items.length){for(var i,o=r.items,u=o.length-1,l=!1;u>=0;--u)(i=o[u])._active?(i._total>r.duration&&(r.duration=i._total),i.tick(e),l=!0):(o[u]=o[o.length-1],o.pop());l&&(a.draw(),t._notify(a,r,e,"progress")),o.length||(r.running=!1,t._notify(a,r,e,"complete"),r.initial=!1),n+=o.length}})),t._lastDate=e,0===n&&(t._running=!1)}},{key:"_getAnims",value:function(e){var t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}},{key:"listen",value:function(e,t,n){this._getAnims(e).listeners[t].push(n)}},{key:"add",value:function(e,t){var n;t&&t.length&&(n=this._getAnims(e).items).push.apply(n,Object(i.a)(t))}},{key:"has",value:function(e){return this._getAnims(e).items.length>0}},{key:"start",value:function(e){var t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((function(e,t){return Math.max(e,t._duration)}),0),this._refresh())}},{key:"running",value:function(e){if(!this._running)return!1;var t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}},{key:"stop",value:function(e){var t=this._charts.get(e);if(t&&t.items.length){for(var n=t.items,r=n.length-1;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}}},{key:"remove",value:function(e){return this._charts.delete(e)}}]),e}()),Tn="transparent",An={boolean:function(e,t,n){return n>.5?t:e},color:function(e,t,n){var r=Ze(e||Tn),a=r.valid&&Ze(t||Tn);return a&&a.valid?a.mix(r,n).hexString():t},number:function(e,t,n){return e+(t-e)*n}},Dn=function(){function e(t,n,r,a){Object(m.a)(this,e);var i=n[r];a=Ct([t.to,a,i,t.from]);var o=Ct([t.from,i,a]);this._active=!0,this._fn=t.fn||An[t.type||typeof o],this._easing=me[t.easing]||me.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=a,this._promises=void 0}return Object(b.a)(e,[{key:"active",value:function(){return this._active}},{key:"update",value:function(e,t,n){var r=this;if(r._active){r._notify(!1);var a=r._target[r._prop],i=n-r._start,o=r._duration-i;r._start=n,r._duration=Math.floor(Math.max(o,e.duration)),r._total+=i,r._loop=!!e.loop,r._to=Ct([e.to,t,a,e.from]),r._from=Ct([e.from,a,t])}}},{key:"cancel",value:function(){var e=this;e._active&&(e.tick(Date.now()),e._active=!1,e._notify(!1))}},{key:"tick",value:function(e){var t,n=this,r=e-n._start,a=n._duration,i=n._prop,o=n._from,u=n._loop,l=n._to;if(n._active=o!==l&&(u||r1?2-t:t,t=n._easing(Math.min(1,Math.max(0,t))),n._target[i]=n._fn(o,l,t))}},{key:"wait",value:function(){var e=this._promises||(this._promises=[]);return new Promise((function(t,n){e.push({res:t,rej:n})}))}},{key:"_notify",value:function(e){for(var t=e?"res":"rej",n=this._promises||[],r=0;r=0;--n){var s=u[n];if("$"!==s.charAt(0))if("options"!==s){var c=t[s],f=o[s],d=r.get(s);if(f){if(d&&f.active()){f.update(d,c,l);continue}f.cancel()}d&&d.duration?(o[s]=f=new Dn(d,e,s,c),a.push(f)):e[s]=c}else a.push.apply(a,Object(i.a)(this._animateOptions(e,t)))}return a}},{key:"update",value:function(e,t){if(0!==this._properties.size){var n=this._createAnimations(e,t);return n.length?(jn.add(this._chart,n),!0):void 0}Object.assign(e,t)}}]),e}();function Fn(e,t){var n=e&&e.options||{},r=n.reverse,a=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:a,end:r?a:i}}function In(e,t){var n,r,a=[],i=e._getSortedDatasetMetas(t);for(n=0,r=i.length;n0||!n&&o<0)return i.index}}catch(u){a.e(u)}finally{a.f()}return null}function Bn(e,t){for(var n,r=e.chart,a=e._cachedMeta,i=r._stacks||(r._stacks={}),o=a.iScale,u=a.vScale,l=a.index,s=o.axis,c=u.axis,f=function(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}(o,u,a),d=t.length,h=0;h0&&o._parsed[e-1];if(!1===i._parsing)o._parsed=u,o._sorted=!0,a=u;else{a=C(u[e])?i.parseArrayData(o,u,e,t):P(u[e])?i.parseObjectData(o,u,e,t):i.parsePrimitiveData(o,u,e,t);for(n=0;ni||g=0;--n)if(!y()){o.updateRangeFromParsed(h,e,a,d);break}return h}},{key:"getAllParsedValues",value:function(e){var t,n,r,a=this._cachedMeta._parsed,i=[];for(t=0,n=a.length;t=0&&e1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,r=this,a="active"===t,i=r._cachedDataOpts,o=e+"-"+t,u=i[o],l=r.enableOptionSharing&&$(n);if(u)return Yn(u,l);var s=r.chart.config,c=s.datasetElementScopeKeys(r._type,e),f=a?["".concat(e,"Hover"),"hover",e,""]:[e,""],d=s.getOptionScopes(r.getDataset(),c),h=Object.keys(at.elements[e]),p=function(){return r.getContext(n,a)},v=s.resolveNamedOptions(d,h,p,f);return v.$shared&&(v.$shared=l,i[o]=Object.freeze(Yn(v,l))),v}},{key:"_resolveAnimations",value:function(e,t,n){var r,a=this,i=a.chart,o=a._cachedDataOpts,u="animation-".concat(t),l=o[u];if(l)return l;if(!1!==i.options.animation){var s=a.chart.config,c=s.datasetAnimationScopeKeys(a._type,t),f=s.getOptionScopes(a.getDataset(),c);r=s.createResolver(f,a.getContext(e,n,t))}var d=new Ln(i,r&&r.animations);return r&&r._cacheable&&(o[u]=Object.freeze(d)),d}},{key:"getSharedOptions",value:function(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}},{key:"includeOptions",value:function(e,t){return!t||$n(e)||this.chart._animationsDisabled}},{key:"updateElement",value:function(e,t,n,r){$n(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}},{key:"updateSharedOptions",value:function(e,t,n){e&&!$n(t)&&this._resolveAnimations(void 0,t).update(e,n)}},{key:"_setStyle",value:function(e,t,n,r){e.active=r;var a=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(a)||a})}},{key:"removeHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!1)}},{key:"setHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}},{key:"_resyncElements",value:function(e){var t,n=this,r=n._data,a=n._cachedMeta.data,i=Object(y.a)(n._syncList);try{for(i.s();!(t=i.n()).done;){var o=Object(v.a)(t.value,3),u=o[0],l=o[1],s=o[2];n[u](l,s)}}catch(h){i.e(h)}finally{i.f()}n._syncList=[];var c=a.length,f=r.length,d=Math.min(f,c);d&&n.parse(0,d),f>c?n._insertElements(c,f-c,e):f2&&void 0!==arguments[2])||arguments[2],a=this,i=a._cachedMeta,o=i.data,u=e+t,l=function(e){for(e.length+=t,n=e.length-1;n>=u;n--)e[n]=e[n-t]};for(l(o),n=e;nMath.abs(u)&&(l=u,s=o),t[n.axis]=s,t._custom={barStart:l,barEnd:s,start:a,end:i,min:o,max:u}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Xn(e,t,n,r){var a,i,o,u,l=e.iScale,s=e.vScale,c=l.getLabels(),f=l===s,d=[];for(a=n,i=n+r;ae.x,n="left",r="right"):(t=e.base=n?1:-1)}(n,i,c)*s,p===c&&(m-=n/2),t=m+n),m===i.getPixelForValue(c)){var b=ne(n)*i.getLineWidthForValue(c)/2;m+=b,n-=b}return{size:n,base:m,head:t,center:t+n/2}}},{key:"_calculateBarIndexPixels",value:function(e,t){var n,r,a=this,i=t.scale,o=a.options,u=o.skipNull,l=T(o.maxBarThickness,1/0);if(t.grouped){var s=u?a._getStackCount(e):t.stackCount,c="flex"===o.barThickness?function(e,t,n,r){var a=t.pixels,i=a[e],o=e>0?a[e-1]:null,u=e=0;--a)r=Math.max(r,t[a].size()/2,n[a]._custom);return r>0&&r}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=t.xScale,r=t.yScale,a=this.getParsed(e),i=n.getLabelForValue(a.x),o=r.getLabelForValue(a.y),u=a._custom;return{label:t.label,value:"("+i+", "+o+(u?", "+u:"")+")"}}},{key:"update",value:function(e){var t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}},{key:"updateElements",value:function(e,t,n,r){for(var a=this,i="reset"===r,o=a._cachedMeta,u=o.iScale,l=o.vScale,s=a.resolveDataElementOptions(t,r),c=a.getSharedOptions(s),f=a.includeOptions(r,c),d=u.axis,h=l.axis,p=t;p0&&!isNaN(e)?q*(Math.abs(e)/t):0}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],a=bn(t._parsed[e],n.options.locale);return{label:r[e]||"",value:a}}},{key:"getMaxBorderWidth",value:function(e){var t,n,r,a,i,o=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t0&&a.getParsed(t-1),b=t;b0&&k[h]-m[h]>g,_.parsed=k,d&&(_.options=f||a.resolveDataElementOptions(b,x.active?"active":r)),y||a.updateElement(x,b,_,r),m=k}a.updateSharedOptions(f,r,c)}},{key:"getMaxOverflow",value:function(){var e=this,t=e._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,a=t.data||[];if(!a.length)return r;var i=a[0].size(e.resolveDataElementOptions(0)),o=a[a.length-1].size(e.resolveDataElementOptions(a.length-1));return Math.max(r,i,o)/2}},{key:"draw",value:function(){var e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),s(l(n.prototype),"draw",this).call(this)}}]),n}(Kn);ar.id="line",ar.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},ar.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var ir=function(e){f(n,e);var t=p(n);function n(e,r){var a;return Object(m.a)(this,n),(a=t.call(this,e,r)).innerRadius=void 0,a.outerRadius=void 0,a}return Object(b.a)(n,[{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],a=bn(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:a}}},{key:"update",value:function(e){var t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}},{key:"_updateRadius",value:function(){var e=this,t=e.chart,n=t.chartArea,r=t.options,a=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(a/2,0),o=(i-Math.max(r.cutoutPercentage?i/100*r.cutoutPercentage:1,0))/t.getVisibleDatasetCount();e.outerRadius=i-o*e.index,e.innerRadius=e.outerRadius-o}},{key:"updateElements",value:function(e,t,n,r){var a,i=this,o="reset"===r,u=i.chart,l=i.getDataset(),s=u.options.animation,c=i._cachedMeta.rScale,f=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*K,p=h,v=360/i.countVisibleElements();for(a=0;a0){var u=o[0].datasetIndex,l=e.getDatasetMeta(u).data;o=[];for(var s=0;s1){var o=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(o<1e-4||o>1e15)&&(r="scientific"),i=function(e,t){var n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}var u=te(Math.abs(i)),l=Math.max(Math.min(-1*Math.floor(u),20),0),s={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(s,this.options.ticks.format),bn(e,a,s)},logarithmic:function(e,t,n){if(0===e)return"0";var r=e/Math.pow(10,Math.floor(te(e)));return 1===r||2===r||5===r?Zr.numeric.call(this,e,t,n):""}};var Jr={formatters:Zr};function ea(e,t){var n=e.options.ticks,r=n.maxTicksLimit||function(e){var t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}(e),a=n.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;tr)return function(e,t,n,r){var a,i=0,o=n[0];for(r=Math.ceil(r),a=0;aa)return l}return Math.max(a,1)}(a,t,r);if(i>0){var c,f,d=i>1?Math.round((u-o)/(i-1)):null;for(ta(t,l,s,E(d)?0:o-d,o),c=0,f=i-1;cu+l)))return s}function ia(e){return e.drawTicks?e.tickLength:0}function oa(e,t){if(!e.display)return 0;var n=Et(e.font,t),r=Ot(e.padding);return(C(e.text)?e.text.length:1)*n.lineHeight+r.height}function ua(e,t,n){var r=_(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=function(e){return"left"===e?"right":"right"===e?"left":e}(r)),r}var la=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this)).id=e.id,r.type=e.type,r.options=void 0,r.ctx=e.ctx,r.chart=e.chart,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r._margins={left:0,right:0,top:0,bottom:0},r.maxWidth=void 0,r.maxHeight=void 0,r.paddingTop=void 0,r.paddingBottom=void 0,r.paddingLeft=void 0,r.paddingRight=void 0,r.axis=void 0,r.labelRotation=void 0,r.min=void 0,r.max=void 0,r._range=void 0,r.ticks=[],r._gridLineItems=null,r._labelItems=null,r._labelSizes=null,r._length=0,r._maxLength=0,r._longestTextCache={},r._startPixel=void 0,r._endPixel=void 0,r._reversePixels=!1,r._userMax=void 0,r._userMin=void 0,r._suggestedMax=void 0,r._suggestedMin=void 0,r._ticksLength=0,r._borderValue=0,r._cache={},r._dataLimitsCached=!1,r.$context=void 0,r}return Object(b.a)(n,[{key:"init",value:function(e){var t=this;t.options=e.setContext(t.getContext()),t.axis=e.axis,t._userMin=t.parse(e.min),t._userMax=t.parse(e.max),t._suggestedMin=t.parse(e.suggestedMin),t._suggestedMax=t.parse(e.suggestedMax)}},{key:"parse",value:function(e,t){return e}},{key:"getUserBounds",value:function(){var e=this._userMin,t=this._userMax,n=this._suggestedMin,r=this._suggestedMax;return e=j(e,Number.POSITIVE_INFINITY),t=j(t,Number.NEGATIVE_INFINITY),n=j(n,Number.POSITIVE_INFINITY),r=j(r,Number.NEGATIVE_INFINITY),{min:j(e,n),max:j(t,r),minDefined:M(e),maxDefined:M(t)}}},{key:"getMinMax",value:function(e){var t,n=this,r=n.getUserBounds(),a=r.min,i=r.max,o=r.minDefined,u=r.maxDefined;if(o&&u)return{min:a,max:i};for(var l=n.getMatchingVisibleMetas(),s=0,c=l.length;s=l||o<=1||!r.isHorizontal())r.labelRotation=u;else{var c=r._getLabelSizes(),f=c.widest.width,d=c.highest.height,h=pe(r.chart.width-f,0,r.maxWidth);f+6>(e=a.offset?r.maxWidth/o:h/(o-1))&&(e=h/(o-(a.offset?.5:1)),t=r.maxHeight-ia(a.grid)-i.padding-oa(a.title,r.chart.options.font),n=Math.sqrt(f*f+d*d),s=le(Math.min(Math.asin(pe((c.highest.height+6)/e,-1,1)),Math.asin(pe(t/n,-1,1))-Math.asin(pe(d/n,-1,1)))),s=Math.max(u,Math.min(l,s))),r.labelRotation=s}}},{key:"afterCalculateLabelRotation",value:function(){D(this.options.afterCalculateLabelRotation,[this])}},{key:"beforeFit",value:function(){D(this.options.beforeFit,[this])}},{key:"fit",value:function(){var e=this,t={width:0,height:0},n=e.chart,r=e.options,a=r.ticks,i=r.title,o=r.grid,u=e._isVisible(),l=e.isHorizontal();if(u){var s=oa(i,n.options.font);if(l?(t.width=e.maxWidth,t.height=ia(o)+s):(t.height=e.maxHeight,t.width=ia(o)+s),a.display&&e.ticks.length){var c=e._getLabelSizes(),f=c.first,d=c.last,h=c.widest,p=c.highest,v=2*a.padding,g=ue(e.labelRotation),y=Math.cos(g),m=Math.sin(g);if(l){var b=a.mirror?0:m*h.width+y*p.height;t.height=Math.min(e.maxHeight,t.height+b+v)}else{var x=a.mirror?0:y*h.width+m*p.height;t.width=Math.min(e.maxWidth,t.width+x+v)}e._calculatePadding(f,d,m,y)}}e._handleMargins(),l?(e.width=e._length=n.width-e._margins.left-e._margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e._margins.top-e._margins.bottom)}},{key:"_calculatePadding",value:function(e,t,n,r){var a=this,i=a.options,o=i.ticks,u=o.align,l=o.padding,s=i.position,c=0!==a.labelRotation,f="top"!==s&&"x"===a.axis;if(a.isHorizontal()){var d=a.getPixelForTick(0)-a.left,h=a.right-a.getPixelForTick(a.ticks.length-1),p=0,v=0;c?f?(p=r*e.width,v=n*t.height):(p=n*e.height,v=r*t.width):"start"===u?v=t.width:"end"===u?p=e.width:(p=e.width/2,v=t.width/2),a.paddingLeft=Math.max((p-d+l)*a.width/(a.width-d),0),a.paddingRight=Math.max((v-h+l)*a.width/(a.width-h),0)}else{var g=t.height/2,y=e.height/2;"start"===u?(g=0,y=e.height):"end"===u&&(g=t.height,y=0),a.paddingTop=g+l,a.paddingBottom=y+l}}},{key:"_handleMargins",value:function(){var e=this;e._margins&&(e._margins.left=Math.max(e.paddingLeft,e._margins.left),e._margins.top=Math.max(e.paddingTop,e._margins.top),e._margins.right=Math.max(e.paddingRight,e._margins.right),e._margins.bottom=Math.max(e.paddingBottom,e._margins.bottom))}},{key:"afterFit",value:function(){D(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var e=this.options,t=e.axis,n=e.position;return"top"===n||"bottom"===n||"x"===t}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(e){var t,n,r=this;for(r.beforeTickToLabelConversion(),r.generateTickLabels(e),t=0,n=e.length;tt){for(n=0;nt.length-1?null:this.getPixelForValue(t[e].value)}},{key:"getPixelForDecimal",value:function(e){var t=this;t._reversePixels&&(e=1-e);var n=t._startPixel+e*t._length;return pe(t._alignToPixels?ut(t.chart,n,0):n,-32768,32767)}},{key:"getDecimalForPixel",value:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var e=this.min,t=this.max;return e<0&&t<0?t:e>0&&t>0?e:0}},{key:"getContext",value:function(e){var t,n,r=this,a=r.ticks||[];if(e>=0&&eu*a?u/r:l/a:l*a0}},{key:"_computeGridLineItems",value:function(e){var t,n,r,a,i,o,u,l,s,c,f,d,h=this,p=h.axis,v=h.chart,g=h.options,y=g.grid,m=g.position,b=y.offset,x=h.isHorizontal(),k=h.ticks.length+(b?1:0),_=ia(y),w=[],S=y.setContext(h.getContext()),O=S.drawBorder?S.borderWidth:0,E=O/2,C=function(e){return ut(v,e,O)};if("top"===m)t=C(h.bottom),o=h.bottom-_,l=t-E,c=C(e.top)+E,d=e.bottom;else if("bottom"===m)t=C(h.top),c=e.top,d=C(e.bottom)-E,o=t+E,l=h.top+_;else if("left"===m)t=C(h.right),i=h.right-_,u=t-E,s=C(e.left)+E,f=e.right;else if("right"===m)t=C(h.left),s=e.left,f=C(e.right)-E,i=t+E,u=h.left+_;else if("x"===p){if("center"===m)t=C((e.top+e.bottom)/2+.5);else if(P(m)){var M=Object.keys(m)[0],j=m[M];t=C(h.chart.scales[M].getPixelForValue(j))}c=e.top,d=e.bottom,l=(o=t+E)+_}else if("y"===p){if("center"===m)t=C((e.left+e.right)/2);else if(P(m)){var A=Object.keys(m)[0],D=m[A];t=C(h.chart.scales[A].getPixelForValue(D))}u=(i=t-E)-_,s=e.left,f=e.right}var R=T(g.ticks.maxTicksLimit,k),L=Math.max(1,Math.ceil(k/R));for(n=0;n=0?n.setContext(t.getContext(r)).lineWidth:0}},{key:"drawGrid",value:function(e){var t,n,r=this,a=r.options.grid,i=r.ctx,o=r._gridLineItems||(r._gridLineItems=r._computeGridLineItems(e)),u=function(e,t,n){n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(a.display)for(t=0,n=o.length;t3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},i=wa(this._resolverCache,e,r),o=i.resolver,u=i.subPrefixes,l=o;if(Sa(o,t)){a.$shared=!1,n=Y(n)?n():n;var s=this.createResolver(e,n,u);l=Lt(o,n,s)}var c,f=Object(y.a)(t);try{for(f.s();!(c=f.n()).done;){var d=c.value;a[d]=l[d]}}catch(h){f.e(h)}finally{f.f()}return a}},{key:"createResolver",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0,a=wa(this._resolverCache,e,n),i=a.resolver;return P(t)?Lt(i,t,void 0,r):i}}]),e}();function wa(e,t,n){var r=e.get(t);r||(r=new Map,e.set(t,r));var a=n.join(),i=r.get(a);i||(i={resolver:Rt(t,n),subPrefixes:n.filter((function(e){return!e.toLowerCase().includes("hover")}))},r.set(a,i));return i}function Sa(e,t){var n,r=Ft(e),a=r.isScriptable,i=r.isIndexable,o=Object(y.a)(t);try{for(o.s();!(n=o.n()).done;){var u=n.value;if(a(u)&&Y(e[u])||i(u)&&C(e[u]))return!0}}catch(l){o.e(l)}finally{o.f()}return!1}var Oa=["top","bottom","left","right","chartArea"];function Ea(e,t){return"top"===e||"bottom"===e||-1===Oa.indexOf(e)&&"x"===t}function Ca(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Pa(e){var t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),D(n&&n.onComplete,[e],t)}function Ma(e){var t=e.chart,n=t.options.animation;D(n&&n.onProgress,[e],t)}function ja(e){return nn()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var Ta={},Aa=function(e){var t=ja(e);return Object.values(Ta).filter((function(e){return e.canvas===t})).pop()},Da=function(){function e(t,n){var r=this;Object(m.a)(this,e);var a=this,i=this.config=new _a(n),o=ja(t),u=Aa(o);if(u)throw new Error("Canvas is already in use. Chart with ID '"+u.id+"' must be destroyed before the canvas can be reused.");var l=i.createResolver(i.chartOptionScopes(),a.getContext());this.platform=new(i.platform||function(e){return!nn()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Ir:Xr}(o));var s=a.platform.acquireContext(o,l.aspectRatio),c=s&&s.canvas,f=c&&c.height,d=c&&c.width;this.id=O(),this.ctx=s,this.canvas=c,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.scale=void 0,this._plugins=new fa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){var n;return function(){return t?(clearTimeout(n),n=setTimeout(e,t)):e(),t}}((function(){return r.update("resize")}),l.resizeDelay||0),Ta[a.id]=a,s&&c?(jn.listen(a,"complete",Pa),jn.listen(a,"progress",Ma),a._initialize(),a.attached&&a.update()):console.error("Failed to create chart: can't acquire context from the given item")}return Object(b.a)(e,[{key:"aspectRatio",get:function(){var e=this.options,t=e.aspectRatio,n=e.maintainAspectRatio,r=this.width,a=this.height,i=this._aspectRatio;return E(t)?n&&i?i:a?r/a:null:t}},{key:"data",get:function(){return this.config.data},set:function(e){this.config.data=e}},{key:"options",get:function(){return this._options},set:function(e){this.config.options=e}},{key:"_initialize",value:function(){var e=this;return e.notifyPlugins("beforeInit"),e.options.responsive?e.resize():dn(e,e.options.devicePixelRatio),e.bindEvents(),e.notifyPlugins("afterInit"),e}},{key:"clear",value:function(){return lt(this.canvas,this.ctx),this}},{key:"stop",value:function(){return jn.stop(this),this}},{key:"resize",value:function(e,t){jn.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}},{key:"_resize",value:function(e,t){var n=this,r=n.options,a=n.canvas,i=r.maintainAspectRatio&&n.aspectRatio,o=n.platform.getMaximumSize(a,e,t,i),u=r.devicePixelRatio||n.platform.getDevicePixelRatio();n.width=o.width,n.height=o.height,n._aspectRatio=n.aspectRatio,dn(n,u,!0)&&(n.notifyPlugins("resize",{size:o}),D(r.onResize,[n,o],n),n.attached&&n._doResize()&&n.render())}},{key:"ensureScalesHaveIDs",value:function(){R(this.options.scales||{},(function(e,t){e.id=t}))}},{key:"buildOrUpdateScales",value:function(){var e=this,t=e.options,n=t.scales,r=e.scales,a=Object.keys(r).reduce((function(e,t){return e[t]=!1,e}),{}),i=[];n&&(i=i.concat(Object.keys(n).map((function(e){var t=n[e],r=va(e,t),a="r"===r,i="x"===r;return{options:t,dposition:a?"chartArea":i?"bottom":"left",dtype:a?"radialLinear":i?"category":"linear"}})))),R(i,(function(n){var i=n.options,o=i.id,u=va(o,i),l=T(i.type,n.dtype);void 0!==i.position&&Ea(i.position,u)===Ea(n.dposition)||(i.position=n.dposition),a[o]=!0;var s=null;o in r&&r[o].type===l?s=r[o]:(s=new(ca.getScale(l))({id:o,type:l,ctx:e.ctx,chart:e}),r[s.id]=s);s.init(i,t)})),R(a,(function(e,t){e||delete r[t]})),R(r,(function(t){Rr(e,t,t.options),Ar(e,t)}))}},{key:"_updateMetasets",value:function(){var e=this,t=e._metasets,n=e.data.datasets.length,r=t.length;if(t.sort((function(e,t){return e.index-t.index})),r>n){for(var a=n;an.length&&delete e._stacks,t.forEach((function(t,r){0===n.filter((function(e){return e===t._dataset})).length&&e._destroyDatasetMeta(r)}))}},{key:"buildOrUpdateControllers",value:function(){var e,t,n=this,r=[],a=n.data.datasets;for(n._removeUnreferencedMetasets(),e=0,t=a.length;e=0;--n)e._drawDataset(t[n]);e.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(e){var t=this,n=t.ctx,r=e._clip,a=!r.disabled,i=t.chartArea,o={meta:e,index:e.index,cancelable:!0};!1!==t.notifyPlugins("beforeDatasetDraw",o)&&(a&&ft(n,{left:!1===r.left?0:i.left-r.left,right:!1===r.right?t.width:i.right+r.right,top:!1===r.top?0:i.top-r.top,bottom:!1===r.bottom?t.height:i.bottom+r.bottom}),e.controller.draw(),a&&dt(n),o.cancelable=!1,t.notifyPlugins("afterDatasetDraw",o))}},{key:"getElementsAtEventForMode",value:function(e,t,n,r){var a=br.modes[t];return"function"===typeof a?a(this,e,n,r):[]}},{key:"getDatasetMeta",value:function(e){var t=this.data.datasets[e],n=this._metasets,r=n.filter((function(e){return e&&e._dataset===t})).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}},{key:"getContext",value:function(){return this.$context||(this.$context={chart:this,type:"chart"})}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(e){var t=this.data.datasets[e];if(!t)return!1;var n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}},{key:"setDatasetVisibility",value:function(e,t){this.getDatasetMeta(e).hidden=!t}},{key:"toggleDataVisibility",value:function(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}},{key:"getDataVisibility",value:function(e){return!this._hiddenIndices[e]}},{key:"_updateVisibility",value:function(e,t,n){var r=this,a=n?"show":"hide",i=r.getDatasetMeta(e),o=i.controller._resolveAnimations(void 0,a);$(t)?(i.data[t].hidden=!n,r.update()):(r.setDatasetVisibility(e,n),o.update(i,{visible:n}),r.update((function(t){return t.datasetIndex===e?a:void 0})))}},{key:"hide",value:function(e,t){this._updateVisibility(e,t,!1)}},{key:"show",value:function(e,t){this._updateVisibility(e,t,!0)}},{key:"_destroyDatasetMeta",value:function(e){var t=this,n=t._metasets&&t._metasets[e];n&&n.controller&&(n.controller._destroy(),delete t._metasets[e])}},{key:"destroy",value:function(){var e,t,n=this,r=n.canvas,a=n.ctx;for(n.stop(),jn.remove(n),e=0,t=n.data.datasets.length;ea?(s=a/l,e.arc(i,o,l,n+s,r-s,!0)):e.arc(i,o,a,n+Z,r-Z),e.closePath(),e.clip()}function Ia(e,t,n,r){var a=_t(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),i=(n-t)/2,o=Math.min(i,r*t/2),u=function(e){var t=(n-Math.min(i,e))*r/2;return pe(e,0,Math.min(i,t))};return{outerStart:u(a.outerStart),outerEnd:u(a.outerEnd),innerStart:pe(a.innerStart,0,o),innerEnd:pe(a.innerEnd,0,o)}}function za(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Na(e,t,n,r,a){var i=t.x,o=t.y,u=t.startAngle,l=t.pixelMargin,s=t.innerRadius,c=Math.max(t.outerRadius+r+n-l,0),f=s>0?s+r+n+l:0,d=0,h=a-u;if(r){var p=((s>0?s-r:0)+(c>0?c-r:0))/2;d=(h-(0!==p?h*p/(p+r):h))/2}var v=(h-Math.max(.001,h*c-n/K)/c)/2,g=u+v+d,y=a-v-d,m=Ia(t,f,c,y-g),b=m.outerStart,x=m.outerEnd,k=m.innerStart,_=m.innerEnd,w=c-b,S=c-x,O=g+b/w,E=y-x/S,C=f+k,P=f+_,M=g+k/C,j=y-_/P;if(e.beginPath(),e.arc(i,o,c,O,E),x>0){var T=za(S,E,i,o);e.arc(T.x,T.y,x,E,y+Z)}var A=za(P,y,i,o);if(e.lineTo(A.x,A.y),_>0){var D=za(P,j,i,o);e.arc(D.x,D.y,_,y+Z,j+Math.PI)}if(e.arc(i,o,f,y-_/f,g+k/f,!0),k>0){var R=za(C,M,i,o);e.arc(R.x,R.y,k,M+Math.PI,g-Z)}var L=za(w,g,i,o);if(e.lineTo(L.x,L.y),b>0){var F=za(w,O,i,o);e.arc(F.x,F.y,b,g-Z,O)}e.closePath()}function Va(e,t,n,r,a){var i=t.options,o="inner"===i.borderAlign;i.borderWidth&&(o?(e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),t.fullCircles&&function(e,t,n){var r,a=t.x,i=t.y,o=t.startAngle,u=t.pixelMargin,l=t.fullCircles,s=Math.max(t.outerRadius-u,0),c=t.innerRadius+u;for(n&&Fa(e,t,o+q),e.beginPath(),e.arc(a,i,c,o+q,o,!0),r=0;r=q||he(a,u,l))&&(i>=s+d&&i<=c+d)}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),n=t.x,r=t.y,a=t.startAngle,i=t.endAngle,o=t.innerRadius,u=t.outerRadius,l=this.options,s=l.offset,c=(a+i)/2,f=(o+u+l.spacing+s)/2;return{x:n+Math.cos(c)*f,y:r+Math.sin(c)*f}}},{key:"tooltipPosition",value:function(e){return this.getCenterPoint(e)}},{key:"draw",value:function(e){var t=this,n=t.options,r=t.circumference,a=(n.offset||0)/2,i=(n.spacing||0)/2;if(t.pixelMargin="inner"===n.borderAlign?.33:0,t.fullCircles=r>q?Math.floor(r/q):0,!(0===r||t.innerRadius<0||t.outerRadius<0)){e.save();var o=0;if(a){o=a/2;var u=(t.startAngle+t.endAngle)/2;e.translate(Math.cos(u)*o,Math.sin(u)*o),t.circumference>=K&&(o=a)}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;var l=function(e,t,n,r){var a=t.fullCircles,i=t.startAngle,o=t.circumference,u=t.endAngle;if(a){Na(e,t,n,r,i+q);for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=T(n.borderCapStyle,t.borderCapStyle),e.setLineDash(T(n.borderDash,t.borderDash)),e.lineDashOffset=T(n.borderDashOffset,t.borderDashOffset),e.lineJoin=T(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=T(n.borderWidth,t.borderWidth),e.strokeStyle=T(n.borderColor,t.borderColor)}function Ua(e,t,n){e.lineTo(n.x,n.y)}function Ha(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.length,a=n.start,i=void 0===a?0:a,o=n.end,u=void 0===o?r-1:o,l=t.start,s=t.end,c=Math.max(i,l),f=Math.min(u,s),d=is&&u>s;return{count:r,start:c,loop:t.loop,ilen:fl&&(l=S),b=(x*b+w)/++x):(_(),e.lineTo(w,S),o=O,x=0,u=l=S),s=S}_()}function Ka(e){var t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?Ya:$a}Wa.id="arc",Wa.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Wa.defaultRoutes={backgroundColor:"backgroundColor"};var qa="function"===typeof Path2D;function Qa(e,t,n,r){qa&&1===t.segments.length?function(e,t,n,r){var a=t._path;a||(a=t._path=new Path2D,t.path(a,n,r)&&a.closePath()),Ba(e,t.options),e.stroke(a)}(e,t,n,r):function(e,t,n,r){var a,i=t.segments,o=t.options,u=Ka(t),l=Object(y.a)(i);try{for(l.s();!(a=l.n()).done;){var s=a.value;Ba(e,o,s.style),e.beginPath(),u(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}}catch(c){l.e(c)}finally{l.f()}}(e,t,n,r)}var Xa=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this)).animated=!0,r.options=void 0,r._loop=void 0,r._fullLoop=void 0,r._path=void 0,r._points=void 0,r._segments=void 0,r._decimated=!1,r._pointsUpdated=!1,r._datasetIndex=void 0,e&&Object.assign(u(r),e),r}return Object(b.a)(n,[{key:"updateControlPoints",value:function(e,t){var n=this,r=n.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!n._pointsUpdated){var a=r.spanGaps?n._loop:n._fullLoop;tn(n._points,r,e,a,t),n._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(e){var t=this;t._points=e,delete t._segments,delete t._path,t._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(e,t){var n=e.points,r=e.options.spanGaps,a=n.length;if(!a)return[];var i=!!e._loop,o=function(e,t,n,r){var a=0,i=t-1;if(n&&!r)for(;aa&&e[i%t].skip;)i--;return{start:a,end:i%=t}}(n,a,i,r),u=o.start,l=o.end;return Cn(e,!0===r?[{start:u,end:l,loop:i}]:function(e,t,n,r){var a,i=e.length,o=[],u=t,l=e[t];for(a=t+1;a<=n;++a){var s=e[a%i];s.skip||s.stop?l.skip||(r=!1,o.push({start:t%i,end:(a-1)%i,loop:r}),t=u=s.stop?a:null):(u=a,l.skip&&(t=a)),l=s}return null!==u&&o.push({start:t%i,end:u%i,loop:r}),o}(n,u,l=o.left&&t<=o.right)&&(i||n>=o.top&&n<=o.bottom)}function ri(e,t){e.rect(t.x,t.y,t.w,t.h)}function ai(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.x!==n.x?-t:0,a=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+i,h:e.h+o,radius:e.radius}}Za.id="point",Za.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Za.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var ii=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this)).options=void 0,r.horizontal=void 0,r.base=void 0,r.width=void 0,r.height=void 0,e&&Object.assign(u(r),e),r}return Object(b.a)(n,[{key:"draw",value:function(e){var t,n=this.options,r=ti(this),a=r.inner,i=r.outer,o=(t=i.radius).topLeft||t.topRight||t.bottomLeft||t.bottomRight?mt:ri,u=.33;e.save(),i.w===a.w&&i.h===a.h||(e.beginPath(),o(e,ai(i,u,a)),e.clip(),o(e,ai(a,-.33,i)),e.fillStyle=n.borderColor,e.fill("evenodd")),e.beginPath(),o(e,ai(a,u,i)),e.fillStyle=n.backgroundColor,e.fill(),e.restore()}},{key:"inRange",value:function(e,t,n){return ni(this,e,t,n)}},{key:"inXRange",value:function(e,t){return ni(this,e,null,t)}},{key:"inYRange",value:function(e,t){return ni(this,null,e,t)}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y","base","horizontal"],e),n=t.x,r=t.y,a=t.base,i=t.horizontal;return{x:i?(n+a)/2:n,y:i?r:(r+a)/2}}},{key:"getRange",value:function(e){return"x"===e?this.width/2:this.height/2}}]),n}(Gr);ii.id="bar",ii.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},ii.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var oi=Object.freeze({__proto__:null,ArcElement:Wa,LineElement:Xa,PointElement:Za,BarElement:ii});function ui(e){if(e._decimated){var t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function li(e){e.data.datasets.forEach((function(e){ui(e)}))}var si={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(e,t,n){if(n.enabled){var r=e.width;e.data.datasets.forEach((function(t,a){var i=t._data,u=t.indexAxis,l=e.getDatasetMeta(a),s=i||t.data;if("y"!==Ct([u,e.options.indexAxis])&&"line"===l.type){var c=e.scales[l.xAxisID];if(("linear"===c.type||"time"===c.type)&&!e.options.parsing){var f=function(e,t){var n=t.length,r=0,a=e.iScale,i=a.getUserBounds(),o=i.min,u=i.max,l=i.minDefined,s=i.maxDefined;return l&&(r=pe(Mt(t,a.axis,o).lo,0,n-1)),{start:r,count:s?pe(Mt(t,a.axis,u).hi+1,r,n)-r:n-r}}(l,s),d=f.start,h=f.count;if(h<=(n.threshold||4*r))ui(t);else{var p;switch(E(i)&&(t._data=s,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}})),n.algorithm){case"lttb":p=function(e,t,n,r,a){var i=a.samples||r;if(i>=n)return e.slice(t,t+n);var o,u,l,s,c,f=[],d=(n-2)/(i-2),h=0,p=t+n-1,v=t;for(f[h++]=e[v],o=0;ol&&(l=s,u=e[m],c=m);f[h++]=u,v=c}return f[h++]=e[p],f}(s,d,h,r,n);break;case"min-max":p=function(e,t,n,r){var a,i,u,l,s,c,f,d,h,p,v=0,g=0,y=[],m=t+n-1,b=e[t].x,x=e[m].x-b;for(a=t;ap&&(p=l,f=a),v=(g*v+i.x)/++g;else{var _=a-1;if(!E(c)&&!E(f)){var w=Math.min(c,f),S=Math.max(c,f);w!==d&&w!==_&&y.push(Object(o.a)(Object(o.a)({},e[w]),{},{x:v})),S!==d&&S!==_&&y.push(Object(o.a)(Object(o.a)({},e[S]),{},{x:v}))}a>0&&_!==d&&y.push(e[_]),y.push(i),s=k,g=0,h=p=l,c=f=d=a}}return y}(s,d,h,r);break;default:throw new Error("Unsupported decimation algorithm '".concat(n.algorithm,"'"))}t._decimated=p}}}}))}else li(e)},destroy:function(e){li(e)}};function ci(e,t,n){var r=function(e){var t=e.options,n=t.fill,r=T(n&&n.target,n);return void 0===r&&(r=!!t.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}(e);if(P(r))return!isNaN(r.value)&&r;var a=parseFloat(r);return M(a)&&Math.floor(a)===a?("-"!==r[0]&&"+"!==r[0]||(a=t+a),!(a===t||a<0||a>=n)&&a):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}var fi=function(){function e(t){Object(m.a)(this,e),this.x=t.x,this.y=t.y,this.radius=t.radius}return Object(b.a)(e,[{key:"pathSegment",value:function(e,t,n){var r=this.x,a=this.y,i=this.radius;return t=t||{start:0,end:q},e.arc(r,a,i,t.end,t.start,!0),!n.bounds}},{key:"interpolate",value:function(e){var t=this.x,n=this.y,r=this.radius,a=e.angle;return{x:t+Math.cos(a)*r,y:n+Math.sin(a)*r,angle:a}}}]),e}();function di(e){return(e.scale||{}).getPointPositionForValue?function(e){var t,n,r,a=e.scale,i=e.fill,o=a.options,u=a.getLabels().length,l=[],s=o.reverse?a.max:a.min,c=o.reverse?a.min:a.max;if(r="start"===i?s:"end"===i?c:P(i)?i.value:a.getBaseValue(),o.grid.circular)return n=a.getPointPositionForValue(0,s),new fi({x:n.x,y:n.y,radius:a.getDistanceFromCenterForValue(r)});for(t=0;te;t--){var r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function pi(e){var t=e.chart,n=e.scale,r=e.index,a=e.line,i=[],o=a.segments,u=a.points,l=function(e,t){for(var n=[],r=e.getSortedVisibleDatasetMetas(),a=0;a=f&&a<=d){u=a===f,l=a===d;break}}return{first:u,last:l,point:r}}function mi(e,t){var n=[],r=!1;return C(e)?(r=!0,n=e):n=function(e,t){var n=e||{},r=n.x,a=void 0===r?null:r,i=n.y,o=void 0===i?null:i,u=t.points,l=[];return t.segments.forEach((function(e){var t=e.start,n=e.end;n=hi(t,n,u);var r=u[t],i=u[n];null!==o?(l.push({x:r.x,y:o}),l.push({x:i.x,y:o})):null!==a&&(l.push({x:a,y:r.y}),l.push({x:a,y:i.y}))})),l}(e,t),n.length?new Xa({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function bi(e,t,n){var r,a=e[t].fill,i=[t];if(!n)return a;for(;!1!==a&&-1===i.indexOf(a);){if(!M(a))return a;if(!(r=e[a]))return!1;if(r.visible)return a;i.push(a),a=r.fill}return!1}function xi(e,t,n){e.beginPath(),t.path(e),e.lineTo(t.last().x,n),e.lineTo(t.first().x,n),e.closePath(),e.clip()}function ki(e,t,n,r){if(!r){var a=t[e],i=n[e];return"angle"===e&&(a=de(a),i=de(i)),{property:e,start:a,end:i}}}function _i(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function wi(e,t,n){var r=t.chart.chartArea,a=r.top,i=r.bottom,o=n||{},u=o.property,l=o.start,s=o.end;"x"===u&&(e.beginPath(),e.rect(l,a,s-l,i-a),e.clip())}function Si(e,t,n,r){var a=t.interpolate(n,r);a&&e.lineTo(a.x,a.y)}function Oi(e,t){var n,r=t.line,a=t.target,i=t.property,o=t.color,u=t.scale,l=function(e,t,n){var r,a=e.segments,i=e.points,o=t.points,u=[],l=Object(y.a)(a);try{for(l.s();!(r=l.n()).done;){var s=r.value,c=s.start,f=s.end;f=hi(c,f,i);var d=ki(n,i[c],i[f],s.loop);if(t.segments){var h,p=En(t,d),v=Object(y.a)(p);try{for(v.s();!(h=v.n()).done;){var m,b=h.value,x=ki(n,o[b.start],o[b.end],b.loop),k=On(s,i,x),_=Object(y.a)(k);try{for(_.s();!(m=_.n()).done;){var w=m.value;u.push({source:w,target:b,start:Object(g.a)({},n,_i(d,x,"start",Math.max)),end:Object(g.a)({},n,_i(d,x,"end",Math.min))})}}catch(S){_.e(S)}finally{_.f()}}}catch(S){v.e(S)}finally{v.f()}}else u.push({source:s,target:d,start:i[c],end:i[f]})}}catch(S){l.e(S)}finally{l.f()}return u}(r,a,i),s=Object(y.a)(l);try{for(s.s();!(n=s.n()).done;){var c=n.value,f=c.source,d=c.target,h=c.start,p=c.end,v=f.style,m=(v=void 0===v?{}:v).backgroundColor,b=void 0===m?o:m,x=!0!==a;e.save(),e.fillStyle=b,wi(e,u,x&&ki(i,h,p)),e.beginPath();var k=!!r.pathSegment(e,f),_=void 0;if(x){k?e.closePath():Si(e,a,p,i);var w=!!a.pathSegment(e,d,{move:k,reverse:!0});(_=k&&w)||Si(e,a,h,i)}e.closePath(),e.fill(_?"evenodd":"nonzero"),e.restore()}}catch(S){s.e(S)}finally{s.f()}}function Ei(e,t,n){var r=function(e){var t=e.chart,n=e.fill,r=e.line;if(M(n))return function(e,t){var n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}(t,n);if("stack"===n)return pi(e);if("shape"===n)return!0;var a=di(e);return a instanceof fi?a:mi(a,r)}(t),a=t.line,i=t.scale,o=t.axis,u=a.options,l=u.fill,s=u.backgroundColor,c=l||{},f=c.above,d=void 0===f?s:f,h=c.below,p=void 0===h?s:h;r&&a.points.length&&(ft(e,n),function(e,t){var n=t.line,r=t.target,a=t.above,i=t.below,o=t.area,u=t.scale,l=n._loop?"angle":t.axis;e.save(),"x"===l&&i!==a&&(xi(e,r,o.top),Oi(e,{line:n,target:r,color:a,scale:u,property:l}),e.restore(),e.save(),xi(e,r,o.bottom)),Oi(e,{line:n,target:r,color:i,scale:u,property:l}),e.restore()}(e,{line:a,target:r,above:d,below:p,area:n,scale:i,axis:o}),dt(e))}var Ci={id:"filler",afterDatasetsUpdate:function(e,t,n){var r,a,i,o,u=(e.data.datasets||[]).length,l=[];for(a=0;a=0;--o){var u=a[o].$filler;u&&(u.line.updateControlPoints(i,u.axis),r&&Ei(e.ctx,u,i))}},beforeDatasetsDraw:function(e,t,n){if("beforeDatasetsDraw"===n.drawTime)for(var r=e.getSortedVisibleDatasetMetas(),a=r.length-1;a>=0;--a){var i=r[a].$filler;i&&Ei(e.ctx,i,e.chartArea)}},beforeDatasetDraw:function(e,t,n){var r=t.meta.$filler;r&&!1!==r.fill&&"beforeDatasetDraw"===n.drawTime&&Ei(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Pi=function(e,t){var n=e.boxHeight,r=void 0===n?t:n,a=e.boxWidth,i=void 0===a?t:a;return e.usePointStyle&&(r=Math.min(r,t),i=Math.min(i,t)),{boxWidth:i,boxHeight:r,itemHeight:Math.max(t,r)}},Mi=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this))._added=!1,r.legendHitBoxes=[],r._hoveredItem=null,r.doughnutMode=!1,r.chart=e.chart,r.options=e.options,r.ctx=e.ctx,r.legendItems=void 0,r.columnSizes=void 0,r.lineWidths=void 0,r.maxHeight=void 0,r.maxWidth=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.height=void 0,r.width=void 0,r._margins=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return Object(b.a)(n,[{key:"update",value:function(e,t,n){var r=this;r.maxWidth=e,r.maxHeight=t,r._margins=n,r.setDimensions(),r.buildLabels(),r.fit()}},{key:"setDimensions",value:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=e._margins.left,e.right=e.width):(e.height=e.maxHeight,e.top=e._margins.top,e.bottom=e.height)}},{key:"buildLabels",value:function(){var e=this,t=e.options.labels||{},n=D(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),t.sort&&(n=n.sort((function(n,r){return t.sort(n,r,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n}},{key:"fit",value:function(){var e=this,t=e.options,n=e.ctx;if(t.display){var r,a,i=t.labels,o=Et(i.font),u=o.size,l=e._computeTitleHeight(),s=Pi(i,u),c=s.boxWidth,f=s.itemHeight;n.font=o.string,e.isHorizontal()?(r=e.maxWidth,a=e._fitRows(l,u,c,f)+10):(a=e.maxHeight,r=e._fitCols(l,u,c,f)+10),e.width=Math.min(r,t.maxWidth||e.maxWidth),e.height=Math.min(a,t.maxHeight||e.maxHeight)}else e.width=e.height=0}},{key:"_fitRows",value:function(e,t,n,r){var a=this,i=a.ctx,o=a.maxWidth,u=a.options.labels.padding,l=a.legendHitBoxes=[],s=a.lineWidths=[0],c=r+u,f=e;i.textAlign="left",i.textBaseline="middle";var d=-1,h=-c;return a.legendItems.forEach((function(e,a){var p=n+t/2+i.measureText(e.text).width;(0===a||s[s.length-1]+p+2*u>o)&&(f+=c,s[s.length-(a>0?0:1)]=0,h+=c,d++),l[a]={left:0,top:h,row:d,width:p,height:r},s[s.length-1]+=p+u})),f}},{key:"_fitCols",value:function(e,t,n,r){var a=this,i=a.ctx,o=a.maxHeight,u=a.options.labels.padding,l=a.legendHitBoxes=[],s=a.columnSizes=[],c=o-e,f=u,d=0,h=0,p=0,v=0;return a.legendItems.forEach((function(e,a){var o=n+t/2+i.measureText(e.text).width;a>0&&h+r+2*u>c&&(f+=d+u,s.push({width:d,height:h}),p+=d+u,v++,d=h=0),l[a]={left:p,top:h,col:v,width:o,height:r},d=Math.max(d,o),h+=r+u})),f+=d,s.push({width:d,height:h}),f}},{key:"adjustHitBoxes",value:function(){var e=this;if(e.options.display){var t=e._computeTitleHeight(),n=e.legendHitBoxes,r=e.options,a=r.align,i=r.labels.padding,o=xn(r.rtl,e.left,e.width);if(this.isHorizontal()){var u,l=0,s=w(a,e.left+i,e.right-e.lineWidths[l]),c=Object(y.a)(n);try{for(c.s();!(u=c.n()).done;){var f=u.value;l!==f.row&&(l=f.row,s=w(a,e.left+i,e.right-e.lineWidths[l])),f.top+=e.top+t+i,f.left=o.leftForLtr(o.x(s),f.width),s+=f.width+i}}catch(m){c.e(m)}finally{c.f()}}else{var d,h=0,p=w(a,e.top+t+i,e.bottom-e.columnSizes[h].height),v=Object(y.a)(n);try{for(v.s();!(d=v.n()).done;){var g=d.value;g.col!==h&&(h=g.col,p=w(a,e.top+t+i,e.bottom-e.columnSizes[h].height)),g.top=p,g.left+=e.left+i,g.left=o.leftForLtr(o.x(g.left),g.width),p+=g.height+i}}catch(m){v.e(m)}finally{v.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){var e=this;if(e.options.display){var t=e.ctx;ft(t,e),e._draw(),dt(t)}}},{key:"_draw",value:function(){var e,t=this,n=t.options,r=t.columnSizes,a=t.lineWidths,i=t.ctx,o=n.align,u=n.labels,l=at.color,s=xn(n.rtl,t.left,t.width),c=Et(u.font),f=u.color,d=u.padding,h=c.size,p=h/2;t.drawTitle(),i.textAlign=s.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;var v=Pi(u,h),g=v.boxWidth,y=v.boxHeight,m=v.itemHeight,b=t.isHorizontal(),x=this._computeTitleHeight();e=b?{x:w(o,t.left+d,t.right-a[0]),y:t.top+d+x,line:0}:{x:t.left+d,y:w(o,t.top+x+d,t.bottom-r[0].height),line:0},kn(t.ctx,n.textDirection);var k=m+d;t.legendItems.forEach((function(v,_){i.strokeStyle=v.fontColor||f,i.fillStyle=v.fontColor||f;var S=i.measureText(v.text).width,O=s.textAlign(v.textAlign||(v.textAlign=u.textAlign)),E=g+p+S,C=e.x,P=e.y;s.setWidth(t.width),b?_>0&&C+E+d>t.right&&(P=e.y+=k,e.line++,C=e.x=w(o,t.left+d,t.right-a[e.line])):_>0&&P+k>t.bottom&&(C=e.x=C+r[e.line].width+d,e.line++,P=e.y=w(o,t.top+x+d,t.bottom-r[e.line].height)),function(e,t,n){if(!(isNaN(g)||g<=0||isNaN(y)||y<0)){i.save();var r=T(n.lineWidth,1);if(i.fillStyle=T(n.fillStyle,l),i.lineCap=T(n.lineCap,"butt"),i.lineDashOffset=T(n.lineDashOffset,0),i.lineJoin=T(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=T(n.strokeStyle,l),i.setLineDash(T(n.lineDash,[])),u.usePointStyle){var a={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},o=s.xPlus(e,g/2);st(i,a,o,t+p)}else{var c=t+Math.max((h-y)/2,0),f=s.leftForLtr(e,g),d=St(n.borderRadius);i.beginPath(),Object.values(d).some((function(e){return 0!==e}))?mt(i,{x:f,y:c,w:g,h:y,radius:d}):i.rect(f,c,g,y),i.fill(),0!==r&&i.stroke()}i.restore()}}(s.x(C),P,v),C=function(e,t,n,r){return e===(r?"left":"right")?n:"center"===e?(t+n)/2:t}(O,C+g+p,b?C+E:t.right,n.rtl),function(e,t,n){vt(i,n.text,e,t+m/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(C),P,v),b?e.x+=E+d:e.y+=k})),_n(t.ctx,n.textDirection)}},{key:"drawTitle",value:function(){var e=this,t=e.options,n=t.title,r=Et(n.font),a=Ot(n.padding);if(n.display){var o,u=xn(t.rtl,e.left,e.width),l=e.ctx,s=n.position,c=r.size/2,f=a.top+c,d=e.left,h=e.width;if(this.isHorizontal())h=Math.max.apply(Math,Object(i.a)(e.lineWidths)),o=e.top+f,d=w(t.align,d,e.right-h);else{var p=e.columnSizes.reduce((function(e,t){return Math.max(e,t.height)}),0);o=f+w(t.align,e.top,e.bottom-p-t.labels.padding-e._computeTitleHeight())}var v=w(s,d,d+h);l.textAlign=u.textAlign(_(s)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=r.string,vt(l,n.text,v,o,r)}}},{key:"_computeTitleHeight",value:function(){var e=this.options.title,t=Et(e.font),n=Ot(e.padding);return e.display?t.lineHeight+n.height:0}},{key:"_getLegendItemAt",value:function(e,t){var n,r,a,i=this;if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)for(a=i.legendHitBoxes,n=0;n=(r=a[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return i.legendItems[n];return null}},{key:"handleEvent",value:function(e){var t=this,n=t.options;if(function(e,t){if("mousemove"===e&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,n)){var r,a,i=t._getLegendItemAt(e.x,e.y);if("mousemove"===e.type){var o=t._hoveredItem,u=(a=i,null!==(r=o)&&null!==a&&r.datasetIndex===a.datasetIndex&&r.index===a.index);o&&!u&&D(n.onLeave,[e,o,t],t),t._hoveredItem=i,i&&!u&&D(n.onHover,[e,i,t],t)}else i&&D(n.onClick,[e,i,t],t)}}}]),n}(Gr);var ji={id:"legend",_element:Mi,start:function(e,t,n){var r=e.legend=new Mi({ctx:e.ctx,options:n,chart:e});Rr(e,r,n),Ar(e,r)},stop:function(e){Dr(e,e.legend),delete e.legend},beforeUpdate:function(e,t,n){var r=e.legend;Rr(e,r,n),r.options=n},afterUpdate:function(e){var t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent:function(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick:function(e,t,n){var r=t.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),t.hidden=!0):(a.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:function(e){return e.chart.options.color},boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.legend.options.labels,r=n.usePointStyle,a=n.pointStyle,i=n.textAlign,o=n.color;return e._getSortedDatasetMetas().map((function(e){var n=e.controller.getStyle(r?0:void 0),u=Ot(n.borderWidth);return{text:t[e.index].label,fillStyle:n.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:n.borderColor,pointStyle:a||n.pointStyle,rotation:n.rotation,textAlign:i||n.textAlign,borderRadius:0,datasetIndex:e.index}}),this)}},title:{color:function(e){return e.chart.options.color},display:!1,position:"center",text:""}},descriptors:{_scriptable:function(e){return!e.startsWith("on")},labels:{_scriptable:function(e){return!["generateLabels","filter","sort"].includes(e)}}}},Ti=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this)).chart=e.chart,r.options=e.options,r.ctx=e.ctx,r._padding=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return Object(b.a)(n,[{key:"update",value:function(e,t){var n=this,r=n.options;if(n.left=0,n.top=0,r.display){n.width=n.right=e,n.height=n.bottom=t;var a=C(r.text)?r.text.length:1;n._padding=Ot(r.padding);var i=a*Et(r.font).lineHeight+n._padding.height;n.isHorizontal()?n.height=i:n.width=i}else n.width=n.height=n.right=n.bottom=0}},{key:"isHorizontal",value:function(){var e=this.options.position;return"top"===e||"bottom"===e}},{key:"_drawArgs",value:function(e){var t,n,r,a=this.top,i=this.left,o=this.bottom,u=this.right,l=this.options,s=l.align,c=0;return this.isHorizontal()?(n=w(s,i,u),r=a+e,t=u-i):("left"===l.position?(n=i+e,r=w(s,o,a),c=-.5*K):(n=u-e,r=w(s,a,o),c=.5*K),t=o-a),{titleX:n,titleY:r,maxWidth:t,rotation:c}}},{key:"draw",value:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r=Et(n.font),a=r.lineHeight/2+e._padding.top,i=e._drawArgs(a),o=i.titleX,u=i.titleY,l=i.maxWidth,s=i.rotation;vt(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:s,textAlign:_(n.align),textBaseline:"middle",translation:[o,u]})}}}]),n}(Gr);var Ai={id:"title",_element:Ti,start:function(e,t,n){!function(e,t){var n=new Ti({ctx:e.ctx,options:t,chart:e});Rr(e,n,t),Ar(e,n),e.titleBlock=n}(e,n)},stop:function(e){var t=e.titleBlock;Dr(e,t),delete e.titleBlock},beforeUpdate:function(e,t,n){var r=e.titleBlock;Rr(e,r,n),r.options=n},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}},Di=new WeakMap,Ri={id:"subtitle",start:function(e,t,n){var r=new Ti({ctx:e.ctx,options:n,chart:e});Rr(e,r,n),Ar(e,r),Di.set(e,r)},stop:function(e){Dr(e,Di.get(e)),Di.delete(e)},beforeUpdate:function(e,t,n){var r=Di.get(e);Rr(e,r,n),r.options=n},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}},Li={average:function(e){if(!e.length)return!1;var t,n,r=0,a=0,i=0;for(t=0,n=e.length;t-1?e.split("\n"):e}function zi(e,t){var n=t.element,r=t.datasetIndex,a=t.index,i=e.getDatasetMeta(r).controller,o=i.getLabelAndValue(a),u=o.label,l=o.value;return{chart:e,label:u,parsed:i.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:l,dataset:i.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function Ni(e,t){var n=e._chart.ctx,r=e.body,a=e.footer,i=e.title,o=t.boxWidth,u=t.boxHeight,l=Et(t.bodyFont),s=Et(t.titleFont),c=Et(t.footerFont),f=i.length,d=a.length,h=r.length,p=Ot(t.padding),v=p.height,g=0,y=r.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);(y+=e.beforeBody.length+e.afterBody.length,f&&(v+=f*s.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),y)&&(v+=h*(t.displayColors?Math.max(u,l.lineHeight):l.lineHeight)+(y-h)*l.lineHeight+(y-1)*t.bodySpacing);d&&(v+=t.footerMarginTop+d*c.lineHeight+(d-1)*t.footerSpacing);var m=0,b=function(e){g=Math.max(g,n.measureText(e).width+m)};return n.save(),n.font=s.string,R(e.title,b),n.font=l.string,R(e.beforeBody.concat(e.afterBody),b),m=t.displayColors?o+2:0,R(r,(function(e){R(e.before,b),R(e.lines,b),R(e.after,b)})),m=0,n.font=c.string,R(e.footer,b),n.restore(),{width:g+=p.width,height:v}}function Vi(e,t,n,r){var a=n.x,i=n.width,o=e.width,u=e.chartArea,l=u.left,s=u.right,c="center";return"center"===r?c=a<=(l+s)/2?"left":"right":a<=i/2?c="left":a>=o-i/2&&(c="right"),function(e,t,n,r){var a=r.x,i=r.width,o=n.caretSize+n.caretPadding;return"left"===e&&a+i+o>t.width||"right"===e&&a-i-o<0||void 0}(c,e,t,n)&&(c="center"),c}function Wi(e,t,n){var r=t.yAlign||function(e,t){var n=t.y,r=t.height;return ne.height-r/2?"bottom":"center"}(e,n);return{xAlign:t.xAlign||Vi(e,t,n,r),yAlign:r}}function Bi(e,t,n,r){var a=e.caretSize,i=e.caretPadding,o=e.cornerRadius,u=n.xAlign,l=n.yAlign,s=a+i,c=o+i,f=function(e,t){var n=e.x,r=e.width;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,u),d=function(e,t,n){var r=e.y,a=e.height;return"top"===t?r+=n:r-="bottom"===t?a+n:a/2,r}(t,l,s);return"center"===l?"left"===u?f+=s:"right"===u&&(f-=s):"left"===u?f-=c:"right"===u&&(f+=c),{x:pe(f,0,r.width-t.width),y:pe(d,0,r.height-t.height)}}function Ui(e,t,n){var r=Ot(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function Hi(e){return Fi([],Ii(e))}function $i(e,t){var n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var Yi=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this)).opacity=0,r._active=[],r._chart=e._chart,r._eventPosition=void 0,r._size=void 0,r._cachedAnimations=void 0,r._tooltipItems=[],r.$animations=void 0,r.$context=void 0,r.options=e.options,r.dataPoints=void 0,r.title=void 0,r.beforeBody=void 0,r.body=void 0,r.afterBody=void 0,r.footer=void 0,r.xAlign=void 0,r.yAlign=void 0,r.x=void 0,r.y=void 0,r.height=void 0,r.width=void 0,r.caretX=void 0,r.caretY=void 0,r.labelColors=void 0,r.labelPointStyles=void 0,r.labelTextColors=void 0,r}return Object(b.a)(n,[{key:"initialize",value:function(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var e=this,t=e._cachedAnimations;if(t)return t;var n=e._chart,r=e.options.setContext(e.getContext()),a=r.enabled&&n.options.animation&&r.animations,i=new Ln(e._chart,a);return a._cacheable&&(e._cachedAnimations=Object.freeze(i)),i}},{key:"getContext",value:function(){var e,t,n,r=this;return r.$context||(r.$context=(e=r._chart.getContext(),t=r,n=r._tooltipItems,Object.assign(Object.create(e),{tooltip:t,tooltipItems:n,type:"tooltip"})))}},{key:"getTitle",value:function(e,t){var n=this,r=t.callbacks,a=r.beforeTitle.apply(n,[e]),i=r.title.apply(n,[e]),o=r.afterTitle.apply(n,[e]),u=[];return u=Fi(u,Ii(a)),u=Fi(u,Ii(i)),u=Fi(u,Ii(o))}},{key:"getBeforeBody",value:function(e,t){return Hi(t.callbacks.beforeBody.apply(this,[e]))}},{key:"getBody",value:function(e,t){var n=this,r=t.callbacks,a=[];return R(e,(function(e){var t={before:[],lines:[],after:[]},i=$i(r,e);Fi(t.before,Ii(i.beforeLabel.call(n,e))),Fi(t.lines,i.label.call(n,e)),Fi(t.after,Ii(i.afterLabel.call(n,e))),a.push(t)})),a}},{key:"getAfterBody",value:function(e,t){return Hi(t.callbacks.afterBody.apply(this,[e]))}},{key:"getFooter",value:function(e,t){var n=this,r=t.callbacks,a=r.beforeFooter.apply(n,[e]),i=r.footer.apply(n,[e]),o=r.afterFooter.apply(n,[e]),u=[];return u=Fi(u,Ii(a)),u=Fi(u,Ii(i)),u=Fi(u,Ii(o))}},{key:"_createItems",value:function(e){var t,n,r=this,a=r._active,i=r._chart.data,o=[],u=[],l=[],s=[];for(t=0,n=a.length;t0&&t.stroke()}},{key:"_updateAnimationTarget",value:function(e){var t=this,n=t._chart,r=t.$animations,a=r&&r.x,i=r&&r.y;if(a||i){var o=Li[e.position].call(t,t._active,t._eventPosition);if(!o)return;var u=t._size=Ni(t,e),l=Object.assign({},o,t._size),s=Wi(n,e,l),c=Bi(e,l,s,n);a._to===c.x&&i._to===c.y||(t.xAlign=s.xAlign,t.yAlign=s.yAlign,t.width=u.width,t.height=u.height,t.caretX=o.x,t.caretY=o.y,t._resolveAnimations().update(t,c))}}},{key:"draw",value:function(e){var t=this,n=t.options.setContext(t.getContext()),r=t.opacity;if(r){t._updateAnimationTarget(n);var a={width:t.width,height:t.height},i={x:t.x,y:t.y};r=Math.abs(r)<.001?0:r;var o=Ot(n.padding),u=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;n.enabled&&u&&(e.save(),e.globalAlpha=r,t.drawBackground(i,e,a,n),kn(e,n.textDirection),i.y+=o.top,t.drawTitle(i,e,n),t.drawBody(i,e,n),t.drawFooter(i,e,n),_n(e,n.textDirection),e.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(e,t){var n=this,r=n._active,a=e.map((function(e){var t=e.datasetIndex,r=e.index,a=n._chart.getDatasetMeta(t);if(!a)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:a.data[r],index:r}})),i=!L(r,a),o=n._positionChanged(a,t);(i||o)&&(n._active=a,n._eventPosition=t,n.update(!0))}},{key:"handleEvent",value:function(e,t){var n,r=this,a=r.options,i=r._active||[],o=[];"mouseout"!==e.type&&(o=r._chart.getElementsAtEventForMode(e,a.mode,a,t),a.reverse&&o.reverse());var u=r._positionChanged(o,e);return(n=t||!L(o,i)||u)&&(r._active=o,(a.enabled||a.external)&&(r._eventPosition={x:e.x,y:e.y},r.update(!0,t))),n}},{key:"_positionChanged",value:function(e,t){var n=this.caretX,r=this.caretY,a=this.options,i=Li[a.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}]),n}(Gr);Yi.positioners=Li;var Ki={id:"tooltip",_element:Yi,positioners:Li,afterInit:function(e,t,n){n&&(e.tooltip=new Yi({_chart:e,options:n}))},beforeUpdate:function(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset:function(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw:function(e){var t=e.tooltip,n={tooltip:t};!1!==e.notifyPlugins("beforeTooltipDraw",n)&&(t&&t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n))},afterEvent:function(e,t){if(e.tooltip){var n=t.replay;e.tooltip.handleEvent(t.event,n)&&(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:function(e,t){return t.bodyFont.size},boxWidth:function(e,t){return t.bodyFont.size},multiKeyBackground:"#fff",displayColors:!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:{beforeTitle:S,title:function(e){if(e.length>0){var t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex=0&&et.length-1?null:this.getPixelForValue(t[e].value)}},{key:"getValueForPixel",value:function(e){var t=this;return Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),n}(la);function Gi(e,t){var n,r,a,i,o=[],u=e.bounds,l=e.step,s=e.min,c=e.max,f=e.precision,d=e.count,h=e.maxTicks,p=e.maxDigits,v=e.includeBounds,g=l||1,y=h-1,m=t.min,b=t.max,x=!E(s),k=!E(c),_=!E(d),w=(b-m)/(p+1),S=re((b-m)/y/g)*g;if(S<1e-14&&!x&&!k)return[{value:m},{value:b}];(i=Math.ceil(b/S)-Math.floor(m/S))>y&&(S=re(i*S/y/g)*g),E(f)||(n=Math.pow(10,f),S=Math.ceil(S*n)/n),"ticks"===u?(r=Math.floor(m/S)*S,a=Math.ceil(b/S)*S):(r=m,a=b),x&&k&&l&&function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e}((c-s)/l,S/1e3)?(S=(c-s)/(i=Math.round(Math.min((c-s)/S,h))),r=s,a=c):_?S=((a=k?c:a)-(r=x?s:r))/(i=d-1):i=ie(i=(a-r)/S,Math.round(i),S/1e3)?Math.round(i):Math.ceil(i);var O=Math.max(se(S),se(r));n=Math.pow(10,E(f)?O:f),r=Math.round(r*n)/n,a=Math.round(a*n)/n;var C=0;for(x&&(v&&r!==s?(o.push({value:s}),r0&&c>0&&u(0)}if(i===o){var f=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(f=Math.abs(.05*o)),l(o+f),t||u(i-f)}e.min=i,e.max=o}},{key:"getTickLimit",value:function(){var e,t=this,n=t.options.ticks,r=n.maxTicksLimit,a=n.stepSize;return a?e=Math.ceil(t.max/a)-Math.floor(t.min/a)+1:(e=t.computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var e=this,t=e.options,n=t.ticks,r=e.getTickLimit(),a=Gi({maxTicks:r=Math.max(2,r),bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:e._maxDigits(),horizontal:e.isHorizontal(),minRotation:n.minRotation||0,includeBounds:!1!==n.includeBounds},e._range||e);return"ticks"===t.bounds&&oe(a,e,"value"),t.reverse?(a.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),a}},{key:"configure",value:function(){var e=this,t=e.ticks,r=e.min,a=e.max;if(s(l(n.prototype),"configure",this).call(this),e.options.offset&&t.length){var i=(a-r)/Math.max(t.length-1,1)/2;r-=i,a+=i}e._startValue=r,e._endValue=a,e._valueRange=a-r}},{key:"getLabelForValue",value:function(e){return bn(e,this.chart.options.locale)}}]),n}(la),eo=function(e){f(n,e);var t=p(n);function n(){return Object(m.a)(this,n),t.apply(this,arguments)}return Object(b.a)(n,[{key:"determineDataLimits",value:function(){var e=this,t=e.getMinMax(!0),n=t.min,r=t.max;e.min=M(n)?n:0,e.max=M(r)?r:1,e.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var e=this,t=e.isHorizontal(),n=t?e.width:e.height,r=ue(e.options.ticks.minRotation),a=(t?Math.sin(r):Math.cos(r))||.001,i=e._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/a))}},{key:"getPixelForValue",value:function(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}]),n}(Ji);function to(e){return 1===e/Math.pow(10,Math.floor(te(e)))}eo.id="linear",eo.defaults={ticks:{callback:Jr.formatters.numeric}};var no=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this,e)).start=void 0,r.end=void 0,r._startValue=void 0,r._valueRange=0,r}return Object(b.a)(n,[{key:"parse",value:function(e,t){var n=Ji.prototype.parse.apply(this,[e,t]);if(0!==n)return M(n)&&n>0?n:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var e=this,t=e.getMinMax(!0),n=t.min,r=t.max;e.min=M(n)?Math.max(0,n):null,e.max=M(r)?Math.max(0,r):null,e.options.beginAtZero&&(e._zero=!0),e.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var e=this,t=e.getUserBounds(),n=t.minDefined,r=t.maxDefined,a=e.min,i=e.max,o=function(e){return a=n?a:e},u=function(e){return i=r?i:e},l=function(e,t){return Math.pow(10,Math.floor(te(e))+t)};a===i&&(a<=0?(o(1),u(10)):(o(l(a,-1)),u(l(i,1)))),a<=0&&o(l(i,-1)),i<=0&&u(l(a,1)),e._zero&&e.min!==e._suggestedMin&&a===l(e.min,0)&&o(l(a,-1)),e.min=a,e.max=i}},{key:"buildTicks",value:function(){var e=this,t=e.options,n=function(e,t){var n=Math.floor(te(t.max)),r=Math.ceil(t.max/Math.pow(10,n)),a=[],i=j(e.min,Math.pow(10,Math.floor(te(t.min)))),o=Math.floor(te(i)),u=Math.floor(i/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{a.push({value:i,major:to(i)}),10===++u&&(u=1,l=++o>=0?1:l),i=Math.round(u*Math.pow(10,o)*l)/l}while(oa?{start:t-n,end:t}:{start:t,end:t+n}}function io(e){for(var t,n,r,a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},i={},o=[],u=[],l=e.getLabels().length,s=0;sa.r&&(a.r=g.end,i.r=p),y.starta.b&&(a.b=y.end,i.b=p)}e._setReductions(e.drawingArea,a,i),e._pointLabelItems=function(e,t,n){for(var r=[],a=e.getLabels().length,i=e.options,o=ro(i),u=e.getDistanceFromCenterForValue(i.ticks.reverse?e.min:e.max),l=0;l270||n<90)&&(e-=t),e}function so(e,t,n,r){var a=e.ctx;if(n)a.arc(e.xCenter,e.yCenter,t,0,q);else{var i=e.getPointPosition(0,t);a.moveTo(i.x,i.y);for(var o=1;o=0&&e=0;a--){var i=r.setContext(e.getPointLabelContext(a)),o=Et(i.font),u=e._pointLabelItems[a],l=u.x,s=u.y,c=u.textAlign,f=u.left,d=u.top,h=u.right,p=u.bottom,v=i.backdropColor;if(!E(v)){var g=Ot(i.backdropPadding);n.fillStyle=v,n.fillRect(f-g.left,d-g.top,h-f+g.width,p-d+g.height)}vt(n,e._pointLabels[a],l,s+o.lineHeight/2,o,{color:i.color,textAlign:c,textBaseline:"middle"})}}(r,l),u.display&&r.ticks.forEach((function(e,n){if(0!==n){t=r.getDistanceFromCenterForValue(e.value);var a=u.setContext(r.getContext(n-1));!function(e,t,n,r){var a=e.ctx,i=t.circular,o=t.color,u=t.lineWidth;!i&&!r||!o||!u||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=u,a.setLineDash(t.borderDash),a.lineDashOffset=t.borderDashOffset,a.beginPath(),so(e,n,i,r),a.closePath(),a.stroke(),a.restore())}(r,a,t,l)}})),o.display){for(a.save(),e=r.getLabels().length-1;e>=0;e--){var s=o.setContext(r.getPointLabelContext(e)),c=s.color,f=s.lineWidth;f&&c&&(a.lineWidth=f,a.strokeStyle=c,a.setLineDash(s.borderDash),a.lineDashOffset=s.borderDashOffset,t=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),a.beginPath(),a.moveTo(r.xCenter,r.yCenter),a.lineTo(n.x,n.y),a.stroke())}a.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var e=this,t=e.ctx,n=e.options,r=n.ticks;if(r.display){var a,i,o=e.getIndexAngle(0);t.save(),t.translate(e.xCenter,e.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",e.ticks.forEach((function(o,u){if(0!==u||n.reverse){var l=r.setContext(e.getContext(u)),s=Et(l.font);if(a=e.getDistanceFromCenterForValue(e.ticks[u].value),l.showLabelBackdrop){t.font=s.string,i=t.measureText(o.label).width,t.fillStyle=l.backdropColor;var c=Ot(l.backdropPadding);t.fillRect(-i/2-c.left,-a-s.size/2-c.top,i+c.width,s.size+c.height)}vt(t,o.label,0,-a,s,{color:l.color})}})),t.restore()}}},{key:"drawTitle",value:function(){}}]),n}(Ji);fo.id="radialLinear",fo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Jr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(e){return e},padding:5}},fo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},fo.descriptors={angleLines:{_fallback:"grid"}};var ho={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}},po=Object.keys(ho);function vo(e,t){return e-t}function go(e,t){if(E(t))return null;var n=e._adapter,r=e._parseOpts,a=r.parser,i=r.round,o=r.isoWeekday,u=t;return"function"===typeof a&&(u=a(u)),M(u)||(u="string"===typeof a?n.parse(u,a):n.parse(u)),null===u?null:(i&&(u="week"!==i||!ae(o)&&!0!==o?n.startOf(u,i):n.startOf(u,"isoWeek",o)),+u)}function yo(e,t,n,r){for(var a=po.length,i=po.indexOf(e);i=t?n[a]:n[i]]=!0}}else e[t]=!0}function bo(e,t,n){var r,a,i=[],o={},u=t.length;for(r=0;r=0&&(t[i].major=!0);return t}(e,i,o,n):i}var xo=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this,e))._cache={data:[],labels:[],all:[]},r._unit="day",r._majorUnit=void 0,r._offsets={},r._normalized=!1,r._parseOpts=void 0,r}return Object(b.a)(n,[{key:"init",value:function(e,t){var r=e.time||(e.time={}),a=this._adapter=new dr._date(e.adapters.date);V(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},s(l(n.prototype),"init",this).call(this,e),this._normalized=t.normalized}},{key:"parse",value:function(e,t){return void 0===e?null:go(this,e)}},{key:"beforeLayout",value:function(){s(l(n.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var e=this,t=e.options,n=e._adapter,r=t.time.unit||"day",a=e.getUserBounds(),i=a.min,o=a.max,u=a.minDefined,l=a.maxDefined;function s(e){u||isNaN(e.min)||(i=Math.min(i,e.min)),l||isNaN(e.max)||(o=Math.max(o,e.max))}u&&l||(s(e._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(e.getMinMax(!1))),i=M(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=M(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,e.min=Math.min(i,o-1),e.max=Math.max(i+1,o)}},{key:"_getLabelBounds",value:function(){var e=this.getLabelTimestamps(),t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}},{key:"buildTicks",value:function(){var e=this,t=e.options,n=t.time,r=t.ticks,a="labels"===r.source?e.getLabelTimestamps():e._generate();"ticks"===t.bounds&&a.length&&(e.min=e._userMin||a[0],e.max=e._userMax||a[a.length-1]);var i=e.min,o=function(e,t,n){for(var r=0,a=e.length;rr&&e[a-1]>n;)a--;return r>0||a=po.indexOf(n);i--){var o=po[i];if(ho[o].common&&e._adapter.diff(a,r,o)>=t-1)return o}return po[n?po.indexOf(n):0]}(e,o.length,n.minUnit,e.min,e.max)),e._majorUnit=r.major.enabled&&"year"!==e._unit?function(e){for(var t=po.indexOf(e)+1,n=po.length;t1e5*s)throw new Error(a+" and "+i+" are too far apart with stepSize of "+s+" "+l);var p="data"===o.ticks.source&&n.getDataTimestamps();for(e=h,t=0;e0?u:1}},{key:"getDataTimestamps",value:function(){var e,t,n=this,r=n._cache.data||[];if(r.length)return r;var a=n.getMatchingVisibleMetas();if(n._normalized&&a.length)return n._cache.data=a[0].controller.getAllParsedValues(n);for(e=0,t=a.length;e=e[u].pos&&t<=e[l].pos){var s=Mt(e,"pos",t);u=s.lo,l=s.hi}var c=e[u];r=c.pos,i=c.time;var f=e[l];a=f.pos,o=f.time}else{if(t>=e[u].time&&t<=e[l].time){var d=Mt(e,"time",t);u=d.lo,l=d.hi}var h=e[u];r=h.time,i=h.pos;var p=e[l];a=p.time,o=p.pos}var v=a-r;return v?i+(o-i)*(t-r)/v:i}xo.id="time",xo.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var _o=function(e){f(n,e);var t=p(n);function n(e){var r;return Object(m.a)(this,n),(r=t.call(this,e))._table=[],r._minPos=void 0,r._tableRange=void 0,r}return Object(b.a)(n,[{key:"initOffsets",value:function(){var e=this,t=e._getTimestampsForTable(),r=e._table=e.buildLookupTable(t);e._minPos=ko(r,e.min),e._tableRange=ko(r,e.max)-e._minPos,s(l(n.prototype),"initOffsets",this).call(this,t)}},{key:"buildLookupTable",value:function(e){var t,n,r,a,i,o=this.min,u=this.max,l=[],s=[];for(t=0,n=e.length;t=o&&a<=u&&l.push(a);if(l.length<2)return[{time:o,pos:0},{time:u,pos:1}];for(t=0,n=l.length;t=0||(a[n]=e[n]);return a}var Do=Object(r.forwardRef)((function(e,t){var n=e.id,i=e.className,o=e.height,u=void 0===o?150:o,l=e.width,s=void 0===l?300:l,c=e.redraw,f=void 0!==c&&c,d=e.type,h=e.data,p=e.options,v=void 0===p?{}:p,g=e.plugins,y=void 0===g?[]:g,m=e.getDatasetAtEvent,b=e.getElementAtEvent,x=e.getElementsAtEvent,k=e.fallbackContent,_=Ao(e,["id","className","height","width","redraw","type","data","options","plugins","getDatasetAtEvent","getElementAtEvent","getElementsAtEvent","fallbackContent"]),w=Object(r.useRef)(null),S=Object(r.useMemo)((function(){return"function"===typeof h?w.current?h(w.current):{}:Eo()({},h)}),[h,w.current]),O=Object(r.useState)(),E=O[0],C=O[1];Object(r.useImperativeHandle)(t,(function(){return E}),[E]);var P=function(){w.current&&C(new So(w.current,{type:d,data:S,options:v,plugins:y}))},M=function(){E&&E.destroy()};return Object(r.useEffect)((function(){return P(),function(){return M()}}),[]),Object(r.useEffect)((function(){f?(M(),setTimeout((function(){P()}),0)):function(){if(E){if(v&&(E.options=To({},v)),!E.config.data)return E.config.data=S,void E.update();var e=S.datasets,t=void 0===e?[]:e,n=Ao(S,["datasets"]),r=E.config.data.datasets,a=void 0===r?[]:r;Po()(E.config.data,n),E.config.data.datasets=t.map((function(e){var t=jo()(a,(function(t){return t.label===e.label&&t.type===e.type}));return t&&e.data?(t.data?t.data.length=e.data.length:t.data=[],Po()(t.data,e.data),To({},t,e,{data:t.data})):e})),E.update()}}()}),[e,S]),a.a.createElement("canvas",Object.assign({},_,{height:u,width:s,ref:w,id:n,className:i,onClick:function(e){E&&(m&&m(E.getElementsAtEventForMode(e,"dataset",{intersect:!0},!1),e),b&&b(E.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1),e),x&&x(E.getElementsAtEventForMode(e,"index",{intersect:!0},!1),e))},"data-testid":"canvas",role:"img"}),k)})),Ro=(Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"line",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"bar",ref:t,options:e.options||{}}))})));Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"radar",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"doughnut",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"polarArea",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"bubble",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"pie",ref:t,options:e.options||{}}))})),Object(r.forwardRef)((function(e,t){return a.a.createElement(Do,Object.assign({},e,{type:"scatter",ref:t,options:e.options||{}}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ae}));var r=n(4),a=n(5),i=n(9),o=n.n(i);function u(e,t,n,r,a,i,o){try{var u=e[i](o),l=u.value}catch(s){return void n(s)}u.done?t(l):Promise.resolve(l).then(r,a)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){u(i,r,a,o,l,"next",e)}function l(e){u(i,r,a,o,l,"throw",e)}o(void 0)}))}}var s=n(6),c=n(10),f=n(11),d=n(7),h=n(0),p=function(e){return"checkbox"===e.type},v=function(e){return e instanceof Date},g=function(e){return null==e},y=function(e){return"object"===typeof e},m=function(e){return!g(e)&&!Array.isArray(e)&&y(e)&&!v(e)},b=function(e){return e.substring(0,e.search(/.\d/))||e},x=function(e,t){return Object(d.a)(e).some((function(e){return b(t)===e}))},k=function(e){return e.filter(Boolean)},_=function(e){return void 0===e},w=function(e,t,n){if(m(e)&&t){var r=k(t.split(/[,[\].]+?/)).reduce((function(e,t){return g(e)?e:e[t]}),e);return _(r)||r===e?_(e[t])?n:e[t]:r}},S="blur",O="onBlur",E="onChange",C="onSubmit",P="onTouched",M="all",j="max",T="min",A="maxLength",D="minLength",R="pattern",L="required",F="validate",I=function(e,t){var n=Object.assign({},e);return delete n[t],n},z=h.createContext(null);z.displayName="RHFContext";var N=function(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return e?new Proxy(t,{get:function(e,t){if(t in e)return n.current[t]!==M&&(n.current[t]=!a||M),r&&(r.current[t]=!0),e[t]}}):t},V=function(e){return m(e)&&!Object.keys(e).length},W=function(e,t,n){var r=I(e,"name");return V(r)||Object.keys(r).length>=Object.keys(t).length||Object.keys(r).find((function(e){return t[e]===(!n||M)}))},B=function(e){return Array.isArray(e)?e:[e]},U="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document,H=U?"Proxy"in window:"undefined"!==typeof Proxy;var $=function(e,t,n,r,a){return t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),Object(c.a)({},r,a||!0))}):{}},Y=function(e){return/^\w*$/.test(e)},K=function(e){return k(e.replace(/["|']|\]/g,"").split(/\.|\[/))};function q(e,t,n){for(var r=-1,a=Y(t)?[t]:K(t),i=a.length,o=i-1;++r1&&void 0!==arguments[1]?arguments[1]:{};for(var r in t.current){var a=t.current[r];if(a&&!g(n)){var i=a._f,o=I(a,"_f");q(n,r,i&&i.ref?i.ref.disabled||i.refs&&i.refs.every((function(e){return e.disabled}))?void 0:i.value:Array.isArray(a)?[]:{}),o&&e({current:o},n[r])}}return n},G=function(e){return g(e)||!y(e)};function Z(e,t,n){if(G(e)||G(t)||v(e)||v(t))return e===t;if(!h.isValidElement(e)){var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var i=0,o=r;i0&&(n=e);++u1){var t=e.filter((function(e){return e&&e.checked&&!e.disabled})).map((function(e){return e.value}));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!_(e[0].attributes.value)?_(e[0].value)||""===e[0].value?le:{value:e[0].value,isValid:!0}:le:ue}return ue},ce=function(e,t){var n=t.valueAsNumber,r=t.valueAsDate,a=t.setValueAs;return _(e)?e:n?""===e?NaN:+e:r?new Date(e):a?a(e):e},fe={isValid:!1,value:null},de=function(e){return Array.isArray(e)?e.reduce((function(e,t){return t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e}),fe):fe};function he(e){if(e&&e._f){var t=e._f.ref;if(t.disabled)return;return ae(t)?t.files:oe(t)?de(e._f.refs).value:ie(t)?(n=t.options,Object(d.a)(n).filter((function(e){return e.selected})).map((function(e){return e.value}))):p(t)?se(e._f.refs).value:ce(_(t.value)?e._f.ref.value:t.value,e._f)}var n}var pe=function(e,t,n,r){var a,i={},o=Object(s.a)(e);try{for(o.s();!(a=o.n()).done;){var u=a.value,l=w(t,u);l&&q(i,u,l._f)}}catch(c){o.e(c)}finally{o.f()}return{criteriaMode:n,names:Object(d.a)(e),fields:i,shouldUseNativeValidation:r}},ve=function(e,t){return t&&e&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate)},ge=function(e){var t=e.isOnBlur,n=e.isOnChange,r=e.isOnTouch,a=e.isTouched,i=e.isReValidateOnBlur,o=e.isReValidateOnChange,u=e.isBlurEvent,l=e.isSubmitted;return!e.isOnAll&&(!l&&r?!(a||u):(l?i:t)?!u:!(l?o:n)||u)},ye=function(e){return"function"===typeof e},me=function(e){return"string"===typeof e},be=function(e){return me(e)||h.isValidElement(e)},xe=function(e){return e instanceof RegExp};function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(be(e)||Array.isArray(e)&&e.every(be)||ne(e)&&!e)return{type:n,message:be(e)?e:"",ref:t}}var _e=function(e){return m(e)&&!xe(e)?e:{value:e,message:""}},we=function(){var e=l(o.a.mark((function e(t,n,r){var a,i,u,l,s,c,f,d,h,v,y,b,x,k,_,w,S,O,E,C,P,M,I,z,N,W,B,U,H,Y,K,q,Q,X,G,Z,J,ee,te,re,ie,ue,le;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t._f,i=a.ref,u=a.refs,l=a.required,s=a.maxLength,c=a.minLength,f=a.min,d=a.max,h=a.pattern,v=a.validate,y=a.name,b=a.value,x=a.valueAsNumber,a.mount){e.next=3;break}return e.abrupt("return",{});case 3:if(k=u?u[0]:i,_=function(e){r&&k.reportValidity&&(k.setCustomValidity(ne(e)?"":e||" "),k.reportValidity())},w={},S=oe(i),O=p(i),E=S||O,C=(x||ae(i))&&!i.value||""===b||Array.isArray(b)&&!b.length,P=$.bind(null,y,n,w),M=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:D,o=e?t:n;w[y]=Object.assign({type:e?r:a,message:o,ref:i},P(e?r:a,o))},!l||!(!E&&(C||g(b))||ne(b)&&!b||O&&!se(u).isValid||S&&!de(u).isValid)){e.next=19;break}if(I=be(l)?{value:!!l,message:l}:_e(l),z=I.value,N=I.message,!z){e.next=19;break}if(w[y]=Object.assign({type:L,message:N,ref:k},P(L,N)),n){e.next=19;break}return _(N),e.abrupt("return",w);case 19:if(C||g(f)&&g(d)){e.next=28;break}if(U=_e(d),H=_e(f),isNaN(b)?(K=i.valueAsDate||new Date(b),me(U.value)&&(W=K>new Date(U.value)),me(H.value)&&(B=KU.value),g(H.value)||(B=Yq.value,G=!g(Q.value)&&b.length0&&void 0!==arguments[0]?arguments[0]:{},t=e.mode,n=void 0===t?C:t,r=e.reValidateMode,a=void 0===r?E:r,i=e.resolver,u=e.context,y=e.defaultValues,O=void 0===y?{}:y,P=e.shouldFocusError,j=void 0===P||P,T=e.delayError,A=e.shouldUseNativeValidation,D=e.shouldUnregister,R=e.criteriaMode,L=h.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}}),F=Object(f.a)(L,2),z=F[0],$=F[1],Y=h.useRef({isDirty:!H,dirtyFields:!H,touchedFields:!H,isValidating:!H,isValid:!H,errors:!H}),K=h.useRef(i),J=h.useRef(z),ee=h.useRef({}),ne=h.useRef(O),ue=h.useRef({}),le=h.useRef(u),se=h.useRef(!1),fe=h.useRef(!1),de=h.useRef(),be=h.useRef({watch:new je,control:new je,array:new je,state:new je}),xe=h.useRef({mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1}),ke=Oe(n),_e=R===M;K.current=i,le.current=u;var Pe=function(e){return xe.current.watchAll||xe.current.watch.has(e)||xe.current.watch.has((e.match(/\w+/)||[])[0])},Me=h.useCallback(function(){var e=l(o.a.mark((function e(t,n,r,a,u,l){var s,c,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=w(J.current.errors,n),!Y.current.isValid){e.next=12;break}if(!i){e.next=6;break}e.t1=u,e.next=9;break;case 6:return e.next=8,Ie(ee.current,!0);case 8:e.t1=e.sent;case 9:e.t0=e.t1,e.next=13;break;case 12:e.t0=!1;case 13:c=e.t0,r?q(J.current.errors,n,r):re(J.current.errors,n),!l&&(r?Z(s,r,!0):!s)&&V(a)&&J.current.isValid===c||t||(f=Object.assign(Object.assign({},a),{isValid:!!c,errors:J.current.errors,name:n}),J.current=Object.assign(Object.assign({},J.current),f),be.current.state.next(l?{name:n}:f)),be.current.state.next({isValidating:!1});case 17:case"end":return e.stop()}}),e)})));return function(t,n,r,a,i,o){return e.apply(this,arguments)}}(),[]),Ae=h.useCallback((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;a&&Ze(e);var i=w(ee.current,e);if(i){var o=i._f;if(o){var u=U&&Ee(o.ref)&&g(t)?"":t;if(o.value=ce(t,o),oe(o.ref)?(o.refs||[]).forEach((function(e){return e.checked=e.value===u})):ae(o.ref)&&!me(u)?o.ref.files=u:ie(o.ref)?Object(d.a)(o.ref.options).forEach((function(e){return e.selected=u.includes(e.value)})):p(o.ref)&&o.refs?o.refs.length>1?o.refs.forEach((function(e){return e.checked=Array.isArray(u)?!!u.find((function(t){return t===e.value})):u===e.value})):o.refs[0].checked=!!u:o.ref.value=u,r){var l=X(ee);q(l,e,t),be.current.control.next({values:Object.assign(Object.assign({},ne.current),l),name:e})}(n.shouldDirty||n.shouldTouch)&&Re(e,u,n.shouldTouch),n.shouldValidate&&ze(e)}else i._f={ref:{name:e,value:t},value:t}}}),[]),De=h.useCallback((function(e,t){var n=X(ee);return e&&t&&q(n,e,t),!Z(n,ne.current)}),[]),Re=h.useCallback((function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a={name:e},i=!1;if(Y.current.isDirty){var o=J.current.isDirty;J.current.isDirty=De(),a.isDirty=J.current.isDirty,i=o!==a.isDirty}if(Y.current.dirtyFields&&!n){var u=w(J.current.dirtyFields,e),l=!Z(w(ne.current,e),t);l?q(J.current.dirtyFields,e,!0):re(J.current.dirtyFields,e),a.dirtyFields=J.current.dirtyFields,i=i||u!==w(J.current.dirtyFields,e)}var s=w(J.current.touchedFields,e);return n&&!s&&(q(J.current.touchedFields,e,n),a.touchedFields=J.current.touchedFields,i=i||Y.current.touchedFields&&s!==n),i&&r&&be.current.state.next(a),i?a:{}}),[]),Le=h.useCallback(function(){var e=l(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,we(w(ee.current,t),_e,A);case 2:return e.t0=t,r=e.sent[e.t0],e.next=6,Me(n,t,r);case 6:return e.abrupt("return",_(r));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[_e]),Fe=h.useCallback(function(){var e=l(o.a.mark((function e(t){var n,r,a,i,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K.current(X(ee),le.current,pe(xe.current.mount,ee.current,R,A));case 2:if(n=e.sent,r=n.errors,t){a=Object(s.a)(t);try{for(a.s();!(i=a.n()).done;)u=i.value,(l=w(r,u))?q(J.current.errors,u,l):re(J.current.errors,u)}catch(o){a.e(o)}finally{a.f()}}else J.current.errors=r;return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[R,A]),Ie=function(){var e=l(o.a.mark((function e(t,n){var r,a,i,u,l,s,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=c.length>2&&void 0!==c[2]?c[2]:{valid:!0},e.t0=o.a.keys(t);case 2:if((e.t1=e.t0()).done){e.next=25;break}if(a=e.t1.value,!(i=t[a])){e.next=23;break}if(u=i._f,l=I(i,"_f"),!u){e.next=19;break}return e.next=11,we(i,_e,A);case 11:if(s=e.sent,!n){e.next=18;break}if(!s[u.name]){e.next=16;break}return r.valid=!1,e.abrupt("break",25);case 16:e.next=19;break;case 18:s[u.name]?q(J.current.errors,u.name,s[u.name]):re(J.current.errors,u.name);case 19:if(e.t2=l,!e.t2){e.next=23;break}return e.next=23,Ie(l,n,r);case 23:e.next=2;break;case 25:return e.abrupt("return",r.valid);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ze=h.useCallback(function(){var e=l(o.a.mark((function e(t){var n,r,a,u,s=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},r=B(t),be.current.state.next({isValidating:!0}),!i){e.next=10;break}return e.next=6,Fe(_(t)?t:r);case 6:u=e.sent,a=t?r.every((function(e){return!w(u,e)})):V(u),e.next=19;break;case 10:if(!t){e.next=16;break}return e.next=13,Promise.all(r.filter((function(e){return w(ee.current,e,{})._f})).map(function(){var e=l(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Le(t,!0);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 13:a=e.sent.every(Boolean),e.next=19;break;case 16:return e.next=18,Ie(ee.current);case 18:a=V(J.current.errors);case 19:return be.current.state.next(Object.assign(Object.assign({},me(t)?{name:t}:{}),{errors:J.current.errors,isValidating:!1})),n.shouldFocus&&!a&&Q(ee.current,(function(e){return w(J.current.errors,e)}),t?r:xe.current.mount),Y.current.isValid&&Ve(),e.abrupt("return",a);case 23:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[Fe,Le]),Ne=function(e,t){var n=w(ee.current,e);if(n){var r=_(n._f.value),a=r?_(w(ue.current,e))?w(ne.current,e):w(ue.current,e):n._f.value;_(a)?r&&(n._f.value=he(n)):t&&t.defaultChecked?n._f.value=he(n):Ae(e,a)}fe.current&&Y.current.isValid&&Ve()},Ve=h.useCallback(l(o.a.mark((function e(){var t,n,r=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{},!i){e.next=9;break}return e.t1=V,e.next=5,K.current(Object.assign(Object.assign({},X(ee)),t),le.current,pe(xe.current.mount,ee.current,R,A));case 5:e.t2=e.sent.errors,e.t0=(0,e.t1)(e.t2),e.next=12;break;case 9:return e.next=11,Ie(ee.current,!0);case 11:e.t0=e.sent;case 12:(n=e.t0)!==J.current.isValid&&(J.current.isValid=n,be.current.state.next({isValid:n}));case 14:case"end":return e.stop()}}),e)}))),[R,A]),We=h.useCallback((function(e,t,n){return Object.entries(t).forEach((function(t){var r=Object(f.a)(t,2),a=r[0],i=r[1],o="".concat(e,".").concat(a),u=w(ee.current,o);!xe.current.array.has(e)&&G(i)&&(!u||u._f)||v(i)?Ae(o,i,n,!0,!u):We(o,i,n)}))}),[ze]),Be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=w(ee.current,e),a=xe.current.array.has(e);a&&(be.current.array.next({values:t,name:e,isReset:!0}),(Y.current.isDirty||Y.current.dirtyFields)&&n.shouldDirty&&(q(J.current.dirtyFields,e,te(t,w(ne.current,e,[]),w(J.current.dirtyFields,e,[]))),be.current.state.next({name:e,dirtyFields:J.current.dirtyFields,isDirty:De(e,t)})),!t.length&&q(ee.current,e,[])&&q(ue.current,e,[])),(r&&!r._f||a)&&!g(t)?We(e,t,a?{}:n):Ae(e,t,n,!0,!r),Pe(e)&&be.current.state.next({}),be.current.watch.next({name:e,values:$e()})},Ue=function(){var e=l(o.a.mark((function e(t,n,r,a){var u,l,s,c,f,d,h,v;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=t.name,c=w(ee.current,s),!i){e.next=12;break}return e.next=5,K.current(X(ee),le.current,pe([s],ee.current,R,A));case 5:f=e.sent,d=f.errors,u=w(d,s),p(t)&&!u&&(h=b(s),(v=w(d,h,{})).type&&v.message&&(u=v),(v||w(J.current.errors,h))&&(s=h)),l=V(d),e.next=16;break;case 12:return e.next=14,we(c,_e,A);case 14:e.t0=s,u=e.sent[e.t0];case 16:!a&&be.current.watch.next({name:s,type:t.type,values:$e()}),Me(!1,s,u,n,l,r);case 18:case"end":return e.stop()}}),e)})));return function(t,n,r,a){return e.apply(this,arguments)}}(),He=h.useCallback(function(){var e=l(o.a.mark((function e(t){var n,r,u,l,s,c,f,d,h,p,v,g,y,m,b,x;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.type,r=t.target,u=t.target,l=u.value,s=u.name,c=u.type,!(f=w(ee.current,s))){e.next=17;break}if(d=c?he(f):void 0,d=_(d)?l:d,h=n===S,p=Oe(a),v=p.isOnBlur,g=p.isOnChange,y=!ve(f._f,f._f.mount)&&!i&&!w(J.current.errors,s)||ge(Object.assign({isBlurEvent:h,isTouched:!!w(J.current.touchedFields,s),isSubmitted:J.current.isSubmitted,isReValidateOnBlur:v,isReValidateOnChange:g},ke)),m=!h&&Pe(s),_(d)||(f._f.value=d),b=Re(s,f._f.value,h,!1),x=!V(b)||m,!y){e.next=15;break}return!h&&be.current.watch.next({name:s,type:n,values:$e()}),e.abrupt("return",x&&be.current.state.next(m?{name:s}:Object.assign(Object.assign({},b),{name:s})));case 15:be.current.state.next({isValidating:!0}),w(J.current.errors,s)||!T?Ue(r,b,m,h):(de.current=de.current||Se(Ue,T),de.current(r,b,m,h),m&&be.current.state.next({name:s}));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[]),$e=function(e){var t=Object.assign(Object.assign({},ne.current),X(ee));return _(e)?t:me(e)?w(t,e):e.map((function(e){return w(t,e)}))},Ye=function(e){e?B(e).forEach((function(e){return re(J.current.errors,e)})):J.current.errors={},be.current.state.next({errors:J.current.errors})},Ke=function(e,t,n){var r=((w(ee.current,e)||{_f:{}})._f||{}).ref;q(J.current.errors,e,Object.assign(Object.assign({},t),{ref:r})),be.current.state.next({name:e,errors:J.current.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},qe=h.useCallback((function(e,t,n,r){var a=Array.isArray(e),i=r||fe.current?Object.assign(Object.assign({},ne.current),r||X(ee)):_(t)?ne.current:a?t:Object(c.a)({},e,t);if(_(e))return n&&(xe.current.watchAll=!0),i;var o,u=[],l=Object(s.a)(B(e));try{for(l.s();!(o=l.n()).done;){var f=o.value;n&&xe.current.watch.add(f),u.push(w(i,f))}}catch(d){l.e(d)}finally{l.f()}return a?u:u[0]}),[]),Qe=function(e,t){return ye(e)?be.current.watch.subscribe({next:function(n){return e(qe(void 0,t),n)}}):qe(e,t,!0)},Xe=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s.a)(e?B(e):xe.current.mount);try{for(r.s();!(t=r.n()).done;){var a=t.value;xe.current.mount.delete(a),xe.current.array.delete(a),w(ee.current,a)&&(!n.keepError&&re(J.current.errors,a),!n.keepValue&&re(ee.current,a),!n.keepDirty&&re(J.current.dirtyFields,a),!n.keepTouched&&re(J.current.touchedFields,a),!D&&!n.keepDefaultValue&&re(ne.current,a))}}catch(i){r.e(i)}finally{r.f()}be.current.watch.next({values:$e()}),be.current.state.next(Object.assign(Object.assign({},J.current),n.keepDirty?{isDirty:De()}:{})),!n.keepIsValid&&Ve()},Ge=function(e,t,n){Ze(e,n);var r=w(ee.current,e),a=Ce(t);t===r._f.ref||a&&k(r._f.refs||[]).find((function(e){return e===t}))||(r={_f:a?Object.assign(Object.assign({},r._f),{refs:[].concat(Object(d.a)(k(r._f.refs||[]).filter((function(e){return Ee(e)&&document.contains(e)}))),[t]),ref:{type:t.type,name:e}}):Object.assign(Object.assign({},r._f),{ref:t})},q(ee.current,e,r),Ne(e,t))},Ze=h.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=w(ee.current,e);return q(ee.current,e,{_f:Object.assign(Object.assign(Object.assign({},n&&n._f?n._f:{ref:{name:e}}),{name:e,mount:!0}),t)}),xe.current.mount.add(e),!n&&Ne(e),Te?{name:e}:{name:e,onChange:He,onBlur:He,ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(n){if(n)Ge(e,n,t);else{var r=w(ee.current,e,{}),a=D||t.shouldUnregister;r._f&&(r._f.mount=!1,_(r._f.value)&&(r._f.value=r._f.ref.value)),a&&(!x(xe.current.array,e)||!se.current)&&xe.current.unMount.add(e)}}))}}),[]),Je=h.useCallback((function(e,t){return function(){var n=l(o.a.mark((function n(r){var a,u,l,s,c;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist()),a=!0,u=X(ee),be.current.state.next({isSubmitting:!0}),n.prev=4,!i){n.next=15;break}return n.next=8,K.current(u,le.current,pe(xe.current.mount,ee.current,R,A));case 8:l=n.sent,s=l.errors,c=l.values,J.current.errors=s,u=c,n.next=17;break;case 15:return n.next=17,Ie(ee.current);case 17:if(!V(J.current.errors)||!Object.keys(J.current.errors).every((function(e){return w(u,e)}))){n.next=23;break}return be.current.state.next({errors:{},isSubmitting:!0}),n.next=21,e(u,r);case 21:n.next=28;break;case 23:if(n.t0=t,!n.t0){n.next=27;break}return n.next=27,t(J.current.errors,r);case 27:j&&Q(ee.current,(function(e){return w(J.current.errors,e)}),xe.current.mount);case 28:n.next=34;break;case 30:throw n.prev=30,n.t1=n.catch(4),a=!1,n.t1;case 34:return n.prev=34,J.current.isSubmitted=!0,be.current.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:V(J.current.errors)&&a,submitCount:J.current.submitCount+1,errors:J.current.errors}),n.finish(34);case 38:case"end":return n.stop()}}),n,null,[[4,30,34,38]])})));return function(e){return n.apply(this,arguments)}}()}),[j,_e,R,A]),et=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";for(var r in t){var a=t[r],i=n+(n?".":"")+r,o=w(ee.current,i);o&&o._f||(m(a)||Array.isArray(a)?e(a,i):o||Ze(i,{value:a}))}},tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e||ne.current;if(U&&!t.keepValues){var r,a=Object(s.a)(xe.current.mount);try{for(a.s();!(r=a.n()).done;){var i=r.value,o=w(ee.current,i);if(o&&o._f){var u=Array.isArray(o._f.refs)?o._f.refs[0]:o._f.ref;try{Ee(u)&&u.closest("form").reset();break}catch(l){}}}}catch(c){a.e(c)}finally{a.f()}}t.keepDefaultValues||(ne.current=Object.assign({},n),ue.current=Object.assign({},n)),t.keepValues||(ee.current={},be.current.control.next({values:t.keepDefaultValues?ne.current:Object.assign({},n)}),be.current.watch.next({values:Object.assign({},n)}),be.current.array.next({values:Object.assign({},n),isReset:!0})),xe.current={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1},be.current.state.next({submitCount:t.keepSubmitCount?J.current.submitCount:0,isDirty:t.keepDirty?J.current.isDirty:!!t.keepDefaultValues&&Z(e,ne.current),isSubmitted:!!t.keepIsSubmitted&&J.current.isSubmitted,dirtyFields:t.keepDirty?J.current.dirtyFields:{},touchedFields:t.keepTouched?J.current.touchedFields:{},errors:t.keepErrors?J.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1}),fe.current=!!t.keepIsValid},nt=function(e){return w(ee.current,e)._f.ref.focus()};return h.useEffect((function(){var e=be.current.state.subscribe({next:function(e){W(e,Y.current,!0)&&(J.current=Object.assign(Object.assign({},J.current),e),$(J.current))}}),t=be.current.array.subscribe({next:function(e){if(e.values&&e.name&&Y.current.isValid){var t=X(ee);q(t,e.name,e.values),Ve(t)}}});return function(){e.unsubscribe(),t.unsubscribe()}}),[]),h.useEffect((function(){var e=[],t=function(e){return!Ee(e)||!document.contains(e)};fe.current||(fe.current=!0,Y.current.isValid&&Ve(),!D&&et(ne.current));var n,r=Object(s.a)(xe.current.unMount);try{for(r.s();!(n=r.n()).done;){var a=n.value,i=w(ee.current,a);i&&(i._f.refs?i._f.refs.every(t):t(i._f.ref))&&e.push(a)}}catch(o){r.e(o)}finally{r.f()}e.length&&Xe(e),xe.current.unMount=new Set})),{control:h.useMemo((function(){return{register:Ze,inFieldArrayActionRef:se,getIsDirty:De,subjectsRef:be,watchInternal:qe,fieldsRef:ee,updateIsValid:Ve,namesRef:xe,readFormStateRef:Y,formStateRef:J,defaultValuesRef:ne,fieldArrayDefaultValuesRef:ue,setValues:We,unregister:Xe,shouldUnmount:D}}),[]),formState:N(H,z,Y),trigger:ze,register:Ze,handleSubmit:Je,watch:h.useCallback(Qe,[]),setValue:h.useCallback(Be,[We]),getValues:h.useCallback($e,[]),reset:h.useCallback(tt,[]),clearErrors:h.useCallback(Ye,[]),unregister:h.useCallback(Xe,[]),setError:h.useCallback(Ke,[]),setFocus:h.useCallback(nt,[])}}},function(e,t,n){"use strict";var r=n(37),a=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,u=60110,l=60112;t.Suspense=60113;var s=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;a=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),u=f("react.context"),l=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n