promptfoo 0.120.26 → 0.121.1
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/README.md +1 -1
- package/dist/drizzle/0023_wooden_mandrill.sql +2 -0
- package/dist/drizzle/meta/0023_snapshot.json +1496 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/src/{ListApp-D3DG0F8h.js → ListApp-Du7YVwj5.js} +2 -4
- package/dist/src/accounts-BgNJDBE6.js +206 -0
- package/dist/src/{accounts-BzEY8H3v.cjs → accounts-Bx-x3bmW.cjs} +99 -80
- package/dist/src/{accounts-DHHiXsy6.js → accounts-CMqkzrVf.js} +61 -36
- package/dist/src/{accounts-R3gfCR_g.js → accounts-xrUGFA6n.js} +60 -35
- package/dist/src/{agentic-utils-D6_gzOUF.js → agentic-utils-BKIN5PKu.js} +9 -10
- package/dist/src/{agents-CwM7re15.cjs → agents-B0f4HICh.cjs} +37 -40
- package/dist/src/{agents-Cnph5GLD.js → agents-C-dDThPK.js} +37 -37
- package/dist/src/{agents-C7BiinFI.cjs → agents-CErsqg5U.cjs} +19 -27
- package/dist/src/{agents-v4cW_ZgC.js → agents-CVIn-Utx.js} +19 -22
- package/dist/src/{agents-GiUianme.js → agents-CXknwsFX.js} +37 -40
- package/dist/src/{agents-DETIQHqF.js → agents-DeH4Gu94.js} +21 -28
- package/dist/src/{agents-DYIT-hQy.js → agents-Dy2YpZpa.js} +38 -41
- package/dist/src/{agents-Cao4i7AX.js → agents-aF4-T121.js} +19 -30
- package/dist/src/{aimlapi-DMF6v_vb.js → aimlapi-BAGZDo5G.js} +16 -18
- package/dist/src/{aimlapi-CMJpKK-B.js → aimlapi-BNfTBexL.js} +15 -17
- package/dist/src/{aimlapi-DtSf1ykJ.js → aimlapi-DHRKlBEA.js} +15 -4
- package/dist/src/{aimlapi-DoGLcQW_.cjs → aimlapi-tg0Gkcvr.cjs} +15 -16
- package/dist/src/app/assets/index-BFCZg7hQ.js +439 -0
- package/dist/src/app/assets/index-NCn4eVBv.css +1 -0
- package/dist/src/app/assets/{vendor-charts-CYyo8R8v.js → vendor-charts-CCl15Imd.js} +1 -1
- package/dist/src/app/assets/{vendor-markdown-DSmzq4Jh.js → vendor-markdown-0tekx3KX.js} +1 -1
- package/dist/src/app/index.html +4 -34
- package/dist/src/{audio-DUH4q0Xq.js → audio-BRODU0UK.js} +7 -9
- package/dist/src/{audio-BWjyvHn9.cjs → audio-BWeaWovU.cjs} +6 -7
- package/dist/src/{audio-U580w8jM.js → audio-CHQ4r-RV.js} +6 -5
- package/dist/src/{audio-BrJBFN2b.js → audio-tf_NBjlC.js} +6 -8
- package/dist/src/base-B0tcrnq_.js +193 -0
- package/dist/src/base-B4QJRyFS.js +194 -0
- package/dist/src/base-DBtwl2FR.cjs +222 -0
- package/dist/src/base-fEDN28WM.js +193 -0
- package/dist/src/{blobs-kt8v3UyH.js → blobs-BAU-dXan.js} +9 -12
- package/dist/src/{blobs-C9J2mVgo.js → blobs-Bpg5rH6i.js} +9 -12
- package/dist/src/{blobs-673H0jCl.cjs → blobs-DvS-O6be.cjs} +34 -37
- package/dist/src/blobs-qTYm-1PY.js +236 -0
- package/dist/src/{cache-BLLayYEN.js → cache-8XhNqPKW.js} +64 -67
- package/dist/src/cache-Bbn1Nyrd.cjs +5 -0
- package/dist/src/cache-BwsMSda7.js +6 -0
- package/dist/src/{cache-mIszOnuz.js → cache-CG0SlR1d.js} +64 -66
- package/dist/src/{cache-7xULbvt3.cjs → cache-COish3-W.cjs} +114 -117
- package/dist/src/cache-D3eqDYGU.js +739 -0
- package/dist/src/{chat-Fl6TZJRS.cjs → chat-2K608PeQ.cjs} +20 -21
- package/dist/src/chat-BKm79wib.js +764 -0
- package/dist/src/{chat-XPN9YHhr.js → chat-CM_kyI8B.js} +20 -9
- package/dist/src/{chat-DIywASPG.js → chat-CRWNNq73.js} +49 -49
- package/dist/src/{chat-C8Ei4f87.js → chat-CznLWr_D.js} +49 -49
- package/dist/src/{chat-CgyGj2hC.js → chat-DHMH-N64.js} +20 -22
- package/dist/src/{chat-C4zqjObh.cjs → chat-DaqekjFr.cjs} +69 -69
- package/dist/src/{chat-Cpz3O-Xl.js → chat-DxysjBvt.js} +21 -23
- package/dist/src/{chatkit-Dpxrq4eD.js → chatkit-65VXf5SR.js} +58 -58
- package/dist/src/{chatkit-DIrJX8xk.js → chatkit-Be-Q-a9F.js} +58 -60
- package/dist/src/{chatkit-DEls11hE.js → chatkit-BxFvW8KY.js} +58 -60
- package/dist/src/{chatkit-e25Ziu17.cjs → chatkit-DKyPi1Gs.cjs} +58 -60
- package/dist/src/chunk-DEq-mXcV.js +15 -0
- package/dist/src/chunk-DRamLcfz.js +16 -0
- package/dist/src/{claude-agent-sdk-6-xTaLwM.js → claude-agent-sdk-BLTu0WBO.js} +45 -31
- package/dist/src/{claude-agent-sdk-BzxF6NIJ.cjs → claude-agent-sdk-CJH22shf.cjs} +44 -29
- package/dist/src/{claude-agent-sdk-CmkTnKGH.js → claude-agent-sdk-D6_k9FKA.js} +45 -33
- package/dist/src/{claude-agent-sdk-rXCBLK_o.js → claude-agent-sdk-Dy5lT-Tx.js} +46 -21
- package/dist/src/{cloud-BMbRVJFw.js → cloud-Bc9526yV.js} +32 -12
- package/dist/src/cloud-DmE0EwsY.js +4 -0
- package/dist/src/{cloudflare-ai-CUg4BTcj.js → cloudflare-ai-C9r2sRhw.js} +16 -18
- package/dist/src/{cloudflare-ai-Z9X219gp.js → cloudflare-ai-CWWJCRim.js} +16 -4
- package/dist/src/{cloudflare-ai-BAQ0u_dg.cjs → cloudflare-ai-ClWSdor4.cjs} +16 -17
- package/dist/src/{cloudflare-ai-CobxMTR4.js → cloudflare-ai-ICsOuD-z.js} +17 -19
- package/dist/src/{cloudflare-gateway-C0sgfr_z.cjs → cloudflare-gateway-C2_-KG5o.cjs} +21 -22
- package/dist/src/{cloudflare-gateway-_itGuXry.js → cloudflare-gateway-D6O7AlYb.js} +23 -23
- package/dist/src/{cloudflare-gateway-D2_yi-Fh.js → cloudflare-gateway-D6xFc5pa.js} +21 -25
- package/dist/src/{cloudflare-gateway-Djf3F3_H.js → cloudflare-gateway-pXGHxJ47.js} +26 -14
- package/dist/src/{codex-sdk-ibXwdglL.js → codex-sdk-C6UMlxwV.js} +49 -32
- package/dist/src/{codex-sdk-BASDNkIl.js → codex-sdk-DUwKWezN.js} +49 -30
- package/dist/src/{codex-sdk-dSnGdgIp.js → codex-sdk-GGAw0qbD.js} +49 -32
- package/dist/src/{codex-sdk-wTEpMM_X.cjs → codex-sdk-fAO0c3yA.cjs} +49 -32
- package/dist/src/{cometapi-B01btbfb.js → cometapi-BasUi7-_.js} +17 -19
- package/dist/src/{cometapi-DHUAH6nK.js → cometapi-Bbjp5V4x.js} +16 -4
- package/dist/src/{cometapi-ChAaRjg5.js → cometapi-DkXrKi5z.js} +21 -24
- package/dist/src/{cometapi-JbvOJSCO.cjs → cometapi-vY6aDZgo.cjs} +21 -22
- package/dist/src/{completion-D9_MDlnd.js → completion-6Mx_iXxK.js} +11 -13
- package/dist/src/{completion-BBJ6zmG3.js → completion-C5rtR_9P.js} +11 -13
- package/dist/src/{completion-DDyL3Cb2.cjs → completion-CDOouNzq.cjs} +21 -23
- package/dist/src/completion-C_P3ypkJ.js +120 -0
- package/dist/src/createHash-CTQmL3G2.js +15 -0
- package/dist/src/createHash-CfZSc0b4.cjs +27 -0
- package/dist/src/createHash-Da8fMwqB.js +16 -0
- package/dist/src/createHash-DmPQkvBh.js +15 -0
- package/dist/src/{docker-JAAubMw3.js → docker-5KcG-_86.js} +18 -20
- package/dist/src/{docker-Ckw-j7Rr.cjs → docker-BwsKwxFs.cjs} +18 -19
- package/dist/src/{docker-vnOg96gi.js → docker-CZnqU1XV.js} +18 -7
- package/dist/src/{docker-BuButc4D.js → docker-DzxyDPIj.js} +19 -21
- package/dist/src/entrypoint.js +2 -3
- package/dist/src/{errors-DnGCbnx8.js → errors-P6ll7XSJ.js} +2 -2
- package/dist/src/{esm-CYhseqj4.js → esm-C03C-mv3.js} +17 -20
- package/dist/src/{esm-rDtG_2rg.js → esm-CaIwzWR5.js} +18 -21
- package/dist/src/esm-Cd1AjG1D.js +379 -0
- package/dist/src/{esm-BQkx5roy.cjs → esm-CnNt7sI4.cjs} +47 -49
- package/dist/src/eval-17JizQIv.js +15 -0
- package/dist/src/{eval-CYrbG57o.js → eval-DmFyWU7i.js} +49 -55
- package/dist/src/{evalResult-COsVttMA.js → evalResult-CDQiuUuf.js} +16 -12
- package/dist/src/{evalResult-6JaUIStC.js → evalResult-CTG2AHOS.js} +10 -11
- package/dist/src/evalResult-Cqj8pldJ.js +12 -0
- package/dist/src/{evalResult-DlRfu_Rq.cjs → evalResult-Dap2CekP.cjs} +20 -21
- package/dist/src/evalResult-DvcJAWJU.cjs +10 -0
- package/dist/src/evalResult-Hftn-S_i.js +10 -0
- package/dist/src/evaluator-B2CFNt-P.js +36 -0
- package/dist/src/{evaluator-3EJCMTs0.js → evaluator-DPFRbFIL.js} +210 -232
- package/dist/src/{extractor-LSYjrhK0.js → extractor-CFG6bcWJ.js} +23 -38
- package/dist/src/{extractor-DbhlYEeo.cjs → extractor-DX36oYEv.cjs} +37 -64
- package/dist/src/{extractor-Hs7la_19.js → extractor-M67RUtg6.js} +23 -38
- package/dist/src/extractor-YMU_Gvt8.js +374 -0
- package/dist/src/fetch-4M3YRaqL.js +780 -0
- package/dist/src/{fetch-18MuNu9i.js → fetch-60Gzydls.js} +60 -46
- package/dist/src/{fetch-SRsE6Ctl.js → fetch-BMv0O527.js} +41 -35
- package/dist/src/{fetch-ZMn_oemb.cjs → fetch-BxUk8odA.cjs} +268 -279
- package/dist/src/fetch-KV5kNASw.js +5 -0
- package/dist/src/{fileExtensions-ePDqouxn.js → fileExtensions-DnqA1y9x.js} +2 -2
- package/dist/src/{fileExtensions-BpuMmaFL.js → fileExtensions-Ds-foDzt.js} +2 -2
- package/dist/src/fileExtensions-LcDYkU4v.js +85 -0
- package/dist/src/{fileExtensions-DkJYkWUy.cjs → fileExtensions-bYh77CN8.cjs} +27 -28
- package/dist/src/{formatDuration-Doo0xq-z.js → formatDuration-DgBVMN65.js} +2 -2
- package/dist/src/{genaiTracer-Ce19n68P.js → genaiTracer-70Z8BIuV.js} +2 -3
- package/dist/src/{genaiTracer-CqNnnXrE.js → genaiTracer-C1rxGO8Q.js} +2 -3
- package/dist/src/genaiTracer-D3fD9dNV.js +256 -0
- package/dist/src/{genaiTracer-CQlpZkrp.cjs → genaiTracer-DN4dQywX.cjs} +13 -14
- package/dist/src/graders-Bu0H9nXi.js +32 -0
- package/dist/src/{graders-BaMCwIKp.js → graders-CHO8EPM4.js} +385 -417
- package/dist/src/graders-Cfhkvx-e.js +34 -0
- package/dist/src/{graders-QsALpIdy.js → graders-CpdqD9PI.js} +385 -417
- package/dist/src/graders-DClJVpGP.cjs +32 -0
- package/dist/src/{graders-DzUUnUjC.cjs → graders-DOXycdlG.cjs} +721 -753
- package/dist/src/graders-DcnJsrMO.js +32 -0
- package/dist/src/graders-R9rYUM0d.js +13466 -0
- package/dist/src/{image-BiEVdpdP.js → image-BmEZqVmk.js} +57 -18
- package/dist/src/{image-mhAGP07h.js → image-CBBVXWuT.js} +57 -18
- package/dist/src/{image-D10zEe1f.cjs → image-CDLQOcqT.cjs} +6 -7
- package/dist/src/{image-COCWy5dX.js → image-DJEvKveK.js} +6 -5
- package/dist/src/{image-C3BjJUAU.cjs → image-DTedmQPg.cjs} +77 -32
- package/dist/src/{image-DB4sHxdJ.js → image-gvmivTEe.js} +7 -9
- package/dist/src/image-pAX56tPG.js +257 -0
- package/dist/src/{image-BXt_7u0v.js → image-tL5hIOFh.js} +6 -8
- package/dist/src/index.cjs +696 -693
- package/dist/src/index.d.cts +113 -10
- package/dist/src/index.d.ts +113 -6
- package/dist/src/index.js +657 -658
- package/dist/src/{interactiveCheck-DU-MAhp5.js → interactiveCheck-BgLZUIt3.js} +7 -8
- package/dist/src/{invariant-DT20jrBd.js → invariant-BtWWVVhl.js} +2 -2
- package/dist/src/{invariant-1pAf2CD1.js → invariant-Ddh24eXh.js} +2 -2
- package/dist/src/{invariant-CKcJAQ6M.cjs → invariant-kfQ8Bu82.cjs} +7 -8
- package/dist/src/invariant-vgHWClmd.js +25 -0
- package/dist/src/{knowledgeBase-DotRBzUE.js → knowledgeBase-CLJybhnF.js} +19 -34
- package/dist/src/{knowledgeBase-XJQ0Qyez.js → knowledgeBase-CoU-UQBg.js} +17 -41
- package/dist/src/{knowledgeBase-CMvMlLZR.js → knowledgeBase-DjWPVqSb.js} +17 -43
- package/dist/src/{knowledgeBase-Bnb00xKs.cjs → knowledgeBase-wkxuRFhA.cjs} +17 -40
- package/dist/src/{litellm-CHrRmPAe.js → litellm-B9Hysuri.js} +16 -18
- package/dist/src/{litellm-CrLJrPIm.js → litellm-CTfa0hqi.js} +15 -17
- package/dist/src/{litellm-BrnZhMcL.cjs → litellm-NYpQ8RQu.cjs} +15 -16
- package/dist/src/{litellm-BECdjOTx.js → litellm-ePxtr9F1.js} +15 -4
- package/dist/src/{logger-w8Ozp0Td.js → logger-CT3IKMKA.js} +24 -41
- package/dist/src/{logger-BdZ-IqBc.cjs → logger-Cp1GPUjj.cjs} +166 -192
- package/dist/src/logger-DLcq4dWf.js +713 -0
- package/dist/src/{logger-BotXmWKW.js → logger-KkObSCzq.js} +27 -43
- package/dist/src/{luma-ray-C0RkI3lt.cjs → luma-ray-B0GGNRc1.cjs} +20 -21
- package/dist/src/{luma-ray-C-w6EsJm.js → luma-ray-BE2mOt6N.js} +20 -13
- package/dist/src/{luma-ray-BOeX-h0M.js → luma-ray-BW9IRGIc.js} +22 -21
- package/dist/src/{luma-ray-DgKLS0BF.js → luma-ray-Cm1KZBhs.js} +20 -23
- package/dist/src/main.js +1985 -2055
- package/dist/src/{messages-DXV3Qh8_.cjs → messages-1JrJs91T.cjs} +35 -34
- package/dist/src/{messages-D61tPFQo.js → messages-1x9atZmP.js} +25 -24
- package/dist/src/{messages-CDZYGNlS.js → messages-BLbWdsyt.js} +25 -24
- package/dist/src/messages-D8EA0oDc.js +240 -0
- package/dist/src/{meteor-P2rUE-Uz.js → meteor-44VjEACX.js} +3 -4
- package/dist/src/{meteor-SLNTgmXm.js → meteor-D-SotUw9.js} +3 -4
- package/dist/src/{meteor-odmwVbyG.cjs → meteor-DLZZ3osF.cjs} +3 -4
- package/dist/src/{meteor-Dj8cTkU_.js → meteor-DUiCJRC-.js} +3 -4
- package/dist/src/modelslab-C1OLRmVX.js +166 -0
- package/dist/src/modelslab-CqXBy3U8.js +168 -0
- package/dist/src/modelslab-DcOSFwKh.cjs +166 -0
- package/dist/src/modelslab-X5-4LroM.js +166 -0
- package/dist/src/{nova-reel-C2LFfVTf.js → nova-reel-BgS1ZWuK.js} +20 -13
- package/dist/src/{nova-reel-DtCjbD5O.js → nova-reel-D2ZkOSyr.js} +22 -21
- package/dist/src/{nova-reel-D9FXq3Mt.cjs → nova-reel-D9xfaMBs.cjs} +20 -21
- package/dist/src/{nova-reel-Bk5npr2q.js → nova-reel-DihqLeol.js} +20 -23
- package/dist/src/{nova-sonic-BoRSY_U6.cjs → nova-sonic-DVu3mMIy.cjs} +30 -31
- package/dist/src/{nova-sonic-D_qERM-K.js → nova-sonic-DezhVUYT.js} +30 -26
- package/dist/src/{nova-sonic-CgaWLDM1.js → nova-sonic-P-CdUMlV.js} +30 -31
- package/dist/src/{nova-sonic-BXRfQyF-.js → nova-sonic-Q3BOJeig.js} +31 -32
- package/dist/src/{openai-Bigwjgo1.cjs → openai-Cuif0GEt.cjs} +8 -9
- package/dist/src/{openai-Dz3surb_.js → openai-DElQ-fPX.js} +3 -4
- package/dist/src/{openai-CT5fwbve.js → openai-DhbB7eWK.js} +3 -4
- package/dist/src/openai-j-sE2O7r.js +44 -0
- package/dist/src/{openclaw-dHLcXUWZ.js → openclaw-BiSZPL7J.js} +20 -14
- package/dist/src/{openclaw-CpPrXwf6.js → openclaw-Bv1DINsX.js} +20 -27
- package/dist/src/{openclaw-B6XY2kUf.js → openclaw-D1D_ej1z.js} +21 -28
- package/dist/src/{openclaw-DDSfq5fp.cjs → openclaw-DAfWQn-o.cjs} +33 -39
- package/dist/src/opencode-sdk-C7m-wRfI.js +560 -0
- package/dist/src/opencode-sdk-CfaLN8PY.cjs +564 -0
- package/dist/src/opencode-sdk-D95s6SnR.js +562 -0
- package/dist/src/opencode-sdk-DxUPkLT7.js +560 -0
- package/dist/src/{otlpReceiver-DmRb0NBj.js → otlpReceiver--AIRW_S4.js} +53 -51
- package/dist/src/{otlpReceiver-Dg817agV.js → otlpReceiver-Bn5wGB1v.js} +53 -55
- package/dist/src/{otlpReceiver-B6Xo4KZM.cjs → otlpReceiver-Diec4cln.cjs} +53 -55
- package/dist/src/{otlpReceiver-BO0rbDzh.js → otlpReceiver-g3ByGaXs.js} +53 -55
- package/dist/src/{providerRegistry-Xf0qdqGQ.js → providerRegistry-B0RUOLI_.js} +7 -8
- package/dist/src/{providerRegistry-wCWd7sKQ.js → providerRegistry-CD8MEar9.js} +7 -8
- package/dist/src/{providerRegistry-lc7a7utN.cjs → providerRegistry-Civky8Ar.cjs} +12 -13
- package/dist/src/providerRegistry-DM8rZYol.js +45 -0
- package/dist/src/providers-B3HvufyI.js +33246 -0
- package/dist/src/{providers-BiNq_Iyc.js → providers-BKRJTjBz.js} +1743 -1795
- package/dist/src/providers-C1rOSHiR.js +32 -0
- package/dist/src/{providers-BlEhY5mi.js → providers-CFLy1_ji.js} +1750 -1802
- package/dist/src/{providers-BNKVY53V.cjs → providers-CFu-TZl-.cjs} +2111 -2163
- package/dist/src/providers-CxmDwEFf.cjs +31 -0
- package/dist/src/providers-Dodakqr0.js +30 -0
- package/dist/src/providers-GIQ2TcsA.js +30 -0
- package/dist/src/{pythonUtils-r1uBuA0n.js → pythonUtils-C3py6GC1.js} +18 -19
- package/dist/src/{pythonUtils-DZ6EbdY4.cjs → pythonUtils-CTU3Y3lw.cjs} +42 -43
- package/dist/src/{pythonUtils-vMlk9Qp5.js → pythonUtils-D5nxkQ0P.js} +18 -19
- package/dist/src/pythonUtils-D6fwaDSg.js +249 -0
- package/dist/src/quiverai-C2jVwbH1.js +213 -0
- package/dist/src/quiverai-CI6gYJVI.js +213 -0
- package/dist/src/quiverai-CLkWkyZc.cjs +213 -0
- package/dist/src/quiverai-MHSxbmmZ.js +215 -0
- package/dist/src/{render-CAZvKKkB.js → render-Drod8m7K.js} +4 -5
- package/dist/src/{responses-DLLjADw5.js → responses-BKqJmhhc.js} +34 -27
- package/dist/src/{responses-TsdODUpm.js → responses-CGw0DCzh.js} +34 -27
- package/dist/src/responses-jxdehPkC.js +660 -0
- package/dist/src/{responses-zOtKtnY_.cjs → responses-tD4Bd4dc.cjs} +49 -42
- package/dist/src/rubyUtils-BUHu6PhO.js +5 -0
- package/dist/src/{rubyUtils-Cs35SDYa.js → rubyUtils-BUVePouc.js} +27 -20
- package/dist/src/rubyUtils-BcuGX77l.js +222 -0
- package/dist/src/{rubyUtils-BtjlqyXt.js → rubyUtils-Boc4HZzX.js} +18 -19
- package/dist/src/rubyUtils-CP42kMvq.cjs +4 -0
- package/dist/src/{rubyUtils-DCVaJ3mc.cjs → rubyUtils-DhCAlxZr.cjs} +48 -50
- package/dist/src/{sagemaker-Du4LIR97.js → sagemaker-BK4Zb993.js} +75 -70
- package/dist/src/{sagemaker-CLdUAv5z.js → sagemaker-BfiWTmvn.js} +77 -77
- package/dist/src/{sagemaker-DwNnEVYt.cjs → sagemaker-CcQHM1jV.cjs} +75 -76
- package/dist/src/{sagemaker-BcgLu0U4.js → sagemaker-D2Q1c-sD.js} +75 -79
- package/dist/src/{scanner-Dyw21Wg_.js → scanner-J8CA3LsV.js} +149 -122
- package/dist/src/server/index.js +5620 -67302
- package/dist/src/{server-CgUQ25qW.cjs → server-B0PPuDw-.cjs} +57 -67
- package/dist/src/server-B1vi21hA.js +7 -0
- package/dist/src/{server-CbMTRQkg.js → server-BC7XJFgr.js} +19 -24
- package/dist/src/server-Cm9Kai_h.cjs +5 -0
- package/dist/src/{server-DWmZLfCy.js → server-DbFphssR.js} +26 -29
- package/dist/src/server-OAs3nBRT.js +229 -0
- package/dist/src/{signal-Bl32q42d.js → signal-BOTbd53Z.js} +9 -11
- package/dist/src/{slack-BtMkB6xP.cjs → slack-BmVAVGaK.cjs} +7 -8
- package/dist/src/{slack-OZYxoVON.js → slack-DCUPTzS2.js} +8 -8
- package/dist/src/{slack-DPqj42Ts.js → slack-DOdy_kyv.js} +7 -8
- package/dist/src/{slack-BfdBx2tO.js → slack-DXMKtA-f.js} +7 -9
- package/dist/src/store-BNmZ1KAz.cjs +5 -0
- package/dist/src/{store-BqwfFEyF.cjs → store-BSc-TF2w.cjs} +44 -45
- package/dist/src/store-BltJg2cd.js +6 -0
- package/dist/src/{store-D4gdn9ih.js → store-D1tv90v3.js} +34 -35
- package/dist/src/{store-2ocbYY9D.js → store-DQLEjuEO.js} +40 -36
- package/dist/src/store-Ub2vaGJ1.js +228 -0
- package/dist/src/{tables-D-NSwNIb.js → tables-5EvT_Bwn.js} +23 -23
- package/dist/src/{tables-B9E1kRp-.cjs → tables-C7K-XKWp.cjs} +93 -93
- package/dist/src/{tables-C7TT2XVn.js → tables-D36WTqKX.js} +25 -25
- package/dist/src/tables-xKANLRBD.js +288 -0
- package/dist/src/telemetry-5BCRNBbe.cjs +5 -0
- package/dist/src/{telemetry-DZ_7PaVq.js → telemetry-C15ziL8u.js} +17 -14
- package/dist/src/{telemetry-BXyVqyAg.js → telemetry-C2YDkUQH.js} +11 -13
- package/dist/src/{telemetry-D0_yFdtU.cjs → telemetry-CbrnxHp_.cjs} +21 -24
- package/dist/src/telemetry-D4W5hboe.js +7 -0
- package/dist/src/telemetry-DMb2Mpfm.js +171 -0
- package/dist/src/{text-Dm78AVGG.js → text-B_UCRPp2.js} +2 -2
- package/dist/src/{text-DF2hMKdg.cjs → text-CW1cyrwj.cjs} +12 -13
- package/dist/src/{text-DgMr_tiM.js → text-Db-Wt2u2.js} +2 -2
- package/dist/src/text-TIv0QYnd.js +22 -0
- package/dist/src/{tokenUsageUtils-FZd5O_4A.js → tokenUsageUtils-BDGe-iyI.js} +2 -2
- package/dist/src/{tokenUsageUtils-DmZSD2eU.js → tokenUsageUtils-DflFMjS0.js} +2 -2
- package/dist/src/tokenUsageUtils-NYT-WKS6.js +138 -0
- package/dist/src/{tokenUsageUtils-CXhxVj72.cjs → tokenUsageUtils-bVa1ga6f.cjs} +32 -33
- package/dist/src/{transcription-FNIz3YOe.cjs → transcription-CL78qbOU.cjs} +14 -15
- package/dist/src/{transcription-C-M81iDA.js → transcription-DAtxHhAM.js} +14 -7
- package/dist/src/{transcription-CYuY5sFO.js → transcription-LNZTNUUL.js} +14 -16
- package/dist/src/{transcription-Ch7S-LWw.js → transcription-QHh3AH6Z.js} +15 -17
- package/dist/src/{transform-CoP2bJ7P.js → transform-Cgi24fJ7.js} +94 -66
- package/dist/src/{transform-Kd6u-oNm.cjs → transform-CzK1Q0zl.cjs} +24 -26
- package/dist/src/{transform-D8dILpfZ.js → transform-DECvGmzp.js} +15 -13
- package/dist/src/{transform-DMaxQwDx.js → transform-DGLazrMm.js} +94 -66
- package/dist/src/transform-DGxXocjk.js +1506 -0
- package/dist/src/{transform-ivxEY4f7.cjs → transform-DOcQeLld.cjs} +234 -206
- package/dist/src/transform-DTGDnAzW.js +6 -0
- package/dist/src/{transform-CqTFr7KR.js → transform-DilY9wbS.js} +10 -12
- package/dist/src/transform-aa6tmVpZ.js +216 -0
- package/dist/src/transform-m3qNw4KP.cjs +5 -0
- package/dist/src/{transformersAvailability-DEU2naS1.js → transformersAvailability-CEVM2GNQ.js} +2 -2
- package/dist/src/{transformersAvailability-Bkep3ka7.cjs → transformersAvailability-CwayUSlh.cjs} +2 -3
- package/dist/src/{transformersAvailability-DwmezkVe.js → transformersAvailability-D6c6ROpT.js} +2 -2
- package/dist/src/{types-t52w-XsS.js → types-CH3Ge2sE.js} +103 -92
- package/dist/src/{types-DMVjYLpx.js → types-CLKiCBW3.js} +98 -91
- package/dist/src/types-CN_TZ2GJ.js +3260 -0
- package/dist/src/{types-BIfttHrT.cjs → types-LJ0r3wbR.cjs} +573 -566
- package/dist/src/util-5cB-L7U3.js +1430 -0
- package/dist/src/util-6-GqIvzS.js +599 -0
- package/dist/src/{util-vjscpUzy.js → util-B7T3SiBS.js} +5 -6
- package/dist/src/{util-Cl0zfT3V.js → util-Betm42rL.js} +44 -17
- package/dist/src/{util-CUEt0Vum.js → util-C-PPYSMq.js} +44 -17
- package/dist/src/{util-DkFTvieG.cjs → util-CchiqXh_.cjs} +35 -36
- package/dist/src/{util-mJ58qbbw.js → util-DaWTWKBK.js} +5 -6
- package/dist/src/{util-C08Kns6-.cjs → util-Db0a0AFH.cjs} +89 -62
- package/dist/src/{util-DiCePfDu.js → util-Dlz_Wvgm.js} +102 -53
- package/dist/src/{util-BSh4a_Q8.js → util-YT5HPZaS.js} +102 -53
- package/dist/src/{util-DUYOvxAy.cjs → util-Yz-1aEhW.cjs} +274 -219
- package/dist/src/util-ZZH-3QZz.js +293 -0
- package/dist/src/{utils-DFaZa6Rf.cjs → utils-Cz9qXqII.cjs} +32 -35
- package/dist/src/{utils-CVzb4YiI.js → utils-XiOAgly5.js} +4 -7
- package/dist/src/utils-dLokC-eR.js +94 -0
- package/dist/src/{utils-JaY9veb5.js → utils-f2-Moju7.js} +4 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +59 -53
- package/dist/src/app/assets/index-BOgkICuY.css +0 -1
- package/dist/src/app/assets/index-CSgqn_Vd.js +0 -428
- package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
- package/dist/src/base-BaXmtXYp.js +0 -107
- package/dist/src/base-Dtp8b4_N.js +0 -106
- package/dist/src/base-f71xxWai.cjs +0 -111
- package/dist/src/cache-BUPcq0Ad.js +0 -6
- package/dist/src/cache-CVfRb-HD.cjs +0 -6
- package/dist/src/cache-O4EuX2JV.js +0 -8
- package/dist/src/chunk-DHDDz29n.js +0 -22
- package/dist/src/chunk-FhC4c-0y.js +0 -21
- package/dist/src/cloud-CZ4hytdm.js +0 -5
- package/dist/src/eval-CKHWqG9f.js +0 -16
- package/dist/src/evalResult-CxTP-LMm.cjs +0 -11
- package/dist/src/evalResult-CzLURDcP.js +0 -13
- package/dist/src/evalResult-DyttNQ_G.js +0 -11
- package/dist/src/evaluator-0PvfeBYh.js +0 -38
- package/dist/src/fetch-Bi0o-fdp.js +0 -4
- package/dist/src/fetch-CMptBDVg.cjs +0 -4
- package/dist/src/fetch-DAZkv3gV.js +0 -6
- package/dist/src/graders-BCytzXrb.js +0 -34
- package/dist/src/graders-CGZQShfJ.cjs +0 -33
- package/dist/src/graders-spkuVC-E.js +0 -36
- package/dist/src/opencode-sdk-CImWVqy9.js +0 -382
- package/dist/src/opencode-sdk-CuCztr4P.js +0 -380
- package/dist/src/opencode-sdk-DhcfRbBH.js +0 -376
- package/dist/src/opencode-sdk-mqF-Oj3f.cjs +0 -383
- package/dist/src/providers-BMZZmPBJ.cjs +0 -32
- package/dist/src/providers-CQQrNaJk.js +0 -32
- package/dist/src/providers-Ck8HyrC-.js +0 -34
- package/dist/src/quiverai-BNfIwKCO.cjs +0 -54
- package/dist/src/quiverai-BQigKdIH.js +0 -57
- package/dist/src/quiverai-Bfy2WnE2.js +0 -55
- package/dist/src/quiverai-CedIP0PJ.js +0 -43
- package/dist/src/rubyUtils-D7--T12C.js +0 -6
- package/dist/src/rubyUtils-DRRiMFV2.js +0 -5
- package/dist/src/rubyUtils-vb8OYFC-.cjs +0 -5
- package/dist/src/server-BUbS0Qfh.js +0 -6
- package/dist/src/server-XpGXFHkS.cjs +0 -6
- package/dist/src/server-gfOx5Zrk.js +0 -8
- package/dist/src/store-5u2yriTV.js +0 -7
- package/dist/src/store-D_lq_8oQ.js +0 -6
- package/dist/src/store-m5KT6Ly7.cjs +0 -6
- package/dist/src/telemetry-5RHFoCJh.js +0 -6
- package/dist/src/telemetry-Do8wMnA-.js +0 -8
- package/dist/src/telemetry-LojxPoFq.cjs +0 -6
- package/dist/src/transform-8eGmaH-7.js +0 -7
- package/dist/src/transform-BRVvWaG4.cjs +0 -6
- package/dist/src/transform-GybT0X0u.js +0 -8
- package/dist/src/transformersAvailability-DkAWaK5B.js +0 -35
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{r as w,g as Qt,a as kc,b as wm,R as cx}from"./vendor-react-AtKqiNEf.js";function Sm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Sm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ze(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Sm(e))&&(r&&(r+=" "),r+=t);return r}var ux="Invariant failed";function YR(e,t){if(!e)throw new Error(ux)}function oi(e){return e+.5|0}const $t=(e,t,n)=>Math.max(Math.min(e,n),t);function Dr(e){return $t(oi(e*2.55),0,255)}function Vt(e){return $t(oi(e*255),0,255)}function Ot(e){return $t(oi(e/2.55)/100,0,1)}function hf(e){return $t(oi(e*100),0,100)}const Ye={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},Cl=[..."0123456789ABCDEF"],fx=e=>Cl[e&15],dx=e=>Cl[(e&240)>>4]+Cl[e&15],Oi=e=>(e&240)>>4===(e&15),hx=e=>Oi(e.r)&&Oi(e.g)&&Oi(e.b)&&Oi(e.a);function px(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Ye[e[1]]*17,g:255&Ye[e[2]]*17,b:255&Ye[e[3]]*17,a:t===5?Ye[e[4]]*17:255}:(t===7||t===9)&&(n={r:Ye[e[1]]<<4|Ye[e[2]],g:Ye[e[3]]<<4|Ye[e[4]],b:Ye[e[5]]<<4|Ye[e[6]],a:t===9?Ye[e[7]]<<4|Ye[e[8]]:255})),n}const gx=(e,t)=>e<255?t(e):"";function mx(e){var t=hx(e)?fx:dx;return e?"#"+t(e.r)+t(e.g)+t(e.b)+gx(e.a,t):void 0}const vx=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Om(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function yx(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function bx(e,t,n){const r=Om(e,1,.5);let 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 xx(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 Cc(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;let l,c,u;return a!==o&&(u=a-o,c=s>.5?u/(2-a-o):u/(a+o),l=xx(n,r,i,u,a),l=l*60+.5),[l|0,c||0,s]}function Ec(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Vt)}function Dc(e,t,n){return Ec(Om,e,t,n)}function _x(e,t,n){return Ec(bx,e,t,n)}function wx(e,t,n){return Ec(yx,e,t,n)}function Pm(e){return(e%360+360)%360}function Sx(e){const t=vx.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Dr(+t[5]):Vt(+t[5]));const i=Pm(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=_x(i,a,o):t[1]==="hsv"?r=wx(i,a,o):r=Dc(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Ox(e,t){var n=Cc(e);n[0]=Pm(n[0]+t),n=Dc(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Px(e){if(!e)return;const t=Cc(e),n=t[0],r=hf(t[1]),i=hf(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ot(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const pf={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"},gf={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 Mx(){const e={},t=Object.keys(gf),n=Object.keys(pf);let 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,pf[a]);a=parseInt(gf[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let Pi;function Ax(e){Pi||(Pi=Mx(),Pi.transparent=[0,0,0,0]);const t=Pi[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const kx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Cx(e){const t=kx.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?Dr(o):$t(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?Dr(r):$t(r,0,255)),i=255&(t[4]?Dr(i):$t(i,0,255)),a=255&(t[6]?Dr(a):$t(a,0,255)),{r,g:i,b:a,a:n}}}function Ex(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ot(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Wo=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Nn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Dx(e,t,n){const r=Nn(Ot(e.r)),i=Nn(Ot(e.g)),a=Nn(Ot(e.b));return{r:Vt(Wo(r+n*(Nn(Ot(t.r))-r))),g:Vt(Wo(i+n*(Nn(Ot(t.g))-i))),b:Vt(Wo(a+n*(Nn(Ot(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Mi(e,t,n){if(e){let r=Cc(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Dc(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Mm(e,t){return e&&Object.assign(t||{},e)}function mf(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=Vt(e[3]))):(t=Mm(e,{r:0,g:0,b:0,a:1}),t.a=Vt(t.a)),t}function Tx(e){return e.charAt(0)==="r"?Cx(e):Sx(e)}let Am=class El{constructor(t){if(t instanceof El)return t;const n=typeof t;let r;n==="object"?r=mf(t):n==="string"&&(r=px(t)||Ax(t)||Tx(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=Mm(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=mf(t)}rgbString(){return this._valid?Ex(this._rgb):void 0}hexString(){return this._valid?mx(this._rgb):void 0}hslString(){return this._valid?Px(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,s=2*o-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,r.r=255&c*r.r+a*i.r+.5,r.g=255&c*r.g+a*i.g+.5,r.b=255&c*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Dx(this._rgb,t._rgb,n)),this}clone(){return new El(this.rgb)}alpha(t){return this._rgb.a=Vt(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=oi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Mi(this._rgb,2,t),this}darken(t){return Mi(this._rgb,2,-t),this}saturate(t){return Mi(this._rgb,1,t),this}desaturate(t){return Mi(this._rgb,1,-t),this}rotate(t){return Ox(this._rgb,t),this}};function _t(){}const Ix=(()=>{let e=0;return()=>e++})();function H(e){return e==null}function me(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function $(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Qe(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function lt(e,t){return Qe(e)?e:t}function V(e,t){return typeof e>"u"?t:e}const jx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,km=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function le(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Y(e,t,n,r){let i,a,o;if(me(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if($(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function sa(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 la(e){if(me(e))return e.map(la);if($(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=la(e[n[i]]);return t}return e}function Cm(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Rx(e,t,n,r){if(!Cm(e))return;const i=t[e],a=n[e];$(i)&&$(a)?$r(i,a,r):t[e]=la(a)}function $r(e,t,n){const r=me(t)?t:[t],i=r.length;if(!$(e))return e;n=n||{};const a=n.merger||Rx;let o;for(let s=0;s<i;++s){if(o=r[s],!$(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)a(l[c],e,o,n)}return e}function Lr(e,t){return $r(e,t,{merger:Lx})}function Lx(e,t,n){if(!Cm(e))return;const r=t[e],i=n[e];$(r)&&$(i)?Lr(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=la(i))}const vf={"":e=>e,x:e=>e.x,y:e=>e.y};function Nx(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function Fx(e){const t=Nx(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Yt(e,t){return(vf[t]||(vf[t]=Fx(t)))(e)}function Tc(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Wr=e=>typeof e<"u",Xt=e=>typeof e=="function",yf=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Bx(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const de=Math.PI,Re=2*de,zx=Re+de,ca=Number.POSITIVE_INFINITY,$x=de/180,$e=de/2,cn=de/4,bf=de*2/3,Em=Math.log10,vt=Math.sign;function Nr(e,t,n){return Math.abs(e-t)<n}function xf(e){const t=Math.round(e);e=Nr(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Em(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Wx(e){const t=[],n=Math.sqrt(e);let 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((i,a)=>i-a).pop(),t}function qx(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Hn(e){return!qx(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Ux(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Vx(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 ht(e){return e*(de/180)}function Hx(e){return e*(180/de)}function _f(e){if(!Qe(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Kx(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a<-.5*de&&(a+=Re),{angle:a,distance:i}}function Dl(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Yx(e,t){return(e-t+zx)%Re-de}function Ft(e){return(e%Re+Re)%Re}function ua(e,t,n,r){const i=Ft(e),a=Ft(t),o=Ft(n),s=Ft(a-i),l=Ft(o-i),c=Ft(i-a),u=Ft(i-o);return i===a||i===o||r&&a===o||s>l&&c<u}function We(e,t,n){return Math.max(t,Math.min(n,e))}function Xx(e){return We(e,-32768,32767)}function Tl(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Ic(e,t,n){n=n||(o=>e[o]<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}}const yn=(e,t,n,r)=>Ic(e,n,r?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),Gx=(e,t,n)=>Ic(e,n,r=>e[r][t]>=n);function Zx(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}const Dm=["push","pop","shift","splice","unshift"];function Qx(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Dm.forEach(n=>{const r="_onData"+Tc(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...a)}),o}})})}function wf(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Dm.forEach(a=>{delete e[a]}),delete e._chartjs)}function Tm(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Im=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function jm(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Im.call(window,()=>{r=!1,e.apply(t,n)}))}}function Jx(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const e_=e=>e==="start"?"left":e==="end"?"right":"center",Sf=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2;function Rm(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:f,max:d,minDefined:h,maxDefined:p}=o.getUserBounds();if(h){if(i=Math.min(yn(l,u,f).lo,n?r:yn(t,u,o.getPixelForValue(f)).lo),c){const m=l.slice(0,i+1).reverse().findIndex(g=>!H(g[s.axis]));i-=Math.max(0,m)}i=We(i,0,r-1)}if(p){let m=Math.max(yn(l,o.axis,d,!0).hi+1,n?0:yn(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const g=l.slice(m-1).findIndex(v=>!H(v[s.axis]));m+=Math.max(0,g)}a=We(m,i,r)-i}else a=r-i}return{start:i,count:a}}function Lm(e){const{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;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const Ai=e=>e===0||e===1,Of=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Re/n)),Pf=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Re/n)+1,Fr={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-=1)*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-=1)*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-=1)*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*$e)+1,easeOutSine:e=>Math.sin(e*$e),easeInOutSine:e=>-.5*(Math.cos(de*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Ai(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Ai(e)?e:Of(e,.075,.3),easeOutElastic:e=>Ai(e)?e:Pf(e,.075,.3),easeInOutElastic(e){return Ai(e)?e:e<.5?.5*Of(e*2,.1125,.45):.5+.5*Pf(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+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-Fr.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Fr.easeInBounce(e*2)*.5:Fr.easeOutBounce(e*2-1)*.5+.5};function jc(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Mf(e){return jc(e)?e:new Am(e)}function qo(e){return jc(e)?e:new Am(e).saturate(.5).darken(.1).hexString()}const t_=["x","y","borderWidth","radius","tension"],n_=["color","borderColor","backgroundColor"];function r_(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:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:n_},numbers:{type:"number",properties:t_}}),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:t=>t|0}}}})}function i_(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Af=new Map;function a_(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Af.get(n);return r||(r=new Intl.NumberFormat(e,t),Af.set(n,r)),r}function Ja(e,t,n){return a_(t,n).format(e)}const o_={values(e){return me(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=s_(e,n)}const o=Em(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Ja(e,r,l)}};function s_(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 Nm={formatters:o_};function l_(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:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.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:Nm.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:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const An=Object.create(null),Il=Object.create(null);function Br(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const a=n[r];e=e[a]||(e[a]=Object.create(null))}return e}function Uo(e,t,n){return typeof t=="string"?$r(Br(e,t),n):$r(Br(e,""),t)}class c_{constructor(t,n){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=r=>r.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=(r,i)=>qo(i.backgroundColor),this.hoverBorderColor=(r,i)=>qo(i.borderColor),this.hoverColor=(r,i)=>qo(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Uo(this,t,n)}get(t){return Br(this,t)}describe(t,n){return Uo(Il,t,n)}override(t,n){return Uo(An,t,n)}route(t,n,r,i){const a=Br(this,t),o=Br(this,r),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=o[i];return $(l)?Object.assign({},c,l):V(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var ae=new c_({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[r_,i_,l_]);function u_(e){return!e||H(e.size)||H(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function kf(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 un(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Cf(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function jl(e,t,n,r){f_(e,t,n,r)}function f_(e,t,n,r,i){let a,o,s,l,c,u,f,d;const h=t.pointStyle,p=t.rotation,m=t.radius;let g=(p||0)*$x;if(h&&typeof h=="object"&&(a=h.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:e.arc(n,r,m,0,Re),e.closePath();break;case"triangle":u=m,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=bf,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=bf,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(g+cn)*l,f=Math.cos(g+cn)*l,s=Math.sin(g+cn)*l,d=Math.sin(g+cn)*l,e.arc(n-f,r-s,c,g-de,g-$e),e.arc(n+d,r-o,c,g-$e,g),e.arc(n+f,r+s,c,g,g+$e),e.arc(n-d,r+o,c,g+$e,g+de),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,u=l,e.rect(n-u,r-l,2*u,2*l);break}g+=cn;case"rectRot":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+d,r-o),e.lineTo(n+f,r+s),e.lineTo(n-d,r+o),e.closePath();break;case"crossRot":g+=cn;case"cross":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"star":f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o),g+=cn,f=Math.cos(g)*m,o=Math.cos(g)*m,s=Math.sin(g)*m,d=Math.sin(g)*m,e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"line":o=Math.cos(g)*m,s=Math.sin(g)*m,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)*m,r+Math.sin(g)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function qr(e,t,n){return n=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 Fm(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Bm(e){e.restore()}function d_(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function h_(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 p_(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),H(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 g_(e,t,n,r,i){if(i.strikethrough||i.underline){const a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function m_(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ef(e,t,n,r,i,a={}){const o=me(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,p_(e,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&m_(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),H(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,r,a.maxWidth)),e.fillText(c,n,r,a.maxWidth),g_(e,n,r,c,a),r+=Number(i.lineHeight);e.restore()}function Rl(e,t){const{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*de,de,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,de,$e,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,$e,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-$e,!0),e.lineTo(n+o.topLeft,r)}const v_=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,y_=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function b_(e,t){const n=(""+e).match(v_);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}const x_=e=>+e||0;function zm(e,t){const n={},r=$(t),i=r?Object.keys(t):t,a=$(e)?r?o=>V(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=x_(a(o));return n}function $m(e){return zm(e,{top:"y",right:"x",bottom:"y",left:"x"})}function zr(e){return zm(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(e){const t=$m(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function pt(e,t){e=e||{},t=t||ae.font;let n=V(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=V(e.style,t.style);r&&!(""+r).match(y_)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:V(e.family,t.family),lineHeight:b_(V(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:V(e.weight,t.weight),string:""};return i.string=u_(i),i}function ki(e,t,n,r){let i,a,o;for(i=0,a=e.length;i<a;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function __(e,t,n){const{min:r,max:i}=e,a=km(t,(i-r)/2),o=(s,l)=>n&&s===0?0:s+l;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function jn(e,t){return Object.assign(Object.create(e),t)}function Rc(e,t=[""],n,r,i=()=>e[0]){const a=n||e;typeof r>"u"&&(r=Vm("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:s=>Rc([s,...e],t,a,r)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return qm(s,l,()=>C_(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return Tf(s).includes(l)},ownKeys(s){return Tf(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Kn(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Wm(e,r),setContext:a=>Kn(e,a,n,r),override:a=>Kn(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,s){return qm(a,o,()=>S_(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,s){return e[o]=s,delete a[o],!0}})}function Wm(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Xt(n)?n:()=>n,isIndexable:Xt(r)?r:()=>r}}const w_=(e,t)=>e?e+Tc(t):t,Lc=(e,t)=>$(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function qm(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function S_(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e;let s=r[t];return Xt(s)&&o.isScriptable(t)&&(s=O_(t,s,e,n)),me(s)&&s.length&&(s=P_(t,s,e,o.isIndexable)),Lc(t,s)&&(s=Kn(s,i,a&&a[t],o)),s}function O_(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||r);return s.delete(e),Lc(e,l)&&(l=Nc(i._scopes,i,e,l)),l}function P_(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(typeof a.index<"u"&&r(e))return t[a.index%t.length];if($(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=Nc(c,i,e,u);t.push(Kn(f,a,o&&o[e],s))}}return t}function Um(e,t,n){return Xt(e)?e(t,n):e}const M_=(e,t)=>e===!0?t:typeof e=="string"?Yt(t,e):void 0;function A_(e,t,n,r,i){for(const a of t){const o=M_(n,a);if(o){e.add(o);const s=Um(o._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function Nc(e,t,n,r){const i=t._rootScopes,a=Um(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let l=Df(s,o,n,a||n,r);return l===null||typeof a<"u"&&a!==n&&(l=Df(s,o,a,l,r),l===null)?!1:Rc(Array.from(s),[""],i,a,()=>k_(t,n,r))}function Df(e,t,n,r,i){for(;n;)n=A_(e,t,n,r,i);return n}function k_(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return me(i)&&$(n)?n:i||{}}function C_(e,t,n,r){let i;for(const a of t)if(i=Vm(w_(a,e),n),typeof i<"u")return Lc(e,i)?Nc(n,r,e,i):i}function Vm(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Tf(e){let t=e._keys;return t||(t=e._keys=E_(e._scopes)),t}function E_(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function D_(e,t,n,r){const{iScale:i}=e,{key:a="r"}=this._parsing,o=new Array(r);let s,l,c,u;for(s=0,l=r;s<l;++s)c=s+n,u=t[c],o[s]={r:i.parse(Yt(u,a),c)};return o}const T_=Number.EPSILON||1e-14,Yn=(e,t)=>t<e.length&&!e[t].skip&&e[t],Hm=e=>e==="x"?"y":"x";function I_(e,t,n,r){const i=e.skip?t:e,a=t,o=n.skip?t:n,s=Dl(a,i),l=Dl(o,a);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=r*c,d=r*u;return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}}function j_(e,t,n){const r=e.length;let i,a,o,s,l,c=Yn(e,0);for(let u=0;u<r-1;++u)if(l=c,c=Yn(e,u+1),!(!l||!c)){if(Nr(t[u],0,T_)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],a=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),n[u]=i*o*t[u],n[u+1]=a*o*t[u])}}function R_(e,t,n="x"){const r=Hm(n),i=e.length;let a,o,s,l=Yn(e,0);for(let c=0;c<i;++c){if(o=s,s=l,l=Yn(e,c+1),!s)continue;const u=s[n],f=s[r];o&&(a=(u-o[n])/3,s[`cp1${n}`]=u-a,s[`cp1${r}`]=f-a*t[c]),l&&(a=(l[n]-u)/3,s[`cp2${n}`]=u+a,s[`cp2${r}`]=f+a*t[c])}}function L_(e,t="x"){const n=Hm(t),r=e.length,i=Array(r).fill(0),a=Array(r);let o,s,l,c=Yn(e,0);for(o=0;o<r;++o)if(s=l,l=c,c=Yn(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}a[o]=s?c?vt(i[o-1])!==vt(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}j_(e,i,a),R_(e,a,t)}function Ci(e,t,n){return Math.max(Math.min(e,n),t)}function N_(e,t){let n,r,i,a,o,s=qr(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&qr(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=Ci(i.cp1x,t.left,t.right),i.cp1y=Ci(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Ci(i.cp2x,t.left,t.right),i.cp2y=Ci(i.cp2y,t.top,t.bottom)))}function F_(e,t,n,r,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")L_(e,i);else{let c=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],l=I_(c,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&N_(e,n)}function Fc(){return typeof window<"u"&&typeof document<"u"}function Bc(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function fa(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}const eo=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function B_(e,t){return eo(e).getPropertyValue(t)}const z_=["top","right","bottom","left"];function Sn(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=z_[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const $_=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function W_(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let o=!1,s,l;if($_(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function hn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=eo(n),a=i.boxSizing==="border-box",o=Sn(i,"padding"),s=Sn(i,"border","width"),{x:l,y:c,box:u}=W_(e,n),f=o.left+(u&&s.left),d=o.top+(u&&s.top);let{width:h,height:p}=t;return a&&(h-=o.width+s.width,p-=o.height+s.height),{x:Math.round((l-f)/h*n.width/r),y:Math.round((c-d)/p*n.height/r)}}function q_(e,t,n){let r,i;if(t===void 0||n===void 0){const a=e&&Bc(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const o=a.getBoundingClientRect(),s=eo(a),l=Sn(s,"border","width"),c=Sn(s,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=fa(s.maxWidth,a,"clientWidth"),i=fa(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||ca,maxHeight:i||ca}}const Wt=e=>Math.round(e*10)/10;function U_(e,t,n,r){const i=eo(e),a=Sn(i,"margin"),o=fa(i.maxWidth,e,"clientWidth")||ca,s=fa(i.maxHeight,e,"clientHeight")||ca,l=q_(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=Sn(i,"border","width"),h=Sn(i,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=Wt(Math.min(c,o,l.maxWidth)),u=Wt(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Wt(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Wt(Math.floor(u*r))),{width:c,height:u}}function If(e,t,n){const r=t||1,i=Wt(e.height*r),a=Wt(e.width*r);e.height=Wt(e.height),e.width=Wt(e.width);const 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}const V_=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Fc()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function jf(e,t){const n=B_(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function pn(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function H_(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 K_(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=pn(e,i,n),s=pn(i,a,n),l=pn(a,t,n),c=pn(o,s,n),u=pn(s,l,n);return pn(c,u,n)}const Y_=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},X_=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Vo(e,t,n){return e?Y_(t,n):X_()}function G_(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 Z_(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Km(e){return e==="angle"?{between:ua,compare:Yx,normalize:Ft}:{between:Tl,compare:(t,n)=>t-n,normalize:t=>t}}function Rf({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 Q_(e,t,n){const{property:r,start:i,end:a}=n,{between:o,normalize:s}=Km(r),l=t.length;let{start:c,end:u,loop:f}=e,d,h;if(f){for(c+=l,u+=l,d=0,h=l;d<h&&o(s(t[c%l][r]),i,a);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:e.style}}function J_(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:l,normalize:c}=Km(r),{start:u,end:f,loop:d,style:h}=Q_(e,t,n),p=[];let m=!1,g=null,v,y,b;const _=()=>l(i,b,v)&&s(i,b)!==0,x=()=>s(a,v)===0||l(a,b,v),S=()=>m||_(),O=()=>!m||x();for(let M=u,E=u;M<=f;++M)y=t[M%o],!y.skip&&(v=c(y[r]),v!==b&&(m=l(v,i,a),g===null&&S()&&(g=s(v,i)===0?M:E),g!==null&&O()&&(p.push(Rf({start:g,end:M,loop:d,count:o,style:h})),g=null),E=M,b=v));return g!==null&&p.push(Rf({start:g,end:f,loop:d,count:o,style:h})),p}function ew(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const a=J_(r[i],e.points,t);a.length&&n.push(...a)}return n}function tw(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 nw(e,t,n,r){const i=e.length,a=[];let o=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,s.skip&&(t=l)),s=c}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function rw(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=tw(n,i,a,r);if(r===!0)return Lf(e,[{start:o,end:s,loop:a}],n,t);const l=s<o?s+i:s,c=!!e._fullLoop&&o===0&&s===i-1;return Lf(e,nw(n,o,l,c),n,t)}function Lf(e,t,n,r){return!r||!r.setContext||!n?t:iw(e,t,n,r)}function iw(e,t,n,r){const i=e._chart.getContext(),a=Nf(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,l=n.length,c=[];let u=a,f=t[0].start,d=f;function h(p,m,g,v){const y=s?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=y;for(;n[m%l].skip;)m+=y;p%l!==m%l&&(c.push({start:p%l,end:m%l,loop:g,style:v}),u=v,f=m%l)}}for(const p of t){f=s?f:p.start;let m=n[f%l],g;for(d=f+1;d<=p.end;d++){const v=n[d%l];g=Nf(r.setContext(jn(i,{type:"segment",p0:m,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),aw(g,u)&&h(f,d-1,p.loop,u),m=v,u=g}f<d-1&&h(f,d-1,p.loop,u)}return c}function Nf(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function aw(e,t){if(!t)return!1;const n=[],r=function(i,a){return jc(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Ei(e,t,n){return e.options.clip?e[n]:t[n]}function ow(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Ei(n,t,"left"),right:Ei(n,t,"right"),top:Ei(r,t,"top"),bottom:Ei(r,t,"bottom")}:t}function sw(e,t){const n=t._clip;if(n.disabled)return!1;const r=ow(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)}}class lw{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],o=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Im.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wt=new lw;const Ff="transparent",cw={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Mf(e||Ff),i=r.valid&&Mf(t||Ff);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class uw{constructor(t,n,r,i){const a=n[r];i=ki([t.to,i,a,t.from]);const o=ki([t.from,a,i]);this._active=!0,this._fn=t.fn||cw[t.type||typeof o],this._easing=Fr[t.easing]||Fr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,o=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=ki([t.to,n,i,t.from]),this._from=ki([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Ym{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!$(t))return;const n=Object.keys(ae.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!$(a))return;const o={};for(const s of n)o[s]=a[s];(me(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,o)})})}_animateOptions(t,n){const r=n.options,i=dw(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&fw(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(n),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let f=a[c];const d=r.get(c);if(f)if(d&&f.active()){f.update(d,u,s);continue}else f.cancel();if(!d||!d.duration){t[c]=u;continue}a[c]=f=new uw(d,t,c,u),i.push(f)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return wt.add(this._chart,r),!0}}function fw(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function dw(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 Bf(e,t){const 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 hw(e,t,n){if(n===!1)return!1;const r=Bf(e,n),i=Bf(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function pw(e){let t,n,r,i;return $(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 Xm(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function zf(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let o,s,l,c;if(t===null)return;let u=!1;for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===n){if(u=!0,r.all)continue;break}c=e.values[l],Qe(c)&&(a||t===0||vt(t)===vt(c))&&(t+=c)}return!u&&!r.all?0:t}function gw(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],s[l]={[i]:u,[a]:e[u]};return s}function Ho(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function mw(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function vw(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function yw(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function $f(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function Wf(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:s}=r,l=a.axis,c=o.axis,u=mw(a,o,r),f=t.length;let d;for(let h=0;h<f;++h){const p=t[h],{[l]:m,[c]:g}=p,v=p._stacks||(p._stacks={});d=v[c]=yw(i,u,m),d[s]=g,d._top=$f(d,o,!0,r.type),d._bottom=$f(d,o,!1,r.type);const y=d._visualValues||(d._visualValues={});y[s]=g}}function Ko(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function bw(e,t){return jn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function xw(e,t,n){return jn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function yr(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const Yo=e=>e==="reset"||e==="none",qf=(e,t)=>t?e:Object.assign({},e),_w=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Xm(n,!0),values:null};class ir{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ho(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&yr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,d,h,p)=>f==="x"?d:f==="r"?p:h,a=n.xAxisID=V(r.xAxisID,Ko(t,"x")),o=n.yAxisID=V(r.yAxisID,Ko(t,"y")),s=n.rAxisID=V(r.rAxisID,Ko(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,a,o,s),u=n.vAxisID=i(l,o,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&wf(this._data,this),t._stacked&&yr(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if($(n)){const i=this._cachedMeta;this._data=gw(n,i)}else if(r!==n){if(r){wf(r,this);const i=this._cachedMeta;yr(i),i._parsed=[]}n&&Object.isExtensible(n)&&Qx(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=Ho(n.vScale,n),n.stack!==r.stack&&(i=!0,yr(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&(Wf(this,n._parsed),n._stacked=Ho(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:o}=r,s=a.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,f,d;if(this._parsing===!1)r._parsed=i,r._sorted=!0,d=i;else{me(i[t])?d=this.parseArrayData(r,i,t,n):$(i[t])?d=this.parseObjectData(r,i,t,n):d=this.parsePrimitiveData(r,i,t,n);const h=()=>f[s]===null||c&&f[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=f=d[u],l&&(h()&&(l=!1),c=f);r._sorted=l}o&&Wf(this,d)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,c=a.getLabels(),u=a===o,f=new Array(i);let d,h,p;for(d=0,h=i;d<h;++d)p=d+r,f[d]={[s]:u||a.parse(c[p],p),[l]:o.parse(n[p],p)};return f}parseArrayData(t,n,r,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,c,u,f;for(l=0,c=i;l<c;++l)u=l+r,f=n[u],s[l]={x:a.parse(f[0],u),y:o.parse(f[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,f,d,h;for(u=0,f=i;u<f;++u)d=u+r,h=n[d],c[u]={x:a.parse(Yt(h,s),d),y:o.parse(Yt(h,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,o=n[t.axis],s={keys:Xm(i,!0),values:n._stacks[t.axis]._visualValues};return zf(s,o,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let o=a===null?NaN:a;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,o=zf(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,o=i.length,s=this._getOtherScale(t),l=_w(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=vw(s);let d,h;function p(){h=i[d];const m=h[s.axis];return!Qe(h[t.axis])||u>m||f<m}for(d=0;d<o&&!(!p()&&(this.updateRangeFromParsed(c,t,h,l),a));++d);if(a){for(d=o-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,o;for(i=0,a=n.length;i<a;++i)o=n[i][t.axis],Qe(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=pw(V(this.options.clip,hw(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,a,s,l),u=s;u<s+l;++u){const f=i[u];f.hidden||(f.active&&c?o.push(f):f.draw(t,a))}for(u=0;u<o.length;++u)o[u].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=xw(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=bw(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,o=t+"-"+n,s=a[o],l=this.enableOptionSharing&&Wr(r);if(s)return qf(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),u),h=Object.keys(ae.elements[t]),p=()=>this.getContext(r,i,n),m=c.resolveNamedOptions(d,h,p,f);return m.$shared&&(m.$shared=l,a[o]=Object.freeze(qf(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),d=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(d,this.getContext(t,r,n))}const c=new Ym(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Yo(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),o=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:o}}updateElement(t,n,r,i){Yo(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Yo(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,a=n.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,o=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=o;s--)c[s]=c[s-n]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&yr(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ww(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Tm(r.sort((i,a)=>i-a))}return e._cache.$bar}function Sw(e){const t=e.iScale,n=ww(t,e.type);let r=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(Wr(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]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return r}function Ow(e,t,n,r){const i=n.barThickness;let a,o;return H(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 Pw(e,t,n,r){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/r,ratio:n.barPercentage,start:c}}function Mw(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),s=Math.max(i,a);let l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:o,max:s}}function Gm(e,t,n,r){return me(e)?Mw(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Uf(e,t,n,r){const i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,l=[];let c,u,f,d;for(c=n,u=n+r;c<u;++c)d=t[c],f={},f[i.axis]=s||i.parse(o[c],c),l.push(Gm(d,f,a,c));return l}function Xo(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Aw(e,t,n){return e!==0?vt(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function kw(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 Cw(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:c,bottom:u}=kw(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(a[Vf(u,o,s,l)]=!0,i=c)),a[Vf(i,o,s,l)]=!0,e.borderSkipped=a}function Vf(e,t,n,r){return r?(e=Ew(e,t,n),e=Hf(e,n,t)):e=Hf(e,t,n),e}function Ew(e,t,n){return e===t?n:e===n?t:e}function Hf(e,t,n){return e==="start"?t:e==="end"?n:e}function Dw(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class XR extends ir{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(t,n,r,i){return Uf(t,n,r,i)}parseArrayData(t,n,r,i){return Uf(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,u=o.axis==="x"?s:l,f=[];let d,h,p,m;for(d=r,h=r+i;d<h;++d)m=n[d],p={},p[a.axis]=a.parse(Yt(m,c),d),f.push(Gm(Yt(m,u),p,o,d));return f}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),o=a._custom,s=Xo(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,i);for(let h=n;h<n+r;h++){const p=this.getParsed(h),m=a||H(p[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,u),v=(p._stacks||{})[s.axis],y={horizontal:c,base:m.base,enableBorderRadius:!v||Xo(p._custom)||o===v._top||o===v._bottom,x:c?m.head:g.center,y:c?g.center:m.head,height:c?g.size:Math.abs(m.size),width:c?Math.abs(m.size):g.size};d&&(y.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const b=y.options||t[h].options;Cw(y,b,v,o),Dw(y,b,u.ratio),this.updateElement(t[h],h,y,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),a=r.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const f=u._parsed.find(h=>h[r.axis]===l),d=f&&f[u.vScale.axis];if(H(d)||isNaN(d))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((a===!1||o.indexOf(u.stack)===-1||a===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[V(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,o;for(a=0,o=n.data.length;a<o;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const s=t.barThickness;return{min:s||Sw(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),c=l._custom,u=Xo(c);let f=l[n.axis],d=0,h=r?this.applyStack(n,l,r):f,p,m;h!==f&&(d=h-f,h=f),u&&(f=c.barStart,h=c.barEnd-c.barStart,f!==0&&vt(f)!==vt(c.barEnd)&&(d=0),d+=f);const g=!H(a)&&!u?a:d;let v=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(d+h):p=v,m=p-v,Math.abs(m)<o){m=Aw(m,n,s)*o,f===s&&(v-=m/2);const y=n.getPixelForDecimal(0),b=n.getPixelForDecimal(1),_=Math.min(y,b),x=Math.max(y,b);v=Math.max(Math.min(v,x),_),p=v+m,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(p)-n.getValueForPixel(v))}if(v===n.getPixelForValue(s)){const y=vt(m)*n.getLineWidthForValue(s)/2;v+=y,m-=y}return{size:m,base:v,head:p,center:p+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,o=V(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=a?this._getStackCount(t):n.stackCount,f=i.barThickness==="flex"?Pw(t,n,i,u*c):Ow(t,n,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(V(d,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+h;s=f.start+f.chunk*p+f.chunk/2,l=Math.min(o,f.chunk*f.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}}function Tw(e,t,n){let r=1,i=1,a=0,o=0;if(t<Re){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(b,_,x)=>ua(b,s,l,!0)?1:Math.max(_,_*n,x,x*n),p=(b,_,x)=>ua(b,s,l,!0)?-1:Math.min(_,_*n,x,x*n),m=h(0,c,f),g=h($e,u,d),v=p(de,c,f),y=p(de+$e,u,d);r=(m-v)/2,i=(g-y)/2,a=-(m+v)/2,o=-(g+y)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}class Iw extends ir{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:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,c)=>{const f=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:f.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(c),lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:f.borderWidth,strokeStyle:f.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(s||f.borderRadius),index:c}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if($(r[t])){const{key:l="value"}=this._parsing;a=c=>+Yt(r[c],l)}let o,s;for(o=t,s=t+n;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return ht(this.options.rotation-90)}_getCircumference(){return ht(this.options.circumference)}_getRotationExtents(){let t=Re,n=-Re;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),n=Math.max(n,a+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(jx(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:p,offsetY:m}=Tw(f,u,l),g=(r.width-o)/d,v=(r.height-o)/h,y=Math.max(Math.min(g,v)/2,0),b=km(this.options.radius,y),_=Math.max(b*l,0),x=(b-_)/this._getVisibleDatasetWeightTotal();this.offsetX=p*b,this.offsetY=m*b,i.total=this.calculateTotal(),this.outerRadius=b-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Re)}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,s=o.chartArea,c=o.options.animation,u=(s.left+s.right)/2,f=(s.top+s.bottom)/2,d=a&&c.animateScale,h=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,i);let v=this._getRotation(),y;for(y=0;y<n;++y)v+=this._circumference(y,a);for(y=n;y<n+r;++y){const b=this._circumference(y,a),_=t[y],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+b,circumference:b,outerRadius:p,innerRadius:h};g&&(x.options=m||this.resolveDataElementOptions(y,_.active?"active":i)),v+=b,this.updateElement(_,y,x,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Re*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Ja(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(V(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class GR extends ir{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(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:s,count:l}=Rm(n,i,o);this._drawStart=s,this._drawCount=l,Lm(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),d=o.axis,h=s.axis,{spanGaps:p,segment:m}=this.options,g=Hn(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",y=n+r,b=t.length;let _=n>0&&this.getParsed(n-1);for(let x=0;x<b;++x){const S=t[x],O=v?S:{};if(x<n||x>=y){O.skip=!0;continue}const M=this.getParsed(x),E=H(M[h]),j=O[d]=o.getPixelForValue(M[d],x),D=O[h]=a||E?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,M,l):M[h],x);O.skip=isNaN(j)||isNaN(D)||E,O.stop=x>0&&Math.abs(M[d]-_[d])>g,m&&(O.parsed=M,O.raw=c.data[x]),f&&(O.options=u||this.resolveDataElementOptions(x,S.active?"active":i)),v||this.updateElement(S,x,O,i),_=M}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class jw extends ir{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Ja(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,n,r,i){return D_.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),s=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,d=c.getIndexAngle(0)-.5*de;let h=d,p;const m=360/this.countVisibleElements();for(p=0;p<n;++p)h+=this._computeAngle(p,i,m);for(p=n;p<n+r;p++){const g=t[p];let v=h,y=h+this._computeAngle(p,i,m),b=o.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=y,a&&(l.animateScale&&(b=0),l.animateRotate&&(v=y=d));const _={x:u,y:f,innerRadius:0,outerRadius:b,startAngle:v,endAngle:y,options:this.resolveDataElementOptions(p,g.active?"active":i)};this.updateElement(g,p,_,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?ht(this.resolveDataElementOptions(t,n).angle||r):0}}class ZR extends ir{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(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=n,o=this.getParsed(t),s=i.getLabelForValue(o.x),l=a.getLabelForValue(o.y);return{label:r[t]||"",value:"("+s+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:o}=Rm(n,r,i);if(this._drawStart=a,this._drawCount=o,Lm(n)&&(a=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:l}=n;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),d=this.includeOptions(i,f),h=o.axis,p=s.axis,{spanGaps:m,segment:g}=this.options,v=Hn(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||i==="none";let b=n>0&&this.getParsed(n-1);for(let _=n;_<n+r;++_){const x=t[_],S=this.getParsed(_),O=y?x:{},M=H(S[p]),E=O[h]=o.getPixelForValue(S[h],_),j=O[p]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,S,l):S[p],_);O.skip=isNaN(E)||isNaN(j)||M,O.stop=_>0&&Math.abs(S[h]-b[h])>v,g&&(O.parsed=S,O.raw=c.data[_]),d&&(O.options=f||this.resolveDataElementOptions(_,x.active?"active":i)),y||this.updateElement(x,_,O,i),b=S}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,o)/2}}function fn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class zc{static override(t){Object.assign(zc.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return fn()}parse(){return fn()}format(){return fn()}add(){return fn()}diff(){return fn()}startOf(){return fn()}endOf(){return fn()}}var Rw={_date:zc};function Lw(e,t,n,r){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const c=s._reversePixels?Gx:yn;if(r){if(i._sharedOptions){const u=a[0],f=typeof u.getRange=="function"&&u.getRange(t);if(f){const d=c(a,t,n-f),h=c(a,t,n+f);return{lo:d.lo,hi:h.hi}}}}else{const u=c(a,t,n);if(l){const{vScale:f}=i._cachedMeta,{_parsed:d}=e,h=d.slice(0,u.lo+1).reverse().findIndex(m=>!H(m[f.axis]));u.lo-=Math.max(0,h);const p=d.slice(u.hi).findIndex(m=>!H(m[f.axis]));u.hi+=Math.max(0,p)}return u}}return{lo:0,hi:a.length-1}}function to(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:u}=a[s],{lo:f,hi:d}=Lw(a[s],t,o,i);for(let h=f;h<=d;++h){const p=u[h];p.skip||r(p,c,h)}}}function Nw(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function Go(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||to(e,n,t,function(s,l,c){!i&&!qr(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function Fw(e,t,n,r){let i=[];function a(o,s,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:f}=Kx(o,{x:t.x,y:t.y});ua(f,c,u)&&i.push({element:o,datasetIndex:s,index:l})}return to(e,n,t,a),i}function Bw(e,t,n,r,i,a){let o=[];const s=Nw(n);let l=Number.POSITIVE_INFINITY;function c(u,f,d){const h=u.inRange(t.x,t.y,i);if(r&&!h)return;const p=u.getCenterPoint(i);if(!(!!a||e.isPointInArea(p))&&!h)return;const g=s(t,p);g<l?(o=[{element:u,datasetIndex:f,index:d}],l=g):g===l&&o.push({element:u,datasetIndex:f,index:d})}return to(e,n,t,c),o}function Zo(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?Fw(e,t,n,i):Bw(e,t,n,r,i,a)}function Kf(e,t,n,r,i){const a=[],o=n==="x"?"inXRange":"inYRange";let s=!1;return to(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],i)&&(a.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:a}var zw={modes:{index(e,t,n,r){const i=hn(t,e),a=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?Go(e,i,a,r,o):Zo(e,i,a,!1,r,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=hn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let s=n.intersect?Go(e,i,a,r,o):Zo(e,i,a,!1,r,o);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=hn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return Go(e,i,a,r,o)},nearest(e,t,n,r){const i=hn(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return Zo(e,i,a,n.intersect,r,o)},x(e,t,n,r){const i=hn(t,e);return Kf(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=hn(t,e);return Kf(e,i,"y",n.intersect,r)}}};const Zm=["left","top","right","bottom"];function br(e,t){return e.filter(n=>n.pos===t)}function Yf(e,t){return e.filter(n=>Zm.indexOf(n.pos)===-1&&n.box.axis===t)}function xr(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function $w(e){const t=[];let 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 Ww(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!Zm.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function qw(e,t){const n=Ww(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function Uw(e){const t=$w(e),n=xr(t.filter(c=>c.box.fullSize),!0),r=xr(br(t,"left"),!0),i=xr(br(t,"right")),a=xr(br(t,"top"),!0),o=xr(br(t,"bottom")),s=Yf(t,"x"),l=Yf(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:br(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function Xf(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Qm(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 Vw(e,t,n,r){const{pos:i,box:a}=n,o=e.maxPadding;if(!$(i)){n.size&&(e[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?a.height:a.width),n.size=f.size/f.count,e[i]+=n.size}a.getPadding&&Qm(o,a.getPadding());const s=Math.max(0,t.outerWidth-Xf(o,e,"left","right")),l=Math.max(0,t.outerHeight-Xf(o,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Hw(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Kw(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],n[o])}),a}return r(e?["left","right"]:["top","bottom"])}function Tr(e,t,n,r){const i=[];let a,o,s,l,c,u;for(a=0,o=e.length,c=0;a<o;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,Kw(s.horizontal,t));const{same:f,other:d}=Vw(t,n,s,r);c|=f&&i.length,u=u||d,l.fullSize||i.push(s)}return c&&Tr(i,t,n,r)||u}function Di(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 Gf(e,t,n,r){const i=n.padding;let{x:a,y:o}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const f=t.w*u,d=c.size||l.height;Wr(c.start)&&(o=c.start),l.fullSize?Di(l,i.left,o,n.outerWidth-i.right-i.left,d):Di(l,t.left+c.placed,o,f,d),c.start=o,c.placed+=f,o=l.bottom}else{const f=t.h*u,d=c.size||l.width;Wr(c.start)&&(a=c.start),l.fullSize?Di(l,a,i.top,d,n.outerHeight-i.bottom-i.top):Di(l,a,t.top+c.placed,d,f),c.start=a,c.placed+=f,a=l.right}}t.x=a,t.y=o}var Ti={addBox(e,t){e.boxes||(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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const 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;const i=Gt(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),s=Uw(e.boxes),l=s.vertical,c=s.horizontal;Y(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},i);Qm(d,Gt(r));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),p=qw(l.concat(c),f);Tr(s.fullSize,h,f,p),Tr(l,h,f,p),Tr(c,h,f,p)&&Tr(l,h,f,p),Hw(h),Gf(s.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,Gf(s.rightAndBottom,h,f,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Y(s.chartArea,m=>{const g=m.box;Object.assign(g,e.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Jm{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Yw extends Jm{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ta="$chartjs",Xw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zf=e=>e===null||e==="";function Gw(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[ta]={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",Zf(i)){const a=jf(e,"width");a!==void 0&&(e.width=a)}if(Zf(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=jf(e,"height");a!==void 0&&(e.height=a)}return e}const ev=V_?{passive:!0}:!1;function Zw(e,t,n){e&&e.addEventListener(t,n,ev)}function Qw(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ev)}function Jw(e,t){const n=Xw[e.type]||e.type,{x:r,y:i}=hn(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function da(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function e1(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||da(s.addedNodes,r),o=o&&!da(s.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function t1(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||da(s.removedNodes,r),o=o&&!da(s.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ur=new Map;let Qf=0;function tv(){const e=window.devicePixelRatio;e!==Qf&&(Qf=e,Ur.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function n1(e,t){Ur.size||window.addEventListener("resize",tv),Ur.set(e,t)}function r1(e){Ur.delete(e),Ur.size||window.removeEventListener("resize",tv)}function i1(e,t,n){const r=e.canvas,i=r&&Bc(r);if(!i)return;const a=jm((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return o.observe(i),n1(e,a),o}function Qo(e,t,n){n&&n.disconnect(),t==="resize"&&r1(e)}function a1(e,t,n){const r=e.canvas,i=jm(a=>{e.ctx!==null&&n(Jw(a,e))},e);return Zw(r,t,i),i}class o1 extends Jm{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Gw(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[ta])return!1;const r=n[ta].initial;["height","width"].forEach(a=>{const o=r[a];H(o)?n.removeAttribute(a):n.setAttribute(a,o)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[ta],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:e1,detach:t1,resize:i1}[n]||a1;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Qo,detach:Qo,resize:Qo}[n]||Qw)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return U_(t,n,r,i)}isAttached(t){const n=t&&Bc(t);return!!(n&&n.isConnected)}}function s1(e){return!Fc()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Yw:o1}class ar{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Hn(this.x)&&Hn(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}function l1(e,t){const n=e.options.ticks,r=c1(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?f1(t):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return d1(t,c,a,o/i),c;const u=u1(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Ii(t,c,u,H(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Ii(t,c,u,a[f],a[f+1]);return Ii(t,c,u,l,H(h)?t.length:l+h),c}return Ii(t,c,u),c}function c1(e){const 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 u1(e,t,n){const r=h1(e),i=t.length/n;if(!r)return Math.max(i,1);const a=Wx(r);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function f1(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function d1(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 Ii(e,t,n,r,i){const a=V(r,0),o=Math.min(V(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=a;u<0;)s++,u=Math.round(a+s*n);for(c=Math.max(a,0);c<o;c++)c===u&&(t.push(e[c]),s++,u=Math.round(a+s*n))}function h1(e){const t=e.length;let 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}const p1=e=>e==="left"?"right":e==="right"?"left":e,Jf=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,ed=(e,t)=>Math.min(t||e,e);function td(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function g1(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-a,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>o+s)))return l}function m1(e,t){Y(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function _r(e){return e.drawTicks?e.tickLength:0}function nd(e,t){if(!e.display)return 0;const n=pt(e.font,t),r=Gt(e.padding);return(me(e.text)?e.text.length:1)*n.lineHeight+r.height}function v1(e,t){return jn(e,{scale:t,type:"scale"})}function y1(e,t,n){return jn(e,{tick:n,index:t,type:"tick"})}function b1(e,t,n){let r=e_(e);return(n&&t!=="right"||!n&&t==="right")&&(r=p1(r)),r}function x1(e,t,n,r){const{top:i,left:a,bottom:o,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,d,h,p;const m=o-i,g=s-a;if(e.isHorizontal()){if(h=Sf(r,a,s),$(n)){const v=Object.keys(n)[0],y=n[v];p=u[v].getPixelForValue(y)+m-t}else n==="center"?p=(c.bottom+c.top)/2+m-t:p=Jf(e,n,t);d=s-a}else{if($(n)){const v=Object.keys(n)[0],y=n[v];h=u[v].getPixelForValue(y)-g+t}else n==="center"?h=(c.left+c.right)/2-g+t:h=Jf(e,n,t);p=Sf(r,o,i),f=n==="left"?-$e:$e}return{titleX:h,titleY:p,maxWidth:d,rotation:f}}class or extends ar{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=lt(t,Number.POSITIVE_INFINITY),n=lt(n,Number.NEGATIVE_INFINITY),r=lt(r,Number.POSITIVE_INFINITY),i=lt(i,Number.NEGATIVE_INFINITY),{min:lt(t,r),max:lt(n,i),minDefined:Qe(t),maxDefined:Qe(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),a||(r=Math.max(r,o.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:lt(n,lt(r,n)),max:lt(r,lt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){le(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=__(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?td(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=l1(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){le(this.options.afterUpdate,[this])}beforeSetDimensions(){le(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(){le(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),le(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){le(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=le(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){le(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){le(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=ed(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let o=i,s,l,c;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,d=u.highest.height,h=We(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/r:h/(r-1),f+6>s&&(s=h/(r-(t.offset?.5:1)),l=this.maxHeight-_r(t.grid)-n.padding-nd(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=Hx(Math.min(Math.asin(We((u.highest.height+6)/s,-1,1)),Math.asin(We(l/c,-1,1))-Math.asin(We(d/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){le(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){le(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=nd(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=_r(a)+l):(t.height=this.maxHeight,t.width=_r(a)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=r.padding*2,p=ht(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(s){const v=r.mirror?0:g*f.width+m*d.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*f.width+g*d.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,g,m)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;l?c?(d=i*t.width,h=r*n.height):(d=r*t.height,h=i*n.width):a==="start"?h=n.width:a==="end"?d=t.width:a!=="inner"&&(d=t.width/2,h=n.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let u=n.height/2,f=t.height/2;a==="start"?(u=0,f=t.height):a==="end"&&(u=n.height,f=0),this.paddingTop=u+o,this.paddingBottom=f+o}}_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(){le(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)H(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=td(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(n/ed(n,r));let c=0,u=0,f,d,h,p,m,g,v,y,b,_,x;for(f=0;f<n;f+=l){if(p=t[f].label,m=this._resolveTickFontOptions(f),i.font=g=m.string,v=a[g]=a[g]||{data:{},gc:[]},y=m.lineHeight,b=_=0,!H(p)&&!me(p))b=kf(i,v.data,v.gc,b,p),_=y;else if(me(p))for(d=0,h=p.length;d<h;++d)x=p[d],!H(x)&&!me(x)&&(b=kf(i,v.data,v.gc,b,x),_+=y);o.push(b),s.push(_),c=Math.max(b,c),u=Math.max(_,u)}m1(a,n);const S=o.indexOf(c),O=s.indexOf(u),M=E=>({width:o[E]||0,height:s[E]||0});return{first:M(0),last:M(n-1),widest:M(S),highest:M(O),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Xx(this._alignToPixels?un(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=y1(this.getContext(),t,r))}return this.$context||(this.$context=v1(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=ht(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=_r(a),h=[],p=s.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(L){return un(r,L,m)};let y,b,_,x,S,O,M,E,j,D,A,N;if(o==="top")y=v(this.bottom),O=this.bottom-d,E=y-g,D=v(t.top)+g,N=t.bottom;else if(o==="bottom")y=v(this.top),D=t.top,N=v(t.bottom)-g,O=y+g,E=this.top+d;else if(o==="left")y=v(this.right),S=this.right-d,M=y-g,j=v(t.left)+g,A=t.right;else if(o==="right")y=v(this.left),j=t.left,A=v(t.right)-g,S=y+g,M=this.left+d;else if(n==="x"){if(o==="center")y=v((t.top+t.bottom)/2+.5);else if($(o)){const L=Object.keys(o)[0],F=o[L];y=v(this.chart.scales[L].getPixelForValue(F))}D=t.top,N=t.bottom,O=y+g,E=O+d}else if(n==="y"){if(o==="center")y=v((t.left+t.right)/2);else if($(o)){const L=Object.keys(o)[0],F=o[L];y=v(this.chart.scales[L].getPixelForValue(F))}S=y-g,M=S-d,j=t.left,A=t.right}const R=V(i.ticks.maxTicksLimit,f),T=Math.max(1,Math.ceil(f/R));for(b=0;b<f;b+=T){const L=this.getContext(b),F=a.setContext(L),oe=s.setContext(L),J=F.lineWidth,U=F.color,Me=oe.dash||[],se=oe.dashOffset,_e=F.tickWidth,re=F.tickColor,we=F.tickBorderDash||[],Se=F.tickBorderDashOffset;_=g1(this,b,l),_!==void 0&&(x=un(r,_,J),c?S=M=j=A=x:O=E=D=N=x,h.push({tx1:S,ty1:O,tx2:M,ty2:E,x1:j,y1:D,x2:A,y2:N,width:J,color:U,borderDash:Me,borderDashOffset:se,tickWidth:_e,tickColor:re,tickBorderDash:we,tickBorderDashOffset:Se}))}return this._ticksLength=f,this._borderValue=y,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=a,d=_r(r.grid),h=d+u,p=f?-u:h,m=-ht(this.labelRotation),g=[];let v,y,b,_,x,S,O,M,E,j,D,A,N="middle";if(i==="top")S=this.bottom-p,O=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+p,O=this._getXAxisLabelAlignment();else if(i==="left"){const T=this._getYAxisLabelAlignment(d);O=T.textAlign,x=T.x}else if(i==="right"){const T=this._getYAxisLabelAlignment(d);O=T.textAlign,x=T.x}else if(n==="x"){if(i==="center")S=(t.top+t.bottom)/2+h;else if($(i)){const T=Object.keys(i)[0],L=i[T];S=this.chart.scales[T].getPixelForValue(L)+h}O=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if($(i)){const T=Object.keys(i)[0],L=i[T];x=this.chart.scales[T].getPixelForValue(L)}O=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const R=this._getLabelSizes();for(v=0,y=s.length;v<y;++v){b=s[v],_=b.label;const T=a.setContext(this.getContext(v));M=this.getPixelForTick(v)+a.labelOffset,E=this._resolveTickFontOptions(v),j=E.lineHeight,D=me(_)?_.length:1;const L=D/2,F=T.color,oe=T.textStrokeColor,J=T.textStrokeWidth;let U=O;o?(x=M,O==="inner"&&(v===y-1?U=this.options.reverse?"left":"right":v===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||m!==0?A=-D*j+j/2:c==="center"?A=-R.highest.height/2-L*j+j:A=-R.highest.height+j/2:c==="near"||m!==0?A=j/2:c==="center"?A=R.highest.height/2-L*j:A=R.highest.height-D*j,f&&(A*=-1),m!==0&&!T.showLabelBackdrop&&(x+=j/2*Math.sin(m))):(S=M,A=(1-D)*j/2);let Me;if(T.showLabelBackdrop){const se=Gt(T.backdropPadding),_e=R.heights[v],re=R.widths[v];let we=A-se.top,Se=0-se.left;switch(N){case"middle":we-=_e/2;break;case"bottom":we-=_e;break}switch(O){case"center":Se-=re/2;break;case"right":Se-=re;break;case"inner":v===y-1?Se-=re:v>0&&(Se-=re/2);break}Me={left:Se,top:we,width:re+se.width,height:_e+se.height,color:T.backdropColor}}g.push({label:_,font:E,textOffset:A,options:{rotation:m,color:F,strokeColor:oe,strokeWidth:J,textAlign:U,textBaseline:N,translation:[x,S],backdrop:Me}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-ht(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(a=0,o=i.length;a<o;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),o=r.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,d;this.isHorizontal()?(c=un(t,this.left,o)-o/2,u=un(t,this.right,s)+s/2,f=d=l):(f=un(t,this.top,o)-o/2,d=un(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Fm(r,i);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,c=o.label,u=o.textOffset;Ef(r,c,0,u,l,s)}i&&Bm(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=pt(r.font),o=Gt(r.padding),s=r.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||$(n)?(l+=o.bottom,me(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:f,rotation:d}=x1(this,l,n,s);Ef(t,r.text,0,0,a,{color:r.color,maxWidth:f,rotation:d,textAlign:b1(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=V(t.grid&&t.grid.z,-1),i=V(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==or.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,o;for(a=0,o=n.length;a<o;++a){const s=n[a];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return pt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ji{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;S1(n)&&(r=this.register(n));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,_1(t,o,r),this.override&&ae.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in ae[i]&&(delete ae[i][r],this.override&&delete An[r])}}function _1(e,t,n){const r=$r(Object.create(null),[n?ae.get(n):{},ae.get(t),e.defaults]);ae.set(t,r),e.defaultRoutes&&w1(t,e.defaultRoutes),e.descriptors&&ae.describe(t,e.descriptors)}function w1(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),o=t[n].split("."),s=o.pop(),l=o.join(".");ae.route(a,i,l,s)})}function S1(e){return"id"in e&&"defaults"in e}class O1{constructor(){this.controllers=new ji(ir,"datasets",!0),this.elements=new ji(ar,"elements"),this.plugins=new ji(Object,"plugins"),this.scales=new ji(or,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):Y(i,o=>{const s=r||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,n,r){const i=Tc(t);le(r["before"+i],[],r),n[t](r),le(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var dt=new O1;class P1{constructor(){this._init=void 0}notify(t,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,i){i=i||{};for(const a of t){const o=a.plugin,s=o[r],l=[n,i,a.options];if(le(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=V(r.options&&r.options.plugins,{}),a=M1(r);return i===!1&&!n?[]:k1(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function M1(e){const t={},n=[],r=Object.keys(dt.plugins.items);for(let a=0;a<r.length;a++)n.push(dt.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function A1(e,t){return!t&&e===!1?null:e===!0?{}:e}function k1(e,{plugins:t,localIds:n},r,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,c=A1(r[l],i);c!==null&&a.push({plugin:s,options:C1(e.config,{plugin:s,local:n[l]},c,o)})}return a}function C1(e,{plugin:t,local:n},r,i){const 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 Ll(e,t){const n=ae.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function E1(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function D1(e,t){return e===t?"_index_":"_value_"}function rd(e){if(e==="x"||e==="y"||e==="r")return e}function T1(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Nl(e,...t){if(rd(e))return e;for(const n of t){const r=n.axis||T1(n.position)||e.length>1&&rd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function id(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function I1(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return id(e,"x",n[0])||id(e,"y",n[0])}return{}}function j1(e,t){const n=An[e.type]||{scales:{}},r=t.scales||{},i=Ll(e.type,t),a=Object.create(null);return Object.keys(r).forEach(o=>{const s=r[o];if(!$(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Nl(o,s,I1(o,e),ae.scales[s.type]),c=D1(l,i),u=n.scales||{};a[o]=Lr(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||Ll(s,t),u=(An[s]||{}).scales||{};Object.keys(u).forEach(f=>{const d=E1(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),Lr(a[h],[{axis:d},r[h],u[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];Lr(s,[ae.scales[s.type],ae.scale])}),a}function nv(e){const t=e.options||(e.options={});t.plugins=V(t.plugins,{}),t.scales=j1(e,t)}function rv(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function R1(e){return e=e||{},e.data=rv(e.data),nv(e),e}const ad=new Map,iv=new Set;function Ri(e,t){let n=ad.get(e);return n||(n=t(),ad.set(e,n),iv.add(n)),n}const wr=(e,t,n)=>{const r=Yt(t,n);r!==void 0&&e.add(r)};class L1{constructor(t){this._config=R1(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=rv(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),nv(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ri(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ri(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ri(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ri(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,o=this._cachedScopes(t,r),s=o.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(f=>wr(l,t,f))),u.forEach(f=>wr(l,i,f)),u.forEach(f=>wr(l,An[a]||{},f)),u.forEach(f=>wr(l,ae,f)),u.forEach(f=>wr(l,Il,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),iv.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,An[n]||{},ae.datasets[n]||{},{type:n},ae,Il]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=od(this._resolverCache,t,i);let l=o;if(F1(o,n)){a.$shared=!1,r=Xt(r)?r():r;const c=this.createResolver(t,r,s);l=Kn(o,r,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,r=[""],i){const{resolver:a}=od(this._resolverCache,t,r);return $(n)?Kn(a,n,void 0,i):a}}function od(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:Rc(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,a)),a}const N1=e=>$(e)&&Object.getOwnPropertyNames(e).some(t=>Xt(e[t]));function F1(e,t){const{isScriptable:n,isIndexable:r}=Wm(e);for(const i of t){const a=n(i),o=r(i),s=(o||a)&&e[i];if(a&&(Xt(s)||N1(s))||o&&me(s))return!0}return!1}var B1="4.5.1";const z1=["top","bottom","left","right","chartArea"];function sd(e,t){return e==="top"||e==="bottom"||z1.indexOf(e)===-1&&t==="x"}function ld(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function cd(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),le(n&&n.onComplete,[e],t)}function $1(e){const t=e.chart,n=t.options.animation;le(n&&n.onProgress,[e],t)}function av(e){return Fc()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const na={},ud=e=>{const t=av(e);return Object.values(na).filter(n=>n.canvas===t).pop()};function W1(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const o=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=o)}}}function q1(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class U1{static defaults=ae;static instances=na;static overrides=An;static registry=dt;static version=B1;static getChart=ud;static register(...t){dt.add(...t),fd()}static unregister(...t){dt.remove(...t),fd()}constructor(t,n){const r=this.config=new L1(n),i=av(t),a=ud(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||s1(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Ix(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=o,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 P1,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Jx(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],na[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}wt.listen(this,"complete",cd),wt.listen(this,"progress",$1),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return H(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return dt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():If(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Cf(this.canvas,this.ctx),this}stop(){return wt.stop(this),this}resize(t,n){wt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,a),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,If(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),le(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Y(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,s)=>(o[s]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const s=n[o],l=Nl(o,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Y(a,o=>{const s=o.options,l=s.id,c=Nl(l,s),u=V(s.type,o.dtype);(s.position===void 0||sd(s.position,c)!==sd(o.dposition))&&(s.position=o.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===u)f=r[l];else{const d=dt.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(s,t)}),Y(i,(o,s)=>{o||delete r[s]}),Y(r,o=>{Ti.configure(this,o,o.options),Ti.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(ld("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let o=this.getDatasetMeta(r);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=s,o.indexAxis=a.indexAxis||Ll(s,this.options),o.order=a.order||0,o.index=r,o.label=""+a.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=dt.getController(s),{datasetElementType:c,dataElementType:u}=ae.datasets[s];Object.assign(l,{dataElementType:dt.getElement(u),datasetElementType:c&&dt.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Y(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),d=!i&&a.indexOf(f)===-1;f.buildOrUpdateElements(d),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Y(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ld("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Y(this.scales,t=>{Ti.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!yf(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const o=r==="_removeElements"?-a:a;W1(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!yf(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ti.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Y(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Xt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(wt.has(this)?this.attached&&!wt.running(this)&&wt.start(this):(this.draw(),cd({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=sw(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Fm(n,i),t.controller.draw(),i&&Bm(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return qr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=zw.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=jn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);Wr(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(a,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),wt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Cf(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete na[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,o)=>{n.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};Y(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",a),r("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():o()}unbindEvents(){Y(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Y(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,o,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!sa(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),o=a(n,t),s=r?t:a(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,o=n,s=this._getActiveElements(t,i,r,o),l=Bx(t),c=q1(t,this._lastEvent,r,l);r&&(this._lastEvent=null,le(a.onHover,[t,s,this],this),l&&le(a.onClick,[t,s,this],this));const u=!sa(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}function fd(){return Y(U1.instances,e=>e._plugins.invalidate())}function ov(e,t,n=t){e.lineCap=V(n.borderCapStyle,t.borderCapStyle),e.setLineDash(V(n.borderDash,t.borderDash)),e.lineDashOffset=V(n.borderDashOffset,t.borderDashOffset),e.lineJoin=V(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=V(n.borderWidth,t.borderWidth),e.strokeStyle=V(n.borderColor,t.borderColor)}function V1(e,t,n){e.lineTo(n.x,n.y)}function H1(e){return e.stepped?d_:e.tension||e.cubicInterpolationMode==="monotone"?h_:V1}function sv(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,l=Math.max(i,o),c=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function K1(e,t,n,r){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:c}=sv(i,n,r),u=H1(a);let{move:f=!0,reverse:d}=r||{},h,p,m;for(h=0;h<=c;++h)p=i[(s+(d?c-h:h))%o],!p.skip&&(f?(e.moveTo(p.x,p.y),f=!1):u(e,m,p,d,a.stepped),m=p);return l&&(p=i[(s+(d?c:0))%o],u(e,m,p,d,a.stepped)),!!l}function Y1(e,t,n,r){const i=t.points,{count:a,start:o,ilen:s}=sv(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,f=0,d,h,p,m,g,v;const y=_=>(o+(c?s-_:_))%a,b=()=>{m!==g&&(e.lineTo(u,g),e.lineTo(u,m),e.lineTo(u,v))};for(l&&(h=i[y(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[y(d)],h.skip)continue;const _=h.x,x=h.y,S=_|0;S===p?(x<m?m=x:x>g&&(g=x),u=(f*u+_)/++f):(b(),e.lineTo(_,x),p=S,f=0,m=g=x),v=x}b()}function Fl(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Y1:K1}function X1(e){return e.stepped?H_:e.tension||e.cubicInterpolationMode==="monotone"?K_:pn}function G1(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),ov(e,t.options),e.stroke(i)}function Z1(e,t,n,r){const{segments:i,options:a}=t,o=Fl(t);for(const s of i)ov(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Q1=typeof Path2D=="function";function J1(e,t,n,r){Q1&&!t.options.segment?G1(e,t,n,r):Z1(e,t,n,r)}class QR extends ar{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:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;F_(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=rw(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,o=ew(this,{property:n,start:i,end:i});if(!o.length)return;const s=[],l=X1(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:f,end:d}=o[c],h=a[f],p=a[d];if(h===p){s.push(h);continue}const m=Math.abs((i-h[n])/(p[n]-h[n])),g=l(h,p,m,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return Fl(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=Fl(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)o&=a(t,this,s,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),J1(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function dd(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class JR extends ar{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(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],r);return Math.pow(t-a,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return dd(this,t,"x",n)}inYRange(t,n){return dd(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!qr(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,jl(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function lv(e,t){const{x:n,y:r,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,f;return e.horizontal?(f=o/2,s=Math.min(n,i),l=Math.max(n,i),c=r-f,u=r+f):(f=a/2,s=n-f,l=n+f,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function qt(e,t,n,r){return e?0:We(t,n,r)}function eS(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=$m(r);return{t:qt(i.top,a.top,0,n),r:qt(i.right,a.right,0,t),b:qt(i.bottom,a.bottom,0,n),l:qt(i.left,a.left,0,t)}}function tS(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=zr(i),o=Math.min(t,n),s=e.borderSkipped,l=r||$(i);return{topLeft:qt(!l||s.top||s.left,a.topLeft,0,o),topRight:qt(!l||s.top||s.right,a.topRight,0,o),bottomLeft:qt(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:qt(!l||s.bottom||s.right,a.bottomRight,0,o)}}function nS(e){const t=lv(e),n=t.right-t.left,r=t.bottom-t.top,i=eS(e,n/2,r/2),a=tS(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 Jo(e,t,n,r){const i=t===null,a=n===null,s=e&&!(i&&a)&&lv(e,r);return s&&(i||Tl(t,s.left,s.right))&&(a||Tl(n,s.top,s.bottom))}function rS(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function iS(e,t){e.rect(t.x,t.y,t.w,t.h)}function es(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class eL extends ar{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:o}=nS(this),s=rS(o.radius)?Rl:iS;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,es(o,n,a)),t.clip(),s(t,es(a,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,es(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return Jo(this,t,n,r)}inXRange(t,n){return Jo(this,t,null,n)}inYRange(t,n){return Jo(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Bl=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],hd=Bl.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function cv(e){return Bl[e%Bl.length]}function uv(e){return hd[e%hd.length]}function aS(e,t){return e.borderColor=cv(t),e.backgroundColor=uv(t),++t}function oS(e,t){return e.backgroundColor=e.data.map(()=>cv(t++)),t}function sS(e,t){return e.backgroundColor=e.data.map(()=>uv(t++)),t}function lS(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Iw?t=oS(n,t):i instanceof jw?t=sS(n,t):i&&(t=aS(n,t))}}function pd(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function cS(e){return e&&(e.borderColor||e.backgroundColor)}function uS(){return ae.borderColor!=="rgba(0,0,0,0.1)"||ae.backgroundColor!=="rgba(0,0,0,0.1)"}var tL={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=pd(r)||cS(i)||a&&pd(a)||uS();if(!n.forceOverride&&o)return;const s=lS(e);r.forEach(s)}};const Ir={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){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=e.length;a<o;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Dl(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ft(e,t){return t&&(me(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function St(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
2
2
|
`)>-1?e.split(`
|
|
3
|
-
`):e}function fS(e,t){const{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 gd(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=pt(t.bodyFont),c=pt(t.titleFont),u=pt(t.footerFont),f=a.length,d=i.length,h=r.length,p=Gt(t.padding);let m=p.height,g=0,v=r.reduce((_,x)=>_+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(m+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const _=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;m+=h*_+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let y=0;const b=function(_){g=Math.max(g,n.measureText(_).width+y)};return n.save(),n.font=c.string,Y(e.title,b),n.font=l.string,Y(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?o+2+t.boxPadding:0,Y(r,_=>{Y(_.before,b),Y(_.lines,b),Y(_.after,b)}),y=0,n.font=u.string,Y(e.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function dS(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function hS(e,t,n,r){const{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 pS(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),hS(c,e,t,n)&&(c="center"),c}function md(e,t,n){const r=n.yAlign||t.yAlign||dS(e,n);return{xAlign:n.xAlign||t.xAlign||pS(e,t,n,r),yAlign:r}}function gS(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function mS(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vd(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:h}=zr(o);let p=gS(t,s);const m=mS(t,l,c);return l==="center"?s==="left"?p+=c:s==="right"&&(p-=c):s==="left"?p-=Math.max(u,d)+i:s==="right"&&(p+=Math.max(f,h)+i),{x:We(p,0,r.width-t.width),y:We(m,0,r.height-t.height)}}function Li(e,t,n){const r=Gt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yd(e){return ft([],St(e))}function vS(e,t,n){return jn(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function bd(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const fv={beforeTitle:_t,title(e){if(e.length>0){const 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:_t,beforeBody:_t,beforeLabel:_t,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return H(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:_t,afterBody:_t,beforeFooter:_t,footer:_t,afterFooter:_t};function Ie(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?fv[t].call(n,r):i}let xd=class extends ar{static positioners=Ir;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new Ym(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=vS(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Ie(r,"beforeTitle",this,t),a=Ie(r,"title",this,t),o=Ie(r,"afterTitle",this,t);let s=[];return s=ft(s,St(i)),s=ft(s,St(a)),s=ft(s,St(o)),s}getBeforeBody(t,n){return yd(Ie(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Y(t,a=>{const o={before:[],lines:[],after:[]},s=bd(r,a);ft(o.before,St(Ie(s,"beforeLabel",this,a))),ft(o.lines,Ie(s,"label",this,a)),ft(o.after,St(Ie(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,n){return yd(Ie(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Ie(r,"beforeFooter",this,t),a=Ie(r,"footer",this,t),o=Ie(r,"afterFooter",this,t);let s=[];return s=ft(s,St(i)),s=ft(s,St(a)),s=ft(s,St(o)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],o=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(fS(this.chart,n[l]));return t.filter&&(s=s.filter((u,f,d)=>t.filter(u,f,d,r))),t.itemSort&&(s=s.sort((u,f)=>t.itemSort(u,f,r))),Y(s,u=>{const f=bd(t.callbacks,u);i.push(Ie(f,"labelColor",this,u)),a.push(Ie(f,"labelPointStyle",this,u)),o.push(Ie(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=Ir[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=gd(this,r),c=Object.assign({},s,l),u=md(this.chart,r,c),f=vd(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=zr(s),{x:d,y:h}=t,{width:p,height:m}=n;let g,v,y,b,_,x;return a==="center"?(_=h+m/2,i==="left"?(g=d,v=g-o,b=_+o,x=_-o):(g=d+p,v=g+o,b=_-o,x=_+o),y=g):(i==="left"?v=d+Math.max(l,u)+o:i==="right"?v=d+p-Math.max(c,f)-o:v=this.caretX,a==="top"?(b=h,_=b-o,g=v-o,y=v+o):(b=h+m,_=b+o,g=v+o,y=v-o),x=b),{x1:g,x2:v,x3:y,y1:b,y2:_,y3:x}}drawTitle(t,n,r){const i=this.title,a=i.length;let o,s,l;if(a){const c=Vo(r.rtl,this.x,this.width);for(t.x=Li(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=pt(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<a;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,a){const o=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=a,u=pt(a.bodyFont),f=Li(this,"left",a),d=i.x(f),h=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+h;if(a.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(d,c)+c/2,v=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,jl(t,m,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,jl(t,m,g,v)}else{t.lineWidth=$(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(d,c),g=i.leftForLtr(i.xPlus(d,1),c-2),v=zr(o.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Rl(t,{x:m,y:p,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Rl(t,{x:g,y:p+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(g,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,f=pt(r.bodyFont);let d=f.lineHeight,h=0;const p=Vo(r.rtl,this.x,this.width),m=function(M){n.fillText(M,p.x(t.x+h),t.y+d/2),t.y+=d+a},g=p.textAlign(o);let v,y,b,_,x,S,O;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,t.x=Li(this,g,r),n.fillStyle=r.bodyColor,Y(this.beforeBody,m),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,_=0,S=i.length;_<S;++_){for(v=i[_],y=this.labelTextColors[_],n.fillStyle=y,Y(v.before,m),b=v.lines,s&&b.length&&(this._drawColorBox(n,t,_,p,r),d=Math.max(f.lineHeight,l)),x=0,O=b.length;x<O;++x)m(b[x]),d=f.lineHeight;Y(v.after,m)}h=0,d=f.lineHeight,Y(this.afterBody,m),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let o,s;if(a){const l=Vo(r.rtl,this.x,this.width);for(t.x=Li(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=pt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:p}=zr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+f,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-d,l),n.quadraticCurveTo(s+c,l,s+c,l+d),o==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-p),n.quadraticCurveTo(s+c,l+u,s+c-p,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+h,l+u),n.quadraticCurveTo(s,l+u,s,l+u-h),o==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+f),n.quadraticCurveTo(s,l,s+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const o=Ir[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=gd(this,t),l=Object.assign({},o,this._size),c=md(n,t,l),u=vd(t,l,c,n);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Gt(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),G_(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Z_(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!sa(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,r),s=this._positionChanged(o,t),l=n||!sa(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,o=Ir[a.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}};var rL={id:"tooltip",_element:xd,positioners:Ir,afterInit(e,t,n){n&&(e.tooltip=new xd({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){const t=e.tooltip;if(t&&t._willRender()){const 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){const 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:fv},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"]};const yS=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function bS(e,t,n,r){const i=e.indexOf(t);if(i===-1)return yS(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const xS=(e,t)=>e===null?null:We(Math.round(e),0,t);function _d(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class iL extends or{static id="category";static defaults={ticks:{callback:_d}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(H(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:bS(r,t,V(n,t),this._addedLabels),xS(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return _d.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function _S(e,t){const n=[],{bounds:i,step:a,min:o,max:s,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:d}=e,h=a||1,p=u-1,{min:m,max:g}=t,v=!H(o),y=!H(s),b=!H(c),_=(g-m)/(f+1);let x=xf((g-m)/p/h)*h,S,O,M,E;if(x<1e-14&&!v&&!y)return[{value:m},{value:g}];E=Math.ceil(g/x)-Math.floor(m/x),E>p&&(x=xf(E*x/p/h)*h),H(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),i==="ticks"?(O=Math.floor(m/x)*x,M=Math.ceil(g/x)*x):(O=m,M=g),v&&y&&a&&Ux((s-o)/a,x/1e3)?(E=Math.round(Math.min((s-o)/x,u)),x=(s-o)/E,O=o,M=s):b?(O=v?o:O,M=y?s:M,E=c-1,x=(M-O)/E):(E=(M-O)/x,Nr(E,Math.round(E),x/1e3)?E=Math.round(E):E=Math.ceil(E));const j=Math.max(_f(x),_f(O));S=Math.pow(10,H(l)?j:l),O=Math.round(O*S)/S,M=Math.round(M*S)/S;let D=0;for(v&&(d&&O!==o?(n.push({value:o}),O<o&&D++,Nr(Math.round((O+D*x)*S)/S,o,wd(o,_,e))&&D++):O<o&&D++);D<E;++D){const A=Math.round((O+D*x)*S)/S;if(y&&A>s)break;n.push({value:A})}return y&&d&&M!==s?n.length&&Nr(n[n.length-1].value,s,wd(s,_,e))?n[n.length-1].value=s:n.push({value:s}):(!y||M===s)&&n.push({value:M}),n}function wd(e,t,{horizontal:n,minRotation:r}){const i=ht(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class wS extends or{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return H(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=n?i:l,s=l=>a=r?a:l;if(t){const l=vt(i),c=vt(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=_S(i,a);return t.bounds==="ticks"&&Vx(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ja(t,this.chart.options.locale,this.options.ticks.format)}}class aL extends wS{static id="linear";static defaults={ticks:{callback:Nm.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qe(t)?t:0,this.max=Qe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ht(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const no={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}},je=Object.keys(no);function Sd(e,t){return e-t}function Od(e,t){if(H(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),Qe(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Hn(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,i)),+o)}function Pd(e,t,n,r){const i=je.length;for(let a=je.indexOf(e);a<i-1;++a){const o=no[je[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(s*o.size))<=r)return je[a]}return je[i-1]}function SS(e,t,n,r,i){for(let a=je.length-1;a>=je.indexOf(n);a--){const o=je[a];if(no[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return je[n?je.indexOf(n):0]}function OS(e){for(let t=je.indexOf(e)+1,n=je.length;t<n;++t)if(no[je[t]].common)return je[t]}function Md(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Ic(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function PS(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Ad(e,t,n){const r=[],i={},a=t.length;let 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:PS(e,r,i,n)}class kd extends or{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(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Rw._date(t.adapters.date);i.init(n),Lr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Od(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Qe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=Qe(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=Zx(i,a,o);return this._unit=n.unit||(r.autoSkip?Pd(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):SS(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:OS(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),Ad(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=We(n,0,o),r=We(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||Pd(a.minUnit,n,r,this._getLabelCapacity(n)),s=V(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=Hn(l)||l===!0,u={};let f=n,d,h;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":o),t.diff(r,n,o)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+o);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<r;d=+t.add(d,s,o),h++)Md(u,d,p);return(d===r||i.bounds==="ticks"||h===1)&&Md(u,d,p),Object.keys(u).sort(Sd).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,o=n||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const a=this.options,o=a.ticks.callback;if(o)return le(o,[t,n,r],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],f=c&&s[c],d=r[n],h=c&&f&&d&&d.major;return this._adapter.format(t,i||(h?f:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=ht(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*a+s*o,h:r*o+s*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,Ad(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Od(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tm(t.sort(Sd))}}function Ni(e,t,n){let r=0,i=e.length-1,a,o,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=yn(e,"pos",t)),{pos:a,time:s}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=yn(e,"time",t)),{time:a,pos:s}=e[r],{time:o,pos:l}=e[i]);const c=o-a;return c?s+(l-s)*(t-a)/c:s}class oL extends kd{static id="timeseries";static defaults=kd.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Ni(n,this.min),this._tableRange=Ni(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let o,s,l,c,u;for(o=0,s=t.length;o<s;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,s=i.length;o<s;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ni(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ni(this._table,r*this._tableRange+this._minPos,!0)}}var MS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function dv(e){if(typeof e!="string")return!1;var t=MS;return t.includes(e)}var AS=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],kS=new Set(AS);function hv(e){return typeof e!="string"?!1:kS.has(e)}function pv(e){return typeof e=="string"&&e.startsWith("data-")}function Xn(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(hv(n)||pv(n))&&(t[n]=e[n]);return t}function $c(e){if(e==null)return null;if(w.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Xn(t)}return typeof e=="object"&&!Array.isArray(e)?Xn(e):null}function Gn(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(hv(n)||pv(n)||dv(n))&&(t[n]=e[n]);return t}var CS=["children","width","height","viewBox","className","style","title","desc"];function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zl.apply(null,arguments)}function ES(e,t){if(e==null)return{};var n,r,i=DS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function DS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var TS=w.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:l,desc:c}=e,u=ES(e,CS),f=a||{width:r,height:i,x:0,y:0},d=Ze("recharts-surface",o);return w.createElement("svg",zl({},Gn(u),{className:d,width:r,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),w.createElement("title",null,l),w.createElement("desc",null,c),n)}),IS=["children","className"];function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(null,arguments)}function jS(e,t){if(e==null)return{};var n,r,i=RS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function RS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ro=w.forwardRef((e,t)=>{var{children:n,className:r}=e,i=jS(e,IS),a=Ze("recharts-layer",r);return w.createElement("g",$l({className:a},Gn(i),{ref:t}),n)}),LS=w.createContext(null);function ie(e){return function(){return e}}const Wl=Math.PI,ql=2*Wl,gn=1e-6,NS=ql-gn;function gv(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function FS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gv;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class BS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gv:FS(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,c=i-n,u=o-t,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>gn)if(!(Math.abs(f*l-c*u)>gn)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,p=i-s,m=l*l+c*c,g=h*h+p*p,v=Math.sqrt(m),y=Math.sqrt(d),b=a*Math.tan((Wl-Math.acos((m+d-g)/(2*v*y)))/2),_=b/y,x=b/v;Math.abs(_-1)>gn&&this._append`L${t+_*u},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=t+x*l},${this._y1=n+x*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gn||Math.abs(this._y1-u)>gn)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%ql+ql),d>NS?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:d>gn&&this._append`A${r},${r},0,${+(d>=Wl)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function mv(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new BS(t)}function Wc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vv(e){this._context=e}vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function io(e){return new vv(e)}function yv(e){return e[0]}function bv(e){return e[1]}function xv(e,t){var n=ie(!0),r=null,i=io,a=null,o=mv(s);e=typeof e=="function"?e:e===void 0?yv:ie(e),t=typeof t=="function"?t:t===void 0?bv:ie(t);function s(l){var c,u=(l=Wc(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function Fi(e,t,n){var r=null,i=ie(!0),a=null,o=io,s=null,l=mv(c);e=typeof e=="function"?e:e===void 0?yv:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?bv:ie(+n);function c(f){var d,h,p,m=(f=Wc(f)).length,g,v=!1,y,b=new Array(m),_=new Array(m);for(a==null&&(s=o(y=l())),d=0;d<=m;++d){if(!(d<m&&i(g=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],_[p]);s.lineEnd(),s.areaEnd()}v&&(b[d]=+e(g,d,f),_[d]=+t(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):_[d]))}if(y)return s=null,y+""||null}function u(){return xv().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ie(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ie(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class _v{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function zS(e){return new _v(e,!0)}function $S(e){return new _v(e,!1)}function ha(){}function pa(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wv(e){this._context=e}wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function WS(e){return new wv(e)}function Sv(e){this._context=e}Sv.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qS(e){return new Sv(e)}function Ov(e){this._context=e}Ov.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function US(e){return new Ov(e)}function Pv(e){this._context=e}Pv.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function VS(e){return new Pv(e)}function Cd(e){return e<0?-1:1}function Ed(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Cd(a)+Cd(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Dd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ts(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ga(e){this._context=e}ga.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ts(this,this._t0,Dd(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ts(this,Dd(this,n=Ed(this,e,t)),n);break;default:ts(this,this._t0,n=Ed(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Mv(e){this._context=new Av(e)}(Mv.prototype=Object.create(ga.prototype)).point=function(e,t){ga.prototype.point.call(this,t,e)};function Av(e){this._context=e}Av.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function HS(e){return new ga(e)}function KS(e){return new Mv(e)}function kv(e){this._context=e}kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Td(e),i=Td(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Td(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function YS(e){return new kv(e)}function ao(e,t){this._context=e,this._t=t}ao.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function XS(e){return new ao(e,.5)}function GS(e){return new ao(e,0)}function ZS(e){return new ao(e,1)}function kn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ul(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function QS(e,t){return e[t]}function JS(e){const t=[];return t.key=e,t}function eO(){var e=ie([]),t=Ul,n=kn,r=QS;function i(a){var o=Array.from(e.apply(this,arguments),JS),s,l=o.length,c=-1,u;for(const f of a)for(s=0,++c;s<l;++s)(o[s][c]=[0,+r(f,o[s].key,c,a)]).data=f;for(s=0,u=Wc(t(o));s<l;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Ul:typeof a=="function"?a:ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??kn,i):n},i}function tO(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}kn(e,t)}}function nO(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}kn(e,t)}}function rO(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],f=u[r][1]||0,d=u[r-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var m=e[t[p]],g=m[r][1]||0,v=m[r-1][1]||0;h+=g-v}l+=f,c+=h*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,kn(e,t)}}var ns={},rs={},Id;function iO(){return Id||(Id=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(rs)),rs}var is={},jd;function Cv(){return jd||(jd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(is)),is}var as={},Rd;function qc(){return Rd||(Rd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(as)),as}var os={},ss={},Ld;function aO(){return Ld||(Ld=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(ss)),ss}var Nd;function Uc(){return Nd||(Nd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aO(),n=qc();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,l="",c="",u=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const f=i[s];c?f==="\\"&&s+1<o?(s++,l+=i[s]):f===c?c="":l+=f:u?f==='"'||f==="'"?c=f:f==="]"?(u=!1,a.push(l),l=""):l+=f:f==="["?(u=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,s++}return l&&a.push(l),a}e.toPath=r})(os)),os}var Fd;function Vc(){return Fd||(Fd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iO(),n=Cv(),r=qc(),i=Uc();function a(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?n.isDeepKey(l)?a(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return o(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function o(s,l,c){if(l.length===0)return c;let u=s;for(let f=0;f<l.length;f++){if(u==null||t.isUnsafeProperty(l[f]))return c;u=u[l[f]]}return u===void 0?c:u}e.get=a})(ns)),ns}var ls,Bd;function oO(){return Bd||(Bd=1,ls=Vc().get),ls}var sO=oO();const Hc=Qt(sO);var lO=4;function Ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lO,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,a,o)=>{var s=n[o-1];return typeof s=="string"?i+s+a:s!==void 0?i+Ut(s)+a:i+a},"")}var Mt=e=>e===0?0:e>0?1:-1,sr=e=>typeof e=="number"&&e!=+e,Vr=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,z=e=>(typeof e=="number"||e instanceof Number)&&!sr(e),Cn=e=>z(e)||typeof e=="string",cO=0,Vl=e=>{var t=++cO;return"".concat(e||"").concat(t)},Zn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!z(t)&&typeof t!="string")return r;var a;if(Vr(t)){if(n==null)return r;var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return sr(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},Ev=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Bi(e,t,n){return z(e)&&z(t)?Ut(e+n*(t-e)):t}function uO(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Hc(r,t))===n)}var ma=e=>e===null||typeof e>"u",Kc=e=>ma(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function at(e){return e!=null}function lr(){}var Dv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,fO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(w.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{dv(i)&&(r[i]=(a=>n[i](n,a)))}),r};function zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(n),!0).forEach(function(r){hO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hO(e,t,n){return(t=pO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pO(e){var t=gO(e,"string");return typeof t=="symbol"?t:t+""}function gO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function si(e,t){var n=dO({},e),r=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&r[s]!==void 0&&(o[s]=r[s]),o),n);return a}var cs={},us={},$d;function mO(){return $d||($d=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const o=n[a],s=r(o,a,n);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(us)),us}var fs={},Wd;function vO(){return Wd||(Wd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(fs)),fs}var ds={},qd;function Yc(){return qd||(qd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(ds)),ds}var hs={},ps={},gs={},Ud;function yO(){return Ud||(Ud=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(gs)),gs}var Vd;function Tv(){return Vd||(Vd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yO();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(ps)),ps}var ms={},Hd;function bO(){return Hd||(Hd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(ms)),ms}var Kd;function xO(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tv(),n=bO();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(hs)),hs}var vs={},ys={},Yd;function _O(){return Yd||(Yd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vc();function n(r){return function(i){return t.get(i,r)}}e.property=n})(ys)),ys}var bs={},xs={},_s={},ws={},Xd;function Iv(){return Xd||(Xd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(ws)),ws}var Ss={},Gd;function jv(){return Gd||(Gd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Ss)),Ss}var Os={},Zd;function Rv(){return Zd||(Zd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Os)),Os}var Qd;function wO(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Iv(),n=jv(),r=Rv();function i(u,f,d){return typeof d!="function"?i(u,f,()=>{}):a(u,f,function h(p,m,g,v,y,b){const _=d(p,m,g,v,y,b);return _!==void 0?!!_:a(p,m,h,b)},new Map)}function a(u,f,d,h){if(f===u)return!0;switch(typeof f){case"object":return o(u,f,d,h);case"function":return Object.keys(f).length>0?a(u,{...f},d,h):r.isEqualsSameValueZero(u,f);default:return t.isObject(u)?typeof f=="string"?f==="":!0:r.isEqualsSameValueZero(u,f)}}function o(u,f,d,h){if(f==null)return!0;if(Array.isArray(f))return l(u,f,d,h);if(f instanceof Map)return s(u,f,d,h);if(f instanceof Set)return c(u,f,d,h);const p=Object.keys(f);if(u==null||n.isPrimitive(u))return p.length===0;if(p.length===0)return!0;if(h?.has(f))return h.get(f)===u;h?.set(f,u);try{for(let m=0;m<p.length;m++){const g=p[m];if(!n.isPrimitive(u)&&!(g in u)||f[g]===void 0&&u[g]!==void 0||f[g]===null&&u[g]!==null||!d(u[g],f[g],g,u,f,h))return!1}return!0}finally{h?.delete(f)}}function s(u,f,d,h){if(f.size===0)return!0;if(!(u instanceof Map))return!1;for(const[p,m]of f.entries()){const g=u.get(p);if(d(g,m,p,u,f,h)===!1)return!1}return!0}function l(u,f,d,h){if(f.length===0)return!0;if(!Array.isArray(u))return!1;const p=new Set;for(let m=0;m<f.length;m++){const g=f[m];let v=!1;for(let y=0;y<u.length;y++){if(p.has(y))continue;const b=u[y];let _=!1;if(d(b,g,m,u,f,h)&&(_=!0),_){p.add(y),v=!0;break}}if(!v)return!1}return!0}function c(u,f,d,h){return f.size===0?!0:u instanceof Set?l([...u],[...f],d,h):!1}e.isMatchWith=i,e.isSetMatch=c})(_s)),_s}var Jd;function Lv(){return Jd||(Jd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wO();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(xs)),xs}var Ps={},Ms={},As={},eh;function SO(){return eh||(eh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(As)),As}var ks={},th;function Xc(){return th||(th=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(ks)),ks}var Cs={},nh;function Nv(){return nh||(nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",p="[object Error]",m="[object DataView]",g="[object Uint8Array]",v="[object Uint8ClampedArray]",y="[object Uint16Array]",b="[object Uint32Array]",_="[object BigUint64Array]",x="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",M="[object BigInt64Array]",E="[object Float32Array]",j="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=m,e.dateTag=s,e.errorTag=p,e.float32ArrayTag=E,e.float64ArrayTag=j,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=O,e.int8ArrayTag=x,e.mapTag=l,e.numberTag=r,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=n,e.symbolTag=o,e.uint16ArrayTag=y,e.uint32ArrayTag=b,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})(Cs)),Cs}var Es={},rh;function OO(){return rh||(rh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Es)),Es}var ih;function Fv(){return ih||(ih=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SO(),n=Xc(),r=Nv(),i=jv(),a=OO();function o(u,f){return s(u,void 0,u,new Map,f)}function s(u,f,d,h=new Map,p=void 0){const m=p?.(u,f,d,h);if(m!==void 0)return m;if(i.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const g=new Array(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,p);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;h.set(u,g);for(const[v,y]of u)g.set(v,s(y,v,d,h,p));return g}if(u instanceof Set){const g=new Set;h.set(u,g);for(const v of u)g.add(s(v,void 0,d,h,p));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(a.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,p);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,g),l(g,u,d,h,p),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return h.set(u,g),l(g,u,d,h,p),g}if(typeof Blob<"u"&&u instanceof Blob){const g=new Blob([u],{type:u.type});return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof Error){const g=new u.constructor;return h.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,d,h,p),g}if(u instanceof Boolean){const g=new Boolean(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof Number){const g=new Number(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof String){const g=new String(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return h.set(u,g),l(g,u,d,h,p),g}return u}function l(u,f,d=u,h,p){const m=[...Object.keys(f),...t.getSymbols(f)];for(let g=0;g<m.length;g++){const v=m[g],y=Object.getOwnPropertyDescriptor(u,v);(y==null||y.writable)&&(u[v]=s(f[v],v,d,h,p))}}function c(u){switch(n.getTag(u)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=l})(Ms)),Ms}var ah;function PO(){return ah||(ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fv();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Ps)),Ps}var oh;function MO(){return oh||(oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lv(),n=PO();function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r})(bs)),bs}var Ds={},Ts={},Is={},sh;function AO(){return sh||(sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fv(),n=Xc(),r=Nv();function i(a,o){return t.cloneDeepWith(a,(s,l,c,u)=>{const f=o?.(s,l,c,u);if(f!==void 0)return f;if(typeof a=="object"){if(n.getTag(a)===r.objectTag&&typeof a.constructor!="function"){const d={};return u.set(a,d),t.copyProperties(d,a,c,u),d}switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const d=new a.constructor(a?.valueOf());return t.copyProperties(d,a),d}case r.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(Is)),Is}var lh;function kO(){return lh||(lh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AO();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Ts)),Ts}var js={},Rs={},ch;function Bv(){return ch||(ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Rs)),Rs}var Ls={},uh;function CO(){return uh||(uh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xc();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Ls)),Ls}var fh;function EO(){return fh||(fh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cv(),n=Bv(),r=CO(),i=Uc();function a(o,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let c=o;for(let u=0;u<l.length;u++){const f=l[u];if((c==null||!Object.hasOwn(c,f))&&!((Array.isArray(c)||r.isArguments(c))&&n.isIndex(f)&&f<c.length))return!1;c=c[f]}return!0}e.has=a})(js)),js}var dh;function DO(){return dh||(dh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lv(),n=qc(),r=kO(),i=Vc(),a=EO();function o(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(c){const u=i.get(c,s);return u===void 0?a.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=o})(Ds)),Ds}var hh;function Gc(){return hh||(hh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yc(),n=_O(),r=MO(),i=DO();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):r.matches(o);case"string":case"symbol":case"number":return n.property(o)}}e.iteratee=a})(vs)),vs}var ph;function TO(){return ph||(ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mO(),n=vO(),r=Yc(),i=xO(),a=Gc();function o(s,l=r.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),n.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(cs)),cs}var Ns,gh;function IO(){return gh||(gh=1,Ns=TO().uniqBy),Ns}var jO=IO();const mh=Qt(jO);function RO(e,t,n){return t===!0?mh(e,n):typeof t=="function"?mh(e,t):e}var Fs={exports:{}},Bs={},zs={exports:{}},$s={};var vh;function LO(){if(vh)return $s;vh=1;var e=kc();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,g=p[1];return a(function(){m.value=h,m.getSnapshot=d,l(m)&&g({inst:m})},[f,h,d]),i(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),o(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return $s.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$s}var yh;function NO(){return yh||(yh=1,zs.exports=LO()),zs.exports}var bh;function FO(){if(bh)return Bs;bh=1;var e=kc(),t=NO();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Bs.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=a(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=s(function(){function v(S){if(!y){if(y=!0,b=S,S=d(S),h!==void 0&&m.hasValue){var O=m.value;if(h(O,S))return _=O}return _=S}if(O=_,r(b,S))return O;var M=d(S);return h!==void 0&&h(O,M)?(b=S,O):(b=S,_=M)}var y=!1,b,_,x=f===void 0?null:f;return[function(){return v(u())},x===null?void 0:function(){return v(x())}]},[u,f,d,h]);var g=i(c,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Bs}var xh;function BO(){return xh||(xh=1,Fs.exports=FO()),Fs.exports}var zO=BO(),Zc=w.createContext(null),$O=e=>e,Ke=()=>{var e=w.useContext(Zc);return e?e.store.dispatch:$O},ra=()=>{},WO=()=>ra,qO=(e,t)=>e===t;function K(e){var t=w.useContext(Zc),n=w.useMemo(()=>t?r=>{if(r!=null)return e(r)}:ra,[t,e]);return zO.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:WO,t?t.store.getState:ra,t?t.store.getState:ra,n,qO)}function UO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function VO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function HO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var _h=e=>Array.isArray(e)?e:[e];function KO(e){const t=Array.isArray(e[0])?e[0]:e;return HO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YO(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var XO=class{constructor(e){this.value=e}deref(){return this.value}},GO=typeof WeakRef<"u"?WeakRef:XO,ZO=0,wh=1;function zi(){return{s:ZO,v:void 0,o:null,p:null}}function zv(e,t={}){let n=zi();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const m=p.get(h);m===void 0?(s=zi(),p.set(h,s)):s=m}else{let p=s.p;p===null&&(s.p=p=new Map);const m=p.get(h);m===void 0?(s=zi(),p.set(h,s)):s=m}}const c=s;let u;if(s.s===wh)u=s.v;else if(u=e.apply(null,arguments),a++,r){const f=i?.deref?.()??i;f!=null&&r(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new GO(u):u}return c.s=wh,c.v=u,u}return o.clearCache=()=>{n=zi(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function QO(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),UO(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=zv,argsMemoizeOptions:p=[]}=u,m=_h(d),g=_h(p),v=KO(i),y=f(function(){return a++,c.apply(null,arguments)},...m),b=h(function(){o++;const x=YO(v,arguments);return s=y.apply(null,x),s},...g);return Object.assign(b,{resultFunc:c,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var P=QO(zv),JO=Object.assign((e,t=P)=>{VO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((o,s,l)=>(o[n[l]]=s,o),{}))},{withTypes:()=>JO}),Ws={},qs={},Us={},Sh;function eP(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const o=t(r),s=t(i);if(o===s&&o===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=n})(Us)),Us}var Vs={},Hs={},Oh;function $v(){return Oh||(Oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Hs)),Hs}var Ph;function tP(){return Ph||(Ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$v(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(Vs)),Vs}var Mh;function nP(){return Mh||(Mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eP(),n=tP(),r=Uc();function i(a,o,s,l){if(a==null)return[];s=l?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,p)=>{let m=h;for(let g=0;g<p.length&&m!=null;++g)m=m[p[g]];return m},u=(h,p)=>p==null||h==null?p:typeof h=="object"&&"key"in h?Object.hasOwn(p,h.key)?p[h.key]:c(p,h.path):typeof h=="function"?h(p):Array.isArray(h)?c(p,h):typeof p=="object"?p[h]:p,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(p=>u(p,h))})).slice().sort((h,p)=>{for(let m=0;m<f.length;m++){const g=t.compareValues(h.criteria[m],p.criteria[m],s[m]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=i})(qs)),qs}var Ks={},Ah;function rP(){return Ah||(Ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),o=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<a?o(u,l+1):i.push(u)}};return o(n,0),i}e.flatten=t})(Ks)),Ks}var Ys={},kh;function Wv(){return kh||(kh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bv(),n=Tv(),r=Iv(),i=Rv();function a(o,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.isEqualsSameValueZero(l[s],o):!1}e.isIterateeCall=a})(Ys)),Ys}var Ch;function iP(){return Ch||(Ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nP(),n=rP(),r=Wv();function i(a,...o){const s=o.length;return s>1&&r.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,n.flatten(o),["asc"])}e.sortBy=i})(Ws)),Ws}var Xs,Eh;function aP(){return Eh||(Eh=1,Xs=iP().sortBy),Xs}var oP=aP();const oo=Qt(oP);var qv=e=>e.legend.settings,sP=e=>e.legend.size,lP=e=>e.legend.payload;P([lP,qv],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?oo(r,n):r});var $i=1;function cP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=w.useState({height:0,left:0,top:0,width:0}),r=w.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>$i||Math.abs(o.left-t.left)>$i||Math.abs(o.top-t.top)>$i||Math.abs(o.width-t.width)>$i)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Oe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dh=uP,Gs=()=>Math.random().toString(36).substring(7).split("").join("."),fP={INIT:`@@redux/INIT${Gs()}`,REPLACE:`@@redux/REPLACE${Gs()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Gs()}`},va=fP;function Qc(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Uv(e,t,n){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Oe(1));return n(Uv)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((g,v)=>{o.set(v,g)}))}function u(){if(l)throw new Error(Oe(3));return i}function f(g){if(typeof g!="function")throw new Error(Oe(4));if(l)throw new Error(Oe(5));let v=!0;c();const y=s++;return o.set(y,g),function(){if(v){if(l)throw new Error(Oe(6));v=!1,c(),o.delete(y),a=null}}}function d(g){if(!Qc(g))throw new Error(Oe(7));if(typeof g.type>"u")throw new Error(Oe(8));if(typeof g.type!="string")throw new Error(Oe(17));if(l)throw new Error(Oe(9));try{l=!0,i=r(i,g)}finally{l=!1}return(a=o).forEach(y=>{y()}),g}function h(g){if(typeof g!="function")throw new Error(Oe(10));r=g,d({type:va.REPLACE})}function p(){const g=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(Oe(11));function y(){const _=v;_.next&&_.next(u())}return y(),{unsubscribe:g(y)}},[Dh](){return this}}}return d({type:va.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[Dh]:p}}function dP(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:va.INIT})>"u")throw new Error(Oe(12));if(typeof n(void 0,{type:va.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function Vv(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{dP(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=o[f],p=d(h,s);if(typeof p>"u")throw s&&s.type,new Error(Oe(14));c[f]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?c:o}}function ya(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function hP(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Oe(15))};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=ya(...s)(i.dispatch),{...i,dispatch:a}}}function Hv(e){return Qc(e)&&"type"in e&&typeof e.type=="string"}var Kv=Symbol.for("immer-nothing"),Th=Symbol.for("immer-draftable"),Ce=Symbol.for("immer-state");function nt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var qe=Object,Qn=qe.getPrototypeOf,ba="constructor",so="prototype",Hl="configurable",xa="enumerable",ia="writable",Hr="value",Et=e=>!!e&&!!e[Ce];function st(e){return e?Yv(e)||co(e)||!!e[Th]||!!e[ba]?.[Th]||uo(e)||fo(e):!1}var pP=qe[so][ba].toString(),Ih=new WeakMap;function Yv(e){if(!e||!Jc(e))return!1;const t=Qn(e);if(t===null||t===qe[so])return!0;const n=qe.hasOwnProperty.call(t,ba)&&t[ba];if(n===Object)return!0;if(!Wn(n))return!1;let r=Ih.get(n);return r===void 0&&(r=Function.toString.call(n),Ih.set(n,r)),r===pP}function lo(e,t,n=!0){li(e)===0?(n?Reflect.ownKeys(e):qe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function li(e){const t=e[Ce];return t?t.type_:co(e)?1:uo(e)?2:fo(e)?3:0}var jh=(e,t,n=li(e))=>n===2?e.has(t):qe[so].hasOwnProperty.call(e,t),Kl=(e,t,n=li(e))=>n===2?e.get(t):e[t],_a=(e,t,n,r=li(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function gP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var co=Array.isArray,uo=e=>e instanceof Map,fo=e=>e instanceof Set,Jc=e=>typeof e=="object",Wn=e=>typeof e=="function",Zs=e=>typeof e=="boolean";function mP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Pt=e=>e.copy_||e.base_,eu=e=>e.modified_?e.copy_:e.base_;function Yl(e,t){if(uo(e))return new Map(e);if(fo(e))return new Set(e);if(co(e))return Array[so].slice.call(e);const n=Yv(e);if(t===!0||t==="class_only"&&!n){const r=qe.getOwnPropertyDescriptors(e);delete r[Ce];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s[ia]===!1&&(s[ia]=!0,s[Hl]=!0),(s.get||s.set)&&(r[o]={[Hl]:!0,[ia]:!0,[xa]:s[xa],[Hr]:e[o]})}return qe.create(Qn(e),r)}else{const r=Qn(e);if(r!==null&&n)return{...e};const i=qe.create(r);return qe.assign(i,e)}}function tu(e,t=!1){return ho(e)||Et(e)||!st(e)||(li(e)>1&&qe.defineProperties(e,{set:Wi,add:Wi,clear:Wi,delete:Wi}),qe.freeze(e),t&&lo(e,(n,r)=>{tu(r,!0)},!1)),e}function vP(){nt(2)}var Wi={[Hr]:vP};function ho(e){return e===null||!Jc(e)?!0:qe.isFrozen(e)}var wa="MapSet",Xl="Patches",Rh="ArrayMethods",Xv={};function En(e){const t=Xv[e];return t||nt(0,e),t}var Lh=e=>!!Xv[e],Kr,Gv=()=>Kr,yP=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Lh(wa)?En(wa):void 0,arrayMethodsPlugin_:Lh(Rh)?En(Rh):void 0});function Nh(e,t){t&&(e.patchPlugin_=En(Xl),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gl(e){Zl(e),e.drafts_.forEach(bP),e.drafts_=null}function Zl(e){e===Kr&&(Kr=e.parent_)}var Fh=e=>Kr=yP(Kr,e);function bP(e){const t=e[Ce];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ce].modified_&&(Gl(t),nt(4)),st(e)&&(e=zh(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Ce].base_,e,t)}else e=zh(t,n);return xP(t,e,!0),Gl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kv?e:void 0}function zh(e,t){if(ho(t))return t;const n=t[Ce];if(!n)return Sa(t,e.handledSet_,e);if(!po(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Jv(n,e)}return n.copy_}function xP(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tu(t,n)}function Zv(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var po=(e,t)=>e.scope_===t,_P=[];function Qv(e,t,n,r){const i=Pt(e),a=e.type_;if(r!==void 0&&Kl(i,r,a)===t){_a(i,r,n,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;lo(i,(l,c)=>{if(Et(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const o=e.draftLocations_.get(t)??_P;for(const s of o)_a(i,s,n,a)}function wP(e,t,n){e.callbacks_.push(function(i){const a=t;if(!a||!po(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=eu(a);Qv(e,a.draft_??a,o,n),Jv(a,i)})}function Jv(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}Zv(e)}}function SP(e,t,n){const{scope_:r}=e;if(Et(n)){const i=n[Ce];po(i,r)&&i.callbacks_.push(function(){aa(e);const o=eu(i);Qv(e,n,o,t)})}else st(n)&&e.callbacks_.push(function(){const a=Pt(e);e.type_===3?a.has(n)&&Sa(n,r.handledSet_,r):Kl(a,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sa(Kl(e.copy_,t,e.type_),r.handledSet_,r)})}function Sa(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Et(e)||t.has(e)||!st(e)||ho(e)||(t.add(e),lo(e,(r,i)=>{if(Et(i)){const a=i[Ce];if(po(a,n)){const o=eu(a);_a(e,r,o,e.type_),Zv(a)}}else st(i)&&Sa(i,t,n)})),e}function OP(e,t){const n=co(e),r={type_:n?1:0,scope_:t?t.scope_:Gv(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=Oa;n&&(i=[r],a=Yr);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Oa={get(e,t){if(t===Ce)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Pt(e);if(!jh(i,t,e.type_))return PP(e,i,t);const a=i[t];if(e.finalized_||!st(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&mP(t))return a;if(a===Qs(e.base_,t)){aa(e);const o=e.type_===1?+t:t,s=Jl(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in Pt(e)},ownKeys(e){return Reflect.ownKeys(Pt(e))},set(e,t,n){const r=ey(Pt(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Qs(Pt(e),t),a=i?.[Ce];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(gP(n,i)&&(n!==void 0||jh(e.base_,t,e.type_)))return!0;aa(e),Ql(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),SP(e,t,n)),!0},deleteProperty(e,t){return aa(e),Qs(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ql(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Pt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ia]:!0,[Hl]:e.type_!==1||t!=="length",[xa]:r[xa],[Hr]:n[t]}},defineProperty(){nt(11)},getPrototypeOf(e){return Qn(e.base_)},setPrototypeOf(){nt(12)}},Yr={};for(let e in Oa){let t=Oa[e];Yr[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Yr.deleteProperty=function(e,t){return Yr.set.call(this,e,t,void 0)};Yr.set=function(e,t,n){return Oa.set.call(this,e[0],t,n,e[0])};function Qs(e,t){const n=e[Ce];return(n?Pt(n):e)[t]}function PP(e,t,n){const r=ey(t,n);return r?Hr in r?r[Hr]:r.get?.call(e.draft_):void 0}function ey(e,t){if(!(t in e))return;let n=Qn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Qn(n)}}function Ql(e){e.modified_||(e.modified_=!0,e.parent_&&Ql(e.parent_))}function aa(e){e.copy_||(e.assigned_=new Map,e.copy_=Yl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var MP=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Wn(n)&&!Wn(r)){const o=r;r=n;const s=this;return function(c=o,...u){return s.produce(c,f=>r.call(this,f,...u))}}Wn(r)||nt(6),i!==void 0&&!Wn(i)&&nt(7);let a;if(st(n)){const o=Fh(this),s=Jl(o,n,void 0);let l=!0;try{a=r(s),l=!1}finally{l?Gl(o):Zl(o)}return Nh(o,i),Bh(a,o)}else if(!n||!Jc(n)){if(a=r(n),a===void 0&&(a=n),a===Kv&&(a=void 0),this.autoFreeze_&&tu(a,!0),i){const o=[],s=[];En(Xl).generateReplacementPatches_(n,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else nt(1,n)},this.produceWithPatches=(n,r)=>{if(Wn(n))return(s,...l)=>this.produceWithPatches(s,c=>n(c,...l));let i,a;return[this.produce(n,r,(s,l)=>{i=s,a=l}),i,a]},Zs(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Zs(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Zs(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){st(t)||nt(8),Et(t)&&(t=ot(t));const n=Fh(this),r=Jl(n,t,void 0);return r[Ce].isManual_=!0,Zl(n),r}finishDraft(t,n){const r=t&&t[Ce];(!r||!r.isManual_)&&nt(9);const{scope_:i}=r;return Nh(i,n),Bh(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const a=n[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(n=n.slice(r+1));const i=En(Xl).applyPatches_;return Et(t)?i(t,n):this.produce(t,a=>i(a,n))}};function Jl(e,t,n,r){const[i,a]=uo(t)?En(wa).proxyMap_(t,n):fo(t)?En(wa).proxySet_(t,n):OP(t,n);return(n?.scope_??Gv()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?wP(n,a,r):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:c}=l;a.modified_&&c&&c.generatePatches_(a,[],l)}),i}function ot(e){return Et(e)||nt(10,e),ty(e)}function ty(e){if(!st(e)||ho(e))return e;const t=e[Ce];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yl(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Yl(e,!0);return lo(n,(i,a)=>{_a(n,i,ty(a))},r),t&&(t.finalized_=!1),n}var AP=new MP,ny=AP.produce;function ry(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var kP=ry(),CP=ry,EP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ya:ya.apply(null,arguments)};function Je(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ve(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Hv(r)&&r.type===e,n}var iy=class jr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jr.prototype)}static get[Symbol.species](){return jr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jr(...t[0].concat(this)):new jr(...t.concat(this))}};function $h(e){return st(e)?ny(e,()=>{}):e}function qi(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function DP(e){return typeof e=="boolean"}var TP=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new iy;return n&&(DP(n)?o.push(kP):o.push(CP(n.extraArgument))),o},ay="RTK_autoBatch",te=()=>e=>({payload:e,meta:{[ay]:!0}}),Wh=e=>t=>{setTimeout(t,e)},oy=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wh(10):e.type==="callback"?e.queueNotification:Wh(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),d=r.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[ay],a=!i,a&&(o||(o=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},IP=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new iy(e);return r&&i.push(oy(typeof r=="object"?r:void 0)),i};function jP(e){const t=TP(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(Qc(n))s=Vv(n);else throw new Error(Ve(1));let l;typeof r=="function"?l=r(t):l=t();let c=ya;i&&(c=EP({trace:!1,...typeof i=="object"&&i}));const u=hP(...l),f=IP(u);let d=typeof o=="function"?o(f):f();const h=c(...d);return Uv(s,a,h)}function sy(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ve(28));if(s in t)throw new Error(Ve(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function RP(e){return typeof e=="function"}function LP(e,t){let[n,r,i]=sy(t),a;if(RP(e))a=()=>$h(e());else{const s=$h(e);a=()=>s}function o(s=a(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Et(u)){const h=f(u,l);return h===void 0?u:h}else{if(st(u))return ny(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return o.getInitialState=a,o}var NP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",FP=(e=21)=>{let t="",n=e;for(;n--;)t+=NP[Math.random()*64|0];return t},BP=Symbol.for("rtk-slice-createasyncthunk");function zP(e,t){return`${e}/${t}`}function $P({creators:e}={}){const t=e?.asyncThunk?.[BP];return function(r){const{name:i,reducerPath:a=i}=r;if(!i)throw new Error(Ve(11));const o=(typeof r.reducers=="function"?r.reducers(qP()):r.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,_){const x=typeof b=="string"?b:b.type;if(!x)throw new Error(Ve(12));if(x in l.sliceCaseReducersByType)throw new Error(Ve(13));return l.sliceCaseReducersByType[x]=_,c},addMatcher(b,_){return l.sliceMatchers.push({matcher:b,reducer:_}),c},exposeAction(b,_){return l.actionCreators[b]=_,c},exposeCaseReducer(b,_){return l.sliceCaseReducersByName[b]=_,c}};s.forEach(b=>{const _=o[b],x={reducerName:b,type:zP(i,b),createNotation:typeof r.reducers=="function"};VP(_)?KP(x,_,c,t):UP(x,_,c)});function u(){const[b={},_=[],x=void 0]=typeof r.extraReducers=="function"?sy(r.extraReducers):[r.extraReducers],S={...b,...l.sliceCaseReducersByType};return LP(r.initialState,O=>{for(let M in S)O.addCase(M,S[M]);for(let M of l.sliceMatchers)O.addMatcher(M.matcher,M.reducer);for(let M of _)O.addMatcher(M.matcher,M.reducer);x&&O.addDefaultCase(x)})}const f=b=>b,d=new Map,h=new WeakMap;let p;function m(b,_){return p||(p=u()),p(b,_)}function g(){return p||(p=u()),p.getInitialState()}function v(b,_=!1){function x(O){let M=O[b];return typeof M>"u"&&_&&(M=qi(h,x,g)),M}function S(O=f){const M=qi(d,_,()=>new WeakMap);return qi(M,O,()=>{const E={};for(const[j,D]of Object.entries(r.selectors??{}))E[j]=WP(D,O,()=>qi(h,O,g),_);return E})}return{reducerPath:b,getSelectors:S,get selectors(){return S(x)},selectSlice:x}}const y={name:i,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto(b,{reducerPath:_,...x}={}){const S=_??a;return b.inject({reducerPath:S,reducer:m},x),{...y,...v(S,!0)}}};return y}}function WP(e,t,n,r){function i(a,...o){let s=t(a);return typeof s>"u"&&r&&(s=n()),e(s,...o)}return i.unwrapped=e,i}var Ne=$P();function qP(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function UP({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!HP(r))throw new Error(Ve(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Je(e,o):Je(e))}function VP(e){return e._reducerDefinitionType==="asyncThunk"}function HP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function KP({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ve(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:o||Ui,pending:s||Ui,rejected:l||Ui,settled:c||Ui})}function Ui(){}var YP="task",ly="listener",cy="completed",nu="cancelled",XP=`task-${nu}`,GP=`task-${cy}`,ec=`${ly}-${nu}`,ZP=`${ly}-${cy}`,go=class{constructor(e){this.code=e,this.message=`${YP} ${nu} (reason: ${e})`}name="TaskAbortError";message},ru=(e,t)=>{if(typeof e!="function")throw new TypeError(Ve(32))},Pa=()=>{},uy=(e,t=Pa)=>(e.catch(t),e),fy=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),On=e=>{if(e.aborted)throw new go(e.reason)};function dy(e,t){let n=Pa;return new Promise((r,i)=>{const a=()=>i(new go(e.reason));if(e.aborted){a();return}n=fy(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Pa})}var QP=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof go?"cancelled":"rejected",error:n}}finally{t?.()}},Ma=e=>t=>uy(dy(e,t).then(n=>(On(e),n))),hy=e=>{const t=Ma(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Un}=Object,qh={},mo="listenerMiddleware",JP=(e,t)=>{const n=r=>fy(e,()=>r.abort(e.reason));return(r,i)=>{ru(r);const a=new AbortController;n(a);const o=QP(async()=>{On(e),On(a.signal);const s=await r({pause:Ma(a.signal),delay:hy(a.signal),signal:a.signal});return On(a.signal),s},()=>a.abort(GP));return i?.autoJoin&&t.push(o.catch(Pa)),{result:Ma(e)(o),cancel(){a.abort(XP)}}}},eM=(e,t)=>{const n=async(r,i)=>{On(t);let a=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await dy(t,Promise.race(s));return On(t),l}finally{a()}};return(r,i)=>uy(n(r,i))},py=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Je(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ve(21));return ru(a),{predicate:i,type:t,effect:a}},gy=Un(e=>{const{type:t,predicate:n,effect:r}=py(e);return{id:FP(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ve(22))}}},{withTypes:()=>gy}),Uh=(e,t)=>{const{type:n,effect:r,predicate:i}=py(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},tc=e=>{e.pending.forEach(t=>{t.abort(ec)})},tM=(e,t)=>()=>{for(const n of t.keys())tc(n);e.clear()},Vh=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},my=Un(Je(`${mo}/add`),{withTypes:()=>my}),nM=Je(`${mo}/removeAll`),vy=Un(Je(`${mo}/remove`),{withTypes:()=>vy}),rM=(...e)=>{console.error(`${mo}/error`,...e)},ci=(e={})=>{const t=new Map,n=new Map,r=h=>{const p=n.get(h)??0;n.set(h,p+1)},i=h=>{const p=n.get(h)??1;p===1?n.delete(h):n.set(h,p-1)},{extra:a,onError:o=rM}=e;ru(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&tc(h)}),l=h=>{const p=Uh(t,h)??gy(h);return s(p)};Un(l,{withTypes:()=>l});const c=h=>{const p=Uh(t,h);return p&&(p.unsubscribe(),h.cancelActive&&tc(p)),!!p};Un(c,{withTypes:()=>c});const u=async(h,p,m,g)=>{const v=new AbortController,y=eM(l,v.signal),b=[];try{h.pending.add(v),r(h),await Promise.resolve(h.effect(p,Un({},m,{getOriginalState:g,condition:(_,x)=>y(_,x).then(Boolean),take:y,delay:hy(v.signal),pause:Ma(v.signal),extra:a,signal:v.signal,fork:JP(v.signal,b),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,x,S)=>{_!==v&&(_.abort(ec),S.delete(_))})},cancel:()=>{v.abort(ec),h.pending.delete(v)},throwIfCancelled:()=>{On(v.signal)}})))}catch(_){_ instanceof go||Vh(o,_,{raisedBy:"effect"})}finally{await Promise.all(b),v.abort(ZP),i(h),h.pending.delete(v)}},f=tM(t,n);return{middleware:h=>p=>m=>{if(!Hv(m))return p(m);if(my.match(m))return l(m.payload);if(nM.match(m)){f();return}if(vy.match(m))return c(m.payload);let g=h.getState();const v=()=>{if(g===qh)throw new Error(Ve(23));return g};let y;try{if(y=p(m),t.size>0){const b=h.getState(),_=Array.from(t.values());for(const x of _){let S=!1;try{S=x.predicate(m,b,g)}catch(O){S=!1,Vh(o,O,{raisedBy:"predicate"})}S&&u(x,m,h,v)}}}finally{g=qh}return y},startListening:l,stopListening:c,clearListeners:f}};function Ve(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var iM={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},yy=Ne({name:"chartLayout",initialState:iM,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,a;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:aM,setLayout:lL,setChartSize:oM,setScale:sM}=yy.actions,lM=yy.reducer;function by(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Q(e){return Number.isFinite(e)}function Zt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Hh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hh(Object(n),!0).forEach(function(r){cM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cM(e,t,n){return(t=uM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uM(e){var t=fM(e,"string");return typeof t=="symbol"?t:t+""}function fM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ve(e,t,n){return ma(e)||ma(t)?n:Cn(t)?Hc(e,t,n):typeof t=="function"?t(e):n}var dM=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&z(e[a]))return qn(qn({},e),{},{[a]:e[a]+(r||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&z(e[o]))return qn(qn({},e),{},{[o]:e[o]+(i||0)})}return e},Jt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",hM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,s=0;s<n;++s){var l=e[s],c=l?.[i];if(c!=null){var u=c[1],f=c[0],d=sr(u)?f:u;d>=0?(c[0]=a,a+=d,c[1]=a):(c[0]=o,o+=d,c[1]=o)}}}},pM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var s=e[o],l=s?.[i];if(l!=null){var c=sr(l[1])?l[0]:l[1];c>=0?(l[0]=a,a+=c,l[1]=a):(l[0]=0,l[1]=0)}}}},gM={sign:hM,expand:tO,none:kn,silhouette:nO,wiggle:rO,positive:pM},mM=(e,t,n)=>{var r,i=(r=gM[n])!==null&&r!==void 0?r:kn,a=eO().keys(t).value((s,l)=>Number(ve(s,l,0))).order(Ul).offset(i),o=a(e);return o.forEach((s,l)=>{s.forEach((c,u)=>{var f=ve(e[u],t[l],0);Array.isArray(f)&&f.length===2&&z(f[0])&&z(f[1])&&(c[0]=f[0],c[1]=f[1])})}),o},vM=e=>{var t=e.flat(2).filter(z);return[Math.min(...t),Math.max(...t)]},yM=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],bM=(e,t,n)=>{if(e!=null)return yM(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((l,c)=>{var u=by(c,t,n),f=vM(u);return!Q(f[0])||!Q(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},Kh=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Yh=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xh=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();return r}if(e&&t&&t.length>=2){for(var i=oo(t,u=>u.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var l=i[o],c=i[o-1];a=Math.min((l?.coordinate||0)-(c?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function Gh(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return qn(qn({},t),{},{dataKey:n,payload:r,value:i,name:a})}var xM=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},_M=(e,t)=>t==="centric"?e.angle:e.radius,en=e=>e.layout.width,tn=e=>e.layout.height,wM=e=>e.layout.scale,xy=e=>e.layout.margin,vo=P(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),yo=P(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),SM="data-recharts-item-index",OM="data-recharts-item-id",ui=60;function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(n),!0).forEach(function(r){PM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PM(e,t,n){return(t=MM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MM(e){var t=AM(e,"string");return typeof t=="symbol"?t:t+""}function AM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kM=e=>e.brush.height;function CM(e){var t=yo(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ui;return n+i}return n},0)}function EM(e){var t=yo(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ui;return n+i}return n},0)}function DM(e){var t=vo(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function TM(e){var t=vo(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Ae=P([en,tn,xy,kM,CM,EM,DM,TM,qv,sP],(e,t,n,r,i,a,o,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},f={top:(n.top||0)+o,bottom:(n.bottom||0)+s},d=Vi(Vi({},f),u),h=d.bottom;d.bottom+=r,d=dM(d,l,c);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Vi(Vi({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),IM=P(Ae,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));P(en,tn,(e,t)=>({x:0,y:0,width:e,height:t}));var jM=w.createContext(null),fi=()=>w.useContext(jM)!=null,bo=e=>e.brush,iu=P([bo,Ae,xy],(e,t,n)=>({height:e.height,x:z(e.x)?e.x:t.left,y:z(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:z(e.width)?e.width:t.width})),Js={},el={},tl={},Qh;function RM(){return Qh||(Qh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let o,s=null;const l=a!=null&&a.includes("leading"),c=a==null||a.includes("trailing"),u=()=>{s!==null&&(n.apply(o,s),o=void 0,s=null)},f=()=>{c&&u(),m()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},r)},p=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{p(),o=void 0,s=null},g=()=>{u()},v=function(...y){if(i?.aborted)return;o=this,s=y;const b=d==null;h(),l&&b&&u()};return v.schedule=h,v.cancel=m,v.flush=g,i?.addEventListener("abort",m,{once:!0}),v}e.debounce=t})(tl)),tl}var Jh;function LM(){return Jh||(Jh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RM();function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:l}=a,c=Array(2);o&&(c[0]="leading"),s&&(c[1]="trailing");let u,f=null;const d=t.debounce(function(...m){u=r.apply(this,m),f=null},i,{edges:c}),h=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(u=r.apply(this,m),f=Date.now(),d.cancel(),d.schedule(),u):(d.apply(this,m),u)},p=()=>(d.flush(),u);return h.cancel=d.cancel,h.flush=p,h}e.debounce=n})(el)),el}var ep;function NM(){return ep||(ep=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LM();function n(r,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(r,i,{leading:o,maxWait:i,trailing:s})}e.throttle=n})(Js)),Js}var nl,tp;function FM(){return tp||(tp=1,nl=NM().throttle),nl}var BM=FM();const zM=Qt(BM);var np=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},gt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},_y=(e,t,n)=>{var{width:r=gt.width,height:i=gt.height,aspect:a,maxHeight:o}=n,s=Vr(r)?e:Number(r),l=Vr(i)?t:Number(i);return a&&a>0&&(s?l=s/a:l&&(s=l*a),o&&l!=null&&l>o&&(l=o)),{calculatedWidth:s,calculatedHeight:l}},$M={width:0,height:0,overflow:"visible"},WM={width:0,overflowX:"visible"},qM={height:0,overflowY:"visible"},UM={},VM=e=>{var{width:t,height:n}=e,r=Vr(t),i=Vr(n);return r&&i?$M:r?WM:i?qM:UM};function HM(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=gt.width,a=gt.height):i===void 0?i=r&&r>0?void 0:gt.width:a===void 0&&(a=r&&r>0?void 0:gt.height),{width:i,height:a}}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nc.apply(null,arguments)}function rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rp(Object(n),!0).forEach(function(r){KM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KM(e,t,n){return(t=YM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YM(e){var t=XM(e,"string");return typeof t=="symbol"?t:t+""}function XM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wy=w.createContext(gt.initialDimension);function GM(e){return Zt(e.width)&&Zt(e.height)}function Sy(e){var{children:t,width:n,height:r}=e,i=w.useMemo(()=>({width:n,height:r}),[n,r]);return GM(i)?w.createElement(wy.Provider,{value:i},t):null}var au=()=>w.useContext(wy),ZM=w.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=gt.initialDimension,width:i,height:a,minWidth:o=gt.minWidth,minHeight:s,maxHeight:l,children:c,debounce:u=gt.debounce,id:f,className:d,onResize:h,style:p={}}=e,m=w.useRef(null),g=w.useRef();g.current=h,w.useImperativeHandle(t,()=>m.current);var[v,y]=w.useState({containerWidth:r.width,containerHeight:r.height}),b=w.useCallback((M,E)=>{y(j=>{var D=Math.round(M),A=Math.round(E);return j.containerWidth===D&&j.containerHeight===A?j:{containerWidth:D,containerHeight:A}})},[]);w.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return lr;var M=A=>{var N,R=A[0];if(R!=null){var{width:T,height:L}=R.contentRect;b(T,L),(N=g.current)===null||N===void 0||N.call(g,T,L)}};u>0&&(M=zM(M,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(M),{width:j,height:D}=m.current.getBoundingClientRect();return b(j,D),E.observe(m.current),()=>{E.disconnect()}},[b,u]);var{containerWidth:_,containerHeight:x}=v;np(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:S,calculatedHeight:O}=_y(_,x,{width:i,height:a,aspect:n,maxHeight:l});return np(S!=null&&S>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
3
|
+
`):e}function fS(e,t){const{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 gd(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=pt(t.bodyFont),c=pt(t.titleFont),u=pt(t.footerFont),f=a.length,d=i.length,h=r.length,p=Gt(t.padding);let m=p.height,g=0,v=r.reduce((_,x)=>_+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(m+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const _=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;m+=h*_+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let y=0;const b=function(_){g=Math.max(g,n.measureText(_).width+y)};return n.save(),n.font=c.string,Y(e.title,b),n.font=l.string,Y(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?o+2+t.boxPadding:0,Y(r,_=>{Y(_.before,b),Y(_.lines,b),Y(_.after,b)}),y=0,n.font=u.string,Y(e.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function dS(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function hS(e,t,n,r){const{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 pS(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),hS(c,e,t,n)&&(c="center"),c}function md(e,t,n){const r=n.yAlign||t.yAlign||dS(e,n);return{xAlign:n.xAlign||t.xAlign||pS(e,t,n,r),yAlign:r}}function gS(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function mS(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vd(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=n,c=i+a,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:h}=zr(o);let p=gS(t,s);const m=mS(t,l,c);return l==="center"?s==="left"?p+=c:s==="right"&&(p-=c):s==="left"?p-=Math.max(u,d)+i:s==="right"&&(p+=Math.max(f,h)+i),{x:We(p,0,r.width-t.width),y:We(m,0,r.height-t.height)}}function Li(e,t,n){const r=Gt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yd(e){return ft([],St(e))}function vS(e,t,n){return jn(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function bd(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const fv={beforeTitle:_t,title(e){if(e.length>0){const 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:_t,beforeBody:_t,beforeLabel:_t,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return H(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:_t,afterBody:_t,beforeFooter:_t,footer:_t,afterFooter:_t};function Ie(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?fv[t].call(n,r):i}let xd=class extends ar{static positioners=Ir;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new Ym(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=vS(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Ie(r,"beforeTitle",this,t),a=Ie(r,"title",this,t),o=Ie(r,"afterTitle",this,t);let s=[];return s=ft(s,St(i)),s=ft(s,St(a)),s=ft(s,St(o)),s}getBeforeBody(t,n){return yd(Ie(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Y(t,a=>{const o={before:[],lines:[],after:[]},s=bd(r,a);ft(o.before,St(Ie(s,"beforeLabel",this,a))),ft(o.lines,Ie(s,"label",this,a)),ft(o.after,St(Ie(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,n){return yd(Ie(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Ie(r,"beforeFooter",this,t),a=Ie(r,"footer",this,t),o=Ie(r,"afterFooter",this,t);let s=[];return s=ft(s,St(i)),s=ft(s,St(a)),s=ft(s,St(o)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],o=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(fS(this.chart,n[l]));return t.filter&&(s=s.filter((u,f,d)=>t.filter(u,f,d,r))),t.itemSort&&(s=s.sort((u,f)=>t.itemSort(u,f,r))),Y(s,u=>{const f=bd(t.callbacks,u);i.push(Ie(f,"labelColor",this,u)),a.push(Ie(f,"labelPointStyle",this,u)),o.push(Ie(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=Ir[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=gd(this,r),c=Object.assign({},s,l),u=md(this.chart,r,c),f=vd(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=zr(s),{x:d,y:h}=t,{width:p,height:m}=n;let g,v,y,b,_,x;return a==="center"?(_=h+m/2,i==="left"?(g=d,v=g-o,b=_+o,x=_-o):(g=d+p,v=g+o,b=_-o,x=_+o),y=g):(i==="left"?v=d+Math.max(l,u)+o:i==="right"?v=d+p-Math.max(c,f)-o:v=this.caretX,a==="top"?(b=h,_=b-o,g=v-o,y=v+o):(b=h+m,_=b+o,g=v+o,y=v-o),x=b),{x1:g,x2:v,x3:y,y1:b,y2:_,y3:x}}drawTitle(t,n,r){const i=this.title,a=i.length;let o,s,l;if(a){const c=Vo(r.rtl,this.x,this.width);for(t.x=Li(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=pt(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<a;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,a){const o=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=a,u=pt(a.bodyFont),f=Li(this,"left",a),d=i.x(f),h=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+h;if(a.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(d,c)+c/2,v=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,jl(t,m,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,jl(t,m,g,v)}else{t.lineWidth=$(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(d,c),g=i.leftForLtr(i.xPlus(d,1),c-2),v=zr(o.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Rl(t,{x:m,y:p,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Rl(t,{x:g,y:p+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(g,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,f=pt(r.bodyFont);let d=f.lineHeight,h=0;const p=Vo(r.rtl,this.x,this.width),m=function(M){n.fillText(M,p.x(t.x+h),t.y+d/2),t.y+=d+a},g=p.textAlign(o);let v,y,b,_,x,S,O;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,t.x=Li(this,g,r),n.fillStyle=r.bodyColor,Y(this.beforeBody,m),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,_=0,S=i.length;_<S;++_){for(v=i[_],y=this.labelTextColors[_],n.fillStyle=y,Y(v.before,m),b=v.lines,s&&b.length&&(this._drawColorBox(n,t,_,p,r),d=Math.max(f.lineHeight,l)),x=0,O=b.length;x<O;++x)m(b[x]),d=f.lineHeight;Y(v.after,m)}h=0,d=f.lineHeight,Y(this.afterBody,m),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let o,s;if(a){const l=Vo(r.rtl,this.x,this.width);for(t.x=Li(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=pt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:p}=zr(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+f,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-d,l),n.quadraticCurveTo(s+c,l,s+c,l+d),o==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-p),n.quadraticCurveTo(s+c,l+u,s+c-p,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+h,l+u),n.quadraticCurveTo(s,l+u,s,l+u-h),o==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+f),n.quadraticCurveTo(s,l,s+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const o=Ir[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=gd(this,t),l=Object.assign({},o,this._size),c=md(n,t,l),u=vd(t,l,c,n);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Gt(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),G_(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Z_(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!sa(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,r),s=this._positionChanged(o,t),l=n||!sa(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,o=Ir[a.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}};var rL={id:"tooltip",_element:xd,positioners:Ir,afterInit(e,t,n){n&&(e.tooltip=new xd({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){const t=e.tooltip;if(t&&t._willRender()){const 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){const 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:fv},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"]};const yS=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function bS(e,t,n,r){const i=e.indexOf(t);if(i===-1)return yS(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const xS=(e,t)=>e===null?null:We(Math.round(e),0,t);function _d(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class iL extends or{static id="category";static defaults={ticks:{callback:_d}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(H(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:bS(r,t,V(n,t),this._addedLabels),xS(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return _d.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function _S(e,t){const n=[],{bounds:i,step:a,min:o,max:s,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:d}=e,h=a||1,p=u-1,{min:m,max:g}=t,v=!H(o),y=!H(s),b=!H(c),_=(g-m)/(f+1);let x=xf((g-m)/p/h)*h,S,O,M,E;if(x<1e-14&&!v&&!y)return[{value:m},{value:g}];E=Math.ceil(g/x)-Math.floor(m/x),E>p&&(x=xf(E*x/p/h)*h),H(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),i==="ticks"?(O=Math.floor(m/x)*x,M=Math.ceil(g/x)*x):(O=m,M=g),v&&y&&a&&Ux((s-o)/a,x/1e3)?(E=Math.round(Math.min((s-o)/x,u)),x=(s-o)/E,O=o,M=s):b?(O=v?o:O,M=y?s:M,E=c-1,x=(M-O)/E):(E=(M-O)/x,Nr(E,Math.round(E),x/1e3)?E=Math.round(E):E=Math.ceil(E));const j=Math.max(_f(x),_f(O));S=Math.pow(10,H(l)?j:l),O=Math.round(O*S)/S,M=Math.round(M*S)/S;let D=0;for(v&&(d&&O!==o?(n.push({value:o}),O<o&&D++,Nr(Math.round((O+D*x)*S)/S,o,wd(o,_,e))&&D++):O<o&&D++);D<E;++D){const A=Math.round((O+D*x)*S)/S;if(y&&A>s)break;n.push({value:A})}return y&&d&&M!==s?n.length&&Nr(n[n.length-1].value,s,wd(s,_,e))?n[n.length-1].value=s:n.push({value:s}):(!y||M===s)&&n.push({value:M}),n}function wd(e,t,{horizontal:n,minRotation:r}){const i=ht(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class wS extends or{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return H(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=n?i:l,s=l=>a=r?a:l;if(t){const l=vt(i),c=vt(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=_S(i,a);return t.bounds==="ticks"&&Vx(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ja(t,this.chart.options.locale,this.options.ticks.format)}}class aL extends wS{static id="linear";static defaults={ticks:{callback:Nm.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qe(t)?t:0,this.max=Qe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=ht(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const no={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}},je=Object.keys(no);function Sd(e,t){return e-t}function Od(e,t){if(H(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),Qe(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Hn(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,i)),+o)}function Pd(e,t,n,r){const i=je.length;for(let a=je.indexOf(e);a<i-1;++a){const o=no[je[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(s*o.size))<=r)return je[a]}return je[i-1]}function SS(e,t,n,r,i){for(let a=je.length-1;a>=je.indexOf(n);a--){const o=je[a];if(no[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return je[n?je.indexOf(n):0]}function OS(e){for(let t=je.indexOf(e)+1,n=je.length;t<n;++t)if(no[je[t]].common)return je[t]}function Md(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Ic(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function PS(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Ad(e,t,n){const r=[],i={},a=t.length;let 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:PS(e,r,i,n)}class kd extends or{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(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Rw._date(t.adapters.date);i.init(n),Lr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Od(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Qe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=Qe(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=Zx(i,a,o);return this._unit=n.unit||(r.autoSkip?Pd(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):SS(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:OS(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),Ad(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=We(n,0,o),r=We(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||Pd(a.minUnit,n,r,this._getLabelCapacity(n)),s=V(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=Hn(l)||l===!0,u={};let f=n,d,h;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":o),t.diff(r,n,o)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+o);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<r;d=+t.add(d,s,o),h++)Md(u,d,p);return(d===r||i.bounds==="ticks"||h===1)&&Md(u,d,p),Object.keys(u).sort(Sd).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,o=n||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const a=this.options,o=a.ticks.callback;if(o)return le(o,[t,n,r],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],f=c&&s[c],d=r[n],h=c&&f&&d&&d.major;return this._adapter.format(t,i||(h?f:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=ht(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*a+s*o,h:r*o+s*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,Ad(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Od(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tm(t.sort(Sd))}}function Ni(e,t,n){let r=0,i=e.length-1,a,o,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=yn(e,"pos",t)),{pos:a,time:s}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=yn(e,"time",t)),{time:a,pos:s}=e[r],{time:o,pos:l}=e[i]);const c=o-a;return c?s+(l-s)*(t-a)/c:s}class oL extends kd{static id="timeseries";static defaults=kd.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Ni(n,this.min),this._tableRange=Ni(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let o,s,l,c,u;for(o=0,s=t.length;o<s;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,s=i.length;o<s;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Ni(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ni(this._table,r*this._tableRange+this._minPos,!0)}}var MS=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function dv(e){if(typeof e!="string")return!1;var t=MS;return t.includes(e)}var AS=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],kS=new Set(AS);function hv(e){return typeof e!="string"?!1:kS.has(e)}function pv(e){return typeof e=="string"&&e.startsWith("data-")}function Xn(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(hv(n)||pv(n))&&(t[n]=e[n]);return t}function $c(e){if(e==null)return null;if(w.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Xn(t)}return typeof e=="object"&&!Array.isArray(e)?Xn(e):null}function Gn(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(hv(n)||pv(n)||dv(n))&&(t[n]=e[n]);return t}var CS=["children","width","height","viewBox","className","style","title","desc"];function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zl.apply(null,arguments)}function ES(e,t){if(e==null)return{};var n,r,i=DS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function DS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var TS=w.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:l,desc:c}=e,u=ES(e,CS),f=a||{width:r,height:i,x:0,y:0},d=Ze("recharts-surface",o);return w.createElement("svg",zl({},Gn(u),{className:d,width:r,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),w.createElement("title",null,l),w.createElement("desc",null,c),n)}),IS=["children","className"];function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(null,arguments)}function jS(e,t){if(e==null)return{};var n,r,i=RS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function RS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ro=w.forwardRef((e,t)=>{var{children:n,className:r}=e,i=jS(e,IS),a=Ze("recharts-layer",r);return w.createElement("g",$l({className:a},Gn(i),{ref:t}),n)}),LS=w.createContext(null);function ie(e){return function(){return e}}const Wl=Math.PI,ql=2*Wl,gn=1e-6,NS=ql-gn;function gv(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function FS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gv;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class BS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gv:FS(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,c=i-n,u=o-t,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>gn)if(!(Math.abs(f*l-c*u)>gn)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,p=i-s,m=l*l+c*c,g=h*h+p*p,v=Math.sqrt(m),y=Math.sqrt(d),b=a*Math.tan((Wl-Math.acos((m+d-g)/(2*v*y)))/2),_=b/y,x=b/v;Math.abs(_-1)>gn&&this._append`L${t+_*u},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=t+x*l},${this._y1=n+x*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gn||Math.abs(this._y1-u)>gn)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%ql+ql),d>NS?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:d>gn&&this._append`A${r},${r},0,${+(d>=Wl)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function mv(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new BS(t)}function Wc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vv(e){this._context=e}vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function io(e){return new vv(e)}function yv(e){return e[0]}function bv(e){return e[1]}function xv(e,t){var n=ie(!0),r=null,i=io,a=null,o=mv(s);e=typeof e=="function"?e:e===void 0?yv:ie(e),t=typeof t=="function"?t:t===void 0?bv:ie(t);function s(l){var c,u=(l=Wc(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function Fi(e,t,n){var r=null,i=ie(!0),a=null,o=io,s=null,l=mv(c);e=typeof e=="function"?e:e===void 0?yv:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?bv:ie(+n);function c(f){var d,h,p,m=(f=Wc(f)).length,g,v=!1,y,b=new Array(m),_=new Array(m);for(a==null&&(s=o(y=l())),d=0;d<=m;++d){if(!(d<m&&i(g=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],_[p]);s.lineEnd(),s.areaEnd()}v&&(b[d]=+e(g,d,f),_[d]=+t(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):_[d]))}if(y)return s=null,y+""||null}function u(){return xv().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ie(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ie(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class _v{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function zS(e){return new _v(e,!0)}function $S(e){return new _v(e,!1)}function ha(){}function pa(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wv(e){this._context=e}wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function WS(e){return new wv(e)}function Sv(e){this._context=e}Sv.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qS(e){return new Sv(e)}function Ov(e){this._context=e}Ov.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function US(e){return new Ov(e)}function Pv(e){this._context=e}Pv.prototype={areaStart:ha,areaEnd:ha,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function VS(e){return new Pv(e)}function Cd(e){return e<0?-1:1}function Ed(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Cd(a)+Cd(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Dd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ts(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ga(e){this._context=e}ga.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ts(this,this._t0,Dd(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ts(this,Dd(this,n=Ed(this,e,t)),n);break;default:ts(this,this._t0,n=Ed(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Mv(e){this._context=new Av(e)}(Mv.prototype=Object.create(ga.prototype)).point=function(e,t){ga.prototype.point.call(this,t,e)};function Av(e){this._context=e}Av.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function HS(e){return new ga(e)}function KS(e){return new Mv(e)}function kv(e){this._context=e}kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Td(e),i=Td(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Td(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function YS(e){return new kv(e)}function ao(e,t){this._context=e,this._t=t}ao.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function XS(e){return new ao(e,.5)}function GS(e){return new ao(e,0)}function ZS(e){return new ao(e,1)}function kn(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Ul(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function QS(e,t){return e[t]}function JS(e){const t=[];return t.key=e,t}function eO(){var e=ie([]),t=Ul,n=kn,r=QS;function i(a){var o=Array.from(e.apply(this,arguments),JS),s,l=o.length,c=-1,u;for(const f of a)for(s=0,++c;s<l;++s)(o[s][c]=[0,+r(f,o[s].key,c,a)]).data=f;for(s=0,u=Wc(t(o));s<l;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Ul:typeof a=="function"?a:ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??kn,i):n},i}function tO(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}kn(e,t)}}function nO(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}kn(e,t)}}function rO(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],f=u[r][1]||0,d=u[r-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var m=e[t[p]],g=m[r][1]||0,v=m[r-1][1]||0;h+=g-v}l+=f,c+=h*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,kn(e,t)}}var ns={},rs={},Id;function iO(){return Id||(Id=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(rs)),rs}var is={},jd;function Cv(){return jd||(jd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(is)),is}var as={},Rd;function qc(){return Rd||(Rd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(as)),as}var os={},ss={},Ld;function aO(){return Ld||(Ld=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(ss)),ss}var Nd;function Uc(){return Nd||(Nd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aO(),n=qc();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,l="",c="",u=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const f=i[s];c?f==="\\"&&s+1<o?(s++,l+=i[s]):f===c?c="":l+=f:u?f==='"'||f==="'"?c=f:f==="]"?(u=!1,a.push(l),l=""):l+=f:f==="["?(u=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,s++}return l&&a.push(l),a}e.toPath=r})(os)),os}var Fd;function Vc(){return Fd||(Fd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iO(),n=Cv(),r=qc(),i=Uc();function a(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?n.isDeepKey(l)?a(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return o(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function o(s,l,c){if(l.length===0)return c;let u=s;for(let f=0;f<l.length;f++){if(u==null||t.isUnsafeProperty(l[f]))return c;u=u[l[f]]}return u===void 0?c:u}e.get=a})(ns)),ns}var ls,Bd;function oO(){return Bd||(Bd=1,ls=Vc().get),ls}var sO=oO();const Hc=Qt(sO);var lO=4;function Ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lO,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,a,o)=>{var s=n[o-1];return typeof s=="string"?i+s+a:s!==void 0?i+Ut(s)+a:i+a},"")}var Mt=e=>e===0?0:e>0?1:-1,sr=e=>typeof e=="number"&&e!=+e,Vr=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,z=e=>(typeof e=="number"||e instanceof Number)&&!sr(e),Cn=e=>z(e)||typeof e=="string",cO=0,Vl=e=>{var t=++cO;return"".concat(e||"").concat(t)},Zn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!z(t)&&typeof t!="string")return r;var a;if(Vr(t)){if(n==null)return r;var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return sr(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},Ev=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Bi(e,t,n){return z(e)&&z(t)?Ut(e+n*(t-e)):t}function uO(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Hc(r,t))===n)}var ma=e=>e===null||typeof e>"u",Kc=e=>ma(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function at(e){return e!=null}function lr(){}var Dv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,fO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(w.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{dv(i)&&(r[i]=(a=>n[i](n,a)))}),r};function zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(n),!0).forEach(function(r){hO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hO(e,t,n){return(t=pO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pO(e){var t=gO(e,"string");return typeof t=="symbol"?t:t+""}function gO(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function si(e,t){var n=dO({},e),r=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&r[s]!==void 0&&(o[s]=r[s]),o),n);return a}var cs={},us={},$d;function mO(){return $d||($d=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const o=n[a],s=r(o,a,n);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(us)),us}var fs={},Wd;function vO(){return Wd||(Wd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(fs)),fs}var ds={},qd;function Yc(){return qd||(qd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(ds)),ds}var hs={},ps={},gs={},Ud;function yO(){return Ud||(Ud=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(gs)),gs}var Vd;function Tv(){return Vd||(Vd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yO();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(ps)),ps}var ms={},Hd;function bO(){return Hd||(Hd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(ms)),ms}var Kd;function xO(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tv(),n=bO();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(hs)),hs}var vs={},ys={},Yd;function _O(){return Yd||(Yd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vc();function n(r){return function(i){return t.get(i,r)}}e.property=n})(ys)),ys}var bs={},xs={},_s={},ws={},Xd;function Iv(){return Xd||(Xd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(ws)),ws}var Ss={},Gd;function jv(){return Gd||(Gd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Ss)),Ss}var Os={},Zd;function Rv(){return Zd||(Zd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Os)),Os}var Qd;function wO(){return Qd||(Qd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Iv(),n=jv(),r=Rv();function i(u,f,d){return typeof d!="function"?i(u,f,()=>{}):a(u,f,function h(p,m,g,v,y,b){const _=d(p,m,g,v,y,b);return _!==void 0?!!_:a(p,m,h,b)},new Map)}function a(u,f,d,h){if(f===u)return!0;switch(typeof f){case"object":return o(u,f,d,h);case"function":return Object.keys(f).length>0?a(u,{...f},d,h):r.isEqualsSameValueZero(u,f);default:return t.isObject(u)?typeof f=="string"?f==="":!0:r.isEqualsSameValueZero(u,f)}}function o(u,f,d,h){if(f==null)return!0;if(Array.isArray(f))return l(u,f,d,h);if(f instanceof Map)return s(u,f,d,h);if(f instanceof Set)return c(u,f,d,h);const p=Object.keys(f);if(u==null||n.isPrimitive(u))return p.length===0;if(p.length===0)return!0;if(h?.has(f))return h.get(f)===u;h?.set(f,u);try{for(let m=0;m<p.length;m++){const g=p[m];if(!n.isPrimitive(u)&&!(g in u)||f[g]===void 0&&u[g]!==void 0||f[g]===null&&u[g]!==null||!d(u[g],f[g],g,u,f,h))return!1}return!0}finally{h?.delete(f)}}function s(u,f,d,h){if(f.size===0)return!0;if(!(u instanceof Map))return!1;for(const[p,m]of f.entries()){const g=u.get(p);if(d(g,m,p,u,f,h)===!1)return!1}return!0}function l(u,f,d,h){if(f.length===0)return!0;if(!Array.isArray(u))return!1;const p=new Set;for(let m=0;m<f.length;m++){const g=f[m];let v=!1;for(let y=0;y<u.length;y++){if(p.has(y))continue;const b=u[y];let _=!1;if(d(b,g,m,u,f,h)&&(_=!0),_){p.add(y),v=!0;break}}if(!v)return!1}return!0}function c(u,f,d,h){return f.size===0?!0:u instanceof Set?l([...u],[...f],d,h):!1}e.isMatchWith=i,e.isSetMatch=c})(_s)),_s}var Jd;function Lv(){return Jd||(Jd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wO();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(xs)),xs}var Ps={},Ms={},As={},eh;function SO(){return eh||(eh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(As)),As}var ks={},th;function Xc(){return th||(th=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(ks)),ks}var Cs={},nh;function Nv(){return nh||(nh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",p="[object Error]",m="[object DataView]",g="[object Uint8Array]",v="[object Uint8ClampedArray]",y="[object Uint16Array]",b="[object Uint32Array]",_="[object BigUint64Array]",x="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",M="[object BigInt64Array]",E="[object Float32Array]",j="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=m,e.dateTag=s,e.errorTag=p,e.float32ArrayTag=E,e.float64ArrayTag=j,e.functionTag=f,e.int16ArrayTag=S,e.int32ArrayTag=O,e.int8ArrayTag=x,e.mapTag=l,e.numberTag=r,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=n,e.symbolTag=o,e.uint16ArrayTag=y,e.uint32ArrayTag=b,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})(Cs)),Cs}var Es={},rh;function OO(){return rh||(rh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Es)),Es}var ih;function Fv(){return ih||(ih=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SO(),n=Xc(),r=Nv(),i=jv(),a=OO();function o(u,f){return s(u,void 0,u,new Map,f)}function s(u,f,d,h=new Map,p=void 0){const m=p?.(u,f,d,h);if(m!==void 0)return m;if(i.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const g=new Array(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,p);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;h.set(u,g);for(const[v,y]of u)g.set(v,s(y,v,d,h,p));return g}if(u instanceof Set){const g=new Set;h.set(u,g);for(const v of u)g.add(s(v,void 0,d,h,p));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(a.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,p);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,g),l(g,u,d,h,p),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return h.set(u,g),l(g,u,d,h,p),g}if(typeof Blob<"u"&&u instanceof Blob){const g=new Blob([u],{type:u.type});return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof Error){const g=structuredClone(u);return h.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,g.constructor=u.constructor,l(g,u,d,h,p),g}if(u instanceof Boolean){const g=new Boolean(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof Number){const g=new Number(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(u instanceof String){const g=new String(u.valueOf());return h.set(u,g),l(g,u,d,h,p),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return h.set(u,g),l(g,u,d,h,p),g}return u}function l(u,f,d=u,h,p){const m=[...Object.keys(f),...t.getSymbols(f)];for(let g=0;g<m.length;g++){const v=m[g],y=Object.getOwnPropertyDescriptor(u,v);(y==null||y.writable)&&(u[v]=s(f[v],v,d,h,p))}}function c(u){switch(n.getTag(u)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=l})(Ms)),Ms}var ah;function PO(){return ah||(ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fv();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Ps)),Ps}var oh;function MO(){return oh||(oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lv(),n=PO();function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r})(bs)),bs}var Ds={},Ts={},Is={},sh;function AO(){return sh||(sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fv(),n=Xc(),r=Nv();function i(a,o){return t.cloneDeepWith(a,(s,l,c,u)=>{const f=o?.(s,l,c,u);if(f!==void 0)return f;if(typeof a=="object"){if(n.getTag(a)===r.objectTag&&typeof a.constructor!="function"){const d={};return u.set(a,d),t.copyProperties(d,a,c,u),d}switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const d=new a.constructor(a?.valueOf());return t.copyProperties(d,a),d}case r.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(Is)),Is}var lh;function kO(){return lh||(lh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AO();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Ts)),Ts}var js={},Rs={},ch;function Bv(){return ch||(ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Rs)),Rs}var Ls={},uh;function CO(){return uh||(uh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xc();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Ls)),Ls}var fh;function EO(){return fh||(fh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cv(),n=Bv(),r=CO(),i=Uc();function a(o,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let c=o;for(let u=0;u<l.length;u++){const f=l[u];if((c==null||!Object.hasOwn(c,f))&&!((Array.isArray(c)||r.isArguments(c))&&n.isIndex(f)&&f<c.length))return!1;c=c[f]}return!0}e.has=a})(js)),js}var dh;function DO(){return dh||(dh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lv(),n=qc(),r=kO(),i=Vc(),a=EO();function o(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(c){const u=i.get(c,s);return u===void 0?a.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=o})(Ds)),Ds}var hh;function Gc(){return hh||(hh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yc(),n=_O(),r=MO(),i=DO();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):r.matches(o);case"string":case"symbol":case"number":return n.property(o)}}e.iteratee=a})(vs)),vs}var ph;function TO(){return ph||(ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mO(),n=vO(),r=Yc(),i=xO(),a=Gc();function o(s,l=r.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),n.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(cs)),cs}var Ns,gh;function IO(){return gh||(gh=1,Ns=TO().uniqBy),Ns}var jO=IO();const mh=Qt(jO);function RO(e,t,n){return t===!0?mh(e,n):typeof t=="function"?mh(e,t):e}var Fs={exports:{}},Bs={},zs={exports:{}},$s={};var vh;function LO(){if(vh)return $s;vh=1;var e=kc();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,g=p[1];return a(function(){m.value=h,m.getSnapshot=d,l(m)&&g({inst:m})},[f,h,d]),i(function(){return l(m)&&g({inst:m}),f(function(){l(m)&&g({inst:m})})},[f]),o(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return $s.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$s}var yh;function NO(){return yh||(yh=1,zs.exports=LO()),zs.exports}var bh;function FO(){if(bh)return Bs;bh=1;var e=kc(),t=NO();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Bs.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=a(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=s(function(){function v(S){if(!y){if(y=!0,b=S,S=d(S),h!==void 0&&m.hasValue){var O=m.value;if(h(O,S))return _=O}return _=S}if(O=_,r(b,S))return O;var M=d(S);return h!==void 0&&h(O,M)?(b=S,O):(b=S,_=M)}var y=!1,b,_,x=f===void 0?null:f;return[function(){return v(u())},x===null?void 0:function(){return v(x())}]},[u,f,d,h]);var g=i(c,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Bs}var xh;function BO(){return xh||(xh=1,Fs.exports=FO()),Fs.exports}var zO=BO(),Zc=w.createContext(null),$O=e=>e,Ke=()=>{var e=w.useContext(Zc);return e?e.store.dispatch:$O},ra=()=>{},WO=()=>ra,qO=(e,t)=>e===t;function K(e){var t=w.useContext(Zc),n=w.useMemo(()=>t?r=>{if(r!=null)return e(r)}:ra,[t,e]);return zO.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:WO,t?t.store.getState:ra,t?t.store.getState:ra,n,qO)}function UO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function VO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function HO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var _h=e=>Array.isArray(e)?e:[e];function KO(e){const t=Array.isArray(e[0])?e[0]:e;return HO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YO(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var XO=class{constructor(e){this.value=e}deref(){return this.value}},GO=typeof WeakRef<"u"?WeakRef:XO,ZO=0,wh=1;function zi(){return{s:ZO,v:void 0,o:null,p:null}}function zv(e,t={}){let n=zi();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const m=p.get(h);m===void 0?(s=zi(),p.set(h,s)):s=m}else{let p=s.p;p===null&&(s.p=p=new Map);const m=p.get(h);m===void 0?(s=zi(),p.set(h,s)):s=m}}const c=s;let u;if(s.s===wh)u=s.v;else if(u=e.apply(null,arguments),a++,r){const f=i?.deref?.()??i;f!=null&&r(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new GO(u):u}return c.s=wh,c.v=u,u}return o.clearCache=()=>{n=zi(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function QO(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),UO(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=zv,argsMemoizeOptions:p=[]}=u,m=_h(d),g=_h(p),v=KO(i),y=f(function(){return a++,c.apply(null,arguments)},...m),b=h(function(){o++;const x=YO(v,arguments);return s=y.apply(null,x),s},...g);return Object.assign(b,{resultFunc:c,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var P=QO(zv),JO=Object.assign((e,t=P)=>{VO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((o,s,l)=>(o[n[l]]=s,o),{}))},{withTypes:()=>JO}),Ws={},qs={},Us={},Sh;function eP(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const o=t(r),s=t(i);if(o===s&&o===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=n})(Us)),Us}var Vs={},Hs={},Oh;function $v(){return Oh||(Oh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Hs)),Hs}var Ph;function tP(){return Ph||(Ph=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$v(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(Vs)),Vs}var Mh;function nP(){return Mh||(Mh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eP(),n=tP(),r=Uc();function i(a,o,s,l){if(a==null)return[];s=l?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,p)=>{let m=h;for(let g=0;g<p.length&&m!=null;++g)m=m[p[g]];return m},u=(h,p)=>p==null||h==null?p:typeof h=="object"&&"key"in h?Object.hasOwn(p,h.key)?p[h.key]:c(p,h.path):typeof h=="function"?h(p):Array.isArray(h)?c(p,h):typeof p=="object"?p[h]:p,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||n.isKey(h)?h:{key:h,path:r.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(p=>u(p,h))})).slice().sort((h,p)=>{for(let m=0;m<f.length;m++){const g=t.compareValues(h.criteria[m],p.criteria[m],s[m]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=i})(qs)),qs}var Ks={},Ah;function rP(){return Ah||(Ah=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),o=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<a?o(u,l+1):i.push(u)}};return o(n,0),i}e.flatten=t})(Ks)),Ks}var Ys={},kh;function Wv(){return kh||(kh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bv(),n=Tv(),r=Iv(),i=Rv();function a(o,s,l){return r.isObject(l)&&(typeof s=="number"&&n.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.isEqualsSameValueZero(l[s],o):!1}e.isIterateeCall=a})(Ys)),Ys}var Ch;function iP(){return Ch||(Ch=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nP(),n=rP(),r=Wv();function i(a,...o){const s=o.length;return s>1&&r.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,n.flatten(o),["asc"])}e.sortBy=i})(Ws)),Ws}var Xs,Eh;function aP(){return Eh||(Eh=1,Xs=iP().sortBy),Xs}var oP=aP();const oo=Qt(oP);var qv=e=>e.legend.settings,sP=e=>e.legend.size,lP=e=>e.legend.payload;P([lP,qv],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?oo(r,n):r});var $i=1;function cP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=w.useState({height:0,left:0,top:0,width:0}),r=w.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>$i||Math.abs(o.left-t.left)>$i||Math.abs(o.top-t.top)>$i||Math.abs(o.width-t.width)>$i)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Oe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var uP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dh=uP,Gs=()=>Math.random().toString(36).substring(7).split("").join("."),fP={INIT:`@@redux/INIT${Gs()}`,REPLACE:`@@redux/REPLACE${Gs()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Gs()}`},va=fP;function Qc(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Uv(e,t,n){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Oe(1));return n(Uv)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((g,v)=>{o.set(v,g)}))}function u(){if(l)throw new Error(Oe(3));return i}function f(g){if(typeof g!="function")throw new Error(Oe(4));if(l)throw new Error(Oe(5));let v=!0;c();const y=s++;return o.set(y,g),function(){if(v){if(l)throw new Error(Oe(6));v=!1,c(),o.delete(y),a=null}}}function d(g){if(!Qc(g))throw new Error(Oe(7));if(typeof g.type>"u")throw new Error(Oe(8));if(typeof g.type!="string")throw new Error(Oe(17));if(l)throw new Error(Oe(9));try{l=!0,i=r(i,g)}finally{l=!1}return(a=o).forEach(y=>{y()}),g}function h(g){if(typeof g!="function")throw new Error(Oe(10));r=g,d({type:va.REPLACE})}function p(){const g=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(Oe(11));function y(){const _=v;_.next&&_.next(u())}return y(),{unsubscribe:g(y)}},[Dh](){return this}}}return d({type:va.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[Dh]:p}}function dP(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:va.INIT})>"u")throw new Error(Oe(12));if(typeof n(void 0,{type:va.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function Vv(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{dP(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=o[f],p=d(h,s);if(typeof p>"u")throw s&&s.type,new Error(Oe(14));c[f]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?c:o}}function ya(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function hP(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Oe(15))};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=ya(...s)(i.dispatch),{...i,dispatch:a}}}function Hv(e){return Qc(e)&&"type"in e&&typeof e.type=="string"}var Kv=Symbol.for("immer-nothing"),Th=Symbol.for("immer-draftable"),Ce=Symbol.for("immer-state");function nt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var qe=Object,Qn=qe.getPrototypeOf,ba="constructor",so="prototype",Hl="configurable",xa="enumerable",ia="writable",Hr="value",Et=e=>!!e&&!!e[Ce];function st(e){return e?Yv(e)||co(e)||!!e[Th]||!!e[ba]?.[Th]||uo(e)||fo(e):!1}var pP=qe[so][ba].toString(),Ih=new WeakMap;function Yv(e){if(!e||!Jc(e))return!1;const t=Qn(e);if(t===null||t===qe[so])return!0;const n=qe.hasOwnProperty.call(t,ba)&&t[ba];if(n===Object)return!0;if(!Wn(n))return!1;let r=Ih.get(n);return r===void 0&&(r=Function.toString.call(n),Ih.set(n,r)),r===pP}function lo(e,t,n=!0){li(e)===0?(n?Reflect.ownKeys(e):qe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function li(e){const t=e[Ce];return t?t.type_:co(e)?1:uo(e)?2:fo(e)?3:0}var jh=(e,t,n=li(e))=>n===2?e.has(t):qe[so].hasOwnProperty.call(e,t),Kl=(e,t,n=li(e))=>n===2?e.get(t):e[t],_a=(e,t,n,r=li(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function gP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var co=Array.isArray,uo=e=>e instanceof Map,fo=e=>e instanceof Set,Jc=e=>typeof e=="object",Wn=e=>typeof e=="function",Zs=e=>typeof e=="boolean";function mP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Pt=e=>e.copy_||e.base_,eu=e=>e.modified_?e.copy_:e.base_;function Yl(e,t){if(uo(e))return new Map(e);if(fo(e))return new Set(e);if(co(e))return Array[so].slice.call(e);const n=Yv(e);if(t===!0||t==="class_only"&&!n){const r=qe.getOwnPropertyDescriptors(e);delete r[Ce];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s[ia]===!1&&(s[ia]=!0,s[Hl]=!0),(s.get||s.set)&&(r[o]={[Hl]:!0,[ia]:!0,[xa]:s[xa],[Hr]:e[o]})}return qe.create(Qn(e),r)}else{const r=Qn(e);if(r!==null&&n)return{...e};const i=qe.create(r);return qe.assign(i,e)}}function tu(e,t=!1){return ho(e)||Et(e)||!st(e)||(li(e)>1&&qe.defineProperties(e,{set:Wi,add:Wi,clear:Wi,delete:Wi}),qe.freeze(e),t&&lo(e,(n,r)=>{tu(r,!0)},!1)),e}function vP(){nt(2)}var Wi={[Hr]:vP};function ho(e){return e===null||!Jc(e)?!0:qe.isFrozen(e)}var wa="MapSet",Xl="Patches",Rh="ArrayMethods",Xv={};function En(e){const t=Xv[e];return t||nt(0,e),t}var Lh=e=>!!Xv[e],Kr,Gv=()=>Kr,yP=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Lh(wa)?En(wa):void 0,arrayMethodsPlugin_:Lh(Rh)?En(Rh):void 0});function Nh(e,t){t&&(e.patchPlugin_=En(Xl),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gl(e){Zl(e),e.drafts_.forEach(bP),e.drafts_=null}function Zl(e){e===Kr&&(Kr=e.parent_)}var Fh=e=>Kr=yP(Kr,e);function bP(e){const t=e[Ce];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ce].modified_&&(Gl(t),nt(4)),st(e)&&(e=zh(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Ce].base_,e,t)}else e=zh(t,n);return xP(t,e,!0),Gl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kv?e:void 0}function zh(e,t){if(ho(t))return t;const n=t[Ce];if(!n)return Sa(t,e.handledSet_,e);if(!po(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Jv(n,e)}return n.copy_}function xP(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tu(t,n)}function Zv(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var po=(e,t)=>e.scope_===t,_P=[];function Qv(e,t,n,r){const i=Pt(e),a=e.type_;if(r!==void 0&&Kl(i,r,a)===t){_a(i,r,n,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;lo(i,(l,c)=>{if(Et(c)){const u=s.get(c)||[];u.push(l),s.set(c,u)}})}const o=e.draftLocations_.get(t)??_P;for(const s of o)_a(i,s,n,a)}function wP(e,t,n){e.callbacks_.push(function(i){const a=t;if(!a||!po(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=eu(a);Qv(e,a.draft_??a,o,n),Jv(a,i)})}function Jv(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}Zv(e)}}function SP(e,t,n){const{scope_:r}=e;if(Et(n)){const i=n[Ce];po(i,r)&&i.callbacks_.push(function(){aa(e);const o=eu(i);Qv(e,n,o,t)})}else st(n)&&e.callbacks_.push(function(){const a=Pt(e);e.type_===3?a.has(n)&&Sa(n,r.handledSet_,r):Kl(a,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Sa(Kl(e.copy_,t,e.type_),r.handledSet_,r)})}function Sa(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Et(e)||t.has(e)||!st(e)||ho(e)||(t.add(e),lo(e,(r,i)=>{if(Et(i)){const a=i[Ce];if(po(a,n)){const o=eu(a);_a(e,r,o,e.type_),Zv(a)}}else st(i)&&Sa(i,t,n)})),e}function OP(e,t){const n=co(e),r={type_:n?1:0,scope_:t?t.scope_:Gv(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=Oa;n&&(i=[r],a=Yr);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Oa={get(e,t){if(t===Ce)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Pt(e);if(!jh(i,t,e.type_))return PP(e,i,t);const a=i[t];if(e.finalized_||!st(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&mP(t))return a;if(a===Qs(e.base_,t)){aa(e);const o=e.type_===1?+t:t,s=Jl(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in Pt(e)},ownKeys(e){return Reflect.ownKeys(Pt(e))},set(e,t,n){const r=ey(Pt(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Qs(Pt(e),t),a=i?.[Ce];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(gP(n,i)&&(n!==void 0||jh(e.base_,t,e.type_)))return!0;aa(e),Ql(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),SP(e,t,n)),!0},deleteProperty(e,t){return aa(e),Qs(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ql(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Pt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ia]:!0,[Hl]:e.type_!==1||t!=="length",[xa]:r[xa],[Hr]:n[t]}},defineProperty(){nt(11)},getPrototypeOf(e){return Qn(e.base_)},setPrototypeOf(){nt(12)}},Yr={};for(let e in Oa){let t=Oa[e];Yr[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Yr.deleteProperty=function(e,t){return Yr.set.call(this,e,t,void 0)};Yr.set=function(e,t,n){return Oa.set.call(this,e[0],t,n,e[0])};function Qs(e,t){const n=e[Ce];return(n?Pt(n):e)[t]}function PP(e,t,n){const r=ey(t,n);return r?Hr in r?r[Hr]:r.get?.call(e.draft_):void 0}function ey(e,t){if(!(t in e))return;let n=Qn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Qn(n)}}function Ql(e){e.modified_||(e.modified_=!0,e.parent_&&Ql(e.parent_))}function aa(e){e.copy_||(e.assigned_=new Map,e.copy_=Yl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var MP=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Wn(n)&&!Wn(r)){const o=r;r=n;const s=this;return function(c=o,...u){return s.produce(c,f=>r.call(this,f,...u))}}Wn(r)||nt(6),i!==void 0&&!Wn(i)&&nt(7);let a;if(st(n)){const o=Fh(this),s=Jl(o,n,void 0);let l=!0;try{a=r(s),l=!1}finally{l?Gl(o):Zl(o)}return Nh(o,i),Bh(a,o)}else if(!n||!Jc(n)){if(a=r(n),a===void 0&&(a=n),a===Kv&&(a=void 0),this.autoFreeze_&&tu(a,!0),i){const o=[],s=[];En(Xl).generateReplacementPatches_(n,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else nt(1,n)},this.produceWithPatches=(n,r)=>{if(Wn(n))return(s,...l)=>this.produceWithPatches(s,c=>n(c,...l));let i,a;return[this.produce(n,r,(s,l)=>{i=s,a=l}),i,a]},Zs(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Zs(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Zs(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){st(t)||nt(8),Et(t)&&(t=ot(t));const n=Fh(this),r=Jl(n,t,void 0);return r[Ce].isManual_=!0,Zl(n),r}finishDraft(t,n){const r=t&&t[Ce];(!r||!r.isManual_)&&nt(9);const{scope_:i}=r;return Nh(i,n),Bh(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const a=n[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(n=n.slice(r+1));const i=En(Xl).applyPatches_;return Et(t)?i(t,n):this.produce(t,a=>i(a,n))}};function Jl(e,t,n,r){const[i,a]=uo(t)?En(wa).proxyMap_(t,n):fo(t)?En(wa).proxySet_(t,n):OP(t,n);return(n?.scope_??Gv()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?wP(n,a,r):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:c}=l;a.modified_&&c&&c.generatePatches_(a,[],l)}),i}function ot(e){return Et(e)||nt(10,e),ty(e)}function ty(e){if(!st(e)||ho(e))return e;const t=e[Ce];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yl(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Yl(e,!0);return lo(n,(i,a)=>{_a(n,i,ty(a))},r),t&&(t.finalized_=!1),n}var AP=new MP,ny=AP.produce;function ry(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var kP=ry(),CP=ry,EP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ya:ya.apply(null,arguments)};function Je(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ve(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Hv(r)&&r.type===e,n}var iy=class jr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jr.prototype)}static get[Symbol.species](){return jr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jr(...t[0].concat(this)):new jr(...t.concat(this))}};function $h(e){return st(e)?ny(e,()=>{}):e}function qi(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function DP(e){return typeof e=="boolean"}var TP=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new iy;return n&&(DP(n)?o.push(kP):o.push(CP(n.extraArgument))),o},ay="RTK_autoBatch",te=()=>e=>({payload:e,meta:{[ay]:!0}}),Wh=e=>t=>{setTimeout(t,e)},oy=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wh(10):e.type==="callback"?e.queueNotification:Wh(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),d=r.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[ay],a=!i,a&&(o||(o=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},IP=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new iy(e);return r&&i.push(oy(typeof r=="object"?r:void 0)),i};function jP(e){const t=TP(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(Qc(n))s=Vv(n);else throw new Error(Ve(1));let l;typeof r=="function"?l=r(t):l=t();let c=ya;i&&(c=EP({trace:!1,...typeof i=="object"&&i}));const u=hP(...l),f=IP(u);let d=typeof o=="function"?o(f):f();const h=c(...d);return Uv(s,a,h)}function sy(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ve(28));if(s in t)throw new Error(Ve(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function RP(e){return typeof e=="function"}function LP(e,t){let[n,r,i]=sy(t),a;if(RP(e))a=()=>$h(e());else{const s=$h(e);a=()=>s}function o(s=a(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Et(u)){const h=f(u,l);return h===void 0?u:h}else{if(st(u))return ny(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return o.getInitialState=a,o}var NP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",FP=(e=21)=>{let t="",n=e;for(;n--;)t+=NP[Math.random()*64|0];return t},BP=Symbol.for("rtk-slice-createasyncthunk");function zP(e,t){return`${e}/${t}`}function $P({creators:e}={}){const t=e?.asyncThunk?.[BP];return function(r){const{name:i,reducerPath:a=i}=r;if(!i)throw new Error(Ve(11));const o=(typeof r.reducers=="function"?r.reducers(qP()):r.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,_){const x=typeof b=="string"?b:b.type;if(!x)throw new Error(Ve(12));if(x in l.sliceCaseReducersByType)throw new Error(Ve(13));return l.sliceCaseReducersByType[x]=_,c},addMatcher(b,_){return l.sliceMatchers.push({matcher:b,reducer:_}),c},exposeAction(b,_){return l.actionCreators[b]=_,c},exposeCaseReducer(b,_){return l.sliceCaseReducersByName[b]=_,c}};s.forEach(b=>{const _=o[b],x={reducerName:b,type:zP(i,b),createNotation:typeof r.reducers=="function"};VP(_)?KP(x,_,c,t):UP(x,_,c)});function u(){const[b={},_=[],x=void 0]=typeof r.extraReducers=="function"?sy(r.extraReducers):[r.extraReducers],S={...b,...l.sliceCaseReducersByType};return LP(r.initialState,O=>{for(let M in S)O.addCase(M,S[M]);for(let M of l.sliceMatchers)O.addMatcher(M.matcher,M.reducer);for(let M of _)O.addMatcher(M.matcher,M.reducer);x&&O.addDefaultCase(x)})}const f=b=>b,d=new Map,h=new WeakMap;let p;function m(b,_){return p||(p=u()),p(b,_)}function g(){return p||(p=u()),p.getInitialState()}function v(b,_=!1){function x(O){let M=O[b];return typeof M>"u"&&_&&(M=qi(h,x,g)),M}function S(O=f){const M=qi(d,_,()=>new WeakMap);return qi(M,O,()=>{const E={};for(const[j,D]of Object.entries(r.selectors??{}))E[j]=WP(D,O,()=>qi(h,O,g),_);return E})}return{reducerPath:b,getSelectors:S,get selectors(){return S(x)},selectSlice:x}}const y={name:i,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto(b,{reducerPath:_,...x}={}){const S=_??a;return b.inject({reducerPath:S,reducer:m},x),{...y,...v(S,!0)}}};return y}}function WP(e,t,n,r){function i(a,...o){let s=t(a);return typeof s>"u"&&r&&(s=n()),e(s,...o)}return i.unwrapped=e,i}var Ne=$P();function qP(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function UP({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!HP(r))throw new Error(Ve(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Je(e,o):Je(e))}function VP(e){return e._reducerDefinitionType==="asyncThunk"}function HP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function KP({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ve(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:o||Ui,pending:s||Ui,rejected:l||Ui,settled:c||Ui})}function Ui(){}var YP="task",ly="listener",cy="completed",nu="cancelled",XP=`task-${nu}`,GP=`task-${cy}`,ec=`${ly}-${nu}`,ZP=`${ly}-${cy}`,go=class{constructor(e){this.code=e,this.message=`${YP} ${nu} (reason: ${e})`}name="TaskAbortError";message},ru=(e,t)=>{if(typeof e!="function")throw new TypeError(Ve(32))},Pa=()=>{},uy=(e,t=Pa)=>(e.catch(t),e),fy=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),On=e=>{if(e.aborted)throw new go(e.reason)};function dy(e,t){let n=Pa;return new Promise((r,i)=>{const a=()=>i(new go(e.reason));if(e.aborted){a();return}n=fy(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Pa})}var QP=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof go?"cancelled":"rejected",error:n}}finally{t?.()}},Ma=e=>t=>uy(dy(e,t).then(n=>(On(e),n))),hy=e=>{const t=Ma(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Un}=Object,qh={},mo="listenerMiddleware",JP=(e,t)=>{const n=r=>fy(e,()=>r.abort(e.reason));return(r,i)=>{ru(r);const a=new AbortController;n(a);const o=QP(async()=>{On(e),On(a.signal);const s=await r({pause:Ma(a.signal),delay:hy(a.signal),signal:a.signal});return On(a.signal),s},()=>a.abort(GP));return i?.autoJoin&&t.push(o.catch(Pa)),{result:Ma(e)(o),cancel(){a.abort(XP)}}}},eM=(e,t)=>{const n=async(r,i)=>{On(t);let a=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await dy(t,Promise.race(s));return On(t),l}finally{a()}};return(r,i)=>uy(n(r,i))},py=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Je(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ve(21));return ru(a),{predicate:i,type:t,effect:a}},gy=Un(e=>{const{type:t,predicate:n,effect:r}=py(e);return{id:FP(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ve(22))}}},{withTypes:()=>gy}),Uh=(e,t)=>{const{type:n,effect:r,predicate:i}=py(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},tc=e=>{e.pending.forEach(t=>{t.abort(ec)})},tM=(e,t)=>()=>{for(const n of t.keys())tc(n);e.clear()},Vh=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},my=Un(Je(`${mo}/add`),{withTypes:()=>my}),nM=Je(`${mo}/removeAll`),vy=Un(Je(`${mo}/remove`),{withTypes:()=>vy}),rM=(...e)=>{console.error(`${mo}/error`,...e)},ci=(e={})=>{const t=new Map,n=new Map,r=h=>{const p=n.get(h)??0;n.set(h,p+1)},i=h=>{const p=n.get(h)??1;p===1?n.delete(h):n.set(h,p-1)},{extra:a,onError:o=rM}=e;ru(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&tc(h)}),l=h=>{const p=Uh(t,h)??gy(h);return s(p)};Un(l,{withTypes:()=>l});const c=h=>{const p=Uh(t,h);return p&&(p.unsubscribe(),h.cancelActive&&tc(p)),!!p};Un(c,{withTypes:()=>c});const u=async(h,p,m,g)=>{const v=new AbortController,y=eM(l,v.signal),b=[];try{h.pending.add(v),r(h),await Promise.resolve(h.effect(p,Un({},m,{getOriginalState:g,condition:(_,x)=>y(_,x).then(Boolean),take:y,delay:hy(v.signal),pause:Ma(v.signal),extra:a,signal:v.signal,fork:JP(v.signal,b),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,x,S)=>{_!==v&&(_.abort(ec),S.delete(_))})},cancel:()=>{v.abort(ec),h.pending.delete(v)},throwIfCancelled:()=>{On(v.signal)}})))}catch(_){_ instanceof go||Vh(o,_,{raisedBy:"effect"})}finally{await Promise.all(b),v.abort(ZP),i(h),h.pending.delete(v)}},f=tM(t,n);return{middleware:h=>p=>m=>{if(!Hv(m))return p(m);if(my.match(m))return l(m.payload);if(nM.match(m)){f();return}if(vy.match(m))return c(m.payload);let g=h.getState();const v=()=>{if(g===qh)throw new Error(Ve(23));return g};let y;try{if(y=p(m),t.size>0){const b=h.getState(),_=Array.from(t.values());for(const x of _){let S=!1;try{S=x.predicate(m,b,g)}catch(O){S=!1,Vh(o,O,{raisedBy:"predicate"})}S&&u(x,m,h,v)}}}finally{g=qh}return y},startListening:l,stopListening:c,clearListeners:f}};function Ve(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var iM={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},yy=Ne({name:"chartLayout",initialState:iM,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,a;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:aM,setLayout:lL,setChartSize:oM,setScale:sM}=yy.actions,lM=yy.reducer;function by(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Q(e){return Number.isFinite(e)}function Zt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Hh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hh(Object(n),!0).forEach(function(r){cM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cM(e,t,n){return(t=uM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uM(e){var t=fM(e,"string");return typeof t=="symbol"?t:t+""}function fM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ve(e,t,n){return ma(e)||ma(t)?n:Cn(t)?Hc(e,t,n):typeof t=="function"?t(e):n}var dM=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&z(e[a]))return qn(qn({},e),{},{[a]:e[a]+(r||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&z(e[o]))return qn(qn({},e),{},{[o]:e[o]+(i||0)})}return e},Jt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",hM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,s=0;s<n;++s){var l=e[s],c=l?.[i];if(c!=null){var u=c[1],f=c[0],d=sr(u)?f:u;d>=0?(c[0]=a,a+=d,c[1]=a):(c[0]=o,o+=d,c[1]=o)}}}},pM=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var s=e[o],l=s?.[i];if(l!=null){var c=sr(l[1])?l[0]:l[1];c>=0?(l[0]=a,a+=c,l[1]=a):(l[0]=0,l[1]=0)}}}},gM={sign:hM,expand:tO,none:kn,silhouette:nO,wiggle:rO,positive:pM},mM=(e,t,n)=>{var r,i=(r=gM[n])!==null&&r!==void 0?r:kn,a=eO().keys(t).value((s,l)=>Number(ve(s,l,0))).order(Ul).offset(i),o=a(e);return o.forEach((s,l)=>{s.forEach((c,u)=>{var f=ve(e[u],t[l],0);Array.isArray(f)&&f.length===2&&z(f[0])&&z(f[1])&&(c[0]=f[0],c[1]=f[1])})}),o},vM=e=>{var t=e.flat(2).filter(z);return[Math.min(...t),Math.max(...t)]},yM=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],bM=(e,t,n)=>{if(e!=null)return yM(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((l,c)=>{var u=by(c,t,n),f=vM(u);return!Q(f[0])||!Q(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},Kh=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Yh=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xh=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();return r}if(e&&t&&t.length>=2){for(var i=oo(t,u=>u.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var l=i[o],c=i[o-1];a=Math.min((l?.coordinate||0)-(c?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function Gh(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return qn(qn({},t),{},{dataKey:n,payload:r,value:i,name:a})}var xM=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},_M=(e,t)=>t==="centric"?e.angle:e.radius,en=e=>e.layout.width,tn=e=>e.layout.height,wM=e=>e.layout.scale,xy=e=>e.layout.margin,vo=P(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),yo=P(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),SM="data-recharts-item-index",OM="data-recharts-item-id",ui=60;function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(n),!0).forEach(function(r){PM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PM(e,t,n){return(t=MM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MM(e){var t=AM(e,"string");return typeof t=="symbol"?t:t+""}function AM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kM=e=>e.brush.height;function CM(e){var t=yo(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ui;return n+i}return n},0)}function EM(e){var t=yo(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ui;return n+i}return n},0)}function DM(e){var t=vo(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function TM(e){var t=vo(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Ae=P([en,tn,xy,kM,CM,EM,DM,TM,qv,sP],(e,t,n,r,i,a,o,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},f={top:(n.top||0)+o,bottom:(n.bottom||0)+s},d=Vi(Vi({},f),u),h=d.bottom;d.bottom+=r,d=dM(d,l,c);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Vi(Vi({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),IM=P(Ae,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));P(en,tn,(e,t)=>({x:0,y:0,width:e,height:t}));var jM=w.createContext(null),fi=()=>w.useContext(jM)!=null,bo=e=>e.brush,iu=P([bo,Ae,xy],(e,t,n)=>({height:e.height,x:z(e.x)?e.x:t.left,y:z(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:z(e.width)?e.width:t.width})),Js={},el={},tl={},Qh;function RM(){return Qh||(Qh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let o,s=null;const l=a!=null&&a.includes("leading"),c=a==null||a.includes("trailing"),u=()=>{s!==null&&(n.apply(o,s),o=void 0,s=null)},f=()=>{c&&u(),m()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},r)},p=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{p(),o=void 0,s=null},g=()=>{u()},v=function(...y){if(i?.aborted)return;o=this,s=y;const b=d==null;h(),l&&b&&u()};return v.schedule=h,v.cancel=m,v.flush=g,i?.addEventListener("abort",m,{once:!0}),v}e.debounce=t})(tl)),tl}var Jh;function LM(){return Jh||(Jh=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RM();function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:l}=a,c=Array(2);o&&(c[0]="leading"),s&&(c[1]="trailing");let u,f=null;const d=t.debounce(function(...m){u=r.apply(this,m),f=null},i,{edges:c}),h=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(u=r.apply(this,m),f=Date.now(),d.cancel(),d.schedule(),u):(d.apply(this,m),u)},p=()=>(d.flush(),u);return h.cancel=d.cancel,h.flush=p,h}e.debounce=n})(el)),el}var ep;function NM(){return ep||(ep=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LM();function n(r,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(r,i,{leading:o,maxWait:i,trailing:s})}e.throttle=n})(Js)),Js}var nl,tp;function FM(){return tp||(tp=1,nl=NM().throttle),nl}var BM=FM();const zM=Qt(BM);var np=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},gt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},_y=(e,t,n)=>{var{width:r=gt.width,height:i=gt.height,aspect:a,maxHeight:o}=n,s=Vr(r)?e:Number(r),l=Vr(i)?t:Number(i);return a&&a>0&&(s?l=s/a:l&&(s=l*a),o&&l!=null&&l>o&&(l=o)),{calculatedWidth:s,calculatedHeight:l}},$M={width:0,height:0,overflow:"visible"},WM={width:0,overflowX:"visible"},qM={height:0,overflowY:"visible"},UM={},VM=e=>{var{width:t,height:n}=e,r=Vr(t),i=Vr(n);return r&&i?$M:r?WM:i?qM:UM};function HM(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=gt.width,a=gt.height):i===void 0?i=r&&r>0?void 0:gt.width:a===void 0&&(a=r&&r>0?void 0:gt.height),{width:i,height:a}}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nc.apply(null,arguments)}function rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rp(Object(n),!0).forEach(function(r){KM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KM(e,t,n){return(t=YM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YM(e){var t=XM(e,"string");return typeof t=="symbol"?t:t+""}function XM(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wy=w.createContext(gt.initialDimension);function GM(e){return Zt(e.width)&&Zt(e.height)}function Sy(e){var{children:t,width:n,height:r}=e,i=w.useMemo(()=>({width:n,height:r}),[n,r]);return GM(i)?w.createElement(wy.Provider,{value:i},t):null}var au=()=>w.useContext(wy),ZM=w.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=gt.initialDimension,width:i,height:a,minWidth:o=gt.minWidth,minHeight:s,maxHeight:l,children:c,debounce:u=gt.debounce,id:f,className:d,onResize:h,style:p={}}=e,m=w.useRef(null),g=w.useRef();g.current=h,w.useImperativeHandle(t,()=>m.current);var[v,y]=w.useState({containerWidth:r.width,containerHeight:r.height}),b=w.useCallback((M,E)=>{y(j=>{var D=Math.round(M),A=Math.round(E);return j.containerWidth===D&&j.containerHeight===A?j:{containerWidth:D,containerHeight:A}})},[]);w.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return lr;var M=A=>{var N,R=A[0];if(R!=null){var{width:T,height:L}=R.contentRect;b(T,L),(N=g.current)===null||N===void 0||N.call(g,T,L)}};u>0&&(M=zM(M,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(M),{width:j,height:D}=m.current.getBoundingClientRect();return b(j,D),E.observe(m.current),()=>{E.disconnect()}},[b,u]);var{containerWidth:_,containerHeight:x}=v;np(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:S,calculatedHeight:O}=_y(_,x,{width:i,height:a,aspect:n,maxHeight:l});return np(S!=null&&S>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
4
4
|
please check the style of container, or the props width(%s) and height(%s),
|
|
5
5
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
6
6
|
height and width.`,S,O,i,a,o,s,n),w.createElement("div",{id:f?"".concat(f):void 0,className:Ze("recharts-responsive-container",d),style:ip(ip({},p),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:l}),ref:m},w.createElement("div",{style:VM({width:i,height:a})},w.createElement(Sy,{width:S,height:O},c)))}),cL=w.forwardRef((e,t)=>{var n=au();if(Zt(n.width)&&Zt(n.height))return e.children;var{width:r,height:i}=HM({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=_y(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return z(a)&&z(o)?w.createElement(Sy,{width:a,height:o},e.children):w.createElement(ZM,nc({},e,{width:r,height:i,ref:t}))}),ou=()=>{var e,t=fi(),n=K(IM),r=K(iu),i=(e=K(bo))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},QM={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},JM=()=>{var e;return(e=K(Ae))!==null&&e!==void 0?e:QM},eA=()=>K(en),tA=()=>K(tn),ce=e=>e.layout.layoutType,xo=()=>K(ce),Oy=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},nA=()=>{var e=xo();return e!==void 0},di=e=>{var t=Ke(),n=fi(),{width:r,height:i}=e,a=au(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),w.useEffect(()=>{!n&&Zt(o)&&Zt(s)&&t(oM({width:o,height:s}))},[t,n,o,s]),null},rA=e=>{var{margin:t}=e,n=Ke();return w.useEffect(()=>{n(aM(t))},[n,t]),null},Py=Symbol.for("immer-nothing"),ap=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function rt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xr=Object.getPrototypeOf;function Jn(e){return!!e&&!!e[He]}function Dn(e){return e?My(e)||Array.isArray(e)||!!e[ap]||!!e.constructor?.[ap]||hi(e)||wo(e):!1}var iA=Object.prototype.constructor.toString(),op=new WeakMap;function My(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=op.get(n);return r===void 0&&(r=Function.toString.call(n),op.set(n,r)),r===iA}function Aa(e,t,n=!0){_o(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function _o(e){const t=e[He];return t?t.type_:Array.isArray(e)?1:hi(e)?2:wo(e)?3:0}function rc(e,t){return _o(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ay(e,t,n){const r=_o(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function aA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function hi(e){return e instanceof Map}function wo(e){return e instanceof Set}function mn(e){return e.copy_||e.base_}function ic(e,t){if(hi(e))return new Map(e);if(wo(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=My(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[He];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(Xr(e),r)}else{const r=Xr(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function su(e,t=!1){return So(e)||Jn(e)||!Dn(e)||(_o(e)>1&&Object.defineProperties(e,{set:Hi,add:Hi,clear:Hi,delete:Hi}),Object.freeze(e),t&&Object.values(e).forEach(n=>su(n,!0))),e}function oA(){rt(2)}var Hi={value:oA};function So(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var sA={};function Tn(e){const t=sA[e];return t||rt(0,e),t}var Gr;function ky(){return Gr}function lA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function sp(e,t){t&&(Tn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ac(e){oc(e),e.drafts_.forEach(cA),e.drafts_=null}function oc(e){e===Gr&&(Gr=e.parent_)}function lp(e){return Gr=lA(Gr,e)}function cA(e){const t=e[He];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[He].modified_&&(ac(t),rt(4)),Dn(e)&&(e=ka(t,e),t.parent_||Ca(t,e)),t.patches_&&Tn("Patches").generateReplacementPatches_(n[He].base_,e,t.patches_,t.inversePatches_)):e=ka(t,n,[]),ac(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Py?e:void 0}function ka(e,t,n){if(So(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[He];if(!i)return Aa(t,(a,o)=>up(e,i,t,a,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return Ca(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,s=!1;i.type_===3&&(o=new Set(a),a.clear(),s=!0),Aa(o,(l,c)=>up(e,i,a,l,c,n,s),r),Ca(e,a,!1),n&&e.patches_&&Tn("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function up(e,t,n,r,i,a,o){if(i==null||typeof i!="object"&&!o)return;const s=So(i);if(!(s&&!o)){if(Jn(i)){const l=a&&t&&t.type_!==3&&!rc(t.assigned_,r)?a.concat(r):void 0,c=ka(e,i,l);if(Ay(n,r,c),Jn(c))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(Dn(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;ka(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(hi(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Ca(e,i)}}}function Ca(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&su(t,n)}function uA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ky(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=lu;n&&(i=[r],a=Zr);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var lu={get(e,t){if(t===He)return e;const n=mn(e);if(!rc(n,t))return fA(e,n,t);const r=n[t];return e.finalized_||!Dn(r)?r:r===rl(e.base_,t)?(il(e),e.copy_[t]=lc(r,e)):r},has(e,t){return t in mn(e)},ownKeys(e){return Reflect.ownKeys(mn(e))},set(e,t,n){const r=Cy(mn(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=rl(mn(e),t),a=i?.[He];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(aA(n,i)&&(n!==void 0||rc(e.base_,t)))return!0;il(e),sc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return rl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,il(e),sc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=mn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){rt(11)},getPrototypeOf(e){return Xr(e.base_)},setPrototypeOf(){rt(12)}},Zr={};Aa(lu,(e,t)=>{Zr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Zr.deleteProperty=function(e,t){return Zr.set.call(this,e,t,void 0)};Zr.set=function(e,t,n){return lu.set.call(this,e[0],t,n,e[0])};function rl(e,t){const n=e[He];return(n?mn(n):e)[t]}function fA(e,t,n){const r=Cy(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function Cy(e,t){if(!(t in e))return;let n=Xr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Xr(n)}}function sc(e){e.modified_||(e.modified_=!0,e.parent_&&sc(e.parent_))}function il(e){e.copy_||(e.copy_=ic(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(l=a,...c){return o.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&rt(6),r!==void 0&&typeof r!="function"&&rt(7);let i;if(Dn(t)){const a=lp(this),o=lc(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?ac(a):oc(a)}return sp(a,r),cp(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===Py&&(i=void 0),this.autoFreeze_&&su(i,!0),r){const a=[],o=[];Tn("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else rt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let r,i;return[this.produce(t,n,(o,s)=>{r=o,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Dn(e)||rt(8),Jn(e)&&(e=hA(e));const t=lp(this),n=lc(e,void 0);return n[He].isManual_=!0,oc(t),n}finishDraft(e,t){const n=e&&e[He];(!n||!n.isManual_)&&rt(9);const{scope_:r}=n;return sp(r,t),cp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Tn("Patches").applyPatches_;return Jn(e)?r(e,t):this.produce(e,i=>r(i,t))}};function lc(e,t){const n=hi(e)?Tn("MapSet").proxyMap_(e,t):wo(e)?Tn("MapSet").proxySet_(e,t):uA(e,t);return(t?t.scope_:ky()).drafts_.push(n),n}function hA(e){return Jn(e)||rt(10,e),Ey(e)}function Ey(e){if(!Dn(e)||So(e))return e;const t=e[He];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ic(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ic(e,!0);return Aa(n,(i,a)=>{Ay(n,i,Ey(a))},r),t&&(t.finalized_=!1),n}var pA=new dA;pA.produce;var gA={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},Dy=Ne({name:"legend",initialState:gA,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:te()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ot(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:te()},removeLegendPayload:{reducer(e,t){var n=ot(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:te()}}}),{setLegendSize:uL,setLegendSettings:fL,addLegendPayload:dL,replaceLegendPayload:hL,removeLegendPayload:pL}=Dy.actions,mA=Dy.reducer;function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cc.apply(null,arguments)}function fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fp(Object(n),!0).forEach(function(r){vA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vA(e,t,n){return(t=yA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yA(e){var t=bA(e,"string");return typeof t=="symbol"?t:t+""}function bA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xA(e){return Array.isArray(e)&&Cn(e[0])&&Cn(e[1])?e.join(" ~ "):e}var Fn={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},_A=e=>{var{separator:t=Fn.separator,contentStyle:n,itemStyle:r,labelStyle:i=Fn.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:d=Fn.accessibilityLayer}=e,h=()=>{if(a&&a.length){var x={padding:0,margin:0},S=(s?oo(a,s):a).map((O,M)=>{if(O.type==="none")return null;var E=O.formatter||o||xA,{value:j,name:D}=O,A=j,N=D;if(E){var R=E(j,D,O,M,a);if(Array.isArray(R))[A,N]=R;else if(R!=null)A=R;else return null}var T=Sr(Sr({},Fn.itemStyle),{},{color:O.color||Fn.itemStyle.color},r);return w.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:T},Cn(N)?w.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Cn(N)?w.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,w.createElement("span",{className:"recharts-tooltip-item-value"},A),w.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return w.createElement("ul",{className:"recharts-tooltip-item-list",style:x},S)}return null},p=Sr(Sr({},Fn.contentStyle),n),m=Sr({margin:0},i),g=!ma(u),v=g?u:"",y=Ze("recharts-default-tooltip",l),b=Ze("recharts-tooltip-label",c);g&&f&&a!==void 0&&a!==null&&(v=f(u,a));var _=d?{role:"status","aria-live":"assertive"}:{};return w.createElement("div",cc({className:y,style:p},_),w.createElement("p",{className:b,style:m},w.isValidElement(v)?v:"".concat(v)),h())},Or="recharts-tooltip-wrapper",wA={visibility:"hidden"};function SA(e){var{coordinate:t,translateX:n,translateY:r}=e;return Ze(Or,{["".concat(Or,"-right")]:z(n)&&t&&z(t.x)&&n>=t.x,["".concat(Or,"-left")]:z(n)&&t&&z(t.x)&&n<t.x,["".concat(Or,"-bottom")]:z(r)&&t&&z(t.y)&&r>=t.y,["".concat(Or,"-top")]:z(r)&&t&&z(t.y)&&r<t.y})}function dp(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(a&&z(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),f=n[r]+i;if(t[r])return o[r]?u:f;var d=l[r];if(d==null)return 0;if(o[r]){var h=u,p=d;return h<p?Math.max(f,d):Math.max(u,d)}if(c==null)return 0;var m=f+s,g=d+c;return m>g?Math.max(u,d):Math.max(f,d)}function OA(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function PA(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:l,viewBox:c}=e,u,f,d;return s.height>0&&s.width>0&&n?(f=dp({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),d=dp({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=OA({translateX:f,translateY:d,useTranslate3d:l})):u=wA,{cssProperties:u,cssClasses:SA({translateX:f,translateY:d,coordinate:n})}}function hp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hp(Object(n),!0).forEach(function(r){uc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uc(e,t,n){return(t=MA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MA(e){var t=AA(e,"string");return typeof t=="symbol"?t:t+""}function AA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class kA extends w.PureComponent{constructor(){super(...arguments),uc(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),uc(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:a,coordinate:o,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:d,viewBox:h,wrapperStyle:p,lastBoundingBox:m,innerRef:g,hasPortalFromProps:v}=this.props,y=typeof c=="number"?c:c.x,b=typeof c=="number"?c:c.y,{cssClasses:_,cssProperties:x}=PA({allowEscapeViewBox:n,coordinate:o,offsetLeft:y,offsetTop:b,position:u,reverseDirection:f,tooltipBox:{height:m.height,width:m.width},useTranslate3d:d,viewBox:h}),S=v?{}:Ki(Ki({transition:l&&t?"transform ".concat(r,"ms ").concat(i):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),O=Ki(Ki({},S),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},p);return w.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:_,style:O,ref:g},a)}}var CA=()=>{var e;return(e=K(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function fc(){return fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fc.apply(null,arguments)}function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pp(Object(n),!0).forEach(function(r){EA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EA(e,t,n){return(t=DA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DA(e){var t=TA(e,"string");return typeof t=="symbol"?t:t+""}function TA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mp={curveBasisClosed:qS,curveBasisOpen:US,curveBasis:WS,curveBumpX:zS,curveBumpY:$S,curveLinearClosed:VS,curveLinear:io,curveMonotoneX:HS,curveMonotoneY:KS,curveNatural:YS,curveStep:XS,curveStepAfter:ZS,curveStepBefore:GS},Ea=e=>Q(e.x)&&Q(e.y),vp=e=>e.base!=null&&Ea(e.base)&&Ea(e),Pr=e=>e.x,Mr=e=>e.y,IA=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Kc(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=mp["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return mp[n]||io},yp={connectNulls:!1,type:"linear"},jA=e=>{var{type:t=yp.type,points:n=[],baseLine:r,layout:i,connectNulls:a=yp.connectNulls}=e,o=IA(t,i),s=a?n.filter(Ea):n;if(Array.isArray(r)){var l,c=n.map((p,m)=>gp(gp({},p),{},{base:r[m]}));i==="vertical"?l=Fi().y(Mr).x1(Pr).x0(p=>p.base.x):l=Fi().x(Pr).y1(Mr).y0(p=>p.base.y);var u=l.defined(vp).curve(o),f=a?c.filter(vp):c;return u(f)}var d;i==="vertical"&&z(r)?d=Fi().y(Mr).x1(Pr).x0(r):z(r)?d=Fi().x(Pr).y1(Mr).y0(r):d=xv().x(Pr).y(Mr);var h=d.defined(Ea).curve(o);return h(s)},RA=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=xo();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?jA(o):r;return w.createElement("path",fc({},Xn(e),fO(e),{className:Ze("recharts-curve",t),d:s===null?void 0:s,ref:i}))},LA=["x","y","top","left","width","height","className"];function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dc.apply(null,arguments)}function bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bp(Object(n),!0).forEach(function(r){FA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FA(e,t,n){return(t=BA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BA(e){var t=zA(e,"string");return typeof t=="symbol"?t:t+""}function zA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $A(e,t){if(e==null)return{};var n,r,i=WA(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function WA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qA=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),UA=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:s}=e,l=$A(e,LA),c=NA({x:t,y:n,top:r,left:i,width:a,height:o},l);return!z(t)||!z(n)||!z(a)||!z(o)||!z(r)||!z(i)?null:w.createElement("path",dc({},Gn(c),{className:Ze("recharts-cross",s),d:qA(t,n,a,o,r,i)}))};function VA(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xp(Object(n),!0).forEach(function(r){HA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HA(e,t,n){return(t=KA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KA(e){var t=YA(e,"string");return typeof t=="symbol"?t:t+""}function YA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XA=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),GA=(e,t,n)=>e.map(r=>"".concat(XA(r)," ").concat(t,"ms ").concat(n)).join(","),ZA=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Qr=(e,t)=>Object.keys(t).reduce((n,r)=>_p(_p({},n),{},{[r]:e(r,t[r])}),{});function wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wp(Object(n),!0).forEach(function(r){QA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QA(e,t,n){return(t=JA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JA(e){var t=ek(e,"string");return typeof t=="symbol"?t:t+""}function ek(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Da=(e,t,n)=>e+(t-e)*n,hc=e=>{var{from:t,to:n}=e;return t!==n},Ty=(e,t,n)=>{var r=Qr((i,a)=>{if(hc(a)){var[o,s]=e(a.from,a.to,a.velocity);return fe(fe({},a),{},{from:o,velocity:s})}return a},t);return n<1?Qr((i,a)=>hc(a)&&r[i]!=null?fe(fe({},a),{},{velocity:Da(a.velocity,r[i].velocity,n),from:Da(a.from,r[i].from,n)}):a,t):Ty(e,r,n-1)};function tk(e,t,n,r,i,a){var o,s=r.reduce((d,h)=>fe(fe({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>Qr((d,h)=>h.from,s),c=()=>!Object.values(s).filter(hc).length,u=null,f=d=>{o||(o=d);var h=d-o,p=h/n.dt;s=Ty(n,s,p),i(fe(fe(fe({},e),t),l())),o=d,c()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{var d;(d=u)===null||d===void 0||d()})}function nk(e,t,n,r,i,a,o){var s=null,l=i.reduce((f,d)=>{var h=e[d],p=t[d];return h==null||p==null?f:fe(fe({},f),{},{[d]:[h,p]})},{}),c,u=f=>{c||(c=f);var d=(f-c)/r,h=Qr((m,g)=>Da(...g,n(d)),l);if(a(fe(fe(fe({},e),t),h)),d<1)s=o.setTimeout(u);else{var p=Qr((m,g)=>Da(...g,n(1)),l);a(fe(fe(fe({},e),t),p))}};return()=>(s=o.setTimeout(u),()=>{var f;(f=s)===null||f===void 0||f()})}const rk=(e,t,n,r,i,a)=>{var o=ZA(e,t);return n==null?()=>(i(fe(fe({},e),t)),()=>{}):n.isStepper===!0?tk(e,t,n,o,i,a):nk(e,t,n,r,o,i,a)};var Ta=1e-4,Iy=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],jy=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Sp=(e,t)=>n=>{var r=Iy(e,t);return jy(r,n)},ik=(e,t)=>n=>{var r=Iy(e,t),i=[...r.map((a,o)=>a*o).slice(1),0];return jy(i,n)},ak=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},ok=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=ak(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},sk=(e,t,n,r)=>{var i=Sp(e,n),a=Sp(t,r),o=ik(e,n),s=c=>c>1?1:c<0?0:c,l=c=>{for(var u=c>1?1:c,f=u,d=0;d<8;++d){var h=i(f)-u,p=o(f);if(Math.abs(h-u)<Ta||p<Ta)return a(f);f=s(f-h/p)}return a(f)};return l.isStepper=!1,l},Op=function(){return sk(...ok(...arguments))},lk=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,a=(o,s,l)=>{var c=-(o-s)*n,u=l*r,f=l+(c-u)*i/1e3,d=l*i/1e3+o;return Math.abs(d-s)<Ta&&Math.abs(f)<Ta?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},ck=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Op(e);case"spring":return lk();default:if(e.split("(")[0]==="cubic-bezier")return Op(e)}return typeof e=="function"?e:null};function uk(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var s=o,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(a.bind(null,c),l);return}a(l),i=e.setTimeout(a.bind(null,c));return}typeof o=="string"&&(t=o,n(t)),typeof o=="object"&&(t=o,n(t)),typeof o=="function"&&o()}};return{stop:()=>{r=!0},start:o=>{r=!1,i&&(i(),i=null),a(o)},subscribe:o=>(n=o,()=>{n=()=>null}),getTimeoutController:()=>e}}class fk{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,a=o=>{o-r>=n?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function dk(){return uk(new fk)}var hk=w.createContext(dk);function pk(e,t){var n=w.useContext(hk);return w.useMemo(()=>t??n(e),[e,t,n])}var gk=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),mk={isSsr:gk()},vk={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Pp={t:0},al={t:1};function yk(e){var t=si(e,vk),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=n==="auto"?!mk.isSsr:n,f=pk(t.animationId,t.animationManager),[d,h]=w.useState(u?Pp:al),p=w.useRef(null);return w.useEffect(()=>{u||h(al)},[u]),w.useEffect(()=>{if(!u||!r)return lr;var m=rk(Pp,al,ck(a),i,h,f.getTimeoutController()),g=()=>{p.current=m()};return f.start([l,o,g,i,s]),()=>{f.stop(),p.current&&p.current(),s()}},[u,r,i,a,o,l,s,f]),c(d.t)}function bk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=w.useRef(Vl(t)),r=w.useRef(e);return r.current!==e&&(n.current=Vl(t),r.current=e),n.current}var xk=["radius"],_k=["radius"],Mp,Ap,kp,Cp,Ep,Dp,Tp,Ip,jp,Rp;function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lp(Object(n),!0).forEach(function(r){wk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wk(e,t,n){return(t=Sk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sk(e){var t=Ok(e,"string");return typeof t=="symbol"?t:t+""}function Ok(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ia.apply(null,arguments)}function Fp(e,t){if(e==null)return{};var n,r,i=Pk(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ct(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Bp=(e,t,n,r,i)=>{var a=Ut(n),o=Ut(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),l=o>=0?1:-1,c=a>=0?1:-1,u=o>=0&&a>=0||o<0&&a<0?1:0,f;if(s>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0,p=4;h<p;h++){var m,g=(m=i[h])!==null&&m!==void 0?m:0;d[h]=g>s?s:g}f=Pe(Mp||(Mp=ct(["M",",",""])),e,t+l*d[0]),d[0]>0&&(f+=Pe(Ap||(Ap=ct(["A ",",",",0,0,",",",",",""])),d[0],d[0],u,e+c*d[0],t)),f+=Pe(kp||(kp=ct(["L ",",",""])),e+n-c*d[1],t),d[1]>0&&(f+=Pe(Cp||(Cp=ct(["A ",",",",0,0,",`,
|