@oliasoft-open-source/charts-library 5.2.1 → 5.2.2-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Color-AVL7NMMY-GhbeA4MZ.js +1 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-BOHw7vjA.js +2 -0
- package/dist/assets/bar-chart.stories-D30rS-ps.js +145 -0
- package/dist/assets/client-ZEQrpak8.js +1 -0
- package/dist/assets/components-BcVrFCfa.js +1 -0
- package/dist/assets/get-draggableData-CBeUXd9j.js +2 -0
- package/dist/assets/iframe-C1ZBWVv6.js +2349 -0
- package/dist/assets/{legend-ChMeFKa6.js → legend-CpVdQ0g7.js} +64 -59
- package/dist/assets/legend-context-Gxel1MnE.js +47 -0
- package/dist/assets/line-chart-V5Wlf2uJ.js +1 -0
- package/dist/assets/line-chart.stories-CJzFw0Ya.js +1166 -0
- package/dist/assets/{line-chart.test-case.stories-Ccs20N5x.js → line-chart.test-case.stories-B7WlCHsW.js} +1 -1
- package/dist/assets/noto-sans-cyrillic-400-italic-CMQj_TQM.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-400-italic-Dm4hr-Ag.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-400-normal-BDYvNhAR.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-400-normal-CHP_ranX.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-700-italic-DWLFq66Q.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-700-italic-DaJcJxmx.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-700-normal-CgNbF-DS.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-700-normal-Y97T0Ual.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-italic-C9NI8UaU.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-italic-DqW_YkPk.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-normal-BjDhGU6t.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-400-normal-d9FrwbiD.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-italic-CJ2zNwEf.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-italic-wfn8l9BI.woff +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-normal-Cpjpjy5f.woff2 +0 -0
- package/dist/assets/noto-sans-cyrillic-ext-700-normal-DKaOP4w1.woff +0 -0
- package/dist/assets/noto-sans-devanagari-400-italic-BpEXw0fu.woff +0 -0
- package/dist/assets/noto-sans-devanagari-400-italic-aza5nvbj.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-400-normal-C3FccbrF.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-400-normal-g9fsM2jL.woff +0 -0
- package/dist/assets/noto-sans-devanagari-700-italic-BWxeZW2N.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-700-italic-DlNZooX8.woff +0 -0
- package/dist/assets/noto-sans-devanagari-700-normal-BeKZv04D.woff2 +0 -0
- package/dist/assets/noto-sans-devanagari-700-normal-DQ20I1k4.woff +0 -0
- package/dist/assets/noto-sans-greek-400-italic-Cw158ua2.woff2 +0 -0
- package/dist/assets/noto-sans-greek-400-italic-Ds3lC5jm.woff +0 -0
- package/dist/assets/noto-sans-greek-400-normal-Be2BcUUc.woff +0 -0
- package/dist/assets/noto-sans-greek-400-normal-DCESwnT1.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-italic-BXqStIRT.woff +0 -0
- package/dist/assets/noto-sans-greek-700-italic-K6HhztJz.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-normal-C_NBFngB.woff2 +0 -0
- package/dist/assets/noto-sans-greek-700-normal-DspBLmJZ.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-italic-D9i0Od8_.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-italic-DlxXzGt2.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-400-normal-L11LEhi4.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-400-normal-i2oSBwXz.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-700-italic-BVb6BEPG.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-700-italic-DrlV2HeE.woff2 +0 -0
- package/dist/assets/noto-sans-greek-ext-700-normal-BvxaxZ-t.woff +0 -0
- package/dist/assets/noto-sans-greek-ext-700-normal-CqXHsD66.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-italic-B5_wyGmT.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-italic-DfHMVQD-.woff +0 -0
- package/dist/assets/noto-sans-latin-400-normal-DBaOTIGl.woff2 +0 -0
- package/dist/assets/noto-sans-latin-400-normal-DKQcY9Xy.woff +0 -0
- package/dist/assets/noto-sans-latin-700-italic-BcjsTJqQ.woff2 +0 -0
- package/dist/assets/noto-sans-latin-700-italic-Cy-hKh7h.woff +0 -0
- package/dist/assets/noto-sans-latin-700-normal-CG28WTf7.woff2 +0 -0
- package/dist/assets/noto-sans-latin-700-normal-DVIsH__v.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-italic-BXXaecLH.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-400-italic-C3uzHanu.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-normal-CNh9dRW_.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-400-normal-CVf-LbaS.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-700-italic-S9i1fPgy.woff2 +0 -0
- package/dist/assets/noto-sans-latin-ext-700-italic-dYKfCWXj.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-700-normal-CDZvJj8X.woff +0 -0
- package/dist/assets/noto-sans-latin-ext-700-normal-CnRwbtty.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-400-italic-Dotu2pZp.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-400-italic-da8J1rYs.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-400-normal-C3Al4sv4.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-400-normal-D2wP-Vm-.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-700-italic-DTbX1pks.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-700-italic-DgcmztT9.woff2 +0 -0
- package/dist/assets/noto-sans-vietnamese-700-normal-BpIrMy6S.woff +0 -0
- package/dist/assets/noto-sans-vietnamese-700-normal-Cg_u0UBD.woff2 +0 -0
- package/dist/assets/pie-chart.stories-Bdsxnd3m.js +45 -0
- package/dist/assets/preload-helper-Dr7BywEQ.js +1 -0
- package/dist/assets/react-18-BDLD60Lb.js +1 -0
- package/dist/assets/react-CGaMAEPW.js +1 -0
- package/dist/assets/scatter-chart.stories-DzlCS7dT.js +41 -0
- package/dist/common/common.interface.d.ts +1 -0
- package/dist/common/helpers/add-transparency/add-transparency.d.ts +1 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +1 -0
- package/dist/favicon-wrapper.svg +46 -0
- package/dist/favicon.svg +1 -1
- package/dist/iframe.html +30 -9
- package/dist/index.html +19 -16
- package/dist/index.js +15 -4
- package/dist/index.json +1 -1
- package/dist/project.json +1 -1
- package/dist/sb-addons/docs-2/manager-bundle.js +149 -240
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/dist/sb-addons/themes-1/manager-bundle.js +3 -0
- package/dist/sb-common-assets/favicon-wrapper.svg +46 -0
- package/dist/sb-common-assets/favicon.svg +1 -1
- package/dist/sb-manager/globals-module-info.js +280 -532
- package/dist/sb-manager/globals-runtime.js +54450 -26250
- package/dist/sb-manager/globals.js +11 -25
- package/dist/sb-manager/runtime.js +6262 -5112
- package/dist/src/components/common/common.interface.d.ts +1 -0
- package/dist/src/components/common/helpers/add-transparency/add-transparency.d.ts +1 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +1 -0
- package/dist/vite-inject-mocker-entry.js +8 -0
- package/package.json +2 -1
- package/dist/assets/Color-YHDXOIA2-_rJfMMp0.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-BpHeeG43.js +0 -1
- package/dist/assets/bar-chart.stories-B2hnXIDm.js +0 -145
- package/dist/assets/chunk-2PTXLE6R-Dj3Lydxc.js +0 -1
- package/dist/assets/chunk-H6MOWX77-Ds8Hqw1O.js +0 -1
- package/dist/assets/chunk-NUUEMKO5-w5N4r9dW.js +0 -56
- package/dist/assets/chunk-PRSJUHPQ-B1J-18Q5.js +0 -2
- package/dist/assets/chunk-XP5HYGXS-DyEAuB1b.js +0 -1
- package/dist/assets/client-BvIKjR7y.js +0 -1
- package/dist/assets/components-B8oW7xs1.js +0 -1
- package/dist/assets/components-CqwGF0Y6.js +0 -534
- package/dist/assets/docs-tools-CnZ6t1zZ.js +0 -8
- package/dist/assets/entry-preview-CO5fIUlY.js +0 -2
- package/dist/assets/entry-preview-docs-BVt62RwF.js +0 -48
- package/dist/assets/fast-deep-equal-Cl3Z6ltL.js +0 -1
- package/dist/assets/get-draggableData-6LoYbWyK.js +0 -2
- package/dist/assets/iframe-BjAYWlbk.js +0 -226
- package/dist/assets/jsx-runtime-qP9Zu-3U.js +0 -1
- package/dist/assets/legend-context-BtHYPzro.js +0 -47
- package/dist/assets/line-chart-BY2E9pFt.js +0 -6
- package/dist/assets/line-chart.stories-BaapO9ba.js +0 -1162
- package/dist/assets/pie-chart.stories-D5ALwqBw.js +0 -45
- package/dist/assets/preview-Ba4CwQIJ.js +0 -1
- package/dist/assets/preview-CYPcIR3-.js +0 -1
- package/dist/assets/preview-D_SbBdlL.js +0 -3
- package/dist/assets/react-18-COcty78B.js +0 -1
- package/dist/assets/react-B_00WdD4.js +0 -1
- package/dist/assets/react-Blf7liVR.js +0 -1
- package/dist/assets/react-Vdx8ObgF.js +0 -1
- package/dist/assets/react-dom-CbTiFsso.js +0 -8
- package/dist/assets/scatter-chart.stories-o6B12CBB.js +0 -41
- package/dist/assets/test-utils-D7be-ahs.js +0 -1
- package/dist/sb-addons/actions-1/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +0 -5
- /package/dist/assets/{bar-chart-const-DT-Qreyz.js → bar-chart-const-D_44J3Hs.js} +0 -0
- /package/dist/assets/{get-custom-legend-plugin-example-DlEN0LEe.js → get-custom-legend-plugin-example-CGyRL0oI.js} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{_t as e,at as t,dt as n,ft as r}from"./iframe-C1ZBWVv6.js";
|
|
2
|
+
/*!
|
|
3
|
+
* @kurkle/color v0.3.4
|
|
4
|
+
* https://github.com/kurkle/color#readme
|
|
5
|
+
* (c) 2024 Jukka Kurkela
|
|
6
|
+
* Released under the MIT License
|
|
7
|
+
*/
|
|
8
|
+
function i(e){return e+.5|0}var a=(e,t,n)=>Math.max(Math.min(e,n),t);function o(e){return a(i(e*2.55),0,255)}function s(e){return a(i(e*255),0,255)}function c(e){return a(i(e/2.55)/100,0,1)}function l(e){return a(i(e*100),0,100)}var u={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},d=[...`0123456789ABCDEF`],f=e=>d[e&15],p=e=>d[(e&240)>>4]+d[e&15],m=e=>(e&240)>>4==(e&15),h=e=>m(e.r)&&m(e.g)&&m(e.b)&&m(e.a);function g(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&u[e[1]]*17,g:255&u[e[2]]*17,b:255&u[e[3]]*17,a:t===5?u[e[4]]*17:255}:(t===7||t===9)&&(n={r:u[e[1]]<<4|u[e[2]],g:u[e[3]]<<4|u[e[4]],b:u[e[5]]<<4|u[e[6]],a:t===9?u[e[7]]<<4|u[e[8]]:255})),n}var _=(e,t)=>e<255?t(e):``;function v(e){var t=h(e)?f:p;return e?`#`+t(e.r)+t(e.g)+t(e.b)+_(e.a,t):void 0}var y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function b(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function x(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function S(e,t,n){let r=b(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function C(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function w(e){let t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s,c,l;return i!==a&&(l=i-a,c=o>.5?l/(2-i-a):l/(i+a),s=C(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function T(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(s)}function E(e,t,n){return T(b,e,t,n)}function ee(e,t,n){return T(S,e,t,n)}function te(e,t,n){return T(x,e,t,n)}function ne(e){return(e%360+360)%360}function re(e){let t=y.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?o(+t[5]):s(+t[5]));let i=ne(+t[2]),a=t[3]/100,c=t[4]/100;return r=t[1]===`hwb`?ee(i,a,c):t[1]===`hsv`?te(i,a,c):E(i,a,c),{r:r[0],g:r[1],b:r[2],a:n}}function ie(e,t){var n=w(e);n[0]=ne(n[0]+t),n=E(n),e.r=n[0],e.g=n[1],e.b=n[2]}function ae(e){if(!e)return;let t=w(e),n=t[0],r=l(t[1]),i=l(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${c(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var oe={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},se={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function ce(){let e={},t=Object.keys(se),n=Object.keys(oe),r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,oe[a]);a=parseInt(se[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}var le;function ue(e){le||(le=ce(),le.transparent=[0,0,0,0]);let t=le[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var de=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function fe(e){let t=de.exec(e),n=255,r,i,s;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?o(e):a(e*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?o(r):a(r,0,255)),i=255&(t[4]?o(i):a(i,0,255)),s=255&(t[6]?o(s):a(s,0,255)),{r,g:i,b:s,a:n}}}function pe(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${c(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var me=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,he=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function ge(e,t,n){let r=he(c(e.r)),i=he(c(e.g)),a=he(c(e.b));return{r:s(me(r+n*(he(c(t.r))-r))),g:s(me(i+n*(he(c(t.g))-i))),b:s(me(a+n*(he(c(t.b))-a))),a:e.a+n*(t.a-e.a)}}function _e(e,t,n){if(e){let r=w(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=E(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function D(e,t){return e&&Object.assign(t||{},e)}function ve(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=s(e[3]))):(t=D(e,{r:0,g:0,b:0,a:1}),t.a=s(t.a)),t}function ye(e){return e.charAt(0)===`r`?fe(e):re(e)}var be=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=ve(t):n===`string`&&(r=g(t)||ue(t)||ye(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=D(this._rgb);return e&&(e.a=c(e.a)),e}set rgb(e){this._rgb=ve(e)}rgbString(){return this._valid?pe(this._rgb):void 0}hexString(){return this._valid?v(this._rgb):void 0}hslString(){return this._valid?ae(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=ge(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=s(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=i(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return _e(this._rgb,2,e),this}darken(e){return _e(this._rgb,2,-e),this}saturate(e){return _e(this._rgb,1,e),this}desaturate(e){return _e(this._rgb,1,-e),this}rotate(e){return ie(this._rgb,e),this}};function xe(){}var Se=(()=>{let e=0;return()=>e++})();function O(e){return e==null}function k(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function A(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function j(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function Ce(e,t){return j(e)?e:t}function M(e,t){return e===void 0?t:e}var we=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Te=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function N(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function P(e,t,n,r){let i,a,o;if(k(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(A(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function Ee(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function De(e){if(k(e))return e.map(De);if(A(e)){let t=Object.create(null),n=Object.keys(e),r=n.length,i=0;for(;i<r;++i)t[n[i]]=De(e[n[i]]);return t}return e}function Oe(e){return[`__proto__`,`prototype`,`constructor`].indexOf(e)===-1}function ke(e,t,n,r){if(!Oe(e))return;let i=t[e],a=n[e];A(i)&&A(a)?Ae(i,a,r):t[e]=De(a)}function Ae(e,t,n){let r=k(t)?t:[t],i=r.length;if(!A(e))return e;n||={};let a=n.merger||ke,o;for(let t=0;t<i;++t){if(o=r[t],!A(o))continue;let i=Object.keys(o);for(let t=0,r=i.length;t<r;++t)a(i[t],e,o,n)}return e}function je(e,t){return Ae(e,t,{merger:Me})}function Me(e,t,n){if(!Oe(e))return;let r=t[e],i=n[e];A(r)&&A(i)?je(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=De(i))}var Ne={"":e=>e,x:e=>e.x,y:e=>e.y};function Pe(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function Fe(e){let t=Pe(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function Ie(e,t){return(Ne[t]||(Ne[t]=Fe(t)))(e)}function Le(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Re=e=>e!==void 0,ze=e=>typeof e==`function`,Be=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Ve(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var F=Math.PI,I=2*F,He=I+F,Ue=1/0,We=F/180,Ge=F/2,Ke=F/4,qe=F*2/3,Je=Math.log10,Ye=Math.sign;function Xe(e,t,n){return Math.abs(e-t)<n}function Ze(e){let t=Math.round(e);e=Xe(e,t,e/1e3)?t:e;let n=10**Math.floor(Je(e)),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Qe(e){let t=[],n=Math.sqrt(e),r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((e,t)=>e-t).pop(),t}function $e(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function et(e){return!$e(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function tt(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function nt(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function rt(e){return e*(F/180)}function it(e){return e*(180/F)}function at(e){if(!j(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function ot(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*F&&(a+=I),{angle:a,distance:i}}function st(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function ct(e,t){return(e-t+He)%I-F}function lt(e){return(e%I+I)%I}function ut(e,t,n,r){let i=lt(e),a=lt(t),o=lt(n),s=lt(a-i),c=lt(o-i),l=lt(i-a),u=lt(i-o);return i===a||i===o||r&&a===o||s>c&&l<u}function dt(e,t,n){return Math.max(t,Math.min(n,e))}function ft(e){return dt(e,-32768,32767)}function pt(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function mt(e,t,n){n||=(n=>e[n]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var ht=(e,t,n,r)=>mt(e,n,r?r=>{let i=e[r][t];return i<n||i===n&&e[r+1][t]===n}:r=>e[r][t]<n),gt=(e,t,n)=>mt(e,n,r=>e[r][t]>=n);function _t(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}var vt=[`push`,`pop`,`shift`,`splice`,`unshift`];function L(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,`_chartjs`,{configurable:!0,enumerable:!1,value:{listeners:[t]}}),vt.forEach(t=>{let n=`_onData`+Le(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function yt(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(vt.forEach(t=>{delete e[t]}),delete e._chartjs)}function bt(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var xt=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function St(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,xt.call(window,()=>{r=!1,e.apply(t,n)}))}}function Ct(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var wt=e=>e===`start`?`left`:e===`end`?`right`:`center`,Tt=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,Et=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function R(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(ht(c,u,d).lo,n?r:ht(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!O(e[s.axis]));i-=Math.max(0,e)}i=dt(i,0,r-1)}if(m){let e=Math.max(ht(c,o.axis,f,!0).hi+1,n?0:ht(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!O(e[s.axis]));e+=Math.max(0,t)}a=dt(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Dt(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Ot=e=>e===0||e===1,kt=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*I/n)),At=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*I/n)+1,jt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ge)+1,easeOutSine:e=>Math.sin(e*Ge),easeInOutSine:e=>-.5*(Math.cos(F*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Ot(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Ot(e)?e:kt(e,.075,.3),easeOutElastic:e=>Ot(e)?e:At(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Ot(e)?e:e<.5?.5*kt(e*2,t,n):.5+.5*At(e*2-1,t,n)},easeInBack(e){let t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){let t=1.70158;return--e*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-jt.easeOutBounce(1-e),easeOutBounce(e){let 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:e=>e<.5?jt.easeInBounce(e*2)*.5:jt.easeOutBounce(e*2-1)*.5+.5};function Mt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Nt(e){return Mt(e)?e:new be(e)}function Pt(e){return Mt(e)?e:new be(e).saturate(.5).darken(.1).hexString()}var Ft=[`x`,`y`,`borderWidth`,`radius`,`tension`],It=[`color`,`borderColor`,`backgroundColor`];function Lt(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:It},numbers:{type:`number`,properties:Ft}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Rt(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var zt=new Map;function Bt(e,t){t||={};let n=e+JSON.stringify(t),r=zt.get(n);return r||(r=new Intl.NumberFormat(e,t),zt.set(n,r)),r}function Vt(e,t,n){return Bt(t,n).format(e)}var Ht={values(e){return k(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=Ut(e,n)}let o=Je(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Vt(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(Je(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Ht.numeric.call(this,e,t,n):``}};function Ut(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Wt={formatters:Ht};function Gt(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wt.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var Kt=Object.create(null),qt=Object.create(null);function Jt(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;t<r;++t){let r=n[t];e=e[r]||(e[r]=Object.create(null))}return e}function Yt(e,t,n){return typeof t==`string`?Ae(Jt(e,t),n):Ae(Jt(e,``),t)}var z=new class{constructor(e,t){this.animation=void 0,this.backgroundColor=`rgba(0,0,0,0.1)`,this.borderColor=`rgba(0,0,0,0.1)`,this.color=`#666`,this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>Pt(t.backgroundColor),this.hoverBorderColor=(e,t)=>Pt(t.borderColor),this.hoverColor=(e,t)=>Pt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return Yt(this,e,t)}get(e){return Jt(this,e)}describe(e,t){return Yt(qt,e,t)}override(e,t){return Yt(Kt,e,t)}route(e,t,n,r){let i=Jt(this,e),a=Jt(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return A(e)?Object.assign({},t,e):M(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Lt,Rt,Gt]);function Xt(e){return!e||O(e.size)||O(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function Zt(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function Qt(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;c<s;c++)if(d=n[c],d!=null&&!k(d))o=Zt(e,i,a,o,d);else if(k(d))for(l=0,u=d.length;l<u;l++)f=d[l],f!=null&&!k(f)&&(o=Zt(e,i,a,o,f));e.restore();let p=a.length/2;if(p>n.length){for(c=0;c<p;c++)delete i[a[c]];a.splice(0,p)}return o}function $t(e,t,n){let r=e.currentDevicePixelRatio,i=n===0?0:Math.max(n/2,.5);return Math.round((t-i)*r)/r+i}function en(e,t){!t&&!e||(t||=e.getContext(`2d`),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function tn(e,t,n,r){nn(e,t,n,r,null)}function nn(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=t.pointStyle,m=t.rotation,h=t.radius,g=(m||0)*We;if(p&&typeof p==`object`&&(a=p.toString(),a===`[object HTMLImageElement]`||a===`[object HTMLCanvasElement]`)){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,I):e.arc(n,r,h,0,I),e.closePath();break;case`triangle`:u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=qe,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=qe,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case`rectRounded`:l=h*.516,c=h-l,o=Math.cos(g+Ke)*c,d=Math.cos(g+Ke)*(i?i/2-l:c),s=Math.sin(g+Ke)*c,f=Math.sin(g+Ke)*(i?i/2-l:c),e.arc(n-d,r-s,l,g-F,g-Ge),e.arc(n+f,r-o,l,g-Ge,g),e.arc(n+d,r+s,l,g,g+Ge),e.arc(n-f,r+o,l,g+Ge,g+F),e.closePath();break;case`rect`:if(!m){c=Math.SQRT1_2*h,u=i?i/2:c,e.rect(n-u,r-c,2*u,2*c);break}g+=Ke;case`rectRot`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-o),e.lineTo(n+d,r+s),e.lineTo(n-f,r+o),e.closePath();break;case`crossRot`:g+=Ke;case`cross`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`star`:d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),g+=Ke,d=Math.cos(g)*(i?i/2:h),o=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case`line`:o=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case`dash`:e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function rn(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function an(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function B(e){e.restore()}function V(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i===`middle`){let r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else i===`after`==!!r?e.lineTo(n.x,t.y):e.lineTo(t.x,n.y);e.lineTo(n.x,n.y)}function on(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function sn(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),O(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function cn(e,t,n,r,i){if(i.strikethrough||i.underline){let a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,l=n+a.actualBoundingBoxDescent,u=i.strikethrough?(c+l)/2:l;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function ln(e,t){let n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function un(e,t,n,r,i,a={}){let o=k(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,sn(e,a),c=0;c<o.length;++c)l=o[c],a.backdrop&&ln(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),O(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(l,n,r,a.maxWidth)),e.fillText(l,n,r,a.maxWidth),cn(e,n,r,l,a),r+=Number(i.lineHeight);e.restore()}function dn(e,t){let{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*F,F,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,F,Ge,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,Ge,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Ge,!0),e.lineTo(n+o.topLeft,r)}var fn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,pn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function mn(e,t){let n=(``+e).match(fn);if(!n||n[1]===`normal`)return t*1.2;switch(e=+n[2],n[3]){case`px`:return e;case`%`:e/=100;break}return t*e}var hn=e=>+e||0;function gn(e,t){let n={},r=A(t),i=r?Object.keys(t):t,a=A(e)?r?n=>M(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=hn(a(e));return n}function _n(e){return gn(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function vn(e){return gn(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function H(e){let t=_n(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function yn(e,t){e||={},t||=z.font;let n=M(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=M(e.style,t.style);r&&!(``+r).match(pn)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:M(e.family,t.family),lineHeight:mn(M(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:M(e.weight,t.weight),string:``};return i.string=Xt(i),i}function bn(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;a<o;++a)if(s=e[a],s!==void 0&&(t!==void 0&&typeof s==`function`&&(s=s(t),i=!1),n!==void 0&&k(s)&&(s=s[n%s.length],i=!1),s!==void 0))return r&&!i&&(r.cacheable=!1),s}function xn(e,t,n){let{min:r,max:i}=e,a=Te(t,(i-r)/2),o=(e,t)=>n&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function Sn(e,t){return Object.assign(Object.create(e),t)}function Cn(e,t=[``],n,r,i=()=>e[0]){let a=n||e;r===void 0&&(r=zn(`_fallback`,e));let o={[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>Cn([n,...e],t,a,r)};return new Proxy(o,{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return On(n,r,()=>Rn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Bn(e).includes(t)},ownKeys(e){return Bn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function wn(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Tn(e,r),setContext:t=>wn(e,t,n,r),override:i=>wn(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return On(e,t,()=>kn(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function Tn(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:ze(n)?n:()=>n,isIndexable:ze(r)?r:()=>r}}var En=(e,t)=>e?e+Le(t):t,Dn=(e,t)=>A(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function On(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function kn(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return ze(s)&&o.isScriptable(t)&&(s=An(t,s,e,n)),k(s)&&s.length&&(s=jn(t,s,e,o.isIndexable)),Dn(t,s)&&(s=wn(s,i,a&&a[t],o)),s}function An(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Dn(e,c)&&(c=Fn(i._scopes,i,e,c)),c}function jn(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(A(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=Fn(r,i,e,c);t.push(wn(n,a,o&&o[e],s))}}return t}function Mn(e,t,n){return ze(e)?e(t,n):e}var Nn=(e,t)=>e===!0?t:typeof e==`string`?Ie(t,e):void 0;function Pn(e,t,n,r,i){for(let a of t){let t=Nn(n,a);if(t){e.add(t);let a=Mn(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Fn(e,t,n,r){let i=t._rootScopes,a=Mn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=In(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=In(s,o,a,c,r),c===null)?!1:Cn(Array.from(s),[``],i,a,()=>Ln(t,n,r))}function In(e,t,n,r,i){for(;n;)n=Pn(e,t,n,r,i);return n}function Ln(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return k(i)&&A(n)?n:i||{}}function Rn(e,t,n,r){let i;for(let a of t)if(i=zn(En(a,e),n),i!==void 0)return Dn(e,i)?Fn(n,r,e,i):i}function zn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Bn(e){let t=e._keys;return t||=e._keys=Vn(e._scopes),t}function Vn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}var Hn=2**-52||1e-14,Un=(e,t)=>t<e.length&&!e[t].skip&&e[t],Wn=e=>e===`x`?`y`:`x`;function Gn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=st(a,i),c=st(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function Kn(e,t,n){let r=e.length,i,a,o,s,c,l=Un(e,0);for(let u=0;u<r-1;++u)if(c=l,l=Un(e,u+1),!(!c||!l)){if(Xe(t[u],0,Hn)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],a=n[u+1]/t[u],s=i**2+a**2,!(s<=9)&&(o=3/Math.sqrt(s),n[u]=i*o*t[u],n[u+1]=a*o*t[u])}}function qn(e,t,n=`x`){let r=Wn(n),i=e.length,a,o,s,c=Un(e,0);for(let l=0;l<i;++l){if(o=s,s=c,c=Un(e,l+1),!s)continue;let i=s[n],u=s[r];o&&(a=(i-o[n])/3,s[`cp1${n}`]=i-a,s[`cp1${r}`]=u-a*t[l]),c&&(a=(c[n]-i)/3,s[`cp2${n}`]=i+a,s[`cp2${r}`]=u+a*t[l])}}function Jn(e,t=`x`){let n=Wn(t),r=e.length,i=Array(r).fill(0),a=Array(r),o,s,c,l=Un(e,0);for(o=0;o<r;++o)if(s=c,c=l,l=Un(e,o+1),c){if(l){let e=l[t]-c[t];i[o]=e===0?0:(l[n]-c[n])/e}a[o]=s?l?Ye(i[o-1])===Ye(i[o])?(i[o-1]+i[o])/2:0:i[o-1]:i[o]}Kn(e,i,a),qn(e,a,t)}function Yn(e,t,n){return Math.max(Math.min(e,n),t)}function Xn(e,t){let n,r,i,a,o,s=rn(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&rn(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=Yn(i.cp1x,t.left,t.right),i.cp1y=Yn(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Yn(i.cp2x,t.left,t.right),i.cp2y=Yn(i.cp2y,t.top,t.bottom)))}function Zn(e,t,n,r,i){let a,o,s,c;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),t.cubicInterpolationMode===`monotone`)Jn(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],c=Gn(n,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,n=s}t.capBezierPoints&&Xn(e,n)}function Qn(){return typeof window<`u`&&typeof document<`u`}function $n(e){let t=e.parentNode;return t&&t.toString()===`[object ShadowRoot]`&&(t=t.host),t}function er(e,t,n){let r;return typeof e==`string`?(r=parseInt(e,10),e.indexOf(`%`)!==-1&&(r=r/100*t.parentNode[n])):r=e,r}var tr=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function nr(e,t){return tr(e).getPropertyValue(t)}var rr=[`top`,`right`,`bottom`,`left`];function ir(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=rr[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var ar=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function or(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(ar(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function sr(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=tr(n),a=i.boxSizing===`border-box`,o=ir(i,`padding`),s=ir(i,`border`,`width`),{x:c,y:l,box:u}=or(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function cr(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&$n(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=tr(a),s=ir(o,`border`,`width`),c=ir(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=er(o.maxWidth,a,`clientWidth`),i=er(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||Ue,maxHeight:i||Ue}}var lr=e=>Math.round(e*10)/10;function ur(e,t,n,r){let i=tr(e),a=ir(i,`margin`),o=er(i.maxWidth,e,`clientWidth`)||Ue,s=er(i.maxHeight,e,`clientHeight`)||Ue,c=cr(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=ir(i,`border`,`width`),t=ir(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=lr(Math.min(l,o,c.maxWidth)),u=lr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=lr(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=lr(Math.floor(u*r))),{width:l,height:u}}function dr(e,t,n){let r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var fr=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};Qn()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function pr(e,t){let n=nr(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function mr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function hr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function gr(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=mr(e,i,n),s=mr(i,a,n),c=mr(a,t,n);return mr(mr(o,s,n),mr(s,c,n),n)}var _r=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},vr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function yr(e,t,n){return e?_r(t,n):vr()}function br(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function xr(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function Sr(e){return e===`angle`?{between:ut,compare:ct,normalize:lt}:{between:pt,compare:(e,t)=>e-t,normalize:e=>e}}function Cr({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function wr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=Sr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;f<p&&o(s(t[l%c][r]),i,a);++f)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:d,style:e.style}}function Tr(e,t,n){if(!n)return[e];let{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:c,normalize:l}=Sr(r),{start:u,end:d,loop:f,style:p}=wr(e,t,n),m=[],h=!1,g=null,_,v,y,b=()=>c(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Cr({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Cr({start:g,end:d,loop:f,count:o,style:p})),m}function Er(e,t){let n=[],r=e.segments;for(let i=0;i<r.length;i++){let a=Tr(r[i],e.points,t);a.length&&n.push(...a)}return n}function Dr(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Or(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function kr(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Dr(n,i,a,r);return r===!0?Ar(e,[{start:o,end:s,loop:a}],n,t):Ar(e,Or(n,o,s<o?s+i:s,!!e._fullLoop&&o===0&&s===i-1),n,t)}function Ar(e,t,n,r){return!r||!r.setContext||!n?t:jr(e,t,n,r)}function jr(e,t,n,r){let i=e._chart.getContext(),a=Mr(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,c=n.length,l=[],u=a,d=t[0].start,f=d;function p(e,t,r,i){let a=s?-1:1;if(e!==t){for(e+=c;n[e%c].skip;)e-=a;for(;n[t%c].skip;)t+=a;e%c!==t%c&&(l.push({start:e%c,end:t%c,loop:r,style:i}),u=i,d=t%c)}}for(let e of t){d=s?d:e.start;let t=n[d%c],a;for(f=d+1;f<=e.end;f++){let s=n[f%c];a=Mr(r.setContext(Sn(i,{type:`segment`,p0:t,p1:s,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:o}))),Nr(a,u)&&p(d,f-1,e.loop,u),t=s,u=a}d<f-1&&p(d,f-1,e.loop,u)}return l}function Mr(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Nr(e,t){if(!t)return!1;let n=[],r=function(e,t){return Mt(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function U(e,t,n){return e.options.clip?e[n]:t[n]}function Pr(e,t){let{xScale:n,yScale:r}=e;return n&&r?{left:U(n,t,`left`),right:U(n,t,`right`),top:U(r,t,`top`),bottom:U(r,t,`bottom`)}:t}function Fr(e,t){let n=t._clip;if(n.disabled)return!1;let r=Pr(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}var Ir=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let i=t.listeners[r],a=t.duration;i.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,xt.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},W=`transparent`,Lr={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Nt(e||W),i=r.valid&&Nt(t||W);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},Rr=class{constructor(e,t,n,r){let i=t[n];r=bn([e.to,r,i,e.from]);let a=bn([e.from,i,r]);this._active=!0,this._fn=e.fn||Lr[e.type||typeof a],this._easing=jt[e.easing]||jt.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=bn([e.to,t,r,e.from]),this._from=bn([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t<n),!this._active){this._target[r]=o,this._notify(!0);return}if(t<0){this._target[r]=i;return}s=t/n%2,s=a&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e<n.length;e++)n[e][t]()}},zr=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!A(e))return;let t=Object.keys(z.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let i=e[r];if(!A(i))return;let a={};for(let e of t)a[e]=i[e];(k(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=Vr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Br(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new Rr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Ir.add(this._chart,n),!0}};function Br(e,t){let n=[],r=Object.keys(t);for(let t=0;t<r.length;t++){let i=e[r[t]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function Vr(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Hr(e,t){let n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function Ur(e,t,n){if(n===!1)return!1;let r=Hr(e,n),i=Hr(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Wr(e){let t,n,r,i;return A(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Gr(e,t){let n=[],r=e._getSortedDatasetMetas(t),i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function Kr(e,t,n,r={}){let i=e.keys,a=r.mode===`single`,o,s,c,l;if(t===null)return;let u=!1;for(o=0,s=i.length;o<s;++o){if(c=+i[o],c===n){if(u=!0,r.all)continue;break}l=e.values[c],j(l)&&(a||t===0||Ye(t)===Ye(l))&&(t+=l)}return!u&&!r.all?0:t}function qr(e,t){let{iScale:n,vScale:r}=t,i=n.axis===`x`?`x`:`y`,a=r.axis===`x`?`x`:`y`,o=Object.keys(e),s=Array(o.length),c,l,u;for(c=0,l=o.length;c<l;++c)u=o[c],s[c]={[i]:u,[a]:e[u]};return s}function Jr(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Yr(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Xr(e){let{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:-1/0,max:i?n:1/0}}function Zr(e,t,n){let r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Qr(e,t,n,r){for(let i of t.getMatchingVisibleMetas(r).reverse()){let t=e[i.index];if(n&&t>0||!n&&t<0)return i.index}return null}function $r(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=Yr(a,o,r),d=t.length,f;for(let e=0;e<d;++e){let n=t[e],{[c]:a,[l]:d}=n,p=n._stacks||={};f=p[l]=Zr(i,u,a),f[s]=d,f._top=Qr(f,o,!0,r.type),f._bottom=Qr(f,o,!1,r.type);let m=f._visualValues||={};m[s]=d}}function ei(e,t){let n=e.scales;return Object.keys(n).filter(e=>n[e].axis===t).shift()}function ti(e,t){return Sn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function ni(e,t,n){return Sn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function ri(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var ii=e=>e===`reset`||e===`none`,ai=(e,t)=>t?e:Object.assign({},e),oi=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Gr(n,!0),values:null},si=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Jr(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&ri(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=M(n.xAxisID,ei(e,`x`)),a=t.yAxisID=M(n.yAxisID,ei(e,`y`)),o=t.rAxisID=M(n.rAxisID,ei(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&yt(this._data,this),e._stacked&&ri(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(A(t)){let e=this._cachedMeta;this._data=qr(t,e)}else if(n!==t){if(n){yt(n,this);let e=this._cachedMeta;ri(e),e._parsed=[]}t&&Object.isExtensible(t)&&L(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=Jr(t.vScale,t),t.stack!==n.stack&&(r=!0,ri(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&($r(this,t._parsed),t._stacked=Jr(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=k(r[e])?this.parseArrayData(n,r,e,t):A(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]<c[o];for(l=0;l<t;++l)n._parsed[l+e]=u=d[l],s&&(i()&&(s=!1),c=u);n._sorted=s}a&&$r(this,d)}parsePrimitiveData(e,t,n,r){let{iScale:i,vScale:a}=e,o=i.axis,s=a.axis,c=i.getLabels(),l=i===a,u=Array(r),d,f,p;for(d=0,f=r;d<f;++d)p=d+n,u[d]={[o]:l||i.parse(c[p],p),[s]:a.parse(t[p],p)};return u}parseArrayData(e,t,n,r){let{xScale:i,yScale:a}=e,o=Array(r),s,c,l,u;for(s=0,c=r;s<c;++s)l=s+n,u=t[l],o[s]={x:i.parse(u[0],l),y:a.parse(u[1],l)};return o}parseObjectData(e,t,n,r){let{xScale:i,yScale:a}=e,{xAxisKey:o=`x`,yAxisKey:s=`y`}=this._parsing,c=Array(r),l,u,d,f;for(l=0,u=r;l<u;++l)d=l+n,f=t[d],c[l]={x:i.parse(Ie(f,o),d),y:a.parse(Ie(f,s),d)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){let r=this.chart,i=this._cachedMeta,a=t[e.axis];return Kr({keys:Gr(r,!0),values:t._stacks[e.axis]._visualValues},a,i.index,{mode:n})}updateRangeFromParsed(e,t,n,r){let i=n[t.axis],a=i===null?NaN:i,o=r&&n._stacks[t.axis];r&&o&&(r.values=o,a=Kr(r,i,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){let n=this._cachedMeta,r=n._parsed,i=n._sorted&&e===n.iScale,a=r.length,o=this._getOtherScale(e),s=oi(t,n,this.chart),c={min:1/0,max:-1/0},{min:l,max:u}=Xr(o),d,f;function p(){f=r[d];let t=f[o.axis];return!j(f[e.axis])||l>t||u<t}for(d=0;d<a&&!(!p()&&(this.updateRangeFromParsed(c,e,f,s),i));++d);if(i){for(d=a-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r][e.axis],j(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(e){let t=this._cachedMeta,n=t.iScale,r=t.vScale,i=this.getParsed(e);return{label:n?``+n.getLabelForValue(i[n.axis]):``,value:r?``+r.getLabelForValue(i[r.axis]):``}}_update(e){let t=this._cachedMeta;this.update(e||`default`),t._clip=Wr(M(this.options.clip,Ur(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){let e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],i=t.chartArea,a=[],o=this._drawStart||0,s=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop,l;for(n.dataset&&n.dataset.draw(e,i,o,s),l=o;l<o+s;++l){let t=r[l];t.hidden||(t.active&&c?a.push(t):t.draw(e,i))}for(l=0;l<a.length;++l)a[l].draw(e,i)}getStyle(e,t){let n=t?`active`:`default`;return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){let r=this.getDataset(),i;if(e>=0&&e<this._cachedMeta.data.length){let t=this._cachedMeta.data[e];i=t.$context||=ni(this.getContext(),e,t),i.parsed=this.getParsed(e),i.raw=r.data[e],i.index=i.dataIndex=e}else i=this.$context||=ti(this.chart.getContext(),this.index),i.dataset=r,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t=`default`,n){let r=t===`active`,i=this._cachedDataOpts,a=e+`-`+t,o=i[a],s=this.enableOptionSharing&&Re(n);if(o)return ai(o,s);let c=this.chart.config,l=c.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,`hover`,e,``]:[e,``],d=c.getOptionScopes(this.getDataset(),l),f=Object.keys(z.elements[e]),p=c.resolveNamedOptions(d,f,()=>this.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(ai(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new zr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||ii(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){ii(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!ii(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i<r&&this._removeElements(i,r-i)}_insertElements(e,t,n=!0){let r=this._cachedMeta,i=r.data,a=e+t,o,s=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;o<a;++o)i[o]=new this.dataElementType;this._parsing&&s(r._parsed),this.parse(e,t),n&&this.updateElements(i,e,t,`reset`)}updateElements(e,t,n,r){}_removeElements(e,t){let n=this._cachedMeta;if(this._parsing){let r=n._parsed.splice(e,t);n._stacked&&ri(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync([`_insertElements`,this.getDataset().data.length-e,e])}_onDataPop(){this._sync([`_removeElements`,this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync([`_removeElements`,0,1])}_onDataSplice(e,t){t&&this._sync([`_removeElements`,e,t]);let n=arguments.length-2;n&&this._sync([`_insertElements`,e,n])}_onDataUnshift(){this._sync([`_insertElements`,0,arguments.length])}};function ci(e,t){if(!e._cache.$bar){let n=e.getMatchingVisibleMetas(t),r=[];for(let t=0,i=n.length;t<i;t++)r=r.concat(n[t].controller.getAllParsedValues(e));e._cache.$bar=bt(r.sort((e,t)=>e-t))}return e._cache.$bar}function li(e){let t=e.iScale,n=ci(t,e.type),r=t._length,i,a,o,s,c=()=>{o===32767||o===-32768||(Re(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i<a;++i)o=t.getPixelForValue(n[i]),c();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),c();return r}function ui(e,t,n,r){let i=n.barThickness,a,o;return O(i)?(a=t.min*n.categoryPercentage,o=n.barPercentage):(a=i*r,o=1),{chunk:a/r,ratio:o,start:t.pixels[e]-a/2}}function di(e,t,n,r){let i=t.pixels,a=i[e],o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null,c=n.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);let l=a-(a-Math.min(o,s))/2*c;return{chunk:Math.abs(s-o)/2*c/r,ratio:n.barPercentage,start:l}}function fi(e,t,n,r){let i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),s=Math.max(i,a),c=o,l=s;Math.abs(o)>Math.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function pi(e,t,n,r){return k(e)?fi(e,t,n,r):t[n.axis]=n.parse(e,r),t}function mi(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l<u;++l)f=t[l],d={},d[i.axis]=s||i.parse(o[l],l),c.push(pi(f,d,a,l));return c}function hi(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function gi(e,t,n){return e===0?(t.isHorizontal()?1:-1)*(t.min>=n?1:-1):Ye(e)}function _i(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.base<e.y,n=`bottom`,r=`top`),t?(i=`end`,a=`start`):(i=`start`,a=`end`),{start:n,end:r,reverse:t,top:i,bottom:a}}function vi(e,t,n,r){let i=t.borderSkipped,a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:o,end:s,reverse:c,top:l,bottom:u}=_i(e);i===`middle`&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=l:(n._bottom||0)===r?i=u:(a[yi(u,o,s,c)]=!0,i=l)),a[yi(i,o,s,c)]=!0,e.borderSkipped=a}function yi(e,t,n,r){return r?(e=bi(e,t,n),e=xi(e,n,t)):e=xi(e,t,n),e}function bi(e,t,n){return e===t?n:e===n?t:e}function xi(e,t,n){return e===`start`?t:e===`end`?n:e}function Si(e,{inflateAmount:t},n){e.inflateAmount=t===`auto`?n===1?.33:0:t}var Ci=class extends si{static id=`bar`;static defaults={datasetElementType:!1,dataElementType:`bar`,categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:`number`,properties:[`x`,`y`,`base`,`width`,`height`]}}};static overrides={scales:{_index_:{type:`category`,offset:!0,grid:{offset:!0}},_value_:{type:`linear`,beginAtZero:!0}}};parsePrimitiveData(e,t,n,r){return mi(e,t,n,r)}parseArrayData(e,t,n,r){return mi(e,t,n,r)}parseObjectData(e,t,n,r){let{iScale:i,vScale:a}=e,{xAxisKey:o=`x`,yAxisKey:s=`y`}=this._parsing,c=i.axis===`x`?o:s,l=a.axis===`x`?o:s,u=[],d,f,p,m;for(d=n,f=n+r;d<f;++d)m=t[d],p={},p[i.axis]=i.parse(Ie(m,c),d),u.push(pi(Ie(m,l),p,a,d));return u}updateRangeFromParsed(e,t,n,r){super.updateRangeFromParsed(e,t,n,r);let i=n._custom;i&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){let{iScale:t,vScale:n}=this._cachedMeta,r=this.getParsed(e),i=r._custom,a=hi(i)?`[`+i.start+`, `+i.end+`]`:``+n.getLabelForValue(r[n.axis]);return{label:``+t.getLabelForValue(r[t.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){let t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{index:a,_cachedMeta:{vScale:o}}=this,s=o.getBasePixel(),c=o.isHorizontal(),l=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(t,r);for(let f=t;f<t+n;f++){let t=this.getParsed(f),n=i||O(t[o.axis])?{base:s,head:s}:this._calculateBarValuePixels(f),p=this._calculateBarIndexPixels(f,l),m=(t._stacks||{})[o.axis],h={horizontal:c,base:n.base,enableBorderRadius:!m||hi(t._custom)||a===m._top||a===m._bottom,x:c?n.head:p.center,y:c?p.center:n.head,height:c?p.size:Math.abs(n.size),width:c?Math.abs(n.size):p.size};d&&(h.options=u||this.resolveDataElementOptions(f,e[f].active?`active`:r));let g=h.options||e[f].options;vi(h,g,m,a),Si(h,g,l.ratio),this.updateElement(e[f],f,h,r)}}_getStacks(e,t){let{iScale:n}=this._cachedMeta,r=n.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),i=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),s=o&&o[n.axis],c=e=>{let t=e._parsed.find(e=>e[n.axis]===s),r=t&&t[e.vScale.axis];if(O(r)||isNaN(r))return!0};for(let n of r)if(!(t!==void 0&&c(n))&&((i===!1||a.indexOf(n.stack)===-1||i===void 0&&n.stack===void 0)&&a.push(n.stack),n.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i<a;++i)r.push(n.getPixelForValue(this.getParsed(i)[n.axis],i));let o=e.barThickness;return{min:o||li(t),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){let{_cachedMeta:{vScale:t,_stacked:n,index:r},options:{base:i,minBarLength:a}}=this,o=i||0,s=this.getParsed(e),c=s._custom,l=hi(c),u=s[t.axis],d=0,f=n?this.applyStack(t,s,n):u,p,m;f!==u&&(d=f-u,f=u),l&&(u=c.barStart,f=c.barEnd-c.barStart,u!==0&&Ye(u)!==Ye(c.barEnd)&&(d=0),d+=u);let h=!O(i)&&!l?i:d,g=t.getPixelForValue(h);if(p=this.chart.getDataVisibility(e)?t.getPixelForValue(d+f):g,m=p-g,Math.abs(m)<a){m=gi(m,t,o)*a,u===o&&(g-=m/2);let e=t.getPixelForDecimal(0),i=t.getPixelForDecimal(1),c=Math.min(e,i),d=Math.max(e,i);g=Math.max(Math.min(g,d),c),p=g+m,n&&!l&&(s._stacks[t.axis]._visualValues[r]=t.getValueForPixel(p)-t.getValueForPixel(g))}if(g===t.getPixelForValue(o)){let e=Ye(m)*t.getLineWidthForValue(o)/2;g+=e,m-=e}return{size:m,base:g,head:p,center:p+m/2}}_calculateBarIndexPixels(e,t){let n=t.scale,r=this.options,i=r.skipNull,a=M(r.maxBarThickness,1/0),o,s;if(t.grouped){let n=i?this._getStackCount(e):t.stackCount,c=r.barThickness===`flex`?di(e,t,r,n):ui(e,t,r,n),l=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0);o=c.start+c.chunk*l+c.chunk/2,s=Math.min(a,c.chunk*c.ratio)}else o=n.getPixelForValue(this.getParsed(e)[n.axis],e),s=Math.min(a,t.min*t.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}}draw(){let e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length,i=0;for(;i<r;++i)this.getParsed(i)[t.axis]!==null&&!n[i].hidden&&n[i].draw(this._ctx)}};function wi(e,t,n){let r=1,i=1,a=0,o=0;if(t<I){let s=e,c=s+t,l=Math.cos(s),u=Math.sin(s),d=Math.cos(c),f=Math.sin(c),p=(e,t,r)=>ut(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>ut(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(Ge,u,f),_=m(F,l,d),v=m(F+Ge,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Ti=class extends si{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(A(n[e])){let{key:e=`value`}=this._parsing;i=t=>+Ie(n[t],e)}let a,o;for(a=e,o=e+t;a<o;++a)r._parsed[a]=i(a)}}_getRotation(){return rt(this.options.rotation-90)}_getCircumference(){return rt(this.options.circumference)}_getRotationExtents(){let e=I,t=-I;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let r=this.chart.getDatasetMeta(n).controller,i=r._getRotation(),a=r._getCircumference();e=Math.min(e,i),t=Math.max(t,i+a)}return{rotation:e,circumference:t-e}}update(e){let{chartArea:t}=this.chart,n=this._cachedMeta,r=n.data,i=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(t.width,t.height)-i)/2,0),o=Math.min(we(this.options.cutout,a),1),s=this._getRingWeight(this.index),{circumference:c,rotation:l}=this._getRotationExtents(),{ratioX:u,ratioY:d,offsetX:f,offsetY:p}=wi(l,c,o),m=(t.width-i)/u,h=(t.height-i)/d,g=Math.max(Math.min(m,h)/2,0),_=Te(this.options.radius,g),v=(_-Math.max(_*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*_,this.offsetY=p*_,n.total=this.calculateTotal(),this.outerRadius=_-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*s,0),this.updateElements(r,0,r.length,e)}_circumference(e,t){let n=this.options,r=this._cachedMeta,i=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||r._parsed[e]===null||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/I)}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.chartArea,s=a.options.animation,c=(o.left+o.right)/2,l=(o.top+o.bottom)/2,u=i&&s.animateScale,d=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,r),h=this._getRotation(),g;for(g=0;g<t;++g)h+=this._circumference(g,i);for(g=t;g<t+n;++g){let t=this._circumference(g,i),n=e[g],a={x:c+this.offsetX,y:l+this.offsetY,startAngle:h,endAngle:h+t,circumference:t,outerRadius:f,innerRadius:d};m&&(a.options=p||this.resolveDataElementOptions(g,n.active?`active`:r)),h+=t,this.updateElement(n,g,a,r)}}calculateTotal(){let e=this._cachedMeta,t=e.data,n=0,r;for(r=0;r<t.length;r++){let i=e._parsed[r];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(r)&&!t[r].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){let t=this._cachedMeta.total;return t>0&&!isNaN(e)?I*(Math.abs(e)/t):0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Vt(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r<i;++r)if(n.isDatasetVisible(r)){a=n.getDatasetMeta(r),e=a.data,o=a.controller;break}}if(!e)return 0;for(r=0,i=e.length;r<i;++r)s=o.resolveDataElementOptions(r),s.borderAlign!==`inner`&&(t=Math.max(t,s.borderWidth||0,s.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){let e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(M(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},Ei=class extends si{static id=`line`;static defaults={datasetElementType:`line`,dataElementType:`point`,showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:`category`},_value_:{type:`linear`}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let t=this._cachedMeta,{dataset:n,data:r=[],_dataset:i}=t,a=this.chart._animationsDisabled,{start:o,count:s}=R(t,r,a);this._drawStart=o,this._drawCount=s,Dt(t)&&(o=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=r;let c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:c},e),this.updateElements(r,o,s,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o,_stacked:s,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,r),d=a.axis,f=o.axis,{spanGaps:p,segment:m}=this.options,h=et(p)?p:1/0,g=this.chart._animationsDisabled||i||r===`none`,_=t+n,v=e.length,y=t>0&&this.getParsed(t-1);for(let n=0;n<v;++n){let p=e[n],v=g?p:{};if(n<t||n>=_){v.skip=!0;continue}let b=this.getParsed(n),x=O(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Di=class extends Ti{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},Oi=class extends si{static id=`scatter`;static defaults={datasetElementType:!1,dataElementType:`point`,showLine:!1,fill:!1};static overrides={interaction:{mode:`point`},scales:{x:{type:`linear`},y:{type:`linear`}}};getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y);return{label:n[e]||``,value:`(`+o+`, `+s+`)`}}update(e){let t=this._cachedMeta,{data:n=[]}=t,r=this.chart._animationsDisabled,{start:i,count:a}=R(t,n,r);if(this._drawStart=i,this._drawCount=a,Dt(t)&&(i=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:i,_dataset:a}=t;i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=n;let o=this.resolveDatasetElementOptions(e);o.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:o},e)}else this.datasetElementType&&=(delete t.dataset,!1);this.updateElements(n,i,a,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement(`line`)),super.addElements()}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o,_stacked:s,_dataset:c}=this._cachedMeta,l=this.resolveDataElementOptions(t,r),u=this.getSharedOptions(l),d=this.includeOptions(r,u),f=a.axis,p=o.axis,{spanGaps:m,segment:h}=this.options,g=et(m)?m:1/0,_=this.chart._animationsDisabled||i||r===`none`,v=t>0&&this.getParsed(t-1);for(let l=t;l<t+n;++l){let t=e[l],n=this.getParsed(l),m=_?t:{},y=O(n[p]),b=m[f]=a.getPixelForValue(n[f],l),x=m[p]=i||y?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,n,s):n[p],l);m.skip=isNaN(b)||isNaN(x)||y,m.stop=l>0&&Math.abs(n[f]-v[f])>g,h&&(m.parsed=n,m.raw=c.data[l]),d&&(m.options=u||this.resolveDataElementOptions(l,t.active?`active`:r)),_||this.updateElement(t,l,m,r),v=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}};function ki(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Ai={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return ki()}parse(){return ki()}format(){return ki()}add(){return ki()}diff(){return ki()}startOf(){return ki()}endOf(){return ki()}}};function ji(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?gt:ht;if(r){if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}else{let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!O(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!O(e[t.axis]));r.hi+=Math.max(0,o)}return r}}return{lo:0,hi:a.length-1}}function Mi(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e<n;++e){let{index:n,data:s}=a[e],{lo:c,hi:l}=ji(a[e],t,o,i);for(let e=c;e<=l;++e){let t=s[e];t.skip||r(t,n,e)}}}function Ni(e){let t=e.indexOf(`x`)!==-1,n=e.indexOf(`y`)!==-1;return function(e,r){let i=t?Math.abs(e.x-r.x):0,a=n?Math.abs(e.y-r.y):0;return Math.sqrt(i**2+a**2)}}function Pi(e,t,n,r,i){let a=[];return!i&&!e.isPointInArea(t)||Mi(e,n,t,function(n,o,s){!i&&!rn(n,e.chartArea,0)||n.inRange(t.x,t.y,r)&&a.push({element:n,datasetIndex:o,index:s})},!0),a}function Fi(e,t,n,r){let i=[];function a(e,n,a){let{startAngle:o,endAngle:s}=e.getProps([`startAngle`,`endAngle`],r),{angle:c}=ot(e,{x:t.x,y:t.y});ut(c,o,s)&&i.push({element:e,datasetIndex:n,index:a})}return Mi(e,n,t,a),i}function Ii(e,t,n,r,i,a){let o=[],s=Ni(n),c=1/0;function l(n,l,u){let d=n.inRange(t.x,t.y,i);if(r&&!d)return;let f=n.getCenterPoint(i);if(!(a||e.isPointInArea(f))&&!d)return;let p=s(t,f);p<c?(o=[{element:n,datasetIndex:l,index:u}],c=p):p===c&&o.push({element:n,datasetIndex:l,index:u})}return Mi(e,n,t,l),o}function Li(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n===`r`&&!r?Fi(e,t,n,i):Ii(e,t,n,r,i,a)}function Ri(e,t,n,r,i){let a=[],o=n===`x`?`inXRange`:`inYRange`,s=!1;return Mi(e,n,t,(e,r,c)=>{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var zi={evaluateInteractionItems:Mi,modes:{index(e,t,n,r){let i=sr(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Pi(e,i,a,r,o):Li(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=sr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Pi(e,i,a,r,o):Li(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;e<n.length;++e)s.push({element:n[e],datasetIndex:t,index:e})}return s},point(e,t,n,r){return Pi(e,sr(t,e),n.axis||`xy`,r,n.includeInvisible||!1)},nearest(e,t,n,r){let i=sr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1;return Li(e,i,a,n.intersect,r,o)},x(e,t,n,r){return Ri(e,sr(t,e),`x`,n.intersect,r)},y(e,t,n,r){return Ri(e,sr(t,e),`y`,n.intersect,r)}}},Bi=[`left`,`top`,`right`,`bottom`];function Vi(e,t){return e.filter(e=>e.pos===t)}function Hi(e,t){return e.filter(e=>Bi.indexOf(e.pos)===-1&&e.box.axis===t)}function Ui(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function Wi(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function Gi(e){let t={};for(let n of e){let{stack:e,pos:r,stackWeight:i}=n;if(!e||!Bi.includes(r))continue;let a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return t}function Ki(e,t){let n=Gi(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t,a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];let{fullSize:o}=s.box,c=n[s.stack],l=c&&s.stackWeight/c.weight;s.horizontal?(s.width=l?l*r:o&&t.availableWidth,s.height=i):(s.width=r,s.height=l?l*i:o&&t.availableHeight)}return n}function qi(e){let t=Wi(e),n=Ui(t.filter(e=>e.box.fullSize),!0),r=Ui(Vi(t,`left`),!0),i=Ui(Vi(t,`right`)),a=Ui(Vi(t,`top`),!0),o=Ui(Vi(t,`bottom`)),s=Hi(t,`x`),c=Hi(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Vi(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function Ji(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Yi(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Xi(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!A(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&Yi(o,a.getPadding());let s=Math.max(0,t.outerWidth-Ji(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-Ji(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function Zi(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function Qi(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function $i(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a<o;++a){s=e[a],c=s.box,c.update(s.width||t.w,s.height||t.h,Qi(s.horizontal,t));let{same:o,other:d}=Xi(t,n,s,r);l|=o&&i.length,u||=d,c.fullSize||i.push(s)}return l&&$i(i,t,n,r)||u}function ea(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function ta(e,t,n,r){let i=n.padding,{x:a,y:o}=t;for(let s of e){let e=s.box,c=r[s.stack]||{count:1,placed:0,weight:1},l=s.stackWeight/c.weight||1;if(s.horizontal){let r=t.w*l,a=c.size||e.height;Re(c.start)&&(o=c.start),e.fullSize?ea(e,i.left,o,n.outerWidth-i.right-i.left,a):ea(e,t.left+c.placed,o,r,a),c.start=o,c.placed+=r,o=e.bottom}else{let r=t.h*l,o=c.size||e.width;Re(c.start)&&(a=c.start),e.fullSize?ea(e,a,i.top,o,n.outerHeight-i.bottom-i.top):ea(e,a,t.top+c.placed,o,r),c.start=a,c.placed+=r,a=e.right}}t.x=a,t.y=o}var na={addBox(e,t){e.boxes||=[],t.fullSize=t.fullSize||!1,t.position=t.position||`top`,t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;let i=H(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),s=qi(e.boxes),c=s.vertical,l=s.horizontal;P(e.boxes,e=>{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);Yi(f,H(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=Ki(c.concat(l),d);$i(s.fullSize,p,d,m),$i(c,p,d,m),$i(l,p,d,m)&&$i(c,p,d,m),Zi(p),ta(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,ta(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},P(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},ra=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},ia=class extends ra{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},aa=`$chartjs`,oa={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},sa=e=>e===null||e===``;function ca(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[aa]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,sa(i)){let t=pr(e,`width`);t!==void 0&&(e.width=t)}if(sa(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=pr(e,`height`);t!==void 0&&(e.height=t)}return e}var la=fr?{passive:!0}:!1;function ua(e,t,n){e&&e.addEventListener(t,n,la)}function da(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,la)}function fa(e,t){let n=oa[e.type]||e.type,{x:r,y:i}=sr(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function pa(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function ma(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=pa(n.addedNodes,r),t&&=!pa(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function ha(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=pa(n.removedNodes,r),t&&=!pa(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var ga=new Map,_a=0;function va(){let e=window.devicePixelRatio;e!==_a&&(_a=e,ga.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function ya(e,t){ga.size||window.addEventListener(`resize`,va),ga.set(e,t)}function ba(e){ga.delete(e),ga.size||window.removeEventListener(`resize`,va)}function xa(e,t,n){let r=e.canvas,i=r&&$n(r);if(!i)return;let a=St((e,t)=>{let r=i.clientWidth;n(e,t),r<i.clientWidth&&n()},window),o=new ResizeObserver(e=>{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),ya(e,a),o}function Sa(e,t,n){n&&n.disconnect(),t===`resize`&&ba(e)}function Ca(e,t,n){let r=e.canvas,i=St(t=>{e.ctx!==null&&n(fa(t,e))},e);return ua(r,t,i),i}var wa=class extends ra{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(ca(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[aa])return!1;let n=t[aa].initial;[`height`,`width`].forEach(e=>{let r=n[e];O(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[aa],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:ma,detach:ha,resize:xa}[t]||Ca)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:Sa,detach:Sa,resize:Sa}[t]||da)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return ur(e,t,n,r)}isAttached(e){let t=e&&$n(e);return!!(t&&t.isConnected)}};function Ta(e){return!Qn()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?ia:wa}var Ea=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return et(this.x)&&et(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Da(e,t){let n=e.options.ticks,r=Oa(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?ka(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Aa(t,l,a,o/i),l;let u=G(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(ja(t,l,u,O(r)?0:s-r,s),e=0,n=o-1;e<n;e++)ja(t,l,u,a[e],a[e+1]);return ja(t,l,u,c,O(r)?t.length:c+r),l}return ja(t,l,u),l}function Oa(e){let t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function G(e,t,n){let r=Ma(e),i=t.length/n;if(!r)return Math.max(i,1);let a=Qe(r);for(let e=0,t=a.length-1;e<t;e++){let t=a[e];if(t>i)return t}return Math.max(i,1)}function ka(e){let t=[],n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Aa(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function ja(e,t,n,r,i){let a=M(r,0),o=Math.min(M(i,e.length),e.length),s=0,c,l,u;for(n=Math.ceil(n),i&&(c=i-r,n=c/Math.floor(c/n)),u=a;u<0;)s++,u=Math.round(a+s*n);for(l=Math.max(a,0);l<o;l++)l===u&&(t.push(e[l]),s++,u=Math.round(a+s*n))}function Ma(e){let t=e.length,n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}var Na=e=>e===`left`?`right`:e===`right`?`left`:e,Pa=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Fa=(e,t)=>Math.min(t||e,e);function Ia(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function La(e,t,n){let r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6,c=e.getPixelForTick(i),l;if(!(n&&(l=r===1?Math.max(c-a,o-c):t===0?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,c+=i<t?l:-l,c<a-s||c>o+s)))return c}function Ra(e,t){P(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;i<r;++i)delete e.data[n[i]];n.splice(0,r)}})}function za(e){return e.drawTicks?e.tickLength:0}function Ba(e,t){if(!e.display)return 0;let n=yn(e.font,t),r=H(e.padding);return(k(e.text)?e.text.length:1)*n.lineHeight+r.height}function Va(e,t){return Sn(e,{scale:t,type:`scale`})}function Ha(e,t,n){return Sn(e,{tick:n,index:t,type:`tick`})}function Ua(e,t,n){let r=wt(e);return(n&&t!==`right`||!n&&t===`right`)&&(r=Na(r)),r}function Wa(e,t,n,r){let{top:i,left:a,bottom:o,right:s,chart:c}=e,{chartArea:l,scales:u}=c,d=0,f,p,m,h=o-i,g=s-a;if(e.isHorizontal()){if(p=Tt(r,a,s),A(n)){let e=Object.keys(n)[0],r=n[e];m=u[e].getPixelForValue(r)+h-t}else m=n===`center`?(l.bottom+l.top)/2+h-t:Pa(e,n,t);f=s-a}else{if(A(n)){let e=Object.keys(n)[0],r=n[e];p=u[e].getPixelForValue(r)-g+t}else p=n===`center`?(l.left+l.right)/2-g+t:Pa(e,n,t);m=Tt(r,o,i),d=n===`left`?-Ge:Ge}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}var Ga=class e extends Ea{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=Ce(e,1/0),t=Ce(t,-1/0),n=Ce(n,1/0),r=Ce(r,-1/0),{min:Ce(e,n),max:Ce(t,r),minDefined:j(e),maxDefined:j(t)}}getMinMax(e){let{min:t,max:n,minDefined:r,maxDefined:i}=this.getUserBounds(),a;if(r&&i)return{min:t,max:n};let o=this.getMatchingVisibleMetas();for(let s=0,c=o.length;s<c;++s)a=o[s].controller.getMinMax(this,e),r||(t=Math.min(t,a.min)),i||(n=Math.max(n,a.max));return t=i&&t>n?n:t,n=r&&t>n?t:n,{min:Ce(t,Ce(n,t)),max:Ce(n,Ce(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xn(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o<this.ticks.length;this._convertTicksToLabels(s?Ia(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source===`auto`)&&(this.ticks=Da(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){N(this.options.afterUpdate,[this])}beforeSetDimensions(){N(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){N(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),N(this.options[e],[this])}beforeDataLimits(){this._callHooks(`beforeDataLimits`)}determineDataLimits(){}afterDataLimits(){this._callHooks(`afterDataLimits`)}beforeBuildTicks(){this._callHooks(`beforeBuildTicks`)}buildTicks(){return[]}afterBuildTicks(){this._callHooks(`afterBuildTicks`)}beforeTickToLabelConversion(){N(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t=this.options.ticks,n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n],i.label=N(t.callback,[i.value,n,e],this)}afterTickToLabelConversion(){N(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){N(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,n=Fa(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,i=t.maxRotation,a=r,o,s,c;if(!this._isVisible()||!t.display||r>=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=dt(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-za(e.grid)-t.padding-Ba(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=it(Math.min(Math.asin(dt((l.highest.height+6)/o,-1,1)),Math.asin(dt(s/c,-1,1))-Math.asin(dt(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Ba(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=za(i)+a):(e.height=this.maxHeight,e.width=za(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=rt(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){N(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t<n;t++)O(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=Ia(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){let{ctx:r,_longestTextCache:i}=this,a=[],o=[],s=Math.floor(t/Fa(t,n)),c=0,l=0,u,d,f,p,m,h,g,_,v,y,b;for(u=0;u<t;u+=s){if(p=e[u].label,m=this._resolveTickFontOptions(u),r.font=h=m.string,g=i[h]=i[h]||{data:{},gc:[]},_=m.lineHeight,v=y=0,!O(p)&&!k(p))v=Zt(r,g.data,g.gc,v,p),y=_;else if(k(p))for(d=0,f=p.length;d<f;++d)b=p[d],!O(b)&&!k(b)&&(v=Zt(r,g.data,g.gc,v,b),y+=_);a.push(v),o.push(y),c=Math.max(v,c),l=Math.max(y,l)}Ra(i,t);let x=a.indexOf(c),S=o.indexOf(l),C=e=>({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return ft(this._alignToPixels?$t(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let n=t[e];return n.$context||=Ha(this.getContext(),e,n)}return this.$context||=Va(this.chart.getContext(),this)}_tickSize(){let e=this.options.ticks,t=rt(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?s*n>o*r?o/n:s/r:s*r<o*n?s/n:o/r}_isVisible(){let e=this.options.display;return e===`auto`?this.getMatchingVisibleMetas().length>0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+(s?1:0),u=za(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return $t(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,ee;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,ee=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,ee=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(A(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,ee=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(A(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let te=M(r.ticks.maxTicksLimit,l),ne=Math.max(1,Math.ceil(l/te));for(_=0;_<l;_+=ne){let e=this.getContext(_),t=i.setContext(e),r=o.setContext(e),a=t.lineWidth,l=t.color,u=r.dash||[],f=r.dashOffset,p=t.tickWidth,m=t.tickColor,h=t.tickBorderDash||[],g=t.tickBorderDashOffset;v=La(this,_,s),v!==void 0&&(y=$t(n,v,a),c?b=S=w=E=y:x=C=T=ee=y,d.push({tx1:b,ty1:x,tx2:S,ty2:C,x1:w,y1:T,x2:E,y2:ee,width:a,color:l,borderDash:u,borderDashOffset:f,tickWidth:p,tickColor:m,tickBorderDash:h,tickBorderDashOffset:g}))}return this._ticksLength=l,this._borderValue=g,d}_computeLabelItems(e){let t=this.axis,n=this.options,{position:r,ticks:i}=n,a=this.isHorizontal(),o=this.ticks,{align:s,crossAlign:c,padding:l,mirror:u}=i,d=za(n.grid),f=d+l,p=u?-l:f,m=-rt(this.labelRotation),h=[],g,_,v,y,b,x,S,C,w,T,E,ee,te=`middle`;if(r===`top`)x=this.bottom-p,S=this._getXAxisLabelAlignment();else if(r===`bottom`)x=this.top+p,S=this._getXAxisLabelAlignment();else if(r===`left`){let e=this._getYAxisLabelAlignment(d);S=e.textAlign,b=e.x}else if(r===`right`){let e=this._getYAxisLabelAlignment(d);S=e.textAlign,b=e.x}else if(t===`x`){if(r===`center`)x=(e.top+e.bottom)/2+f;else if(A(r)){let e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)+f}S=this._getXAxisLabelAlignment()}else if(t===`y`){if(r===`center`)b=(e.left+e.right)/2-f;else if(A(r)){let e=Object.keys(r)[0],t=r[e];b=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(d).textAlign}t===`y`&&(s===`start`?te=`top`:s===`end`&&(te=`bottom`));let ne=this._getLabelSizes();for(g=0,_=o.length;g<_;++g){v=o[g],y=v.label;let e=i.setContext(this.getContext(g));C=this.getPixelForTick(g)+i.labelOffset,w=this._resolveTickFontOptions(g),T=w.lineHeight,E=k(y)?y.length:1;let t=E/2,n=e.color,s=e.textStrokeColor,l=e.textStrokeWidth,d=S;a?(b=C,S===`inner`&&(d=g===_-1?this.options.reverse?`left`:`right`:g===0?this.options.reverse?`right`:`left`:`center`),ee=r===`top`?c===`near`||m!==0?-E*T+T/2:c===`center`?-ne.highest.height/2-t*T+T:-ne.highest.height+T/2:c===`near`||m!==0?T/2:c===`center`?ne.highest.height/2-t*T:ne.highest.height-E*T,u&&(ee*=-1),m!==0&&!e.showLabelBackdrop&&(b+=T/2*Math.sin(m))):(x=C,ee=(1-E)*T/2);let f;if(e.showLabelBackdrop){let t=H(e.backdropPadding),n=ne.heights[g],r=ne.widths[g],i=ee-t.top,a=0-t.left;switch(te){case`middle`:i-=n/2;break;case`bottom`:i-=n;break}switch(S){case`center`:a-=r/2;break;case`right`:a-=r;break;case`inner`:g===_-1?a-=r:g>0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:ee,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:te,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-rt(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i<a;++i){let e=r[i];t.drawOnChartArea&&o({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&o({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:t,options:{border:n,grid:r}}=this,i=n.setContext(this.getContext()),a=n.display?i.width:0;if(!a)return;let o=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue,c,l,u,d;this.isHorizontal()?(c=$t(e,this.left,a)-a/2,l=$t(e,this.right,o)+o/2,u=d=s):(u=$t(e,this.top,a)-a/2,d=$t(e,this.bottom,o)+o/2,c=l=s),t.save(),t.lineWidth=i.width,t.strokeStyle=i.color,t.beginPath(),t.moveTo(c,u),t.lineTo(l,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let t=this.ctx,n=this._computeLabelArea();n&&an(t,n);let r=this.getLabelItems(e);for(let e of r){let n=e.options,r=e.font,i=e.label,a=e.textOffset;un(t,i,0,a,r,n)}n&&B(t)}drawTitle(){let{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;let i=yn(n.font),a=H(n.padding),o=n.align,s=i.lineHeight/2;t===`bottom`||t===`center`||A(t)?(s+=a.bottom,k(n.text)&&(s+=i.lineHeight*(n.text.length-1))):s+=a.top;let{titleX:c,titleY:l,maxWidth:u,rotation:d}=Wa(this,s,t,o);un(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:d,textAlign:Ua(o,t,r),textBaseline:`middle`,translation:[c,l]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let t=this.options,n=t.ticks&&t.ticks.z||0,r=M(t.grid&&t.grid.z,-1),i=M(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:n,draw:e=>{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i<a;++i){let a=t[i];a[n]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){return yn(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},Ka=class{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),n;Ya(t)&&(n=this.register(t));let r=this.items,i=e.id,a=this.scope+`.`+i;if(!i)throw Error(`class does not have id: `+e);return i in r?a:(r[i]=e,qa(e,a,n),this.override&&z.override(e.id,e.overrides),a)}get(e){return this.items[e]}unregister(e){let t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in z[r]&&(delete z[r][n],this.override&&delete Kt[n])}};function qa(e,t,n){let r=Ae(Object.create(null),[n?z.get(n):{},z.get(t),e.defaults]);z.set(t,r),e.defaultRoutes&&Ja(t,e.defaultRoutes),e.descriptors&&z.describe(t,e.descriptors)}function Ja(e,t){Object.keys(t).forEach(n=>{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);z.route(a,i,c,s)})}function Ya(e){return`id`in e&&`defaults`in e}var Xa=new class{constructor(){this.controllers=new Ka(si,`datasets`,!0),this.elements=new Ka(Ea,`elements`),this.plugins=new Ka(Object,`plugins`),this.scales=new Ka(Ga,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):P(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=Le(e);N(n[`before`+r],[],n),t[e](n),N(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){let r=t.get(e);if(r===void 0)throw Error(`"`+e+`" is not a registered `+n+`.`);return r}},Za=class{constructor(){this._init=[]}notify(e,t,n,r){t===`beforeInit`&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,`install`));let i=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(i,e,t,n);return t===`afterDestroy`&&(this._notify(i,e,`stop`),this._notify(this._init,e,`uninstall`)),a}_notify(e,t,n,r){r||={};for(let i of e){let e=i.plugin,a=e[n];if(N(a,[t,r,i.options],e)===!1&&r.cancelable)return!1}return!0}invalidate(){O(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let n=e&&e.config,r=M(n.options&&n.options.plugins,{}),i=Qa(n);return r===!1&&!t?[]:eo(e,i,r,t)}_notifyStateChanges(e){let t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function Qa(e){let t={},n=[],r=Object.keys(Xa.plugins.items);for(let e=0;e<r.length;e++)n.push(Xa.getPlugin(r[e]));let i=e.plugins||[];for(let e=0;e<i.length;e++){let r=i[e];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function $a(e,t){return!t&&e===!1?null:e===!0?{}:e}function eo(e,{plugins:t,localIds:n},r,i){let a=[],o=e.getContext();for(let s of t){let t=s.id,c=$a(r[t],i);c!==null&&a.push({plugin:s,options:to(e.config,{plugin:s,local:n[t]},c,o)})}return a}function to(e,{plugin:t,local:n},r,i){let a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[``],{scriptable:!1,indexable:!1,allKeys:!0})}function no(e,t){let n=z.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||`x`}function ro(e,t){let n=e;return e===`_index_`?n=t:e===`_value_`&&(n=t===`x`?`y`:`x`),n}function io(e,t){return e===t?`_index_`:`_value_`}function ao(e){if(e===`x`||e===`y`||e===`r`)return e}function oo(e){if(e===`top`||e===`bottom`)return`x`;if(e===`left`||e===`right`)return`y`}function so(e,...t){if(ao(e))return e;for(let n of t){let t=n.axis||oo(n.position)||e.length>1&&ao(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function co(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function lo(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return co(e,`x`,n[0])||co(e,`y`,n[0])}return{}}function uo(e,t){let n=Kt[e.type]||{scales:{}},r=t.scales||{},i=no(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!A(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=so(t,o,lo(t,e),z.scales[o.type]),c=io(s,i),l=n.scales||{};a[t]=je(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||no(i,t),s=(Kt[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=ro(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),je(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];je(t,[z.scales[t.type],z.scale])}),a}function fo(e){let t=e.options||={};t.plugins=M(t.plugins,{}),t.scales=uo(e,t)}function po(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function mo(e){return e||={},e.data=po(e.data),fo(e),e}var ho=new Map,go=new Set;function _o(e,t){let n=ho.get(e);return n||(n=t(),ho.set(e,n),go.add(n)),n}var vo=(e,t,n)=>{let r=Ie(t,n);r!==void 0&&e.add(r)},yo=class{constructor(e){this._config=mo(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=po(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),fo(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return _o(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return _o(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return _o(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return _o(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>vo(s,e,t))),t.forEach(e=>vo(s,r,e)),t.forEach(e=>vo(s,Kt[i]||{},e)),t.forEach(e=>vo(s,z,e)),t.forEach(e=>vo(s,qt,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),go.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Kt[t]||{},z.datasets[t]||{},{type:t},z,qt]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=bo(this._resolverCache,e,r),s=a;if(So(a,t)){i.$shared=!1,n=ze(n)?n():n;let t=this.createResolver(e,n,o);s=wn(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=bo(this._resolverCache,e,n);return A(t)?wn(i,t,void 0,r):i}};function bo(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:Cn(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var xo=e=>A(e)&&Object.getOwnPropertyNames(e).some(t=>ze(e[t]));function So(e,t){let{isScriptable:n,isIndexable:r}=Tn(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(ze(o)||xo(o))||a&&k(o))return!0}return!1}var Co=`4.4.9`,wo=[`top`,`bottom`,`left`,`right`,`chartArea`];function To(e,t){return e===`top`||e===`bottom`||wo.indexOf(e)===-1&&t===`x`}function Eo(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Do(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),N(n&&n.onComplete,[e],t)}function Oo(e){let t=e.chart,n=t.options.animation;N(n&&n.onProgress,[e],t)}function ko(e){return Qn()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var Ao={},jo=e=>{let t=ko(e);return Object.values(Ao).filter(e=>e.canvas===t).pop()};function Mo(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function No(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Po=class{static defaults=z;static instances=Ao;static overrides=Kt;static registry=Xa;static version=Co;static getChart=jo;static register(...e){Xa.add(...e),Fo()}static unregister(...e){Xa.remove(...e),Fo()}constructor(e,t){let n=this.config=new yo(t),r=ko(e),i=jo(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Ta(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Se(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Za,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ct(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],Ao[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}Ir.listen(this,`complete`,Do),Ir.listen(this,`progress`,Oo),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return O(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Xa}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():dr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return en(this.canvas,this.ctx),this}stop(){return Ir.stop(this),this}resize(e,t){Ir.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,dr(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),N(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){P(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=so(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),P(i,t=>{let i=t.options,a=i.id,o=so(a,i),s=M(i.type,t.dtype);(i.position===void 0||To(i.position,o)!==To(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(Xa.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),P(r,(e,t)=>{e||delete n[t]}),P(n,e=>{na.configure(this,e,e.options),na.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(Eo(`order`,`index`))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){let r=t[n],i=this.getDatasetMeta(n),a=r.type||this.config.type;if(i.type&&i.type!==a&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=a,i.indexAxis=r.indexAxis||no(a,this.options),i.order=r.order||0,i.index=n,i.label=``+r.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{let t=Xa.getController(a),{datasetElementType:r,dataElementType:o}=z.datasets[a];Object.assign(t,{dataElementType:Xa.getElement(o),datasetElementType:r&&Xa.getElement(r)}),i.controller=new t(this,n),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){P(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){let{controller:t}=this.getDatasetMeta(e),n=!r&&i.indexOf(t)===-1;t.buildOrUpdateElements(n),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),r||P(i,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Eo(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){P(this.scales,e=>{na.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!Be(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Mo(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;e<t;e++)if(!Be(r,n(e)))return;return Array.from(r).map(e=>e.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;na.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],P(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,ze(e)?e({datasetIndex:t}):e);this.notifyPlugins(`afterDatasetsUpdate`,{mode:e})}}_updateDataset(e,t){let n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins(`beforeDatasetUpdate`,r)!==!1&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins(`afterDatasetUpdate`,r))}render(){this.notifyPlugins(`beforeRender`,{cancelable:!0})!==!1&&(Ir.has(this)?this.attached&&!Ir.running(this)&&Ir.start(this):(this.draw(),Do({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins(`beforeDraw`,{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins(`afterDraw`)}_getSortedDatasetMetas(e){let t=this._sortedMetasets,n=[],r,i;for(r=0,i=t.length;r<i;++r){let i=t[r];(!e||i.visible)&&n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins(`beforeDatasetsDraw`,{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Fr(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&an(t,r),e.controller.draw(),r&&B(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return rn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=zi.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>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}getContext(){return this.$context||=Sn(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);Re(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Ir.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins(`beforeDestroy`);let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),en(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Ao[this.id],this.notifyPlugins(`afterDestroy`)}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};P(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){P(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},P(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o<s;++o){a=e[o];let t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[r+`HoverStyle`](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],n=e.map(({datasetIndex:e,index:t})=>{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ee(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=Ve(e),c=No(e,this._lastEvent,n,s);n&&(this._lastEvent=null,N(i.onHover,[e,o,this],this),s&&N(i.onClick,[e,o,this],this));let l=!Ee(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Fo(){return P(Po.instances,e=>e._plugins.invalidate())}function Io(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+Ge,r-Ge),e.closePath(),e.clip()}function Lo(e){return gn(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Ro(e,t,n,r){let i=Lo(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return dt(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:dt(i.innerStart,0,o),innerEnd:dt(i.innerEnd,0,o)}}function zo(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Bo(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/F)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Ro(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,ee=f+x,te=g+b/E,ne=_-x/ee;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=zo(C,T,o,s);e.arc(t.x,t.y,y,T,_+Ge)}let n=zo(ee,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=zo(ee,ne,o,s);e.arc(t.x,t.y,x,_+Ge,ne+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=zo(E,te,o,s);e.arc(t.x,t.y,b,te+Math.PI,g-Ge)}let i=zo(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=zo(S,w,o,s);e.arc(t.x,t.y,v,g-Ge,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Vo(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Bo(e,t,n,r,c,i);for(let t=0;t<a;++t)e.fill();isNaN(s)||(c=o+(s%I||I))}return Bo(e,t,n,r,c,i),e.fill(),c}function Ho(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s,options:c}=t,{borderWidth:l,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=c,p=c.borderAlign===`inner`;if(!l)return;e.setLineDash(d||[]),e.lineDashOffset=f,p?(e.lineWidth=l*2,e.lineJoin=u||`round`):(e.lineWidth=l,e.lineJoin=u||`bevel`);let m=t.endAngle;if(a){Bo(e,t,n,r,m,i);for(let t=0;t<a;++t)e.stroke();isNaN(s)||(m=o+(s%I||I))}p&&Io(e,t,m),a||(Bo(e,t,n,r,m,i),e.stroke())}var Uo=class extends Ea{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=ot(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=M(l,o-a),f=ut(r,a,o)&&a!==o,p=d>=I||f,m=pt(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>I?Math.floor(n/I):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(F,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Vo(e,this,s,i,a),Ho(e,this,s,i,a),e.restore()}};function Wo(e,t,n=t){e.lineCap=M(n.borderCapStyle,t.borderCapStyle),e.setLineDash(M(n.borderDash,t.borderDash)),e.lineDashOffset=M(n.borderDashOffset,t.borderDashOffset),e.lineJoin=M(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=M(n.borderWidth,t.borderWidth),e.strokeStyle=M(n.borderColor,t.borderColor)}function Go(e,t,n){e.lineTo(n.x,n.y)}function Ko(e){return e.stepped?V:e.tension||e.cubicInterpolationMode===`monotone`?on:Go}function qo(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:r,start:c,loop:t.loop,ilen:l<c&&!u?r+l-c:l-c}}function Jo(e,t,n,r){let{points:i,options:a}=t,{count:o,start:s,loop:c,ilen:l}=qo(i,n,r),u=Ko(a),{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=l;++p)m=i[(s+(f?l-p:p))%o],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,a.stepped),h=m);return c&&(m=i[(s+(f?l:0))%o],u(e,h,m,f,a.stepped)),!!c}function Yo(e,t,n,r){let i=t.points,{count:a,start:o,ilen:s}=qo(i,n,r),{move:c=!0,reverse:l}=r||{},u=0,d=0,f,p,m,h,g,_,v=e=>(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(n<h?h=n:n>g&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function Xo(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?Yo:Jo}function Zo(e){return e.stepped?hr:e.tension||e.cubicInterpolationMode===`monotone`?gr:mr}function K(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Wo(e,t.options),e.stroke(i)}function Qo(e,t,n,r){let{segments:i,options:a}=t,o=Xo(t);for(let s of i)Wo(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var $o=typeof Path2D==`function`;function es(e,t,n,r){$o&&!t.options.segment?K(e,t,n,r):Qo(e,t,n,r)}var ts=class extends Ea{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;Zn(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=kr(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Er(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=Zo(n),c,l;for(c=0,l=a.length;c<l;++c){let{start:l,end:u}=a[c],d=i[l],f=i[u];if(d===f){o.push(d);continue}let p=s(d,f,Math.abs((r-d[t])/(f[t]-d[t])),n.stepped);p[t]=e[t],o.push(p)}return o.length===1?o[0]:o}pathSegment(e,t,n){return Xo(this)(e,this,t,n)}path(e,t,n){let r=this.segments,i=Xo(this),a=this._loop;t||=0,n||=this.points.length-t;for(let o of r)a&=i(e,this,o,{start:t,end:t+n-1});return!!a}draw(e,t,n,r){let i=this.options||{};(this.points||[]).length&&i.borderWidth&&(e.save(),es(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};function ns(e,t,n,r){let i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}var rs=class extends Ea{static id=`point`;parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:`circle`,radius:3,rotation:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){let r=this.options,{x:i,y:a}=this.getProps([`x`,`y`],n);return(e-i)**2+(t-a)**2<(r.hitRadius+r.radius)**2}inXRange(e,t){return ns(this,e,`x`,t)}inYRange(e,t){return ns(this,e,`y`,t)}getCenterPoint(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);let n=t&&e.borderWidth||0;return(t+n)*2}draw(e,t){let n=this.options;this.skip||n.radius<.1||!rn(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,tn(e,n,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};function is(e,t){let{x:n,y:r,base:i,width:a,height:o}=e.getProps([`x`,`y`,`base`,`width`,`height`],t),s,c,l,u,d;return e.horizontal?(d=o/2,s=Math.min(n,i),c=Math.max(n,i),l=r-d,u=r+d):(d=a/2,s=n-d,c=n+d,l=Math.min(r,i),u=Math.max(r,i)),{left:s,top:l,right:c,bottom:u}}function as(e,t,n,r){return e?0:dt(t,n,r)}function os(e,t,n){let r=e.options.borderWidth,i=e.borderSkipped,a=_n(r);return{t:as(i.top,a.top,0,n),r:as(i.right,a.right,0,t),b:as(i.bottom,a.bottom,0,n),l:as(i.left,a.left,0,t)}}function ss(e,t,n){let{enableBorderRadius:r}=e.getProps([`enableBorderRadius`]),i=e.options.borderRadius,a=vn(i),o=Math.min(t,n),s=e.borderSkipped,c=r||A(i);return{topLeft:as(!c||s.top||s.left,a.topLeft,0,o),topRight:as(!c||s.top||s.right,a.topRight,0,o),bottomLeft:as(!c||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:as(!c||s.bottom||s.right,a.bottomRight,0,o)}}function cs(e){let t=is(e),n=t.right-t.left,r=t.bottom-t.top,i=os(e,n/2,r/2),a=ss(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function ls(e,t,n,r){let i=t===null,a=n===null,o=e&&!(i&&a)&&is(e,r);return o&&(i||pt(t,o.left,o.right))&&(a||pt(n,o.top,o.bottom))}function us(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function ds(e,t){e.rect(t.x,t.y,t.w,t.h)}function fs(e,t,n={}){let r=e.x===n.x?0:-t,i=e.y===n.y?0:-t,a=(e.x+e.w===n.x+n.w?0:t)-r,o=(e.y+e.h===n.y+n.h?0:t)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}var ps=class extends Ea{static id=`bar`;static defaults={borderSkipped:`start`,borderWidth:0,borderRadius:0,inflateAmount:`auto`,pointStyle:void 0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){let{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:i,outer:a}=cs(this),o=us(a.radius)?dn:ds;e.save(),(a.w!==i.w||a.h!==i.h)&&(e.beginPath(),o(e,fs(a,t,i)),e.clip(),o(e,fs(i,-t,a)),e.fillStyle=n,e.fill(`evenodd`)),e.beginPath(),o(e,fs(i,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,n){return ls(this,e,t,n)}inXRange(e,t){return ls(this,e,null,t)}inYRange(e,t){return ls(this,null,e,t)}getCenterPoint(e){let{x:t,y:n,base:r,horizontal:i}=this.getProps([`x`,`y`,`base`,`horizontal`],e);return{x:i?(t+r)/2:t,y:i?n:(n+r)/2}}getRange(e){return e===`x`?this.width/2:this.height/2}};function ms(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=_s(r,s,i);let c=hs(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Er(t,c);for(let t of l){let r=hs(n,a[t.start],a[t.end],t.loop),s=Tr(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:vs(c,r,`start`,Math.max)},end:{[n]:vs(c,r,`end`,Math.min)}})}}return o}function hs(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=lt(i),a=lt(a)),{property:e,start:i,end:a}}function gs(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=_s(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function _s(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function vs(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function ys(e,t){let n=[],r=!1;return k(e)?(r=!0,n=e):n=gs(e,t),n.length?new ts({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function bs(e){return e&&e.fill!==!1}function xs(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!j(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function Ss(e,t,n){let r=Es(e);if(A(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return j(i)&&Math.floor(i)===i?Cs(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Cs(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function ws(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:A(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Ts(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:A(e)?e.value:t.getBaseValue(),r}function Es(e){let t=e.options,n=t.fill,r=M(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function Ds(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=Os(t,n);s.push(ys({x:null,y:t.bottom},r));for(let e=0;e<a.length;e++){let t=a[e];for(let e=t.start;e<=t.end;e++)ks(i,o[e],s)}return new ts({points:i,options:{}})}function Os(e,t){let n=[],r=e.getMatchingVisibleMetas(`line`);for(let e=0;e<r.length;e++){let i=r[e];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}function ks(e,t,n){let r=[];for(let i=0;i<n.length;i++){let a=n[i],{first:o,last:s,point:c}=As(a,t,`x`);if(!(!c||o&&s)){if(o)r.unshift(c);else if(e.push(c),!s)break}}e.push(...r)}function As(e,t,n){let r=e.interpolate(t,n);if(!r)return{};let i=r[n],a=e.segments,o=e.points,s=!1,c=!1;for(let e=0;e<a.length;e++){let t=a[e],r=o[t.start][n],l=o[t.end][n];if(pt(i,r,l)){s=i===r,c=i===l;break}}return{first:s,last:c,point:r}}var js=class{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){let{x:r,y:i,radius:a}=this;return t||={start:0,end:I},e.arc(r,i,a,t.end,t.start,!0),!n.bounds}interpolate(e){let{x:t,y:n,radius:r}=this,i=e.angle;return{x:t+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}};function Ms(e){let{chart:t,fill:n,line:r}=e;if(j(n))return Ns(t,n);if(n===`stack`)return Ds(e);if(n===`shape`)return!0;let i=Ps(e);return i instanceof js?i:ys(i,r)}function Ns(e,t){let n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function Ps(e){return(e.scale||{}).getPointPositionForValue?Is(e):Fs(e)}function Fs(e){let{scale:t={},fill:n}=e,r=ws(n,t);if(j(r)){let e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}function Is(e){let{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,o=Ts(n,t,a),s=[];if(r.grid.circular){let e=t.getPointPositionForValue(0,a);return new js({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(o)})}for(let e=0;e<i;++e)s.push(t.getPointPositionForValue(e,o));return s}function Ls(e,t,n){let r=Ms(t),{chart:i,index:a,line:o,scale:s,axis:c}=t,l=o.options,u=l.fill,d=l.backgroundColor,{above:f=d,below:p=d}=u||{},m=Fr(i,i.getDatasetMeta(a));r&&o.points.length&&(an(e,n),Rs(e,{line:o,target:r,above:f,below:p,area:n,scale:s,axis:c,clip:m}),B(e))}function Rs(e,t){let{line:n,target:r,above:i,below:a,area:o,scale:s,clip:c}=t,l=n._loop?`angle`:t.axis;e.save(),l===`x`&&a!==i&&(zs(e,r,o.top),Bs(e,{line:n,target:r,color:i,scale:s,property:l,clip:c}),e.restore(),e.save(),zs(e,r,o.bottom)),Bs(e,{line:n,target:r,color:a,scale:s,property:l,clip:c}),e.restore()}function zs(e,t,n){let{segments:r,points:i}=t,a=!0,o=!1;e.beginPath();for(let s of r){let{start:r,end:c}=s,l=i[r],u=i[_s(r,c,i)];a?(e.moveTo(l.x,l.y),a=!1):(e.lineTo(l.x,n),e.lineTo(l.x,l.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(u.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Bs(e,t){let{line:n,target:r,property:i,color:a,scale:o,clip:s}=t,c=ms(n,r,i);for(let{source:t,target:l,start:u,end:d}of c){let{style:{backgroundColor:c=a}={}}=t,f=r!==!0;e.save(),e.fillStyle=c,Vs(e,o,s,f&&hs(i,u,d)),e.beginPath();let p=!!n.pathSegment(e,t),m;if(f){p?e.closePath():Hs(e,r,d,i);let t=!!r.pathSegment(e,l,{move:p,reverse:!0});m=p&&t,m||Hs(e,r,u,i)}e.closePath(),e.fill(m?`evenodd`:`nonzero`),e.restore()}}function Vs(e,t,n,r){let i=t.chart.chartArea,{property:a,start:o,end:s}=r||{};if(a===`x`||a===`y`){let t,r,c,l;a===`x`?(t=o,r=i.top,c=s,l=i.bottom):(t=i.left,r=o,c=i.right,l=s),e.beginPath(),n&&(t=Math.max(t,n.left),c=Math.min(c,n.right),r=Math.max(r,n.top),l=Math.min(l,n.bottom)),e.rect(t,r,c-t,l-r),e.clip()}}function Hs(e,t,n,r){let i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var Us={id:`filler`,afterDatasetsUpdate(e,t,n){let r=(e.data.datasets||[]).length,i=[],a,o,s,c;for(o=0;o<r;++o)a=e.getDatasetMeta(o),s=a.dataset,c=null,s&&s.options&&s instanceof ts&&(c={visible:e.isDatasetVisible(o),index:o,fill:Ss(s,o,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=c,i.push(c);for(o=0;o<r;++o)c=i[o],!(!c||c.fill===!1)&&(c.fill=xs(i,o,n.propagate))},beforeDraw(e,t,n){let r=n.drawTime===`beforeDraw`,i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let t=i.length-1;t>=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&Ls(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;bs(n)&&Ls(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!bs(r)||n.drawTime!==`beforeDatasetDraw`||Ls(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},Ws=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Gs=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Ks=class extends Ea{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=N(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=yn(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=Ws(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=qs(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=yr(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=Tt(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=Tt(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=Tt(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=Tt(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;an(e,this),this._draw(),B(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=z.color,s=yr(e.rtl,this.left,this.width),c=yn(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=Ws(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=M(n.lineWidth,1);if(r.fillStyle=M(n.fillStyle,o),r.lineCap=M(n.lineCap,`butt`),r.lineDashOffset=M(n.lineDashOffset,0),r.lineJoin=M(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=M(n.strokeStyle,o),r.setLineDash(M(n.lineDash,[])),a.usePointStyle)nn(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=vn(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?dn(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){un(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:Tt(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:Tt(i,this.top+y+l,this.bottom-t[0].height),line:0},br(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=Tt(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=Tt(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=Et(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=Xs(o,e)+l}else f.y+=b}),xr(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=yn(t.font),r=H(t.padding);if(!t.display)return;let i=yr(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=Tt(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+Tt(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=Tt(o,u,u+d);a.textAlign=i.textAlign(wt(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,un(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=yn(e.font),n=H(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(pt(e,this.left,this.right)&&pt(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(r=i[n],pt(e,r.left,r.left+r.width)&&pt(t,r.top,r.top+r.height))return this.legendItems[n]}return null}handleEvent(e){let t=this.options;if(!Zs(e.type,t))return;let n=this._getLegendItemAt(e.x,e.y);if(e.type===`mousemove`||e.type===`mouseout`){let r=this._hoveredItem,i=Gs(r,n);r&&!i&&N(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!i&&N(t.onHover,[e,n,this],this)}else n&&N(t.onClick,[e,n,this],this)}};function qs(e,t,n,r,i){return{itemWidth:Js(r,e,t,n),itemHeight:Ys(i,r,t.lineHeight)}}function Js(e,t,n,r){let i=e.text;return i&&typeof i!=`string`&&(i=i.reduce((e,t)=>e.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Ys(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Xs(t,n)),r}function Xs(e,t){return t*(e.text?e.text.length:0)}function Zs(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Qs={id:`legend`,_element:Ks,start(e,t,n){let r=e.legend=new Ks({ctx:e.ctx,options:n,chart:e});na.configure(e,r,n),na.addBox(e,r)},stop(e){na.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;na.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=H(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},$s=class extends Ea{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let r=k(n.text)?n.text.length:1;this._padding=H(n.padding);let i=r*yn(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:t,left:n,bottom:r,right:i,options:a}=this,o=a.align,s=0,c,l,u;return this.isHorizontal()?(l=Tt(o,n,i),u=t+e,c=i-n):(a.position===`left`?(l=n+e,u=Tt(o,r,t),s=F*-.5):(l=i-e,u=Tt(o,t,r),s=F*.5),c=r-t),{titleX:l,titleY:u,maxWidth:c,rotation:s}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=yn(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(r);un(e,t.text,0,0,n,{color:t.color,maxWidth:o,rotation:s,textAlign:wt(t.align),textBaseline:`middle`,translation:[i,a]})}};function ec(e,t){let n=new $s({ctx:e.ctx,options:t,chart:e});na.configure(e,n,t),na.addBox(e,n),e.titleBlock=n}var tc={id:`title`,_element:$s,start(e,t,n){ec(e,n)},stop(e){let t=e.titleBlock;na.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;na.configure(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}},nc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){let n=e[t].element;if(n&&n.hasValue()){let e=n.tooltipPosition();r.add(e.x),i+=e.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((e,t)=>e+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;a<o;++a){let n=e[a].element;if(n&&n.hasValue()){let e=st(t,n.getCenterPoint());e<i&&(i=e,s=n)}}if(s){let e=s.tooltipPosition();n=e.x,r=e.y}return{x:n,y:r}}};function rc(e,t){return t&&(k(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ic(e){return(typeof e==`string`||e instanceof String)&&e.indexOf(`
|
|
9
|
+
`)>-1?e.split(`
|
|
10
|
+
`):e}function ac(e,t){let{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function oc(e,t){let n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,c=yn(t.bodyFont),l=yn(t.titleFont),u=yn(t.footerFont),d=a.length,f=i.length,p=r.length,m=H(t.padding),h=m.height,g=0,_=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){let e=t.displayColors?Math.max(s,c.lineHeight):c.lineHeight;h+=p*e+(_-p)*c.lineHeight+(_-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0,y=function(e){g=Math.max(g,n.measureText(e).width+v)};return n.save(),n.font=l.string,P(e.title,y),n.font=c.string,P(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?o+2+t.boxPadding:0,P(r,e=>{P(e.before,y),P(e.lines,y),P(e.after,y)}),v=0,n.font=u.string,P(e.footer,y),n.restore(),g+=m.width,{width:g,height:h}}function sc(e,t){let{y:n,height:r}=t;return n<r/2?`top`:n>e.height-r/2?`bottom`:`center`}function cc(e,t,n,r){let{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e===`left`&&i+a+o>t.width||e===`right`&&i-a-o<0)return!0}function lc(e,t,n,r){let{x:i,width:a}=n,{width:o,chartArea:{left:s,right:c}}=e,l=`center`;return r===`center`?l=i<=(s+c)/2?`left`:`right`:i<=a/2?l=`left`:i>=o-a/2&&(l=`right`),cc(l,e,t,n)&&(l=`center`),l}function uc(e,t,n){let r=n.yAlign||t.yAlign||sc(e,n);return{xAlign:n.xAlign||t.xAlign||lc(e,t,n,r),yAlign:r}}function dc(e,t){let{x:n,width:r}=e;return t===`right`?n-=r:t===`center`&&(n-=r/2),n}function fc(e,t,n){let{y:r,height:i}=e;return t===`top`?r+=n:t===`bottom`?r-=i+n:r-=i/2,r}function pc(e,t,n,r){let{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:c}=n,l=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=vn(o),m=dc(t,s),h=fc(t,c,l);return c===`center`?s===`left`?m+=l:s===`right`&&(m-=l):s===`left`?m-=Math.max(u,f)+i:s===`right`&&(m+=Math.max(d,p)+i),{x:dt(m,0,r.width-t.width),y:dt(h,0,r.height-t.height)}}function mc(e,t,n){let r=H(n.padding);return t===`center`?e.x+e.width/2:t===`right`?e.x+e.width-r.right:e.x+r.left}function hc(e){return rc([],ic(e))}function gc(e,t,n){return Sn(e,{tooltip:t,tooltipItems:n,type:`tooltip`})}function _c(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var vc={beforeTitle:xe,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode===`dataset`)return t.dataset.label||``;if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return``},afterTitle:xe,beforeBody:xe,beforeLabel:xe,label(e){if(this&&this.options&&this.options.mode===`dataset`)return e.label+`: `+e.formattedValue||e.formattedValue;let t=e.dataset.label||``;t&&(t+=`: `);let n=e.formattedValue;return O(n)||(t+=n),t},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:xe,afterBody:xe,beforeFooter:xe,footer:xe,afterFooter:xe};function yc(e,t,n,r){let i=e[t].call(n,r);return i===void 0?vc[t].call(n,r):i}var bc=class extends Ea{static positioners=nc;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new zr(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||=gc(this.chart.getContext(),this,this._tooltipItems)}getTitle(e,t){let{callbacks:n}=t,r=yc(n,`beforeTitle`,this,e),i=yc(n,`title`,this,e),a=yc(n,`afterTitle`,this,e),o=[];return o=rc(o,ic(r)),o=rc(o,ic(i)),o=rc(o,ic(a)),o}getBeforeBody(e,t){return hc(yc(t.callbacks,`beforeBody`,this,e))}getBody(e,t){let{callbacks:n}=t,r=[];return P(e,e=>{let t={before:[],lines:[],after:[]},i=_c(n,e);rc(t.before,ic(yc(i,`beforeLabel`,this,e))),rc(t.lines,yc(i,`label`,this,e)),rc(t.after,ic(yc(i,`afterLabel`,this,e))),r.push(t)}),r}getAfterBody(e,t){return hc(yc(t.callbacks,`afterBody`,this,e))}getFooter(e,t){let{callbacks:n}=t,r=yc(n,`beforeFooter`,this,e),i=yc(n,`footer`,this,e),a=yc(n,`afterFooter`,this,e),o=[];return o=rc(o,ic(r)),o=rc(o,ic(i)),o=rc(o,ic(a)),o}_createItems(e){let t=this._active,n=this.chart.data,r=[],i=[],a=[],o=[],s,c;for(s=0,c=t.length;s<c;++s)o.push(ac(this.chart,t[s]));return e.filter&&(o=o.filter((t,r,i)=>e.filter(t,r,i,n))),e.itemSort&&(o=o.sort((t,r)=>e.itemSort(t,r,n))),P(o,t=>{let n=_c(e.callbacks,t);r.push(yc(n,`labelColor`,this,t)),i.push(yc(n,`labelPointStyle`,this,t)),a.push(yc(n,`labelTextColor`,this,t))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=o,o}update(e,t){let n=this.options.setContext(this.getContext()),r=this._active,i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{let e=nc[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let t=this._size=oc(this,n),o=Object.assign({},e,t),s=uc(this.chart,n,o),c=pc(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){let i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){let{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=vn(o),{x:d,y:f}=e,{width:p,height:m}=t,h,g,_,v,y,b;return i===`center`?(y=f+m/2,r===`left`?(h=d,g=h-a,v=y+a,b=y-a):(h=d+p,g=h+a,v=y-a,b=y+a),_=h):(g=r===`left`?d+Math.max(s,l)+a:r===`right`?d+p-Math.max(c,u)-a:this.caretX,i===`top`?(v=f,y=v-a,h=g-a,_=g+a):(v=f+m,y=v+a,h=g+a,_=g-a),b=v),{x1:h,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(e,t,n){let r=this.title,i=r.length,a,o,s;if(i){let c=yr(n.rtl,this.x,this.width);for(e.x=mc(this,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline=`middle`,a=yn(n.titleFont),o=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,s=0;s<i;++s)t.fillText(r[s],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o,s+1===i&&(e.y+=n.titleMarginBottom-o)}}_drawColorBox(e,t,n,r,i){let a=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:s,boxWidth:c}=i,l=yn(i.bodyFont),u=mc(this,`left`,i),d=r.x(u),f=s<l.lineHeight?(l.lineHeight-s)/2:0,p=t.y+f;if(i.usePointStyle){let t={radius:Math.min(c,s)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=r.leftForLtr(d,c)+c/2,l=p+s/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,tn(e,t,n,l),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,tn(e,t,n,l)}else{e.lineWidth=A(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;let t=r.leftForLtr(d,c),n=r.leftForLtr(r.xPlus(d,1),c-2),o=vn(a.borderRadius);Object.values(o).some(e=>e!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,dn(e,{x:t,y:p,w:c,h:s,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),dn(e,{x:n,y:p+1,w:c-2,h:s-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,c,s),e.strokeRect(t,p,c,s),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,c-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){let{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:o,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=yn(n.bodyFont),d=u.lineHeight,f=0,p=yr(n.rtl,this.x,this.width),m=function(n){t.fillText(n,p.x(e.x+f),e.y+d/2),e.y+=d+i},h=p.textAlign(a),g,_,v,y,b,x,S;for(t.textAlign=a,t.textBaseline=`middle`,t.font=u.string,e.x=mc(this,h,n),t.fillStyle=n.bodyColor,P(this.beforeBody,m),f=o&&h!==`right`?a===`center`?c/2+l:c+2+l:0,y=0,x=r.length;y<x;++y){for(g=r[y],_=this.labelTextColors[y],t.fillStyle=_,P(g.before,m),v=g.lines,o&&v.length&&(this._drawColorBox(t,e,y,p,n),d=Math.max(u.lineHeight,s)),b=0,S=v.length;b<S;++b)m(v[b]),d=u.lineHeight;P(g.after,m)}f=0,d=u.lineHeight,P(this.afterBody,m),e.y-=i}drawFooter(e,t,n){let r=this.footer,i=r.length,a,o;if(i){let s=yr(n.rtl,this.x,this.width);for(e.x=mc(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline=`middle`,a=yn(n.footerFont),t.fillStyle=n.footerColor,t.font=a.string,o=0;o<i;++o)t.fillText(r[o],s.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){let{xAlign:i,yAlign:a}=this,{x:o,y:s}=e,{width:c,height:l}=n,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=vn(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(o+u,s),a===`top`&&this.drawCaret(e,t,n,r),t.lineTo(o+c-d,s),t.quadraticCurveTo(o+c,s,o+c,s+d),a===`center`&&i===`right`&&this.drawCaret(e,t,n,r),t.lineTo(o+c,s+l-p),t.quadraticCurveTo(o+c,s+l,o+c-p,s+l),a===`bottom`&&this.drawCaret(e,t,n,r),t.lineTo(o+f,s+l),t.quadraticCurveTo(o,s+l,o,s+l-f),a===`center`&&i===`left`&&this.drawCaret(e,t,n,r),t.lineTo(o,s+u),t.quadraticCurveTo(o,s,o+u,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){let n=nc[e.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=oc(this,e),o=Object.assign({},n,this._size),s=uc(t,e,o),c=pc(e,o,s,t);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){let t=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(t);let r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let a=H(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),br(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),xr(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let n=this._active,r=e.map(({datasetIndex:e,index:t})=>{let n=this.chart.getDatasetMeta(e);if(!n)throw Error(`Cannot find a dataset at index `+e);return{datasetIndex:e,element:n.data[t],index:t}}),i=!Ee(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),o=this._positionChanged(a,e),s=t||!Ee(a,i)||o;return s&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){let i=this.options;if(e.type===`mouseout`)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:r,options:i}=this,a=nc[i.position].call(this,e,t);return a!==!1&&(n!==a.x||r!==a.y)}},xc={id:`tooltip`,_element:bc,positioners:nc,afterInit(e,t,n){n&&(e.tooltip=new bc({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins(`beforeTooltipDraw`,{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:`average`,backgroundColor:`rgba(0,0,0,0.8)`,titleColor:`#fff`,titleFont:{weight:`bold`},titleSpacing:2,titleMarginBottom:6,titleAlign:`left`,bodyColor:`#fff`,bodySpacing:2,bodyFont:{},bodyAlign:`left`,footerColor:`#fff`,footerSpacing:2,footerMarginTop:6,footerFont:{weight:`bold`},footerAlign:`left`,padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:`#fff`,displayColors:!0,boxPadding:0,borderColor:`rgba(0,0,0,0)`,borderWidth:0,animation:{duration:400,easing:`easeOutQuart`},animations:{numbers:{type:`number`,properties:[`x`,`y`,`width`,`height`,`caretX`,`caretY`]},opacity:{easing:`linear`,duration:200}},callbacks:vc},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]},Sc=(e,t,n,r)=>(typeof t==`string`?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Cc(e,t,n,r){let i=e.indexOf(t);return i===-1?Sc(e,t,n,r):i===e.lastIndexOf(t)?i:n}var wc=(e,t)=>e===null?null:dt(Math.round(e),0,t);function Tc(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}var Ec=class extends Ga{static id=`category`;static defaults={ticks:{callback:Tc}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let t=this._addedLabels;if(t.length){let e=this.getLabels();for(let{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(O(e))return null;let n=this.getLabels();return t=isFinite(t)&&n[t]===e?t:Cc(n,e,M(t,e),this._addedLabels),wc(t,n.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),{min:n,max:r}=this.getMinMax(!0);this.options.bounds===`ticks`&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){let e=this.min,t=this.max,n=this.options.offset,r=[],i=this.getLabels();i=e===0&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=e;n<=t;n++)r.push({value:n});return r}getLabelForValue(e){return Tc.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!=`number`&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function Dc(e,t){let n=[],{bounds:r,step:i,min:a,max:o,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:d}=e,f=i||1,p=l-1,{min:m,max:h}=t,g=!O(a),_=!O(o),v=!O(c),y=(h-m)/(u+1),b=Ze((h-m)/p/f)*f,x,S,C,w;if(b<1e-14&&!g&&!_)return[{value:m},{value:h}];w=Math.ceil(h/b)-Math.floor(m/b),w>p&&(b=Ze(w*b/p/f)*f),O(s)||(x=10**s,b=Math.ceil(b*x)/x),r===`ticks`?(S=Math.floor(m/b)*b,C=Math.ceil(h/b)*b):(S=m,C=h),g&&_&&i&&tt((o-a)/i,b/1e3)?(w=Math.round(Math.min((o-a)/b,l)),b=(o-a)/w,S=a,C=o):v?(S=g?a:S,C=_?o:C,w=c-1,b=(C-S)/w):(w=(C-S)/b,w=Xe(w,Math.round(w),b/1e3)?Math.round(w):Math.ceil(w));let T=Math.max(at(b),at(S));x=10**(O(s)?T:s),S=Math.round(S*x)/x,C=Math.round(C*x)/x;let E=0;for(g&&(d&&S!==a?(n.push({value:a}),S<a&&E++,Xe(Math.round((S+E*b)*x)/x,a,Oc(a,y,e))&&E++):S<a&&E++);E<w;++E){let e=Math.round((S+E*b)*x)/x;if(_&&e>o)break;n.push({value:e})}return _&&d&&C!==o?n.length&&Xe(n[n.length-1].value,o,Oc(o,y,e))?n[n.length-1].value=o:n.push({value:o}):(!_||C===o)&&n.push({value:C}),n}function Oc(e,t,{horizontal:n,minRotation:r}){let i=rt(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(``+e).length;return Math.min(t/a,o)}var kc=class extends Ga{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return O(e)||(typeof e==`number`||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this,a=e=>r=t?r:e,o=e=>i=n?i:e;if(e){let e=Ye(r),t=Ye(i);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(r===i){let t=i===0?1:Math.abs(i*.05);o(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){let{maxTicksLimit:e,stepSize:t}=this.options.ticks,n;return t?(n=Math.ceil(this.max/t)-Math.floor(this.min/t)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${t} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e||=11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r=Dc({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},this._range||this);return e.bounds===`ticks`&&nt(r,this,`value`),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return Vt(e,this.chart.options.locale,this.options.ticks.format)}},Ac=class extends kc{static id=`linear`;static defaults={ticks:{callback:Wt.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=j(e)?e:0,this.max=j(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=rt(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},jc=e=>Math.floor(Je(e)),Mc=(e,t)=>10**(jc(e)+t);function Nc(e){return e/10**jc(e)==1}function Pc(e,t,n){let r=10**n,i=Math.floor(e/r);return Math.ceil(t/r)-i}function Fc(e,t){let n=jc(t-e);for(;Pc(e,t,n)>10;)n++;for(;Pc(e,t,n)<10;)n--;return Math.min(n,jc(e))}function Ic(e,{min:t,max:n}){t=Ce(e.min,t);let r=[],i=jc(t),a=Fc(t,n),o=a<0?10**Math.abs(a):1,s=10**a,c=i>a?10**i:0,l=Math.round((t-c)*o)/o,u=Math.floor((t-c)/s/10)*s*10,d=Math.floor((l-u)/10**a),f=Ce(e.min,Math.round((c+u+d*10**a)*o)/o);for(;f<n;)r.push({value:f,major:Nc(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,o=a>=0?1:o),f=Math.round((c+u+d*10**a)*o)/o;let p=Ce(e.max,f);return r.push({value:p,major:Nc(p),significand:d}),r}var Lc=class extends Ga{static id=`logarithmic`;static defaults={ticks:{callback:Wt.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=kc.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return j(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=j(e)?Math.max(0,e):null,this.max=j(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!j(this._userMin)&&(this.min=e===Mc(this.min,0)?Mc(this.min,-1):Mc(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,i=t=>n=e?n:t,a=e=>r=t?r:e;n===r&&(n<=0?(i(1),a(10)):(i(Mc(n,-1)),a(Mc(r,1)))),n<=0&&i(Mc(r,-1)),r<=0&&a(Mc(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t=Ic({min:this._userMin,max:this._userMax},this);return e.bounds===`ticks`&&nt(t,this,`value`),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return e===void 0?`0`:Vt(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=Je(e),this._valueRange=Je(this.max)-Je(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Je(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return 10**(this._startValue+t*this._valueRange)}};function Rc(e){let t=e.ticks;if(t.display&&e.display){let e=H(t.backdropPadding);return M(t.font&&t.font.size,z.font.size)+e.height}return 0}function zc(e,t,n){return n=k(n)?n:[n],{w:Qt(e,t.string,n),h:n.length*t.lineHeight}}function Bc(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function Vc(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,o=e.options.pointLabels,s=o.centerPointLabels?F/a:0;for(let c=0;c<a;c++){let a=o.setContext(e.getPointLabelContext(c));i[c]=a.padding;let l=e.getPointPosition(c,e.drawingArea+i[c],s),u=yn(a.font),d=zc(e.ctx,u,e._pointLabels[c]);r[c]=d;let f=lt(e.getIndexAngle(c)+s),p=Math.round(it(f));Hc(n,t,f,Bc(p,l.x,d.w,0,180),Bc(p,l.y,d.h,90,270))}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Gc(e,r,i)}function Hc(e,t,n,r,i){let a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),s=0,c=0;r.start<t.l?(s=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+s)),i.start<t.t?(c=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function Uc(e,t,n){let r=e.drawingArea,{extra:i,additionalAngle:a,padding:o,size:s}=n,c=e.getPointPosition(t,r+i+o,a),l=Math.round(it(lt(c.angle+Ge))),u=Jc(c.y,s.h,l),d=Kc(l),f=qc(c.x,s.w,d);return{visible:!0,x:c.x,y:u,textAlign:d,left:f,top:u,right:f+s.w,bottom:u+s.h}}function Wc(e,t){if(!t)return!0;let{left:n,top:r,right:i,bottom:a}=e;return!(rn({x:n,y:r},t)||rn({x:n,y:a},t)||rn({x:i,y:r},t)||rn({x:i,y:a},t))}function Gc(e,t,n){let r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:Rc(a)/2,additionalAngle:o?F/i:0},l;for(let a=0;a<i;a++){c.padding=n[a],c.size=t[a];let i=Uc(e,a,c);r.push(i),s===`auto`&&(i.visible=Wc(i,l),i.visible&&(l=i))}return r}function Kc(e){return e===0||e===180?`center`:e<180?`left`:`right`}function qc(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function Jc(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Yc(e,t,n){let{left:r,top:i,right:a,bottom:o}=n,{backdropColor:s}=t;if(!O(s)){let n=vn(t.borderRadius),c=H(t.backdropPadding);e.fillStyle=s;let l=r-c.left,u=i-c.top,d=a-r+c.width,f=o-i+c.height;Object.values(n).some(e=>e!==0)?(e.beginPath(),dn(e,{x:l,y:u,w:d,h:f,radius:n}),e.fill()):e.fillRect(l,u,d,f)}}function Xc(e,t){let{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){let t=e._pointLabelItems[i];if(!t.visible)continue;let a=r.setContext(e.getPointLabelContext(i));Yc(n,a,t);let o=yn(a.font),{x:s,y:c,textAlign:l}=t;un(n,e._pointLabels[i],s,c+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:`middle`})}}function Zc(e,t,n,r){let{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,I);else{let n=e.getPointPosition(0,t);i.moveTo(n.x,n.y);for(let a=1;a<r;a++)n=e.getPointPosition(a,t),i.lineTo(n.x,n.y)}}function Qc(e,t,n,r,i){let a=e.ctx,o=t.circular,{color:s,lineWidth:c}=t;!o&&!r||!s||!c||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=c,a.setLineDash(i.dash||[]),a.lineDashOffset=i.dashOffset,a.beginPath(),Zc(e,n,o,r),a.closePath(),a.stroke(),a.restore())}function $c(e,t,n){return Sn(e,{label:n,index:t,type:`pointLabel`})}(class extends kc{static id=`radialLinear`;static defaults={display:!0,animate:!0,position:`chartArea`,angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wt.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":`borderColor`,"pointLabels.color":`color`,"ticks.color":`color`};static descriptors={angleLines:{_fallback:`grid`}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=H(Rc(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=j(e)&&!isNaN(e)?e:0,this.max=j(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rc(this.options))}generateTickLabels(e){kc.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((e,t)=>{let n=N(this.options.pointLabels.callback,[e,t],this);return n||n===0?n:``}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?Vc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=I/(this._pointLabels.length||1),n=this.options.startAngle||0;return lt(e*t+rt(n))}getDistanceFromCenterForValue(e){if(O(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(O(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let n=t[e];return $c(this.getContext(),e,n)}}getPointPosition(e,t,n=0){let r=this.getIndexAngle(e)-Ge+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:n,right:r,bottom:i}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:i}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let n=this.ctx;n.save(),n.beginPath(),Zc(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:n,grid:r,border:i}=t,a=this._pointLabels.length,o,s,c;if(t.pointLabels.display&&Xc(this,a),r.display&&this.ticks.forEach((e,t)=>{if(t!==0||t===0&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(t),o=r.setContext(n),c=i.setContext(n);Qc(this,o,s,a,c)}}),n.display){for(e.save(),o=a-1;o>=0;o--){let r=n.setContext(this.getPointLabelContext(o)),{color:i,lineWidth:a}=r;!a||!i||(e.lineWidth=a,e.strokeStyle=i,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(o,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign=`center`,e.textBaseline=`middle`,this.ticks.forEach((r,o)=>{if(o===0&&this.min>=0&&!t.reverse)return;let s=n.setContext(this.getContext(o)),c=yn(s.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){e.font=c.string,a=e.measureText(r.label).width,e.fillStyle=s.backdropColor;let t=H(s.backdropPadding);e.fillRect(-a/2-t.left,-i-c.size/2-t.top,a+t.width,c.size+t.height)}un(e,r.label,0,-i,c,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),e.restore()}drawTitle(){}});var el={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}},tl=Object.keys(el);function nl(e,t){return e-t}function rl(e,t){if(O(t))return null;let n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts,o=t;return typeof r==`function`&&(o=r(o)),j(o)||(o=typeof r==`string`?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i===`week`&&(et(a)||a===!0)?n.startOf(o,`isoWeek`,a):n.startOf(o,i)),+o)}function il(e,t,n,r){let i=tl.length;for(let a=tl.indexOf(e);a<i-1;++a){let e=el[tl[a]],i=e.steps?e.steps:2**53-1;if(e.common&&Math.ceil((n-t)/(i*e.size))<=r)return tl[a]}return tl[i-1]}function al(e,t,n,r,i){for(let a=tl.length-1;a>=tl.indexOf(n);a--){let n=tl[a];if(el[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return tl[n?tl.indexOf(n):0]}function ol(e){for(let t=tl.indexOf(e)+1,n=tl.length;t<n;++t)if(el[tl[t]].common)return tl[t]}function sl(e,t,n){if(!n)e[t]=!0;else if(n.length){let{lo:r,hi:i}=mt(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function cl(e,t,n,r){let i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value,s,c;for(s=a;s<=o;s=+i.add(s,1,r))c=n[s],c>=0&&(t[c].major=!0);return t}function ll(e,t,n){let r=[],i={},a=t.length,o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,r.push({value:s,major:!1});return a===0||!n?r:cl(e,r,i,n)}var ul=class extends Ga{static id=`time`;static defaults={bounds:`data`,adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:`millisecond`,displayFormats:{}},ticks:{source:`auto`,callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit=`day`,this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){let n=e.time||={},r=this._adapter=new Ai._date(e.adapters.date);r.init(t),je(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:rl(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,t=this._adapter,n=e.time.unit||`day`,{min:r,max:i,minDefined:a,maxDefined:o}=this.getUserBounds();function s(e){!a&&!isNaN(e.min)&&(r=Math.min(r,e.min)),!o&&!isNaN(e.max)&&(i=Math.max(i,e.max))}(!a||!o)&&(s(this._getLabelBounds()),(e.bounds!==`ticks`||e.ticks.source!==`labels`)&&s(this.getMinMax(!1))),r=j(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),i=j(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){let e=this.getLabelTimestamps(),t=1/0,n=-1/0;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){let e=this.options,t=e.time,n=e.ticks,r=n.source===`labels`?this.getLabelTimestamps():this._generate();e.bounds===`ticks`&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);let i=this.min,a=this.max,o=_t(r,i,a);return this._unit=t.unit||(n.autoSkip?il(t.minUnit,this.min,this.max,this._getLabelCapacity(i)):al(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit===`year`?void 0:ol(this._unit),this.initOffsets(r),e.reverse&&o.reverse(),ll(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,n=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),t=e.length===1?1-r:(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),n=e.length===1?i:(i-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;t=dt(t,0,a),n=dt(n,0,a),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){let e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||il(i.minUnit,t,n,this._getLabelCapacity(t)),o=M(r.ticks.stepSize,1),s=a===`week`?i.isoWeekday:!1,c=et(s)||s===!0,l={},u=t,d,f;if(c&&(u=+e.startOf(u,`isoWeek`,s)),u=+e.startOf(u,c?`day`:a),e.diff(n,t,a)>1e5*o)throw Error(t+` and `+n+` are too far apart with stepSize of `+o+` `+a);let p=r.ticks.source===`data`&&this.getDataTimestamps();for(d=u,f=0;d<n;d=+e.add(d,o,a),f++)sl(l,d,p);return(d===n||r.bounds===`ticks`||f===1)&&sl(l,d,p),Object.keys(l).sort(nl).map(e=>+e)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){let n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){let i=this.options,a=i.ticks.callback;if(a)return N(a,[e,t,n],this);let o=i.time.displayFormats,s=this._unit,c=this._majorUnit,l=s&&o[s],u=c&&o[c],d=n[t],f=c&&u&&d&&d.major;return this._adapter.format(e,r||(f?u:l))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t<n;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){let t=this.options.ticks,n=this.ctx.measureText(e).width,r=rt(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),a=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:n*i+o*a,h:n*a+o*i}}_getLabelCapacity(e){let t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this._tickFormatFunction(e,0,ll(this,[e],this._majorUnit),r),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,n=r.length;t<n;++t)e=e.concat(r[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],t,n;if(e.length)return e;let r=this.getLabels();for(t=0,n=r.length;t<n;++t)e.push(rl(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return bt(e.sort(nl))}};function dl(e,t,n){let r=0,i=e.length-1,a,o,s,c;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ht(e,`pos`,t)),{pos:a,time:s}=e[r],{pos:o,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ht(e,`time`,t)),{time:a,pos:s}=e[r],{time:o,pos:c}=e[i]);let l=o-a;return l?s+(c-s)*(t-a)/l:s}(class extends ul{static id=`timeseries`;static defaults=ul.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=dl(t,this.min),this._tableRange=dl(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],i=[],a,o,s,c,l;for(a=0,o=e.length;a<o;++a)c=e[a],c>=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,o=r.length;a<o;++a)l=r[a+1],s=r[a-1],c=r[a],Math.round((l+s)/2)!==c&&i.push({time:c,pos:a/(o-1)});return i}_generate(){let e=this.min,t=this.max,n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(t)||n.length===1)&&n.push(t),n.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(dl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return dl(this._table,n*this._tableRange+this._minPos,!0)}});var fl=e(n(),1),pl=`label`;function ml(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function hl(e,t){let n=e.options;n&&t&&Object.assign(n,t)}function gl(e,t){e.labels=t}function _l(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pl,r=[];e.datasets=t.map(t=>{let i=e.datasets.find(e=>e[n]===t[n]);return!i||!t.data||r.includes(i)?{...t}:(r.push(i),Object.assign(i,t),i)})}function vl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pl,n={labels:[],datasets:[]};return gl(n,e.labels),_l(n,e.datasets,t),n}function yl(e,t){let{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:c,plugins:l=[],fallbackContent:u,updateMode:d,...f}=e,p=(0,fl.useRef)(null),m=(0,fl.useRef)(null),h=()=>{p.current&&(m.current=new Po(p.current,{type:o,data:vl(s,a),options:c&&{...c},plugins:l}),ml(t,m.current))},g=()=>{ml(t,null),m.current&&=(m.current.destroy(),null)};return(0,fl.useEffect)(()=>{!i&&m.current&&c&&hl(m.current,c)},[i,c]),(0,fl.useEffect)(()=>{!i&&m.current&&gl(m.current.config.data,s.labels)},[i,s.labels]),(0,fl.useEffect)(()=>{!i&&m.current&&s.datasets&&_l(m.current.config.data,s.datasets,a)},[i,s.datasets]),(0,fl.useEffect)(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,c,s.labels,s.datasets,d]),(0,fl.useEffect)(()=>{m.current&&(g(),setTimeout(h))},[o]),(0,fl.useEffect)(()=>(h(),()=>g()),[]),fl.createElement(`canvas`,{ref:p,role:`img`,height:n,width:r,...f},u)}var bl=(0,fl.forwardRef)(yl);function xl(e,t){return Po.register(t),(0,fl.forwardRef)((t,n)=>fl.createElement(bl,{...t,ref:n,type:e}))}var Sl=xl(`line`,Ei),Cl=xl(`bar`,Ci),wl=xl(`pie`,Di),Tl=xl(`scatter`,Oi),El=e(r(((e,t)=>{
|
|
11
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
12
|
+
* http://hammerjs.github.io/
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
15
|
+
* Licensed under the MIT license */
|
|
16
|
+
(function(e,n,r,i){var a=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],o=n.createElement(`div`),s=`function`,c=Math.round,l=Math.abs,u=Date.now;function d(e,t,n){return setTimeout(y(e,n),t)}function f(e,t,n){return Array.isArray(e)?(p(e,n[t],n),!0):!1}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function m(t,n,r){var i=`DEPRECATED METHOD: `+n+`
|
|
17
|
+
`+r+` AT
|
|
18
|
+
`;return function(){var n=Error(`get-stack-trace`),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,a=e.console&&(e.console.warn||e.console.log);return a&&a.call(e.console,i,r),t.apply(this,arguments)}}var h=typeof Object.assign==`function`?Object.assign:function(e){if(e===i||e===null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&r!==null)for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a])}return t},g=m(function(e,t,n){for(var r=Object.keys(t),a=0;a<r.length;)(!n||n&&e[r[a]]===i)&&(e[r[a]]=t[r[a]]),a++;return e},`extend`,"Use `assign`."),_=m(function(e,t){return g(e,t,!0)},`merge`,"Use `assign`.");function v(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&h(i,n)}function y(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return typeof e==s?e.apply(t&&t[0]||i,t):e}function x(e,t){return e===i?t:e}function S(e,t,n){p(E(t),function(t){e.addEventListener(t,n,!1)})}function C(e,t,n){p(E(t),function(t){e.removeEventListener(t,n,!1)})}function w(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function T(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function ee(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function te(e){return Array.prototype.slice.call(e,0)}function ne(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];ee(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}function re(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if(n=a[s],r=n?n+o:t,r in e)return r;s++}return i}var ie=1;function ae(){return ie++}function oe(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}var se=/mobile|tablet|ip(ad|hone|od)|android/i,ce=`ontouchstart`in e,le=re(e,`PointerEvent`)!==i,ue=ce&&se.test(navigator.userAgent),de=`touch`,fe=`pen`,pe=`mouse`,me=`kinect`,he=25,ge=1,_e=2,D=4,ve=8,ye=1,be=2,xe=4,Se=8,O=16,k=be|xe,A=Se|O,j=k|A,Ce=[`x`,`y`],M=[`clientX`,`clientY`];function we(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}we.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(oe(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(oe(this.element),this.evWin,this.domHandler)}};function Te(e){var t;return t=e.options.inputClass||(le?He:ue?Xe:ce?et:ze),new t(e,N)}function N(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&ge&&r-i===0,o=t&(D|ve)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,P(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function P(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=Oe(t),i>1&&!n.firstMultiple?n.firstMultiple=Oe(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=ke(r);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Ne(s,c),t.distance=Me(s,c),Ee(n,t),t.offsetDirection=je(t.deltaX,t.deltaY);var d=Ae(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=l(d.x)>l(d.y)?d.x:d.y,t.scale=o?Fe(o.pointers,r):1,t.rotation=o?Pe(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,De(n,t);var f=e.element;w(t.srcEvent.target,f)&&(f=t.srcEvent.target),t.target=f}function Ee(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===ge||a.eventType===D)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function De(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,a,o,s,c;if(t.eventType!=ve&&(r>he||n.velocity===i)){var u=t.deltaX-n.deltaX,d=t.deltaY-n.deltaY,f=Ae(r,u,d);o=f.x,s=f.y,a=l(f.x)>l(f.y)?f.x:f.y,c=je(u,d),e.lastInterval=t}else a=n.velocity,o=n.velocityX,s=n.velocityY,c=n.direction;t.velocity=a,t.velocityX=o,t.velocityY=s,t.direction=c}function Oe(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:c(e.pointers[n].clientX),clientY:c(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:ke(t),deltaX:e.deltaX,deltaY:e.deltaY}}function ke(e){var t=e.length;if(t===1)return{x:c(e[0].clientX),y:c(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:c(n/t),y:c(r/t)}}function Ae(e,t,n){return{x:t/e||0,y:n/e||0}}function je(e,t){return e===t?ye:l(e)>=l(t)?e<0?be:xe:t<0?Se:O}function Me(e,t,n){n||=Ce;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Ne(e,t,n){n||=Ce;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Pe(e,t){return Ne(t[1],t[0],M)+Ne(e[1],e[0],M)}function Fe(e,t){return Me(t[0],t[1],M)/Me(e[0],e[1],M)}var Ie={mousedown:ge,mousemove:_e,mouseup:D},Le=`mousedown`,Re=`mousemove mouseup`;function ze(){this.evEl=Le,this.evWin=Re,this.pressed=!1,we.apply(this,arguments)}v(ze,we,{handler:function(e){var t=Ie[e.type];t&ge&&e.button===0&&(this.pressed=!0),t&_e&&e.which!==1&&(t=D),this.pressed&&(t&D&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:pe,srcEvent:e}))}});var Be={pointerdown:ge,pointermove:_e,pointerup:D,pointercancel:ve,pointerout:ve},Ve={2:de,3:fe,4:pe,5:me},F=`pointerdown`,I=`pointermove pointerup pointercancel`;e.MSPointerEvent&&!e.PointerEvent&&(F=`MSPointerDown`,I=`MSPointerMove MSPointerUp MSPointerCancel`);function He(){this.evEl=F,this.evWin=I,we.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}v(He,we,{handler:function(e){var t=this.store,n=!1,r=Be[e.type.toLowerCase().replace(`ms`,``)],i=Ve[e.pointerType]||e.pointerType,a=i==de,o=ee(t,e.pointerId,`pointerId`);r&ge&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(D|ve)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))}});var Ue={touchstart:ge,touchmove:_e,touchend:D,touchcancel:ve},We=`touchstart`,Ge=`touchstart touchmove touchend touchcancel`;function Ke(){this.evTarget=We,this.evWin=Ge,this.started=!1,we.apply(this,arguments)}v(Ke,we,{handler:function(e){var t=Ue[e.type];if(t===ge&&(this.started=!0),this.started){var n=qe.call(this,e,t);t&(D|ve)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:de,srcEvent:e})}}});function qe(e,t){var n=te(e.touches),r=te(e.changedTouches);return t&(D|ve)&&(n=ne(n.concat(r),`identifier`,!0)),[n,r]}var Je={touchstart:ge,touchmove:_e,touchend:D,touchcancel:ve},Ye=`touchstart touchmove touchend touchcancel`;function Xe(){this.evTarget=Ye,this.targetIds={},we.apply(this,arguments)}v(Xe,we,{handler:function(e){var t=Je[e.type],n=Ze.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:de,srcEvent:e})}});function Ze(e,t){var n=te(e.touches),r=this.targetIds;if(t&(ge|_e)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=te(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return w(e.target,c)}),t===ge)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(D|ve)&&delete r[o[i].identifier],i++;if(s.length)return[ne(a.concat(s),`identifier`,!0),s]}var Qe=2500,$e=25;function et(){we.apply(this,arguments);var e=y(this.handler,this);this.touch=new Xe(this.manager,e),this.mouse=new ze(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}v(et,we,{handler:function(e,t,n){var r=n.pointerType==de,i=n.pointerType==pe;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)tt.call(this,t,n);else if(i&&rt.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function tt(e,t){e&ge?(this.primaryTouch=t.changedPointers[0].identifier,nt.call(this,t)):e&(D|ve)&&nt.call(this,t)}function nt(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Qe)}}function rt(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=$e&&o<=$e)return!0}return!1}var it=re(o.style,`touchAction`),at=it!==i,ot=`compute`,st=`auto`,ct=`manipulation`,lt=`none`,ut=`pan-x`,dt=`pan-y`,ft=ht();function pt(e,t){this.manager=e,this.set(t)}pt.prototype={set:function(e){e==ot&&(e=this.compute()),at&&this.manager.element.style&&ft[e]&&(this.manager.element.style[it]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),mt(e.join(` `))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=T(r,lt)&&!ft[lt],a=T(r,dt)&&!ft[dt],o=T(r,ut)&&!ft[ut];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&k||o&&n&A))return this.preventSrc(t)},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};function mt(e){if(T(e,lt))return lt;var t=T(e,ut),n=T(e,dt);return t&&n?lt:t||n?t?ut:dt:T(e,ct)?ct:st}function ht(){if(!at)return!1;var t={},n=e.CSS&&e.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(r){t[r]=n?e.CSS.supports(`touch-action`,r):!0}),t}var gt=1,_t=2,vt=4,L=8,yt=L,bt=16,xt=32;function St(e){this.options=h({},this.defaults,e||{}),this.id=ae(),this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=gt,this.simultaneous={},this.requireFail=[]}St.prototype={defaults:{},set:function(e){return h(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(f(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=Tt(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return f(e,`dropRecognizeWith`,this)?this:(e=Tt(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(f(e,`requireFailure`,this))return this;var t=this.requireFail;return e=Tt(e,this),ee(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(f(e,`dropRequireFailure`,this))return this;e=Tt(e,this);var t=ee(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<L&&r(t.options.event+Ct(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=L&&r(t.options.event+Ct(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=xt},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(xt|gt)))return!1;e++}return!0},recognize:function(e){var t=h({},e);if(!b(this.options.enable,[this,t])){this.reset(),this.state=xt;return}this.state&(yt|bt|xt)&&(this.state=gt),this.state=this.process(t),this.state&(_t|vt|L|bt)&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}};function Ct(e){return e&bt?`cancel`:e&L?`end`:e&vt?`move`:e&_t?`start`:``}function wt(e){return e==O?`down`:e==Se?`up`:e==be?`left`:e==xe?`right`:``}function Tt(e,t){var n=t.manager;return n?n.get(e):e}function Et(){St.apply(this,arguments)}v(Et,St,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=t&(_t|vt),i=this.attrTest(e);return r&&(n&ve||!i)?t|bt:r||i?n&D?t|L:t&_t?t|vt:_t:xt}});function R(){Et.apply(this,arguments),this.pX=null,this.pY=null}v(R,Et,{defaults:{event:`pan`,threshold:10,pointers:1,direction:j},getTouchAction:function(){var e=this.options.direction,t=[];return e&k&&t.push(dt),e&A&&t.push(ut),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&k?(i=a===0?ye:a<0?be:xe,n=a!=this.pX,r=Math.abs(e.deltaX)):(i=o===0?ye:o<0?Se:O,n=o!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Et.prototype.attrTest.call(this,e)&&(this.state&_t||!(this.state&_t)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=wt(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}});function Dt(){Et.apply(this,arguments)}v(Dt,Et,{defaults:{event:`pinch`,threshold:0,pointers:2},getTouchAction:function(){return[lt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&_t)},emit:function(e){if(e.scale!==1){var t=e.scale<1?`in`:`out`;e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}});function Ot(){St.apply(this,arguments),this._timer=null,this._input=null}v(Ot,St,{defaults:{event:`press`,pointers:1,time:251,threshold:9},getTouchAction:function(){return[st]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||e.eventType&(D|ve)&&!i)this.reset();else if(e.eventType&ge)this.reset(),this._timer=d(function(){this.state=yt,this.tryEmit()},t.time,this);else if(e.eventType&D)return yt;return xt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===yt&&(e&&e.eventType&D?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function kt(){Et.apply(this,arguments)}v(kt,Et,{defaults:{event:`rotate`,threshold:0,pointers:2},getTouchAction:function(){return[lt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&_t)}});function At(){Et.apply(this,arguments)}v(At,Et,{defaults:{event:`swipe`,threshold:10,velocity:.3,direction:k|A,pointers:1},getTouchAction:function(){return R.prototype.getTouchAction.call(this)},attrTest:function(e){var t=this.options.direction,n;return t&(k|A)?n=e.overallVelocity:t&k?n=e.overallVelocityX:t&A&&(n=e.overallVelocityY),this._super.attrTest.call(this,e)&&t&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&l(n)>this.options.velocity&&e.eventType&D},emit:function(e){var t=wt(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}});function jt(){St.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}v(jt,St,{defaults:{event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ct]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),e.eventType&ge&&this.count===0)return this.failTimeout();if(r&&i&&n){if(e.eventType!=D)return this.failTimeout();var a=this.pTime?e.timeStamp-this.pTime<t.interval:!0,o=!this.pCenter||Me(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!o||!a?this.count=1:this.count+=1,this._input=e,this.count%t.taps===0)return this.hasRequireFailures()?(this._timer=d(function(){this.state=yt,this.tryEmit()},t.interval,this),_t):yt}return xt},failTimeout:function(){return this._timer=d(function(){this.state=xt},this.options.interval,this),xt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==yt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Mt(e,t){return t||={},t.recognizers=x(t.recognizers,Mt.defaults.preset),new Ft(e,t)}Mt.VERSION=`2.0.7`,Mt.defaults={domEvents:!1,touchAction:ot,enable:!0,inputTarget:null,inputClass:null,preset:[[kt,{enable:!1}],[Dt,{enable:!1},[`rotate`]],[At,{direction:k}],[R,{direction:k},[`swipe`]],[jt],[jt,{event:`doubletap`,taps:2},[`tap`]],[Ot]],cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}};var Nt=1,Pt=2;function Ft(e,t){this.options=h({},Mt.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Te(this),this.touchAction=new pt(this,this.options.touchAction),It(this,!0),p(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}Ft.prototype={set:function(e){return h(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?Pt:Nt},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&yt)&&(i=t.curRecognizer=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Pt&&(!i||n==i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(_t|vt|L)&&(i=t.curRecognizer=n),a++}},get:function(e){if(e instanceof St)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(f(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(f(e,`remove`,this))return this;if(e=this.get(e),e){var t=this.recognizers,n=ee(t,e);n!==-1&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return p(E(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return p(E(e),function(e){t?n[e]&&n[e].splice(ee(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&Lt(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&It(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function It(e,t){var n=e.element;if(n.style){var r;p(e.options.cssProps,function(i,a){r=re(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Lt(e,t){var r=n.createEvent(`Event`);r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}h(Mt,{INPUT_START:ge,INPUT_MOVE:_e,INPUT_END:D,INPUT_CANCEL:ve,STATE_POSSIBLE:gt,STATE_BEGAN:_t,STATE_CHANGED:vt,STATE_ENDED:L,STATE_RECOGNIZED:yt,STATE_CANCELLED:bt,STATE_FAILED:xt,DIRECTION_NONE:ye,DIRECTION_LEFT:be,DIRECTION_RIGHT:xe,DIRECTION_UP:Se,DIRECTION_DOWN:O,DIRECTION_HORIZONTAL:k,DIRECTION_VERTICAL:A,DIRECTION_ALL:j,Manager:Ft,Input:we,TouchAction:pt,TouchInput:Xe,MouseInput:ze,PointerEventInput:He,TouchMouseInput:et,SingleTouchInput:Ke,Recognizer:St,AttrRecognizer:Et,Tap:jt,Pan:R,Swipe:At,Pinch:Dt,Rotate:kt,Press:Ot,on:S,off:C,each:p,merge:_,extend:g,assign:h,inherit:v,bindFn:y,prefixed:re});var Rt=e===void 0?typeof self<`u`?self:{}:e;Rt.Hammer=Mt,typeof define==`function`&&define.amd?define(function(){return Mt}):t!==void 0&&t.exports?t.exports=Mt:e[r]=Mt})(window,document,`Hammer`)}))()),Dl=e=>e&&e.enabled&&e.modifierKey,Ol=(e,t)=>e&&t[e+`Key`],kl=(e,t)=>e&&!t[e+`Key`];function Al(e,t,n){return e===void 0?!0:typeof e==`string`?e.indexOf(t)!==-1:typeof e==`function`?e({chart:n}).indexOf(t)!==-1:!1}function jl(e,t){return typeof e==`function`&&(e=e({chart:t})),typeof e==`string`?{x:e.indexOf(`x`)!==-1,y:e.indexOf(`y`)!==-1}:{x:!1,y:!1}}function Ml(e,t){let n;return function(){return clearTimeout(n),n=setTimeout(e,t),t}}function Nl({x:e,y:t},n){let r=n.scales,i=Object.keys(r);for(let n=0;n<i.length;n++){let a=r[i[n]];if(t>=a.top&&t<=a.bottom&&e>=a.left&&e<=a.right)return a}return null}function Pl(e,t,n){let{mode:r=`xy`,scaleMode:i,overScaleMode:a}=e||{},o=Nl(t,n),s=jl(r,n),c=jl(i,n);if(a){let e=jl(a,n);for(let t of[`x`,`y`])e[t]&&(c[t]=s[t],s[t]=!1)}if(o&&c[o.axis])return[o];let l=[];return P(n.scales,function(e){s[e.axis]&&l.push(e)}),l}var Fl=new WeakMap;function Il(e){let t=Fl.get(e);return t||(t={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},Fl.set(e,t)),t}function Ll(e){Fl.delete(e)}function Rl(e,t,n,r){let i=Math.max(0,Math.min(1,(e-t)/n||0)),a=1-i;return{min:r*i,max:r*a}}function zl(e,t){let n=e.isHorizontal()?t.x:t.y;return e.getValueForPixel(n)}function Bl(e,t,n){let r=e.max-e.min,i=r*(t-1);return Rl(zl(e,n),e.min,r,i)}function Vl(e,t,n){let r=zl(e,n);if(r===void 0)return{min:e.min,max:e.max};let i=Math.log10(e.min),a=Math.log10(e.max),o=Math.log10(r),s=a-i,c=Rl(o,i,s,s*(t-1));return{min:10**(i+c.min),max:10**(a-c.max)}}function Hl(e,t){return t&&(t[e.id]||t[e.axis])||{}}function Ul(e,t,n,r,i){let a=n[r];if(a===`original`){let n=e.originalScaleLimits[t.id][r];a=M(n.options,n.scale)}return M(a,i)}function Wl(e,t,n){let r=e.getValueForPixel(t),i=e.getValueForPixel(n);return{min:Math.min(r,i),max:Math.max(r,i)}}function Gl(e,{min:t,max:n,minLimit:r,maxLimit:i},a){let o=(e-n+t)/2;t-=o,n+=o;let s=a.min.options??a.min.scale,c=a.max.options??a.max.scale,l=e/1e6;return Xe(t,s,l)&&(t=s),Xe(n,c,l)&&(n=c),t<r?(t=r,n=Math.min(r+e,i)):n>i&&(n=i,t=Math.max(i-e,r)),{min:t,max:n}}function Kl(e,{min:t,max:n},r,i=!1){let a=Il(e.chart),{options:o}=e,s=Hl(e,r),{minRange:c=0}=s,l=Ul(a,e,s,`min`,-1/0),u=Ul(a,e,s,`max`,1/0);if(i===`pan`&&(t<l||n>u))return!0;let d=e.max-e.min,f=i?Math.max(n-t,c):d;if(i&&f===c&&d<=c)return!0;let p=Gl(f,{min:t,max:n,minLimit:l,maxLimit:u},a.originalScaleLimits[e.id]);return o.min=p.min,o.max=p.max,a.updatedScaleLimits[e.id]=p,e.parse(p.min)!==e.min||e.parse(p.max)!==e.max}function ql(e,t,n,r){let i=Bl(e,t,n);return Kl(e,{min:e.min+i.min,max:e.max-i.max},r,!0)}function Jl(e,t,n,r){return Kl(e,Vl(e,t,n),r,!0)}function Yl(e,t,n,r){Kl(e,Wl(e,t,n),r,!0)}var Xl=e=>e===0||isNaN(e)?0:e<0?Math.min(Math.round(e),-1):Math.max(Math.round(e),1);function Zl(e){let t=e.getLabels().length-1;e.min>0&&--e.min,e.max<t&&(e.max+=1)}function Ql(e,t,n,r){let i=Bl(e,t,n);return e.min===e.max&&t<1&&Zl(e),Kl(e,{min:e.min+Xl(i.min),max:e.max-Xl(i.max)},r,!0)}function $l(e){return e.isHorizontal()?e.width:e.height}function eu(e,t,n){let r=e.getLabels().length-1,{min:i,max:a}=e,o=Math.max(a-i,1),s=Math.round($l(e)/Math.max(o,10)),c=Math.round(Math.abs(t/s)),l;return t<-s?(a=Math.min(a+c,r),i=o===1?a:a-o,l=a===r):t>s&&(i=Math.max(0,i-c),a=o===1?i:i+o,l=i===0),Kl(e,{min:i,max:a},n)||l}var tu={second:500,minute:30*1e3,hour:1800*1e3,day:720*60*1e3,week:3.5*24*60*60*1e3,month:360*60*60*1e3,quarter:1440*60*60*1e3,year:4368*60*60*1e3};function nu(e,t,n,r=!1){let{min:i,max:a,options:o}=e,s=tu[o.time&&o.time.round]||0,c=e.getValueForPixel(e.getPixelForValue(i+s)-t),l=e.getValueForPixel(e.getPixelForValue(a+s)-t);return isNaN(c)||isNaN(l)?!0:Kl(e,{min:c,max:l},n,r?`pan`:!1)}function ru(e,t,n){return nu(e,t,n,!0)}var iu={category:Ql,default:ql,logarithmic:Jl},au={default:Yl},ou={category:eu,default:nu,logarithmic:ru,timeseries:ru};function su(e,t,n){let{id:r,options:{min:i,max:a}}=e;if(!t[r]||!n[r])return!0;let o=n[r];return o.min!==i||o.max!==a}function cu(e,t){P(e,(n,r)=>{t[r]||delete e[r]})}function lu(e,t){let{scales:n}=e,{originalScaleLimits:r,updatedScaleLimits:i}=t;return P(n,function(e){su(e,r,i)&&(r[e.id]={min:{scale:e.min,options:e.options.min},max:{scale:e.max,options:e.options.max}})}),cu(r,n),cu(i,n),r}function uu(e,t,n,r){N(iu[e.type]||iu.default,[e,t,n,r])}function du(e,t,n,r){N(au[e.type]||au.default,[e,t,n,r])}function fu(e){let t=e.chartArea;return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function pu(e,t,n=`none`,r=`api`){let{x:i=1,y:a=1,focalPoint:o=fu(e)}=typeof t==`number`?{x:t,y:t}:t,s=Il(e),{options:{limits:c,zoom:l}}=s;lu(e,s);let u=i!==1,d=a!==1;P(Pl(l,o,e)||e.scales,function(e){e.isHorizontal()&&u?uu(e,i,o,c):!e.isHorizontal()&&d&&uu(e,a,o,c)}),e.update(n),N(l.onZoom,[{chart:e,trigger:r}])}function mu(e,t,n,r=`none`,i=`api`){let a=Il(e),{options:{limits:o,zoom:s}}=a,{mode:c=`xy`}=s;lu(e,a);let l=Al(c,`x`,e),u=Al(c,`y`,e);P(e.scales,function(e){e.isHorizontal()&&l?du(e,t.x,n.x,o):!e.isHorizontal()&&u&&du(e,t.y,n.y,o)}),e.update(r),N(s.onZoom,[{chart:e,trigger:i}])}function q(e,t,n,r=`none`,i=`api`){let a=Il(e);lu(e,a);let o=e.scales[t];Kl(o,n,void 0,!0),e.update(r),N(a.options.zoom?.onZoom,[{chart:e,trigger:i}])}function hu(e,t=`default`){let n=Il(e),r=lu(e,n);P(e.scales,function(e){let t=e.options;r[e.id]?(t.min=r[e.id].min.options,t.max=r[e.id].max.options):(delete t.min,delete t.max),delete n.updatedScaleLimits[e.id]}),e.update(t),N(n.options.zoom.onZoomComplete,[{chart:e}])}function gu(e,t){let n=e.originalScaleLimits[t];if(!n)return;let{min:r,max:i}=n;return M(i.options,i.scale)-M(r.options,r.scale)}function _u(e){let t=Il(e),n=1,r=1;return P(e.scales,function(e){let i=gu(t,e.id);if(i){let t=Math.round(i/(e.max-e.min)*100)/100;n=Math.min(n,t),r=Math.max(r,t)}}),n<1?n:r}function vu(e,t,n,r){let{panDelta:i}=r,a=i[e.id]||0;Ye(a)===Ye(t)&&(t+=a),N(ou[e.type]||ou.default,[e,t,n])?i[e.id]=0:i[e.id]=t}function yu(e,t,n,r=`none`){let{x:i=0,y:a=0}=typeof t==`number`?{x:t,y:t}:t,o=Il(e),{options:{pan:s,limits:c}}=o,{onPan:l}=s||{};lu(e,o);let u=i!==0,d=a!==0;P(n||e.scales,function(e){e.isHorizontal()&&u?vu(e,i,c,o):!e.isHorizontal()&&d&&vu(e,a,c,o)}),e.update(r),N(l,[{chart:e}])}function bu(e){let t=Il(e);lu(e,t);let n={};for(let r of Object.keys(e.scales)){let{min:e,max:i}=t.originalScaleLimits[r]||{min:{},max:{}};n[r]={min:e.scale,max:i.scale}}return n}function xu(e){let t=Il(e),n={};for(let r of Object.keys(e.scales))n[r]=t.updatedScaleLimits[r];return n}function Su(e){let t=bu(e);for(let n of Object.keys(e.scales)){let{min:r,max:i}=t[n];if(r!==void 0&&e.scales[n].min!==r||i!==void 0&&e.scales[n].max!==i)return!0}return!1}function Cu(e){let t=Il(e);return t.panning||t.dragging}var wu=(e,t,n)=>Math.min(n,Math.max(t,e));function Tu(e,t){let{handlers:n}=Il(e),r=n[t];r&&r.target&&(r.target.removeEventListener(t,r),delete n[t])}function Eu(e,t,n,r){let{handlers:i,options:a}=Il(e),o=i[n];if(o&&o.target===t)return;Tu(e,n),i[n]=t=>r(e,t,a),i[n].target=t;let s=n===`wheel`?!1:void 0;t.addEventListener(n,i[n],{passive:s})}function Du(e,t){let n=Il(e);n.dragStart&&(n.dragging=!0,n.dragEnd=t,e.update(`none`))}function Ou(e,t){let n=Il(e);!n.dragStart||t.key!==`Escape`||(Tu(e,`keydown`),n.dragging=!1,n.dragStart=n.dragEnd=null,e.update(`none`))}function ku(e,t){if(e.target!==t.canvas){let n=t.canvas.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}return sr(e,t)}function Au(e,t,n){let{onZoomStart:r,onZoomRejected:i}=n;if(r&&N(r,[{chart:e,event:t,point:ku(t,e)}])===!1)return N(i,[{chart:e,event:t}]),!1}function ju(e,t){if(e.legend&&rn(sr(t,e),e.legend))return;let n=Il(e),{pan:r,zoom:i={}}=n.options;if(t.button!==0||Ol(Dl(r),t)||kl(Dl(i.drag),t))return N(i.onZoomRejected,[{chart:e,event:t}]);Au(e,t,i)!==!1&&(n.dragStart=t,Eu(e,e.canvas.ownerDocument,`mousemove`,Du),Eu(e,window.document,`keydown`,Ou))}function Mu({begin:e,end:t},n){let r=t.x-e.x,i=t.y-e.y,a=Math.abs(r/i);a>n?r=Math.sign(r)*Math.abs(i*n):a<n&&(i=Math.sign(i)*Math.abs(r/n)),t.x=e.x+r,t.y=e.y+i}function Nu(e,t,n,{min:r,max:i,prop:a}){e[r]=wu(Math.min(n.begin[a],n.end[a]),t[r],t[i]),e[i]=wu(Math.max(n.begin[a],n.end[a]),t[r],t[i])}function Pu(e,t,n){let r={begin:ku(t.dragStart,e),end:ku(t.dragEnd,e)};return n&&Mu(r,e.chartArea.width/e.chartArea.height),r}function Fu(e,t,n,r){let i=Al(t,`x`,e),a=Al(t,`y`,e),{top:o,left:s,right:c,bottom:l,width:u,height:d}=e.chartArea,f={top:o,left:s,right:c,bottom:l},p=Pu(e,n,r&&i&&a);i&&Nu(f,e.chartArea,p,{min:`left`,max:`right`,prop:`x`}),a&&Nu(f,e.chartArea,p,{min:`top`,max:`bottom`,prop:`y`});let m=f.right-f.left,h=f.bottom-f.top;return{...f,width:m,height:h,zoomX:i&&m?1+(u-m)/u:1,zoomY:a&&h?1+(d-h)/d:1}}function Iu(e,t){let n=Il(e);if(!n.dragStart)return;Tu(e,`mousemove`);let{mode:r,onZoomComplete:i,drag:{threshold:a=0,maintainAspectRatio:o}}=n.options.zoom,s=Fu(e,r,{dragStart:n.dragStart,dragEnd:t},o),c=Al(r,`x`,e)?s.width:0,l=Al(r,`y`,e)?s.height:0,u=Math.sqrt(c*c+l*l);if(n.dragStart=n.dragEnd=null,u<=a){n.dragging=!1,e.update(`none`);return}mu(e,{x:s.left,y:s.top},{x:s.right,y:s.bottom},`zoom`,`drag`),n.dragging=!1,n.filterNextClick=!0,N(i,[{chart:e}])}function Lu(e,t,n){if(kl(Dl(n.wheel),t)){N(n.onZoomRejected,[{chart:e,event:t}]);return}if(Au(e,t,n)!==!1&&(t.cancelable&&t.preventDefault(),t.deltaY!==void 0))return!0}function Ru(e,t){let{handlers:{onZoomComplete:n},options:{zoom:r}}=Il(e);if(!Lu(e,t,r))return;let i=t.target.getBoundingClientRect(),a=r.wheel.speed,o=t.deltaY>=0?2-1/(1-a):1+a;pu(e,{x:o,y:o,focalPoint:{x:t.clientX-i.left,y:t.clientY-i.top}},`zoom`,`wheel`),N(n,[{chart:e}])}function zu(e,t,n,r){n&&(Il(e).handlers[t]=Ml(()=>N(n,[{chart:e}]),r))}function Bu(e,t){let n=e.canvas,{wheel:r,drag:i,onZoomComplete:a}=t.zoom;r.enabled?(Eu(e,n,`wheel`,Ru),zu(e,`onZoomComplete`,a,250)):Tu(e,`wheel`),i.enabled?(Eu(e,n,`mousedown`,ju),Eu(e,n.ownerDocument,`mouseup`,Iu)):(Tu(e,`mousedown`),Tu(e,`mousemove`),Tu(e,`mouseup`),Tu(e,`keydown`))}function Vu(e){Tu(e,`mousedown`),Tu(e,`mousemove`),Tu(e,`mouseup`),Tu(e,`wheel`),Tu(e,`click`),Tu(e,`keydown`)}function Hu(e,t){return function(n,r){let{pan:i,zoom:a={}}=t.options;if(!i||!i.enabled)return!1;let o=r&&r.srcEvent;return o&&!t.panning&&r.pointerType===`mouse`&&(kl(Dl(i),o)||Ol(Dl(a.drag),o))?(N(i.onPanRejected,[{chart:e,event:r}]),!1):!0}}function Uu(e,t){let n=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY),i=n/r,a,o;return i>.3&&i<1.7?a=o=!0:n>r?a=!0:o=!0,{x:a,y:o}}function Wu(e,t,n){if(t.scale){let{center:r,pointers:i}=n,a=1/t.scale*n.scale,o=n.target.getBoundingClientRect(),s=Uu(i[0],i[1]),c=t.options.zoom.mode;pu(e,{x:s.x&&Al(c,`x`,e)?a:1,y:s.y&&Al(c,`y`,e)?a:1,focalPoint:{x:r.x-o.left,y:r.y-o.top}},`zoom`,`pinch`),t.scale=n.scale}}function Gu(e,t,n){if(t.options.zoom.pinch.enabled){let r=sr(n,e);N(t.options.zoom.onZoomStart,[{chart:e,event:n,point:r}])===!1?(t.scale=null,N(t.options.zoom.onZoomRejected,[{chart:e,event:n}])):t.scale=1}}function Ku(e,t,n){t.scale&&(Wu(e,t,n),t.scale=null,N(t.options.zoom.onZoomComplete,[{chart:e}]))}function qu(e,t,n){let r=t.delta;r&&(t.panning=!0,yu(e,{x:n.deltaX-r.x,y:n.deltaY-r.y},t.panScales),t.delta={x:n.deltaX,y:n.deltaY})}function Ju(e,t,n){let{enabled:r,onPanStart:i,onPanRejected:a}=t.options.pan;if(!r)return;let o=n.target.getBoundingClientRect(),s={x:n.center.x-o.left,y:n.center.y-o.top};if(N(i,[{chart:e,event:n,point:s}])===!1)return N(a,[{chart:e,event:n}]);t.panScales=Pl(t.options.pan,s,e),t.delta={x:0,y:0},qu(e,t,n)}function Yu(e,t){t.delta=null,t.panning&&(t.panning=!1,t.filterNextClick=!0,N(t.options.pan.onPanComplete,[{chart:e}]))}var Xu=new WeakMap;function Zu(e,t){let n=Il(e),r=e.canvas,{pan:i,zoom:a}=t,o=new El.default.Manager(r);a&&a.pinch.enabled&&(o.add(new El.default.Pinch),o.on(`pinchstart`,t=>Gu(e,n,t)),o.on(`pinch`,t=>Wu(e,n,t)),o.on(`pinchend`,t=>Ku(e,n,t))),i&&i.enabled&&(o.add(new El.default.Pan({threshold:i.threshold,enable:Hu(e,n)})),o.on(`panstart`,t=>Ju(e,n,t)),o.on(`panmove`,t=>qu(e,n,t)),o.on(`panend`,()=>Yu(e,n))),Xu.set(e,o)}function Qu(e){let t=Xu.get(e);t&&(t.remove(`pinchstart`),t.remove(`pinch`),t.remove(`pinchend`),t.remove(`panstart`),t.remove(`pan`),t.remove(`panend`),t.destroy(),Xu.delete(e))}function $u(e,t){let{pan:n,zoom:r}=e,{pan:i,zoom:a}=t;return r?.zoom?.pinch?.enabled!==a?.zoom?.pinch?.enabled||n?.enabled!==i?.enabled||n?.threshold!==i?.threshold}var J=`2.2.0`;function ed(e,t,n){let r=n.zoom.drag,{dragStart:i,dragEnd:a}=Il(e);if(r.drawTime!==t||!a)return;let{left:o,top:s,width:c,height:l}=Fu(e,n.zoom.mode,{dragStart:i,dragEnd:a},r.maintainAspectRatio),u=e.ctx;u.save(),u.beginPath(),u.fillStyle=r.backgroundColor||`rgba(225,225,225,0.3)`,u.fillRect(o,s,c,l),r.borderWidth>0&&(u.lineWidth=r.borderWidth,u.strokeStyle=r.borderColor||`rgba(225,225,225)`,u.strokeRect(o,s,c,l)),u.restore()}var td={id:`zoom`,version:J,defaults:{pan:{enabled:!1,mode:`xy`,threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:`beforeDatasetsDraw`,modifierKey:null},pinch:{enabled:!1},mode:`xy`}},start:function(e,t,n){let r=Il(e);r.options=n,Object.prototype.hasOwnProperty.call(n.zoom,`enabled`)&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(n.zoom,`overScaleMode`)||Object.prototype.hasOwnProperty.call(n.pan,`overScaleMode`))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),El.default&&Zu(e,n),e.pan=(t,n,r)=>yu(e,t,n,r),e.zoom=(t,n)=>pu(e,t,n),e.zoomRect=(t,n,r)=>mu(e,t,n,r),e.zoomScale=(t,n,r)=>q(e,t,n,r),e.resetZoom=t=>hu(e,t),e.getZoomLevel=()=>_u(e),e.getInitialScaleBounds=()=>bu(e),e.getZoomedScaleBounds=()=>xu(e),e.isZoomedOrPanned=()=>Su(e),e.isZoomingOrPanning=()=>Cu(e)},beforeEvent(e,{event:t}){if(Cu(e))return!1;if(t.type===`click`||t.type===`mouseup`){let t=Il(e);if(t.filterNextClick)return t.filterNextClick=!1,!1}},beforeUpdate:function(e,t,n){let r=Il(e),i=r.options;r.options=n,$u(i,n)&&(Qu(e),Zu(e,n)),Bu(e,n)},beforeDatasetsDraw(e,t,n){ed(e,`beforeDatasetsDraw`,n)},afterDatasetsDraw(e,t,n){ed(e,`afterDatasetsDraw`,n)},beforeDraw(e,t,n){ed(e,`beforeDraw`,n)},afterDraw(e,t,n){ed(e,`afterDraw`,n)},stop:function(e){Vu(e),El.default&&Qu(e),Ll(e)},panFunctions:ou,zoomFunctions:iu,zoomRectFunctions:au},nd=function(){if(typeof window<`u`){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),rd={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n==`string`?t.unshift.apply(t,n.split(`
|
|
19
|
+
`)):Array.isArray(n)?e.push.apply(e,n):O(e)||t.unshift(``+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,a=e.font,o=0,s;for(e.font=n.string,s=0;s<i;++s)o=Math.max(e.measureText(r[s]).width,o);return e.font=a,{height:i*n.lineHeight,width:o}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,a,o,s;for(i=0,o=t.length;i<o;++i)s=t[i],a=n.indexOf(s),a===-1?r.push([s,1]):n.splice(a,1);for(i=0,o=n.length;i<o;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*nd)/nd}};function Y(e,t){var n=t.x,r=t.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var i=e.x-n,a=e.y-r,o=Math.sqrt(i*i+a*a);return{x:o?i/o:0,y:o?a/o:-1}}function id(e,t,n,r,i){switch(i){case`center`:n=r=0;break;case`bottom`:n=0,r=1;break;case`right`:n=1,r=0;break;case`left`:n=-1,r=0;break;case`top`:n=0,r=-1;break;case`start`:n=-n,r=-r;break;case`end`:break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return{x:e,y:t,vx:n,vy:r}}var ad=0,od=1,sd=2,cd=4,ld=8;function ud(e,t,n){var r=ad;return e<n.left?r|=od:e>n.right&&(r|=sd),t<n.top?r|=ld:t>n.bottom&&(r|=cd),r}function dd(e,t){for(var n=e.x0,r=e.y0,i=e.x1,a=e.y1,o=ud(n,r,t),s=ud(i,a,t),c,l,u;!(!(o|s)||o&s);)c=o||s,c&ld?(l=n+(i-n)*(t.top-r)/(a-r),u=t.top):c&cd?(l=n+(i-n)*(t.bottom-r)/(a-r),u=t.bottom):c&sd?(u=r+(a-r)*(t.right-n)/(i-n),l=t.right):c&od&&(u=r+(a-r)*(t.left-n)/(i-n),l=t.left),c===o?(n=l,r=u,o=ud(n,r,t)):(i=l,a=u,s=ud(i,a,t));return{x0:n,x1:i,y0:r,y1:a}}function fd(e,t){var n=t.anchor,r=e,i,a;return t.clamp&&(r=dd(r,t.area)),n===`start`?(i=r.x0,a=r.y0):n===`end`?(i=r.x1,a=r.y1):(i=(r.x0+r.x1)/2,a=(r.y0+r.y1)/2),id(i,a,e.vx,e.vy,t.align)}var pd={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),a=e.innerRadius,o=e.outerRadius;return fd({x0:e.x+r*a,y0:e.y+i*a,x1:e.x+r*o,y1:e.y+i*o,vx:r,vy:i},t)},point:function(e,t){var n=Y(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return fd({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=Y(e,t.origin),r=e.x,i=e.y,a=0,o=0;return e.horizontal?(r=Math.min(e.x,e.base),a=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),o=Math.abs(e.base-e.y)),fd({x0:r,y0:i+o,x1:r+a,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=Y(e,t.origin);return fd({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},md=rd.rasterize;function hd(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,a=-i/2,o=-r/2;return{frame:{x:a-n.left-t,y:o-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:a,y:o,w:i,h:r}}}function gd(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function _d(e){return e instanceof Uo?pd.arc:e instanceof rs?pd.point:e instanceof ps?pd.bar:pd.fallback}function vd(e,t,n,r,i,a){var o=Math.PI/2;if(a){var s=Math.min(a,i/2,r/2),c=t+s,l=n+s,u=t+r-s,d=n+i-s;e.moveTo(t,l),c<u&&l<d?(e.arc(c,l,s,-Math.PI,-o),e.arc(u,l,s,-o,0),e.arc(u,d,s,0,o),e.arc(c,d,s,o,Math.PI)):c<u?(e.moveTo(c,n),e.arc(u,l,s,-o,o),e.arc(c,l,s,o,Math.PI+o)):l<d?(e.arc(c,l,s,-Math.PI,0),e.arc(c,d,s,0,Math.PI)):e.arc(c,l,s,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)}function yd(e,t,n){var r=n.backgroundColor,i=n.borderColor,a=n.borderWidth;!r&&(!i||!a)||(e.beginPath(),vd(e,md(t.x)+a/2,md(t.y)+a/2,md(t.w)-a,md(t.h)-a,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&a&&(e.strokeStyle=i,e.lineWidth=a,e.lineJoin=`miter`,e.stroke()))}function bd(e,t,n){var r=n.lineHeight,i=e.w,a=e.x,o=e.y+r/2;return t===`center`?a+=i/2:(t===`end`||t===`right`)&&(a+=i),{h:r,w:i,x:a,y:o}}function xd(e,t,n){var r=e.shadowBlur,i=n.stroked,a=md(n.x),o=md(n.y),s=md(n.w);i&&e.strokeText(t,a,o,s),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,a,o,s),r&&i&&(e.shadowBlur=r))}function Sd(e,t,n,r){var i=r.textAlign,a=r.color,o=!!a,s=r.font,c=t.length,l=r.textStrokeColor,u=r.textStrokeWidth,d=l&&u,f;if(!(!c||!o&&!d))for(n=bd(n,i,s),e.font=s.string,e.textAlign=i,e.textBaseline=`middle`,e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,o&&(e.fillStyle=a),d&&(e.lineJoin=`round`,e.lineWidth=u,e.strokeStyle=l),f=0,c=t.length;f<c;++f)xd(e,t[f],{stroked:d,filled:o,w:n.w,x:n.x,y:n.y+n.h*f})}var Cd=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};Ae(Cd.prototype,{_modelize:function(e,t,n,r){var i=this,a=i._index,o=yn(bn([n.font,{}],r,a)),s=bn([n.color,z.color],r,a);return{align:bn([n.align,`center`],r,a),anchor:bn([n.anchor,`center`],r,a),area:r.chart.chartArea,backgroundColor:bn([n.backgroundColor,null],r,a),borderColor:bn([n.borderColor,null],r,a),borderRadius:bn([n.borderRadius,0],r,a),borderWidth:bn([n.borderWidth,0],r,a),clamp:bn([n.clamp,!1],r,a),clip:bn([n.clip,!1],r,a),color:s,display:e,font:o,lines:t,offset:bn([n.offset,4],r,a),opacity:bn([n.opacity,1],r,a),origin:gd(i._el,r),padding:H(bn([n.padding,4],r,a)),positioner:_d(i._el),rotation:bn([n.rotation,0],r,a)*(Math.PI/180),size:rd.textSize(i._ctx,t,o),textAlign:bn([n.textAlign,`start`],r,a),textShadowBlur:bn([n.textShadowBlur,0],r,a),textShadowColor:bn([n.textShadowColor,s],r,a),textStrokeColor:bn([n.textStrokeColor,s],r,a),textStrokeWidth:bn([n.textStrokeWidth,0],r,a)}},update:function(e){var t=this,n=null,r=null,i=t._index,a=t._config,o,s,c,l=bn([a.display,!0],e,i);l&&(o=e.dataset.data[i],s=M(N(a.formatter,[o,e]),o),c=O(s)?[]:rd.toTextLines(s),c.length&&(n=t._modelize(l,c,a,e),r=hd(n))),t._model=n,t._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,r=e.ctx,i=n._model,a=n._rects,o;this.visible()&&(r.save(),i.clip&&(o=i.area,r.beginPath(),r.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),r.clip()),r.globalAlpha=rd.bound(0,i.opacity,1),r.translate(md(t.x),md(t.y)),r.rotate(i.rotation),yd(r,a.frame,i),Sd(r,i.lines,a.text,i),r.restore())}});var wd=-(2**53-1)||-9007199254740991,Td=2**53-1||9007199254740991;function Ed(e,t,n){var r=Math.cos(n),i=Math.sin(n),a=t.x,o=t.y;return{x:a+r*(e.x-a)-i*(e.y-o),y:o+i*(e.x-a)+r*(e.y-o)}}function Dd(e,t){var n=Td,r=wd,i=t.origin,a,o,s,c,l;for(a=0;a<e.length;++a)o=e[a],s=o.x-i.x,c=o.y-i.y,l=t.vx*s+t.vy*c,n=Math.min(n,l),r=Math.max(r,l);return{min:n,max:r}}function Od(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/i,vy:(t.y-e.y)/i,origin:e,ln:i}}var kd=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Ae(kd.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,r=t._rect;return e=Ed(e,t.center(),-t._rotation),!(e.x<r.x-n||e.y<r.y-n||e.x>r.x+r.w+n*2||e.y>r.y+r.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),r=[Od(t[0],t[1]),Od(t[0],t[3])],i,a,o;for(this._rotation!==e._rotation&&r.push(Od(n[0],n[1]),Od(n[0],n[3])),i=0;i<r.length;++i)if(a=Dd(t,r[i]),o=Dd(n,r[i]),a.max<o.min||o.max<a.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[Ed({x:t.x,y:t.y},r,n),Ed({x:t.x+t.w,y:t.y},r,n),Ed({x:t.x+t.w,y:t.y+t.h},r,n),Ed({x:t.x,y:t.y+t.h},r,n)]}});function Ad(e,t,n){var r=t.positioner(e,t),i=r.vx,a=r.vy;if(!i&&!a)return{x:r.x,y:r.y};var o=n.w,s=n.h,c=t.rotation,l=Math.abs(o/2*Math.cos(c))+Math.abs(s/2*Math.sin(c)),u=Math.abs(o/2*Math.sin(c))+Math.abs(s/2*Math.cos(c)),d=1/Math.max(Math.abs(i),Math.abs(a));return l*=i*d,u*=a*d,l+=t.offset*i,u+=t.offset*a,{x:r.x+l,y:r.y+u}}function jd(e,t){var n,r,i,a;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)a=e[r].$layout,a._visible&&i._box.intersects(a._box)&&t(i,a);return e}function Md(e){var t,n,r,i,a,o,s;for(t=0,n=e.length;t<n;++t)r=e[t],i=r.$layout,i._visible&&(s=new Proxy(r._el,{get:(e,t)=>e.getProps([t],!0)[t]}),a=r.geometry(),o=Ad(s,r.model(),a),i._box.update(o,a,r.rotation()));return jd(e,function(e,t){var n=e._hidable,r=t._hidable;n&&r||r?t._visible=!1:n&&(e._visible=!1)})}var Nd={prepare:function(e){var t=[],n,r,i,a,o;for(n=0,i=e.length;n<i;++n)for(r=0,a=e[n].length;r<a;++r)o=e[n][r],t.push(o),o.$layout={_box:new kd,_hidable:!1,_visible:!0,_set:n,_idx:o._index};return t.sort(function(e,t){var n=e.$layout,r=t.$layout;return n._idx===r._idx?r._set-n._set:r._idx-n._idx}),this.update(t),t},update:function(e){var t=!1,n,r,i,a,o;for(n=0,r=e.length;n<r;++n)i=e[n],a=i.model(),o=i.$layout,o._hidable=a&&a.display===`auto`,o._visible=i.visible(),t|=o._hidable;t&&Md(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if(r=e[n].$layout,r&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,a,o,s;for(n=0,r=t.length;n<r;++n)i=t[n],a=i.$layout,a._visible&&(o=i.geometry(),s=Ad(i._el,i.model(),o),a._box.update(s,o,i.rotation()),i.draw(e,s))}},Pd={align:`center`,anchor:`center`,backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(e){if(O(e))return null;var t=e,n,r,i;if(A(e))if(!O(e.label))t=e.label;else if(!O(e.r))t=e.r;else for(t=``,n=Object.keys(e),i=0,r=n.length;i<r;++i)t+=(i===0?``:`, `)+n[i]+`: `+e[n[i]];return``+t},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:`start`,textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Fd=`$datalabels`,Id=`$default`;function Ld(e,t){var n=e.datalabels,r={},i=[],a,o;return n===!1?null:(n===!0&&(n={}),t=Ae({},[t,n]),a=t.labels||{},o=Object.keys(a),delete t.labels,o.length?o.forEach(function(e){a[e]&&i.push(Ae({},[t,a[e],{_key:e}]))}):i.push(t),r=i.reduce(function(e,t){return P(t.listeners||{},function(n,r){e[r]=e[r]||{},e[r][t._key||Id]=n}),delete t.listeners,e},{}),{labels:i,listeners:r})}function Rd(e,t,n,r){if(t){var i=n.$context,a=n.$groups,o;t[a._set]&&(o=t[a._set][a._key],o&&N(o,[i,r])===!0&&(e[Fd]._dirty=!0,n.update(i)))}}function zd(e,t,n,r,i){var a,o;!n&&!r||(n?r?n!==r&&(o=a=!0):o=!0:a=!0,o&&Rd(e,t.leave,n,i),a&&Rd(e,t.enter,r,i))}function Bd(e,t){var n=e[Fd],r=n._listeners,i,a;if(!(!r.enter&&!r.leave)){if(t.type===`mousemove`)a=Nd.lookup(n._labels,t);else if(t.type!==`mouseout`)return;i=n._hovered,n._hovered=a,zd(e,r,i,a,t)}}function Vd(e,t){var n=e[Fd],r=n._listeners.click,i=r&&Nd.lookup(n._labels,t);i&&Rd(e,r,i,t)}var Hd={id:`datalabels`,defaults:Pd,beforeInit:function(e){e[Fd]={_actives:[]}},beforeUpdate:function(e){var t=e[Fd];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[Fd],a=i._datasets[r]=[],o=e.isDatasetVisible(r),s=e.data.datasets[r],c=Ld(s,n),l=t.meta.data||[],u=e.ctx,d,f,p,m,h,g,_,v;for(u.save(),d=0,p=l.length;d<p;++d)if(_=l[d],_[Fd]=[],o&&_&&e.getDataVisibility(d)&&!_.skip)for(f=0,m=c.labels.length;f<m;++f)h=c.labels[f],g=h._key,v=new Cd(h,u,_,d),v.$groups={_set:r,_key:g||Id},v.$context={active:!1,chart:e,dataIndex:d,dataset:s,datasetIndex:r},v.update(v.$context),_[Fd].push(v),a.push(v);u.restore(),Ae(i._listeners,c.listeners,{merger:function(e,n,r){n[e]=n[e]||{},n[e][t.index]=r[e],i._listened=!0}})},afterUpdate:function(e){e[Fd]._labels=Nd.prepare(e[Fd]._datasets)},afterDatasetsDraw:function(e){Nd.draw(e,e[Fd]._labels)},beforeEvent:function(e,t){if(e[Fd]._listened){var n=t.event;switch(n.type){case`mousemove`:case`mouseout`:Bd(e,n);break;case`click`:Vd(e,n);break}}},afterEvent:function(e){var t=e[Fd],n=t._actives,r=t._actives=e.getActiveElements(),i=rd.arrayDiff(n,r),a,o,s,c,l,u,d;for(a=0,o=i.length;a<o;++a)if(l=i[a],l[1])for(d=l[0].element[Fd]||[],s=0,c=d.length;s<c;++s)u=d[s],u.$context.active=l[1]===1,u.update(u.$context);(t._dirty||i.length)&&(Nd.update(t._labels),e.render()),delete t._dirty}},Ud=r(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Wd=r(((e,t)=>{(function(){var n,r=`4.17.21`,i=200,a=`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`,o=`Expected a function`,s="Invalid `variable` option passed into `_.template`",c=`__lodash_hash_undefined__`,l=500,u=`__lodash_placeholder__`,d=1,f=2,p=4,m=1,h=2,g=1,_=2,v=4,y=8,b=16,x=32,S=64,C=128,w=256,T=512,E=30,ee=`...`,te=800,ne=16,re=1,ie=2,ae=3,oe=1/0,se=9007199254740991,ce=17976931348623157e292,le=NaN,ue=4294967295,de=ue-1,fe=ue>>>1,pe=[[`ary`,C],[`bind`,g],[`bindKey`,_],[`curry`,y],[`curryRight`,b],[`flip`,T],[`partial`,x],[`partialRight`,S],[`rearg`,w]],me=`[object Arguments]`,he=`[object Array]`,ge=`[object AsyncFunction]`,_e=`[object Boolean]`,D=`[object Date]`,ve=`[object DOMException]`,ye=`[object Error]`,be=`[object Function]`,xe=`[object GeneratorFunction]`,Se=`[object Map]`,O=`[object Number]`,k=`[object Null]`,A=`[object Object]`,j=`[object Promise]`,Ce=`[object Proxy]`,M=`[object RegExp]`,we=`[object Set]`,Te=`[object String]`,N=`[object Symbol]`,P=`[object Undefined]`,Ee=`[object WeakMap]`,De=`[object WeakSet]`,Oe=`[object ArrayBuffer]`,ke=`[object DataView]`,Ae=`[object Float32Array]`,je=`[object Float64Array]`,Me=`[object Int8Array]`,Ne=`[object Int16Array]`,Pe=`[object Int32Array]`,Fe=`[object Uint8Array]`,Ie=`[object Uint8ClampedArray]`,Le=`[object Uint16Array]`,Re=`[object Uint32Array]`,ze=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Ve=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,I=/[&<>"']/g,He=RegExp(F.source),Ue=RegExp(I.source),We=/<%-([\s\S]+?)%>/g,Ge=/<%([\s\S]+?)%>/g,Ke=/<%=([\s\S]+?)%>/g,qe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Je=/^\w*$/,Ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xe=/[\\^$.*+?()[\]{}|]/g,Ze=RegExp(Xe.source),Qe=/^\s+/,$e=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,tt=/\{\n\/\* \[wrapped with (.+)\] \*/,nt=/,? & /,rt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,it=/[()=,{}\[\]\/\s]/,at=/\\(\\)?/g,ot=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,ct=/^[-+]0x[0-9a-f]+$/i,lt=/^0b[01]+$/i,ut=/^\[object .+?Constructor\]$/,dt=/^0o[0-7]+$/i,ft=/^(?:0|[1-9]\d*)$/,pt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,gt=`\\ud800-\\udfff`,_t=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,vt=`\\u2700-\\u27bf`,L=`a-z\\xdf-\\xf6\\xf8-\\xff`,yt=`\\xac\\xb1\\xd7\\xf7`,bt=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,xt=`\\u2000-\\u206f`,St=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,Ct=`A-Z\\xc0-\\xd6\\xd8-\\xde`,wt=`\\ufe0e\\ufe0f`,Tt=yt+bt+xt+St,Et=`['’]`,R=`[`+gt+`]`,Dt=`[`+Tt+`]`,Ot=`[`+_t+`]`,kt=`\\d+`,At=`[`+vt+`]`,jt=`[`+L+`]`,Mt=`[^`+gt+Tt+kt+vt+L+Ct+`]`,Nt=`\\ud83c[\\udffb-\\udfff]`,Pt=`(?:`+Ot+`|`+Nt+`)`,Ft=`[^`+gt+`]`,It=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Lt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Rt=`[`+Ct+`]`,zt=`\\u200d`,Bt=`(?:`+jt+`|`+Mt+`)`,Vt=`(?:`+Rt+`|`+Mt+`)`,Ht=`(?:`+Et+`(?:d|ll|m|re|s|t|ve))?`,Ut=`(?:`+Et+`(?:D|LL|M|RE|S|T|VE))?`,Wt=Pt+`?`,Gt=`[`+wt+`]?`,Kt=`(?:`+zt+`(?:`+[Ft,It,Lt].join(`|`)+`)`+Gt+Wt+`)*`,qt=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,Jt=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,Yt=Gt+Wt+Kt,z=`(?:`+[At,It,Lt].join(`|`)+`)`+Yt,Xt=`(?:`+[Ft+Ot+`?`,Ot,It,Lt,R].join(`|`)+`)`,Zt=RegExp(Et,`g`),Qt=RegExp(Ot,`g`),$t=RegExp(Nt+`(?=`+Nt+`)|`+Xt+Yt,`g`),en=RegExp([Rt+`?`+jt+`+`+Ht+`(?=`+[Dt,Rt,`$`].join(`|`)+`)`,Vt+`+`+Ut+`(?=`+[Dt,Rt+Bt,`$`].join(`|`)+`)`,Rt+`?`+Bt+`+`+Ht,Rt+`+`+Ut,Jt,qt,kt,z].join(`|`),`g`),tn=RegExp(`[`+zt+gt+_t+wt+`]`),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rn=`Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout`.split(`.`),an=-1,B={};B[Ae]=B[je]=B[Me]=B[Ne]=B[Pe]=B[Fe]=B[Ie]=B[Le]=B[Re]=!0,B[me]=B[he]=B[Oe]=B[_e]=B[ke]=B[D]=B[ye]=B[be]=B[Se]=B[O]=B[A]=B[M]=B[we]=B[Te]=B[Ee]=!1;var V={};V[me]=V[he]=V[Oe]=V[ke]=V[_e]=V[D]=V[Ae]=V[je]=V[Me]=V[Ne]=V[Pe]=V[Se]=V[O]=V[A]=V[M]=V[we]=V[Te]=V[N]=V[Fe]=V[Ie]=V[Le]=V[Re]=!0,V[ye]=V[be]=V[Ee]=!1;var on={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`},sn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},cn={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},ln={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},un=parseFloat,dn=parseInt,fn=typeof global==`object`&&global&&global.Object===Object&&global,pn=typeof self==`object`&&self&&self.Object===Object&&self,mn=fn||pn||Function(`return this`)(),hn=typeof e==`object`&&e&&!e.nodeType&&e,gn=hn&&typeof t==`object`&&t&&!t.nodeType&&t,_n=gn&&gn.exports===hn,vn=_n&&fn.process,H=function(){try{return gn&&gn.require&&gn.require(`util`).types||vn&&vn.binding&&vn.binding(`util`)}catch{}}(),yn=H&&H.isArrayBuffer,bn=H&&H.isDate,xn=H&&H.isMap,Sn=H&&H.isRegExp,Cn=H&&H.isSet,wn=H&&H.isTypedArray;function Tn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function En(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Dn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function On(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function kn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function An(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function jn(e,t){return!!(e!=null&&e.length)&&Un(e,t,0)>-1}function Mn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Pn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Fn(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function In(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Ln(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rn=qn(`length`);function zn(e){return e.split(``)}function Bn(e){return e.match(rt)||[]}function Vn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Hn(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Un(e,t,n){return t===t?yr(e,t,n):Hn(e,Gn,n)}function Wn(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Gn(e){return e!==e}function Kn(e,t){var n=e==null?0:e.length;return n?Zn(e,t)/n:le}function qn(e){return function(t){return t==null?n:t[e]}}function Jn(e){return function(t){return e==null?n:e[t]}}function Yn(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function Xn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Zn(e,t){for(var r,i=-1,a=e.length;++i<a;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function Qn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $n(e,t){return Nn(t,function(t){return[t,e[t]]})}function er(e){return e&&e.slice(0,Cr(e)+1).replace(Qe,``)}function tr(e){return function(t){return e(t)}}function nr(e,t){return Nn(t,function(t){return e[t]})}function rr(e,t){return e.has(t)}function ir(e,t){for(var n=-1,r=e.length;++n<r&&Un(t,e[n],0)>-1;);return n}function ar(e,t){for(var n=e.length;n--&&Un(t,e[n],0)>-1;);return n}function or(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var sr=Jn(on),cr=Jn(sn);function lr(e){return`\\`+ln[e]}function ur(e,t){return e==null?n:e[t]}function dr(e){return tn.test(e)}function fr(e){return nn.test(e)}function pr(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function mr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function hr(e,t){return function(n){return e(t(n))}}function gr(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];(o===t||o===u)&&(e[n]=u,a[i++]=n)}return a}function _r(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function vr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function yr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function br(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function xr(e){return dr(e)?Tr(e):Rn(e)}function Sr(e){return dr(e)?Er(e):zn(e)}function Cr(e){for(var t=e.length;t--&&$e.test(e.charAt(t)););return t}var wr=Jn(cn);function Tr(e){for(var t=$t.lastIndex=0;$t.test(e);)++t;return t}function Er(e){return e.match($t)||[]}function Dr(e){return e.match(en)||[]}var Or=(function e(t){t=t==null?mn:Or.defaults(mn.Object(),t,Or.pick(mn,rn));var $e=t.Array,rt=t.Date,gt=t.Error,_t=t.Function,vt=t.Math,L=t.Object,yt=t.RegExp,bt=t.String,xt=t.TypeError,St=$e.prototype,Ct=_t.prototype,wt=L.prototype,Tt=t[`__core-js_shared__`],Et=Ct.toString,R=wt.hasOwnProperty,Dt=0,Ot=function(){var e=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),kt=wt.toString,At=Et.call(L),jt=mn._,Mt=yt(`^`+Et.call(R).replace(Xe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Nt=_n?t.Buffer:n,Pt=t.Symbol,Ft=t.Uint8Array,It=Nt?Nt.allocUnsafe:n,Lt=hr(L.getPrototypeOf,L),Rt=L.create,zt=wt.propertyIsEnumerable,Bt=St.splice,Vt=Pt?Pt.isConcatSpreadable:n,Ht=Pt?Pt.iterator:n,Ut=Pt?Pt.toStringTag:n,Wt=function(){try{var e=es(L,`defineProperty`);return e({},``,{}),e}catch{}}(),Gt=t.clearTimeout!==mn.clearTimeout&&t.clearTimeout,Kt=rt&&rt.now!==mn.Date.now&&rt.now,qt=t.setTimeout!==mn.setTimeout&&t.setTimeout,Jt=vt.ceil,Yt=vt.floor,z=L.getOwnPropertySymbols,Xt=Nt?Nt.isBuffer:n,$t=t.isFinite,en=St.join,tn=hr(L.keys,L),nn=vt.max,on=vt.min,sn=rt.now,cn=t.parseInt,ln=vt.random,fn=St.reverse,pn=es(t,`DataView`),hn=es(t,`Map`),gn=es(t,`Promise`),vn=es(t,`Set`),H=es(t,`WeakMap`),Rn=es(L,`create`),zn=H&&new H,Jn={},yr=zs(pn),Tr=zs(hn),Er=zs(gn),kr=zs(vn),Ar=zs(H),jr=Pt?Pt.prototype:n,Mr=jr?jr.valueOf:n,Nr=jr?jr.toString:n;function U(e){if(ju(e)&&!q(e)&&!(e instanceof W)){if(e instanceof Ir)return e;if(R.call(e,`__wrapped__`))return Vs(e)}return new Ir(e)}var Pr=function(){function e(){}return function(t){if(!Au(t))return{};if(Rt)return Rt(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Fr(){}function Ir(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}U.templateSettings={escape:We,evaluate:Ge,interpolate:Ke,variable:``,imports:{_:U}},U.prototype=Fr.prototype,U.prototype.constructor=U,Ir.prototype=Pr(Fr.prototype),Ir.prototype.constructor=Ir;function W(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ue,this.__views__=[]}function Lr(){var e=new W(this.__wrapped__);return e.__actions__=fo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=fo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=fo(this.__views__),e}function Rr(){if(this.__filtered__){var e=new W(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function zr(){var e=this.__wrapped__.value(),t=this.__dir__,n=q(e),r=t<0,i=n?e.length:0,a=as(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,d=u.length,f=0,p=on(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return Ka(e,this.__actions__);var m=[];outer:for(;c--&&f<p;){l+=t;for(var h=-1,g=e[l];++h<d;){var _=u[h],v=_.iteratee,y=_.type,b=v(g);if(y==ie)g=b;else if(!b){if(y==re)continue outer;break outer}}m[f++]=g}return m}W.prototype=Pr(Fr.prototype),W.prototype.constructor=W;function Br(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vr(){this.__data__=Rn?Rn(null):{},this.size=0}function Hr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ur(e){var t=this.__data__;if(Rn){var r=t[e];return r===c?n:r}return R.call(t,e)?t[e]:n}function Wr(e){var t=this.__data__;return Rn?t[e]!==n:R.call(t,e)}function Gr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rn&&t===n?c:t,this}Br.prototype.clear=Vr,Br.prototype.delete=Hr,Br.prototype.get=Ur,Br.prototype.has=Wr,Br.prototype.set=Gr;function Kr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qr(){this.__data__=[],this.size=0}function Jr(e){var t=this.__data__,n=yi(t,e);return n<0?!1:(n==t.length-1?t.pop():Bt.call(t,n,1),--this.size,!0)}function Yr(e){var t=this.__data__,r=yi(t,e);return r<0?n:t[r][1]}function Xr(e){return yi(this.__data__,e)>-1}function Zr(e,t){var n=this.__data__,r=yi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Kr.prototype.clear=qr,Kr.prototype.delete=Jr,Kr.prototype.get=Yr,Kr.prototype.has=Xr,Kr.prototype.set=Zr;function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $r(){this.size=0,this.__data__={hash:new Br,map:new(hn||Kr),string:new Br}}function ei(e){var t=Qo(this,e).delete(e);return this.size-=t?1:0,t}function ti(e){return Qo(this,e).get(e)}function ni(e){return Qo(this,e).has(e)}function ri(e,t){var n=Qo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Qr.prototype.clear=$r,Qr.prototype.delete=ei,Qr.prototype.get=ti,Qr.prototype.has=ni,Qr.prototype.set=ri;function ii(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Qr;++t<n;)this.add(e[t])}function ai(e){return this.__data__.set(e,c),this}function oi(e){return this.__data__.has(e)}ii.prototype.add=ii.prototype.push=ai,ii.prototype.has=oi;function si(e){this.size=(this.__data__=new Kr(e)).size}function ci(){this.__data__=new Kr,this.size=0}function li(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ui(e){return this.__data__.get(e)}function di(e){return this.__data__.has(e)}function fi(e,t){var n=this.__data__;if(n instanceof Kr){var r=n.__data__;if(!hn||r.length<i-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}si.prototype.clear=ci,si.prototype.delete=li,si.prototype.get=ui,si.prototype.has=di,si.prototype.set=fi;function pi(e,t){var n=q(e),r=!n&&mu(e),i=!n&&!r&&yu(e),a=!n&&!r&&!i&&Ku(e),o=n||r||i||a,s=o?Qn(e.length,bt):[],c=s.length;for(var l in e)(t||R.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||ps(l,c)))&&s.push(l);return s}function mi(e){var t=e.length;return t?e[Ea(0,t-1)]:n}function hi(e,t){return Is(fo(e),Ti(t,0,e.length))}function gi(e){return Is(fo(e))}function _i(e,t,r){(r!==n&&!du(e[t],r)||r===n&&!(t in e))&&Ci(e,t,r)}function vi(e,t,r){var i=e[t];(!(R.call(e,t)&&du(i,r))||r===n&&!(t in e))&&Ci(e,t,r)}function yi(e,t){for(var n=e.length;n--;)if(du(e[n][0],t))return n;return-1}function bi(e,t,n,r){return ji(e,function(e,i,a){t(r,e,n(e),a)}),r}function xi(e,t){return e&&po(t,Ed(t),e)}function Si(e,t){return e&&po(t,Dd(t),e)}function Ci(e,t,n){t==`__proto__`&&Wt?Wt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wi(e,t){for(var r=-1,i=t.length,a=$e(i),o=e==null;++r<i;)a[r]=o?n:bd(e,t[r]);return a}function Ti(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function Ei(e,t,r,i,a,o){var s,c=t&d,l=t&f,u=t&p;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!Au(e))return e;var m=q(e);if(m){if(s=cs(e),!c)return fo(e,s)}else{var h=is(e),g=h==be||h==xe;if(yu(e))return to(e,c);if(h==A||h==me||g&&!a){if(s=l||g?{}:ls(e),!c)return l?ho(e,Si(s,e)):mo(e,xi(s,e))}else{if(!V[h])return a?e:{};s=us(e,h,c)}}o||=new si;var _=o.get(e);if(_)return _;o.set(e,s),Uu(e)?e.forEach(function(n){s.add(Ei(n,t,r,n,e,o))}):Mu(e)&&e.forEach(function(n,i){s.set(i,Ei(n,t,r,i,e,o))});var v=m?n:(u?l?Jo:qo:l?Dd:Ed)(e);return Dn(v||e,function(n,i){v&&(i=n,n=e[i]),vi(s,i,Ei(n,t,r,i,e,o))}),s}function Di(e){var t=Ed(e);return function(n){return Oi(n,e,t)}}function Oi(e,t,r){var i=r.length;if(e==null)return!i;for(e=L(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function ki(e,t,r){if(typeof e!=`function`)throw new xt(o);return Ms(function(){e.apply(n,r)},t)}function Ai(e,t,n,r){var a=-1,o=jn,s=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=Nn(t,tr(n))),r?(o=Mn,s=!1):t.length>=i&&(o=rr,s=!1,t=new ii(t));outer:for(;++a<c;){var d=e[a],f=n==null?d:n(d);if(d=r||d!==0?d:0,s&&f===f){for(var p=u;p--;)if(t[p]===f)continue outer;l.push(d)}else o(t,f,r)||l.push(d)}return l}var ji=vo(Bi),Mi=vo(Vi,!0);function Ni(e,t){var n=!0;return ji(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function Pi(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===n?s===s&&!Gu(s):r(s,c)))var c=s,l=o}return l}function Fi(e,t,r,i){var a=e.length;for(r=J(r),r<0&&(r=-r>a?0:a+r),i=i===n||i>a?a:J(i),i<0&&(i+=a),i=r>i?0:ed(i);r<i;)e[r++]=t;return e}function Ii(e,t){var n=[];return ji(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Li(e,t,n,r,i){var a=-1,o=e.length;for(n||=fs,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Li(s,t-1,n,r,i):Pn(i,s):r||(i[i.length]=s)}return i}var Ri=yo(),zi=yo(!0);function Bi(e,t){return e&&Ri(e,t,Ed)}function Vi(e,t){return e&&zi(e,t,Ed)}function Hi(e,t){return An(t,function(t){return Du(e[t])})}function Ui(e,t){t=Za(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Rs(t[r++])];return r&&r==i?e:n}function Wi(e,t,n){var r=t(e);return q(e)?r:Pn(r,n(e))}function Gi(e){return e==null?e===n?P:k:Ut&&Ut in L(e)?ts(e):Es(e)}function Ki(e,t){return e>t}function qi(e,t){return e!=null&&R.call(e,t)}function Ji(e,t){return e!=null&&t in L(e)}function Yi(e,t,n){return e>=on(t,n)&&e<nn(t,n)}function Xi(e,t,r){for(var i=r?Mn:jn,a=e[0].length,o=e.length,s=o,c=$e(o),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Nn(d,tr(t))),l=on(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new ii(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f<a&&u.length<l;){var m=d[f],h=t?t(m):m;if(m=r||m!==0?m:0,!(p?rr(p,h):i(u,h,r))){for(s=o;--s;){var g=c[s];if(!(g?rr(g,h):i(e[s],h,r)))continue outer}p&&p.push(h),u.push(m)}}return u}function Zi(e,t,n,r){return Bi(e,function(e,i,a){t(r,n(e),i,a)}),r}function Qi(e,t,r){t=Za(t,e),e=Os(e,t);var i=e==null?e:e[Rs(fc(t))];return i==null?n:Tn(i,e,r)}function $i(e){return ju(e)&&Gi(e)==me}function ea(e){return ju(e)&&Gi(e)==Oe}function ta(e){return ju(e)&&Gi(e)==D}function na(e,t,n,r,i){return e===t?!0:e==null||t==null||!ju(e)&&!ju(t)?e!==e&&t!==t:ra(e,t,n,r,na,i)}function ra(e,t,n,r,i,a){var o=q(e),s=q(t),c=o?he:is(e),l=s?he:is(t);c=c==me?A:c,l=l==me?A:l;var u=c==A,d=l==A,f=c==l;if(f&&yu(e)){if(!yu(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new si,o||Ku(e)?Uo(e,t,n,r,i,a):Wo(e,t,c,n,r,i,a);if(!(n&m)){var p=u&&R.call(e,`__wrapped__`),h=d&&R.call(t,`__wrapped__`);if(p||h){var g=p?e.value():e,_=h?t.value():t;return a||=new si,i(g,_,n,r,a)}}return f?(a||=new si,Go(e,t,n,r,i,a)):!1}function ia(e){return ju(e)&&is(e)==Se}function aa(e,t,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=L(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===n&&!(l in e))return!1}else{var f=new si;if(i)var p=i(u,d,l,e,t,f);if(!(p===n?na(d,u,m|h,i,f):p))return!1}}return!0}function oa(e){return!Au(e)||vs(e)?!1:(Du(e)?Mt:ut).test(zs(e))}function sa(e){return ju(e)&&Gi(e)==M}function ca(e){return ju(e)&&is(e)==we}function la(e){return ju(e)&&ku(e.length)&&!!B[Gi(e)]}function ua(e){return typeof e==`function`?e:e==null?Mf:typeof e==`object`?q(e)?ga(e[0],e[1]):ha(e):Gf(e)}function da(e){if(!bs(e))return tn(e);var t=[];for(var n in L(e))R.call(e,n)&&n!=`constructor`&&t.push(n);return t}function fa(e){if(!Au(e))return Ts(e);var t=bs(e),n=[];for(var r in e)r==`constructor`&&(t||!R.call(e,r))||n.push(r);return n}function pa(e,t){return e<t}function ma(e,t){var n=-1,r=gu(e)?$e(e.length):[];return ji(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function ha(e){var t=$o(e);return t.length==1&&t[0][2]?Ss(t[0][0],t[0][1]):function(n){return n===e||aa(n,e,t)}}function ga(e,t){return hs(e)&&xs(t)?Ss(Rs(e),t):function(r){var i=bd(r,e);return i===n&&i===t?Sd(r,e):na(t,i,m|h)}}function _a(e,t,r,i,a){e!==t&&Ri(t,function(o,s){if(a||=new si,Au(o))va(e,t,s,r,_a,i,a);else{var c=i?i(As(e,s),o,s+``,e,t,a):n;c===n&&(c=o),_i(e,s,c)}},Dd)}function va(e,t,r,i,a,o,s){var c=As(e,r),l=As(t,r),u=s.get(l);if(u){_i(e,r,u);return}var d=o?o(c,l,r+``,e,t,s):n,f=d===n;if(f){var p=q(l),m=!p&&yu(l),h=!p&&!m&&Ku(l);d=l,p||m||h?q(c)?d=c:_u(c)?d=fo(c):m?(f=!1,d=to(l,!0)):h?(f=!1,d=oo(l,!0)):d=[]:Bu(l)||mu(l)?(d=c,mu(c)?d=nd(c):(!Au(c)||Du(c))&&(d=ls(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),_i(e,r,d)}function ya(e,t){var r=e.length;if(r)return t+=t<0?r:0,ps(t,r)?e[t]:n}function ba(e,t,n){t=t.length?Nn(t,function(e){return q(e)?function(t){return Ui(t,e.length===1?e[0]:e)}:e}):[Mf];var r=-1;return t=Nn(t,tr(K())),Xn(ma(e,function(e,n,i){return{criteria:Nn(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return co(e,t,n)})}function xa(e,t){return Sa(e,t,function(t,n){return Sd(e,n)})}function Sa(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Ui(e,o);n(s,o)&&ja(a,Za(o,e),s)}return a}function Ca(e){return function(t){return Ui(t,e)}}function wa(e,t,n,r){var i=r?Wn:Un,a=-1,o=t.length,s=e;for(e===t&&(t=fo(t)),n&&(s=Nn(e,tr(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&Bt.call(s,c,1),Bt.call(e,c,1);return e}function Ta(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;ps(i)?Bt.call(e,i,1):Ua(e,i)}}return e}function Ea(e,t){return e+Yt(ln()*(t-e+1))}function Da(e,t,n,r){for(var i=-1,a=nn(Jt((t-e)/(n||1)),0),o=$e(a);a--;)o[r?a:++i]=e,e+=n;return o}function Oa(e,t){var n=``;if(!e||t<1||t>se)return n;do t%2&&(n+=e),t=Yt(t/2),t&&(e+=e);while(t);return n}function G(e,t){return Ns(Ds(e,t,Mf),e+``)}function ka(e){return mi(X(e))}function Aa(e,t){var n=X(e);return Is(n,Ti(t,0,n.length))}function ja(e,t,r,i){if(!Au(e))return e;t=Za(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=Rs(t[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):n,u===n&&(u=Au(d)?d:ps(t[a+1])?[]:{})}vi(c,l,u),c=c[l]}return e}var Ma=zn?function(e,t){return zn.set(e,t),e}:Mf,Na=Wt?function(e,t){return Wt(e,`toString`,{configurable:!0,enumerable:!1,value:Of(t),writable:!0})}:Mf;function Pa(e){return Is(X(e))}function Fa(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=$e(i);++r<i;)a[r]=e[r+t];return a}function Ia(e,t){var n;return ji(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function La(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t==`number`&&t===t&&i<=fe){for(;r<i;){var a=r+i>>>1,o=e[a];o!==null&&!Gu(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return Ra(e,t,Mf,n)}function Ra(e,t,r,i){var a=0,o=e==null?0:e.length;if(o===0)return 0;t=r(t);for(var s=t!==t,c=t===null,l=Gu(t),u=t===n;a<o;){var d=Yt((a+o)/2),f=r(e[d]),p=f!==n,m=f===null,h=f===f,g=Gu(f);if(s)var _=i||h;else _=u?h&&(i||p):c?h&&p&&(i||!m):l?h&&p&&!m&&(i||!g):m||g?!1:i?f<=t:f<t;_?a=d+1:o=d}return on(o,de)}function za(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!du(s,c)){var c=s;a[i++]=o===0?0:o}}return a}function Ba(e){return typeof e==`number`?e:Gu(e)?le:+e}function Va(e){if(typeof e==`string`)return e;if(q(e))return Nn(e,Va)+``;if(Gu(e))return Nr?Nr.call(e):``;var t=e+``;return t==`0`&&1/e==-oe?`-0`:t}function Ha(e,t,n){var r=-1,a=jn,o=e.length,s=!0,c=[],l=c;if(n)s=!1,a=Mn;else if(o>=i){var u=t?null:Lo(e);if(u)return _r(u);s=!1,a=rr,l=new ii}else l=t?[]:c;outer:for(;++r<o;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),c.push(d)}else a(l,f,n)||(l!==c&&l.push(f),c.push(d))}return c}function Ua(e,t){return t=Za(t,e),e=Os(e,t),e==null||delete e[Rs(fc(t))]}function Wa(e,t,n,r){return ja(e,t,n(Ui(e,t)),r)}function Ga(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?Fa(e,r?0:a,r?a+1:i):Fa(e,r?a+1:0,r?i:a)}function Ka(e,t){var n=e;return n instanceof W&&(n=n.value()),Fn(t,function(e,t){return t.func.apply(t.thisArg,Pn([e],t.args))},n)}function qa(e,t,n){var r=e.length;if(r<2)return r?Ha(e[0]):[];for(var i=-1,a=$e(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Ai(a[i]||o,e[s],t,n));return Ha(Li(a,1),t,n)}function Ja(e,t,r){for(var i=-1,a=e.length,o=t.length,s={};++i<a;){var c=i<o?t[i]:n;r(s,e[i],c)}return s}function Ya(e){return _u(e)?e:[]}function Xa(e){return typeof e==`function`?e:Mf}function Za(e,t){return q(e)?e:hs(e,t)?[e]:Ls(Y(e))}var Qa=G;function $a(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:Fa(e,t,r)}var eo=Gt||function(e){return mn.clearTimeout(e)};function to(e,t){if(t)return e.slice();var n=e.length,r=It?It(n):new e.constructor(n);return e.copy(r),r}function no(e){var t=new e.constructor(e.byteLength);return new Ft(t).set(new Ft(e)),t}function ro(e,t){var n=t?no(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function io(e){var t=new e.constructor(e.source,st.exec(e));return t.lastIndex=e.lastIndex,t}function ao(e){return Mr?L(Mr.call(e)):{}}function oo(e,t){var n=t?no(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function so(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=Gu(e),s=t!==n,c=t===null,l=t===t,u=Gu(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function co(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=so(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function lo(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=nn(a-o,0),u=$e(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function uo(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=nn(a-s,0),d=$e(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function fo(e,t){var n=-1,r=e.length;for(t||=$e(r);++n<r;)t[n]=e[n];return t}function po(e,t,r,i){var a=!r;r||={};for(var o=-1,s=t.length;++o<s;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),a?Ci(r,c,l):vi(r,c,l)}return r}function mo(e,t){return po(e,ns(e),t)}function ho(e,t){return po(e,rs(e),t)}function go(e,t){return function(n,r){var i=q(n)?En:bi,a=t?t():{};return i(n,e,K(r,2),a)}}function _o(e){return G(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&ms(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=L(t);++i<a;){var c=r[i];c&&e(t,c,i,o)}return t})}function vo(e,t){return function(n,r){if(n==null)return n;if(!gu(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=L(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function yo(e){return function(t,n,r){for(var i=-1,a=L(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function bo(e,t,n){var r=t&g,i=Co(e);function a(){return(this&&this!==mn&&this instanceof a?i:e).apply(r?n:this,arguments)}return a}function xo(e){return function(t){t=Y(t);var r=dr(t)?Sr(t):n,i=r?r[0]:t.charAt(0),a=r?$a(r,1).join(``):t.slice(1);return i[e]()+a}}function So(e){return function(t){return Fn(Cf(Yd(t).replace(Zt,``)),e,``)}}function Co(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Pr(e.prototype),r=e.apply(n,t);return Au(r)?r:n}}function wo(e,t,r){var i=Co(e);function a(){for(var o=arguments.length,s=$e(o),c=o,l=Zo(a);c--;)s[c]=arguments[c];var u=o<3&&s[0]!==l&&s[o-1]!==l?[]:gr(s,l);return o-=u.length,o<r?Fo(e,t,Do,a.placeholder,n,s,u,n,n,r-o):Tn(this&&this!==mn&&this instanceof a?i:e,this,s)}return a}function To(e){return function(t,r,i){var a=L(t);if(!gu(t)){var o=K(r,3);t=Ed(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[o?t[s]:s]:n}}function Eo(e){return Ko(function(t){var r=t.length,i=r,a=Ir.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if(typeof s!=`function`)throw new xt(o);if(a&&!c&&Xo(s)==`wrapper`)var c=new Ir([],!0)}for(i=c?i:r;++i<r;){s=t[i];var l=Xo(s),u=l==`wrapper`?Yo(s):n;c=u&&_s(u[0])&&u[1]==(C|y|x|w)&&!u[4].length&&u[9]==1?c[Xo(u[0])].apply(c,u[3]):s.length==1&&_s(s)?c[l]():c.thru(s)}return function(){var e=arguments,n=e[0];if(c&&e.length==1&&q(n))return c.plant(n).value();for(var i=0,a=r?t[i].apply(this,e):n;++i<r;)a=t[i].call(this,a);return a}})}function Do(e,t,r,i,a,o,s,c,l,u){var d=t&C,f=t&g,p=t&_,m=t&(y|b),h=t&T,v=p?n:Co(e);function x(){for(var n=arguments.length,g=$e(n),_=n;_--;)g[_]=arguments[_];if(m)var y=Zo(x),b=or(g,y);if(i&&(g=lo(g,i,a,m)),o&&(g=uo(g,o,s,m)),n-=b,m&&n<u){var S=gr(g,y);return Fo(e,t,Do,x.placeholder,r,g,S,c,l,u-n)}var C=f?r:this,w=p?C[e]:e;return n=g.length,c?g=ks(g,c):h&&n>1&&g.reverse(),d&&l<n&&(g.length=l),this&&this!==mn&&this instanceof x&&(w=v||Co(w)),w.apply(C,g)}return x}function Oo(e,t){return function(n,r){return Zi(n,e,t(r),{})}}function ko(e,t){return function(r,i){var a;if(r===n&&i===n)return t;if(r!==n&&(a=r),i!==n){if(a===n)return i;typeof r==`string`||typeof i==`string`?(r=Va(r),i=Va(i)):(r=Ba(r),i=Ba(i)),a=e(r,i)}return a}}function Ao(e){return Ko(function(t){return t=Nn(t,tr(K())),G(function(n){var r=this;return e(t,function(e){return Tn(e,r,n)})})})}function jo(e,t){t=t===n?` `:Va(t);var r=t.length;if(r<2)return r?Oa(t,e):t;var i=Oa(t,Jt(e/xr(t)));return dr(t)?$a(Sr(i),0,e).join(``):i.slice(0,e)}function Mo(e,t,n,r){var i=t&g,a=Co(e);function o(){for(var t=-1,s=arguments.length,c=-1,l=r.length,u=$e(l+s),d=this&&this!==mn&&this instanceof o?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++t];return Tn(d,i?n:this,u)}return o}function No(e){return function(t,r,i){return i&&typeof i!=`number`&&ms(t,r,i)&&(r=i=n),t=$u(t),r===n?(r=t,t=0):r=$u(r),i=i===n?t<r?1:-1:$u(i),Da(t,r,i,e)}}function Po(e){return function(t,n){return typeof t==`string`&&typeof n==`string`||(t=td(t),n=td(n)),e(t,n)}}function Fo(e,t,r,i,a,o,s,c,l,u){var d=t&y,f=d?s:n,p=d?n:s,m=d?o:n,h=d?n:o;t|=d?x:S,t&=~(d?S:x),t&v||(t&=~(g|_));var b=[e,t,a,m,f,h,p,c,l,u],C=r.apply(n,b);return _s(e)&&js(C,b),C.placeholder=i,Ps(C,e,t)}function Io(e){var t=vt[e];return function(e,n){if(e=td(e),n=n==null?0:on(J(n),292),n&&$t(e)){var r=(Y(e)+`e`).split(`e`);return r=(Y(t(r[0]+`e`+(+r[1]+n)))+`e`).split(`e`),+(r[0]+`e`+(+r[1]-n))}return t(e)}}var Lo=vn&&1/_r(new vn([,-0]))[1]==oe?function(e){return new vn(e)}:Bf;function Ro(e){return function(t){var n=is(t);return n==Se?mr(t):n==we?vr(t):$n(t,e(t))}}function zo(e,t,r,i,a,s,c,l){var u=t&_;if(!u&&typeof e!=`function`)throw new xt(o);var d=i?i.length:0;if(d||(t&=~(x|S),i=a=n),c=c===n?c:nn(J(c),0),l=l===n?l:J(l),d-=a?a.length:0,t&S){var f=i,p=a;i=a=n}var m=u?n:Yo(e),h=[e,t,r,i,a,f,p,s,c,l];if(m&&ws(h,m),e=h[0],t=h[1],r=h[2],i=h[3],a=h[4],l=h[9]=h[9]===n?u?0:e.length:nn(h[9]-d,0),!l&&t&(y|b)&&(t&=~(y|b)),!t||t==g)var v=bo(e,t,r);else v=t==y||t==b?wo(e,t,l):(t==x||t==(g|x))&&!a.length?Mo(e,t,r,i):Do.apply(n,h);return Ps((m?Ma:js)(v,h),e,t)}function Bo(e,t,r,i){return e===n||du(e,wt[r])&&!R.call(i,r)?t:e}function Vo(e,t,r,i,a,o){return Au(e)&&Au(t)&&(o.set(t,e),_a(e,t,n,Vo,o),o.delete(t)),e}function Ho(e){return Bu(e)?n:e}function Uo(e,t,r,i,a,o){var s=r&m,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,g=r&h?new ii:n;for(o.set(e,t),o.set(t,e);++f<c;){var _=e[f],v=t[f];if(i)var y=s?i(v,_,f,t,e,o):i(_,v,f,e,t,o);if(y!==n){if(y)continue;p=!1;break}if(g){if(!Ln(t,function(e,t){if(!rr(g,t)&&(_===e||a(_,e,r,i,o)))return g.push(t)})){p=!1;break}}else if(!(_===v||a(_,v,r,i,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Wo(e,t,n,r,i,a,o){switch(n){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oe:return!(e.byteLength!=t.byteLength||!a(new Ft(e),new Ft(t)));case _e:case D:case O:return du(+e,+t);case ye:return e.name==t.name&&e.message==t.message;case M:case Te:return e==t+``;case Se:var s=mr;case we:var c=r&m;if(s||=_r,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=h,o.set(e,t);var u=Uo(s(e),s(t),r,i,a,o);return o.delete(e),u;case N:if(Mr)return Mr.call(e)==Mr.call(t)}return!1}function Go(e,t,r,i,a,o){var s=r&m,c=qo(e),l=c.length;if(l!=qo(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:R.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var h=!0;o.set(e,t),o.set(t,e);for(var g=s;++u<l;){d=c[u];var _=e[d],v=t[d];if(i)var y=s?i(v,_,d,t,e,o):i(_,v,d,e,t,o);if(!(y===n?_===v||a(_,v,r,i,o):y)){h=!1;break}g||=d==`constructor`}if(h&&!g){var b=e.constructor,x=t.constructor;b!=x&&`constructor`in e&&`constructor`in t&&!(typeof b==`function`&&b instanceof b&&typeof x==`function`&&x instanceof x)&&(h=!1)}return o.delete(e),o.delete(t),h}function Ko(e){return Ns(Ds(e,n,tc),e+``)}function qo(e){return Wi(e,Ed,ns)}function Jo(e){return Wi(e,Dd,rs)}var Yo=zn?function(e){return zn.get(e)}:Bf;function Xo(e){for(var t=e.name+``,n=Jn[t],r=R.call(Jn,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}function Zo(e){return(R.call(U,`placeholder`)?U:e).placeholder}function K(){var e=U.iteratee||Nf;return e=e===Nf?ua:e,arguments.length?e(arguments[0],arguments[1]):e}function Qo(e,t){var n=e.__data__;return gs(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function $o(e){for(var t=Ed(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xs(i)]}return t}function es(e,t){var r=ur(e,t);return oa(r)?r:n}function ts(e){var t=R.call(e,Ut),r=e[Ut];try{e[Ut]=n;var i=!0}catch{}var a=kt.call(e);return i&&(t?e[Ut]=r:delete e[Ut]),a}var ns=z?function(e){return e==null?[]:(e=L(e),An(z(e),function(t){return zt.call(e,t)}))}:Yf,rs=z?function(e){for(var t=[];e;)Pn(t,ns(e)),e=Lt(e);return t}:Yf,is=Gi;(pn&&is(new pn(new ArrayBuffer(1)))!=ke||hn&&is(new hn)!=Se||gn&&is(gn.resolve())!=j||vn&&is(new vn)!=we||H&&is(new H)!=Ee)&&(is=function(e){var t=Gi(e),r=t==A?e.constructor:n,i=r?zs(r):``;if(i)switch(i){case yr:return ke;case Tr:return Se;case Er:return j;case kr:return we;case Ar:return Ee}return t});function as(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case`drop`:e+=o;break;case`dropRight`:t-=o;break;case`take`:t=on(t,e+o);break;case`takeRight`:e=nn(e,t-o);break}}return{start:e,end:t}}function os(e){var t=e.match(tt);return t?t[1].split(nt):[]}function ss(e,t,n){t=Za(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Rs(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&ku(i)&&ps(o,i)&&(q(e)||mu(e)))}function cs(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&R.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function ls(e){return typeof e.constructor==`function`&&!bs(e)?Pr(Lt(e)):{}}function us(e,t,n){var r=e.constructor;switch(t){case Oe:return no(e);case _e:case D:return new r(+e);case ke:return ro(e,n);case Ae:case je:case Me:case Ne:case Pe:case Fe:case Ie:case Le:case Re:return oo(e,n);case Se:return new r;case O:case Te:return new r(e);case M:return io(e);case we:return new r;case N:return ao(e)}}function ds(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(et,`{
|
|
20
|
+
/* [wrapped with `+t+`] */
|
|
21
|
+
`)}function fs(e){return q(e)||mu(e)||!!(Vt&&e&&e[Vt])}function ps(e,t){var n=typeof e;return t??=se,!!t&&(n==`number`||n!=`symbol`&&ft.test(e))&&e>-1&&e%1==0&&e<t}function ms(e,t,n){if(!Au(n))return!1;var r=typeof t;return(r==`number`?gu(n)&&ps(t,n.length):r==`string`&&t in n)?du(n[t],e):!1}function hs(e,t){if(q(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Gu(e)?!0:Je.test(e)||!qe.test(e)||t!=null&&e in L(t)}function gs(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function _s(e){var t=Xo(e),n=U[t];if(typeof n!=`function`||!(t in W.prototype))return!1;if(e===n)return!0;var r=Yo(n);return!!r&&e===r[0]}function vs(e){return!!Ot&&Ot in e}var ys=Tt?Du:Xf;function bs(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||wt)}function xs(e){return e===e&&!Au(e)}function Ss(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==n||e in L(r))}}function Cs(e){var t=ql(e,function(e){return n.size===l&&n.clear(),e}),n=t.cache;return t}function ws(e,t){var n=e[1],r=t[1],i=n|r,a=i<(g|_|C),o=r==C&&n==y||r==C&&n==w&&e[7].length<=t[8]||r==(C|w)&&t[7].length<=t[8]&&n==y;if(!(a||o))return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var s=t[3];if(s){var c=e[3];e[3]=c?lo(c,s,t[4]):s,e[4]=c?gr(e[3],u):t[4]}return s=t[5],s&&(c=e[5],e[5]=c?uo(c,s,t[6]):s,e[6]=c?gr(e[5],u):t[6]),s=t[7],s&&(e[7]=s),r&C&&(e[8]=e[8]==null?t[8]:on(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e}function Ts(e){var t=[];if(e!=null)for(var n in L(e))t.push(n);return t}function Es(e){return kt.call(e)}function Ds(e,t,r){return t=nn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=nn(n.length-t,0),o=$e(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=$e(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),Tn(e,this,s)}}function Os(e,t){return t.length<2?e:Ui(e,Fa(t,0,-1))}function ks(e,t){for(var r=e.length,i=on(t.length,r),a=fo(e);i--;){var o=t[i];e[i]=ps(o,r)?a[o]:n}return e}function As(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var js=Fs(Ma),Ms=qt||function(e,t){return mn.setTimeout(e,t)},Ns=Fs(Na);function Ps(e,t,n){var r=t+``;return Ns(e,ds(r,Bs(os(r),n)))}function Fs(e){var t=0,r=0;return function(){var i=sn(),a=ne-(i-r);if(r=i,a>0){if(++t>=te)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Is(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r<t;){var o=Ea(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var Ls=Cs(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Ye,function(e,n,r,i){t.push(r?i.replace(at,`$1`):n||e)}),t});function Rs(e){if(typeof e==`string`||Gu(e))return e;var t=e+``;return t==`0`&&1/e==-oe?`-0`:t}function zs(e){if(e!=null){try{return Et.call(e)}catch{}try{return e+``}catch{}}return``}function Bs(e,t){return Dn(pe,function(n){var r=`_.`+n[0];t&n[1]&&!jn(e,r)&&e.push(r)}),e.sort()}function Vs(e){if(e instanceof W)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=fo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Hs(e,t,r){t=(r?ms(e,t,r):t===n)?1:nn(J(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=$e(Jt(i/t));a<i;)s[o++]=Fa(e,a,a+=t);return s}function Us(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function Ws(){var e=arguments.length;if(!e)return[];for(var t=$e(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Pn(q(n)?fo(n):[n],Li(t,1))}var Gs=G(function(e,t){return _u(e)?Ai(e,Li(t,1,_u,!0)):[]}),Ks=G(function(e,t){var r=fc(t);return _u(r)&&(r=n),_u(e)?Ai(e,Li(t,1,_u,!0),K(r,2)):[]}),qs=G(function(e,t){var r=fc(t);return _u(r)&&(r=n),_u(e)?Ai(e,Li(t,1,_u,!0),n,r):[]});function Js(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:J(t),Fa(e,t<0?0:t,i)):[]}function Ys(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:J(t),t=i-t,Fa(e,0,t<0?0:t)):[]}function Xs(e,t){return e&&e.length?Ga(e,K(t,3),!0,!0):[]}function Zs(e,t){return e&&e.length?Ga(e,K(t,3),!0):[]}function Qs(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!=`number`&&ms(e,t,n)&&(n=0,r=i),Fi(e,t,n,r)):[]}function $s(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:J(n);return i<0&&(i=nn(r+i,0)),Hn(e,K(t,3),i)}function ec(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return r!==n&&(a=J(r),a=r<0?nn(i+a,0):on(a,i-1)),Hn(e,K(t,3),a,!0)}function tc(e){return e!=null&&e.length?Li(e,1):[]}function nc(e){return e!=null&&e.length?Li(e,oe):[]}function rc(e,t){return e!=null&&e.length?(t=t===n?1:J(t),Li(e,t)):[]}function ic(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function ac(e){return e&&e.length?e[0]:n}function oc(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:J(n);return i<0&&(i=nn(r+i,0)),Un(e,t,i)}function sc(e){return e!=null&&e.length?Fa(e,0,-1):[]}var cc=G(function(e){var t=Nn(e,Ya);return t.length&&t[0]===e[0]?Xi(t):[]}),lc=G(function(e){var t=fc(e),r=Nn(e,Ya);return t===fc(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Xi(r,K(t,2)):[]}),uc=G(function(e){var t=fc(e),r=Nn(e,Ya);return t=typeof t==`function`?t:n,t&&r.pop(),r.length&&r[0]===e[0]?Xi(r,n,t):[]});function dc(e,t){return e==null?``:en.call(e,t)}function fc(e){var t=e==null?0:e.length;return t?e[t-1]:n}function pc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i;return r!==n&&(a=J(r),a=a<0?nn(i+a,0):on(a,i-1)),t===t?br(e,t,a):Hn(e,Gn,a,!0)}function mc(e,t){return e&&e.length?ya(e,J(t)):n}var hc=G(gc);function gc(e,t){return e&&e.length&&t&&t.length?wa(e,t):e}function _c(e,t,n){return e&&e.length&&t&&t.length?wa(e,t,K(n,2)):e}function vc(e,t,r){return e&&e.length&&t&&t.length?wa(e,t,n,r):e}var yc=Ko(function(e,t){var n=e==null?0:e.length,r=wi(e,t);return Ta(e,Nn(t,function(e){return ps(e,n)?+e:e}).sort(so)),r});function bc(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,i=[],a=e.length;for(t=K(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return Ta(e,i),n}function xc(e){return e==null?e:fn.call(e)}function Sc(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!=`number`&&ms(e,t,r)?(t=0,r=i):(t=t==null?0:J(t),r=r===n?i:J(r)),Fa(e,t,r)):[]}function Cc(e,t){return La(e,t)}function wc(e,t,n){return Ra(e,t,K(n,2))}function Tc(e,t){var n=e==null?0:e.length;if(n){var r=La(e,t);if(r<n&&du(e[r],t))return r}return-1}function Ec(e,t){return La(e,t,!0)}function Dc(e,t,n){return Ra(e,t,K(n,2),!0)}function Oc(e,t){if(e!=null&&e.length){var n=La(e,t,!0)-1;if(du(e[n],t))return n}return-1}function kc(e){return e&&e.length?za(e):[]}function Ac(e,t){return e&&e.length?za(e,K(t,2)):[]}function jc(e){var t=e==null?0:e.length;return t?Fa(e,1,t):[]}function Mc(e,t,r){return e&&e.length?(t=r||t===n?1:J(t),Fa(e,0,t<0?0:t)):[]}function Nc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:J(t),t=i-t,Fa(e,t<0?0:t,i)):[]}function Pc(e,t){return e&&e.length?Ga(e,K(t,3),!1,!0):[]}function Fc(e,t){return e&&e.length?Ga(e,K(t,3)):[]}var Ic=G(function(e){return Ha(Li(e,1,_u,!0))}),Lc=G(function(e){var t=fc(e);return _u(t)&&(t=n),Ha(Li(e,1,_u,!0),K(t,2))}),Rc=G(function(e){var t=fc(e);return t=typeof t==`function`?t:n,Ha(Li(e,1,_u,!0),n,t)});function zc(e){return e&&e.length?Ha(e):[]}function Bc(e,t){return e&&e.length?Ha(e,K(t,2)):[]}function Vc(e,t){return t=typeof t==`function`?t:n,e&&e.length?Ha(e,n,t):[]}function Hc(e){if(!(e&&e.length))return[];var t=0;return e=An(e,function(e){if(_u(e))return t=nn(e.length,t),!0}),Qn(t,function(t){return Nn(e,qn(t))})}function Uc(e,t){if(!(e&&e.length))return[];var r=Hc(e);return t==null?r:Nn(r,function(e){return Tn(t,n,e)})}var Wc=G(function(e,t){return _u(e)?Ai(e,t):[]}),Gc=G(function(e){return qa(An(e,_u))}),Kc=G(function(e){var t=fc(e);return _u(t)&&(t=n),qa(An(e,_u),K(t,2))}),qc=G(function(e){var t=fc(e);return t=typeof t==`function`?t:n,qa(An(e,_u),n,t)}),Jc=G(Hc);function Yc(e,t){return Ja(e||[],t||[],vi)}function Xc(e,t){return Ja(e||[],t||[],ja)}var Zc=G(function(e){var t=e.length,r=t>1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,Uc(e,r)});function Qc(e){var t=U(e);return t.__chain__=!0,t}function $c(e,t){return t(e),e}function el(e,t){return t(e)}var tl=Ko(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return wi(t,e)};return t>1||this.__actions__.length||!(i instanceof W)||!ps(r)?this.thru(a):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:el,args:[a],thisArg:n}),new Ir(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function nl(){return Qc(this)}function rl(){return new Ir(this.value(),this.__chain__)}function il(){this.__values__===n&&(this.__values__=Qu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}}function al(){return this}function ol(e){for(var t,r=this;r instanceof Fr;){var i=Vs(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function sl(){var e=this.__wrapped__;if(e instanceof W){var t=e;return this.__actions__.length&&(t=new W(this)),t=t.reverse(),t.__actions__.push({func:el,args:[xc],thisArg:n}),new Ir(t,this.__chain__)}return this.thru(xc)}function cl(){return Ka(this.__wrapped__,this.__actions__)}var ll=go(function(e,t,n){R.call(e,n)?++e[n]:Ci(e,n,1)});function ul(e,t,r){var i=q(e)?kn:Ni;return r&&ms(e,t,r)&&(t=n),i(e,K(t,3))}function dl(e,t){return(q(e)?An:Ii)(e,K(t,3))}var fl=To($s),pl=To(ec);function ml(e,t){return Li(Cl(e,t),1)}function hl(e,t){return Li(Cl(e,t),oe)}function gl(e,t,r){return r=r===n?1:J(r),Li(Cl(e,t),r)}function _l(e,t){return(q(e)?Dn:ji)(e,K(t,3))}function vl(e,t){return(q(e)?On:Mi)(e,K(t,3))}var yl=go(function(e,t,n){R.call(e,n)?e[n].push(t):Ci(e,n,[t])});function bl(e,t,n,r){e=gu(e)?e:X(e),n=n&&!r?J(n):0;var i=e.length;return n<0&&(n=nn(i+n,0)),Wu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Un(e,t,n)>-1}var xl=G(function(e,t,n){var r=-1,i=typeof t==`function`,a=gu(e)?$e(e.length):[];return ji(e,function(e){a[++r]=i?Tn(t,e,n):Qi(e,t,n)}),a}),Sl=go(function(e,t,n){Ci(e,n,t)});function Cl(e,t){return(q(e)?Nn:ma)(e,K(t,3))}function wl(e,t,r,i){return e==null?[]:(q(t)||(t=t==null?[]:[t]),r=i?n:r,q(r)||(r=r==null?[]:[r]),ba(e,t,r))}var Tl=go(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function El(e,t,n){var r=q(e)?Fn:Yn,i=arguments.length<3;return r(e,K(t,4),n,i,ji)}function Dl(e,t,n){var r=q(e)?In:Yn,i=arguments.length<3;return r(e,K(t,4),n,i,Mi)}function Ol(e,t){return(q(e)?An:Ii)(e,Jl(K(t,3)))}function kl(e){return(q(e)?mi:ka)(e)}function Al(e,t,r){return t=(r?ms(e,t,r):t===n)?1:J(t),(q(e)?hi:Aa)(e,t)}function jl(e){return(q(e)?gi:Pa)(e)}function Ml(e){if(e==null)return 0;if(gu(e))return Wu(e)?xr(e):e.length;var t=is(e);return t==Se||t==we?e.size:da(e).length}function Nl(e,t,r){var i=q(e)?Ln:Ia;return r&&ms(e,t,r)&&(t=n),i(e,K(t,3))}var Pl=G(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ms(e,t[0],t[1])?t=[]:n>2&&ms(t[0],t[1],t[2])&&(t=[t[0]]),ba(e,Li(t,1),[])}),Fl=Kt||function(){return mn.Date.now()};function Il(e,t){if(typeof t!=`function`)throw new xt(o);return e=J(e),function(){if(--e<1)return t.apply(this,arguments)}}function Ll(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,zo(e,C,n,n,n,n,t)}function Rl(e,t){var r;if(typeof t!=`function`)throw new xt(o);return e=J(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var zl=G(function(e,t,n){var r=g;if(n.length){var i=gr(n,Zo(zl));r|=x}return zo(e,r,t,n,i)}),Bl=G(function(e,t,n){var r=g|_;if(n.length){var i=gr(n,Zo(Bl));r|=x}return zo(t,r,e,n,i)});function Vl(e,t,r){t=r?n:t;var i=zo(e,y,n,n,n,n,n,t);return i.placeholder=Vl.placeholder,i}function Hl(e,t,r){t=r?n:t;var i=zo(e,b,n,n,n,n,n,t);return i.placeholder=Hl.placeholder,i}function Ul(e,t,r){var i,a,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new xt(o);t=td(t)||0,Au(r)&&(f=!!r.leading,p=`maxWait`in r,s=p?nn(td(r.maxWait)||0,t):s,m=`trailing`in r?!!r.trailing:m);function h(t){var r=i,o=a;return i=a=n,d=t,c=e.apply(o,r),c}function g(e){return d=e,l=Ms(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?on(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=Fl();if(v(e))return b(e);l=Ms(y,_(e))}function b(e){return l=n,m&&i?h(e):(i=a=n,c)}function x(){l!==n&&eo(l),d=0,i=u=a=l=n}function S(){return l===n?c:b(Fl())}function C(){var e=Fl(),r=v(e);if(i=arguments,a=this,u=e,r){if(l===n)return g(u);if(p)return eo(l),l=Ms(y,t),h(u)}return l===n&&(l=Ms(y,t)),c}return C.cancel=x,C.flush=S,C}var Wl=G(function(e,t){return ki(e,1,t)}),Gl=G(function(e,t,n){return ki(e,td(t)||0,n)});function Kl(e){return zo(e,T)}function ql(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new xt(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ql.Cache||Qr),n}ql.Cache=Qr;function Jl(e){if(typeof e!=`function`)throw new xt(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Yl(e){return Rl(2,e)}var Xl=Qa(function(e,t){t=t.length==1&&q(t[0])?Nn(t[0],tr(K())):Nn(Li(t,1),tr(K()));var n=t.length;return G(function(r){for(var i=-1,a=on(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return Tn(e,this,r)})}),Zl=G(function(e,t){return zo(e,x,n,t,gr(t,Zo(Zl)))}),Ql=G(function(e,t){return zo(e,S,n,t,gr(t,Zo(Ql)))}),$l=Ko(function(e,t){return zo(e,w,n,n,n,t)});function eu(e,t){if(typeof e!=`function`)throw new xt(o);return t=t===n?t:J(t),G(e,t)}function tu(e,t){if(typeof e!=`function`)throw new xt(o);return t=t==null?0:nn(J(t),0),G(function(n){var r=n[t],i=$a(n,0,t);return r&&Pn(i,r),Tn(e,this,i)})}function nu(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw new xt(o);return Au(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Ul(e,t,{leading:r,maxWait:t,trailing:i})}function ru(e){return Ll(e,1)}function iu(e,t){return Zl(Xa(t),e)}function au(){if(!arguments.length)return[];var e=arguments[0];return q(e)?e:[e]}function ou(e){return Ei(e,p)}function su(e,t){return t=typeof t==`function`?t:n,Ei(e,p,t)}function cu(e){return Ei(e,d|p)}function lu(e,t){return t=typeof t==`function`?t:n,Ei(e,d|p,t)}function uu(e,t){return t==null||Oi(e,t,Ed(t))}function du(e,t){return e===t||e!==e&&t!==t}var fu=Po(Ki),pu=Po(function(e,t){return e>=t}),mu=$i(function(){return arguments}())?$i:function(e){return ju(e)&&R.call(e,`callee`)&&!zt.call(e,`callee`)},q=$e.isArray,hu=yn?tr(yn):ea;function gu(e){return e!=null&&ku(e.length)&&!Du(e)}function _u(e){return ju(e)&&gu(e)}function vu(e){return e===!0||e===!1||ju(e)&&Gi(e)==_e}var yu=Xt||Xf,bu=bn?tr(bn):ta;function xu(e){return ju(e)&&e.nodeType===1&&!Bu(e)}function Su(e){if(e==null)return!0;if(gu(e)&&(q(e)||typeof e==`string`||typeof e.splice==`function`||yu(e)||Ku(e)||mu(e)))return!e.length;var t=is(e);if(t==Se||t==we)return!e.size;if(bs(e))return!da(e).length;for(var n in e)if(R.call(e,n))return!1;return!0}function Cu(e,t){return na(e,t)}function wu(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?na(e,t,n,r):!!i}function Tu(e){if(!ju(e))return!1;var t=Gi(e);return t==ye||t==ve||typeof e.message==`string`&&typeof e.name==`string`&&!Bu(e)}function Eu(e){return typeof e==`number`&&$t(e)}function Du(e){if(!Au(e))return!1;var t=Gi(e);return t==be||t==xe||t==ge||t==Ce}function Ou(e){return typeof e==`number`&&e==J(e)}function ku(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=se}function Au(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function ju(e){return typeof e==`object`&&!!e}var Mu=xn?tr(xn):ia;function Nu(e,t){return e===t||aa(e,t,$o(t))}function Pu(e,t,r){return r=typeof r==`function`?r:n,aa(e,t,$o(t),r)}function Fu(e){return zu(e)&&e!=+e}function Iu(e){if(ys(e))throw new gt(a);return oa(e)}function Lu(e){return e===null}function Ru(e){return e==null}function zu(e){return typeof e==`number`||ju(e)&&Gi(e)==O}function Bu(e){if(!ju(e)||Gi(e)!=A)return!1;var t=Lt(e);if(t===null)return!0;var n=R.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Et.call(n)==At}var Vu=Sn?tr(Sn):sa;function Hu(e){return Ou(e)&&e>=-se&&e<=se}var Uu=Cn?tr(Cn):ca;function Wu(e){return typeof e==`string`||!q(e)&&ju(e)&&Gi(e)==Te}function Gu(e){return typeof e==`symbol`||ju(e)&&Gi(e)==N}var Ku=wn?tr(wn):la;function qu(e){return e===n}function Ju(e){return ju(e)&&is(e)==Ee}function Yu(e){return ju(e)&&Gi(e)==De}var Xu=Po(pa),Zu=Po(function(e,t){return e<=t});function Qu(e){if(!e)return[];if(gu(e))return Wu(e)?Sr(e):fo(e);if(Ht&&e[Ht])return pr(e[Ht]());var t=is(e);return(t==Se?mr:t==we?_r:X)(e)}function $u(e){return e?(e=td(e),e===oe||e===-oe?(e<0?-1:1)*ce:e===e?e:0):e===0?e:0}function J(e){var t=$u(e),n=t%1;return t===t?n?t-n:t:0}function ed(e){return e?Ti(J(e),0,ue):0}function td(e){if(typeof e==`number`)return e;if(Gu(e))return le;if(Au(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Au(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=er(e);var n=lt.test(e);return n||dt.test(e)?dn(e.slice(2),n?2:8):ct.test(e)?le:+e}function nd(e){return po(e,Dd(e))}function rd(e){return e?Ti(J(e),-se,se):e===0?e:0}function Y(e){return e==null?``:Va(e)}var id=_o(function(e,t){if(bs(t)||gu(t)){po(t,Ed(t),e);return}for(var n in t)R.call(t,n)&&vi(e,n,t[n])}),ad=_o(function(e,t){po(t,Dd(t),e)}),od=_o(function(e,t,n,r){po(t,Dd(t),e,r)}),sd=_o(function(e,t,n,r){po(t,Ed(t),e,r)}),cd=Ko(wi);function ld(e,t){var n=Pr(e);return t==null?n:xi(n,t)}var ud=G(function(e,t){e=L(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&ms(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=Dd(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===n||du(d,wt[u])&&!R.call(e,u))&&(e[u]=o[u])}return e}),dd=G(function(e){return e.push(n,Vo),Tn(jd,n,e)});function fd(e,t){return Vn(e,K(t,3),Bi)}function pd(e,t){return Vn(e,K(t,3),Vi)}function md(e,t){return e==null?e:Ri(e,K(t,3),Dd)}function hd(e,t){return e==null?e:zi(e,K(t,3),Dd)}function gd(e,t){return e&&Bi(e,K(t,3))}function _d(e,t){return e&&Vi(e,K(t,3))}function vd(e){return e==null?[]:Hi(e,Ed(e))}function yd(e){return e==null?[]:Hi(e,Dd(e))}function bd(e,t,r){var i=e==null?n:Ui(e,t);return i===n?r:i}function xd(e,t){return e!=null&&ss(e,t,qi)}function Sd(e,t){return e!=null&&ss(e,t,Ji)}var Cd=Oo(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=kt.call(t)),e[t]=n},Of(Mf)),wd=Oo(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=kt.call(t)),R.call(e,t)?e[t].push(n):e[t]=[n]},K),Td=G(Qi);function Ed(e){return gu(e)?pi(e):da(e)}function Dd(e){return gu(e)?pi(e,!0):fa(e)}function Od(e,t){var n={};return t=K(t,3),Bi(e,function(e,r,i){Ci(n,t(e,r,i),e)}),n}function kd(e,t){var n={};return t=K(t,3),Bi(e,function(e,r,i){Ci(n,r,t(e,r,i))}),n}var Ad=_o(function(e,t,n){_a(e,t,n)}),jd=_o(function(e,t,n,r){_a(e,t,n,r)}),Md=Ko(function(e,t){var n={};if(e==null)return n;var r=!1;t=Nn(t,function(t){return t=Za(t,e),r||=t.length>1,t}),po(e,Jo(e),n),r&&(n=Ei(n,d|f|p,Ho));for(var i=t.length;i--;)Ua(n,t[i]);return n});function Nd(e,t){return Fd(e,Jl(K(t)))}var Pd=Ko(function(e,t){return e==null?{}:xa(e,t)});function Fd(e,t){if(e==null)return{};var n=Nn(Jo(e),function(e){return[e]});return t=K(t),Sa(e,n,function(e,n){return t(e,n[0])})}function Id(e,t,r){t=Za(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++i<a;){var o=e==null?n:e[Rs(t[i])];o===n&&(i=a,o=r),e=Du(o)?o.call(e):o}return e}function Ld(e,t,n){return e==null?e:ja(e,t,n)}function Rd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:ja(e,t,r,i)}var zd=Ro(Ed),Bd=Ro(Dd);function Vd(e,t,n){var r=q(e),i=r||yu(e)||Ku(e);if(t=K(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:Au(e)&&Du(a)?Pr(Lt(e)):{}}return(i?Dn:Bi)(e,function(e,r,i){return t(n,e,r,i)}),n}function Hd(e,t){return e==null?!0:Ua(e,t)}function Ud(e,t,n){return e==null?e:Wa(e,t,Xa(n))}function Wd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Wa(e,t,Xa(r),i)}function X(e){return e==null?[]:nr(e,Ed(e))}function Z(e){return e==null?[]:nr(e,Dd(e))}function Gd(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=td(r),r=r===r?r:0),t!==n&&(t=td(t),t=t===t?t:0),Ti(td(e),t,r)}function Kd(e,t,r){return t=$u(t),r===n?(r=t,t=0):r=$u(r),e=td(e),Yi(e,t,r)}function qd(e,t,r){if(r&&typeof r!=`boolean`&&ms(e,t,r)&&(t=r=n),r===n&&(typeof t==`boolean`?(r=t,t=n):typeof e==`boolean`&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=$u(e),t===n?(t=e,e=0):t=$u(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var a=ln();return on(e+a*(t-e+un(`1e-`+((a+``).length-1))),t)}return Ea(e,t)}var Jd=So(function(e,t,n){return t=t.toLowerCase(),e+(n?Q(t):t)});function Q(e){return Sf(Y(e).toLowerCase())}function Yd(e){return e=Y(e),e&&e.replace(pt,sr).replace(Qt,``)}function Xd(e,t,r){e=Y(e),t=Va(t);var i=e.length;r=r===n?i:Ti(J(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function Zd(e){return e=Y(e),e&&Ue.test(e)?e.replace(I,cr):e}function Qd(e){return e=Y(e),e&&Ze.test(e)?e.replace(Xe,`\\$&`):e}var $d=So(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),ef=So(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),tf=xo(`toLowerCase`);function nf(e,t,n){e=Y(e),t=J(t);var r=t?xr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return jo(Yt(i),n)+e+jo(Jt(i),n)}function rf(e,t,n){e=Y(e),t=J(t);var r=t?xr(e):0;return t&&r<t?e+jo(t-r,n):e}function af(e,t,n){e=Y(e),t=J(t);var r=t?xr(e):0;return t&&r<t?jo(t-r,n)+e:e}function of(e,t,n){return n||t==null?t=0:t&&=+t,cn(Y(e).replace(Qe,``),t||0)}function sf(e,t,r){return t=(r?ms(e,t,r):t===n)?1:J(t),Oa(Y(e),t)}function cf(){var e=arguments,t=Y(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var lf=So(function(e,t,n){return e+(n?`_`:``)+t.toLowerCase()});function uf(e,t,r){return r&&typeof r!=`number`&&ms(e,t,r)&&(t=r=n),r=r===n?ue:r>>>0,r?(e=Y(e),e&&(typeof t==`string`||t!=null&&!Vu(t))&&(t=Va(t),!t&&dr(e))?$a(Sr(e),0,r):e.split(t,r)):[]}var df=So(function(e,t,n){return e+(n?` `:``)+Sf(t)});function ff(e,t,n){return e=Y(e),n=n==null?0:Ti(J(n),0,e.length),t=Va(t),e.slice(n,n+t.length)==t}function pf(e,t,r){var i=U.templateSettings;r&&ms(e,t,r)&&(t=n),e=Y(e),t=od({},t,i,Bo);var a=od({},t.imports,i.imports,Bo),o=Ed(a),c=nr(a,o),l,u,d=0,f=t.interpolate||mt,p=`__p += '`,m=yt((t.escape||mt).source+`|`+f.source+`|`+(f===Ke?ot:mt).source+`|`+(t.evaluate||mt).source+`|$`,`g`),h=`//# sourceURL=`+(R.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++an+`]`)+`
|
|
22
|
+
`;e.replace(m,function(t,n,r,i,a,o){return r||=i,p+=e.slice(d,o).replace(ht,lr),n&&(l=!0,p+=`' +
|
|
23
|
+
__e(`+n+`) +
|
|
24
|
+
'`),a&&(u=!0,p+=`';
|
|
25
|
+
`+a+`;
|
|
26
|
+
__p += '`),r&&(p+=`' +
|
|
27
|
+
((__t = (`+r+`)) == null ? '' : __t) +
|
|
28
|
+
'`),d=o+t.length,t}),p+=`';
|
|
29
|
+
`;var g=R.call(t,`variable`)&&t.variable;if(!g)p=`with (obj) {
|
|
30
|
+
`+p+`
|
|
31
|
+
}
|
|
32
|
+
`;else if(it.test(g))throw new gt(s);p=(u?p.replace(ze,``):p).replace(Be,`$1`).replace(Ve,`$1;`),p=`function(`+(g||`obj`)+`) {
|
|
33
|
+
`+(g?``:`obj || (obj = {});
|
|
34
|
+
`)+`var __t, __p = ''`+(l?`, __e = _.escape`:``)+(u?`, __j = Array.prototype.join;
|
|
35
|
+
function print() { __p += __j.call(arguments, '') }
|
|
36
|
+
`:`;
|
|
37
|
+
`)+p+`return __p
|
|
38
|
+
}`;var _=wf(function(){return _t(o,h+`return `+p).apply(n,c)});if(_.source=p,Tu(_))throw _;return _}function mf(e){return Y(e).toLowerCase()}function hf(e){return Y(e).toUpperCase()}function gf(e,t,r){if(e=Y(e),e&&(r||t===n))return er(e);if(!e||!(t=Va(t)))return e;var i=Sr(e),a=Sr(t);return $a(i,ir(i,a),ar(i,a)+1).join(``)}function _f(e,t,r){if(e=Y(e),e&&(r||t===n))return e.slice(0,Cr(e)+1);if(!e||!(t=Va(t)))return e;var i=Sr(e);return $a(i,0,ar(i,Sr(t))+1).join(``)}function vf(e,t,r){if(e=Y(e),e&&(r||t===n))return e.replace(Qe,``);if(!e||!(t=Va(t)))return e;var i=Sr(e);return $a(i,ir(i,Sr(t))).join(``)}function yf(e,t){var r=E,i=ee;if(Au(t)){var a=`separator`in t?t.separator:a;r=`length`in t?J(t.length):r,i=`omission`in t?Va(t.omission):i}e=Y(e);var o=e.length;if(dr(e)){var s=Sr(e);o=s.length}if(r>=o)return e;var c=r-xr(i);if(c<1)return i;var l=s?$a(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),Vu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=yt(a.source,Y(st.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Va(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function bf(e){return e=Y(e),e&&He.test(e)?e.replace(F,wr):e}var xf=So(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),Sf=xo(`toUpperCase`);function Cf(e,t,r){return e=Y(e),t=r?n:t,t===n?fr(e)?Dr(e):Bn(e):e.match(t)||[]}var wf=G(function(e,t){try{return Tn(e,n,t)}catch(e){return Tu(e)?e:new gt(e)}}),Tf=Ko(function(e,t){return Dn(t,function(t){t=Rs(t),Ci(e,t,zl(e[t],e))}),e});function Ef(e){var t=e==null?0:e.length,n=K();return e=t?Nn(e,function(e){if(typeof e[1]!=`function`)throw new xt(o);return[n(e[0]),e[1]]}):[],G(function(n){for(var r=-1;++r<t;){var i=e[r];if(Tn(i[0],this,n))return Tn(i[1],this,n)}})}function Df(e){return Di(Ei(e,d))}function Of(e){return function(){return e}}function kf(e,t){return e==null||e!==e?t:e}var Af=Eo(),jf=Eo(!0);function Mf(e){return e}function Nf(e){return ua(typeof e==`function`?e:Ei(e,d))}function Pf(e){return ha(Ei(e,d))}function Ff(e,t){return ga(e,Ei(t,d))}var If=G(function(e,t){return function(n){return Qi(n,e,t)}}),Lf=G(function(e,t){return function(n){return Qi(e,n,t)}});function Rf(e,t,n){var r=Ed(t),i=Hi(t,r);n==null&&!(Au(t)&&(i.length||!r.length))&&(n=t,t=e,e=this,i=Hi(t,Ed(t)));var a=!(Au(n)&&`chain`in n)||!!n.chain,o=Du(e);return Dn(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=fo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Pn([this.value()],arguments))})}),e}function zf(){return mn._===this&&(mn._=jt),this}function Bf(){}function Vf(e){return e=J(e),G(function(t){return ya(t,e)})}var Hf=Ao(Nn),Uf=Ao(kn),Wf=Ao(Ln);function Gf(e){return hs(e)?qn(Rs(e)):Ca(e)}function Kf(e){return function(t){return e==null?n:Ui(e,t)}}var qf=No(),Jf=No(!0);function Yf(){return[]}function Xf(){return!1}function Zf(){return{}}function Qf(){return``}function $f(){return!0}function ep(e,t){if(e=J(e),e<1||e>se)return[];var n=ue,r=on(e,ue);t=K(t),e-=ue;for(var i=Qn(r,t);++n<e;)t(n);return i}function tp(e){return q(e)?Nn(e,Rs):Gu(e)?[e]:fo(Ls(Y(e)))}function np(e){var t=++Dt;return Y(e)+t}var rp=ko(function(e,t){return e+t},0),ip=Io(`ceil`),ap=ko(function(e,t){return e/t},1),op=Io(`floor`);function sp(e){return e&&e.length?Pi(e,Mf,Ki):n}function cp(e,t){return e&&e.length?Pi(e,K(t,2),Ki):n}function lp(e){return Kn(e,Mf)}function up(e,t){return Kn(e,K(t,2))}function dp(e){return e&&e.length?Pi(e,Mf,pa):n}function fp(e,t){return e&&e.length?Pi(e,K(t,2),pa):n}var pp=ko(function(e,t){return e*t},1),mp=Io(`round`),hp=ko(function(e,t){return e-t},0);function $(e){return e&&e.length?Zn(e,Mf):0}function gp(e,t){return e&&e.length?Zn(e,K(t,2)):0}return U.after=Il,U.ary=Ll,U.assign=id,U.assignIn=ad,U.assignInWith=od,U.assignWith=sd,U.at=cd,U.before=Rl,U.bind=zl,U.bindAll=Tf,U.bindKey=Bl,U.castArray=au,U.chain=Qc,U.chunk=Hs,U.compact=Us,U.concat=Ws,U.cond=Ef,U.conforms=Df,U.constant=Of,U.countBy=ll,U.create=ld,U.curry=Vl,U.curryRight=Hl,U.debounce=Ul,U.defaults=ud,U.defaultsDeep=dd,U.defer=Wl,U.delay=Gl,U.difference=Gs,U.differenceBy=Ks,U.differenceWith=qs,U.drop=Js,U.dropRight=Ys,U.dropRightWhile=Xs,U.dropWhile=Zs,U.fill=Qs,U.filter=dl,U.flatMap=ml,U.flatMapDeep=hl,U.flatMapDepth=gl,U.flatten=tc,U.flattenDeep=nc,U.flattenDepth=rc,U.flip=Kl,U.flow=Af,U.flowRight=jf,U.fromPairs=ic,U.functions=vd,U.functionsIn=yd,U.groupBy=yl,U.initial=sc,U.intersection=cc,U.intersectionBy=lc,U.intersectionWith=uc,U.invert=Cd,U.invertBy=wd,U.invokeMap=xl,U.iteratee=Nf,U.keyBy=Sl,U.keys=Ed,U.keysIn=Dd,U.map=Cl,U.mapKeys=Od,U.mapValues=kd,U.matches=Pf,U.matchesProperty=Ff,U.memoize=ql,U.merge=Ad,U.mergeWith=jd,U.method=If,U.methodOf=Lf,U.mixin=Rf,U.negate=Jl,U.nthArg=Vf,U.omit=Md,U.omitBy=Nd,U.once=Yl,U.orderBy=wl,U.over=Hf,U.overArgs=Xl,U.overEvery=Uf,U.overSome=Wf,U.partial=Zl,U.partialRight=Ql,U.partition=Tl,U.pick=Pd,U.pickBy=Fd,U.property=Gf,U.propertyOf=Kf,U.pull=hc,U.pullAll=gc,U.pullAllBy=_c,U.pullAllWith=vc,U.pullAt=yc,U.range=qf,U.rangeRight=Jf,U.rearg=$l,U.reject=Ol,U.remove=bc,U.rest=eu,U.reverse=xc,U.sampleSize=Al,U.set=Ld,U.setWith=Rd,U.shuffle=jl,U.slice=Sc,U.sortBy=Pl,U.sortedUniq=kc,U.sortedUniqBy=Ac,U.split=uf,U.spread=tu,U.tail=jc,U.take=Mc,U.takeRight=Nc,U.takeRightWhile=Pc,U.takeWhile=Fc,U.tap=$c,U.throttle=nu,U.thru=el,U.toArray=Qu,U.toPairs=zd,U.toPairsIn=Bd,U.toPath=tp,U.toPlainObject=nd,U.transform=Vd,U.unary=ru,U.union=Ic,U.unionBy=Lc,U.unionWith=Rc,U.uniq=zc,U.uniqBy=Bc,U.uniqWith=Vc,U.unset=Hd,U.unzip=Hc,U.unzipWith=Uc,U.update=Ud,U.updateWith=Wd,U.values=X,U.valuesIn=Z,U.without=Wc,U.words=Cf,U.wrap=iu,U.xor=Gc,U.xorBy=Kc,U.xorWith=qc,U.zip=Jc,U.zipObject=Yc,U.zipObjectDeep=Xc,U.zipWith=Zc,U.entries=zd,U.entriesIn=Bd,U.extend=ad,U.extendWith=od,Rf(U,U),U.add=rp,U.attempt=wf,U.camelCase=Jd,U.capitalize=Q,U.ceil=ip,U.clamp=Gd,U.clone=ou,U.cloneDeep=cu,U.cloneDeepWith=lu,U.cloneWith=su,U.conformsTo=uu,U.deburr=Yd,U.defaultTo=kf,U.divide=ap,U.endsWith=Xd,U.eq=du,U.escape=Zd,U.escapeRegExp=Qd,U.every=ul,U.find=fl,U.findIndex=$s,U.findKey=fd,U.findLast=pl,U.findLastIndex=ec,U.findLastKey=pd,U.floor=op,U.forEach=_l,U.forEachRight=vl,U.forIn=md,U.forInRight=hd,U.forOwn=gd,U.forOwnRight=_d,U.get=bd,U.gt=fu,U.gte=pu,U.has=xd,U.hasIn=Sd,U.head=ac,U.identity=Mf,U.includes=bl,U.indexOf=oc,U.inRange=Kd,U.invoke=Td,U.isArguments=mu,U.isArray=q,U.isArrayBuffer=hu,U.isArrayLike=gu,U.isArrayLikeObject=_u,U.isBoolean=vu,U.isBuffer=yu,U.isDate=bu,U.isElement=xu,U.isEmpty=Su,U.isEqual=Cu,U.isEqualWith=wu,U.isError=Tu,U.isFinite=Eu,U.isFunction=Du,U.isInteger=Ou,U.isLength=ku,U.isMap=Mu,U.isMatch=Nu,U.isMatchWith=Pu,U.isNaN=Fu,U.isNative=Iu,U.isNil=Ru,U.isNull=Lu,U.isNumber=zu,U.isObject=Au,U.isObjectLike=ju,U.isPlainObject=Bu,U.isRegExp=Vu,U.isSafeInteger=Hu,U.isSet=Uu,U.isString=Wu,U.isSymbol=Gu,U.isTypedArray=Ku,U.isUndefined=qu,U.isWeakMap=Ju,U.isWeakSet=Yu,U.join=dc,U.kebabCase=$d,U.last=fc,U.lastIndexOf=pc,U.lowerCase=ef,U.lowerFirst=tf,U.lt=Xu,U.lte=Zu,U.max=sp,U.maxBy=cp,U.mean=lp,U.meanBy=up,U.min=dp,U.minBy=fp,U.stubArray=Yf,U.stubFalse=Xf,U.stubObject=Zf,U.stubString=Qf,U.stubTrue=$f,U.multiply=pp,U.nth=mc,U.noConflict=zf,U.noop=Bf,U.now=Fl,U.pad=nf,U.padEnd=rf,U.padStart=af,U.parseInt=of,U.random=qd,U.reduce=El,U.reduceRight=Dl,U.repeat=sf,U.replace=cf,U.result=Id,U.round=mp,U.runInContext=e,U.sample=kl,U.size=Ml,U.snakeCase=lf,U.some=Nl,U.sortedIndex=Cc,U.sortedIndexBy=wc,U.sortedIndexOf=Tc,U.sortedLastIndex=Ec,U.sortedLastIndexBy=Dc,U.sortedLastIndexOf=Oc,U.startCase=df,U.startsWith=ff,U.subtract=hp,U.sum=$,U.sumBy=gp,U.template=pf,U.times=ep,U.toFinite=$u,U.toInteger=J,U.toLength=ed,U.toLower=mf,U.toNumber=td,U.toSafeInteger=rd,U.toString=Y,U.toUpper=hf,U.trim=gf,U.trimEnd=_f,U.trimStart=vf,U.truncate=yf,U.unescape=bf,U.uniqueId=np,U.upperCase=xf,U.upperFirst=Sf,U.each=_l,U.eachRight=vl,U.first=ac,Rf(U,function(){var e={};return Bi(U,function(t,n){R.call(U.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),U.VERSION=r,Dn([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){U[e].placeholder=U}),Dn([`drop`,`take`],function(e,t){W.prototype[e]=function(r){r=r===n?1:nn(J(r),0);var i=this.__filtered__&&!t?new W(this):this.clone();return i.__filtered__?i.__takeCount__=on(r,i.__takeCount__):i.__views__.push({size:on(r,ue),type:e+(i.__dir__<0?`Right`:``)}),i},W.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),Dn([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==re||n==ae;W.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:K(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Dn([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);W.prototype[e]=function(){return this[n](1).value()[0]}}),Dn([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);W.prototype[e]=function(){return this.__filtered__?new W(this):this[n](1)}}),W.prototype.compact=function(){return this.filter(Mf)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=G(function(e,t){return typeof e==`function`?new W(this):this.map(function(n){return Qi(n,e,t)})}),W.prototype.reject=function(e){return this.filter(Jl(K(e)))},W.prototype.slice=function(e,t){e=J(e);var r=this;return r.__filtered__&&(e>0||t<0)?new W(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=J(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(ue)},Bi(W.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=U[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(U.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof W,l=s[0],u=c||q(t),d=function(e){var t=a.apply(U,Pn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new W(this);var g=e.apply(t,s);return g.__actions__.push({func:el,args:[d],thisArg:n}),new Ir(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),Dn([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=St[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);U.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(q(i)?i:[],e)}return this[n](function(n){return t.apply(q(n)?n:[],e)})}}),Bi(W.prototype,function(e,t){var n=U[t];if(n){var r=n.name+``;R.call(Jn,r)||(Jn[r]=[]),Jn[r].push({name:t,func:n})}}),Jn[Do(n,_).name]=[{name:`wrapper`,func:n}],W.prototype.clone=Lr,W.prototype.reverse=Rr,W.prototype.value=zr,U.prototype.at=tl,U.prototype.chain=nl,U.prototype.commit=rl,U.prototype.next=il,U.prototype.plant=ol,U.prototype.reverse=sl,U.prototype.toJSON=U.prototype.valueOf=U.prototype.value=cl,U.prototype.first=U.prototype.head,Ht&&(U.prototype[Ht]=al),U})();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(mn._=Or,define(function(){return Or})):gn?((gn.exports=Or)._=Or,hn._=Or):mn._=Or}).call(e)}));typeof BigInt>`u`&&(BigInt=function(e){if(isNaN(e))throw Error(``);return e});var X=BigInt(0),Z=BigInt(1),Gd=BigInt(2),Kd=BigInt(5),qd=BigInt(10),Jd=2e3,Q={s:Z,n:X,d:Z};function Yd(e,t){try{e=BigInt(e)}catch{throw sf()}return e*t}function Xd(e){return typeof e==`bigint`?e:Math.floor(e)}function Zd(e,t){if(t===X)throw of();let n=Object.create(af.prototype);n.s=e<X?-Z:Z,e=e<X?-e:e;let r=rf(e,t);return n.n=e/r,n.d=t/r,n}function Qd(e){let t={},n=e,r=Gd,i=Kd-Z;for(;i<=n;){for(;n%r===X;)n/=r,t[r]=(t[r]||X)+Z;i+=Z+Gd*r++}return n===e?t[e]=(t[e]||X)+Z:n>1&&(t[n]=(t[n]||X)+Z),t}var $d=function(e,t){let n=X,r=Z,i=Z;if(e!=null)if(t!==void 0){if(typeof e==`bigint`)n=e;else if(isNaN(e))throw sf();else if(e%1!=0)throw cf();else n=BigInt(e);if(typeof t==`bigint`)r=t;else if(isNaN(t))throw sf();else if(t%1!=0)throw cf();else r=BigInt(t);i=n*r}else if(typeof e==`object`){if(`d`in e&&`n`in e)n=BigInt(e.n),r=BigInt(e.d),`s`in e&&(n*=BigInt(e.s));else if(0 in e)n=BigInt(e[0]),1 in e&&(r=BigInt(e[1]));else if(typeof e==`bigint`)n=e;else throw sf();i=n*r}else if(typeof e==`number`){if(isNaN(e))throw sf();if(e<0&&(i=-Z,e=-e),e%1==0)n=BigInt(e);else if(e>0){let t=1,i=0,a=1,o=1,s=1,c=1e7;for(e>=1&&(t=10**Math.floor(1+Math.log10(e)),e/=t);a<=c&&s<=c;){let t=(i+o)/(a+s);if(e===t){a+s<=c?(n=i+o,r=a+s):s>a?(n=o,r=s):(n=i,r=a);break}else e>t?(i+=o,a+=s):(o+=i,s+=a),a>c?(n=o,r=s):(n=i,r=a)}n=BigInt(n)*BigInt(t),r=BigInt(r)}}else if(typeof e==`string`){let t=0,a=X,o=X,s=X,c=Z,l=Z,u=e.replace(/_/g,``).match(/\d+|./g);if(u===null)throw sf();if(u[t]===`-`?(i=-Z,t++):u[t]===`+`&&t++,u.length===t+1?o=Yd(u[t++],i):u[t+1]===`.`||u[t]===`.`?(u[t]!==`.`&&(a=Yd(u[t++],i)),t++,(t+1===u.length||u[t+1]===`(`&&u[t+3]===`)`||u[t+1]===`'`&&u[t+3]===`'`)&&(o=Yd(u[t],i),c=qd**BigInt(u[t].length),t++),(u[t]===`(`&&u[t+2]===`)`||u[t]===`'`&&u[t+2]===`'`)&&(s=Yd(u[t+1],i),l=qd**BigInt(u[t+1].length)-Z,t+=3)):u[t+1]===`/`||u[t+1]===`:`?(o=Yd(u[t],i),c=Yd(u[t+2],Z),t+=3):u[t+3]===`/`&&u[t+1]===` `&&(a=Yd(u[t],i),o=Yd(u[t+2],i),c=Yd(u[t+4],Z),t+=5),u.length<=t)r=c*l,i=n=s+r*a+l*o;else throw sf()}else if(typeof e==`bigint`)n=e,i=e,r=Z;else throw sf();if(r===X)throw of();Q.s=i<X?-Z:Z,Q.n=n<X?-n:n,Q.d=r<X?-r:r};function ef(e,t,n){let r=Z;for(;t>X;e=e*e%n,t>>=Z)t&Z&&(r=r*e%n);return r}function tf(e,t){for(;t%Gd===X;t/=Gd);for(;t%Kd===X;t/=Kd);if(t===Z)return X;let n=qd%t,r=1;for(;n!==Z;r++)if(n=n*qd%t,r>Jd)return X;return BigInt(r)}function nf(e,t,n){let r=Z,i=ef(qd,n,t);for(let e=0;e<300;e++){if(r===i)return BigInt(e);r=r*qd%t,i=i*qd%t}return 0}function rf(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function af(e,t){if($d(e,t),this instanceof af)e=rf(Q.d,Q.n),this.s=Q.s,this.n=Q.n/e,this.d=Q.d/e;else return Zd(Q.s*Q.n,Q.d)}var of=function(){return Error(`Division by Zero`)},sf=function(){return Error(`Invalid argument`)},cf=function(){return Error(`Parameters must be integer`)};af.prototype={s:Z,n:X,d:Z,abs:function(){return Zd(this.n,this.d)},neg:function(){return Zd(-this.s*this.n,this.d)},add:function(e,t){return $d(e,t),Zd(this.s*this.n*Q.d+Q.s*this.d*Q.n,this.d*Q.d)},sub:function(e,t){return $d(e,t),Zd(this.s*this.n*Q.d-Q.s*this.d*Q.n,this.d*Q.d)},mul:function(e,t){return $d(e,t),Zd(this.s*Q.s*this.n*Q.n,this.d*Q.d)},div:function(e,t){return $d(e,t),Zd(this.s*Q.s*this.n*Q.d,this.d*Q.n)},clone:function(){return Zd(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Zd(this.s*this.n%this.d,Z);if($d(e,t),X===Q.n*this.d)throw of();return Zd(this.s*(Q.d*this.n)%(Q.n*this.d),Q.d*this.d)},gcd:function(e,t){return $d(e,t),Zd(rf(Q.n,this.n)*rf(Q.d,this.d),Q.d*this.d)},lcm:function(e,t){return $d(e,t),Q.n===X&&this.n===X?Zd(X,Z):Zd(Q.n*this.n,rf(Q.n,this.n)*rf(Q.d,this.d))},inverse:function(){return Zd(this.s*this.d,this.n)},pow:function(e,t){if($d(e,t),Q.d===Z)return Q.s<X?Zd((this.s*this.d)**Q.n,this.n**Q.n):Zd((this.s*this.n)**Q.n,this.d**Q.n);if(this.s<X)return null;let n=Qd(this.n),r=Qd(this.d),i=Z,a=Z;for(let e in n)if(e!==`1`){if(e===`0`){i=X;break}if(n[e]*=Q.n,n[e]%Q.d===X)n[e]/=Q.d;else return null;i*=BigInt(e)**n[e]}for(let e in r)if(e!==`1`){if(r[e]*=Q.n,r[e]%Q.d===X)r[e]/=Q.d;else return null;a*=BigInt(e)**r[e]}return Q.s<X?Zd(a,i):Zd(i,a)},log:function(e,t){if($d(e,t),this.s<=X||Q.s<=X)return null;let n={},r=Qd(Q.n),i=Qd(Q.d),a=Qd(this.n),o=Qd(this.d);for(let e in i)r[e]=(r[e]||X)-i[e];for(let e in o)a[e]=(a[e]||X)-o[e];for(let e in r)e!==`1`&&(n[e]=!0);for(let e in a)e!==`1`&&(n[e]=!0);let s=null,c=null;for(let e in n){let t=r[e]||X,n=a[e]||X;if(t===X){if(n!==X)return null;continue}let i=n,o=t,l=rf(i,o);if(i/=l,o/=l,s===null&&c===null)s=i,c=o;else if(i*c!==s*o)return null}return s!==null&&c!==null?Zd(s,c):null},equals:function(e,t){return $d(e,t),this.s*this.n*Q.d===Q.s*Q.n*this.d},lt:function(e,t){return $d(e,t),this.s*this.n*Q.d<Q.s*Q.n*this.d},lte:function(e,t){return $d(e,t),this.s*this.n*Q.d<=Q.s*Q.n*this.d},gt:function(e,t){return $d(e,t),this.s*this.n*Q.d>Q.s*Q.n*this.d},gte:function(e,t){return $d(e,t),this.s*this.n*Q.d>=Q.s*Q.n*this.d},compare:function(e,t){$d(e,t);let n=this.s*this.n*Q.d-Q.s*Q.n*this.d;return(X<n)-(n<X)},ceil:function(e){return e=qd**BigInt(e||0),Zd(Xd(this.s*e*this.n/this.d)+(e*this.n%this.d>X&&this.s>=X?Z:X),e)},floor:function(e){return e=qd**BigInt(e||0),Zd(Xd(this.s*e*this.n/this.d)-(e*this.n%this.d>X&&this.s<X?Z:X),e)},round:function(e){return e=qd**BigInt(e||0),Zd(Xd(this.s*e*this.n/this.d)+this.s*((this.s>=X?Z:X)+Gd*(e*this.n%this.d)>this.d?Z:X),e)},roundTo:function(e,t){$d(e,t);let n=this.n*Q.d,r=this.d*Q.n,i=n%r,a=Xd(n/r);return i+i>=r&&a++,Zd(this.s*a*Q.n,Q.d)},divisible:function(e,t){return $d(e,t),!(!(Q.n*this.d)||this.n*Q.d%(Q.n*this.d))},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e){let t=this.n,n=this.d;e||=15;let r=tf(t,n),i=nf(t,n,r),a=this.s<X?`-`:``;if(a+=Xd(t/n),t%=n,t*=qd,t&&(a+=`.`),r){for(let e=i;e--;)a+=Xd(t/n),t%=n,t*=qd;a+=`(`;for(let e=r;e--;)a+=Xd(t/n),t%=n,t*=qd;a+=`)`}else for(let r=e;t&&r--;)a+=Xd(t/n),t%=n,t*=qd;return a},toFraction:function(e){let t=this.n,n=this.d,r=this.s<X?`-`:``;if(n===Z)r+=t;else{let i=Xd(t/n);e&&i>X&&(r+=i,r+=` `,t%=n),r+=t,r+=`/`,r+=n}return r},toLatex:function(e){let t=this.n,n=this.d,r=this.s<X?`-`:``;if(n===Z)r+=t;else{let i=Xd(t/n);e&&i>X&&(r+=i,t%=n),r+=`\\frac{`,r+=t,r+=`}{`,r+=n,r+=`}`}return r},toContinued:function(){let e=this.n,t=this.d,n=[];do{n.push(Xd(e/t));let r=e%t;e=t,t=r}while(e!==Z);return n},simplify:function(e){let t=BigInt(1/(e||.001)|0),n=this.abs(),r=n.toContinued();for(let e=1;e<r.length;e++){let i=Zd(r[e-1],Z);for(let t=e-2;t>=0;t--)i=i.inverse().add(r[t]);let a=i.sub(n);if(a.n*t<a.d)return i.mul(this.s)}return this}};var lf={maximumFractionDigits:20};function uf(e,t){let n;try{t&&(n=new Intl.NumberFormat(t,lf))}catch{n=new Intl.NumberFormat(void 0,lf)}return n.format(e)}var df=e=>typeof e==`string`&&Ip(e)?Np(e):e,ff=e=>{let t=df(e);if(qf(t)||Number.isNaN(t)||t===1/0||t===-1/0)return!0;if(!(Uf(t)||Wf(t)||Jf(t)||Yf(t)||Gf(t)||Kf(t))){let e=rp(String(t));if(e.includes(`|`))return!1;let n=Qf(e)?tp(e):$f(e)?parseFloat(e):e;if(n===1/0||n===-1/0)return!0;if(!$f(n))return!1;if(!Number.isNaN(n))return!0}return!1},pf=e=>typeof e==`string`?ff(e)&&e.toLowerCase().includes(`e`):!1,mf=(e,t,n)=>{let r=t??e,i=df(e);if(ff(i)){let e=rp(String(i)),t=Qf(e)?tp(e):$f(e)?parseFloat(e):e;return t===1/0||t===-1/0?t:Number.isNaN(t)||!$f(t)?r:n&&t<n?n:t}else return r},hf=e=>{if(ff(e)){if(typeof e==`string`)return e;if(typeof e==`number`)return Number.isNaN(e)||!Number.isFinite(e)?String(e):zf(e,{noThousandsSeparator:!0})}return e},gf=(e,t=!1)=>{let n=t?/0+((?=[|eE])|$)/:/(0+|0+\.0+)((?=[|eE])|$)/;return typeof e==`string`&&(!t||e.includes(`.`)||e.includes(`,`))?e?.match(n)?.[0]?.replaceAll(/[.,]/g,``)?.length??0:0},_f=e=>gf(e)>0,vf=(e,t=!1)=>{let n=typeof e==`string`,r=n&&Ip(e),i=r?Pp(e):null,a=rp(r?Np(e):e);return{number:t&&_f(e)?a:mf(a),unit:i,isString:n}},yf=(e,t)=>t?String(e):String(hf(e)),bf=({value:e,unit:t,isString:n,isScientific:r})=>{let i=typeof e==`number`&&n?yf(e,r):e;return t?Rp(i,t):i},xf=2**-52,Sf=(e,t)=>{let{number:n,unit:r}=vf(e),{number:i,unit:a}=vf(t);return{firstNumber:n,secondNumber:r&&a&&r!==a?Lp(i,r,a):i}},Cf=e=>{if(e!=null){if($f(e)&&typeof e==`number`)return e;if(Xf(e)){let t=mf(e?.toString().replace(`%`,``));if($f(t))return t/100}}return null},wf=(e,t,n={relativeDiff:xf})=>{let{relativeDiff:r,absoluteDiff:i}=n,a=Cf(r??i);if(e===null||t===null)return!1;let o=Ip(e),s=Ip(t);if(o&&!s||!o&&s)throw Error(`Parameters must either both have units or both not have units. Received "${e}" and "${t}"`);if(a===null)return console.warn(`Tolerance number is not defined!`),e===t;if(a<=0||a<2**-52)throw Error(`Unpredictable results - toleranceNumber should be bigger than zero or less then EPSILON`);let{firstNumber:c,secondNumber:l}=Sf(e,t);if((c===1/0||c===`Infinity`)&&(l===1/0||l===`Infinity`)||(c===-1/0||c===`-Infinity`)&&(l===-1/0||l===`-Infinity`))return!0;if(typeof c==`number`&&typeof l==`number`){if(c===l)return!0;if(i||c===0||l===0){let e=Math.abs(c-l);return wf(e,a,{relativeDiff:`1%`})||e<a}else return 2*Math.abs((c-l)/(c+l))<a}return!1},Tf=4,Ef=(e,t=Tf)=>{let n=10**t;return Math.round(e*n)/n},Df=(e,t=Tf)=>{if(typeof e==`number`)return Ef(e,t);if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;let{number:n,unit:r,isString:i}=vf(e);return bf({value:!$f(n)||typeof n==`string`&&n.endsWith(`.`)?e:Ef(n,t),unit:r,isString:i,isScientific:pf(e)})},Of=(e,t=Tf)=>Number(e.toPrecision(t)),kf=(e,t=Tf)=>{let[n,r]=mf(e).toPrecision(t).split(`.`);if(r){let e=t-n.length;return`${n}.${r.padEnd(e,`0`)}`}else return n},Af=(e,t=Tf)=>{if(typeof e==`number`)return Of(e,t);if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;let{number:n,unit:r,isString:i}=vf(e);return bf({value:!$f(n)||typeof n==`string`&&n.endsWith(`.`)?e:Of(n,t),unit:r,isString:i,isScientific:pf(e)})},jf=(e,t=Tf,n=!1)=>{let r=10**t,i=r&&e>r?Ef(e,0):n?kf(e,t):Of(e,t);return n?String(i):i},Mf=(e,t=Tf)=>{if(typeof e==`number`)return jf(e,t);if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;let{number:n,unit:r,isString:i}=vf(e);return bf({value:!$f(n)||typeof n==`string`&&n.endsWith(`.`)?e:jf(n,t),unit:r,isString:i,isScientific:pf(e)})},Nf=(e,t=Tf)=>{if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;if(typeof e==`number`)return e.toFixed(t);let{number:n,unit:r,isString:i}=vf(e);return bf({value:!$f(n)||typeof n==`string`&&n.endsWith(`.`)?e:n.toFixed(t),unit:r,isString:i,isScientific:pf(e)})},Pf=1e-4,Ff=1e7,If={0:`⁰`,1:`¹`,2:`²`,3:`³`,4:`⁴`,5:`⁵`,6:`⁶`,7:`⁷`,8:`⁸`,9:`⁹`,"+":`⁺`,"-":`⁻`},Lf=(e,t)=>{let n=`0`.repeat(t);return t>0&&e!==`0`?e.includes(`.`)?`${e}${n}`:`${e}.${n}`:e},Rf=(e,t,n=!1)=>{let r=uf(mf(e),`en-US`).replaceAll(`,`,t);return n?Lf(r,gf(e,!0)):r},zf=(e,t)=>{let{nonBreakingSpace:n}=t??{};return e===``?e:e==null?``:ff(e)?Rf(e,t?.noThousandsSeparator?``:n?` `:` `,t?.preserveTrailingZeros):np(e.toString())},Bf=(e,t)=>{let{roundScientificCoefficient:n,eNotation:r}=t??{};if(Number.isNaN(e))return`Invalid`;if(e==null)return``;if(!ff(e)||e===``)return np(e.toString());let i=mf(e);if(!Number.isFinite(i))return np(e.toString());let a=r?`e`:`·10`,[o,s]=i.toExponential().split(`e`),c=typeof n==`number`?Df(o,n):o,l=s===`+0`||s===`-0`,u=[...s.replaceAll(`+`,``)].map(e=>r?e:If[e]).join(``);return l?c:`${c}${a}${u}`},Vf=(e,t)=>{let n=Math.abs(mf(e));return(t?.scientific===`auto`&&t?.autoScientificBelow&&t?.autoScientificAbove?n<t?.autoScientificBelow||n>t?.autoScientificAbove:t?.scientific)?Bf(e,t):zf(e,t)},Hf=(e,t)=>{let n={scientific:t?.scientific??`auto`,eNotation:t?.eNotation??!1,autoScientificBelow:t?.autoScientificBelow??Pf,autoScientificAbove:t?.autoScientificAbove??Ff,withUnit:t?.withUnit??!1,nonBreakingSpace:t?.nonBreakingSpace??!1,roundScientificCoefficient:t?.roundScientificCoefficient},{withUnit:r}=n;if(e==null)return``;let{number:i,unit:a}=vf(e),o=Vf(i,n),s=a?mp?.[a]:``;return r&&a?o===``?s:`${o} ${s}`:o},Uf=e=>e===null,Wf=e=>e===void 0,Gf=e=>e&&e.constructor===Array,Kf=e=>e&&e.constructor===Object,qf=e=>e===``,Jf=e=>e&&e[e.length-1]===`.`,Yf=e=>e&&e[e.length-1]===`,`,Xf=e=>typeof e==`string`&&/^\d+(\.\d+)?%$/.test(e),Zf=e=>e.trim().replace(/\s+/g,` `),Qf=e=>{if(typeof e!=`string`||!e.includes(`/`))return!1;try{return new af(Zf(e)),!0}catch(e){return e.message===`Division by Zero`}};function $f(e){if(e==null||Array.isArray(e)||typeof e==`object`||Number.isNaN(e)||e===`NaN`||e===1/0||e===-1/0||e===`Infinity`||e===`-Infinity`)return!1;if(Qf(e))return!0;let t=parseFloat(e);return typeof e==`string`?!isNaN(t)&&(kp.test(e)||isFinite(e)):isFinite(e)}function ep(e,t){let n=(e+``)[0],r=0,i=t.indexOf(n,0)+1;for(;i>0;)i=t.indexOf(n,i)+1,r+=1;return r}function tp(e){if(e instanceof Array||e==null||e===``||e===1/0||e===-1/0||e===`Infinity`||e===`-Infinity`||Number.isNaN(e)||e===`NaN`)return e;typeof e==`string`&&(e=Zf(e));let t=e;try{let n=new af(e);n!==void 0&&(t=n.valueOf())}catch(t){if(t.message===`Division by Zero`)return e.charAt(0)===`-`?-1/0:1/0;console.warn(`Error in numFraction() method: `,e)}return t.valueOf()}var np=e=>e.trim().replace(/[\t\r\n]/g,``);function rp(e){let t=np(e+``),n=ep(`/`,t),r=ep(` `,t)+ep(`\xA0`,t),i=ep(`.`,t),a=ep(`,`,t);return n===0&&r>0&&(t=t.replace(/\s/g,``)),a>1&&(t=t.replace(/,/g,``)),i>1&&(t=t.replace(/\./g,``)),a=ep(`,`,t),i=ep(`.`,t),i===1&&a===1?(t.indexOf(`,`)>t.indexOf(`.`)?(t=t.replace(`.`,``),t=t.replace(`,`,`.`)):t=t.replace(`,`,``),t.indexOf(`.`)===0&&(t=0+t),t):(!i&&a&&(t=t.replace(`,`,`.`)),t.indexOf(`.`)===0&&(t=0+t),t)}var ip=e=>{let t=e?.[0]===`-`,n=e.replace(/^-/gm,``).replace(/^(?:0+(?=[1-9])|0+(?=0))/gm,``);return t?`-${n}`:n};function ap(e){return typeof e==`number`?e:parseFloat(rp(e))}var op=e=>!$f(e),{abs:sp,exp:cp,sqrt:lp}=Math;function up(e,t,n,r=1e-8,i=30){let a=n,o=0,s=1;for(;s>r&&o<i;){let n=a-e(a)/t(a);if(s=sp(e(n)-e(a)),s<r)return[n,!0,o];a=n,o++}return[n,!1,o]}function dp(e){let t=1/(1+.5*sp(e)),n=1-t*cp(-(e**2)-1.26551223+t*(1.00002368+t*(.37409196+t*(.09678418+t*(-.18628806+t*(.27886807+t*(-1.13520398+t*(1.48851587+t*(-.82215223+t*.17087277)))))))));return e>=0?n:-n}function fp(e){let[t]=up(t=>e-dp(t/lp(2)),e=>-lp(2/Math.PI)*cp(-.5*e**2),1);return t}function pp(e){return dp(e/lp(2))}var mp=Object.freeze({in:`in`,mm:`mm`,cm:`cm`,m:`m`,microM:`μm`,km:`km`,ft:`ft`,usft:`usft`,in2:`in²`,cm2:`cm²`,m2:`m²`,kg:`kg`,tonnes:`t`,mt:`mt`,kip:`kip`,bbl:`bbl`,m3:`m³`,Mm3:`Mm³`,MMSCF:`MMSCF`,lbm:`lbm`,"kg/mol":`kg/mol`,"lbf/mol":`lbf/mol`,sg:`sg`,ppg:`ppg`,"kg/m3":`kg/m³`,"lbm/ft3":`lbm/ft³`,s:`s`,min:`min`,h:`h`,d:`d`,month:`month`,year:`year`,"bbl/ft":`bbl/ft`,lpm:`L/min`,lps:`L/s`,bpm:`bbl/min`,"m3/min":`m³/min`,"m3/s":`m³/s`,MMSCFD:`MMSCFD`,bar:`Bar`,Pa:`Pa`,kPa:`kPa`,MPa:`MPa`,GPa:`GPa`,kPsi:`Psi`,ksi:`ksi`,"lbf/100ft2":`lbf/100ft²`,"1/Pa":`Pa⁻¹`,"1/kPa":`kPa⁻¹`,"1/MPa":`MPa⁻¹`,"1/GPa":`GPa⁻¹`,"1/psi":`psi⁻¹`,"kPa/m":`kPa/m`,"1/bar":`bar⁻¹`,klbf:`klbf`,"psi/ft":`Psi/ft`,"bar/100m":`bar/100m`,"psi/100ft":`psi/100ft`,"kPa/100m":`kPa/100m`,C:`°C`,F:`°F`,K:`K`,"C/100m":`°C/100m`,"C/m":`°C/m`,"Pa/C":`Pa/°C`,"Bar/C":`Bar/°C`,"psi/F":`psi/°F`,"psi/C":`psi/°C`,"F/100ft":`°F/100ft`,"F/ft":`°F/ft`,"K/100m":`K/100m`,"K/m":`K/m`,"lbf/ft":`lbf/ft`,N:`N`,kN:`kN`,"N/m":`N/m`,"daN/m":`daN/m`,lbf:`lbf`,kgf:`kgf`,rad:`rad`,"BTU/lbm":`BTU/lbm`,ppf:`ppf`,"kg/m":`kg/m`,"E-06/degC":`10⁻⁶/°C`,"E-06/degF":`10⁻⁶/°F`,"1/K":`K⁻¹`,km2:`km²`,ft2:`ft²`,mm2:`mm²`,mile2:`mile²`,ft3:`ft³`,"g/cm3":`g/cm³`,Sm3:`Sm³`,"ft3/s":`ft³/s`,"ft3/d":`ft³/d`,"m3/d":`m³/d`,"1/m3/d":`1/m³/d`,"s/m3":`s/m³`,"1/MMSCFD":`1/MMSCFD`,"bbl/d":`bbl/d`,tonneForce:`tonne-force`,USGal:`US gal`,"g/mol":`g/mol`,Nm:`N⋅m`,kNm:`kN⋅m`,ftlbf:`ft⋅lbf`,"J/(kg*degC)":`J/(kg⋅°C)`,"J/(kg*degK)":`J/(kg⋅K)`,"J/(s*m*degK)":`J/(s⋅m⋅K)`,"BTU/(lbm*degF)":`BTU/(lbm⋅°F)`,"BTU/(h*ft*degF)":`BTU/(h⋅ft⋅°F)`,l:`L`,"l/m":`L/m`,"kJ/kg":`kJ/kg`,"J/kg":`J/kg`,deg:`°`,"W/(mK)":`W/(m⋅K)`,psi:`psi`,"deg/100ft":`°/100ft`,"deg/30m":`°/30m`,"deg/10m":`°/10m`,"%":`%`,Hz:`Hz`,"1/s":`1/s`,rpm:`rpm`,"Pa/m":`Pa/m`,"bar/m":`bar/m`,gpm:`gpm`,"kg/s":`kg/s`,"lbm/s":`lbm/s`,"deg/m":`°/m`,"deg/ft":`°/ft`,"rad/m":`rad/m`,"rad/ft":`rad/ft`,"dyn/cm":`dyn/cm`,"mN/m":`mN/m`,"m/s":`m/s`,"ft/s":`ft/s`,"m/min":`m/min`,"ft/min":`ft/min`,"m/h":`m/h`,"ft/h":`ft/h`,mph:`mph`,"km/h":`km/h`,"m/s2":`m/s²`,"ft/s2":`ft/s²`,"Pa*s":`Pa⋅s`,P:`P`,"mPa*s":`mPa⋅s`,cP:`cP`,W:`W`,hhp:`hhp`,hp:`hp`,kW:`kW`,MW:`MW`,"BTU/h":`BTU/h`,"W/m2":`W/m²`,"hhp/in2":`hhp/in²`,"hhp/ft2":`hhp/ft²`,"Mm3/d":`Mm³/d`,"STB/d":`STB/d`,"Sm3/d":`Sm³/d`,"MSm3/d":`MSm³/d`,"SCF/STB":`SCF / STB`,"Sm3/Sm3":`Sm³ / Sm³`,"SCF/d":`SCF/d`,STB:`STB`,SCF:`SCF`,MSm3:`MSm³`,Gsg:`sg`,Gppg:`ppg`,"Gkg/m3":`kg/m³`,"Glbm/ft3":`lbm/ft³`,"lb/ft3":`lb/ft³`,"°N":`°N`,"°S":`°S`,"°W":`°W`,"°E":`°E`,fr:` `,mD:`mD`,CI:`CI`,Sigma:`σ`,"Sm3/d/bar":`Sm³/d/bar`,"STB/d/psi":`STB/d/psi`,"m3/s/bar":`m³/s/bar`,"lb/ft":`lb/ft`,"E-09/bar":`10⁻⁹/bar`,"E-10/psi":`10⁻¹⁰/psi`,"E-14/pa":`10⁻¹⁴/pa`,"m3/m":` m³/m`,"cm3/m":`cm³/m`,"mm3/m":`mm³/m`,"ft3/ft":`ft³/ft`,"in3/ft":`in³/ft`,lk:`lk`,ftCla:`ftCla`,lkCla:`lkCla`,ftSe:`ftSe`,ydSe:`ydSe`,chSe:`chSe`,"chSe(T)":`chSe(T)`,ftGC:`ftGC`,ydInd:`ydInd`,"d/stand":`d/stand`,"h/stand":`h/stand`,"min/stand":`min/stand`,"s/stand":`s/stand`,"m3/t":`m3/t`,"L/100kg":`L/100kg`}),hp=Object.freeze({acceleration:[`ft/s2`,`m/s2`],angleGradient:[`deg/30m`,`rad/m`,`deg/m`,`deg/ft`,`rad/ft`,`deg/100ft`,`deg/10m`],angles:[`deg`,`rad`],areaOther:[`in2`,`ft2`,`mm2`,`cm2`,`m2`,`mile2`,`km2`],areaTubular:[`in2`,`cm2`,`ft2`,`m2`],blowoutFlowRate:[`lpm`,`bpm`,`m3/min`,`ft3/s`,`m3/s`,`MMSCFD`,`ft3/d`,`m3/d`,`bbl/d`,`Mm3/d`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],blowoutGasFlowRate:[`MMSCFD`,`Sm3/d`,`MSm3/d`,`SCF/d`],blowoutOilFlowRate:[`Sm3/d`,`STB/d`],deg:[`deg`,`rad`],density:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`,`g/cm3`,`lb/ft3`,`kPa/m`],densityGas:[`Gsg`,`Gppg`,`Gkg/m3`,`Glbm/ft3`],densityOil:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`],densityOilGas:[`ppg`,`kg/m3`,`lbm/ft3`],densitySolid:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`],depth:[`m`,`ft`],diameters:[`in`,`m`,`cm`,`ft`,`mm`],distance:[`m`,`ft`],dls:[`deg/10m`,`deg/30m`,`deg/100ft`],doglegSeverity:[`deg/10m`,`deg/30m`,`deg/100ft`],duration:[`s`,`h`,`d`,`min`],durationShort:[`s`,`min`,`h`,`d`],durationLong:[`min`,`h`,`d`,`month`,`year`],flowrate:[`lpm`,`gpm`,`bpm`,`ft3/d`,`ft3/s`,`m3/s`,`m3/d`,`m3/min`,`Mm3/d`,`bbl/d`,`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],fluidCompressibility:[`1/bar`,`1/psi`,`1/Pa`,`1/kPa`,`1/MPa`,`1/GPa`],force:[`tonnes`,`lbf`,`kgf`,`N`,`kN`,`tonneForce`,`klbf`],forceGradient:[`lbf/ft`,`N/m`],frequency:[`Hz`],gasVolume:[`MMSCF`,`Sm3`,`MSm3`,`SCF`],gor:[`Sm3/Sm3`,`SCF/STB`],height:[`m`,`ft`],intensity:[`W/m2`,`hhp/in2`,`hhp/ft2`],interfacialTension:[`dyn/cm`,`N/m`,`lbf/ft`,`mN/m`],latitude:[`°N`,`°S`],length:[`m`,`cm`,`ft`,`km`,`in`,`mm`],linearCapacity:[`l/m`,`bbl/ft`],longitude:[`°E`,`°W`],massFlowRate:[`kg/s`,`lbm/s`],moleWeight:[`kg/mol`,`lbf/mol`,`g/mol`],oilVolume:[`STB`,`Sm3`],percentage:[`%`,`fr`],permeability:[`mD`,`m2`],power:[`hp`,`W`,`hhp`,`MW`,`kW`,`BTU/h`],pressure:[`bar`,`psi`,`Pa`,`kPa`,`MPa`,`ksi`,`GPa`,`lbf/100ft2`],pressureGradient:[`bar/100m`,`Pa/m`,`bar/m`,`psi/100ft`,`psi/ft`,`kPa/m`],pressurechange:[`bar`,`psi`,`Pa`,`MPa`,`kPa`],gasliftFlowRate:[`STB/d`,`Sm3/d`,`SCF/d`],productionFlowRate:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],productionFlowRateOil:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],productionFlowRateGas:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],injectionFlowRate:[`lpm`,`lps`,`bpm`,`gpm`,`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],pumpRate:[`lpm`,`lps`,`bpm`,`m3/s`,`ft3/s`,`gpm`],rotationalSpeed:[`rpm`,`Hz`],roughness:[`m`,`microM`,`in`],rpm:[`rpm`,`Hz`],sdstats:[`CI`,`Sigma`],specificHeatCapacity:[`J/(kg*degC)`,`J/(kg*degK)`,`BTU/(lbm*degF)`],speed:[`km/h`,`ft/min`,`mph`,`ft/h`,`ft/s`,`m/min`,`m/s`,`m/h`],inverseStandSpeed:[`d/stand`,`h/stand`,`min/stand`,`s/stand`],rop:[`ft/h`,`ft/min`,`ft/s`,`km/h`,`m/h`,`m/min`,`m/s`,`mph`],stress:[`MPa`,`kPa`,`psi`,`bar`,`Pa`,`ksi`,`lbf/100ft2`],temperature:[`C`,`F`,`K`],pressurePerTemperature:[`Pa/C`,`Bar/C`,`psi/F`,`psi/C`],tempgrad:[`C/100m`,`F/100ft`,`K/100m`,`C/m`,`F/ft`,`K/m`],thermalConductivity:[`BTU/(h*ft*degF)`,`W/(mK)`],thermalExpansionCoefficient:[`E-06/degC`,`E-06/degF`,`1/K`],torque:[`Nm`,`ftlbf`,`kNm`],torqueGradient:[`N`,`lbf`,`tonnes`],turbulentSkin:[`s/m3`,`1/m3/d`,`1/MMSCFD`],viscosity:[`Pa*s`,`P`,`mPa*s`,`cP`],inflowProductivityIndex:[`Sm3/d/bar`,`STB/d/psi`,`m3/s/bar`],volume:[`m3`,`bbl`,`Mm3`,`l`,`USGal`,`ft3`,`STB`,`Sm3`,`MMSCF`,`MSm3`,`SCF`],kickToleranceVolume:[`m3`,`bbl`,`USGal`,`ft3`,`STB`,`Sm3`,`SCF`],weight:[`tonnes`,`kg`,`lbf`,`mt`,`kip`,`N`],weightGradient:[`ppf`,`kg/m`],wgrad:[`sg`,`ppg`],wltubulars:[`ppf`,`kg/m`],youngsModulus:[`Pa`,`psi`],massPerLength:[`kg/m`,`lb/ft`],wearFactor:[`E-09/bar`,`E-10/psi`,`E-14/pa`],volumeGradient:[`m3/m`,`cm3/m`,`mm3/m`,`ft3/ft`,`in3/ft`],shearStress:[`Pa`,`lbf/100ft2`],location:[`lk`,`ftCla`,`lkCla`,`ftSe`,`ydSe`,`chSe`,`chSe(T)`,`ftGC`,`ydInd`,`ft`,`m`,`usft`],mixingRequirements:[`m3/t`,`L/100kg`],entalphy:[`J/kg`,`kJ/kg`,`BTU/lbm`]});Object.freeze({density:`sg`,densityGas:`Gsg`,densityOil:`sg`,densityOilGas:`kg/m3`,densitySolid:`kg/m3`,length:`m`,roughness:`m`,speed:`m/s`,diameters:`in`,duration:`s`,durationShort:`h`,durationLong:`d`,pressurechange:`bar`,temperature:`C`,tempgrad:`C/100m`,volume:`m3`,kickToleranceVolume:`m3`,weight:`kg`,force:`N`,wgrad:`sg`,wltubulars:`ppf`,flowrate:`lpm`,permeability:`mD`,interfacialTension:`dyn/cm`,deg:`deg`,dls:`deg/30m`,percentage:`%`,latitude:`°N`,longitude:`°E`,torque:`Nm`,rpm:`rpm`,testSingleUnit:`m`,turbulentSkin:`1/m3/d`,pressurePerTemperature:`Pa/C`,sdstats:`Sigma`,acceleration:`m/s2`,massFlowRate:`kg/s`,angleGradient:`deg/m`,viscosity:`Pa*s`,weightGradient:`kg/m`,intensity:`W/m2`,gor:`Sm3/Sm3`,inflowProductivityIndex:`Sm3/d/bar`,wearFactor:`E-09/psi`,location:`m`,inverseStandSpeed:`s/stand`,mixingRequirements:`m3/t`,entalphy:`J/kg`,shearStress:`Pa`,volumeGradient:`m3/m`});var $=Object.freeze({g:.0980665175317196,ft_to_m:.3048,inch_to_m:.0254,lbf_to_kg:.45359237,kg_to_lbf:2.20462262184877,ppf_to_kgm:.45359237/.3048,kg_cm3:.0293984025938081,bar_to_psi:14.503773773022,bar_to_pascal:1e5,sg_to_ppg:8.345404265,bbl_to_m3:.158987294928,USGal_to_m3:.003785411784,kelvin_to_degrees:273.15,tonnes_to_pascal:9806.65,therm_exp_coeff:1242e-8,psi_to_pascal:6894.757293168361,ft3_to_m3:.028316846592,ft3_to_in3:1728,day_to_second:3600*24,m3_per_m_to_ft3_per_ft:10.763910416709722,in3_per_ft_to_m3_per_m:537633333333e-16}),gp=Object.freeze({"m|mm":e=>e*1e3,"m|cm":e=>e*100,"m|km":e=>e/1e3,"m|ft":e=>e/$.ft_to_m,"m|in":e=>e/$.inch_to_m,"m|microM":e=>e*1e6,"mm|m":e=>e/1e3,"cm|m":e=>e/100,"km|m":e=>e*1e3,"ft|m":e=>e*$.ft_to_m,"in|m":e=>e*$.inch_to_m,"microM|m":e=>e/1e6,"m2|mm2":e=>e*1e6,"m2|cm2":e=>e*1e4,"m2|km2":e=>e/1e6,"m2|in2":e=>e*1550.0031,"m2|ft2":e=>e*10.76391,"m2|mile2":e=>e*3.861022e-7,"mm2|m2":e=>e/1e6,"cm2|m2":e=>e/1e4,"km2|m2":e=>e*1e6,"in2|m2":e=>e/1550.0031,"ft2|m2":e=>e/10.76391,"mile2|m2":e=>e/3.861022e-7,"m3|bbl":e=>e/$.bbl_to_m3,"m3|ft3":e=>e/$.ft3_to_m3,"m3|l":e=>e*1e3,"m3|Mm3":e=>e/1e6,"m3|USGal":e=>e/$.USGal_to_m3,"bbl|m3":e=>e*$.bbl_to_m3,"ft3|m3":e=>e*$.ft3_to_m3,"Mm3|m3":e=>e*1e6,"l|m3":e=>e/1e3,"USGal|m3":e=>e*$.USGal_to_m3,"m3|Sm3":e=>e*1,"m3|STB":e=>e*6.289512957422142,"Sm3|m3":e=>e*1,"STB|m3":e=>e*.1589948230919721,"m3|MMSCF":e=>e*1e6/$.ft3_to_m3,"m3|MSm3":e=>e*1e-6,"m3|SCF":e=>e/$.ft3_to_m3,"MMSCF|m3":e=>e*1e-6*$.ft3_to_m3,"MSm3|m3":e=>e*1e6,"SCF|m3":e=>e*$.ft3_to_m3,"kg/m3|sg":e=>e*.001,"kg/m3|g/cm3":e=>e*.001,"kg/m3|lbm/ft3":e=>e/16.01846337,"kg/m3|lb/ft3":e=>e/16.01846337,"kg/m3|ppg":e=>e*.008345404265,"sg|kg/m3":e=>e*1e3,"g/cm3|kg/m3":e=>e*1e3,"lbm/ft3|kg/m3":e=>e*16.01846337,"lb/ft3|kg/m3":e=>e*16.01846337,"ppg|kg/m3":e=>e/.008345404265,"sg|kPa/m":e=>e*9.81,"kPa/m|sg":e=>e/9.81,"Gkg/m3|Gsg":e=>e/1.225,"Gkg/m3|Glbm/ft3":e=>e/16.0176516725,"Gkg/m3|Gppg":e=>e/119.8659491193,"Gsg|Gkg/m3":e=>e*1.225,"Glbm/ft3|Gkg/m3":e=>e*16.0176516725,"Gppg|Gkg/m3":e=>e*119.8659491193,"ppf|kg/m":e=>e*.45359237/.3048,"kg/m|ppf":e=>e*1/(.45359237/.3048),"kg/m|lbf/ft":e=>e/.67196897675131,"lbf/ft|kg/m":e=>e*.67196897675131,"Pa|psi":e=>e/$.psi_to_pascal,"psi|Pa":e=>e*$.psi_to_pascal,"Pa|bar":e=>e*1e-5,"Pa|kPa":e=>e*.001,"Pa|MPa":e=>e*1e-6,"Pa|GPa":e=>e*1e-9,"bar|Pa":e=>e*1e5,"kPa|Pa":e=>e*1e3,"MPa|Pa":e=>e*1e6,"GPa|Pa":e=>e*1e9,"psi|ksi":e=>e/1e3,"ksi|psi":e=>e*1e3,"psi|lbf/100ft2":e=>e*14400,"lbf/100ft2|psi":e=>e/14400,"1/psi|1/Pa":e=>e/$.psi_to_pascal,"1/bar|1/Pa":e=>e*1e-5,"1/kPa|1/Pa":e=>e*.001,"1/MPa|1/Pa":e=>e*1e-6,"1/GPa|1/Pa":e=>e*1e-9,"1/Pa|1/psi":e=>e*$.psi_to_pascal,"1/Pa|1/bar":e=>e*1e5,"1/Pa|1/kPa":e=>e*1e3,"1/Pa|1/MPa":e=>e*1e6,"1/Pa|1/GPa":e=>e*1e9,"C|F":e=>e*1.8+32,"F|C":e=>(e-32)*5/9,"K|C":e=>e-$.kelvin_to_degrees,"C|K":e=>e+$.kelvin_to_degrees,"C/100m|F/100ft":e=>e*1.8*$.ft_to_m,"F/100ft|C/100m":e=>e*5/9/$.ft_to_m,"C/100m|C/m":e=>e/100,"C/m|C/100m":e=>e*100,"C/100m|F/ft":e=>e*1.8/100*$.ft_to_m,"F/ft|C/100m":e=>e*5/9*100/$.ft_to_m,"C/100m|K/m":e=>e/100,"K/m|C/100m":e=>e*100,"K/100m|C/100m":e=>e,"C/100m|K/100m":e=>e,"Pa/C|Bar/C":e=>e*1e-5,"Pa/C|psi/F":e=>e/1.8/$.psi_to_pascal,"Pa/C|psi/C":e=>e/$.psi_to_pascal,"Bar/C|Pa/C":e=>e*1e5,"psi/F|Pa/C":e=>e*1.8*$.psi_to_pascal,"psi/C|Pa/C":e=>e*$.psi_to_pascal,"psi/F|psi/C":e=>e*1.8,"psi/C|psi/F":e=>e/1.8,"kg|kgf":e=>e,"kg|lbf":e=>e*$.kg_to_lbf,"kg|t":e=>e/1e3,"kg|tonnes":e=>e/1e3,"kg|mt":e=>e/1e3,"kg|kip":e=>e*$.kg_to_lbf*.001,"kgf|kg":e=>e,"lbf|kg":e=>e*$.lbf_to_kg,"t|kg":e=>e*1e3,"tonnes|kg":e=>e*1e3,"mt|kg":e=>e*1e3,"kip|kg":e=>e*1e3*$.lbf_to_kg,"tonnes|lbf":e=>e*1e3*$.kg_to_lbf,"lbf|tonnes":e=>e*$.lbf_to_kg/1e3,"t|lbf":e=>e*1e3*$.kg_to_lbf,"lbf|t":e=>e*$.lbf_to_kg/1e3,"mt|lbf":e=>e*1e3*$.kg_to_lbf,"lbf|mt":e=>e/(1e3*$.kg_to_lbf),"kgf|lbf":e=>e*$.kg_to_lbf,"lbf|kgf":e=>e*$.lbf_to_kg,"kg|g":e=>e*1e3,"g|kg":e=>e/1e3,"kgf|t":e=>e/1e3,"t|kgf":e=>e*1e3,"kgf|tonnes":e=>e/1e3,"tonnes|kgf":e=>e*1e3,"kg/m|lb/ft":e=>e*1.4881639435695537,"lb/ft|kg/m":e=>e*.6719689751395069,"kg|N":e=>e*$.g*100,"N|kg":e=>e/($.g*100),"m/s|km/h":e=>e*3.6,"km/h|m/s":e=>e/3.6,"m/s|ft/s":e=>e/$.ft_to_m,"m/s|ft/min":e=>e*60/$.ft_to_m,"m/s|ft/h":e=>e*3600/$.ft_to_m,"m/s|m/min":e=>e*60,"m/s|m/h":e=>e*3600,"ft/s|m/s":e=>e*$.ft_to_m,"ft/min|m/s":e=>e*$.ft_to_m/60,"ft/h|m/s":e=>e*$.ft_to_m/3600,"m/min|m/s":e=>e/60,"m/h|m/s":e=>e/3600,"m/s|mph":e=>e*2.2369362920544,"mph|m/s":e=>e/2.2369362920544,"ft/h|ft/d":e=>e*24,"ft/d|ft/h":e=>e/24,"ft/h|m/h":e=>e*$.ft_to_m,"m/h|ft/h":e=>e/$.ft_to_m,"ft/d|m/h":e=>e*$.ft_to_m/24,"m/h|ft/d":e=>e*24/$.ft_to_m,"ft/d|m/d":e=>e*$.ft_to_m,"m/d|ft/d":e=>e/$.ft_to_m,"m/h|m/d":e=>e*24,"m/d|m/h":e=>e/24,"l/m|bbl/ft":e=>e*.0019171343228277056,"bbl/ft|l/m":e=>e/.0019171343228277056,"m3/s|ft3/s":e=>e/$.ft3_to_m3,"m3/s|lpm":e=>e*6e4,"m3/s|bpm":e=>e*377.388646,"m3/s|m3/min":e=>e*60,"m3/s|m3/d":e=>e*$.day_to_second,"m3/s|bbl/d":e=>e*543439.6505653338,"m3/s|ft3/d":e=>e*$.day_to_second/$.ft3_to_m3,"m3/s|gpm":e=>e*25e11/157725491,"m3/s|MMSCFD":e=>e/.32774128,"m3/s|STB/d":e=>e*0x7a7f6097db00/247854343,"m3/s|Sm3/d":e=>e*$.day_to_second,"m3/s|MSm3/d":e=>e/11.59722222222222,"m3/s|SCF/d":e=>e*3051187.2047366146,"ft3/s|m3/s":e=>e*$.ft3_to_m3,"lpm|m3/s":e=>e/6e4,"lps|lpm":e=>e*60,"lpm|lps":e=>e/60,"bpm|m3/s":e=>e/377.388646,"m3/d|m3/s":e=>e/$.day_to_second,"m3/min|m3/s":e=>e/60,"bbl/d|m3/s":e=>e/$.day_to_second*$.bbl_to_m3,"ft3/d|m3/s":e=>e/$.day_to_second*$.ft3_to_m3,"ft3/d|m3/d":e=>e*$.ft3_to_m3,"m3/d|ft3/d":e=>e/$.ft3_to_m3,"m3/d|ft3/s":e=>e/$.ft3_to_m3/$.day_to_second,"gpm|m3/s":e=>e*157725491/25e11,"MMSCFD|m3/s":e=>e*.32774128,"Mm3/d|m3/d":e=>e*1e6,"m3/d|Mm3/d":e=>e*1e-6,"STB/d|m3/s":e=>e*184021785986e-17,"Sm3/d|m3/d":e=>e,"m3/d|Sm3/d":e=>e,"Sm3/d|m3/s":e=>e/$.day_to_second,"MSm3/d|Sm3/d":e=>e*1e6,"Sm3/d|MSm3/d":e=>e*1e-6,"MSm3/d|m3/s":e=>e*11.59722222222222,"SCF/d|m3/s":e=>e*3.2774128e-7,"1/m3/d|1/MMSCFD":e=>e*28316.85,"1/MMSCFD|1/m3/d":e=>e/28316.85,"s/m3|1/m3/d":e=>e/86400,"1/m3/d|s/m3":e=>e*86400,"kg/s|lbm/s":e=>e*2.20462262,"lbm/s|kg/s":e=>e/2.20462262,"mD|m2":e=>e*9869233e-19,"m2|mD":e=>e/9869233e-19,"N/m|lbf/ft":e=>e*.22480894387096*$.ft_to_m,"lbf/ft|N/m":e=>e/.22480894387096/$.ft_to_m,"dyn/cm|mN/m":e=>e,"mN/m|dyn/cm":e=>e,"dyn/cm|N/m":e=>e*.001,"N/m|dyn/cm":e=>e*1e3,"mN/m|N/m":e=>e*.001,"N/m|mN/m":e=>e*1e3,"Nm|ftlbf":e=>e*.737562058700684,"Nm|kNm":e=>e/1e3,"kNm|Nm":e=>e*1e3,"ftlbf|Nm":e=>e/.737562058700684,"N|kN":e=>e*.001,"N|kgf":e=>e*2e4/196133,"N|lbf":e=>e*2e12/8896443230521,"kN|lbf":e=>e*1e3*2e12/8896443230521,"N|tonneForce":e=>e*20/196133,"kN|N":e=>e/.001,"kgf|N":e=>e*196133/2e4,"lbf|N":e=>e*8896443230521/2e12,"lbf|kN":e=>e*8896443230521/(2e12*1e3),"lbf|tonneForce":e=>e*45359237/1e11,"klbf|tonneForce":e=>e*45359237/(1e11*.001),"tonneForce|N":e=>e*196133/20,"tonneForce|lbf":e=>e*1e11/45359237,"tonneForce|klbf":e=>e*1e11/(45359237*1e3),"klbf|lbf":e=>e*1e3,"lbf|klbf":e=>e/1e3,"s|min":e=>e/60,"s|h":e=>e/3600,"s|d":e=>e/(24*3600),"min|s":e=>e*60,"h|s":e=>e*3600,"d|s":e=>e*24*3600,"year|d":e=>e*365.25,"d|year":e=>e/365.25,"year|month":e=>e*12,"month|year":e=>e/12,"month|d":e=>e*30.4375,"d|month":e=>e/30.4375,"s/stand|min/stand":e=>e/60,"s/stand|h/stand":e=>e/3600,"s/stand|d/stand":e=>e/86400,"min/stand|s/stand":e=>e*60,"h/stand|s/stand":e=>e*3600,"d/stand|s/stand":e=>e*86400,"min/stand|h/stand":e=>e/60,"min/stand|d/stand":e=>e/1440,"h/stand|min/stand":e=>e*60,"h/stand|d/stand":e=>e/24,"d/stand|min/stand":e=>e*1440,"d/stand|h/stand":e=>e*24,"%|fr":e=>e*.01,"fr|%":e=>e/.01,"deg|rad":e=>e*Math.PI/180,"rad|deg":e=>e*180/Math.PI,"W|hp":e=>e/745.699872,"hp|W":e=>e*745.699872,"W|kW":e=>e/1e3,"W|MW":e=>e/1e6,"kW|W":e=>e*1e3,"MW|W":e=>e*1e6,"W|BTU/h":e=>e*3.4121416351331,"BTU/h|W":e=>e/3.4121416351331,"hhp|hp":e=>e,"hp|hhp":e=>e,"°N|°S":e=>e,"°S|°N":e=>e,"°W|°E":e=>e,"°E|°W":e=>e,"BTU/(Kg*K)|BTU/(lbm*degF)":e=>e/4186.798188,"BTU/(lbm*degF)|J/(kg*degC)":e=>e*4186.798188,"BTU/(lbm*degF)|BTU/(Kg*K)":e=>e*4186.798188,"J/(kg*degK)|J/(kg*degC)":e=>e,"J/(kg*degC)|BTU/(lbm*degF)":e=>e/4186.798188,"J/(kg*degC)|J/(kg*degK)":e=>e,"J/(kg*degC)|J/(s*m*degK)":e=>e,"BTU/(h*ft*degF)|W/(mK)":e=>e*1.7295772056,"BTU/(h*ft*degF)|J/(s*m*degK)":e=>e*1.7295772056,"W/(mK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"W/(mK)|J/(s*m*degK)":e=>e,"W/(m*degK)|J/(s*m*degK)":e=>e,"W/(m*degK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"J/(s*m*degK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"J/(s*m*degK)|W/(m*degK)":e=>e,"J/(s*m*degK)|W/(mK)":e=>e,"J/(s*m*degK)|J/(kg*degC)":e=>e,"E-06/degF|E-06/degC":e=>e*1.8,"E-06/degC|E-06/degF":e=>e/1.8,"E-06/degC|1/K":e=>e/1e6,"1/K|E-06/degC":e=>e*1e6,"rpm|Hz":e=>e/60,"Hz|rpm":e=>e*60,"CI|Sigma":e=>fp(e),"Sigma|CI":e=>pp(e),"g/mol|kg/mol":e=>e/1e3,"kg/mol|g/mol":e=>e*1e3,"lbf/mol|kg/mol":e=>e/$.kg_to_lbf,"kg/mol|lbf/mol":e=>e*$.kg_to_lbf,"m/s2|ft/s2":e=>e/$.ft_to_m,"ft/s2|m/s2":e=>e*$.ft_to_m,"Pa*s|P":e=>e*10,"P|Pa*s":e=>e/10,"mPa*s|Pa*s":e=>e/1e3,"Pa*s|mPa*s":e=>e*1e3,"cP|Pa*s":e=>e*.001,"Pa*s|cP":e=>e/.001,"Pa/m|bar/m":e=>e*1e-5,"bar/m|Pa/m":e=>e*1e5,"Pa/m|kPa/m":e=>e/1e3,"kPa/m|Pa/m":e=>e*1e3,"Pa/m|bar/100m":e=>e*.001,"bar/100m|Pa/m":e=>e*1e3,"bar/m|bar/100m":e=>e*100,"bar/100m|bar/m":e=>e/100,"psi/ft|Pa/m":e=>e*$.psi_to_pascal/$.ft_to_m,"Pa/m|psi/ft":e=>e/$.psi_to_pascal*$.ft_to_m,"psi/100ft|Pa/m":e=>e*68.9475729/$.ft_to_m,"Pa/m|psi/100ft":e=>e/68.9475729*$.ft_to_m,"deg/30m|deg/100ft":e=>e*(100*$.ft_to_m/30),"deg/100ft|deg/30m":e=>e/(100*$.ft_to_m/30),"deg/30m|deg/m":e=>e/30,"deg/m|deg/30m":e=>e*30,"deg/100ft|deg/ft":e=>e/100,"deg/ft|deg/100ft":e=>e*100,"deg/100ft|deg/m":e=>e/(100*$.ft_to_m),"deg/m|deg/100ft":e=>e*(100*$.ft_to_m),"deg/ft|deg/m":e=>e/$.ft_to_m,"deg/m|deg/ft":e=>e*$.ft_to_m,"deg/m|rad/m":e=>e*Math.PI/180,"rad/m|deg/m":e=>e*180/Math.PI,"rad/ft|deg/m":e=>e*180/Math.PI/$.ft_to_m,"deg/m|rad/ft":e=>e*Math.PI/180*$.ft_to_m,"deg/10m|deg/100ft":e=>e*(10*$.ft_to_m),"deg/100ft|deg/10m":e=>e/(10*$.ft_to_m),"deg/10m|deg/m":e=>e/10,"deg/m|deg/10m":e=>e*10,"deg/30m|deg/10m":e=>e/3,"deg/10m|deg/30m":e=>e*3,"deg/10m|rad/m":e=>e*Math.PI/180/10,"rad/m|deg/10m":e=>e*180/Math.PI*10,"W/m2|hhp/in2":e=>e*(1/745.699872/1550.0031),"W/m2|hhp/ft2":e=>e*(1/745.699872/10.76391),"hhp/in2|W/m2":e=>e/(1/745.699872/1550.0031),"hhp/ft2|W/m2":e=>e/(1/745.699872/10.76391),"SCF/STB|Sm3/Sm3":e=>e*.178099173553719,"Sm3/Sm3|SCF/STB":e=>e*5.614849187935035,"Sm3/d/bar|m3/s/bar":e=>e/86400,"STB/d/psi|m3/s/bar":e=>e/37468.77736,"m3/s/bar|Sm3/d/bar":e=>e*86400,"m3/s/bar|STB/d/psi":e=>e*37468.77736,"E-10/psi|E-09/bar":e=>e*1.450377378,"E-10/psi|E-14/pa":e=>e*1.450377378,"E-14/pa|E-10/psi":e=>e/1.450377378,"E-09/bar|E-10/psi":e=>e/1.450377378,"E-14/pa|1/Pa":e=>e/10**14,"E-09/bar|1/bar":e=>e/10**9,"E-10/psi|1/psi":e=>e/10**10,"1/Pa|E-14/pa":e=>e*10**14,"1/bar|E-09/bar":e=>e*10**9,"1/psi|E-10/psi":e=>e*10**10,"m3/m|cm3/m":e=>e*10**6,"m3/m|mm3/m":e=>e*10**9,"m3/m|ft3/ft":e=>e*$.m3_per_m_to_ft3_per_ft,"m3/m|in3/ft":e=>e*$.m3_per_m_to_ft3_per_ft*$.ft3_to_in3,"cm3/m|m3/m":e=>e*1e-6,"cm3/m|mm3/m":e=>e*1e3,"cm3/m|ft3/ft":e=>e*$.m3_per_m_to_ft3_per_ft*1e-6,"cm3/m|in3/ft":e=>e*$.m3_per_m_to_ft3_per_ft*1e-6*$.ft3_to_in3,"mm3/m|m3/m":e=>e*1e-9,"mm3/m|cm3/m":e=>e*.001,"mm3/m|ft3/ft":e=>e*$.m3_per_m_to_ft3_per_ft*1e-9,"mm3/m|in3/ft":e=>e*$.m3_per_m_to_ft3_per_ft*1e-9*$.ft3_to_in3,"ft3/ft|m3/m":e=>e*.09290304,"ft3/ft|cm3/m":e=>e*92903.04,"ft3/ft|mm3/m":e=>e*92903040,"ft3/ft|in3/ft":e=>e*1728,"in3/ft|m3/m":e=>e*$.in3_per_ft_to_m3_per_m,"in3/ft|cm3/m":e=>e*$.in3_per_ft_to_m3_per_m*1e6,"in3/ft|mm3/m":e=>e*$.in3_per_ft_to_m3_per_m*1e9,"in3/ft|ft3/ft":e=>e/$.ft3_to_in3,"Pa|lbf/100ft2":e=>e*2.088543423315013,"lbf/100ft2|Pa":e=>e*.4788025898033584,"usft|m":e=>e*.30480060960121924,"lk|m":e=>e*.201168,"ftCla|m":e=>e*.3047972651151,"lkCla|m":e=>e*.2011057269733667,"ftGC|m":e=>e*.30479971018150875,"ydInd|m":e=>e*.9143985307444408,"ftSe|m":e=>e*(12/39.370147),"ydSe|m":e=>e*.9143991154275526,"chSe|m":e=>e*20.11676512155263,"chSe(T)|m":e=>e*20.116756,"m|usft":e=>e/.30480060960121924,"m|lk":e=>e/.201168,"m|ftCla":e=>e/.3047972651151,"m|lkCla":e=>e/.2011057269733667,"m|ftGC":e=>e/.30479971018150875,"m|ydInd":e=>e/.9143985307444408,"m|ftSe":e=>e/(12/39.370147),"m|ydSe":e=>e/.9143991154275526,"m|chSe":e=>e/20.11676512155263,"m|chSe(T)":e=>e/20.116756,"m3/t|L/100kg":e=>e*100,"L/100kg|m3/t":e=>e*.01,"kJ/kg|J/kg":e=>e*1e3,"J/kg|kJ/kg":e=>e/1e3,"BTU/lbm|J/kg":e=>e*2326,"J/kg|BTU/lbm":e=>e/2326}),_p=Object.freeze({"N-m":`Nm`,"ft-lbf":`ftlbf`,"BTU/hr":`BTU/h`,"BTU/(htf*degF)":`BTU/(h*ft*degF)`,"BTU/(hft*degF)":`BTU/(h*ft*degF)`}),vp=Object.freeze({"lbs/ft":`lb/ft`,"lbm/ft":`lb/ft`,ftUS:`usft`}),yp=Object.freeze({mm:`m`,cm:`m`,km:`m`,ft:`m`,in:`m`,microM:`m`,lbf:`kg`,t:`kg`,tonnes:`kg`,mt:`kg`,kip:`kg`,kW:`W`,MW:`W`,hp:`W`,hhp:`hp`,mm2:`m2`,cm2:`m2`,km2:`m2`,in2:`m2`,ft2:`m2`,mile2:`m2`,bbl:`m3`,ft3:`m3`,Mm3:`m3`,l:`m3`,USGal:`m3`,Sm3:`m3`,STB:`m3`,MMSCF:`m3`,MSm3:`m3`,SCF:`m3`,kN:`N`,kgf:`N`,tonneForce:`N`,klbf:`lbf`,psi:`Pa`,bar:`Pa`,kPa:`Pa`,MPa:`Pa`,ksi:`psi`,"lbf/100ft2":`psi`,"psi/100ft":`Pa/m`,"psi/ft":`Pa/m`,"bar/100m":`Pa/m`,"bar/m":`Pa/m`,"Pa/m":`kPa/m`,sg:`kg/m3`,"g/cm3":`kg/m3`,"lbm/ft3":`kg/m3`,"lb/ft3":`kg/m3`,ppg:`kg/m3`,"kPa/m":`sg`,Gsg:`Gkg/m3`,Gppg:`Gkg/m3`,"Glbm/ft3":`Gkg/m3`,"1/psi":`1/Pa`,"1/bar":`1/Pa`,"1/kPa":`1/Pa`,"1/MPa":`1/Pa`,"1/GPa":`1/Pa`,"ft/s":`m/s`,"ft/min":`m/s`,"ft/h":`m/s`,"m/min":`m/s`,"m/h":`m/s`,mph:`m/s`,"ft3/s":`m3/s`,lpm:`m3/s`,lps:`lpm`,bpm:`m3/s`,"m3/d":`m3/s`,"bbl/d":`m3/s`,"ft3/d":`m3/s`,"STB/d":`m3/s`,"Sm3/d":`m3/s`,gpm:`m3/s`,MMSCFD:`m3/s`,"Mm3/d":`m3/d`,"m3/min":`m3/s`,"MSm3/d":`m3/s`,"lbf/ft":`N/m`,min:`s`,h:`s`,d:`s`,month:`d`,year:`d`,"J/(kg*degK)":`J/(kg*degC)`,"BTU/(lbm*degF)":`J/(kg*degC)`,"BTU/(Kg*K)":`J/(kg*degC)`,"BTU/(h*ft*degF)":`J/(s*m*degK)`,"W/(m*degK)":`J/(s*m*degK)`,"W/(mK)":`J/(s*m*degK)`,K:`C`,"C/m":`C/100m`,"F/ft":`C/100m`,"K/m":`C/100m`,"F/100ft":`C/100m`,"K/100m":`C/100m`,"Bar/C":`Pa/C`,"s/m3":`1/m3/d`,"1/MMSCFD":`1/m3/d`,P:`Pa*s`,"mPa*s":`Pa*s`,cP:`Pa*s`,"hhp/in2":`W/m2`,"hhp/ft2":`W/m2`,"Sm3/d/bar":`m3/s/bar`,"STB/d/psi":`m3/s/bar`,"deg/100ft":`deg/m`,"deg/30m":`deg/m`,"deg/10m":`deg/m`,"deg/ft":`deg/m`,"rad/ft":`deg/m`,"lbf/mol":`kg/mol`,"g/mol":`kg/mol`,"1/K":`E-06/degC`,"E-09/bar":`E-10/psi`,"E-14/pa":`E-10/psi`,"1/Pa":`E-14/pa`,kNm:`Nm`,ftlbf:`Nm`,lk:`m`,ftCla:`m`,lkCla:`m`,ftSe:`m`,ydSe:`m`,chSe:`m`,"chSe(T)":`m`,ftGC:`m`,ydInd:`m`,"BTU/lbm":`J/kg`}),bp=Object.freeze(Array.from(new Set(Object.values(hp).flat()))),xp=[NaN,-1/0,1/0].map(e=>e.toString()),Sp={},Cp;function wp(){if(Cp)return Sp;Cp=1,Object.defineProperty(Sp,`__esModule`,{value:!0});function e(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}return Sp.default=e,e.code=`require("ajv/dist/runtime/ucs2length").default`,Sp}var Tp=Ep;function Ep(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(!(typeof e==`number`&&isFinite(e))){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`number`},message:`must be number`};a===null?a=[e]:a.push(e),o++}if(o>0){let e=[];for(let n of a)n.keyword!==`errorMessage`&&!n.emUsed&&(n.instancePath===t||n.instancePath.indexOf(t)===0&&n.instancePath[t.length]===`/`)&&n.schemaPath.indexOf(`#`)===0&&n.schemaPath[1]===`/`&&(e.push(n),n.emUsed=!0);if(e.length){let n={instancePath:t,schemaPath:`#/errorMessage`,keyword:`errorMessage`,params:{errors:e},message:`Must be a numerical value`};a===null?a=[n]:a.push(n),o++}let n=[];for(let e of a)e.emUsed||n.push(e);a=n,o=n.length}return Ep.errors=a,o===0}wp().default;var Dp=e=>e?.map(({message:e})=>e),Op=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/,kp=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function Ap(e){let t=/\.{2,}/,n=/,/;if(typeof e==`string`)for(;t.test(e)||n.test(e);)e=e.replace(t,`.`),e=e.replace(n,`.`);return e}function jp(e,t,n){if(e=Ap(e),n===`undefined`&&console.warn(`Inconsistent "to unit" - debug call to "Units.to()"`),t===`undefined`&&(t=n,console.warn(`Inconsistent "from unit" - debug call to "Units.to()"`)),t===n)return mf(e);if(e===1/0||e===`Infinity`)return 1/0;if(e===-1/0||e===`-Infinity`)return-1/0;if(op(e)&&e!==``)return NaN;let r=gp[t+`|`+n];if(r)return r(mf(e));if(_p[t])return console.warn(`Unit '${t}' is deprecated - use '${_p[t]}' instead.`),jp(e,_p[t],n);if(_p[n])return console.warn(`Unit '${n}' is deprecated - use '${_p[n]}' instead.`),jp(e,t,_p[n]);if(vp[n])return jp(e,t,vp[n]);if(vp[t])return jp(e,vp[t],n);let i=yp[t];if(i)return jp(jp(e,t,i),i,n);{let r=yp[n];if(n&&r&&r!==n)return jp(jp(e,t,r),r,n)}throw console.error(`no conversions found`,e,t,`->`,n),Error(`No conversions found: `+e+` `+t+` -> `+n)}function Mp(e){let t,n=e==null?``:String(e);return ep(`|`,n)>1&&(t=n.split(`|`),n=t.slice(0,-1).join(``)+`|`+t.slice(-1)),n.indexOf(`|`)>=0?t=n.split(`|`):xp.includes(n)?t=[n,``]:(t=rp(n).match(Op),t&&=t.slice(1)),t||=[`0`,``],t[1]??=``,[t[0],t[1]]}function Np(e){return Mp(e)[0]}function Pp(e){return Mp(e)[1]}function Fp(e,t,n){if(e==null||e===``)return 0;if(typeof e==`string`&&e.startsWith(`NaN`)||typeof e==`number`&&isNaN(e))return NaN;let r=Mp(rp(e).replaceAll(`+`,``));if(!r){if(t&&n)return Fp(e+n,t);throw Error(`unum: invalid number: `+e)}if(r[0]??=`0`,r[1]&&(n=r[1]),!n&&t!==n)throw Error(`unum: unable to figure out unit: ${e} fromUnit ${n}`);if(t===n){let e=r[0]?mf(r[0]):0;if(e===1/0||e===`Infinity`)return 1/0;if(e===-1/0||e===`-Infinity`)return-1/0;if(typeof e==`string`&&kp.test(e))return parseFloat(e);if(!$f(e)&&e!==1/0&&e!==-1/0)throw Error(`unum: invalid number: `+e+`, `+typeof e);return ap(e)}return jp(r[0],n,t)}function Ip(e){if(!e)return!1;let t=String(e).split(`|`);return t.length===2&&bp.includes(t[1])}function Lp(e,t,n){return Fp(e,t,n)}function Rp(e,t,n=``){if((e===null||e===``||e===void 0)&&(e=n),t===null)return String(e);let[r,i]=String(e).includes(`|`)?Mp(String(e)):[e,t];return i||=t,[r,i].join(`|`)}function zp(e){let t=e;return typeof e==`string`&&Ip(e)&&(t=Np(e)),t=Ap(t),$f(t)?{valid:Tp(mf(t)),errors:Dp(Tp.errors)}:{valid:Tp(t),errors:Dp(Tp.errors)}}var Bp=r(((e,t)=>{
|
|
39
|
+
/*!
|
|
40
|
+
Copyright (c) 2018 Jed Watson.
|
|
41
|
+
Licensed under the MIT License (MIT), see
|
|
42
|
+
http://jedwatson.github.io/classnames
|
|
43
|
+
*/
|
|
44
|
+
(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),Vp=10;const Hp=e=>e?.reduce((t,n,r)=>{if(r===0)return t;let i=Math.abs(n-e?.[r-1]);return Math.max(i,t)},0),Up=(e,t,n)=>{let{axis:r,left:i,top:a,right:o,bottom:s}=n??{},c=r===`x`,l=c?i:a,u=c?o:s,d=e>l,f=e<u,p=t.indexOf(e)!==-1;return d&&f&&!p},Wp=(e,t)=>{let n=e?.sort((e,t)=>e-t),r=Hp(e)/10,i=e[0],a=(e.length+1)*Vp;return[...Array(a)]?.map((e,t)=>{let n=i+(t-Vp+1)*r;return parseFloat(n?.toFixed(1))})?.filter(e=>Up(e,n,t))};var Gp=e=>{let{chart:t,ctx:n}=e??{};if(!n||n?.canvas===null)return;let r=t?.config;if(!r?.options?.scales?.[e?.id]?.grid?.drawOnChartArea||r?.options?.indexAxis===e?.axis)return;let i=e?.axis===`x`,a=e?.ticks?.map((t,n)=>e?.getPixelForTick(n))?.sort((e,t)=>e-t),o=Wp(a,e);n?.save?.(),n.strokeStyle=r?._config?.options?.scales?.[e.id]?.grid?.color||`rgba(0,0,0,0.06)`,n.lineWidth=.5,o?.forEach(e=>{if(n.beginPath(),i){let{top:r,bottom:i}=t?.chartArea??{};n?.moveTo?.(e,r),n?.lineTo?.(e,i)}else{let{left:r,right:i}=t?.chartArea??{};n?.moveTo?.(r,e),n?.lineTo?.(i,e)}n?.stroke?.()}),n?.restore?.()};const Kp={id:`minorGridlines`,beforeDatasetsDraw:e=>{let{scales:t}=e??{};Object.keys(t)?.forEach(e=>Gp(t?.[e]))}},qp={ZERO:0,INITIAL:2,HOVERED:6,POINT_HOVERED:8},Jp=`rgba(0,0,0,0.1)`,Yp=[10,2],Xp=12,Zp=`"Roobert", "Noto Sans", sans-serif`,Qp=`hsl(60, 10.34482759%, 12.5%)`,$p=12,em=8,tm=4,nm=[1,10,100,1e3,1e4],rm=[`#3366cc`,`#dc3912`,`#ff9900`,`#109618`,`#990099`,`#0099c6`,`#dd4477`,`#66aa00`,`#b82e2e`,`#316395`,`#994499`,`#22aa99`,`#aaaa11`,`#6633cc`,`#e67300`,`#8b0707`,`#651067`,`#329262`,`#5574a6`,`#3b3eac`],im=`99`,am=`auto`,om={NO:0,SLOW:400,FAST:1e3},sm=`htmlLegend`,cm=9,lm=1/10**9,um=[{offset:0,color:`rgba(144,238,144,0.8)`},{offset:.6,color:`rgba(255,255,224,0.8)`},{offset:.8,color:`rgba(255,255,224,0.8)`},{offset:.92,color:`rgba(255,182,193,0.5)`},{offset:.99,color:`rgba(255,182,193,0.8)`}];let dm=function(e){return e.X=`x`,e.Y=`y`,e}({}),fm=function(e){return e.Bottom=`bottom`,e.Top=`top`,e.Left=`left`,e.Right=`right`,e.TopRight=`top-right`,e.TopLeft=`top-left`,e.BottomLeft=`bottom-left`,e.BottomRight=`bottom-right`,e}({}),pm=function(e){return e.Line=`line`,e.Bar=`bar`,e}({}),mm=function(e){return e.Pointer=`pointer`,e.Initial=`initial`,e.Grab=`grab`,e.Grabbing=`grabbing`,e.Crosshair=`crosshair`,e.Move=`move`,e}({}),hm=function(e){return e.Category=`category`,e.Linear=`linear`,e.Logarithmic=`logarithmic`,e}({}),gm=function(e){return e.Vertical=`vertical`,e}({}),_m=function(e){return e.Y=`yLabel`,e.X=`xLabel`,e}({}),vm=function(e){return e.End=`end`,e.Start=`start`,e.Center=`center`,e.Right=`right`,e.Left=`left`,e}({}),ym=function(e){return e.Box=`box`,e.Ellipse=`ellipse`,e.Line=`line`,e.Text=`text`,e}({}),bm=function(e){return e.Circle=`circle`,e.Square=`rect`,e.Diamond=`rectRot`,e.Triangle=`triangle`,e}({}),xm=function(e){return e.Nearest=`nearest`,e}({}),Sm=function(e){return e.X=`x`,e.Y=`y`,e.XY=`xy`,e.Z=`z`,e}({}),Cm=function(e){return e.Shift=`Shift`,e}({}),wm=function(e){return e.Mousemove=`mousemove`,e.Mouseout=`mouseout`,e.Click=`click`,e.Touchstart=`touchstart`,e.Touchmove=`touchmove`,e.Dblclick=`dblclick`,e}({});const Tm={id:`chartAreaBorder`,beforeDraw(e,t,n){if(!e?.ctx||!e.chartArea)return;let{ctx:r,chartArea:i}=e??{},{left:a,top:o,width:s,height:c}=i??{};r?.save?.(),r.strokeStyle=n?.borderColor,r.lineWidth=n?.borderWidth,r?.setLineDash?.(n?.borderDash||[]),r.lineDashOffset=n?.borderDashOffset??0,r?.strokeRect?.(a,o,s,c),r?.restore?.()}};var Em=e(Bp(),1),Dm=e(Wd(),1);const Om=(e,t)=>{let n=[];e?.showMinorGridlines&&n.push(Kp);let r=t?.customLegend;return r?.customLegendPlugin&&r?.customLegendContainerID&&n.push({id:sm,...t?.customLegend?.customLegendPlugin}),n.push(Tm),n},km=e=>{let t=`#${Math.floor(Math.random()*16777215).toString(16)}`;return e.includes(t)?km(e):(e.push(t),e)},Am=e=>e.title===``?{}:{display:!0,text:e?.title??``},jm=e=>e===gm.Vertical,Mm=(e,t)=>{let[n,r]=e===dm.Y?[fm.Left,fm.Right]:[fm.Top,fm.Bottom];return t%2==0?n:r},Nm=(e,t)=>{let{width:n,height:r,staticChartHeight:i=!1,squareAspectRatio:a=0}=e,o=a?t?.squareAspectRatio:``,s=``;return s=n||r?``:i?t?.fixedHeight:t?.stretchHeight,(0,Em.default)(t?.chart,s,o)},Pm=(e,t)=>{let{legend:n}=e||{};return{position:n?.position||fm.Top,display:n?.display,align:n?.align,labels:{boxHeight:12,boxWidth:n?.usePointStyle?12:void 0,usePointStyle:n?.usePointStyle},onClick:t}},Fm=e=>{let{error:t=null}=e?.dataset?.data?.[e?.dataIndex]??{};return t?`Error: ${Df(t,4)}`:``},Im=(e,t)=>{let n=e?.dataset?.data?.[e?.dataIndex]?.label,r=Array.isArray(n)?n?.join(` , `):n??``;return t&&r?.length?` (${r})`:``},Lm=e=>e.toLowerCase().replace(/[^\w\s-]/g,``).replace(/\s+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``),Rm=e=>(0,Dm.isEmpty)(e)||(0,Dm.isNil)(e)?`new_chart`:e.map((e,t)=>Lm(e.label??`${t}`)).join(`_`)||`new_chart`,zm=()=>{z.font.size=12,z.font.family=Zp,z.color=Qp,z.borderColor=Jp},Bm=e=>e===``,Vm=`TOGGLE_DATA_VISIBILITY`,Hm=`SET_ANNOTATION`;var Um=e(Wd(),1);const Wm={datasets:[],annotation:[]},Gm=(e,t)=>{switch(t.type){case Hm:return{...e,annotation:t.payload};case`RESET_STATE`:return t.payload;case Vm:{let{chartInstance:n,dsConfig:r,annotationConfig:i}=t.payload,{datasetIndex:a,datasets:o,dataset:s}=r,{annotationIndex:c}=i,l=(0,Um.cloneDeep)(e),u=(0,Um.defaultTo)(n?.isDatasetVisible(a),!0);if(a>=0&&(n?.setDatasetVisibility(a,!u),(0,Um.set)(l,[`datasets`,a,`hidden`],u),s?.displayGroup)){let e=s.displayGroup;o.forEach((t,r)=>{t.displayGroup===e&&(n?.setDatasetVisibility(Number(r),!u),(0,Um.set)(l,[`datasets`,r,`hidden`],u))})}if(c>=0){let e=(0,Um.findIndex)(l.annotation,{annotationIndex:c});if(e>=0){let t=(0,Um.defaultTo)(l.annotation[e]?.display,!1);(0,Um.set)(l,[`annotation`,e,`display`],!t)}}return l}default:return e}};let Km=function(e){return e.DEFAULT=`14px Arial`,e.CUSTOM=`16px Arial`,e}({}),qm=function(e){return e.MOUSEDOWN=`mousedown`,e.MOUSEMOVE=`mousemove`,e.MOUSEUP=`mouseup`,e}({}),Jm=function(e){return e.POINT=`point`,e.BOX=`box`,e.LINE=`line`,e.ELLIPSE=`ellipse`,e}({}),Ym=function(e){return e.X=`x`,e.Y=`y`,e.Both=`both`,e}({});var Xm={grad:.9,turn:360,rad:360/(2*Math.PI)},Zm=function(e){return typeof e==`string`?e.length>0:typeof e==`number`},Qm=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=10**t),Math.round(n*e)/n+0},$m=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},eh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},th=function(e){return{r:$m(e.r,0,255),g:$m(e.g,0,255),b:$m(e.b,0,255),a:$m(e.a)}},nh=function(e){return{r:Qm(e.r),g:Qm(e.g),b:Qm(e.b),a:Qm(e.a,3)}},rh=/^#([0-9a-f]{3,8})$/i,ih=function(e){var t=e.toString(16);return t.length<2?`0`+t:t},ah=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:60*(s<0?s+6:s),s:a?o/a*100:0,v:a/255*100,a:i}},oh=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:255*[r,s,o,o,c,r][l],g:255*[c,r,r,s,o,o][l],b:255*[o,o,c,r,r,s][l],a:i}},sh=function(e){return{h:eh(e.h),s:$m(e.s,0,100),l:$m(e.l,0,100),a:$m(e.a)}},ch=function(e){return{h:Qm(e.h),s:Qm(e.s),l:Qm(e.l),a:Qm(e.a,3)}},lh=function(e){return oh((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},uh=function(e){return{h:(t=ah(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},dh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fh=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ph=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mh=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hh={string:[[function(e){var t=rh.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Qm(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Qm(parseInt(e.substr(6,2),16)/255,2):1}:null:null},`hex`],[function(e){var t=ph.exec(e)||mh.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:th({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},`rgb`],[function(e){var t=dh.exec(e)||fh.exec(e);if(!t)return null;var n,r;return lh(sh({h:(n=t[1],r=t[2],r===void 0&&(r=`deg`),Number(n)*(Xm[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}))},`hsl`]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i===void 0?1:i;return Zm(t)&&Zm(n)&&Zm(r)?th({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},`rgb`],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,a=i===void 0?1:i;return!Zm(t)||!Zm(n)||!Zm(r)?null:lh(sh({h:Number(t),s:Number(n),l:Number(r),a:Number(a)}))},`hsl`],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,a=i===void 0?1:i;return!Zm(t)||!Zm(n)||!Zm(r)?null:oh(function(e){return{h:eh(e.h),s:$m(e.s,0,100),v:$m(e.v,0,100),a:$m(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(a)}))},`hsv`]]},gh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},_h=function(e){return typeof e==`string`?gh(e.trim(),hh.string):typeof e==`object`&&e?gh(e,hh.object):[null,void 0]},vh=function(e,t){var n=uh(e);return{h:n.h,s:$m(n.s+100*t,0,100),l:n.l,a:n.a}},yh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},bh=function(e,t){var n=uh(e);return{h:n.h,s:n.s,l:$m(n.l+100*t,0,100),a:n.a}},xh=function(){function e(e){this.parsed=_h(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Qm(yh(this.rgba),2)},e.prototype.isDark=function(){return yh(this.rgba)<.5},e.prototype.isLight=function(){return yh(this.rgba)>=.5},e.prototype.toHex=function(){return e=nh(this.rgba),t=e.r,n=e.g,r=e.b,a=(i=e.a)<1?ih(Qm(255*i)):``,`#`+ih(t)+ih(n)+ih(r)+a;var e,t,n,r,i,a},e.prototype.toRgb=function(){return nh(this.rgba)},e.prototype.toRgbString=function(){return e=nh(this.rgba),t=e.r,n=e.g,r=e.b,(i=e.a)<1?`rgba(`+t+`, `+n+`, `+r+`, `+i+`)`:`rgb(`+t+`, `+n+`, `+r+`)`;var e,t,n,r,i},e.prototype.toHsl=function(){return ch(uh(this.rgba))},e.prototype.toHslString=function(){return e=ch(uh(this.rgba)),t=e.h,n=e.s,r=e.l,(i=e.a)<1?`hsla(`+t+`, `+n+`%, `+r+`%, `+i+`)`:`hsl(`+t+`, `+n+`%, `+r+`%)`;var e,t,n,r,i},e.prototype.toHsv=function(){return e=ah(this.rgba),{h:Qm(e.h),s:Qm(e.s),v:Qm(e.v),a:Qm(e.a,3)};var e},e.prototype.invert=function(){return Sh({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return e===void 0&&(e=.1),Sh(vh(this.rgba,e))},e.prototype.desaturate=function(e){return e===void 0&&(e=.1),Sh(vh(this.rgba,-e))},e.prototype.grayscale=function(){return Sh(vh(this.rgba,-1))},e.prototype.lighten=function(e){return e===void 0&&(e=.1),Sh(bh(this.rgba,e))},e.prototype.darken=function(e){return e===void 0&&(e=.1),Sh(bh(this.rgba,-e))},e.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return typeof e==`number`?Sh({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Qm(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=uh(this.rgba);return typeof e==`number`?Sh({h:e,s:t.s,l:t.l,a:t.a}):Qm(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Sh(e).toHex()},e}(),Sh=function(e){return e instanceof xh?e:new xh(e)},Ch=[],wh=function(e){e.forEach(function(e){Ch.indexOf(e)<0&&(e(xh,hh),Ch.push(e))})};function Th(e,t){var n={white:`#ffffff`,bisque:`#ffe4c4`,blue:`#0000ff`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,antiquewhite:`#faebd7`,aqua:`#00ffff`,azure:`#f0ffff`,whitesmoke:`#f5f5f5`,papayawhip:`#ffefd5`,plum:`#dda0dd`,blanchedalmond:`#ffebcd`,black:`#000000`,gold:`#ffd700`,goldenrod:`#daa520`,gainsboro:`#dcdcdc`,cornsilk:`#fff8dc`,cornflowerblue:`#6495ed`,burlywood:`#deb887`,aquamarine:`#7fffd4`,beige:`#f5f5dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkkhaki:`#bdb76b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,peachpuff:`#ffdab9`,darkmagenta:`#8b008b`,darkred:`#8b0000`,darkorchid:`#9932cc`,darkorange:`#ff8c00`,darkslateblue:`#483d8b`,gray:`#808080`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,wheat:`#f5deb3`,firebrick:`#b22222`,floralwhite:`#fffaf0`,ghostwhite:`#f8f8ff`,darkviolet:`#9400d3`,magenta:`#ff00ff`,green:`#008000`,dodgerblue:`#1e90ff`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,blueviolet:`#8a2be2`,forestgreen:`#228b22`,lawngreen:`#7cfc00`,indianred:`#cd5c5c`,indigo:`#4b0082`,fuchsia:`#ff00ff`,brown:`#a52a2a`,maroon:`#800000`,mediumblue:`#0000cd`,lightcoral:`#f08080`,darkturquoise:`#00ced1`,lightcyan:`#e0ffff`,ivory:`#fffff0`,lightyellow:`#ffffe0`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,linen:`#faf0e6`,mediumaquamarine:`#66cdaa`,lemonchiffon:`#fffacd`,lime:`#00ff00`,khaki:`#f0e68c`,mediumseagreen:`#3cb371`,limegreen:`#32cd32`,mediumspringgreen:`#00fa9a`,lightskyblue:`#87cefa`,lightblue:`#add8e6`,midnightblue:`#191970`,lightpink:`#ffb6c1`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,mintcream:`#f5fffa`,lightslategray:`#778899`,lightslategrey:`#778899`,navajowhite:`#ffdead`,navy:`#000080`,mediumvioletred:`#c71585`,powderblue:`#b0e0e6`,palegoldenrod:`#eee8aa`,oldlace:`#fdf5e6`,paleturquoise:`#afeeee`,mediumturquoise:`#48d1cc`,mediumorchid:`#ba55d3`,rebeccapurple:`#663399`,lightsteelblue:`#b0c4de`,mediumslateblue:`#7b68ee`,thistle:`#d8bfd8`,tan:`#d2b48c`,orchid:`#da70d6`,mediumpurple:`#9370db`,purple:`#800080`,pink:`#ffc0cb`,skyblue:`#87ceeb`,springgreen:`#00ff7f`,palegreen:`#98fb98`,red:`#ff0000`,yellow:`#ffff00`,slateblue:`#6a5acd`,lavenderblush:`#fff0f5`,peru:`#cd853f`,palevioletred:`#db7093`,violet:`#ee82ee`,teal:`#008080`,slategray:`#708090`,slategrey:`#708090`,aliceblue:`#f0f8ff`,darkseagreen:`#8fbc8f`,darkolivegreen:`#556b2f`,greenyellow:`#adff2f`,seagreen:`#2e8b57`,seashell:`#fff5ee`,tomato:`#ff6347`,silver:`#c0c0c0`,sienna:`#a0522d`,lavender:`#e6e6fa`,lightgreen:`#90ee90`,orange:`#ffa500`,orangered:`#ff4500`,steelblue:`#4682b4`,royalblue:`#4169e1`,turquoise:`#40e0d0`,yellowgreen:`#9acd32`,salmon:`#fa8072`,saddlebrown:`#8b4513`,sandybrown:`#f4a460`,rosybrown:`#bc8f8f`,darksalmon:`#e9967a`,lightgoldenrodyellow:`#fafad2`,snow:`#fffafa`,lightgrey:`#d3d3d3`,lightgray:`#d3d3d3`,dimgray:`#696969`,dimgrey:`#696969`,olivedrab:`#6b8e23`,olive:`#808000`},r={};for(var i in n)r[n[i]]=i;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return`transparent`;var i,o,s=r[this.toHex()];if(s)return s;if(t?.closest){var c=this.toRgb(),l=1/0,u=`black`;if(!a.length)for(var d in n)a[d]=new e(n[d]).toRgb();for(var f in n){var p=(i=c,o=a[f],(i.r-o.r)**2+(i.g-o.g)**2+(i.b-o.b)**2);p<l&&(l=p,u=f)}return u}},t.string.push([function(t){var r=t.toLowerCase(),i=r===`transparent`?`#0000`:n[r];return i?new e(i).toRgb():null},`name`])}wh([Th]);function Eh(e,t,n=`rgb`){let r=Sh(e);if(r.alpha()<1)return n===`hex`?r.toHex():r.toRgbString();let i=Math.max(0,Math.min(1,t/100)),a=r.alpha(i);return n===`hex`?a.toHex():a.toRgbString()}var Dh=(e,t,n)=>{t.canvas.style.cursor=mm.Pointer,e.options.scaleID?.includes(dm.X)&&e.options.label&&(e.options.label.xAdjust=t.chartArea.left),e.options.borderWidth=qp.HOVERED,e.options.label&&(e.label.options.display=!0,e.options.label.enabled=!0),n?.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update(`none`)),t.draw()},Oh=(e,t,n)=>{e.options.borderWidth=qp.INITIAL,t.canvas.style.cursor=mm.Initial,t.hoveredAnnotationId=null,e.options.label&&(e.label.options.display=!1,e.options.label.enabled=!1),n?.enableDrag&&(t.hoveredAnnotationId=null,t.update(`none`)),t.draw()},kh=(e,t,n)=>{n?.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update(`none`),e.options.borderWidth=qp.HOVERED,t.canvas.style.cursor=mm.Pointer),t.draw()},Ah=(e,t,n)=>{n?.enableDrag&&(t.hoveredAnnotationId=null,e.options.borderWidth=qp.INITIAL,t.canvas.style.cursor=mm.Initial,t.update(`none`)),t.draw()},jh=(e,t,n)=>{n?.enableDrag&&(t.hoveredAnnotationId=e.options.id||null,t.update(`none`),e.options.borderWidth=qp.POINT_HOVERED,t.canvas.style.cursor=mm.Pointer),t.draw()},Mh=(e,t,n)=>{n?.enableDrag&&(t.hoveredAnnotationId=null,e.options.borderWidth=qp.INITIAL,t.canvas.style.cursor=mm.Initial,t.update(`none`)),t.draw()},Nh=e=>e?.map((e,t)=>{let n=e?.annotationAxis??void 0,r=e?.color??rm[t],i=e?.transparency?Eh(r,e?.transparency):r,a=e?.type??Jm.LINE,o=e?.adjustScaleRange,s={[Jm.LINE]:i,[Jm.POINT]:i,[Jm.BOX]:i,[Jm.ELLIPSE]:`transparent`}[a]||`transparent`,c={[Jm.LINE]:qp.INITIAL,[Jm.BOX]:qp.ZERO,[Jm.POINT]:qp.ZERO,[Jm.ELLIPSE]:e?.borderWidth??0}[a]??0,l=a===Jm.LINE?Yp:void 0,u={content:e?.label,display:!0,font:{weight:`normal`}},d={[Jm.LINE]:{backgroundColor:i,content:e?.label,display:!1,position:fm.Top},[Jm.POINT]:{backgroundColor:e?.labelConfig?.backgroundColor??`transparent`,content:e?.label,display:e?.labelConfig?.display??!!e?.label,position:e?.labelConfig?.position??fm.Bottom,color:e?.labelConfig?.color??`hsl(60, 10.34482759%, 12.5%)`,font:e?.labelConfig?.font??`12px "Roobert", "Noto Sans", sans-serif`,borderWidth:qp.INITIAL,padding:5,borderRadius:3,borderColor:e?.labelConfig?.borderColor??`transparent`},[Jm.BOX]:u,[Jm.ELLIPSE]:u}[a]||u,f=({element:t},{chart:n})=>{switch(a){case Jm.LINE:Dh(t,n,e);break;case Jm.BOX:kh(t,n,e);break;case Jm.POINT:jh(t,n,e);break;default:break}},p=({element:t},{chart:n})=>{switch(a){case Jm.LINE:Oh(t,n,e);break;case Jm.BOX:Ah(t,n,e);break;case Jm.POINT:Mh(t,n,e);break;default:break}},m=()=>(t,n)=>e?.onDragStart?e?.onDragStart(t,n):void 0,h=()=>(t,n)=>e?.onDrag?e?.onDrag(t,n):void 0,g=()=>(t,n)=>e?.onDragEnd?e?.onDragEnd(t,n):void 0;return{...e,display:e?.display,annotationIndex:t,id:`${e?.label}-${e?.value}-${t}`,scaleID:n,label:d,backgroundColor:i,borderColor:s,borderWidth:c,borderDash:l,type:a,adjustScaleRange:o,enter:f,leave:p,onDragStart:m,onDrag:h,onDragEnd:g,pointStyle:e?.pointStyle??bm.Circle,resizable:e?.resizable??!0,displayDragCoordinates:e?.displayDragCoordinates??!0}}),Ph=({showAnnotations:e,annotationsData:t})=>e&&t&&t?.length?Nh(t)??[]:[],Fh=e(Ud(),1);const Ih=(e,t)=>{if(!e.annotations?.controlAnnotation)return;let n=(0,fl.useRef)(null);(0,fl.useEffect)(()=>{let{showAnnotations:r=!0,annotationsData:i=[]}=e?.annotations??{},a=n.current;(!a||a.showAnnotations!==r||!(0,Fh.default)(a.annotationsData,i))&&(t({type:Hm,payload:Ph({showAnnotations:r,annotationsData:i})}),n.current={showAnnotations:r,annotationsData:i})},[e,t])};var Lh=e(t(),1);const Rh=(0,fl.createContext)(void 0),zh=({children:e,options:t,datasets:n})=>{let{showAnnotations:r=!0,annotationsData:i=[]}=t?.annotations??{},a=n?.map((e,t)=>({[t]:{...e,hidden:!1}}))??[],o=Ph({showAnnotations:r,annotationsData:i}),[s,c]=(0,fl.useReducer)(Gm,{...Wm,annotation:o,datasets:a}),l=(0,fl.useMemo)(()=>({state:s,dispatch:c}),[s,t,c]);return Ih(t,c),(0,Lh.jsx)(Rh.Provider,{value:l,children:e})};zh.__docgenInfo={description:``,methods:[],displayName:`LegendProvider`,props:{children:{required:!0,tsType:{name:`ReactNode`},description:``},options:{required:!0,tsType:{name:`union`,raw:`| ILineChartOptions
|
|
45
|
+
| IBarOptions
|
|
46
|
+
| IPieOptions
|
|
47
|
+
| IScatterOptions`,elements:[{name:`ILineChartOptions`},{name:`IBarOptions`},{name:`IPieOptions`},{name:`IScatterOptions`}]},description:``},datasets:{required:!1,tsType:{name:`Array`,elements:[{name:`ICommonDataset`}],raw:`ICommonDataset[]`},description:``}}};export{rp as $,it as $t,bm as A,rs as At,rm as B,qe as Bt,dm as C,Ec as Ct,wm as D,ts as Dt,mm as E,Ea as Et,om as F,Ge as Ft,Xp as G,Re as Gt,cm as H,N as Ht,Yp as I,F as It,nm as J,k as Jt,um as K,st as Kt,am as L,Ke as Lt,hm as M,Qs as Mt,_m as N,tc as Nt,Cm as O,Ac as Ot,im as P,xc as Pt,Bp as Q,A as Qt,Jp as R,We as Rt,ym as S,ps as St,pm as T,Ti as Tt,Qp as U,an as Ut,sm as V,dn as Vt,Zp as W,z as Wt,tm as X,et as Xt,lm as Y,ze as Yt,em as Z,j as Zt,Im as _,Sl as _t,Ym as a,M as an,Nf as at,zm as b,zr as bt,Vm as c,mf as ct,Mm as d,zp as dt,yn as en,Hf as et,Rm as f,Wd as ft,Am as g,Cl as gt,Om as h,td as ht,Jm as i,B as in,Mf as it,fm as j,Us as jt,Sm as k,Lc as kt,Fm as l,hf as lt,Pm as m,Hd as mt,zh as n,rt as nn,pf as nt,Km as o,Af as ot,Nm as p,Ud as pt,$p as q,ot as qt,Ph as r,vn as rn,Df as rt,qm as s,ip as st,Rh as t,H as tn,wf as tt,km as u,Fp as ut,Bm as v,wl as vt,xm as w,Po as wt,vm as x,Uo as xt,jm as y,Tl as yt,qp as z,I as zt};
|