@8wave/ai-elements 0.125.0-beta.42 → 0.125.0-beta.43

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.
Files changed (129) hide show
  1. package/dist/_chunks/Chart-1vt0m6l_.js +87 -0
  2. package/dist/_chunks/Chart-1vt0m6l_.js.map +1 -0
  3. package/dist/_chunks/{PkChart-CbtMRGWc.js → PkChart-CYFx_UDq.js} +741 -623
  4. package/dist/_chunks/PkChart-CYFx_UDq.js.map +1 -0
  5. package/dist/_chunks/PkFilePreview-yjdtArag.js +1745 -0
  6. package/dist/_chunks/PkFilePreview-yjdtArag.js.map +1 -0
  7. package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js → PkFilePreviewDialog-Df0Lt40J.js} +2 -2
  8. package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js.map → PkFilePreviewDialog-Df0Lt40J.js.map} +1 -1
  9. package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js → PkImageEditorDialog-PVf3IHGB.js} +2 -2
  10. package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js.map → PkImageEditorDialog-PVf3IHGB.js.map} +1 -1
  11. package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js → PkSelectionActions-CMyg_x8h.js} +2 -2
  12. package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js.map → PkSelectionActions-CMyg_x8h.js.map} +1 -1
  13. package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js → PkStreamingMarkdown-BDXbU2tz.js} +2 -2
  14. package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js.map → PkStreamingMarkdown-BDXbU2tz.js.map} +1 -1
  15. package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js → PkToolChatFile-CMQdMs-9.js} +3 -3
  16. package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js.map → PkToolChatFile-CMQdMs-9.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js → PkToolShowArtifact-YrC54qxc.js} +2 -2
  18. package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js.map → PkToolShowArtifact-YrC54qxc.js.map} +1 -1
  19. package/dist/_chunks/PkToolShowChart-D3E_xBJv.js +138 -0
  20. package/dist/_chunks/PkToolShowChart-D3E_xBJv.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js → PkToolShowContactForm-Dio2FNkA.js} +2 -2
  22. package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js.map → PkToolShowContactForm-Dio2FNkA.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js → PkToolShowForm-w9HGhvCy.js} +3 -3
  24. package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js.map → PkToolShowForm-w9HGhvCy.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js → PkToolShowSources-DXFvFHOo.js} +2 -2
  26. package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js.map → PkToolShowSources-DXFvFHOo.js.map} +1 -1
  27. package/dist/_chunks/chartFormat-B1T7y-16.js +27 -0
  28. package/dist/_chunks/chartFormat-B1T7y-16.js.map +1 -0
  29. package/dist/_chunks/{excelNumberFormat-BhQjife9.js → excelNumberFormat-CcXF_wJK.js} +101 -88
  30. package/dist/_chunks/excelNumberFormat-CcXF_wJK.js.map +1 -0
  31. package/dist/_chunks/{utils-DMvy5QRR.js → utils-BBoaLDYF.js} +14 -14
  32. package/dist/_chunks/utils-BBoaLDYF.js.map +1 -0
  33. package/dist/ai-elements.es.js +178 -172
  34. package/dist/ai-elements.es.js.map +1 -1
  35. package/dist-vue/PkChatbot.js +1 -1
  36. package/dist-vue/PkChatbotEmptyState.js +1 -1
  37. package/dist-vue/PkChatbotInput.js +1 -1
  38. package/dist-vue/PkChatbotMessages.js +1 -1
  39. package/dist-vue/PkChatbotStepPayload.js +1 -1
  40. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  41. package/dist-vue/PkChatbotSteps.js +1 -1
  42. package/dist-vue/PkChatbotViewChat.js +1 -1
  43. package/dist-vue/PkChatbotViewConversations.js +1 -1
  44. package/dist-vue/_chunks/Chart-DsBNs5rS.js +87 -0
  45. package/dist-vue/_chunks/Chart-DsBNs5rS.js.map +1 -0
  46. package/dist-vue/_chunks/{PkChart-D-K7nc0g.js → PkChart-CrZqhEpp.js} +112 -74
  47. package/dist-vue/_chunks/PkChart-CrZqhEpp.js.map +1 -0
  48. package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js → PkChatbot-CxkTubw8.js} +6 -6
  49. package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js.map → PkChatbot-CxkTubw8.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js → PkChatbotEmptyState-CUoHkCgO.js} +2 -2
  51. package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js.map → PkChatbotEmptyState-CUoHkCgO.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js → PkChatbotInput-CPf7wqiQ.js} +4 -4
  53. package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js.map → PkChatbotInput-CPf7wqiQ.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js → PkChatbotMessages-CLNu2dTm.js} +307 -307
  55. package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js.map → PkChatbotMessages-CLNu2dTm.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js → PkChatbotStepPayload-Cf7mJPjL.js} +2 -2
  57. package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js.map → PkChatbotStepPayload-Cf7mJPjL.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js → PkChatbotStepToolDetail-D6nwNnHv.js} +16 -16
  59. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js.map → PkChatbotStepToolDetail-D6nwNnHv.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js → PkChatbotSteps-xkxdaX7O.js} +38 -38
  61. package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js.map → PkChatbotSteps-xkxdaX7O.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js → PkChatbotViewChat-BkkyjiFl.js} +22 -22
  63. package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js.map → PkChatbotViewChat-BkkyjiFl.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js → PkChatbotViewConversations-hgqSO1hx.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js.map → PkChatbotViewConversations-hgqSO1hx.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkFilePreview-k5gEl3n8.js → PkFilePreview-CmsT6lSP.js} +701 -624
  67. package/dist-vue/_chunks/PkFilePreview-CmsT6lSP.js.map +1 -0
  68. package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js → PkFilePreviewDialog-DIiTt9iK.js} +2 -2
  69. package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js.map → PkFilePreviewDialog-DIiTt9iK.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js → PkImageEditorDialog-CE0Y5Pwr.js} +2 -2
  71. package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js.map → PkImageEditorDialog-CE0Y5Pwr.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js → PkStreamingMarkdown-BBvCtDlO.js} +2 -2
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js.map → PkStreamingMarkdown-BBvCtDlO.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js → PkToolChatFile-DVhunkPS.js} +3 -3
  75. package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js.map → PkToolChatFile-DVhunkPS.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js → PkToolShowArtifact-DKOTsP9C.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js.map → PkToolShowArtifact-DKOTsP9C.js.map} +1 -1
  78. package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js +133 -0
  79. package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js.map +1 -0
  80. package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js → PkToolShowContactForm-D1Ff15Zf.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js.map → PkToolShowContactForm-D1Ff15Zf.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js → PkToolShowDiagram-CBwqjy6a.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js.map → PkToolShowDiagram-CBwqjy6a.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js → PkToolShowForm-D-rzzwJa.js} +3 -3
  85. package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js.map → PkToolShowForm-D-rzzwJa.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js → PkToolShowImageGallery-Cre2zSGV.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js.map → PkToolShowImageGallery-Cre2zSGV.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js → PkToolShowProductList-D4FAfMS-.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js.map → PkToolShowProductList-D4FAfMS-.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js → PkToolShowSources-BC6YJl-O.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js.map → PkToolShowSources-BC6YJl-O.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js → PkToolShowVideo-CxN7z_cZ.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js.map → PkToolShowVideo-CxN7z_cZ.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js → PkToolShowWebPages-0Ux6n8G1.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js.map → PkToolShowWebPages-0Ux6n8G1.js.map} +1 -1
  96. package/dist-vue/_chunks/chartFormat-B1T7y-16.js +27 -0
  97. package/dist-vue/_chunks/chartFormat-B1T7y-16.js.map +1 -0
  98. package/dist-vue/_chunks/{excelNumberFormat-C1sCQrOz.js → excelNumberFormat-BxRi0Y3e.js} +101 -88
  99. package/dist-vue/_chunks/excelNumberFormat-BxRi0Y3e.js.map +1 -0
  100. package/dist-vue/_chunks/{utils-KBB6SDPn.js → utils-C9l078yb.js} +10 -10
  101. package/dist-vue/_chunks/utils-C9l078yb.js.map +1 -0
  102. package/dist-vue/composables.js +9 -3
  103. package/dist-vue/composables.js.map +1 -1
  104. package/dist-vue/index.js +42 -42
  105. package/dist-vue/index.js.map +1 -1
  106. package/dist-vue/locales.js +6 -0
  107. package/dist-vue/packages/components/src/chat/PkChart.d.ts +8 -0
  108. package/dist-vue/packages/components/src/chat/PkFileChart.d.ts +14 -0
  109. package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +4 -1
  110. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +240 -0
  111. package/dist-vue/packages/components/src/chat/utils.d.ts +6 -1
  112. package/dist-vue/packages/models/src/schema/Chart.d.ts +91 -0
  113. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +381 -0
  114. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +304 -0
  115. package/dist-vue/style.css +1 -1
  116. package/package.json +1 -1
  117. package/dist/_chunks/PkChart-CbtMRGWc.js.map +0 -1
  118. package/dist/_chunks/PkFilePreview-DC4iX7Yc.js +0 -1665
  119. package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +0 -1
  120. package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js +0 -224
  121. package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js.map +0 -1
  122. package/dist/_chunks/excelNumberFormat-BhQjife9.js.map +0 -1
  123. package/dist/_chunks/utils-DMvy5QRR.js.map +0 -1
  124. package/dist-vue/_chunks/PkChart-D-K7nc0g.js.map +0 -1
  125. package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +0 -1
  126. package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js +0 -217
  127. package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js.map +0 -1
  128. package/dist-vue/_chunks/excelNumberFormat-C1sCQrOz.js.map +0 -1
  129. package/dist-vue/_chunks/utils-KBB6SDPn.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import { F as e, I as t, L as n, Q as r, X as i, g as a, k as o, w as s, y as c, z as l } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
2
2
  import { r as u } from "./vue-i18n-POtLvOl1.js";
3
- import { t as d } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
- import { n as f, r as p } from "./PkToolShowChart-DZWu3Yuo.js";
3
+ import { r as d } from "./Chart-1vt0m6l_.js";
4
+ import { t as f } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
5
+ import { n as p } from "./chartFormat-B1T7y-16.js";
5
6
  // ../../packages/composable/src/cssColor.ts
6
7
  var m, h = () => typeof CSS < "u" && CSS.supports("color", "color(from red xyz-d65 x y z)") && CSS.supports("color", "color-mix(in srgb, red 50%, blue)"), g = (e) => Math.round(Math.min(1, Math.max(0, Number(e))) * 255);
7
8
  function _(e) {
@@ -1201,16 +1202,16 @@ function mn(e, t, n, r, i) {
1201
1202
  e.fill(), t.borderWidth > 0 && e.stroke();
1202
1203
  }
1203
1204
  }
1204
- function q(e, t, n) {
1205
+ function hn(e, t, n) {
1205
1206
  return n ||= .5, !t || e && e.x > t.left - n && e.x < t.right + n && e.y > t.top - n && e.y < t.bottom + n;
1206
1207
  }
1207
- function hn(e, t) {
1208
+ function gn(e, t) {
1208
1209
  e.save(), e.beginPath(), e.rect(t.left, t.top, t.right - t.left, t.bottom - t.top), e.clip();
1209
1210
  }
1210
- function gn(e) {
1211
+ function _n(e) {
1211
1212
  e.restore();
1212
1213
  }
1213
- function _n(e, t, n, r, i) {
1214
+ function vn(e, t, n, r, i) {
1214
1215
  if (!t) return e.lineTo(n.x, n.y);
1215
1216
  if (i === "middle") {
1216
1217
  let r = (t.x + n.x) / 2;
@@ -1218,35 +1219,35 @@ function _n(e, t, n, r, i) {
1218
1219
  } else i === "after" == !!r ? e.lineTo(n.x, t.y) : e.lineTo(t.x, n.y);
1219
1220
  e.lineTo(n.x, n.y);
1220
1221
  }
1221
- function vn(e, t, n, r) {
1222
+ function yn(e, t, n, r) {
1222
1223
  if (!t) return e.lineTo(n.x, n.y);
1223
1224
  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);
1224
1225
  }
1225
- function yn(e, t) {
1226
+ function bn(e, t) {
1226
1227
  t.translation && e.translate(t.translation[0], t.translation[1]), A(t.rotation) || e.rotate(t.rotation), t.color && (e.fillStyle = t.color), t.textAlign && (e.textAlign = t.textAlign), t.textBaseline && (e.textBaseline = t.textBaseline);
1227
1228
  }
1228
- function bn(e, t, n, r, i) {
1229
+ function xn(e, t, n, r, i) {
1229
1230
  if (i.strikethrough || i.underline) {
1230
1231
  let a = e.measureText(r), o = t - a.actualBoundingBoxLeft, s = t + a.actualBoundingBoxRight, c = n - a.actualBoundingBoxAscent, l = n + a.actualBoundingBoxDescent, u = i.strikethrough ? (c + l) / 2 : l;
1231
1232
  e.strokeStyle = e.fillStyle, e.beginPath(), e.lineWidth = i.decorationWidth || 2, e.moveTo(o, u), e.lineTo(s, u), e.stroke();
1232
1233
  }
1233
1234
  }
1234
- function xn(e, t) {
1235
+ function Sn(e, t) {
1235
1236
  let n = e.fillStyle;
1236
1237
  e.fillStyle = t.color, e.fillRect(t.left, t.top, t.width, t.height), e.fillStyle = n;
1237
1238
  }
1238
- function Sn(e, t, n, r, i, a = {}) {
1239
+ function Cn(e, t, n, r, i, a = {}) {
1239
1240
  let o = j(t) ? t : [t], s = a.strokeWidth > 0 && a.strokeColor !== "", c, l;
1240
- for (e.save(), e.font = i.string, yn(e, a), c = 0; c < o.length; ++c) l = o[c], a.backdrop && xn(e, a.backdrop), s && (a.strokeColor && (e.strokeStyle = a.strokeColor), A(a.strokeWidth) || (e.lineWidth = a.strokeWidth), e.strokeText(l, n, r, a.maxWidth)), e.fillText(l, n, r, a.maxWidth), bn(e, n, r, l, a), r += Number(i.lineHeight);
1241
+ for (e.save(), e.font = i.string, bn(e, a), c = 0; c < o.length; ++c) l = o[c], a.backdrop && Sn(e, a.backdrop), s && (a.strokeColor && (e.strokeStyle = a.strokeColor), A(a.strokeWidth) || (e.lineWidth = a.strokeWidth), e.strokeText(l, n, r, a.maxWidth)), e.fillText(l, n, r, a.maxWidth), xn(e, n, r, l, a), r += Number(i.lineHeight);
1241
1242
  e.restore();
1242
1243
  }
1243
- function Cn(e, t) {
1244
+ function wn(e, t) {
1244
1245
  let { x: n, y: r, w: i, h: a, radius: o } = t;
1245
1246
  e.arc(n + o.topLeft, r + o.topLeft, o.topLeft, 1.5 * R, R, !0), e.lineTo(n, r + a - o.bottomLeft), e.arc(n + o.bottomLeft, r + a - o.bottomLeft, o.bottomLeft, R, B, !0), e.lineTo(n + i - o.bottomRight, r + a), e.arc(n + i - o.bottomRight, r + a - o.bottomRight, o.bottomRight, B, 0, !0), e.lineTo(n + i, r + o.topRight), e.arc(n + i - o.topRight, r + o.topRight, o.topRight, 0, -B, !0), e.lineTo(n + o.topLeft, r);
1246
1247
  }
1247
- var wn = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, Tn = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
1248
- function En(e, t) {
1249
- let n = ("" + e).match(wn);
1248
+ var Tn = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, En = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
1249
+ function Dn(e, t) {
1250
+ let n = ("" + e).match(Tn);
1250
1251
  if (!n || n[1] === "normal") return t * 1.2;
1251
1252
  switch (e = +n[2], n[3]) {
1252
1253
  case "px": return e;
@@ -1254,41 +1255,41 @@ function En(e, t) {
1254
1255
  }
1255
1256
  return t * e;
1256
1257
  }
1257
- var Dn = (e) => +e || 0;
1258
- function On(e, t) {
1258
+ var On = (e) => +e || 0;
1259
+ function kn(e, t) {
1259
1260
  let n = {}, r = M(t), i = r ? Object.keys(t) : t, a = M(e) ? r ? (n) => F(e[n], e[t[n]]) : (t) => e[t] : () => e;
1260
- for (let e of i) n[e] = Dn(a(e));
1261
+ for (let e of i) n[e] = On(a(e));
1261
1262
  return n;
1262
1263
  }
1263
- function kn(e) {
1264
- return On(e, {
1264
+ function An(e) {
1265
+ return kn(e, {
1265
1266
  top: "y",
1266
1267
  right: "x",
1267
1268
  bottom: "y",
1268
1269
  left: "x"
1269
1270
  });
1270
1271
  }
1271
- function An(e) {
1272
- return On(e, [
1272
+ function jn(e) {
1273
+ return kn(e, [
1273
1274
  "topLeft",
1274
1275
  "topRight",
1275
1276
  "bottomLeft",
1276
1277
  "bottomRight"
1277
1278
  ]);
1278
1279
  }
1279
- function J(e) {
1280
- let t = kn(e);
1280
+ function q(e) {
1281
+ let t = An(e);
1281
1282
  return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
1282
1283
  }
1283
- function Y(e, t) {
1284
+ function J(e, t) {
1284
1285
  e ||= {}, t ||= K.font;
1285
1286
  let n = F(e.size, t.size);
1286
1287
  typeof n == "string" && (n = parseInt(n, 10));
1287
1288
  let r = F(e.style, t.style);
1288
- r && !("" + r).match(Tn) && (console.warn("Invalid font style specified: \"" + r + "\""), r = void 0);
1289
+ r && !("" + r).match(En) && (console.warn("Invalid font style specified: \"" + r + "\""), r = void 0);
1289
1290
  let i = {
1290
1291
  family: F(e.family, t.family),
1291
- lineHeight: En(F(e.lineHeight, t.lineHeight), n),
1292
+ lineHeight: Dn(F(e.lineHeight, t.lineHeight), n),
1292
1293
  size: n,
1293
1294
  style: r,
1294
1295
  weight: F(e.weight, t.weight),
@@ -1296,36 +1297,36 @@ function Y(e, t) {
1296
1297
  };
1297
1298
  return i.string = cn(i), i;
1298
1299
  }
1299
- function jn(e, t, n, r) {
1300
+ function Mn(e, t, n, r) {
1300
1301
  let i = !0, a, o, s;
1301
1302
  for (a = 0, o = e.length; a < o; ++a) if (s = e[a], s !== void 0 && (t !== void 0 && typeof s == "function" && (s = s(t), i = !1), n !== void 0 && j(s) && (s = s[n % s.length], i = !1), s !== void 0)) return r && !i && (r.cacheable = !1), s;
1302
1303
  }
1303
- function Mn(e, t, n) {
1304
+ function Nn(e, t, n) {
1304
1305
  let { min: r, max: i } = e, a = Be(t, (i - r) / 2), o = (e, t) => n && e === 0 ? 0 : e + t;
1305
1306
  return {
1306
1307
  min: o(r, -Math.abs(a)),
1307
1308
  max: o(i, a)
1308
1309
  };
1309
1310
  }
1310
- function Nn(e, t) {
1311
+ function Pn(e, t) {
1311
1312
  return Object.assign(Object.create(e), t);
1312
1313
  }
1313
- function Pn(e, t = [""], n, r, i = () => e[0]) {
1314
+ function Fn(e, t = [""], n, r, i = () => e[0]) {
1314
1315
  let a = n || e;
1315
- return r === void 0 && (r = Xn("_fallback", e)), new Proxy({
1316
+ return r === void 0 && (r = Zn("_fallback", e)), new Proxy({
1316
1317
  [Symbol.toStringTag]: "Object",
1317
1318
  _cacheable: !0,
1318
1319
  _scopes: e,
1319
1320
  _rootScopes: a,
1320
1321
  _fallback: r,
1321
1322
  _getTarget: i,
1322
- override: (n) => Pn([n, ...e], t, a, r)
1323
+ override: (n) => Fn([n, ...e], t, a, r)
1323
1324
  }, {
1324
1325
  deleteProperty(t, n) {
1325
1326
  return delete t[n], delete t._keys, delete e[0][n], !0;
1326
1327
  },
1327
1328
  get(n, r) {
1328
- return zn(n, r, () => Yn(r, t, e, n));
1329
+ return Bn(n, r, () => Xn(r, t, e, n));
1329
1330
  },
1330
1331
  getOwnPropertyDescriptor(e, t) {
1331
1332
  return Reflect.getOwnPropertyDescriptor(e._scopes[0], t);
@@ -1334,10 +1335,10 @@ function Pn(e, t = [""], n, r, i = () => e[0]) {
1334
1335
  return Reflect.getPrototypeOf(e[0]);
1335
1336
  },
1336
1337
  has(e, t) {
1337
- return Zn(e).includes(t);
1338
+ return Qn(e).includes(t);
1338
1339
  },
1339
1340
  ownKeys(e) {
1340
- return Zn(e);
1341
+ return Qn(e);
1341
1342
  },
1342
1343
  set(e, t, n) {
1343
1344
  let r = e._storage ||= i();
@@ -1345,23 +1346,23 @@ function Pn(e, t = [""], n, r, i = () => e[0]) {
1345
1346
  }
1346
1347
  });
1347
1348
  }
1348
- function Fn(e, t, n, r) {
1349
+ function In(e, t, n, r) {
1349
1350
  let i = {
1350
1351
  _cacheable: !1,
1351
1352
  _proxy: e,
1352
1353
  _context: t,
1353
1354
  _subProxy: n,
1354
1355
  _stack: /* @__PURE__ */ new Set(),
1355
- _descriptors: In(e, r),
1356
- setContext: (t) => Fn(e, t, n, r),
1357
- override: (i) => Fn(e.override(i), t, n, r)
1356
+ _descriptors: Ln(e, r),
1357
+ setContext: (t) => In(e, t, n, r),
1358
+ override: (i) => In(e.override(i), t, n, r)
1358
1359
  };
1359
1360
  return new Proxy(i, {
1360
1361
  deleteProperty(t, n) {
1361
1362
  return delete t[n], delete e[n], !0;
1362
1363
  },
1363
1364
  get(e, t, n) {
1364
- return zn(e, t, () => Bn(e, t, n));
1365
+ return Bn(e, t, () => Vn(e, t, n));
1365
1366
  },
1366
1367
  getOwnPropertyDescriptor(t, n) {
1367
1368
  return t._descriptors.allKeys ? Reflect.has(e, n) ? {
@@ -1383,7 +1384,7 @@ function Fn(e, t, n, r) {
1383
1384
  }
1384
1385
  });
1385
1386
  }
1386
- function In(e, t = {
1387
+ function Ln(e, t = {
1387
1388
  scriptable: !0,
1388
1389
  indexable: !0
1389
1390
  }) {
@@ -1396,89 +1397,89 @@ function In(e, t = {
1396
1397
  isIndexable: et(r) ? r : () => r
1397
1398
  };
1398
1399
  }
1399
- var Ln = (e, t) => e ? e + Qe(t) : t, Rn = (e, t) => M(t) && e !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
1400
- function zn(e, t, n) {
1400
+ var Rn = (e, t) => e ? e + Qe(t) : t, zn = (e, t) => M(t) && e !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
1401
+ function Bn(e, t, n) {
1401
1402
  if (Object.prototype.hasOwnProperty.call(e, t) || t === "constructor") return e[t];
1402
1403
  let r = n();
1403
1404
  return e[t] = r, r;
1404
1405
  }
1405
- function Bn(e, t, n) {
1406
+ function Vn(e, t, n) {
1406
1407
  let { _proxy: r, _context: i, _subProxy: a, _descriptors: o } = e, s = r[t];
1407
- return et(s) && o.isScriptable(t) && (s = Vn(t, s, e, n)), j(s) && s.length && (s = Hn(t, s, e, o.isIndexable)), Rn(t, s) && (s = Fn(s, i, a && a[t], o)), s;
1408
+ return et(s) && o.isScriptable(t) && (s = Hn(t, s, e, n)), j(s) && s.length && (s = Un(t, s, e, o.isIndexable)), zn(t, s) && (s = In(s, i, a && a[t], o)), s;
1408
1409
  }
1409
- function Vn(e, t, n, r) {
1410
+ function Hn(e, t, n, r) {
1410
1411
  let { _proxy: i, _context: a, _subProxy: o, _stack: s } = n;
1411
1412
  if (s.has(e)) throw Error("Recursion detected: " + Array.from(s).join("->") + "->" + e);
1412
1413
  s.add(e);
1413
1414
  let c = t(a, o || r);
1414
- return s.delete(e), Rn(e, c) && (c = Kn(i._scopes, i, e, c)), c;
1415
+ return s.delete(e), zn(e, c) && (c = qn(i._scopes, i, e, c)), c;
1415
1416
  }
1416
- function Hn(e, t, n, r) {
1417
+ function Un(e, t, n, r) {
1417
1418
  let { _proxy: i, _context: a, _subProxy: o, _descriptors: s } = n;
1418
1419
  if (a.index !== void 0 && r(e)) return t[a.index % t.length];
1419
1420
  if (M(t[0])) {
1420
1421
  let n = t, r = i._scopes.filter((e) => e !== n);
1421
1422
  t = [];
1422
1423
  for (let c of n) {
1423
- let n = Kn(r, i, e, c);
1424
- t.push(Fn(n, a, o && o[e], s));
1424
+ let n = qn(r, i, e, c);
1425
+ t.push(In(n, a, o && o[e], s));
1425
1426
  }
1426
1427
  }
1427
1428
  return t;
1428
1429
  }
1429
- function Un(e, t, n) {
1430
+ function Wn(e, t, n) {
1430
1431
  return et(e) ? e(t, n) : e;
1431
1432
  }
1432
- var Wn = (e, t) => e === !0 ? t : typeof e == "string" ? Ze(t, e) : void 0;
1433
- function Gn(e, t, n, r, i) {
1433
+ var Gn = (e, t) => e === !0 ? t : typeof e == "string" ? Ze(t, e) : void 0;
1434
+ function Kn(e, t, n, r, i) {
1434
1435
  for (let a of t) {
1435
- let t = Wn(n, a);
1436
+ let t = Gn(n, a);
1436
1437
  if (t) {
1437
1438
  e.add(t);
1438
- let a = Un(t._fallback, n, i);
1439
+ let a = Wn(t._fallback, n, i);
1439
1440
  if (a !== void 0 && a !== n && a !== r) return a;
1440
1441
  } else if (t === !1 && r !== void 0 && n !== r) return null;
1441
1442
  }
1442
1443
  return !1;
1443
1444
  }
1444
- function Kn(e, t, n, r) {
1445
- let i = t._rootScopes, a = Un(t._fallback, n, r), o = [...e, ...i], s = /* @__PURE__ */ new Set();
1445
+ function qn(e, t, n, r) {
1446
+ let i = t._rootScopes, a = Wn(t._fallback, n, r), o = [...e, ...i], s = /* @__PURE__ */ new Set();
1446
1447
  s.add(r);
1447
- let c = qn(s, o, n, a || n, r);
1448
- return c === null || a !== void 0 && a !== n && (c = qn(s, o, a, c, r), c === null) ? !1 : Pn(Array.from(s), [""], i, a, () => Jn(t, n, r));
1448
+ let c = Jn(s, o, n, a || n, r);
1449
+ return c === null || a !== void 0 && a !== n && (c = Jn(s, o, a, c, r), c === null) ? !1 : Fn(Array.from(s), [""], i, a, () => Yn(t, n, r));
1449
1450
  }
1450
- function qn(e, t, n, r, i) {
1451
- for (; n;) n = Gn(e, t, n, r, i);
1451
+ function Jn(e, t, n, r, i) {
1452
+ for (; n;) n = Kn(e, t, n, r, i);
1452
1453
  return n;
1453
1454
  }
1454
- function Jn(e, t, n) {
1455
+ function Yn(e, t, n) {
1455
1456
  let r = e._getTarget();
1456
1457
  t in r || (r[t] = {});
1457
1458
  let i = r[t];
1458
1459
  return j(i) && M(n) ? n : i || {};
1459
1460
  }
1460
- function Yn(e, t, n, r) {
1461
+ function Xn(e, t, n, r) {
1461
1462
  let i;
1462
- for (let a of t) if (i = Xn(Ln(a, e), n), i !== void 0) return Rn(e, i) ? Kn(n, r, e, i) : i;
1463
+ for (let a of t) if (i = Zn(Rn(a, e), n), i !== void 0) return zn(e, i) ? qn(n, r, e, i) : i;
1463
1464
  }
1464
- function Xn(e, t) {
1465
+ function Zn(e, t) {
1465
1466
  for (let n of t) {
1466
1467
  if (!n) continue;
1467
1468
  let t = n[e];
1468
1469
  if (t !== void 0) return t;
1469
1470
  }
1470
1471
  }
1471
- function Zn(e) {
1472
+ function Qn(e) {
1472
1473
  let t = e._keys;
1473
- return t ||= e._keys = Qn(e._scopes), t;
1474
+ return t ||= e._keys = $n(e._scopes), t;
1474
1475
  }
1475
- function Qn(e) {
1476
+ function $n(e) {
1476
1477
  let t = /* @__PURE__ */ new Set();
1477
1478
  for (let n of e) for (let e of Object.keys(n).filter((e) => !e.startsWith("_"))) t.add(e);
1478
1479
  return Array.from(t);
1479
1480
  }
1480
- var $n = 2 ** -52 || 1e-14, er = (e, t) => t < e.length && !e[t].skip && e[t], tr = (e) => e === "x" ? "y" : "x";
1481
- function nr(e, t, n, r) {
1481
+ var er = 2 ** -52 || 1e-14, tr = (e, t) => t < e.length && !e[t].skip && e[t], nr = (e) => e === "x" ? "y" : "x";
1482
+ function rr(e, t, n, r) {
1482
1483
  let i = e.skip ? t : e, a = t, o = n.skip ? t : n, s = yt(a, i), c = yt(o, a), l = s / (s + c), u = c / (s + c);
1483
1484
  l = isNaN(l) ? 0 : l, u = isNaN(u) ? 0 : u;
1484
1485
  let d = r * l, f = r * u;
@@ -1493,79 +1494,79 @@ function nr(e, t, n, r) {
1493
1494
  }
1494
1495
  };
1495
1496
  }
1496
- function rr(e, t, n) {
1497
- let r = e.length, i, a, o, s, c, l = er(e, 0);
1498
- for (let u = 0; u < r - 1; ++u) c = l, l = er(e, u + 1), c && l && (lt(t[u], 0, $n) ? n[u] = n[u + 1] = 0 : (i = n[u] / t[u], a = n[u + 1] / t[u], s = i ** 2 + a ** 2, !(s <= 9) && (o = 3 / Math.sqrt(s), n[u] = i * o * t[u], n[u + 1] = a * o * t[u])));
1497
+ function ir(e, t, n) {
1498
+ let r = e.length, i, a, o, s, c, l = tr(e, 0);
1499
+ for (let u = 0; u < r - 1; ++u) c = l, l = tr(e, u + 1), c && l && (lt(t[u], 0, er) ? n[u] = n[u + 1] = 0 : (i = n[u] / t[u], a = n[u + 1] / t[u], s = i ** 2 + a ** 2, !(s <= 9) && (o = 3 / Math.sqrt(s), n[u] = i * o * t[u], n[u + 1] = a * o * t[u])));
1499
1500
  }
1500
- function ir(e, t, n = "x") {
1501
- let r = tr(n), i = e.length, a, o, s, c = er(e, 0);
1501
+ function ar(e, t, n = "x") {
1502
+ let r = nr(n), i = e.length, a, o, s, c = tr(e, 0);
1502
1503
  for (let l = 0; l < i; ++l) {
1503
- if (o = s, s = c, c = er(e, l + 1), !s) continue;
1504
+ if (o = s, s = c, c = tr(e, l + 1), !s) continue;
1504
1505
  let i = s[n], u = s[r];
1505
1506
  o && (a = (i - o[n]) / 3, s[`cp1${n}`] = i - a, s[`cp1${r}`] = u - a * t[l]), c && (a = (c[n] - i) / 3, s[`cp2${n}`] = i + a, s[`cp2${r}`] = u + a * t[l]);
1506
1507
  }
1507
1508
  }
1508
- function ar(e, t = "x") {
1509
- let n = tr(t), r = e.length, i = Array(r).fill(0), a = Array(r), o, s, c, l = er(e, 0);
1510
- for (o = 0; o < r; ++o) if (s = c, c = l, l = er(e, o + 1), c) {
1509
+ function or(e, t = "x") {
1510
+ let n = nr(t), r = e.length, i = Array(r).fill(0), a = Array(r), o, s, c, l = tr(e, 0);
1511
+ for (o = 0; o < r; ++o) if (s = c, c = l, l = tr(e, o + 1), c) {
1511
1512
  if (l) {
1512
1513
  let e = l[t] - c[t];
1513
1514
  i[o] = e === 0 ? 0 : (l[n] - c[n]) / e;
1514
1515
  }
1515
1516
  a[o] = s ? l ? V(i[o - 1]) === V(i[o]) ? (i[o - 1] + i[o]) / 2 : 0 : i[o - 1] : i[o];
1516
1517
  }
1517
- rr(e, i, a), ir(e, a, t);
1518
+ ir(e, i, a), ar(e, a, t);
1518
1519
  }
1519
- function or(e, t, n) {
1520
+ function sr(e, t, n) {
1520
1521
  return Math.max(Math.min(e, n), t);
1521
1522
  }
1522
- function sr(e, t) {
1523
- let n, r, i, a, o, s = q(e[0], t);
1524
- for (n = 0, r = e.length; n < r; ++n) o = a, a = s, s = n < r - 1 && q(e[n + 1], t), a && (i = e[n], o && (i.cp1x = or(i.cp1x, t.left, t.right), i.cp1y = or(i.cp1y, t.top, t.bottom)), s && (i.cp2x = or(i.cp2x, t.left, t.right), i.cp2y = or(i.cp2y, t.top, t.bottom)));
1523
+ function cr(e, t) {
1524
+ let n, r, i, a, o, s = hn(e[0], t);
1525
+ for (n = 0, r = e.length; n < r; ++n) o = a, a = s, s = n < r - 1 && hn(e[n + 1], t), a && (i = e[n], o && (i.cp1x = sr(i.cp1x, t.left, t.right), i.cp1y = sr(i.cp1y, t.top, t.bottom)), s && (i.cp2x = sr(i.cp2x, t.left, t.right), i.cp2y = sr(i.cp2y, t.top, t.bottom)));
1525
1526
  }
1526
- function cr(e, t, n, r, i) {
1527
+ function lr(e, t, n, r, i) {
1527
1528
  let a, o, s, c;
1528
- if (t.spanGaps && (e = e.filter((e) => !e.skip)), t.cubicInterpolationMode === "monotone") ar(e, i);
1529
+ if (t.spanGaps && (e = e.filter((e) => !e.skip)), t.cubicInterpolationMode === "monotone") or(e, i);
1529
1530
  else {
1530
1531
  let n = r ? e[e.length - 1] : e[0];
1531
- for (a = 0, o = e.length; a < o; ++a) s = e[a], c = nr(n, s, e[Math.min(a + 1, o - +!r) % o], t.tension), s.cp1x = c.previous.x, s.cp1y = c.previous.y, s.cp2x = c.next.x, s.cp2y = c.next.y, n = s;
1532
+ for (a = 0, o = e.length; a < o; ++a) s = e[a], c = rr(n, s, e[Math.min(a + 1, o - +!r) % o], t.tension), s.cp1x = c.previous.x, s.cp1y = c.previous.y, s.cp2x = c.next.x, s.cp2y = c.next.y, n = s;
1532
1533
  }
1533
- t.capBezierPoints && sr(e, n);
1534
+ t.capBezierPoints && cr(e, n);
1534
1535
  }
1535
- function lr() {
1536
+ function ur() {
1536
1537
  return typeof window < "u" && typeof document < "u";
1537
1538
  }
1538
- function ur(e) {
1539
+ function dr(e) {
1539
1540
  let t = e.parentNode;
1540
1541
  return t && t.toString() === "[object ShadowRoot]" && (t = t.host), t;
1541
1542
  }
1542
- function dr(e, t, n) {
1543
+ function fr(e, t, n) {
1543
1544
  let r;
1544
1545
  return typeof e == "string" ? (r = parseInt(e, 10), e.indexOf("%") !== -1 && (r = r / 100 * t.parentNode[n])) : r = e, r;
1545
1546
  }
1546
- var fr = (e) => e.ownerDocument.defaultView.getComputedStyle(e, null);
1547
- function pr(e, t) {
1548
- return fr(e).getPropertyValue(t);
1547
+ var pr = (e) => e.ownerDocument.defaultView.getComputedStyle(e, null);
1548
+ function mr(e, t) {
1549
+ return pr(e).getPropertyValue(t);
1549
1550
  }
1550
- var mr = [
1551
+ var hr = [
1551
1552
  "top",
1552
1553
  "right",
1553
1554
  "bottom",
1554
1555
  "left"
1555
1556
  ];
1556
- function hr(e, t, n) {
1557
+ function gr(e, t, n) {
1557
1558
  let r = {};
1558
1559
  n = n ? "-" + n : "";
1559
1560
  for (let i = 0; i < 4; i++) {
1560
- let a = mr[i];
1561
+ let a = hr[i];
1561
1562
  r[a] = parseFloat(e[t + "-" + a + n]) || 0;
1562
1563
  }
1563
1564
  return r.width = r.left + r.right, r.height = r.top + r.bottom, r;
1564
1565
  }
1565
- var gr = (e, t, n) => (e > 0 || t > 0) && (!n || !n.shadowRoot);
1566
- function _r(e, t) {
1566
+ var _r = (e, t, n) => (e > 0 || t > 0) && (!n || !n.shadowRoot);
1567
+ function vr(e, t) {
1567
1568
  let n = e.touches, r = n && n.length ? n[0] : e, { offsetX: i, offsetY: a } = r, o = !1, s, c;
1568
- if (gr(i, a, e.target)) s = i, c = a;
1569
+ if (_r(i, a, e.target)) s = i, c = a;
1569
1570
  else {
1570
1571
  let e = t.getBoundingClientRect();
1571
1572
  s = r.clientX - e.left, c = r.clientY - e.top, o = !0;
@@ -1576,22 +1577,22 @@ function _r(e, t) {
1576
1577
  box: o
1577
1578
  };
1578
1579
  }
1579
- function vr(e, t) {
1580
+ function yr(e, t) {
1580
1581
  if ("native" in e) return e;
1581
- let { canvas: n, currentDevicePixelRatio: r } = t, i = fr(n), a = i.boxSizing === "border-box", o = hr(i, "padding"), s = hr(i, "border", "width"), { x: c, y: l, box: u } = _r(e, n), d = o.left + (u && s.left), f = o.top + (u && s.top), { width: p, height: m } = t;
1582
+ let { canvas: n, currentDevicePixelRatio: r } = t, i = pr(n), a = i.boxSizing === "border-box", o = gr(i, "padding"), s = gr(i, "border", "width"), { x: c, y: l, box: u } = vr(e, n), d = o.left + (u && s.left), f = o.top + (u && s.top), { width: p, height: m } = t;
1582
1583
  return a && (p -= o.width + s.width, m -= o.height + s.height), {
1583
1584
  x: Math.round((c - d) / p * n.width / r),
1584
1585
  y: Math.round((l - f) / m * n.height / r)
1585
1586
  };
1586
1587
  }
1587
- function yr(e, t, n) {
1588
+ function br(e, t, n) {
1588
1589
  let r, i;
1589
1590
  if (t === void 0 || n === void 0) {
1590
- let a = e && ur(e);
1591
+ let a = e && dr(e);
1591
1592
  if (!a) t = e.clientWidth, n = e.clientHeight;
1592
1593
  else {
1593
- let e = a.getBoundingClientRect(), o = fr(a), s = hr(o, "border", "width"), c = hr(o, "padding");
1594
- t = e.width - c.width - s.width, n = e.height - c.height - s.height, r = dr(o.maxWidth, a, "clientWidth"), i = dr(o.maxHeight, a, "clientHeight");
1594
+ let e = a.getBoundingClientRect(), o = pr(a), s = gr(o, "border", "width"), c = gr(o, "padding");
1595
+ t = e.width - c.width - s.width, n = e.height - c.height - s.height, r = fr(o.maxWidth, a, "clientWidth"), i = fr(o.maxHeight, a, "clientHeight");
1595
1596
  }
1596
1597
  }
1597
1598
  return {
@@ -1601,63 +1602,63 @@ function yr(e, t, n) {
1601
1602
  maxHeight: i || it
1602
1603
  };
1603
1604
  }
1604
- var br = (e) => Math.round(e * 10) / 10;
1605
- function xr(e, t, n, r) {
1606
- let i = fr(e), a = hr(i, "margin"), o = dr(i.maxWidth, e, "clientWidth") || it, s = dr(i.maxHeight, e, "clientHeight") || it, c = yr(e, t, n), { width: l, height: u } = c;
1605
+ var xr = (e) => Math.round(e * 10) / 10;
1606
+ function Sr(e, t, n, r) {
1607
+ let i = pr(e), a = gr(i, "margin"), o = fr(i.maxWidth, e, "clientWidth") || it, s = fr(i.maxHeight, e, "clientHeight") || it, c = br(e, t, n), { width: l, height: u } = c;
1607
1608
  if (i.boxSizing === "content-box") {
1608
- let e = hr(i, "border", "width"), t = hr(i, "padding");
1609
+ let e = gr(i, "border", "width"), t = gr(i, "padding");
1609
1610
  l -= t.width + e.width, u -= t.height + e.height;
1610
1611
  }
1611
- return l = Math.max(0, l - a.width), u = Math.max(0, r ? l / r : u - a.height), l = br(Math.min(l, o, c.maxWidth)), u = br(Math.min(u, s, c.maxHeight)), l && !u && (u = br(l / 2)), (t !== void 0 || n !== void 0) && r && c.height && u > c.height && (u = c.height, l = br(Math.floor(u * r))), {
1612
+ return l = Math.max(0, l - a.width), u = Math.max(0, r ? l / r : u - a.height), l = xr(Math.min(l, o, c.maxWidth)), u = xr(Math.min(u, s, c.maxHeight)), l && !u && (u = xr(l / 2)), (t !== void 0 || n !== void 0) && r && c.height && u > c.height && (u = c.height, l = xr(Math.floor(u * r))), {
1612
1613
  width: l,
1613
1614
  height: u
1614
1615
  };
1615
1616
  }
1616
- function Sr(e, t, n) {
1617
- let r = t || 1, i = br(e.height * r), a = br(e.width * r);
1618
- e.height = br(e.height), e.width = br(e.width);
1617
+ function Cr(e, t, n) {
1618
+ let r = t || 1, i = xr(e.height * r), a = xr(e.width * r);
1619
+ e.height = xr(e.height), e.width = xr(e.width);
1619
1620
  let o = e.canvas;
1620
1621
  o.style && (n || !o.style.height && !o.style.width) && (o.style.height = `${e.height}px`, o.style.width = `${e.width}px`);
1621
1622
  let s = Math.floor(i), c = Math.floor(a);
1622
1623
  return e.currentDevicePixelRatio !== r || o.height !== s || o.width !== c ? (e.currentDevicePixelRatio = r, o.height = s, o.width = c, e.ctx.setTransform(r, 0, 0, r, 0, 0), !0) : !1;
1623
1624
  }
1624
- var Cr = function() {
1625
+ var wr = function() {
1625
1626
  let e = !1;
1626
1627
  try {
1627
1628
  let t = { get passive() {
1628
1629
  return e = !0, !1;
1629
1630
  } };
1630
- lr() && (window.addEventListener("test", null, t), window.removeEventListener("test", null, t));
1631
+ ur() && (window.addEventListener("test", null, t), window.removeEventListener("test", null, t));
1631
1632
  } catch {}
1632
1633
  return e;
1633
1634
  }();
1634
- function wr(e, t) {
1635
- let n = pr(e, t), r = n && n.match(/^(\d+)(\.\d+)?px$/);
1635
+ function Tr(e, t) {
1636
+ let n = mr(e, t), r = n && n.match(/^(\d+)(\.\d+)?px$/);
1636
1637
  return r ? +r[1] : void 0;
1637
1638
  }
1638
- function Tr(e, t, n, r) {
1639
+ function Er(e, t, n, r) {
1639
1640
  return {
1640
1641
  x: e.x + n * (t.x - e.x),
1641
1642
  y: e.y + n * (t.y - e.y)
1642
1643
  };
1643
1644
  }
1644
- function Er(e, t, n, r) {
1645
+ function Dr(e, t, n, r) {
1645
1646
  return {
1646
1647
  x: e.x + n * (t.x - e.x),
1647
1648
  y: r === "middle" ? n < .5 ? e.y : t.y : r === "after" ? n < 1 ? e.y : t.y : n > 0 ? t.y : e.y
1648
1649
  };
1649
1650
  }
1650
- function Dr(e, t, n, r) {
1651
+ function Or(e, t, n, r) {
1651
1652
  let i = {
1652
1653
  x: e.cp2x,
1653
1654
  y: e.cp2y
1654
1655
  }, a = {
1655
1656
  x: t.cp1x,
1656
1657
  y: t.cp1y
1657
- }, o = Tr(e, i, n), s = Tr(i, a, n), c = Tr(a, t, n);
1658
- return Tr(Tr(o, s, n), Tr(s, c, n), n);
1658
+ }, o = Er(e, i, n), s = Er(i, a, n), c = Er(a, t, n);
1659
+ return Er(Er(o, s, n), Er(s, c, n), n);
1659
1660
  }
1660
- var Or = function(e, t) {
1661
+ var kr = function(e, t) {
1661
1662
  return {
1662
1663
  x(n) {
1663
1664
  return e + e + t - n;
@@ -1675,7 +1676,7 @@ var Or = function(e, t) {
1675
1676
  return e - t;
1676
1677
  }
1677
1678
  };
1678
- }, kr = function() {
1679
+ }, Ar = function() {
1679
1680
  return {
1680
1681
  x(e) {
1681
1682
  return e;
@@ -1692,17 +1693,17 @@ var Or = function(e, t) {
1692
1693
  }
1693
1694
  };
1694
1695
  };
1695
- function Ar(e, t, n) {
1696
- return e ? Or(t, n) : kr();
1696
+ function jr(e, t, n) {
1697
+ return e ? kr(t, n) : Ar();
1697
1698
  }
1698
- function jr(e, t) {
1699
+ function Mr(e, t) {
1699
1700
  let n, r;
1700
1701
  (t === "ltr" || t === "rtl") && (n = e.canvas.style, r = [n.getPropertyValue("direction"), n.getPropertyPriority("direction")], n.setProperty("direction", t, "important"), e.prevTextDirection = r);
1701
1702
  }
1702
- function Mr(e, t) {
1703
+ function Nr(e, t) {
1703
1704
  t !== void 0 && (delete e.prevTextDirection, e.canvas.style.setProperty("direction", t[0], t[1]));
1704
1705
  }
1705
- function Nr(e) {
1706
+ function Pr(e) {
1706
1707
  return e === "angle" ? {
1707
1708
  between: xt,
1708
1709
  compare: bt,
@@ -1713,7 +1714,7 @@ function Nr(e) {
1713
1714
  normalize: (e) => e
1714
1715
  };
1715
1716
  }
1716
- function Pr({ start: e, end: t, count: n, loop: r, style: i }) {
1717
+ function Fr({ start: e, end: t, count: n, loop: r, style: i }) {
1717
1718
  return {
1718
1719
  start: e % n,
1719
1720
  end: t % n,
@@ -1721,8 +1722,8 @@ function Pr({ start: e, end: t, count: n, loop: r, style: i }) {
1721
1722
  style: i
1722
1723
  };
1723
1724
  }
1724
- function Fr(e, t, n) {
1725
- let { property: r, start: i, end: a } = n, { between: o, normalize: s } = Nr(r), c = t.length, { start: l, end: u, loop: d } = e, f, p;
1725
+ function Ir(e, t, n) {
1726
+ let { property: r, start: i, end: a } = n, { between: o, normalize: s } = Pr(r), c = t.length, { start: l, end: u, loop: d } = e, f, p;
1726
1727
  if (d) {
1727
1728
  for (l += c, u += c, f = 0, p = c; f < p && o(s(t[l % c][r]), i, a); ++f) l--, u--;
1728
1729
  l %= c, u %= c;
@@ -1734,17 +1735,17 @@ function Fr(e, t, n) {
1734
1735
  style: e.style
1735
1736
  };
1736
1737
  }
1737
- function Ir(e, t, n) {
1738
+ function Lr(e, t, n) {
1738
1739
  if (!n) return [e];
1739
- let { property: r, start: i, end: a } = n, o = t.length, { compare: s, between: c, normalize: l } = Nr(r), { start: u, end: d, loop: f, style: p } = Fr(e, t, n), m = [], h = !1, g = null, _, v, y, b = () => c(i, y, _) && s(i, y) !== 0, x = () => s(a, _) === 0 || c(a, y, _), S = () => h || b(), C = () => !h || x();
1740
- for (let e = u, n = u; e <= d; ++e) v = t[e % o], !v.skip && (_ = l(v[r]), _ !== y && (h = c(_, i, a), g === null && S() && (g = s(_, i) === 0 ? e : n), g !== null && C() && (m.push(Pr({
1740
+ let { property: r, start: i, end: a } = n, o = t.length, { compare: s, between: c, normalize: l } = Pr(r), { start: u, end: d, loop: f, style: p } = Ir(e, t, n), m = [], h = !1, g = null, _, v, y, b = () => c(i, y, _) && s(i, y) !== 0, x = () => s(a, _) === 0 || c(a, y, _), S = () => h || b(), C = () => !h || x();
1741
+ for (let e = u, n = u; e <= d; ++e) v = t[e % o], !v.skip && (_ = l(v[r]), _ !== y && (h = c(_, i, a), g === null && S() && (g = s(_, i) === 0 ? e : n), g !== null && C() && (m.push(Fr({
1741
1742
  start: g,
1742
1743
  end: e,
1743
1744
  loop: f,
1744
1745
  count: o,
1745
1746
  style: p
1746
1747
  })), g = null), n = e, y = _));
1747
- return g !== null && m.push(Pr({
1748
+ return g !== null && m.push(Fr({
1748
1749
  start: g,
1749
1750
  end: d,
1750
1751
  loop: f,
@@ -1752,15 +1753,15 @@ function Ir(e, t, n) {
1752
1753
  style: p
1753
1754
  })), m;
1754
1755
  }
1755
- function Lr(e, t) {
1756
+ function Rr(e, t) {
1756
1757
  let n = [], r = e.segments;
1757
1758
  for (let i = 0; i < r.length; i++) {
1758
- let a = Ir(r[i], e.points, t);
1759
+ let a = Lr(r[i], e.points, t);
1759
1760
  a.length && n.push(...a);
1760
1761
  }
1761
1762
  return n;
1762
1763
  }
1763
- function Rr(e, t, n, r) {
1764
+ function zr(e, t, n, r) {
1764
1765
  let i = 0, a = t - 1;
1765
1766
  if (n && !r) for (; i < t && !e[i].skip;) i++;
1766
1767
  for (; i < t && e[i].skip;) i++;
@@ -1770,7 +1771,7 @@ function Rr(e, t, n, r) {
1770
1771
  end: a
1771
1772
  };
1772
1773
  }
1773
- function zr(e, t, n, r) {
1774
+ function Br(e, t, n, r) {
1774
1775
  let i = e.length, a = [], o = t, s = e[t], c;
1775
1776
  for (c = t + 1; c <= n; ++c) {
1776
1777
  let n = e[c % i];
@@ -1786,21 +1787,21 @@ function zr(e, t, n, r) {
1786
1787
  loop: r
1787
1788
  }), a;
1788
1789
  }
1789
- function Br(e, t) {
1790
+ function Vr(e, t) {
1790
1791
  let n = e.points, r = e.options.spanGaps, i = n.length;
1791
1792
  if (!i) return [];
1792
- let a = !!e._loop, { start: o, end: s } = Rr(n, i, a, r);
1793
- return r === !0 ? Vr(e, [{
1793
+ let a = !!e._loop, { start: o, end: s } = zr(n, i, a, r);
1794
+ return r === !0 ? Hr(e, [{
1794
1795
  start: o,
1795
1796
  end: s,
1796
1797
  loop: a
1797
- }], n, t) : Vr(e, zr(n, o, s < o ? s + i : s, !!e._fullLoop && o === 0 && s === i - 1), n, t);
1798
- }
1799
- function Vr(e, t, n, r) {
1800
- return !r || !r.setContext || !n ? t : Hr(e, t, n, r);
1798
+ }], n, t) : Hr(e, Br(n, o, s < o ? s + i : s, !!e._fullLoop && o === 0 && s === i - 1), n, t);
1801
1799
  }
1802
1800
  function Hr(e, t, n, r) {
1803
- let i = e._chart.getContext(), a = Ur(e.options), { _datasetIndex: o, options: { spanGaps: s } } = e, c = n.length, l = [], u = a, d = t[0].start, f = d;
1801
+ return !r || !r.setContext || !n ? t : Ur(e, t, n, r);
1802
+ }
1803
+ function Ur(e, t, n, r) {
1804
+ let i = e._chart.getContext(), a = Wr(e.options), { _datasetIndex: o, options: { spanGaps: s } } = e, c = n.length, l = [], u = a, d = t[0].start, f = d;
1804
1805
  function p(e, t, r, i) {
1805
1806
  let a = s ? -1 : 1;
1806
1807
  if (e !== t) {
@@ -1819,20 +1820,20 @@ function Hr(e, t, n, r) {
1819
1820
  let t = n[d % c], a;
1820
1821
  for (f = d + 1; f <= e.end; f++) {
1821
1822
  let s = n[f % c];
1822
- a = Ur(r.setContext(Nn(i, {
1823
+ a = Wr(r.setContext(Pn(i, {
1823
1824
  type: "segment",
1824
1825
  p0: t,
1825
1826
  p1: s,
1826
1827
  p0DataIndex: (f - 1) % c,
1827
1828
  p1DataIndex: f % c,
1828
1829
  datasetIndex: o
1829
- }))), Wr(a, u) && p(d, f - 1, e.loop, u), t = s, u = a;
1830
+ }))), Gr(a, u) && p(d, f - 1, e.loop, u), t = s, u = a;
1830
1831
  }
1831
1832
  d < f - 1 && p(d, f - 1, e.loop, u);
1832
1833
  }
1833
1834
  return l;
1834
1835
  }
1835
- function Ur(e) {
1836
+ function Wr(e) {
1836
1837
  return {
1837
1838
  backgroundColor: e.backgroundColor,
1838
1839
  borderCapStyle: e.borderCapStyle,
@@ -1843,29 +1844,29 @@ function Ur(e) {
1843
1844
  borderColor: e.borderColor
1844
1845
  };
1845
1846
  }
1846
- function Wr(e, t) {
1847
+ function Gr(e, t) {
1847
1848
  if (!t) return !1;
1848
1849
  let n = [], r = function(e, t) {
1849
1850
  return Ut(t) ? (n.includes(t) || n.push(t), n.indexOf(t)) : t;
1850
1851
  };
1851
1852
  return JSON.stringify(e, r) !== JSON.stringify(t, r);
1852
1853
  }
1853
- function Gr(e, t, n) {
1854
+ function Kr(e, t, n) {
1854
1855
  return e.options.clip ? e[n] : t[n];
1855
1856
  }
1856
- function Kr(e, t) {
1857
+ function qr(e, t) {
1857
1858
  let { xScale: n, yScale: r } = e;
1858
1859
  return n && r ? {
1859
- left: Gr(n, t, "left"),
1860
- right: Gr(n, t, "right"),
1861
- top: Gr(r, t, "top"),
1862
- bottom: Gr(r, t, "bottom")
1860
+ left: Kr(n, t, "left"),
1861
+ right: Kr(n, t, "right"),
1862
+ top: Kr(r, t, "top"),
1863
+ bottom: Kr(r, t, "bottom")
1863
1864
  } : t;
1864
1865
  }
1865
- function qr(e, t) {
1866
+ function Jr(e, t) {
1866
1867
  let n = t._clip;
1867
1868
  if (n.disabled) return !1;
1868
- let r = Kr(t, e.chartArea);
1869
+ let r = qr(t, e.chartArea);
1869
1870
  return {
1870
1871
  left: n.left === !1 ? 0 : r.left - (n.left === !0 ? 0 : n.left),
1871
1872
  right: n.right === !1 ? e.width : r.right + (n.right === !0 ? 0 : n.right),
@@ -1873,7 +1874,7 @@ function qr(e, t) {
1873
1874
  bottom: n.bottom === !1 ? e.height : r.bottom + (n.bottom === !0 ? 0 : n.bottom)
1874
1875
  };
1875
1876
  }
1876
- var Jr = /* #__PURE__ */ new class {
1877
+ var Yr = /* #__PURE__ */ new class {
1877
1878
  constructor() {
1878
1879
  this._request = null, this._charts = /* @__PURE__ */ new Map(), this._running = !1, this._lastDate = void 0;
1879
1880
  }
@@ -1940,32 +1941,32 @@ var Jr = /* #__PURE__ */ new class {
1940
1941
  remove(e) {
1941
1942
  return this._charts.delete(e);
1942
1943
  }
1943
- }(), Yr = "transparent", Xr = {
1944
+ }(), Xr = "transparent", Zr = {
1944
1945
  boolean(e, t, n) {
1945
1946
  return n > .5 ? t : e;
1946
1947
  },
1947
1948
  color(e, t, n) {
1948
- let r = Wt(e || Yr), i = r.valid && Wt(t || Yr);
1949
+ let r = Wt(e || Xr), i = r.valid && Wt(t || Xr);
1949
1950
  return i && i.valid ? i.mix(r, n).hexString() : t;
1950
1951
  },
1951
1952
  number(e, t, n) {
1952
1953
  return e + (t - e) * n;
1953
1954
  }
1954
- }, Zr = class {
1955
+ }, Qr = class {
1955
1956
  constructor(e, t, n, r) {
1956
1957
  let i = t[n];
1957
- r = jn([
1958
+ r = Mn([
1958
1959
  e.to,
1959
1960
  r,
1960
1961
  i,
1961
1962
  e.from
1962
1963
  ]);
1963
- let a = jn([
1964
+ let a = Mn([
1964
1965
  e.from,
1965
1966
  i,
1966
1967
  r
1967
1968
  ]);
1968
- this._active = !0, this._fn = e.fn || Xr[e.type || typeof a], this._easing = Ht[e.easing] || Ht.linear, this._start = Math.floor(Date.now() + (e.delay || 0)), this._duration = this._total = Math.floor(e.duration), this._loop = !!e.loop, this._target = t, this._prop = n, this._from = a, this._to = r, this._promises = void 0;
1969
+ this._active = !0, this._fn = e.fn || Zr[e.type || typeof a], this._easing = Ht[e.easing] || Ht.linear, this._start = Math.floor(Date.now() + (e.delay || 0)), this._duration = this._total = Math.floor(e.duration), this._loop = !!e.loop, this._target = t, this._prop = n, this._from = a, this._to = r, this._promises = void 0;
1969
1970
  }
1970
1971
  active() {
1971
1972
  return this._active;
@@ -1974,12 +1975,12 @@ var Jr = /* #__PURE__ */ new class {
1974
1975
  if (this._active) {
1975
1976
  this._notify(!1);
1976
1977
  let r = this._target[this._prop], i = n - this._start, a = this._duration - i;
1977
- this._start = n, this._duration = Math.floor(Math.max(a, e.duration)), this._total += i, this._loop = !!e.loop, this._to = jn([
1978
+ this._start = n, this._duration = Math.floor(Math.max(a, e.duration)), this._total += i, this._loop = !!e.loop, this._to = Mn([
1978
1979
  e.to,
1979
1980
  t,
1980
1981
  r,
1981
1982
  e.from
1982
- ]), this._from = jn([
1983
+ ]), this._from = Mn([
1983
1984
  e.from,
1984
1985
  r,
1985
1986
  t
@@ -2006,7 +2007,7 @@ var Jr = /* #__PURE__ */ new class {
2006
2007
  let t = e ? "res" : "rej", n = this._promises || [];
2007
2008
  for (let e = 0; e < n.length; e++) n[e][t]();
2008
2009
  }
2009
- }, Qr = class {
2010
+ }, $r = class {
2010
2011
  constructor(e, t) {
2011
2012
  this._chart = e, this._properties = /* @__PURE__ */ new Map(), this.configure(t);
2012
2013
  }
@@ -2024,10 +2025,10 @@ var Jr = /* #__PURE__ */ new class {
2024
2025
  });
2025
2026
  }
2026
2027
  _animateOptions(e, t) {
2027
- let n = t.options, r = ei(e, n);
2028
+ let n = t.options, r = ti(e, n);
2028
2029
  if (!r) return [];
2029
2030
  let i = this._createAnimations(r, n);
2030
- return n.$shared && $r(e.options.$animations, n).then(() => {
2031
+ return n.$shared && ei(e.options.$animations, n).then(() => {
2031
2032
  e.options = n;
2032
2033
  }, () => {}), i;
2033
2034
  }
@@ -2048,7 +2049,7 @@ var Jr = /* #__PURE__ */ new class {
2048
2049
  }
2049
2050
  u.cancel();
2050
2051
  }
2051
- !d || !d.duration ? e[c] = l : (i[c] = u = new Zr(d, e, c, l), r.push(u));
2052
+ !d || !d.duration ? e[c] = l : (i[c] = u = new Qr(d, e, c, l), r.push(u));
2052
2053
  }
2053
2054
  return r;
2054
2055
  }
@@ -2058,10 +2059,10 @@ var Jr = /* #__PURE__ */ new class {
2058
2059
  return;
2059
2060
  }
2060
2061
  let n = this._createAnimations(e, t);
2061
- if (n.length) return Jr.add(this._chart, n), !0;
2062
+ if (n.length) return Yr.add(this._chart, n), !0;
2062
2063
  }
2063
2064
  };
2064
- function $r(e, t) {
2065
+ function ei(e, t) {
2065
2066
  let n = [], r = Object.keys(t);
2066
2067
  for (let t = 0; t < r.length; t++) {
2067
2068
  let i = e[r[t]];
@@ -2069,7 +2070,7 @@ function $r(e, t) {
2069
2070
  }
2070
2071
  return Promise.all(n);
2071
2072
  }
2072
- function ei(e, t) {
2073
+ function ti(e, t) {
2073
2074
  if (!t) return;
2074
2075
  let n = e.options;
2075
2076
  if (!n) e.options = t;
@@ -2078,16 +2079,16 @@ function ei(e, t) {
2078
2079
  $animations: {}
2079
2080
  })), n;
2080
2081
  }
2081
- function ti(e, t) {
2082
+ function ni(e, t) {
2082
2083
  let n = e && e.options || {}, r = n.reverse, i = n.min === void 0 ? t : 0, a = n.max === void 0 ? t : 0;
2083
2084
  return {
2084
2085
  start: r ? a : i,
2085
2086
  end: r ? i : a
2086
2087
  };
2087
2088
  }
2088
- function ni(e, t, n) {
2089
+ function ri(e, t, n) {
2089
2090
  if (n === !1) return !1;
2090
- let r = ti(e, n), i = ti(t, n);
2091
+ let r = ni(e, n), i = ni(t, n);
2091
2092
  return {
2092
2093
  top: i.end,
2093
2094
  right: r.end,
@@ -2095,7 +2096,7 @@ function ni(e, t, n) {
2095
2096
  left: r.start
2096
2097
  };
2097
2098
  }
2098
- function ri(e) {
2099
+ function ii(e) {
2099
2100
  let t, n, r, i;
2100
2101
  return M(e) ? (t = e.top, n = e.right, r = e.bottom, i = e.left) : t = n = r = i = e, {
2101
2102
  top: t,
@@ -2105,12 +2106,12 @@ function ri(e) {
2105
2106
  disabled: e === !1
2106
2107
  };
2107
2108
  }
2108
- function ii(e, t) {
2109
+ function ai(e, t) {
2109
2110
  let n = [], r = e._getSortedDatasetMetas(t), i, a;
2110
2111
  for (i = 0, a = r.length; i < a; ++i) n.push(r[i].index);
2111
2112
  return n;
2112
2113
  }
2113
- function ai(e, t, n, r = {}) {
2114
+ function oi(e, t, n, r = {}) {
2114
2115
  let i = e.keys, a = r.mode === "single", o, s, c, l;
2115
2116
  if (t === null) return;
2116
2117
  let u = !1;
@@ -2123,7 +2124,7 @@ function ai(e, t, n, r = {}) {
2123
2124
  }
2124
2125
  return !u && !r.all ? 0 : t;
2125
2126
  }
2126
- function oi(e, t) {
2127
+ function si(e, t) {
2127
2128
  let { iScale: n, vScale: r } = t, i = n.axis === "x" ? "x" : "y", a = r.axis === "x" ? "x" : "y", o = Object.keys(e), s = Array(o.length), c, l, u;
2128
2129
  for (c = 0, l = o.length; c < l; ++c) u = o[c], s[c] = {
2129
2130
  [i]: u,
@@ -2131,46 +2132,46 @@ function oi(e, t) {
2131
2132
  };
2132
2133
  return s;
2133
2134
  }
2134
- function si(e, t) {
2135
+ function ci(e, t) {
2135
2136
  let n = e && e.options.stacked;
2136
2137
  return n || n === void 0 && t.stack !== void 0;
2137
2138
  }
2138
- function ci(e, t, n) {
2139
+ function li(e, t, n) {
2139
2140
  return `${e.id}.${t.id}.${n.stack || n.type}`;
2140
2141
  }
2141
- function li(e) {
2142
+ function ui(e) {
2142
2143
  let { min: t, max: n, minDefined: r, maxDefined: i } = e.getUserBounds();
2143
2144
  return {
2144
2145
  min: r ? t : -Infinity,
2145
2146
  max: i ? n : Infinity
2146
2147
  };
2147
2148
  }
2148
- function ui(e, t, n) {
2149
+ function di(e, t, n) {
2149
2150
  let r = e[t] || (e[t] = {});
2150
2151
  return r[n] || (r[n] = {});
2151
2152
  }
2152
- function di(e, t, n, r) {
2153
+ function fi(e, t, n, r) {
2153
2154
  for (let i of t.getMatchingVisibleMetas(r).reverse()) {
2154
2155
  let t = e[i.index];
2155
2156
  if (n && t > 0 || !n && t < 0) return i.index;
2156
2157
  }
2157
2158
  return null;
2158
2159
  }
2159
- function fi(e, t) {
2160
- let { chart: n, _cachedMeta: r } = e, i = n._stacks ||= {}, { iScale: a, vScale: o, index: s } = r, c = a.axis, l = o.axis, u = ci(a, o, r), d = t.length, f;
2160
+ function pi(e, t) {
2161
+ let { chart: n, _cachedMeta: r } = e, i = n._stacks ||= {}, { iScale: a, vScale: o, index: s } = r, c = a.axis, l = o.axis, u = li(a, o, r), d = t.length, f;
2161
2162
  for (let e = 0; e < d; ++e) {
2162
2163
  let n = t[e], { [c]: a, [l]: d } = n, p = n._stacks ||= {};
2163
- f = p[l] = ui(i, u, a), f[s] = d, f._top = di(f, o, !0, r.type), f._bottom = di(f, o, !1, r.type);
2164
+ f = p[l] = di(i, u, a), f[s] = d, f._top = fi(f, o, !0, r.type), f._bottom = fi(f, o, !1, r.type);
2164
2165
  let m = f._visualValues || (f._visualValues = {});
2165
2166
  m[s] = d;
2166
2167
  }
2167
2168
  }
2168
- function pi(e, t) {
2169
+ function mi(e, t) {
2169
2170
  let n = e.scales;
2170
2171
  return Object.keys(n).filter((e) => n[e].axis === t).shift();
2171
2172
  }
2172
- function mi(e, t) {
2173
- return Nn(e, {
2173
+ function hi(e, t) {
2174
+ return Pn(e, {
2174
2175
  active: !1,
2175
2176
  dataset: void 0,
2176
2177
  datasetIndex: t,
@@ -2179,8 +2180,8 @@ function mi(e, t) {
2179
2180
  type: "dataset"
2180
2181
  });
2181
2182
  }
2182
- function hi(e, t, n) {
2183
- return Nn(e, {
2183
+ function gi(e, t, n) {
2184
+ return Pn(e, {
2184
2185
  active: !1,
2185
2186
  dataIndex: t,
2186
2187
  parsed: void 0,
@@ -2191,7 +2192,7 @@ function hi(e, t, n) {
2191
2192
  type: "data"
2192
2193
  });
2193
2194
  }
2194
- function gi(e, t) {
2195
+ function _i(e, t) {
2195
2196
  let n = e.controller.index, r = e.vScale && e.vScale.axis;
2196
2197
  if (r) {
2197
2198
  t ||= e._parsed;
@@ -2201,10 +2202,10 @@ function gi(e, t) {
2201
2202
  }
2202
2203
  }
2203
2204
  }
2204
- var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.assign({}, e), yi = (e, t, n) => e && !t.hidden && t._stacked && {
2205
- keys: ii(n, !0),
2205
+ var vi = (e) => e === "reset" || e === "none", yi = (e, t) => t ? e : Object.assign({}, e), bi = (e, t, n) => e && !t.hidden && t._stacked && {
2206
+ keys: ai(n, !0),
2206
2207
  values: null
2207
- }, bi = class {
2208
+ }, xi = class {
2208
2209
  static defaults = {};
2209
2210
  static datasetElementType = null;
2210
2211
  static dataElementType = null;
@@ -2213,13 +2214,13 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2213
2214
  }
2214
2215
  initialize() {
2215
2216
  let e = this._cachedMeta;
2216
- this.configure(), this.linkScales(), e._stacked = si(e.vScale, e), this.addElements(), this.options.fill && !this.chart.isPluginEnabled("filler") && console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options");
2217
+ this.configure(), this.linkScales(), e._stacked = ci(e.vScale, e), this.addElements(), this.options.fill && !this.chart.isPluginEnabled("filler") && console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options");
2217
2218
  }
2218
2219
  updateIndex(e) {
2219
- this.index !== e && gi(this._cachedMeta), this.index = e;
2220
+ this.index !== e && _i(this._cachedMeta), this.index = e;
2220
2221
  }
2221
2222
  linkScales() {
2222
- let e = this.chart, t = this._cachedMeta, n = this.getDataset(), r = (e, t, n, r) => e === "x" ? t : e === "r" ? r : n, i = t.xAxisID = F(n.xAxisID, pi(e, "x")), a = t.yAxisID = F(n.yAxisID, pi(e, "y")), o = t.rAxisID = F(n.rAxisID, pi(e, "r")), s = t.indexAxis, c = t.iAxisID = r(s, i, a, o), l = t.vAxisID = r(s, a, i, o);
2223
+ let e = this.chart, t = this._cachedMeta, n = this.getDataset(), r = (e, t, n, r) => e === "x" ? t : e === "r" ? r : n, i = t.xAxisID = F(n.xAxisID, mi(e, "x")), a = t.yAxisID = F(n.yAxisID, mi(e, "y")), o = t.rAxisID = F(n.rAxisID, mi(e, "r")), s = t.indexAxis, c = t.iAxisID = r(s, i, a, o), l = t.vAxisID = r(s, a, i, o);
2223
2224
  t.xScale = this.getScaleForId(i), t.yScale = this.getScaleForId(a), t.rScale = this.getScaleForId(o), t.iScale = this.getScaleForId(c), t.vScale = this.getScaleForId(l);
2224
2225
  }
2225
2226
  getDataset() {
@@ -2240,18 +2241,18 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2240
2241
  }
2241
2242
  _destroy() {
2242
2243
  let e = this._cachedMeta;
2243
- this._data && At(this._data, this), e._stacked && gi(e);
2244
+ this._data && At(this._data, this), e._stacked && _i(e);
2244
2245
  }
2245
2246
  _dataCheck() {
2246
2247
  let e = this.getDataset(), t = e.data ||= [], n = this._data;
2247
2248
  if (M(t)) {
2248
2249
  let e = this._cachedMeta;
2249
- this._data = oi(t, e);
2250
+ this._data = si(t, e);
2250
2251
  } else if (n !== t) {
2251
2252
  if (n) {
2252
2253
  At(n, this);
2253
2254
  let e = this._cachedMeta;
2254
- gi(e), e._parsed = [];
2255
+ _i(e), e._parsed = [];
2255
2256
  }
2256
2257
  t && Object.isExtensible(t) && kt(t, this), this._syncList = [], this._data = t;
2257
2258
  }
@@ -2264,7 +2265,7 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2264
2265
  let t = this._cachedMeta, n = this.getDataset(), r = !1;
2265
2266
  this._dataCheck();
2266
2267
  let i = t._stacked;
2267
- t._stacked = si(t.vScale, t), t.stack !== n.stack && (r = !0, gi(t), t.stack = n.stack), this._resyncElements(e), (r || i !== t._stacked) && (fi(this, t._parsed), t._stacked = si(t.vScale, t));
2268
+ t._stacked = ci(t.vScale, t), t.stack !== n.stack && (r = !0, _i(t), t.stack = n.stack), this._resyncElements(e), (r || i !== t._stacked) && (pi(this, t._parsed), t._stacked = ci(t.vScale, t));
2268
2269
  }
2269
2270
  configure() {
2270
2271
  let e = this.chart.config, t = e.datasetScopeKeys(this._type), n = e.getOptionScopes(this.getDataset(), t, !0);
@@ -2279,7 +2280,7 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2279
2280
  for (l = 0; l < t; ++l) n._parsed[l + e] = u = d[l], s && (i() && (s = !1), c = u);
2280
2281
  n._sorted = s;
2281
2282
  }
2282
- a && fi(this, d);
2283
+ a && pi(this, d);
2283
2284
  }
2284
2285
  parsePrimitiveData(e, t, n, r) {
2285
2286
  let { iScale: i, vScale: a } = e, o = i.axis, s = a.axis, c = i.getLabels(), l = i === a, u = Array(r), d, f, p;
@@ -2313,20 +2314,20 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2313
2314
  }
2314
2315
  applyStack(e, t, n) {
2315
2316
  let r = this.chart, i = this._cachedMeta, a = t[e.axis];
2316
- return ai({
2317
- keys: ii(r, !0),
2317
+ return oi({
2318
+ keys: ai(r, !0),
2318
2319
  values: t._stacks[e.axis]._visualValues
2319
2320
  }, a, i.index, { mode: n });
2320
2321
  }
2321
2322
  updateRangeFromParsed(e, t, n, r) {
2322
2323
  let i = n[t.axis], a = i === null ? NaN : i, o = r && n._stacks[t.axis];
2323
- r && o && (r.values = o, a = ai(r, i, this._cachedMeta.index)), e.min = Math.min(e.min, a), e.max = Math.max(e.max, a);
2324
+ r && o && (r.values = o, a = oi(r, i, this._cachedMeta.index)), e.min = Math.min(e.min, a), e.max = Math.max(e.max, a);
2324
2325
  }
2325
2326
  getMinMax(e, t) {
2326
- let n = this._cachedMeta, r = n._parsed, i = n._sorted && e === n.iScale, a = r.length, o = this._getOtherScale(e), s = yi(t, n, this.chart), c = {
2327
+ let n = this._cachedMeta, r = n._parsed, i = n._sorted && e === n.iScale, a = r.length, o = this._getOtherScale(e), s = bi(t, n, this.chart), c = {
2327
2328
  min: Infinity,
2328
2329
  max: -Infinity
2329
- }, { min: l, max: u } = li(o), d, f;
2330
+ }, { min: l, max: u } = ui(o), d, f;
2330
2331
  function p() {
2331
2332
  f = r[d];
2332
2333
  let t = f[o.axis];
@@ -2358,7 +2359,7 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2358
2359
  }
2359
2360
  _update(e) {
2360
2361
  let t = this._cachedMeta;
2361
- this.update(e || "default"), t._clip = ri(F(this.options.clip, ni(t.xScale, t.yScale, this.getMaxOverflow())));
2362
+ this.update(e || "default"), t._clip = ii(F(this.options.clip, ri(t.xScale, t.yScale, this.getMaxOverflow())));
2362
2363
  }
2363
2364
  update(e) {}
2364
2365
  draw() {
@@ -2377,8 +2378,8 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2377
2378
  let r = this.getDataset(), i;
2378
2379
  if (e >= 0 && e < this._cachedMeta.data.length) {
2379
2380
  let t = this._cachedMeta.data[e];
2380
- i = t.$context ||= hi(this.getContext(), e, t), i.parsed = this.getParsed(e), i.raw = r.data[e], i.index = i.dataIndex = e;
2381
- } else i = this.$context ||= mi(this.chart.getContext(), this.index), i.dataset = r, i.index = i.datasetIndex = this.index;
2381
+ i = t.$context ||= gi(this.getContext(), e, t), i.parsed = this.getParsed(e), i.raw = r.data[e], i.index = i.dataIndex = e;
2382
+ } else i = this.$context ||= hi(this.chart.getContext(), this.index), i.dataset = r, i.index = i.datasetIndex = this.index;
2382
2383
  return i.active = !!t, i.mode = n, i;
2383
2384
  }
2384
2385
  resolveDatasetElementOptions(e) {
@@ -2389,14 +2390,14 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2389
2390
  }
2390
2391
  _resolveElementOptions(e, t = "default", n) {
2391
2392
  let r = t === "active", i = this._cachedDataOpts, a = e + "-" + t, o = i[a], s = this.enableOptionSharing && $e(n);
2392
- if (o) return vi(o, s);
2393
+ if (o) return yi(o, s);
2393
2394
  let c = this.chart.config, l = c.datasetElementScopeKeys(this._type, e), u = r ? [
2394
2395
  `${e}Hover`,
2395
2396
  "hover",
2396
2397
  e,
2397
2398
  ""
2398
2399
  ] : [e, ""], d = c.getOptionScopes(this.getDataset(), l), f = Object.keys(K.elements[e]), p = c.resolveNamedOptions(d, f, () => this.getContext(n, r, t), u);
2399
- return p.$shared && (p.$shared = s, i[a] = Object.freeze(vi(p, s))), p;
2400
+ return p.$shared && (p.$shared = s, i[a] = Object.freeze(yi(p, s))), p;
2400
2401
  }
2401
2402
  _resolveAnimations(e, t, n) {
2402
2403
  let r = this.chart, i = this._cachedDataOpts, a = `animation-${t}`, o = i[a];
@@ -2406,14 +2407,14 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2406
2407
  let r = this.chart.config, i = r.datasetAnimationScopeKeys(this._type, t), a = r.getOptionScopes(this.getDataset(), i);
2407
2408
  s = r.createResolver(a, this.getContext(e, n, t));
2408
2409
  }
2409
- let c = new Qr(r, s && s.animations);
2410
+ let c = new $r(r, s && s.animations);
2410
2411
  return s && s._cacheable && (i[a] = Object.freeze(c)), c;
2411
2412
  }
2412
2413
  getSharedOptions(e) {
2413
2414
  if (e.$shared) return this._sharedOptions ||= Object.assign({}, e);
2414
2415
  }
2415
2416
  includeOptions(e, t) {
2416
- return !t || _i(e) || this.chart._animationsDisabled;
2417
+ return !t || vi(e) || this.chart._animationsDisabled;
2417
2418
  }
2418
2419
  _getSharedOptions(e, t) {
2419
2420
  let n = this.resolveDataElementOptions(e, t), r = this._sharedOptions, i = this.getSharedOptions(n), a = this.includeOptions(t, i) || i !== r;
@@ -2423,10 +2424,10 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2423
2424
  };
2424
2425
  }
2425
2426
  updateElement(e, t, n, r) {
2426
- _i(r) ? Object.assign(e, n) : this._resolveAnimations(t, r).update(e, n);
2427
+ vi(r) ? Object.assign(e, n) : this._resolveAnimations(t, r).update(e, n);
2427
2428
  }
2428
2429
  updateSharedOptions(e, t, n) {
2429
- e && !_i(t) && this._resolveAnimations(void 0, t).update(e, n);
2430
+ e && !vi(t) && this._resolveAnimations(void 0, t).update(e, n);
2430
2431
  }
2431
2432
  _setStyle(e, t, n, r) {
2432
2433
  e.active = r;
@@ -2466,7 +2467,7 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2466
2467
  let n = this._cachedMeta;
2467
2468
  if (this._parsing) {
2468
2469
  let r = n._parsed.splice(e, t);
2469
- n._stacked && gi(n, r);
2470
+ n._stacked && _i(n, r);
2470
2471
  }
2471
2472
  n.data.splice(e, t);
2472
2473
  }
@@ -2521,7 +2522,7 @@ var _i = (e) => e === "reset" || e === "none", vi = (e, t) => t ? e : Object.ass
2521
2522
  ]);
2522
2523
  }
2523
2524
  };
2524
- function xi(e, t) {
2525
+ function Si(e, t) {
2525
2526
  if (!e._cache.$bar) {
2526
2527
  let n = e.getMatchingVisibleMetas(t), r = [];
2527
2528
  for (let t = 0, i = n.length; t < i; t++) r = r.concat(n[t].controller.getAllParsedValues(e));
@@ -2529,15 +2530,15 @@ function xi(e, t) {
2529
2530
  }
2530
2531
  return e._cache.$bar;
2531
2532
  }
2532
- function Si(e) {
2533
- let t = e.iScale, n = xi(t, e.type), r = t._length, i, a, o, s, c = () => {
2533
+ function Ci(e) {
2534
+ let t = e.iScale, n = Si(t, e.type), r = t._length, i, a, o, s, c = () => {
2534
2535
  o !== 32767 && o !== -32768 && ($e(s) && (r = Math.min(r, Math.abs(o - s) || r)), s = o);
2535
2536
  };
2536
2537
  for (i = 0, a = n.length; i < a; ++i) o = t.getPixelForValue(n[i]), c();
2537
2538
  for (s = void 0, i = 0, a = t.ticks.length; i < a; ++i) o = t.getPixelForTick(i), c();
2538
2539
  return r;
2539
2540
  }
2540
- function Ci(e, t, n, r) {
2541
+ function wi(e, t, n, r) {
2541
2542
  let i = n.barThickness, a, o;
2542
2543
  return A(i) ? (a = t.min * n.categoryPercentage, o = n.barPercentage) : (a = i * r, o = 1), {
2543
2544
  chunk: a / r,
@@ -2545,7 +2546,7 @@ function Ci(e, t, n, r) {
2545
2546
  start: t.pixels[e] - a / 2
2546
2547
  };
2547
2548
  }
2548
- function wi(e, t, n, r) {
2549
+ function Ti(e, t, n, r) {
2549
2550
  let i = t.pixels, a = i[e], o = e > 0 ? i[e - 1] : null, s = e < i.length - 1 ? i[e + 1] : null, c = n.categoryPercentage;
2550
2551
  o === null && (o = a - (s === null ? t.end - t.start : s - a)), s === null && (s = a + a - o);
2551
2552
  let l = a - (a - Math.min(o, s)) / 2 * c;
@@ -2555,7 +2556,7 @@ function wi(e, t, n, r) {
2555
2556
  start: l
2556
2557
  };
2557
2558
  }
2558
- function Ti(e, t, n, r) {
2559
+ function Ei(e, t, n, r) {
2559
2560
  let i = n.parse(e[0], r), a = n.parse(e[1], r), o = Math.min(i, a), s = Math.max(i, a), c = o, l = s;
2560
2561
  Math.abs(o) > Math.abs(s) && (c = s, l = o), t[n.axis] = l, t._custom = {
2561
2562
  barStart: c,
@@ -2566,21 +2567,21 @@ function Ti(e, t, n, r) {
2566
2567
  max: s
2567
2568
  };
2568
2569
  }
2569
- function Ei(e, t, n, r) {
2570
- return j(e) ? Ti(e, t, n, r) : t[n.axis] = n.parse(e, r), t;
2571
- }
2572
2570
  function Di(e, t, n, r) {
2571
+ return j(e) ? Ei(e, t, n, r) : t[n.axis] = n.parse(e, r), t;
2572
+ }
2573
+ function Oi(e, t, n, r) {
2573
2574
  let i = e.iScale, a = e.vScale, o = i.getLabels(), s = i === a, c = [], l, u, d, f;
2574
- for (l = n, u = n + r; l < u; ++l) f = t[l], d = {}, d[i.axis] = s || i.parse(o[l], l), c.push(Ei(f, d, a, l));
2575
+ for (l = n, u = n + r; l < u; ++l) f = t[l], d = {}, d[i.axis] = s || i.parse(o[l], l), c.push(Di(f, d, a, l));
2575
2576
  return c;
2576
2577
  }
2577
- function Oi(e) {
2578
+ function ki(e) {
2578
2579
  return e && e.barStart !== void 0 && e.barEnd !== void 0;
2579
2580
  }
2580
- function ki(e, t, n) {
2581
+ function Ai(e, t, n) {
2581
2582
  return e === 0 ? (t.isHorizontal() ? 1 : -1) * (t.min >= n ? 1 : -1) : V(e);
2582
2583
  }
2583
- function Ai(e) {
2584
+ function ji(e) {
2584
2585
  let t, n, r, i, a;
2585
2586
  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"), {
2586
2587
  start: n,
@@ -2590,7 +2591,7 @@ function Ai(e) {
2590
2591
  bottom: a
2591
2592
  };
2592
2593
  }
2593
- function ji(e, t, n, r) {
2594
+ function Mi(e, t, n, r) {
2594
2595
  let i = t.borderSkipped, a = {};
2595
2596
  if (!i) {
2596
2597
  e.borderSkipped = a;
@@ -2605,22 +2606,22 @@ function ji(e, t, n, r) {
2605
2606
  };
2606
2607
  return;
2607
2608
  }
2608
- let { start: o, end: s, reverse: c, top: l, bottom: u } = Ai(e);
2609
- i === "middle" && n && (e.enableBorderRadius = !0, (n._top || 0) === r ? i = l : (n._bottom || 0) === r ? i = u : (a[Mi(u, o, s, c)] = !0, i = l)), a[Mi(i, o, s, c)] = !0, e.borderSkipped = a;
2609
+ let { start: o, end: s, reverse: c, top: l, bottom: u } = ji(e);
2610
+ i === "middle" && n && (e.enableBorderRadius = !0, (n._top || 0) === r ? i = l : (n._bottom || 0) === r ? i = u : (a[Ni(u, o, s, c)] = !0, i = l)), a[Ni(i, o, s, c)] = !0, e.borderSkipped = a;
2610
2611
  }
2611
- function Mi(e, t, n, r) {
2612
- return r ? (e = Ni(e, t, n), e = Pi(e, n, t)) : e = Pi(e, t, n), e;
2612
+ function Ni(e, t, n, r) {
2613
+ return r ? (e = Pi(e, t, n), e = Fi(e, n, t)) : e = Fi(e, t, n), e;
2613
2614
  }
2614
- function Ni(e, t, n) {
2615
+ function Pi(e, t, n) {
2615
2616
  return e === t ? n : e === n ? t : e;
2616
2617
  }
2617
- function Pi(e, t, n) {
2618
+ function Fi(e, t, n) {
2618
2619
  return e === "start" ? t : e === "end" ? n : e;
2619
2620
  }
2620
- function Fi(e, { inflateAmount: t }, n) {
2621
+ function Ii(e, { inflateAmount: t }, n) {
2621
2622
  e.inflateAmount = t === "auto" ? n === 1 ? .33 : 0 : t;
2622
2623
  }
2623
- var Ii = class extends bi {
2624
+ var Li = class extends xi {
2624
2625
  static id = "bar";
2625
2626
  static defaults = {
2626
2627
  datasetElementType: !1,
@@ -2651,14 +2652,14 @@ var Ii = class extends bi {
2651
2652
  }
2652
2653
  } };
2653
2654
  parsePrimitiveData(e, t, n, r) {
2654
- return Di(e, t, n, r);
2655
+ return Oi(e, t, n, r);
2655
2656
  }
2656
2657
  parseArrayData(e, t, n, r) {
2657
- return Di(e, t, n, r);
2658
+ return Oi(e, t, n, r);
2658
2659
  }
2659
2660
  parseObjectData(e, t, n, r) {
2660
2661
  let { iScale: i, vScale: a } = e, { xAxisKey: o = "x", yAxisKey: s = "y" } = this._parsing, c = i.axis === "x" ? o : s, l = a.axis === "x" ? o : s, u = [], d, f, p, m;
2661
- for (d = n, f = n + r; d < f; ++d) m = t[d], p = {}, p[i.axis] = i.parse(Ze(m, c), d), u.push(Ei(Ze(m, l), p, a, d));
2662
+ for (d = n, f = n + r; d < f; ++d) m = t[d], p = {}, p[i.axis] = i.parse(Ze(m, c), d), u.push(Di(Ze(m, l), p, a, d));
2662
2663
  return u;
2663
2664
  }
2664
2665
  updateRangeFromParsed(e, t, n, r) {
@@ -2670,7 +2671,7 @@ var Ii = class extends bi {
2670
2671
  return 0;
2671
2672
  }
2672
2673
  getLabelAndValue(e) {
2673
- let { iScale: t, vScale: n } = this._cachedMeta, r = this.getParsed(e), i = r._custom, a = Oi(i) ? "[" + i.start + ", " + i.end + "]" : "" + n.getLabelForValue(r[n.axis]);
2674
+ let { iScale: t, vScale: n } = this._cachedMeta, r = this.getParsed(e), i = r._custom, a = ki(i) ? "[" + i.start + ", " + i.end + "]" : "" + n.getLabelForValue(r[n.axis]);
2674
2675
  return {
2675
2676
  label: "" + t.getLabelForValue(r[t.axis]),
2676
2677
  value: a
@@ -2694,7 +2695,7 @@ var Ii = class extends bi {
2694
2695
  } : this._calculateBarValuePixels(f), p = this._calculateBarIndexPixels(f, l), m = (t._stacks || {})[o.axis], h = {
2695
2696
  horizontal: c,
2696
2697
  base: n.base,
2697
- enableBorderRadius: !m || Oi(t._custom) || a === m._top || a === m._bottom,
2698
+ enableBorderRadius: !m || ki(t._custom) || a === m._top || a === m._bottom,
2698
2699
  x: c ? n.head : p.center,
2699
2700
  y: c ? p.center : n.head,
2700
2701
  height: c ? p.size : Math.abs(n.size),
@@ -2702,7 +2703,7 @@ var Ii = class extends bi {
2702
2703
  };
2703
2704
  d && (h.options = u || this.resolveDataElementOptions(f, e[f].active ? "active" : r));
2704
2705
  let g = h.options || e[f].options;
2705
- ji(h, g, m, a), Fi(h, g, l.ratio), this.updateElement(e[f], f, h, r);
2706
+ Mi(h, g, m, a), Ii(h, g, l.ratio), this.updateElement(e[f], f, h, r);
2706
2707
  }
2707
2708
  }
2708
2709
  _getStacks(e, t) {
@@ -2737,7 +2738,7 @@ var Ii = class extends bi {
2737
2738
  for (i = 0, a = t.data.length; i < a; ++i) r.push(n.getPixelForValue(this.getParsed(i)[n.axis], i));
2738
2739
  let o = e.barThickness;
2739
2740
  return {
2740
- min: o || Si(t),
2741
+ min: o || Ci(t),
2741
2742
  pixels: r,
2742
2743
  start: n._startPixel,
2743
2744
  end: n._endPixel,
@@ -2748,11 +2749,11 @@ var Ii = class extends bi {
2748
2749
  };
2749
2750
  }
2750
2751
  _calculateBarValuePixels(e) {
2751
- let { _cachedMeta: { vScale: t, _stacked: n, index: r }, options: { base: i, minBarLength: a } } = this, o = i || 0, s = this.getParsed(e), c = s._custom, l = Oi(c), u = s[t.axis], d = 0, f = n ? this.applyStack(t, s, n) : u, p, m;
2752
+ let { _cachedMeta: { vScale: t, _stacked: n, index: r }, options: { base: i, minBarLength: a } } = this, o = i || 0, s = this.getParsed(e), c = s._custom, l = ki(c), u = s[t.axis], d = 0, f = n ? this.applyStack(t, s, n) : u, p, m;
2752
2753
  f !== u && (d = f - u, f = u), l && (u = c.barStart, f = c.barEnd - c.barStart, u !== 0 && V(u) !== V(c.barEnd) && (d = 0), d += u);
2753
2754
  let h = !A(i) && !l ? i : d, g = t.getPixelForValue(h);
2754
2755
  if (p = this.chart.getDataVisibility(e) ? t.getPixelForValue(d + f) : g, m = p - g, Math.abs(m) < a) {
2755
- m = ki(m, t, o) * a, u === o && (g -= m / 2);
2756
+ m = Ai(m, t, o) * a, u === o && (g -= m / 2);
2756
2757
  let e = t.getPixelForDecimal(0), i = t.getPixelForDecimal(1);
2757
2758
  g = Math.max(Math.min(g, Math.max(e, i)), Math.min(e, i)), p = g + m, n && !l && (s._stacks[t.axis]._visualValues[r] = t.getValueForPixel(p) - t.getValueForPixel(g));
2758
2759
  }
@@ -2770,7 +2771,7 @@ var Ii = class extends bi {
2770
2771
  _calculateBarIndexPixels(e, t) {
2771
2772
  let n = t.scale, r = this.options, i = r.skipNull, a = F(r.maxBarThickness, Infinity), o, s, c = this._getAxisCount();
2772
2773
  if (t.grouped) {
2773
- let n = i ? this._getStackCount(e) : t.stackCount, l = r.barThickness === "flex" ? wi(e, t, r, n * c) : Ci(e, t, r, n * c), u = this.chart.options.indexAxis === "x" ? this.getDataset().xAxisID : this.getDataset().yAxisID, d = this._getAxis().indexOf(F(u, this.getFirstScaleIdForIndexAxis())), f = this._getStackIndex(this.index, this._cachedMeta.stack, i ? e : void 0) + d;
2774
+ let n = i ? this._getStackCount(e) : t.stackCount, l = r.barThickness === "flex" ? Ti(e, t, r, n * c) : wi(e, t, r, n * c), u = this.chart.options.indexAxis === "x" ? this.getDataset().xAxisID : this.getDataset().yAxisID, d = this._getAxis().indexOf(F(u, this.getFirstScaleIdForIndexAxis())), f = this._getStackIndex(this.index, this._cachedMeta.stack, i ? e : void 0) + d;
2774
2775
  o = l.start + l.chunk * f + l.chunk / 2, s = Math.min(a, l.chunk * l.ratio);
2775
2776
  } else o = n.getPixelForValue(this.getParsed(e)[n.axis], e), s = Math.min(a, t.min * t.ratio);
2776
2777
  return {
@@ -2785,7 +2786,7 @@ var Ii = class extends bi {
2785
2786
  for (; i < r; ++i) this.getParsed(i)[t.axis] !== null && !n[i].hidden && n[i].draw(this._ctx);
2786
2787
  }
2787
2788
  };
2788
- function Li(e, t, n) {
2789
+ function Ri(e, t, n) {
2789
2790
  let r = 1, i = 1, a = 0, o = 0;
2790
2791
  if (t < z) {
2791
2792
  let s = e, c = s + t, l = Math.cos(s), u = Math.sin(s), d = Math.cos(c), f = Math.sin(c), p = (e, t, r) => xt(e, s, c, !0) ? 1 : Math.max(t, t * n, r, r * n), m = (e, t, r) => xt(e, s, c, !0) ? -1 : Math.min(t, t * n, r, r * n), h = p(0, l, d), g = p(B, u, f), _ = m(R, l, d), v = m(R + B, u, f);
@@ -2798,7 +2799,7 @@ function Li(e, t, n) {
2798
2799
  offsetY: o
2799
2800
  };
2800
2801
  }
2801
- var Ri = class extends bi {
2802
+ var zi = class extends xi {
2802
2803
  static id = "doughnut";
2803
2804
  static defaults = {
2804
2805
  datasetElementType: !1,
@@ -2898,7 +2899,7 @@ var Ri = class extends bi {
2898
2899
  };
2899
2900
  }
2900
2901
  update(e) {
2901
- let { chartArea: t } = this.chart, n = this._cachedMeta, r = n.data, i = this.getMaxBorderWidth() + this.getMaxOffset(r) + this.options.spacing, a = Math.max((Math.min(t.width, t.height) - i) / 2, 0), o = Math.min(ze(this.options.cutout, a), 1), s = this._getRingWeight(this.index), { circumference: c, rotation: l } = this._getRotationExtents(), { ratioX: u, ratioY: d, offsetX: f, offsetY: p } = Li(l, c, o), m = (t.width - i) / u, h = (t.height - i) / d, g = Math.max(Math.min(m, h) / 2, 0), _ = Be(this.options.radius, g), v = (_ - Math.max(_ * o, 0)) / this._getVisibleDatasetWeightTotal();
2902
+ let { chartArea: t } = this.chart, n = this._cachedMeta, r = n.data, i = this.getMaxBorderWidth() + this.getMaxOffset(r) + this.options.spacing, a = Math.max((Math.min(t.width, t.height) - i) / 2, 0), o = Math.min(ze(this.options.cutout, a), 1), s = this._getRingWeight(this.index), { circumference: c, rotation: l } = this._getRotationExtents(), { ratioX: u, ratioY: d, offsetX: f, offsetY: p } = Ri(l, c, o), m = (t.width - i) / u, h = (t.height - i) / d, g = Math.max(Math.min(m, h) / 2, 0), _ = Be(this.options.radius, g), v = (_ - Math.max(_ * o, 0)) / this._getVisibleDatasetWeightTotal();
2902
2903
  this.offsetX = f * _, this.offsetY = p * _, n.total = this.calculateTotal(), this.outerRadius = _ - v * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - v * s, 0), this.updateElements(r, 0, r.length, e);
2903
2904
  }
2904
2905
  _circumference(e, t) {
@@ -2971,7 +2972,7 @@ var Ri = class extends bi {
2971
2972
  _getVisibleDatasetWeightTotal() {
2972
2973
  return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
2973
2974
  }
2974
- }, zi = class extends bi {
2975
+ }, Bi = class extends xi {
2975
2976
  static id = "line";
2976
2977
  static defaults = {
2977
2978
  datasetElementType: "line",
@@ -3017,7 +3018,7 @@ var Ri = class extends bi {
3017
3018
  let e = this._cachedMeta;
3018
3019
  e.dataset.updateControlPoints(this.chart.chartArea, e.iScale.axis), super.draw();
3019
3020
  }
3020
- }, Bi = class extends Ri {
3021
+ }, Vi = class extends zi {
3021
3022
  static id = "pie";
3022
3023
  static defaults = {
3023
3024
  cutout: 0,
@@ -3026,10 +3027,10 @@ var Ri = class extends bi {
3026
3027
  radius: "100%"
3027
3028
  };
3028
3029
  };
3029
- function Vi() {
3030
+ function Hi() {
3030
3031
  throw Error("This method is not implemented: Check that a complete date adapter is provided.");
3031
3032
  }
3032
- var Hi = { _date: class e {
3033
+ var Ui = { _date: class e {
3033
3034
  static override(t) {
3034
3035
  Object.assign(e.prototype, t);
3035
3036
  }
@@ -3039,28 +3040,28 @@ var Hi = { _date: class e {
3039
3040
  }
3040
3041
  init() {}
3041
3042
  formats() {
3042
- return Vi();
3043
+ return Hi();
3043
3044
  }
3044
3045
  parse() {
3045
- return Vi();
3046
+ return Hi();
3046
3047
  }
3047
3048
  format() {
3048
- return Vi();
3049
+ return Hi();
3049
3050
  }
3050
3051
  add() {
3051
- return Vi();
3052
+ return Hi();
3052
3053
  }
3053
3054
  diff() {
3054
- return Vi();
3055
+ return Hi();
3055
3056
  }
3056
3057
  startOf() {
3057
- return Vi();
3058
+ return Hi();
3058
3059
  }
3059
3060
  endOf() {
3060
- return Vi();
3061
+ return Hi();
3061
3062
  }
3062
3063
  } };
3063
- function Ui(e, t, n, r) {
3064
+ function Wi(e, t, n, r) {
3064
3065
  let { controller: i, data: a, _sorted: o } = e, s = i._cachedMeta.iScale, c = e.dataset && e.dataset.options ? e.dataset.options.spanGaps : null;
3065
3066
  if (s && t === s.axis && t !== "r" && o && a.length) {
3066
3067
  let o = s._reversePixels ? Et : Tt;
@@ -3090,34 +3091,34 @@ function Ui(e, t, n, r) {
3090
3091
  hi: a.length - 1
3091
3092
  };
3092
3093
  }
3093
- function Wi(e, t, n, r, i) {
3094
+ function Gi(e, t, n, r, i) {
3094
3095
  let a = e.getSortedVisibleDatasetMetas(), o = n[t];
3095
3096
  for (let e = 0, n = a.length; e < n; ++e) {
3096
- let { index: n, data: s } = a[e], { lo: c, hi: l } = Ui(a[e], t, o, i);
3097
+ let { index: n, data: s } = a[e], { lo: c, hi: l } = Wi(a[e], t, o, i);
3097
3098
  for (let e = c; e <= l; ++e) {
3098
3099
  let t = s[e];
3099
3100
  t.skip || r(t, n, e);
3100
3101
  }
3101
3102
  }
3102
3103
  }
3103
- function Gi(e) {
3104
+ function Ki(e) {
3104
3105
  let t = e.indexOf("x") !== -1, n = e.indexOf("y") !== -1;
3105
3106
  return function(e, r) {
3106
3107
  let i = t ? Math.abs(e.x - r.x) : 0, a = n ? Math.abs(e.y - r.y) : 0;
3107
3108
  return Math.sqrt(i ** 2 + a ** 2);
3108
3109
  };
3109
3110
  }
3110
- function Ki(e, t, n, r, i) {
3111
+ function qi(e, t, n, r, i) {
3111
3112
  let a = [];
3112
- return !i && !e.isPointInArea(t) || Wi(e, n, t, function(n, o, s) {
3113
- (i || q(n, e.chartArea, 0)) && n.inRange(t.x, t.y, r) && a.push({
3113
+ return !i && !e.isPointInArea(t) || Gi(e, n, t, function(n, o, s) {
3114
+ (i || hn(n, e.chartArea, 0)) && n.inRange(t.x, t.y, r) && a.push({
3114
3115
  element: n,
3115
3116
  datasetIndex: o,
3116
3117
  index: s
3117
3118
  });
3118
3119
  }, !0), a;
3119
3120
  }
3120
- function qi(e, t, n, r) {
3121
+ function Ji(e, t, n, r) {
3121
3122
  let i = [];
3122
3123
  function a(e, n, a) {
3123
3124
  let { startAngle: o, endAngle: s } = e.getProps(["startAngle", "endAngle"], r), { angle: c } = vt(e, {
@@ -3130,10 +3131,10 @@ function qi(e, t, n, r) {
3130
3131
  index: a
3131
3132
  });
3132
3133
  }
3133
- return Wi(e, n, t, a), i;
3134
+ return Gi(e, n, t, a), i;
3134
3135
  }
3135
- function Ji(e, t, n, r, i, a) {
3136
- let o = [], s = Gi(n), c = Infinity;
3136
+ function Yi(e, t, n, r, i, a) {
3137
+ let o = [], s = Ki(n), c = Infinity;
3137
3138
  function l(n, l, u) {
3138
3139
  let d = n.inRange(t.x, t.y, i);
3139
3140
  if (r && !d) return;
@@ -3150,14 +3151,14 @@ function Ji(e, t, n, r, i, a) {
3150
3151
  index: u
3151
3152
  });
3152
3153
  }
3153
- return Wi(e, n, t, l), o;
3154
+ return Gi(e, n, t, l), o;
3154
3155
  }
3155
- function Yi(e, t, n, r, i, a) {
3156
- return !a && !e.isPointInArea(t) ? [] : n === "r" && !r ? qi(e, t, n, i) : Ji(e, t, n, r, i, a);
3156
+ function Xi(e, t, n, r, i, a) {
3157
+ return !a && !e.isPointInArea(t) ? [] : n === "r" && !r ? Ji(e, t, n, i) : Yi(e, t, n, r, i, a);
3157
3158
  }
3158
- function Xi(e, t, n, r, i) {
3159
+ function Zi(e, t, n, r, i) {
3159
3160
  let a = [], o = n === "x" ? "inXRange" : "inYRange", s = !1;
3160
- return Wi(e, n, t, (e, r, c) => {
3161
+ return Gi(e, n, t, (e, r, c) => {
3161
3162
  e[o] && e[o](t[n], i) && (a.push({
3162
3163
  element: e,
3163
3164
  datasetIndex: r,
@@ -3165,11 +3166,11 @@ function Xi(e, t, n, r, i) {
3165
3166
  }), s ||= e.inRange(t.x, t.y, i));
3166
3167
  }), r && !s ? [] : a;
3167
3168
  }
3168
- var Zi = {
3169
- evaluateInteractionItems: Wi,
3169
+ var Qi = {
3170
+ evaluateInteractionItems: Gi,
3170
3171
  modes: {
3171
3172
  index(e, t, n, r) {
3172
- let i = vr(t, e), a = n.axis || "x", o = n.includeInvisible || !1, s = n.intersect ? Ki(e, i, a, r, o) : Yi(e, i, a, !1, r, o), c = [];
3173
+ let i = yr(t, e), a = n.axis || "x", o = n.includeInvisible || !1, s = n.intersect ? qi(e, i, a, r, o) : Xi(e, i, a, !1, r, o), c = [];
3173
3174
  return s.length ? (e.getSortedVisibleDatasetMetas().forEach((e) => {
3174
3175
  let t = s[0].index, n = e.data[t];
3175
3176
  n && !n.skip && c.push({
@@ -3180,7 +3181,7 @@ var Zi = {
3180
3181
  }), c) : [];
3181
3182
  },
3182
3183
  dataset(e, t, n, r) {
3183
- let i = vr(t, e), a = n.axis || "xy", o = n.includeInvisible || !1, s = n.intersect ? Ki(e, i, a, r, o) : Yi(e, i, a, !1, r, o);
3184
+ let i = yr(t, e), a = n.axis || "xy", o = n.includeInvisible || !1, s = n.intersect ? qi(e, i, a, r, o) : Xi(e, i, a, !1, r, o);
3184
3185
  if (s.length > 0) {
3185
3186
  let t = s[0].datasetIndex, n = e.getDatasetMeta(t).data;
3186
3187
  s = [];
@@ -3193,38 +3194,38 @@ var Zi = {
3193
3194
  return s;
3194
3195
  },
3195
3196
  point(e, t, n, r) {
3196
- return Ki(e, vr(t, e), n.axis || "xy", r, n.includeInvisible || !1);
3197
+ return qi(e, yr(t, e), n.axis || "xy", r, n.includeInvisible || !1);
3197
3198
  },
3198
3199
  nearest(e, t, n, r) {
3199
- let i = vr(t, e), a = n.axis || "xy", o = n.includeInvisible || !1;
3200
- return Yi(e, i, a, n.intersect, r, o);
3200
+ let i = yr(t, e), a = n.axis || "xy", o = n.includeInvisible || !1;
3201
+ return Xi(e, i, a, n.intersect, r, o);
3201
3202
  },
3202
3203
  x(e, t, n, r) {
3203
- return Xi(e, vr(t, e), "x", n.intersect, r);
3204
+ return Zi(e, yr(t, e), "x", n.intersect, r);
3204
3205
  },
3205
3206
  y(e, t, n, r) {
3206
- return Xi(e, vr(t, e), "y", n.intersect, r);
3207
+ return Zi(e, yr(t, e), "y", n.intersect, r);
3207
3208
  }
3208
3209
  }
3209
- }, Qi = [
3210
+ }, $i = [
3210
3211
  "left",
3211
3212
  "top",
3212
3213
  "right",
3213
3214
  "bottom"
3214
3215
  ];
3215
- function $i(e, t) {
3216
- return e.filter((e) => e.pos === t);
3217
- }
3218
3216
  function ea(e, t) {
3219
- return e.filter((e) => Qi.indexOf(e.pos) === -1 && e.box.axis === t);
3217
+ return e.filter((e) => e.pos === t);
3220
3218
  }
3221
3219
  function ta(e, t) {
3220
+ return e.filter((e) => $i.indexOf(e.pos) === -1 && e.box.axis === t);
3221
+ }
3222
+ function na(e, t) {
3222
3223
  return e.sort((e, n) => {
3223
3224
  let r = t ? n : e, i = t ? e : n;
3224
3225
  return r.weight === i.weight ? r.index - i.index : r.weight - i.weight;
3225
3226
  });
3226
3227
  }
3227
- function na(e) {
3228
+ function ra(e) {
3228
3229
  let t = [], n, r, i, a, o, s;
3229
3230
  for (n = 0, r = (e || []).length; n < r; ++n) i = e[n], {position: a, options: {stack: o, stackWeight: s = 1}} = i, t.push({
3230
3231
  index: n,
@@ -3237,11 +3238,11 @@ function na(e) {
3237
3238
  });
3238
3239
  return t;
3239
3240
  }
3240
- function ra(e) {
3241
+ function ia(e) {
3241
3242
  let t = {};
3242
3243
  for (let n of e) {
3243
3244
  let { stack: e, pos: r, stackWeight: i } = n;
3244
- if (!e || !Qi.includes(r)) continue;
3245
+ if (!e || !$i.includes(r)) continue;
3245
3246
  let a = t[e] || (t[e] = {
3246
3247
  count: 0,
3247
3248
  placed: 0,
@@ -3252,8 +3253,8 @@ function ra(e) {
3252
3253
  }
3253
3254
  return t;
3254
3255
  }
3255
- function ia(e, t) {
3256
- let n = ra(e), { vBoxMaxWidth: r, hBoxMaxHeight: i } = t, a, o, s;
3256
+ function aa(e, t) {
3257
+ let n = ia(e), { vBoxMaxWidth: r, hBoxMaxHeight: i } = t, a, o, s;
3257
3258
  for (a = 0, o = e.length; a < o; ++a) {
3258
3259
  s = e[a];
3259
3260
  let { fullSize: o } = s.box, c = n[s.stack], l = c && s.stackWeight / c.weight;
@@ -3261,24 +3262,24 @@ function ia(e, t) {
3261
3262
  }
3262
3263
  return n;
3263
3264
  }
3264
- function aa(e) {
3265
- let t = na(e), n = ta(t.filter((e) => e.box.fullSize), !0), r = ta($i(t, "left"), !0), i = ta($i(t, "right")), a = ta($i(t, "top"), !0), o = ta($i(t, "bottom")), s = ea(t, "x"), c = ea(t, "y");
3265
+ function oa(e) {
3266
+ let t = ra(e), n = na(t.filter((e) => e.box.fullSize), !0), r = na(ea(t, "left"), !0), i = na(ea(t, "right")), a = na(ea(t, "top"), !0), o = na(ea(t, "bottom")), s = ta(t, "x"), c = ta(t, "y");
3266
3267
  return {
3267
3268
  fullSize: n,
3268
3269
  leftAndTop: r.concat(a),
3269
3270
  rightAndBottom: i.concat(c).concat(o).concat(s),
3270
- chartArea: $i(t, "chartArea"),
3271
+ chartArea: ea(t, "chartArea"),
3271
3272
  vertical: r.concat(i).concat(c),
3272
3273
  horizontal: a.concat(o).concat(s)
3273
3274
  };
3274
3275
  }
3275
- function oa(e, t, n, r) {
3276
+ function sa(e, t, n, r) {
3276
3277
  return Math.max(e[n], t[n]) + Math.max(e[r], t[r]);
3277
3278
  }
3278
- function sa(e, t) {
3279
+ function ca(e, t) {
3279
3280
  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);
3280
3281
  }
3281
- function ca(e, t, n, r) {
3282
+ function la(e, t, n, r) {
3282
3283
  let { pos: i, box: a } = n, o = e.maxPadding;
3283
3284
  if (!M(i)) {
3284
3285
  n.size && (e[i] -= n.size);
@@ -3288,8 +3289,8 @@ function ca(e, t, n, r) {
3288
3289
  };
3289
3290
  t.size = Math.max(t.size, n.horizontal ? a.height : a.width), n.size = t.size / t.count, e[i] += n.size;
3290
3291
  }
3291
- a.getPadding && sa(o, a.getPadding());
3292
- let s = Math.max(0, t.outerWidth - oa(o, e, "left", "right")), c = Math.max(0, t.outerHeight - oa(o, e, "top", "bottom")), l = s !== e.w, u = c !== e.h;
3292
+ a.getPadding && ca(o, a.getPadding());
3293
+ let s = Math.max(0, t.outerWidth - sa(o, e, "left", "right")), c = Math.max(0, t.outerHeight - sa(o, e, "top", "bottom")), l = s !== e.w, u = c !== e.h;
3293
3294
  return e.w = s, e.h = c, n.horizontal ? {
3294
3295
  same: l,
3295
3296
  other: u
@@ -3298,7 +3299,7 @@ function ca(e, t, n, r) {
3298
3299
  other: l
3299
3300
  };
3300
3301
  }
3301
- function la(e) {
3302
+ function ua(e) {
3302
3303
  let t = e.maxPadding;
3303
3304
  function n(n) {
3304
3305
  let r = Math.max(t[n] - e[n], 0);
@@ -3306,7 +3307,7 @@ function la(e) {
3306
3307
  }
3307
3308
  e.y += n("top"), e.x += n("left"), n("right"), n("bottom");
3308
3309
  }
3309
- function ua(e, t) {
3310
+ function da(e, t) {
3310
3311
  let n = t.maxPadding;
3311
3312
  function r(e) {
3312
3313
  let r = {
@@ -3321,19 +3322,19 @@ function ua(e, t) {
3321
3322
  }
3322
3323
  return r(e ? ["left", "right"] : ["top", "bottom"]);
3323
3324
  }
3324
- function da(e, t, n, r) {
3325
+ function fa(e, t, n, r) {
3325
3326
  let i = [], a, o, s, c, l, u;
3326
3327
  for (a = 0, o = e.length, l = 0; a < o; ++a) {
3327
- s = e[a], c = s.box, c.update(s.width || t.w, s.height || t.h, ua(s.horizontal, t));
3328
- let { same: o, other: d } = ca(t, n, s, r);
3328
+ s = e[a], c = s.box, c.update(s.width || t.w, s.height || t.h, da(s.horizontal, t));
3329
+ let { same: o, other: d } = la(t, n, s, r);
3329
3330
  l |= o && i.length, u ||= d, c.fullSize || i.push(s);
3330
3331
  }
3331
- return l && da(i, t, n, r) || u;
3332
+ return l && fa(i, t, n, r) || u;
3332
3333
  }
3333
- function fa(e, t, n, r, i) {
3334
+ function pa(e, t, n, r, i) {
3334
3335
  e.top = n, e.left = t, e.right = t + r, e.bottom = n + i, e.width = r, e.height = i;
3335
3336
  }
3336
- function pa(e, t, n, r) {
3337
+ function ma(e, t, n, r) {
3337
3338
  let i = n.padding, { x: a, y: o } = t;
3338
3339
  for (let s of e) {
3339
3340
  let e = s.box, c = r[s.stack] || {
@@ -3343,15 +3344,15 @@ function pa(e, t, n, r) {
3343
3344
  }, l = s.stackWeight / c.weight || 1;
3344
3345
  if (s.horizontal) {
3345
3346
  let r = t.w * l, a = c.size || e.height;
3346
- $e(c.start) && (o = c.start), e.fullSize ? fa(e, i.left, o, n.outerWidth - i.right - i.left, a) : fa(e, t.left + c.placed, o, r, a), c.start = o, c.placed += r, o = e.bottom;
3347
+ $e(c.start) && (o = c.start), e.fullSize ? pa(e, i.left, o, n.outerWidth - i.right - i.left, a) : pa(e, t.left + c.placed, o, r, a), c.start = o, c.placed += r, o = e.bottom;
3347
3348
  } else {
3348
3349
  let r = t.h * l, o = c.size || e.width;
3349
- $e(c.start) && (a = c.start), e.fullSize ? fa(e, a, i.top, o, n.outerHeight - i.bottom - i.top) : fa(e, a, t.top + c.placed, o, r), c.start = a, c.placed += r, a = e.right;
3350
+ $e(c.start) && (a = c.start), e.fullSize ? pa(e, a, i.top, o, n.outerHeight - i.bottom - i.top) : pa(e, a, t.top + c.placed, o, r), c.start = a, c.placed += r, a = e.right;
3350
3351
  }
3351
3352
  }
3352
3353
  t.x = a, t.y = o;
3353
3354
  }
3354
- var ma = {
3355
+ var Y = {
3355
3356
  addBox(e, t) {
3356
3357
  e.boxes ||= [], t.fullSize = t.fullSize || !1, t.position = t.position || "top", t.weight = t.weight || 0, t._layers = t._layers || function() {
3357
3358
  return [{
@@ -3371,7 +3372,7 @@ var ma = {
3371
3372
  },
3372
3373
  update(e, t, n, r) {
3373
3374
  if (!e) return;
3374
- let i = J(e.options.layout.padding), a = Math.max(t - i.width, 0), o = Math.max(n - i.height, 0), s = aa(e.boxes), c = s.vertical, l = s.horizontal;
3375
+ let i = q(e.options.layout.padding), a = Math.max(t - i.width, 0), o = Math.max(n - i.height, 0), s = oa(e.boxes), c = s.vertical, l = s.horizontal;
3375
3376
  L(e.boxes, (e) => {
3376
3377
  typeof e.beforeLayout == "function" && e.beforeLayout();
3377
3378
  });
@@ -3384,15 +3385,15 @@ var ma = {
3384
3385
  vBoxMaxWidth: a / 2 / u,
3385
3386
  hBoxMaxHeight: o / 2
3386
3387
  }), f = Object.assign({}, i);
3387
- sa(f, J(r));
3388
+ ca(f, q(r));
3388
3389
  let p = Object.assign({
3389
3390
  maxPadding: f,
3390
3391
  w: a,
3391
3392
  h: o,
3392
3393
  x: i.left,
3393
3394
  y: i.top
3394
- }, i), m = ia(c.concat(l), d);
3395
- da(s.fullSize, p, d, m), da(c, p, d, m), da(l, p, d, m) && da(c, p, d, m), la(p), pa(s.leftAndTop, p, d, m), p.x += p.w, p.y += p.h, pa(s.rightAndBottom, p, d, m), e.chartArea = {
3395
+ }, i), m = aa(c.concat(l), d);
3396
+ fa(s.fullSize, p, d, m), fa(c, p, d, m), fa(l, p, d, m) && fa(c, p, d, m), ua(p), ma(s.leftAndTop, p, d, m), p.x += p.w, p.y += p.h, ma(s.rightAndBottom, p, d, m), e.chartArea = {
3396
3397
  left: p.left,
3397
3398
  top: p.top,
3398
3399
  right: p.left + p.w,
@@ -3458,19 +3459,19 @@ function ba(e, t) {
3458
3459
  width: n.width
3459
3460
  }
3460
3461
  } }, n.display = n.display || "block", n.boxSizing = n.boxSizing || "border-box", ya(i)) {
3461
- let t = wr(e, "width");
3462
+ let t = Tr(e, "width");
3462
3463
  t !== void 0 && (e.width = t);
3463
3464
  }
3464
3465
  if (ya(r)) {
3465
3466
  if (e.style.height === "") e.height = e.width / (t || 2);
3466
3467
  else {
3467
- let t = wr(e, "height");
3468
+ let t = Tr(e, "height");
3468
3469
  t !== void 0 && (e.height = t);
3469
3470
  }
3470
3471
  }
3471
3472
  return e;
3472
3473
  }
3473
- var xa = Cr ? { passive: !0 } : !1;
3474
+ var xa = wr ? { passive: !0 } : !1;
3474
3475
  function Sa(e, t, n) {
3475
3476
  e && e.addEventListener(t, n, xa);
3476
3477
  }
@@ -3478,7 +3479,7 @@ function Ca(e, t, n) {
3478
3479
  e && e.canvas && e.canvas.removeEventListener(t, n, xa);
3479
3480
  }
3480
3481
  function wa(e, t) {
3481
- let n = va[e.type] || e.type, { x: r, y: i } = vr(e, t);
3482
+ let n = va[e.type] || e.type, { x: r, y: i } = yr(e, t);
3482
3483
  return {
3483
3484
  type: n,
3484
3485
  chart: t,
@@ -3526,7 +3527,7 @@ function Ma(e) {
3526
3527
  Oa.delete(e), Oa.size || window.removeEventListener("resize", Aa);
3527
3528
  }
3528
3529
  function Na(e, t, n) {
3529
- let r = e.canvas, i = r && ur(r);
3530
+ let r = e.canvas, i = r && dr(r);
3530
3531
  if (!i) return;
3531
3532
  let a = Nt((e, t) => {
3532
3533
  let r = i.clientWidth;
@@ -3585,15 +3586,15 @@ var Ia = class extends ha {
3585
3586
  return window.devicePixelRatio;
3586
3587
  }
3587
3588
  getMaximumSize(e, t, n, r) {
3588
- return xr(e, t, n, r);
3589
+ return Sr(e, t, n, r);
3589
3590
  }
3590
3591
  isAttached(e) {
3591
- let t = e && ur(e);
3592
+ let t = e && dr(e);
3592
3593
  return !!(t && t.isConnected);
3593
3594
  }
3594
3595
  };
3595
3596
  function La(e) {
3596
- return !lr() || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas ? ga : Ia;
3597
+ return !ur() || typeof OffscreenCanvas < "u" && e instanceof OffscreenCanvas ? ga : Ia;
3597
3598
  }
3598
3599
  var Ra = class {
3599
3600
  static defaults = {};
@@ -3691,17 +3692,17 @@ function Qa(e) {
3691
3692
  }
3692
3693
  function $a(e, t) {
3693
3694
  if (!e.display) return 0;
3694
- let n = Y(e.font, t), r = J(e.padding);
3695
+ let n = J(e.font, t), r = q(e.padding);
3695
3696
  return (j(e.text) ? e.text.length : 1) * n.lineHeight + r.height;
3696
3697
  }
3697
3698
  function eo(e, t) {
3698
- return Nn(e, {
3699
+ return Pn(e, {
3699
3700
  scale: t,
3700
3701
  type: "scale"
3701
3702
  });
3702
3703
  }
3703
3704
  function to(e, t, n) {
3704
- return Nn(e, {
3705
+ return Pn(e, {
3705
3706
  tick: n,
3706
3707
  index: t,
3707
3708
  type: "tick"
@@ -3801,7 +3802,7 @@ var io = class e extends Ra {
3801
3802
  right: 0,
3802
3803
  top: 0,
3803
3804
  bottom: 0
3804
- }, n), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + n.left + n.right : this.height + n.top + n.bottom, this._dataLimitsCached ||= (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = Mn(this, i, r), !0), this.beforeBuildTicks(), this.ticks = this.buildTicks() || [], this.afterBuildTicks();
3805
+ }, n), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + n.left + n.right : this.height + n.top + n.bottom, this._dataLimitsCached ||= (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = Nn(this, i, r), !0), this.beforeBuildTicks(), this.ticks = this.buildTicks() || [], this.afterBuildTicks();
3805
3806
  let s = o < this.ticks.length;
3806
3807
  this._convertTicksToLabels(s ? Ya(this.ticks, o) : this.ticks), this.configure(), this.beforeCalculateLabelRotation(), this.calculateLabelRotation(), this.afterCalculateLabelRotation(), a.display && (a.autoSkip || a.source === "auto") && (this.ticks = za(this, this.ticks), this._labelSizes = null, this.afterAutoSkip()), s && this._convertTicksToLabels(this.ticks), this.beforeFit(), this.fit(), this.afterFit(), this.afterUpdate();
3807
3808
  }
@@ -4080,7 +4081,7 @@ var io = class e extends Ra {
4080
4081
  a ? (b = C, S === "inner" && (d = g === _ - 1 ? this.options.reverse ? "left" : "right" : g === 0 ? this.options.reverse ? "right" : "left" : "center"), D = r === "top" ? c === "near" || m !== 0 ? -E * T + T / 2 : c === "center" ? -k.highest.height / 2 - t * T + T : -k.highest.height + T / 2 : c === "near" || m !== 0 ? T / 2 : c === "center" ? k.highest.height / 2 - t * T : k.highest.height - E * T, u && (D *= -1), m !== 0 && !e.showLabelBackdrop && (b += T / 2 * Math.sin(m))) : (x = C, D = (1 - E) * T / 2);
4081
4082
  let f;
4082
4083
  if (e.showLabelBackdrop) {
4083
- let t = J(e.backdropPadding), n = k.heights[g], r = k.widths[g], i = D - t.top, a = 0 - t.left;
4084
+ let t = q(e.backdropPadding), n = k.heights[g], r = k.widths[g], i = D - t.top, a = 0 - t.left;
4084
4085
  switch (O) {
4085
4086
  case "middle":
4086
4087
  i -= n / 2;
@@ -4196,21 +4197,21 @@ var io = class e extends Ra {
4196
4197
  drawLabels(e) {
4197
4198
  if (!this.options.ticks.display) return;
4198
4199
  let t = this.ctx, n = this._computeLabelArea();
4199
- n && hn(t, n);
4200
+ n && gn(t, n);
4200
4201
  let r = this.getLabelItems(e);
4201
4202
  for (let e of r) {
4202
4203
  let n = e.options, r = e.font, i = e.label, a = e.textOffset;
4203
- Sn(t, i, 0, a, r, n);
4204
+ Cn(t, i, 0, a, r, n);
4204
4205
  }
4205
- n && gn(t);
4206
+ n && _n(t);
4206
4207
  }
4207
4208
  drawTitle() {
4208
4209
  let { ctx: e, options: { position: t, title: n, reverse: r } } = this;
4209
4210
  if (!n.display) return;
4210
- let i = Y(n.font), a = J(n.padding), o = n.align, s = i.lineHeight / 2;
4211
+ let i = J(n.font), a = q(n.padding), o = n.align, s = i.lineHeight / 2;
4211
4212
  t === "bottom" || t === "center" || M(t) ? (s += a.bottom, j(n.text) && (s += i.lineHeight * (n.text.length - 1))) : s += a.top;
4212
4213
  let { titleX: c, titleY: l, maxWidth: u, rotation: d } = ro(this, s, t, o);
4213
- Sn(e, n.text, 0, 0, i, {
4214
+ Cn(e, n.text, 0, 0, i, {
4214
4215
  color: n.color,
4215
4216
  maxWidth: u,
4216
4217
  rotation: d,
@@ -4261,7 +4262,7 @@ var io = class e extends Ra {
4261
4262
  return r;
4262
4263
  }
4263
4264
  _resolveTickFontOptions(e) {
4264
- return Y(this.options.ticks.setContext(this.getContext(e)).font);
4265
+ return J(this.options.ticks.setContext(this.getContext(e)).font);
4265
4266
  }
4266
4267
  _maxDigits() {
4267
4268
  let e = this._resolveTickFontOptions(0).lineHeight;
@@ -4308,7 +4309,7 @@ function co(e) {
4308
4309
  }
4309
4310
  var X = /* #__PURE__ */ new class {
4310
4311
  constructor() {
4311
- this.controllers = new ao(bi, "datasets", !0), this.elements = new ao(Ra, "elements"), this.plugins = new ao(Object, "plugins"), this.scales = new ao(io, "scales"), this._typedRegistries = [
4312
+ this.controllers = new ao(xi, "datasets", !0), this.elements = new ao(Ra, "elements"), this.plugins = new ao(Object, "plugins"), this.scales = new ao(io, "scales"), this._typedRegistries = [
4312
4313
  this.controllers,
4313
4314
  this.scales,
4314
4315
  this.elements
@@ -4622,14 +4623,14 @@ var Ao = (e, t, n) => {
4622
4623
  if (Po(a, t)) {
4623
4624
  i.$shared = !1, n = et(n) ? n() : n;
4624
4625
  let t = this.createResolver(e, n, o);
4625
- s = Fn(a, n, t);
4626
+ s = In(a, n, t);
4626
4627
  }
4627
4628
  for (let e of t) i[e] = s[e];
4628
4629
  return i;
4629
4630
  }
4630
4631
  createResolver(e, t, n = [""], r) {
4631
4632
  let { resolver: i } = Mo(this._resolverCache, e, n);
4632
- return M(t) ? Fn(i, t, void 0, r) : i;
4633
+ return M(t) ? In(i, t, void 0, r) : i;
4633
4634
  }
4634
4635
  };
4635
4636
  function Mo(e, t, n) {
@@ -4637,13 +4638,13 @@ function Mo(e, t, n) {
4637
4638
  r || (r = /* @__PURE__ */ new Map(), e.set(t, r));
4638
4639
  let i = n.join(), a = r.get(i);
4639
4640
  return a || (a = {
4640
- resolver: Pn(t, n),
4641
+ resolver: Fn(t, n),
4641
4642
  subPrefixes: n.filter((e) => !e.toLowerCase().includes("hover"))
4642
4643
  }, r.set(i, a)), a;
4643
4644
  }
4644
4645
  var No = (e) => M(e) && Object.getOwnPropertyNames(e).some((t) => et(e[t]));
4645
4646
  function Po(e, t) {
4646
- let { isScriptable: n, isIndexable: r } = In(e);
4647
+ let { isScriptable: n, isIndexable: r } = Ln(e);
4647
4648
  for (let i of t) {
4648
4649
  let t = n(i), a = r(i), o = (a || t) && e[i];
4649
4650
  if (t && (et(o) || No(o)) || a && j(o)) return !0;
@@ -4674,7 +4675,7 @@ function Bo(e) {
4674
4675
  I(n && n.onProgress, [e], t);
4675
4676
  }
4676
4677
  function Vo(e) {
4677
- return lr() && typeof e == "string" ? e = document.getElementById(e) : e && e.length && (e = e[0]), e && e.canvas && (e = e.canvas), e;
4678
+ return ur() && typeof e == "string" ? e = document.getElementById(e) : e && e.length && (e = e[0]), e && e.canvas && (e = e.canvas), e;
4678
4679
  }
4679
4680
  var Ho = {}, Uo = (e) => {
4680
4681
  let t = Vo(e);
@@ -4712,7 +4713,7 @@ var Ko = class {
4712
4713
  let a = n.createResolver(n.chartOptionScopes(), this.getContext());
4713
4714
  this.platform = new (n.platform || (La(r)))(), this.platform.updateConfig(n);
4714
4715
  let o = this.platform.acquireContext(r, a.aspectRatio), s = o && o.canvas, c = s && s.height, l = s && s.width;
4715
- this.id = Re(), this.ctx = o, this.canvas = s, this.width = l, this.height = c, this._options = a, this._aspectRatio = this.aspectRatio, this._layers = [], this._metasets = [], this._stacks = void 0, this.boxes = [], this.currentDevicePixelRatio = void 0, this.chartArea = void 0, this._active = [], this._lastEvent = void 0, this._listeners = {}, this._responsiveListeners = void 0, this._sortedMetasets = [], this.scales = {}, this._plugins = new lo(), this.$proxies = {}, this._hiddenIndices = {}, this.attached = !1, this._animationsDisabled = void 0, this.$context = void 0, this._doResize = Pt((e) => this.update(e), a.resizeDelay || 0), this._dataChanges = [], Ho[this.id] = this, !o || !s ? console.error("Failed to create chart: can't acquire context from the given item") : (Jr.listen(this, "complete", zo), Jr.listen(this, "progress", Bo), this._initialize(), this.attached && this.update());
4716
+ this.id = Re(), this.ctx = o, this.canvas = s, this.width = l, this.height = c, this._options = a, this._aspectRatio = this.aspectRatio, this._layers = [], this._metasets = [], this._stacks = void 0, this.boxes = [], this.currentDevicePixelRatio = void 0, this.chartArea = void 0, this._active = [], this._lastEvent = void 0, this._listeners = {}, this._responsiveListeners = void 0, this._sortedMetasets = [], this.scales = {}, this._plugins = new lo(), this.$proxies = {}, this._hiddenIndices = {}, this.attached = !1, this._animationsDisabled = void 0, this.$context = void 0, this._doResize = Pt((e) => this.update(e), a.resizeDelay || 0), this._dataChanges = [], Ho[this.id] = this, !o || !s ? console.error("Failed to create chart: can't acquire context from the given item") : (Yr.listen(this, "complete", zo), Yr.listen(this, "progress", Bo), this._initialize(), this.attached && this.update());
4716
4717
  }
4717
4718
  get aspectRatio() {
4718
4719
  let { options: { aspectRatio: e, maintainAspectRatio: t }, width: n, height: r, _aspectRatio: i } = this;
@@ -4734,23 +4735,23 @@ var Ko = class {
4734
4735
  return X;
4735
4736
  }
4736
4737
  _initialize() {
4737
- return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : Sr(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this;
4738
+ return this.notifyPlugins("beforeInit"), this.options.responsive ? this.resize() : Cr(this, this.options.devicePixelRatio), this.bindEvents(), this.notifyPlugins("afterInit"), this;
4738
4739
  }
4739
4740
  clear() {
4740
4741
  return fn(this.canvas, this.ctx), this;
4741
4742
  }
4742
4743
  stop() {
4743
- return Jr.stop(this), this;
4744
+ return Yr.stop(this), this;
4744
4745
  }
4745
4746
  resize(e, t) {
4746
- Jr.running(this) ? this._resizeBeforeDraw = {
4747
+ Yr.running(this) ? this._resizeBeforeDraw = {
4747
4748
  width: e,
4748
4749
  height: t
4749
4750
  } : this._resize(e, t);
4750
4751
  }
4751
4752
  _resize(e, t) {
4752
4753
  let n = this.options, r = this.canvas, i = n.maintainAspectRatio && this.aspectRatio, a = this.platform.getMaximumSize(r, e, t, i), o = n.devicePixelRatio || this.platform.getDevicePixelRatio(), s = this.width ? "resize" : "attach";
4753
- this.width = a.width, this.height = a.height, this._aspectRatio = this.aspectRatio, Sr(this, o, !0) && (this.notifyPlugins("resize", { size: a }), I(n.onResize, [this, a], this), this.attached && this._doResize(s) && this.render());
4754
+ this.width = a.width, this.height = a.height, this._aspectRatio = this.aspectRatio, Cr(this, o, !0) && (this.notifyPlugins("resize", { size: a }), I(n.onResize, [this, a], this), this.attached && this._doResize(s) && this.render());
4754
4755
  }
4755
4756
  ensureScalesHaveIDs() {
4756
4757
  L(this.options.scales || {}, (e, t) => {
@@ -4779,7 +4780,7 @@ var Ko = class {
4779
4780
  }), L(r, (e, t) => {
4780
4781
  e || delete n[t];
4781
4782
  }), L(n, (e) => {
4782
- ma.configure(this, e, e.options), ma.addBox(this, e);
4783
+ Y.configure(this, e, e.options), Y.addBox(this, e);
4783
4784
  });
4784
4785
  }
4785
4786
  _updateMetasets() {
@@ -4842,7 +4843,7 @@ var Ko = class {
4842
4843
  }
4843
4844
  _updateScales() {
4844
4845
  L(this.scales, (e) => {
4845
- ma.removeBox(this, e);
4846
+ Y.removeBox(this, e);
4846
4847
  }), this.ensureScalesHaveIDs(), this.buildOrUpdateScales();
4847
4848
  }
4848
4849
  _checkEventBindings() {
@@ -4867,7 +4868,7 @@ var Ko = class {
4867
4868
  }
4868
4869
  _updateLayout(e) {
4869
4870
  if (this.notifyPlugins("beforeLayout", { cancelable: !0 }) === !1) return;
4870
- ma.update(this, this.width, this.height, e);
4871
+ Y.update(this, this.width, this.height, e);
4871
4872
  let t = this.chartArea, n = t.width <= 0 || t.height <= 0;
4872
4873
  this._layers = [], L(this.boxes, (e) => {
4873
4874
  n && e.position === "chartArea" || (e.configure && e.configure(), this._layers.push(...e._layers()));
@@ -4895,7 +4896,7 @@ var Ko = class {
4895
4896
  this.notifyPlugins("beforeDatasetUpdate", r) !== !1 && (n.controller._update(t), r.cancelable = !1, this.notifyPlugins("afterDatasetUpdate", r));
4896
4897
  }
4897
4898
  render() {
4898
- this.notifyPlugins("beforeRender", { cancelable: !0 }) !== !1 && (Jr.has(this) ? this.attached && !Jr.running(this) && Jr.start(this) : (this.draw(), zo({ chart: this })));
4899
+ this.notifyPlugins("beforeRender", { cancelable: !0 }) !== !1 && (Yr.has(this) ? this.attached && !Yr.running(this) && Yr.start(this) : (this.draw(), zo({ chart: this })));
4899
4900
  }
4900
4901
  draw() {
4901
4902
  let e;
@@ -4931,14 +4932,14 @@ var Ko = class {
4931
4932
  meta: e,
4932
4933
  index: e.index,
4933
4934
  cancelable: !0
4934
- }, r = qr(this, e);
4935
- this.notifyPlugins("beforeDatasetDraw", n) !== !1 && (r && hn(t, r), e.controller.draw(), r && gn(t), n.cancelable = !1, this.notifyPlugins("afterDatasetDraw", n));
4935
+ }, r = Jr(this, e);
4936
+ this.notifyPlugins("beforeDatasetDraw", n) !== !1 && (r && gn(t, r), e.controller.draw(), r && _n(t), n.cancelable = !1, this.notifyPlugins("afterDatasetDraw", n));
4936
4937
  }
4937
4938
  isPointInArea(e) {
4938
- return q(e, this.chartArea, this._minPadding);
4939
+ return hn(e, this.chartArea, this._minPadding);
4939
4940
  }
4940
4941
  getElementsAtEventForMode(e, t, n, r) {
4941
- let i = Zi.modes[t];
4942
+ let i = Qi.modes[t];
4942
4943
  return typeof i == "function" ? i(this, e, n, r) : [];
4943
4944
  }
4944
4945
  getDatasetMeta(e) {
@@ -4959,7 +4960,7 @@ var Ko = class {
4959
4960
  }, n.push(r)), r;
4960
4961
  }
4961
4962
  getContext() {
4962
- return this.$context ||= Nn(null, {
4963
+ return this.$context ||= Pn(null, {
4963
4964
  chart: this,
4964
4965
  type: "chart"
4965
4966
  });
@@ -4999,7 +5000,7 @@ var Ko = class {
4999
5000
  }
5000
5001
  _stop() {
5001
5002
  let e, t;
5002
- for (this.stop(), Jr.remove(this), e = 0, t = this.data.datasets.length; e < t; ++e) this._destroyDatasetMeta(e);
5003
+ for (this.stop(), Yr.remove(this), e = 0, t = this.data.datasets.length; e < t; ++e) this._destroyDatasetMeta(e);
5003
5004
  }
5004
5005
  destroy() {
5005
5006
  this.notifyPlugins("beforeDestroy");
@@ -5130,7 +5131,7 @@ function Yo(e, t, n) {
5130
5131
  e.beginPath(), e.arc(a, o, s, r - l, n + l), c > i ? (l = i / c, e.arc(a, o, c, n + l, r - l, !0)) : e.arc(a, o, i, n + B, r - B), e.closePath(), e.clip();
5131
5132
  }
5132
5133
  function Xo(e) {
5133
- return On(e, [
5134
+ return kn(e, [
5134
5135
  "outerStart",
5135
5136
  "outerEnd",
5136
5137
  "innerStart",
@@ -5312,7 +5313,7 @@ function as(e, t, n) {
5312
5313
  e.lineTo(n.x, n.y);
5313
5314
  }
5314
5315
  function os(e) {
5315
- return e.stepped ? _n : e.tension || e.cubicInterpolationMode === "monotone" ? vn : as;
5316
+ return e.stepped ? vn : e.tension || e.cubicInterpolationMode === "monotone" ? yn : as;
5316
5317
  }
5317
5318
  function ss(e, t, n = {}) {
5318
5319
  let r = e.length, { start: i = 0, end: a = r - 1 } = n, { start: o, end: s } = t, c = Math.max(i, o), l = Math.min(a, s), u = i < o && a < o || i > s && a > s;
@@ -5344,7 +5345,7 @@ function us(e) {
5344
5345
  return !e._decimated && !e._loop && !t.tension && t.cubicInterpolationMode !== "monotone" && !t.stepped && !n ? ls : cs;
5345
5346
  }
5346
5347
  function ds(e) {
5347
- return e.stepped ? Er : e.tension || e.cubicInterpolationMode === "monotone" ? Dr : Tr;
5348
+ return e.stepped ? Dr : e.tension || e.cubicInterpolationMode === "monotone" ? Or : Er;
5348
5349
  }
5349
5350
  function fs(e, t, n, r) {
5350
5351
  let i = t._path;
@@ -5391,7 +5392,7 @@ var gs = class extends Ra {
5391
5392
  let n = this.options;
5392
5393
  if ((n.tension || n.cubicInterpolationMode === "monotone") && !n.stepped && !this._pointsUpdated) {
5393
5394
  let r = n.spanGaps ? this._loop : this._fullLoop;
5394
- cr(this._points, n, e, r, t), this._pointsUpdated = !0;
5395
+ lr(this._points, n, e, r, t), this._pointsUpdated = !0;
5395
5396
  }
5396
5397
  }
5397
5398
  set points(e) {
@@ -5401,7 +5402,7 @@ var gs = class extends Ra {
5401
5402
  return this._points;
5402
5403
  }
5403
5404
  get segments() {
5404
- return this._segments ||= Br(this, this.options.segment);
5405
+ return this._segments ||= Vr(this, this.options.segment);
5405
5406
  }
5406
5407
  first() {
5407
5408
  let e = this.segments, t = this.points;
@@ -5412,7 +5413,7 @@ var gs = class extends Ra {
5412
5413
  return n && t[e[n - 1].end];
5413
5414
  }
5414
5415
  interpolate(e, t) {
5415
- let n = this.options, r = e[t], i = this.points, a = Lr(this, {
5416
+ let n = this.options, r = e[t], i = this.points, a = Rr(this, {
5416
5417
  property: t,
5417
5418
  start: r,
5418
5419
  end: r
@@ -5498,7 +5499,7 @@ var vs = class extends Ra {
5498
5499
  }
5499
5500
  draw(e, t) {
5500
5501
  let n = this.options;
5501
- this.skip || n.radius < .1 || !q(this, t, this.size(n) / 2) || (e.strokeStyle = n.borderColor, e.lineWidth = n.borderWidth, e.fillStyle = n.backgroundColor, pn(e, n, this.x, this.y));
5502
+ this.skip || n.radius < .1 || !hn(this, t, this.size(n) / 2) || (e.strokeStyle = n.borderColor, e.lineWidth = n.borderWidth, e.fillStyle = n.backgroundColor, pn(e, n, this.x, this.y));
5502
5503
  }
5503
5504
  getRange() {
5504
5505
  let e = this.options || {};
@@ -5524,7 +5525,7 @@ function bs(e, t, n, r) {
5524
5525
  return e ? 0 : W(t, n, r);
5525
5526
  }
5526
5527
  function xs(e, t, n) {
5527
- let r = e.options.borderWidth, i = e.borderSkipped, a = kn(r);
5528
+ let r = e.options.borderWidth, i = e.borderSkipped, a = An(r);
5528
5529
  return {
5529
5530
  t: bs(i.top, a.top, 0, n),
5530
5531
  r: bs(i.right, a.right, 0, t),
@@ -5533,7 +5534,7 @@ function xs(e, t, n) {
5533
5534
  };
5534
5535
  }
5535
5536
  function Ss(e, t, n) {
5536
- let { enableBorderRadius: r } = e.getProps(["enableBorderRadius"]), i = e.options.borderRadius, a = An(i), o = Math.min(t, n), s = e.borderSkipped, c = r || M(i);
5537
+ let { enableBorderRadius: r } = e.getProps(["enableBorderRadius"]), i = e.options.borderRadius, a = jn(i), o = Math.min(t, n), s = e.borderSkipped, c = r || M(i);
5537
5538
  return {
5538
5539
  topLeft: bs(!c || s.top || s.left, a.topLeft, 0, o),
5539
5540
  topRight: bs(!c || s.top || s.right, a.topRight, 0, o),
@@ -5602,7 +5603,7 @@ var Os = class extends Ra {
5602
5603
  super(), this.options = void 0, this.horizontal = void 0, this.base = void 0, this.width = void 0, this.height = void 0, this.inflateAmount = void 0, e && Object.assign(this, e);
5603
5604
  }
5604
5605
  draw(e) {
5605
- let { inflateAmount: t, options: { borderColor: n, backgroundColor: r } } = this, { inner: i, outer: a } = Cs(this), o = Ts(a.radius) ? Cn : Es;
5606
+ let { inflateAmount: t, options: { borderColor: n, backgroundColor: r } } = this, { inner: i, outer: a } = Cs(this), o = Ts(a.radius) ? wn : Es;
5606
5607
  e.save(), (a.w !== i.w || a.h !== i.h) && (e.beginPath(), o(e, Ds(a, t, i)), e.clip(), o(e, Ds(i, -t, a)), e.fillStyle = n, e.fill("evenodd")), e.beginPath(), o(e, Ds(i, t)), e.fillStyle = r, e.fill(), e.restore();
5607
5608
  }
5608
5609
  inRange(e, t, n) {
@@ -5656,7 +5657,7 @@ var Os = class extends Ra {
5656
5657
  this.width = this.height = 0;
5657
5658
  return;
5658
5659
  }
5659
- let n = e.labels, r = Y(n.font), i = r.size, a = this._computeTitleHeight(), { boxWidth: o, itemHeight: s } = ks(n, i), c, l;
5660
+ let n = e.labels, r = J(n.font), i = r.size, a = this._computeTitleHeight(), { boxWidth: o, itemHeight: s } = ks(n, i), c, l;
5660
5661
  t.font = r.string, this.isHorizontal() ? (c = this.maxWidth, l = this._fitRows(a, i, o, s) + 10) : (l = this.maxHeight, c = this._fitCols(a, r, o, s) + 10), this.width = Math.min(c, e.maxWidth || this.maxWidth), this.height = Math.min(l, e.maxHeight || this.maxHeight);
5661
5662
  }
5662
5663
  _fitRows(e, t, n, r) {
@@ -5695,7 +5696,7 @@ var Os = class extends Ra {
5695
5696
  }
5696
5697
  adjustHitBoxes() {
5697
5698
  if (!this.options.display) return;
5698
- let e = this._computeTitleHeight(), { legendHitBoxes: t, options: { align: n, labels: { padding: r }, rtl: i } } = this, a = Ar(i, this.left, this.width);
5699
+ let e = this._computeTitleHeight(), { legendHitBoxes: t, options: { align: n, labels: { padding: r }, rtl: i } } = this, a = jr(i, this.left, this.width);
5699
5700
  if (this.isHorizontal()) {
5700
5701
  let i = 0, o = G(n, this.left + r, this.right - this.lineWidths[i]);
5701
5702
  for (let s of t) i !== s.row && (i = s.row, o = G(n, this.left + r, this.right - this.lineWidths[i])), s.top += this.top + e + r, s.left = a.leftForLtr(a.x(o), s.width), o += s.width + r;
@@ -5710,11 +5711,11 @@ var Os = class extends Ra {
5710
5711
  draw() {
5711
5712
  if (this.options.display) {
5712
5713
  let e = this.ctx;
5713
- hn(e, this), this._draw(), gn(e);
5714
+ gn(e, this), this._draw(), _n(e);
5714
5715
  }
5715
5716
  }
5716
5717
  _draw() {
5717
- let { options: e, columnSizes: t, lineWidths: n, ctx: r } = this, { align: i, labels: a } = e, o = K.color, s = Ar(e.rtl, this.left, this.width), c = Y(a.font), { padding: l } = a, u = c.size, d = u / 2, f;
5718
+ let { options: e, columnSizes: t, lineWidths: n, ctx: r } = this, { align: i, labels: a } = e, o = K.color, s = jr(e.rtl, this.left, this.width), c = J(a.font), { padding: l } = a, u = c.size, d = u / 2, f;
5718
5719
  this.drawTitle(), r.textAlign = s.textAlign("left"), r.textBaseline = "middle", r.lineWidth = .5, r.font = c.string;
5719
5720
  let { boxWidth: p, boxHeight: m, itemHeight: h } = ks(a, u), g = function(e, t, n) {
5720
5721
  if (isNaN(p) || p <= 0 || isNaN(m) || m < 0) return;
@@ -5729,8 +5730,8 @@ var Os = class extends Ra {
5729
5730
  }, c = s.xPlus(e, p / 2), l = t + d;
5730
5731
  mn(r, o, c, l, a.pointStyleWidth && p);
5731
5732
  } else {
5732
- let a = t + Math.max((u - m) / 2, 0), o = s.leftForLtr(e, p), c = An(n.borderRadius);
5733
- r.beginPath(), Object.values(c).some((e) => e !== 0) ? Cn(r, {
5733
+ let a = t + Math.max((u - m) / 2, 0), o = s.leftForLtr(e, p), c = jn(n.borderRadius);
5734
+ r.beginPath(), Object.values(c).some((e) => e !== 0) ? wn(r, {
5734
5735
  x: o,
5735
5736
  y: a,
5736
5737
  w: p,
@@ -5740,7 +5741,7 @@ var Os = class extends Ra {
5740
5741
  }
5741
5742
  r.restore();
5742
5743
  }, _ = function(e, t, n) {
5743
- Sn(r, n.text, e, t + h / 2, c, {
5744
+ Cn(r, n.text, e, t + h / 2, c, {
5744
5745
  strikethrough: n.hidden,
5745
5746
  textAlign: s.textAlign(n.textAlign)
5746
5747
  });
@@ -5753,7 +5754,7 @@ var Os = class extends Ra {
5753
5754
  x: this.left + l,
5754
5755
  y: G(i, this.top + y + l, this.bottom - t[0].height),
5755
5756
  line: 0
5756
- }, jr(this.ctx, e.textDirection);
5757
+ }, Mr(this.ctx, e.textDirection);
5757
5758
  let b = h + l;
5758
5759
  this.legendItems.forEach((o, u) => {
5759
5760
  r.strokeStyle = o.fontColor, r.fillStyle = o.fontColor;
@@ -5765,22 +5766,22 @@ var Os = class extends Ra {
5765
5766
  let e = c.lineHeight;
5766
5767
  f.y += Fs(o, e) + l;
5767
5768
  } else f.y += b;
5768
- }), Mr(this.ctx, e.textDirection);
5769
+ }), Nr(this.ctx, e.textDirection);
5769
5770
  }
5770
5771
  drawTitle() {
5771
- let e = this.options, t = e.title, n = Y(t.font), r = J(t.padding);
5772
+ let e = this.options, t = e.title, n = J(t.font), r = q(t.padding);
5772
5773
  if (!t.display) return;
5773
- let i = Ar(e.rtl, this.left, this.width), a = this.ctx, o = t.position, s = n.size / 2, c = r.top + s, l, u = this.left, d = this.width;
5774
+ let i = jr(e.rtl, this.left, this.width), a = this.ctx, o = t.position, s = n.size / 2, c = r.top + s, l, u = this.left, d = this.width;
5774
5775
  if (this.isHorizontal()) d = Math.max(...this.lineWidths), l = this.top + c, u = G(e.align, u, this.right - d);
5775
5776
  else {
5776
5777
  let t = this.columnSizes.reduce((e, t) => Math.max(e, t.height), 0);
5777
5778
  l = c + G(e.align, this.top, this.bottom - t - e.labels.padding - this._computeTitleHeight());
5778
5779
  }
5779
5780
  let f = G(o, u, u + d);
5780
- a.textAlign = i.textAlign(Ft(o)), a.textBaseline = "middle", a.strokeStyle = t.color, a.fillStyle = t.color, a.font = n.string, Sn(a, t.text, f, l, n);
5781
+ a.textAlign = i.textAlign(Ft(o)), a.textBaseline = "middle", a.strokeStyle = t.color, a.fillStyle = t.color, a.font = n.string, Cn(a, t.text, f, l, n);
5781
5782
  }
5782
5783
  _computeTitleHeight() {
5783
- let e = this.options.title, t = Y(e.font), n = J(e.padding);
5784
+ let e = this.options.title, t = J(e.font), n = q(e.padding);
5784
5785
  return e.display ? t.lineHeight + n.height : 0;
5785
5786
  }
5786
5787
  _getLegendItemAt(e, t) {
@@ -5841,14 +5842,14 @@ var Ls = {
5841
5842
  options: n,
5842
5843
  chart: e
5843
5844
  });
5844
- ma.configure(e, r, n), ma.addBox(e, r);
5845
+ Y.configure(e, r, n), Y.addBox(e, r);
5845
5846
  },
5846
5847
  stop(e) {
5847
- ma.removeBox(e, e.legend), delete e.legend;
5848
+ Y.removeBox(e, e.legend), delete e.legend;
5848
5849
  },
5849
5850
  beforeUpdate(e, t, n) {
5850
5851
  let r = e.legend;
5851
- ma.configure(e, r, n), r.options = n;
5852
+ Y.configure(e, r, n), r.options = n;
5852
5853
  },
5853
5854
  afterUpdate(e) {
5854
5855
  let t = e.legend;
@@ -5877,7 +5878,7 @@ var Ls = {
5877
5878
  generateLabels(e) {
5878
5879
  let t = e.data.datasets, { labels: { usePointStyle: n, pointStyle: r, textAlign: i, color: a, useBorderRadius: o, borderRadius: s } } = e.legend.options;
5879
5880
  return e._getSortedDatasetMetas().map((e) => {
5880
- let c = e.controller.getStyle(n ? 0 : void 0), l = J(c.borderWidth);
5881
+ let c = e.controller.getStyle(n ? 0 : void 0), l = q(c.borderWidth);
5881
5882
  return {
5882
5883
  text: t[e.index].label,
5883
5884
  fillStyle: c.backgroundColor,
@@ -5913,7 +5914,87 @@ var Ls = {
5913
5914
  "sort"
5914
5915
  ].includes(e) }
5915
5916
  }
5916
- }, Rs = {
5917
+ }, Rs = class extends Ra {
5918
+ constructor(e) {
5919
+ super(), this.chart = e.chart, this.options = e.options, this.ctx = e.ctx, this._padding = void 0, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.width = void 0, this.height = void 0, this.position = void 0, this.weight = void 0, this.fullSize = void 0;
5920
+ }
5921
+ update(e, t) {
5922
+ let n = this.options;
5923
+ if (this.left = 0, this.top = 0, !n.display) {
5924
+ this.width = this.height = this.right = this.bottom = 0;
5925
+ return;
5926
+ }
5927
+ this.width = this.right = e, this.height = this.bottom = t;
5928
+ let r = j(n.text) ? n.text.length : 1;
5929
+ this._padding = q(n.padding);
5930
+ let i = r * J(n.font).lineHeight + this._padding.height;
5931
+ this.isHorizontal() ? this.height = i : this.width = i;
5932
+ }
5933
+ isHorizontal() {
5934
+ let e = this.options.position;
5935
+ return e === "top" || e === "bottom";
5936
+ }
5937
+ _drawArgs(e) {
5938
+ let { top: t, left: n, bottom: r, right: i, options: a } = this, o = a.align, s = 0, c, l, u;
5939
+ return this.isHorizontal() ? (l = G(o, n, i), u = t + e, c = i - n) : (a.position === "left" ? (l = n + e, u = G(o, r, t), s = R * -.5) : (l = i - e, u = G(o, t, r), s = R * .5), c = r - t), {
5940
+ titleX: l,
5941
+ titleY: u,
5942
+ maxWidth: c,
5943
+ rotation: s
5944
+ };
5945
+ }
5946
+ draw() {
5947
+ let e = this.ctx, t = this.options;
5948
+ if (!t.display) return;
5949
+ let n = J(t.font), r = n.lineHeight / 2 + this._padding.top, { titleX: i, titleY: a, maxWidth: o, rotation: s } = this._drawArgs(r);
5950
+ Cn(e, t.text, 0, 0, n, {
5951
+ color: t.color,
5952
+ maxWidth: o,
5953
+ rotation: s,
5954
+ textAlign: Ft(t.align),
5955
+ textBaseline: "middle",
5956
+ translation: [i, a]
5957
+ });
5958
+ }
5959
+ };
5960
+ function zs(e, t) {
5961
+ let n = new Rs({
5962
+ ctx: e.ctx,
5963
+ options: t,
5964
+ chart: e
5965
+ });
5966
+ Y.configure(e, n, t), Y.addBox(e, n), e.titleBlock = n;
5967
+ }
5968
+ var Bs = {
5969
+ id: "title",
5970
+ _element: Rs,
5971
+ start(e, t, n) {
5972
+ zs(e, n);
5973
+ },
5974
+ stop(e) {
5975
+ let t = e.titleBlock;
5976
+ Y.removeBox(e, t), delete e.titleBlock;
5977
+ },
5978
+ beforeUpdate(e, t, n) {
5979
+ let r = e.titleBlock;
5980
+ Y.configure(e, r, n), r.options = n;
5981
+ },
5982
+ defaults: {
5983
+ align: "center",
5984
+ display: !1,
5985
+ font: { weight: "bold" },
5986
+ fullSize: !0,
5987
+ padding: 10,
5988
+ position: "top",
5989
+ text: "",
5990
+ weight: 2e3
5991
+ },
5992
+ defaultRoutes: { color: "color" },
5993
+ descriptors: {
5994
+ _scriptable: !0,
5995
+ _indexable: !1
5996
+ }
5997
+ }, Vs = {
5917
5998
  average(e) {
5918
5999
  if (!e.length) return !1;
5919
6000
  let t, n, r = /* @__PURE__ */ new Set(), i = 0, a = 0;
@@ -5952,10 +6033,10 @@ var Ls = {
5952
6033
  function Z(e, t) {
5953
6034
  return t && (j(t) ? Array.prototype.push.apply(e, t) : e.push(t)), e;
5954
6035
  }
5955
- function zs(e) {
6036
+ function Hs(e) {
5956
6037
  return (typeof e == "string" || e instanceof String) && e.indexOf("\n") > -1 ? e.split("\n") : e;
5957
6038
  }
5958
- function Bs(e, t) {
6039
+ function Us(e, t) {
5959
6040
  let { element: n, datasetIndex: r, index: i } = t, a = e.getDatasetMeta(r).controller, { label: o, value: s } = a.getLabelAndValue(i);
5960
6041
  return {
5961
6042
  chart: e,
@@ -5969,8 +6050,8 @@ function Bs(e, t) {
5969
6050
  element: n
5970
6051
  };
5971
6052
  }
5972
- function Vs(e, t) {
5973
- let n = e.chart.ctx, { body: r, footer: i, title: a } = e, { boxWidth: o, boxHeight: s } = t, c = Y(t.bodyFont), l = Y(t.titleFont), u = Y(t.footerFont), d = a.length, f = i.length, p = r.length, m = J(t.padding), h = m.height, g = 0, _ = r.reduce((e, t) => e + t.before.length + t.lines.length + t.after.length, 0);
6053
+ function Ws(e, t) {
6054
+ let n = e.chart.ctx, { body: r, footer: i, title: a } = e, { boxWidth: o, boxHeight: s } = t, c = J(t.bodyFont), l = J(t.titleFont), u = J(t.footerFont), d = a.length, f = i.length, p = r.length, m = q(t.padding), h = m.height, g = 0, _ = r.reduce((e, t) => e + t.before.length + t.lines.length + t.after.length, 0);
5974
6055
  if (_ += e.beforeBody.length + e.afterBody.length, d && (h += d * l.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), _) {
5975
6056
  let e = t.displayColors ? Math.max(s, c.lineHeight) : c.lineHeight;
5976
6057
  h += p * e + (_ - p) * c.lineHeight + (_ - 1) * t.bodySpacing;
@@ -5986,59 +6067,59 @@ function Vs(e, t) {
5986
6067
  height: h
5987
6068
  };
5988
6069
  }
5989
- function Hs(e, t) {
6070
+ function Gs(e, t) {
5990
6071
  let { y: n, height: r } = t;
5991
6072
  return n < r / 2 ? "top" : n > e.height - r / 2 ? "bottom" : "center";
5992
6073
  }
5993
- function Us(e, t, n, r) {
6074
+ function Ks(e, t, n, r) {
5994
6075
  let { x: i, width: a } = r, o = n.caretSize + n.caretPadding;
5995
6076
  if (e === "left" && i + a + o > t.width || e === "right" && i - a - o < 0) return !0;
5996
6077
  }
5997
- function Ws(e, t, n, r) {
6078
+ function qs(e, t, n, r) {
5998
6079
  let { x: i, width: a } = n, { width: o, chartArea: { left: s, right: c } } = e, l = "center";
5999
- return r === "center" ? l = i <= (s + c) / 2 ? "left" : "right" : i <= a / 2 ? l = "left" : i >= o - a / 2 && (l = "right"), Us(l, e, t, n) && (l = "center"), l;
6080
+ return r === "center" ? l = i <= (s + c) / 2 ? "left" : "right" : i <= a / 2 ? l = "left" : i >= o - a / 2 && (l = "right"), Ks(l, e, t, n) && (l = "center"), l;
6000
6081
  }
6001
- function Gs(e, t, n) {
6002
- let r = n.yAlign || t.yAlign || Hs(e, n);
6082
+ function Js(e, t, n) {
6083
+ let r = n.yAlign || t.yAlign || Gs(e, n);
6003
6084
  return {
6004
- xAlign: n.xAlign || t.xAlign || Ws(e, t, n, r),
6085
+ xAlign: n.xAlign || t.xAlign || qs(e, t, n, r),
6005
6086
  yAlign: r
6006
6087
  };
6007
6088
  }
6008
- function Ks(e, t) {
6089
+ function Ys(e, t) {
6009
6090
  let { x: n, width: r } = e;
6010
6091
  return t === "right" ? n -= r : t === "center" && (n -= r / 2), n;
6011
6092
  }
6012
- function qs(e, t, n) {
6093
+ function Xs(e, t, n) {
6013
6094
  let { y: r, height: i } = e;
6014
6095
  return t === "top" ? r += n : r -= t === "bottom" ? i + n : i / 2, r;
6015
6096
  }
6016
- function Js(e, t, n, r) {
6017
- let { caretSize: i, caretPadding: a, cornerRadius: o } = e, { xAlign: s, yAlign: c } = n, l = i + a, { topLeft: u, topRight: d, bottomLeft: f, bottomRight: p } = An(o), m = Ks(t, s), h = qs(t, c, l);
6097
+ function Zs(e, t, n, r) {
6098
+ let { caretSize: i, caretPadding: a, cornerRadius: o } = e, { xAlign: s, yAlign: c } = n, l = i + a, { topLeft: u, topRight: d, bottomLeft: f, bottomRight: p } = jn(o), m = Ys(t, s), h = Xs(t, c, l);
6018
6099
  return c === "center" ? s === "left" ? m += l : s === "right" && (m -= l) : s === "left" ? m -= Math.max(u, f) + i : s === "right" && (m += Math.max(d, p) + i), {
6019
6100
  x: W(m, 0, r.width - t.width),
6020
6101
  y: W(h, 0, r.height - t.height)
6021
6102
  };
6022
6103
  }
6023
- function Ys(e, t, n) {
6024
- let r = J(n.padding);
6104
+ function Qs(e, t, n) {
6105
+ let r = q(n.padding);
6025
6106
  return t === "center" ? e.x + e.width / 2 : t === "right" ? e.x + e.width - r.right : e.x + r.left;
6026
6107
  }
6027
- function Xs(e) {
6028
- return Z([], zs(e));
6108
+ function $s(e) {
6109
+ return Z([], Hs(e));
6029
6110
  }
6030
- function Zs(e, t, n) {
6031
- return Nn(e, {
6111
+ function ec(e, t, n) {
6112
+ return Pn(e, {
6032
6113
  tooltip: t,
6033
6114
  tooltipItems: n,
6034
6115
  type: "tooltip"
6035
6116
  });
6036
6117
  }
6037
- function Qs(e, t) {
6118
+ function tc(e, t) {
6038
6119
  let n = t && t.dataset && t.dataset.tooltip && t.dataset.tooltip.callbacks;
6039
6120
  return n ? e.override(n) : e;
6040
6121
  }
6041
- var $s = {
6122
+ var nc = {
6042
6123
  beforeTitle: Le,
6043
6124
  title(e) {
6044
6125
  if (e.length > 0) {
@@ -6088,10 +6169,10 @@ var $s = {
6088
6169
  };
6089
6170
  function Q(e, t, n, r) {
6090
6171
  let i = e[t].call(n, r);
6091
- return i === void 0 ? $s[t].call(n, r) : i;
6172
+ return i === void 0 ? nc[t].call(n, r) : i;
6092
6173
  }
6093
- var ec = class extends Ra {
6094
- static positioners = Rs;
6174
+ var rc = class extends Ra {
6175
+ static positioners = Vs;
6095
6176
  constructor(e) {
6096
6177
  super(), this.opacity = 0, this._active = [], this._eventPosition = void 0, this._size = void 0, this._cachedAnimations = void 0, this._tooltipItems = [], this.$animations = void 0, this.$context = void 0, this.chart = e.chart, this.options = e.options, this.dataPoints = void 0, this.title = void 0, this.beforeBody = void 0, this.body = void 0, this.afterBody = void 0, this.footer = void 0, this.xAlign = void 0, this.yAlign = void 0, this.x = void 0, this.y = void 0, this.height = void 0, this.width = void 0, this.caretX = void 0, this.caretY = void 0, this.labelColors = void 0, this.labelPointStyles = void 0, this.labelTextColors = void 0;
6097
6178
  }
@@ -6101,18 +6182,18 @@ var ec = class extends Ra {
6101
6182
  _resolveAnimations() {
6102
6183
  let e = this._cachedAnimations;
6103
6184
  if (e) return e;
6104
- let t = this.chart, n = this.options.setContext(this.getContext()), r = n.enabled && t.options.animation && n.animations, i = new Qr(this.chart, r);
6185
+ let t = this.chart, n = this.options.setContext(this.getContext()), r = n.enabled && t.options.animation && n.animations, i = new $r(this.chart, r);
6105
6186
  return r._cacheable && (this._cachedAnimations = Object.freeze(i)), i;
6106
6187
  }
6107
6188
  getContext() {
6108
- return this.$context ||= Zs(this.chart.getContext(), this, this._tooltipItems);
6189
+ return this.$context ||= ec(this.chart.getContext(), this, this._tooltipItems);
6109
6190
  }
6110
6191
  getTitle(e, t) {
6111
6192
  let { callbacks: n } = t, r = Q(n, "beforeTitle", this, e), i = Q(n, "title", this, e), a = Q(n, "afterTitle", this, e), o = [];
6112
- return o = Z(o, zs(r)), o = Z(o, zs(i)), o = Z(o, zs(a)), o;
6193
+ return o = Z(o, Hs(r)), o = Z(o, Hs(i)), o = Z(o, Hs(a)), o;
6113
6194
  }
6114
6195
  getBeforeBody(e, t) {
6115
- return Xs(Q(t.callbacks, "beforeBody", this, e));
6196
+ return $s(Q(t.callbacks, "beforeBody", this, e));
6116
6197
  }
6117
6198
  getBody(e, t) {
6118
6199
  let { callbacks: n } = t, r = [];
@@ -6121,22 +6202,22 @@ var ec = class extends Ra {
6121
6202
  before: [],
6122
6203
  lines: [],
6123
6204
  after: []
6124
- }, i = Qs(n, e);
6125
- Z(t.before, zs(Q(i, "beforeLabel", this, e))), Z(t.lines, Q(i, "label", this, e)), Z(t.after, zs(Q(i, "afterLabel", this, e))), r.push(t);
6205
+ }, i = tc(n, e);
6206
+ Z(t.before, Hs(Q(i, "beforeLabel", this, e))), Z(t.lines, Q(i, "label", this, e)), Z(t.after, Hs(Q(i, "afterLabel", this, e))), r.push(t);
6126
6207
  }), r;
6127
6208
  }
6128
6209
  getAfterBody(e, t) {
6129
- return Xs(Q(t.callbacks, "afterBody", this, e));
6210
+ return $s(Q(t.callbacks, "afterBody", this, e));
6130
6211
  }
6131
6212
  getFooter(e, t) {
6132
6213
  let { callbacks: n } = t, r = Q(n, "beforeFooter", this, e), i = Q(n, "footer", this, e), a = Q(n, "afterFooter", this, e), o = [];
6133
- return o = Z(o, zs(r)), o = Z(o, zs(i)), o = Z(o, zs(a)), o;
6214
+ return o = Z(o, Hs(r)), o = Z(o, Hs(i)), o = Z(o, Hs(a)), o;
6134
6215
  }
6135
6216
  _createItems(e) {
6136
6217
  let t = this._active, n = this.chart.data, r = [], i = [], a = [], o = [], s, c;
6137
- for (s = 0, c = t.length; s < c; ++s) o.push(Bs(this.chart, t[s]));
6218
+ for (s = 0, c = t.length; s < c; ++s) o.push(Us(this.chart, t[s]));
6138
6219
  return e.filter && (o = o.filter((t, r, i) => e.filter(t, r, i, n))), e.itemSort && (o = o.sort((t, r) => e.itemSort(t, r, n))), L(o, (t) => {
6139
- let n = Qs(e.callbacks, t);
6220
+ let n = tc(e.callbacks, t);
6140
6221
  r.push(Q(n, "labelColor", this, t)), i.push(Q(n, "labelPointStyle", this, t)), a.push(Q(n, "labelTextColor", this, t));
6141
6222
  }), this.labelColors = r, this.labelPointStyles = i, this.labelTextColors = a, this.dataPoints = o, o;
6142
6223
  }
@@ -6144,9 +6225,9 @@ var ec = class extends Ra {
6144
6225
  let n = this.options.setContext(this.getContext()), r = this._active, i, a = [];
6145
6226
  if (!r.length) this.opacity !== 0 && (i = { opacity: 0 });
6146
6227
  else {
6147
- let e = Rs[n.position].call(this, r, this._eventPosition);
6228
+ let e = Vs[n.position].call(this, r, this._eventPosition);
6148
6229
  a = this._createItems(n), this.title = this.getTitle(a, n), this.beforeBody = this.getBeforeBody(a, n), this.body = this.getBody(a, n), this.afterBody = this.getAfterBody(a, n), this.footer = this.getFooter(a, n);
6149
- let t = this._size = Vs(this, n), o = Object.assign({}, e, t), s = Gs(this.chart, n, o), c = Js(n, o, s, this.chart);
6230
+ let t = this._size = Ws(this, n), o = Object.assign({}, e, t), s = Js(this.chart, n, o), c = Zs(n, o, s, this.chart);
6150
6231
  this.xAlign = s.xAlign, this.yAlign = s.yAlign, i = {
6151
6232
  opacity: 1,
6152
6233
  x: c.x,
@@ -6168,7 +6249,7 @@ var ec = class extends Ra {
6168
6249
  t.lineTo(i.x1, i.y1), t.lineTo(i.x2, i.y2), t.lineTo(i.x3, i.y3);
6169
6250
  }
6170
6251
  getCaretPosition(e, t, n) {
6171
- let { xAlign: r, yAlign: i } = this, { caretSize: a, cornerRadius: o } = n, { topLeft: s, topRight: c, bottomLeft: l, bottomRight: u } = An(o), { x: d, y: f } = e, { width: p, height: m } = t, h, g, _, v, y, b;
6252
+ let { xAlign: r, yAlign: i } = this, { caretSize: a, cornerRadius: o } = n, { topLeft: s, topRight: c, bottomLeft: l, bottomRight: u } = jn(o), { x: d, y: f } = e, { width: p, height: m } = t, h, g, _, v, y, b;
6172
6253
  return i === "center" ? (y = f + m / 2, r === "left" ? (h = d, g = h - a, v = y + a, b = y - a) : (h = d + p, g = h + a, v = y - a, b = y + a), _ = h) : (g = r === "left" ? d + Math.max(s, l) + a : r === "right" ? d + p - Math.max(c, u) - a : this.caretX, i === "top" ? (v = f, y = v - a, h = g - a, _ = g + a) : (v = f + m, y = v + a, h = g + a, _ = g - a), b = v), {
6173
6254
  x1: h,
6174
6255
  x2: g,
@@ -6181,12 +6262,12 @@ var ec = class extends Ra {
6181
6262
  drawTitle(e, t, n) {
6182
6263
  let r = this.title, i = r.length, a, o, s;
6183
6264
  if (i) {
6184
- let c = Ar(n.rtl, this.x, this.width);
6185
- for (e.x = Ys(this, n.titleAlign, n), t.textAlign = c.textAlign(n.titleAlign), t.textBaseline = "middle", a = Y(n.titleFont), o = n.titleSpacing, t.fillStyle = n.titleColor, t.font = a.string, s = 0; s < i; ++s) t.fillText(r[s], c.x(e.x), e.y + a.lineHeight / 2), e.y += a.lineHeight + o, s + 1 === i && (e.y += n.titleMarginBottom - o);
6265
+ let c = jr(n.rtl, this.x, this.width);
6266
+ for (e.x = Qs(this, n.titleAlign, n), t.textAlign = c.textAlign(n.titleAlign), t.textBaseline = "middle", a = J(n.titleFont), o = n.titleSpacing, t.fillStyle = n.titleColor, t.font = a.string, s = 0; s < i; ++s) t.fillText(r[s], c.x(e.x), e.y + a.lineHeight / 2), e.y += a.lineHeight + o, s + 1 === i && (e.y += n.titleMarginBottom - o);
6186
6267
  }
6187
6268
  }
6188
6269
  _drawColorBox(e, t, n, r, i) {
6189
- let a = this.labelColors[n], o = this.labelPointStyles[n], { boxHeight: s, boxWidth: c } = i, l = Y(i.bodyFont), u = Ys(this, "left", i), d = r.x(u), f = s < l.lineHeight ? (l.lineHeight - s) / 2 : 0, p = t.y + f;
6270
+ let a = this.labelColors[n], o = this.labelPointStyles[n], { boxHeight: s, boxWidth: c } = i, l = J(i.bodyFont), u = Qs(this, "left", i), d = r.x(u), f = s < l.lineHeight ? (l.lineHeight - s) / 2 : 0, p = t.y + f;
6190
6271
  if (i.usePointStyle) {
6191
6272
  let t = {
6192
6273
  radius: Math.min(c, s) / 2,
@@ -6197,14 +6278,14 @@ var ec = class extends Ra {
6197
6278
  e.strokeStyle = i.multiKeyBackground, e.fillStyle = i.multiKeyBackground, pn(e, t, n, l), e.strokeStyle = a.borderColor, e.fillStyle = a.backgroundColor, pn(e, t, n, l);
6198
6279
  } else {
6199
6280
  e.lineWidth = M(a.borderWidth) ? Math.max(...Object.values(a.borderWidth)) : a.borderWidth || 1, e.strokeStyle = a.borderColor, e.setLineDash(a.borderDash || []), e.lineDashOffset = a.borderDashOffset || 0;
6200
- let t = r.leftForLtr(d, c), n = r.leftForLtr(r.xPlus(d, 1), c - 2), o = An(a.borderRadius);
6201
- Object.values(o).some((e) => e !== 0) ? (e.beginPath(), e.fillStyle = i.multiKeyBackground, Cn(e, {
6281
+ let t = r.leftForLtr(d, c), n = r.leftForLtr(r.xPlus(d, 1), c - 2), o = jn(a.borderRadius);
6282
+ Object.values(o).some((e) => e !== 0) ? (e.beginPath(), e.fillStyle = i.multiKeyBackground, wn(e, {
6202
6283
  x: t,
6203
6284
  y: p,
6204
6285
  w: c,
6205
6286
  h: s,
6206
6287
  radius: o
6207
- }), e.fill(), e.stroke(), e.fillStyle = a.backgroundColor, e.beginPath(), Cn(e, {
6288
+ }), e.fill(), e.stroke(), e.fillStyle = a.backgroundColor, e.beginPath(), wn(e, {
6208
6289
  x: n,
6209
6290
  y: p + 1,
6210
6291
  w: c - 2,
@@ -6215,10 +6296,10 @@ var ec = class extends Ra {
6215
6296
  e.fillStyle = this.labelTextColors[n];
6216
6297
  }
6217
6298
  drawBody(e, t, n) {
6218
- let { body: r } = this, { bodySpacing: i, bodyAlign: a, displayColors: o, boxHeight: s, boxWidth: c, boxPadding: l } = n, u = Y(n.bodyFont), d = u.lineHeight, f = 0, p = Ar(n.rtl, this.x, this.width), m = function(n) {
6299
+ let { body: r } = this, { bodySpacing: i, bodyAlign: a, displayColors: o, boxHeight: s, boxWidth: c, boxPadding: l } = n, u = J(n.bodyFont), d = u.lineHeight, f = 0, p = jr(n.rtl, this.x, this.width), m = function(n) {
6219
6300
  t.fillText(n, p.x(e.x + f), e.y + d / 2), e.y += d + i;
6220
6301
  }, h = p.textAlign(a), g, _, v, y, b, x, S;
6221
- for (t.textAlign = a, t.textBaseline = "middle", t.font = u.string, e.x = Ys(this, h, n), t.fillStyle = n.bodyColor, L(this.beforeBody, m), f = o && h !== "right" ? a === "center" ? c / 2 + l : c + 2 + l : 0, y = 0, x = r.length; y < x; ++y) {
6302
+ for (t.textAlign = a, t.textBaseline = "middle", t.font = u.string, e.x = Qs(this, h, n), t.fillStyle = n.bodyColor, L(this.beforeBody, m), f = o && h !== "right" ? a === "center" ? c / 2 + l : c + 2 + l : 0, y = 0, x = r.length; y < x; ++y) {
6222
6303
  for (g = r[y], _ = this.labelTextColors[y], t.fillStyle = _, L(g.before, m), v = g.lines, o && v.length && (this._drawColorBox(t, e, y, p, n), d = Math.max(u.lineHeight, s)), b = 0, S = v.length; b < S; ++b) m(v[b]), d = u.lineHeight;
6223
6304
  L(g.after, m);
6224
6305
  }
@@ -6227,20 +6308,20 @@ var ec = class extends Ra {
6227
6308
  drawFooter(e, t, n) {
6228
6309
  let r = this.footer, i = r.length, a, o;
6229
6310
  if (i) {
6230
- let s = Ar(n.rtl, this.x, this.width);
6231
- for (e.x = Ys(this, n.footerAlign, n), e.y += n.footerMarginTop, t.textAlign = s.textAlign(n.footerAlign), t.textBaseline = "middle", a = Y(n.footerFont), t.fillStyle = n.footerColor, t.font = a.string, o = 0; o < i; ++o) t.fillText(r[o], s.x(e.x), e.y + a.lineHeight / 2), e.y += a.lineHeight + n.footerSpacing;
6311
+ let s = jr(n.rtl, this.x, this.width);
6312
+ for (e.x = Qs(this, n.footerAlign, n), e.y += n.footerMarginTop, t.textAlign = s.textAlign(n.footerAlign), t.textBaseline = "middle", a = J(n.footerFont), t.fillStyle = n.footerColor, t.font = a.string, o = 0; o < i; ++o) t.fillText(r[o], s.x(e.x), e.y + a.lineHeight / 2), e.y += a.lineHeight + n.footerSpacing;
6232
6313
  }
6233
6314
  }
6234
6315
  drawBackground(e, t, n, r) {
6235
- let { xAlign: i, yAlign: a } = this, { x: o, y: s } = e, { width: c, height: l } = n, { topLeft: u, topRight: d, bottomLeft: f, bottomRight: p } = An(r.cornerRadius);
6316
+ let { xAlign: i, yAlign: a } = this, { x: o, y: s } = e, { width: c, height: l } = n, { topLeft: u, topRight: d, bottomLeft: f, bottomRight: p } = jn(r.cornerRadius);
6236
6317
  t.fillStyle = r.backgroundColor, t.strokeStyle = r.borderColor, t.lineWidth = r.borderWidth, t.beginPath(), t.moveTo(o + u, s), a === "top" && this.drawCaret(e, t, n, r), t.lineTo(o + c - d, s), t.quadraticCurveTo(o + c, s, o + c, s + d), a === "center" && i === "right" && this.drawCaret(e, t, n, r), t.lineTo(o + c, s + l - p), t.quadraticCurveTo(o + c, s + l, o + c - p, s + l), a === "bottom" && this.drawCaret(e, t, n, r), t.lineTo(o + f, s + l), t.quadraticCurveTo(o, s + l, o, s + l - f), a === "center" && i === "left" && this.drawCaret(e, t, n, r), t.lineTo(o, s + u), t.quadraticCurveTo(o, s, o + u, s), t.closePath(), t.fill(), r.borderWidth > 0 && t.stroke();
6237
6318
  }
6238
6319
  _updateAnimationTarget(e) {
6239
6320
  let t = this.chart, n = this.$animations, r = n && n.x, i = n && n.y;
6240
6321
  if (r || i) {
6241
- let n = Rs[e.position].call(this, this._active, this._eventPosition);
6322
+ let n = Vs[e.position].call(this, this._active, this._eventPosition);
6242
6323
  if (!n) return;
6243
- let a = this._size = Vs(this, e), o = Object.assign({}, n, this._size), s = Gs(t, e, o), c = Js(e, o, s, t);
6324
+ let a = this._size = Ws(this, e), o = Object.assign({}, n, this._size), s = Js(t, e, o), c = Zs(e, o, s, t);
6244
6325
  (r._to !== c.x || i._to !== c.y) && (this.xAlign = s.xAlign, this.yAlign = s.yAlign, this.width = a.width, this.height = a.height, this.caretX = n.x, this.caretY = n.y, this._resolveAnimations().update(this, c));
6245
6326
  }
6246
6327
  }
@@ -6259,8 +6340,8 @@ var ec = class extends Ra {
6259
6340
  y: this.y
6260
6341
  };
6261
6342
  n = Math.abs(n) < .001 ? 0 : n;
6262
- let a = J(t.padding), o = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
6263
- t.enabled && o && (e.save(), e.globalAlpha = n, this.drawBackground(i, e, r, t), jr(e, t.textDirection), i.y += a.top, this.drawTitle(i, e, t), this.drawBody(i, e, t), this.drawFooter(i, e, t), Mr(e, t.textDirection), e.restore());
6343
+ let a = q(t.padding), o = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
6344
+ t.enabled && o && (e.save(), e.globalAlpha = n, this.drawBackground(i, e, r, t), Mr(e, t.textDirection), i.y += a.top, this.drawTitle(i, e, t), this.drawBody(i, e, t), this.drawFooter(i, e, t), Nr(e, t.textDirection), e.restore());
6264
6345
  }
6265
6346
  getActiveElements() {
6266
6347
  return this._active || [];
@@ -6294,15 +6375,15 @@ var ec = class extends Ra {
6294
6375
  return i.reverse && a.reverse(), a;
6295
6376
  }
6296
6377
  _positionChanged(e, t) {
6297
- let { caretX: n, caretY: r, options: i } = this, a = Rs[i.position].call(this, e, t);
6378
+ let { caretX: n, caretY: r, options: i } = this, a = Vs[i.position].call(this, e, t);
6298
6379
  return a !== !1 && (n !== a.x || r !== a.y);
6299
6380
  }
6300
- }, tc = {
6381
+ }, ic = {
6301
6382
  id: "tooltip",
6302
- _element: ec,
6303
- positioners: Rs,
6383
+ _element: rc,
6384
+ positioners: Vs,
6304
6385
  afterInit(e, t, n) {
6305
- n && (e.tooltip = new ec({
6386
+ n && (e.tooltip = new rc({
6306
6387
  chart: e,
6307
6388
  options: n
6308
6389
  }));
@@ -6381,7 +6462,7 @@ var ec = class extends Ra {
6381
6462
  duration: 200
6382
6463
  }
6383
6464
  },
6384
- callbacks: $s
6465
+ callbacks: nc
6385
6466
  },
6386
6467
  defaultRoutes: {
6387
6468
  bodyFont: "font",
@@ -6399,22 +6480,22 @@ var ec = class extends Ra {
6399
6480
  animations: { _fallback: "animation" }
6400
6481
  },
6401
6482
  additionalOptionScopes: ["interaction"]
6402
- }, nc = (e, t, n, r) => (typeof t == "string" ? (n = e.push(t) - 1, r.unshift({
6483
+ }, ac = (e, t, n, r) => (typeof t == "string" ? (n = e.push(t) - 1, r.unshift({
6403
6484
  index: n,
6404
6485
  label: t
6405
6486
  })) : isNaN(t) && (n = null), n);
6406
- function rc(e, t, n, r) {
6487
+ function oc(e, t, n, r) {
6407
6488
  let i = e.indexOf(t);
6408
- return i === -1 ? nc(e, t, n, r) : i === e.lastIndexOf(t) ? i : n;
6489
+ return i === -1 ? ac(e, t, n, r) : i === e.lastIndexOf(t) ? i : n;
6409
6490
  }
6410
- var ic = (e, t) => e === null ? null : W(Math.round(e), 0, t);
6411
- function ac(e) {
6491
+ var sc = (e, t) => e === null ? null : W(Math.round(e), 0, t);
6492
+ function cc(e) {
6412
6493
  let t = this.getLabels();
6413
6494
  return e >= 0 && e < t.length ? t[e] : e;
6414
6495
  }
6415
- var oc = class extends io {
6496
+ var lc = class extends io {
6416
6497
  static id = "category";
6417
- static defaults = { ticks: { callback: ac } };
6498
+ static defaults = { ticks: { callback: cc } };
6418
6499
  constructor(e) {
6419
6500
  super(e), this._startValue = void 0, this._valueRange = 0, this._addedLabels = [];
6420
6501
  }
@@ -6430,7 +6511,7 @@ var oc = class extends io {
6430
6511
  parse(e, t) {
6431
6512
  if (A(e)) return null;
6432
6513
  let n = this.getLabels();
6433
- return t = isFinite(t) && n[t] === e ? t : rc(n, e, F(t, e), this._addedLabels), ic(t, n.length - 1);
6514
+ return t = isFinite(t) && n[t] === e ? t : oc(n, e, F(t, e), this._addedLabels), sc(t, n.length - 1);
6434
6515
  }
6435
6516
  determineDataLimits() {
6436
6517
  let { minDefined: e, maxDefined: t } = this.getUserBounds(), { min: n, max: r } = this.getMinMax(!0);
@@ -6443,7 +6524,7 @@ var oc = class extends io {
6443
6524
  return r;
6444
6525
  }
6445
6526
  getLabelForValue(e) {
6446
- return ac.call(this, e);
6527
+ return cc.call(this, e);
6447
6528
  }
6448
6529
  configure() {
6449
6530
  super.configure(), this.isHorizontal() || (this._reversePixels = !this._reversePixels);
@@ -6462,25 +6543,25 @@ var oc = class extends io {
6462
6543
  return this.bottom;
6463
6544
  }
6464
6545
  };
6465
- function sc(e, t) {
6546
+ function uc(e, t) {
6466
6547
  let n = [], { bounds: r, step: i, min: a, max: o, precision: s, count: c, maxTicks: l, maxDigits: u, includeBounds: d } = e, f = i || 1, p = l - 1, { min: m, max: h } = t, g = !A(a), _ = !A(o), v = !A(c), y = (h - m) / (u + 1), b = ut((h - m) / p / f) * f, x, S, C, w;
6467
6548
  if (b < 1e-14 && !g && !_) return [{ value: m }, { value: h }];
6468
6549
  w = Math.ceil(h / b) - Math.floor(m / b), w > p && (b = ut(w * b / p / f) * f), A(s) || (x = 10 ** s, b = Math.ceil(b * x) / x), r === "ticks" ? (S = Math.floor(m / b) * b, C = Math.ceil(h / b) * b) : (S = m, C = h), g && _ && i && mt((o - a) / i, b / 1e3) ? (w = Math.round(Math.min((o - a) / b, l)), b = (o - a) / w, S = a, C = o) : v ? (S = g ? a : S, C = _ ? o : C, w = c - 1, b = (C - S) / w) : (w = (C - S) / b, w = lt(w, Math.round(w), b / 1e3) ? Math.round(w) : Math.ceil(w));
6469
6550
  let T = Math.max(_t(b), _t(S));
6470
6551
  x = 10 ** (A(s) ? T : s), S = Math.round(S * x) / x, C = Math.round(C * x) / x;
6471
6552
  let E = 0;
6472
- for (g && (d && S !== a ? (n.push({ value: a }), S < a && E++, lt(Math.round((S + E * b) * x) / x, a, cc(a, y, e)) && E++) : S < a && E++); E < w; ++E) {
6553
+ for (g && (d && S !== a ? (n.push({ value: a }), S < a && E++, lt(Math.round((S + E * b) * x) / x, a, dc(a, y, e)) && E++) : S < a && E++); E < w; ++E) {
6473
6554
  let e = Math.round((S + E * b) * x) / x;
6474
6555
  if (_ && e > o) break;
6475
6556
  n.push({ value: e });
6476
6557
  }
6477
- return _ && d && C !== o ? n.length && lt(n[n.length - 1].value, o, cc(o, y, e)) ? n[n.length - 1].value = o : n.push({ value: o }) : _ && C !== o || n.push({ value: C }), n;
6558
+ return _ && d && C !== o ? n.length && lt(n[n.length - 1].value, o, dc(o, y, e)) ? n[n.length - 1].value = o : n.push({ value: o }) : _ && C !== o || n.push({ value: C }), n;
6478
6559
  }
6479
- function cc(e, t, { horizontal: n, minRotation: r }) {
6560
+ function dc(e, t, { horizontal: n, minRotation: r }) {
6480
6561
  let i = H(r), a = (n ? Math.sin(i) : Math.cos(i)) || .001, o = .75 * t * ("" + e).length;
6481
6562
  return Math.min(t / a, o);
6482
6563
  }
6483
- var lc = class extends io {
6564
+ var fc = class extends io {
6484
6565
  constructor(e) {
6485
6566
  super(e), this.start = void 0, this.end = void 0, this._startValue = void 0, this._endValue = void 0, this._valueRange = 0;
6486
6567
  }
@@ -6509,7 +6590,7 @@ var lc = class extends io {
6509
6590
  buildTicks() {
6510
6591
  let e = this.options, t = e.ticks, n = this.getTickLimit();
6511
6592
  n = Math.max(2, n);
6512
- let r = sc({
6593
+ let r = uc({
6513
6594
  maxTicks: n,
6514
6595
  bounds: e.bounds,
6515
6596
  min: e.min,
@@ -6535,7 +6616,7 @@ var lc = class extends io {
6535
6616
  getLabelForValue(e) {
6536
6617
  return Qt(e, this.chart.options.locale, this.options.ticks.format);
6537
6618
  }
6538
- }, uc = class extends lc {
6619
+ }, pc = class extends fc {
6539
6620
  static id = "linear";
6540
6621
  static defaults = { ticks: { callback: tn.formatters.numeric } };
6541
6622
  determineDataLimits() {
@@ -6552,32 +6633,32 @@ var lc = class extends io {
6552
6633
  getValueForPixel(e) {
6553
6634
  return this._startValue + this.getDecimalForPixel(e) * this._valueRange;
6554
6635
  }
6555
- }, dc = (e) => Math.floor(ct(e)), fc = (e, t) => 10 ** (dc(e) + t);
6556
- function pc(e) {
6557
- return e / 10 ** dc(e) == 1;
6636
+ }, mc = (e) => Math.floor(ct(e)), hc = (e, t) => 10 ** (mc(e) + t);
6637
+ function gc(e) {
6638
+ return e / 10 ** mc(e) == 1;
6558
6639
  }
6559
- function mc(e, t, n) {
6640
+ function _c(e, t, n) {
6560
6641
  let r = 10 ** n, i = Math.floor(e / r);
6561
6642
  return Math.ceil(t / r) - i;
6562
6643
  }
6563
- function hc(e, t) {
6564
- let n = dc(t - e);
6565
- for (; mc(e, t, n) > 10;) n++;
6566
- for (; mc(e, t, n) < 10;) n--;
6567
- return Math.min(n, dc(e));
6644
+ function vc(e, t) {
6645
+ let n = mc(t - e);
6646
+ for (; _c(e, t, n) > 10;) n++;
6647
+ for (; _c(e, t, n) < 10;) n--;
6648
+ return Math.min(n, mc(e));
6568
6649
  }
6569
- function gc(e, { min: t, max: n }) {
6650
+ function yc(e, { min: t, max: n }) {
6570
6651
  t = P(e.min, t);
6571
- let r = [], i = dc(t), a = hc(t, n), o = a < 0 ? 10 ** Math.abs(a) : 1, s = 10 ** a, c = i > a ? 10 ** i : 0, l = Math.round((t - c) * o) / o, u = Math.floor((t - c) / s / 10) * s * 10, d = Math.floor((l - u) / 10 ** a), f = P(e.min, Math.round((c + u + d * 10 ** a) * o) / o);
6652
+ let r = [], i = mc(t), a = vc(t, n), o = a < 0 ? 10 ** Math.abs(a) : 1, s = 10 ** a, c = i > a ? 10 ** i : 0, l = Math.round((t - c) * o) / o, u = Math.floor((t - c) / s / 10) * s * 10, d = Math.floor((l - u) / 10 ** a), f = P(e.min, Math.round((c + u + d * 10 ** a) * o) / o);
6572
6653
  for (; f < n;) r.push({
6573
6654
  value: f,
6574
- major: pc(f),
6655
+ major: gc(f),
6575
6656
  significand: d
6576
6657
  }), d >= 10 ? d = d < 15 ? 15 : 20 : d++, d >= 20 && (a++, d = 2, o = a >= 0 ? 1 : o), f = Math.round((c + u + d * 10 ** a) * o) / o;
6577
6658
  let p = P(e.max, f);
6578
6659
  return r.push({
6579
6660
  value: p,
6580
- major: pc(p),
6661
+ major: gc(p),
6581
6662
  significand: d
6582
6663
  }), r;
6583
6664
  }
@@ -6591,20 +6672,20 @@ function gc(e, { min: t, max: n }) {
6591
6672
  super(e), this.start = void 0, this.end = void 0, this._startValue = void 0, this._valueRange = 0;
6592
6673
  }
6593
6674
  parse(e, t) {
6594
- let n = lc.prototype.parse.apply(this, [e, t]);
6675
+ let n = fc.prototype.parse.apply(this, [e, t]);
6595
6676
  if (n === 0) this._zero = !0;
6596
6677
  else return N(n) && n > 0 ? n : null;
6597
6678
  }
6598
6679
  determineDataLimits() {
6599
6680
  let { min: e, max: t } = this.getMinMax(!0);
6600
- this.min = N(e) ? Math.max(0, e) : null, this.max = N(t) ? Math.max(0, t) : null, this.options.beginAtZero && (this._zero = !0), this._zero && this.min !== this._suggestedMin && !N(this._userMin) && (this.min = e === fc(this.min, 0) ? fc(this.min, -1) : fc(this.min, 0)), this.handleTickRangeOptions();
6681
+ this.min = N(e) ? Math.max(0, e) : null, this.max = N(t) ? Math.max(0, t) : null, this.options.beginAtZero && (this._zero = !0), this._zero && this.min !== this._suggestedMin && !N(this._userMin) && (this.min = e === hc(this.min, 0) ? hc(this.min, -1) : hc(this.min, 0)), this.handleTickRangeOptions();
6601
6682
  }
6602
6683
  handleTickRangeOptions() {
6603
6684
  let { minDefined: e, maxDefined: t } = this.getUserBounds(), n = this.min, r = this.max, i = (t) => n = e ? n : t, a = (e) => r = t ? r : e;
6604
- n === r && (n <= 0 ? (i(1), a(10)) : (i(fc(n, -1)), a(fc(r, 1)))), n <= 0 && i(fc(r, -1)), r <= 0 && a(fc(n, 1)), this.min = n, this.max = r;
6685
+ n === r && (n <= 0 ? (i(1), a(10)) : (i(hc(n, -1)), a(hc(r, 1)))), n <= 0 && i(hc(r, -1)), r <= 0 && a(hc(n, 1)), this.min = n, this.max = r;
6605
6686
  }
6606
6687
  buildTicks() {
6607
- let e = this.options, t = gc({
6688
+ let e = this.options, t = yc({
6608
6689
  min: this._userMin,
6609
6690
  max: this._userMax
6610
6691
  }, this);
@@ -6625,21 +6706,21 @@ function gc(e, { min: t, max: n }) {
6625
6706
  return 10 ** (this._startValue + t * this._valueRange);
6626
6707
  }
6627
6708
  });
6628
- function _c(e) {
6709
+ function bc(e) {
6629
6710
  let t = e.ticks;
6630
6711
  if (t.display && e.display) {
6631
- let e = J(t.backdropPadding);
6712
+ let e = q(t.backdropPadding);
6632
6713
  return F(t.font && t.font.size, K.font.size) + e.height;
6633
6714
  }
6634
6715
  return 0;
6635
6716
  }
6636
- function vc(e, t, n) {
6717
+ function xc(e, t, n) {
6637
6718
  return n = j(n) ? n : [n], {
6638
6719
  w: un(e, t.string, n),
6639
6720
  h: n.length * t.lineHeight
6640
6721
  };
6641
6722
  }
6642
- function yc(e, t, n, r, i) {
6723
+ function Sc(e, t, n, r, i) {
6643
6724
  return e === r || e === i ? {
6644
6725
  start: t - n / 2,
6645
6726
  end: t + n / 2
@@ -6651,7 +6732,7 @@ function yc(e, t, n, r, i) {
6651
6732
  end: t + n
6652
6733
  };
6653
6734
  }
6654
- function bc(e) {
6735
+ function Cc(e) {
6655
6736
  let t = {
6656
6737
  l: e.left + e._padding.left,
6657
6738
  r: e.right - e._padding.right,
@@ -6661,19 +6742,19 @@ function bc(e) {
6661
6742
  for (let c = 0; c < a; c++) {
6662
6743
  let a = o.setContext(e.getPointLabelContext(c));
6663
6744
  i[c] = a.padding;
6664
- let l = e.getPointPosition(c, e.drawingArea + i[c], s), u = Y(a.font), d = vc(e.ctx, u, e._pointLabels[c]);
6745
+ let l = e.getPointPosition(c, e.drawingArea + i[c], s), u = J(a.font), d = xc(e.ctx, u, e._pointLabels[c]);
6665
6746
  r[c] = d;
6666
6747
  let f = U(e.getIndexAngle(c) + s), p = Math.round(gt(f));
6667
- xc(n, t, f, yc(p, l.x, d.w, 0, 180), yc(p, l.y, d.h, 90, 270));
6748
+ wc(n, t, f, Sc(p, l.x, d.w, 0, 180), Sc(p, l.y, d.h, 90, 270));
6668
6749
  }
6669
- e.setCenterPoint(t.l - n.l, n.r - t.r, t.t - n.t, n.b - t.b), e._pointLabelItems = wc(e, r, i);
6750
+ e.setCenterPoint(t.l - n.l, n.r - t.r, t.t - n.t, n.b - t.b), e._pointLabelItems = Dc(e, r, i);
6670
6751
  }
6671
- function xc(e, t, n, r, i) {
6752
+ function wc(e, t, n, r, i) {
6672
6753
  let a = Math.abs(Math.sin(n)), o = Math.abs(Math.cos(n)), s = 0, c = 0;
6673
6754
  r.start < t.l ? (s = (t.l - r.start) / a, e.l = Math.min(e.l, t.l - s)) : r.end > t.r && (s = (r.end - t.r) / a, e.r = Math.max(e.r, t.r + s)), i.start < t.t ? (c = (t.t - i.start) / o, e.t = Math.min(e.t, t.t - c)) : i.end > t.b && (c = (i.end - t.b) / o, e.b = Math.max(e.b, t.b + c));
6674
6755
  }
6675
- function Sc(e, t, n) {
6676
- let r = e.drawingArea, { extra: i, additionalAngle: a, padding: o, size: s } = n, c = e.getPointPosition(t, r + i + o, a), l = Math.round(gt(U(c.angle + B))), u = Dc(c.y, s.h, l), d = Tc(l), f = Ec(c.x, s.w, d);
6756
+ function Tc(e, t, n) {
6757
+ let r = e.drawingArea, { extra: i, additionalAngle: a, padding: o, size: s } = n, c = e.getPointPosition(t, r + i + o, a), l = Math.round(gt(U(c.angle + B))), u = Ac(c.y, s.h, l), d = Oc(l), f = kc(c.x, s.w, d);
6677
6758
  return {
6678
6759
  visible: !0,
6679
6760
  x: c.x,
@@ -6685,51 +6766,51 @@ function Sc(e, t, n) {
6685
6766
  bottom: u + s.h
6686
6767
  };
6687
6768
  }
6688
- function Cc(e, t) {
6769
+ function Ec(e, t) {
6689
6770
  if (!t) return !0;
6690
6771
  let { left: n, top: r, right: i, bottom: a } = e;
6691
- return !(q({
6772
+ return !(hn({
6692
6773
  x: n,
6693
6774
  y: r
6694
- }, t) || q({
6775
+ }, t) || hn({
6695
6776
  x: n,
6696
6777
  y: a
6697
- }, t) || q({
6778
+ }, t) || hn({
6698
6779
  x: i,
6699
6780
  y: r
6700
- }, t) || q({
6781
+ }, t) || hn({
6701
6782
  x: i,
6702
6783
  y: a
6703
6784
  }, t));
6704
6785
  }
6705
- function wc(e, t, n) {
6786
+ function Dc(e, t, n) {
6706
6787
  let r = [], i = e._pointLabels.length, a = e.options, { centerPointLabels: o, display: s } = a.pointLabels, c = {
6707
- extra: _c(a) / 2,
6788
+ extra: bc(a) / 2,
6708
6789
  additionalAngle: o ? R / i : 0
6709
6790
  }, l;
6710
6791
  for (let a = 0; a < i; a++) {
6711
6792
  c.padding = n[a], c.size = t[a];
6712
- let i = Sc(e, a, c);
6713
- r.push(i), s === "auto" && (i.visible = Cc(i, l), i.visible && (l = i));
6793
+ let i = Tc(e, a, c);
6794
+ r.push(i), s === "auto" && (i.visible = Ec(i, l), i.visible && (l = i));
6714
6795
  }
6715
6796
  return r;
6716
6797
  }
6717
- function Tc(e) {
6798
+ function Oc(e) {
6718
6799
  return e === 0 || e === 180 ? "center" : e < 180 ? "left" : "right";
6719
6800
  }
6720
- function Ec(e, t, n) {
6801
+ function kc(e, t, n) {
6721
6802
  return n === "right" ? e -= t : n === "center" && (e -= t / 2), e;
6722
6803
  }
6723
- function Dc(e, t, n) {
6804
+ function Ac(e, t, n) {
6724
6805
  return n === 90 || n === 270 ? e -= t / 2 : (n > 270 || n < 90) && (e -= t), e;
6725
6806
  }
6726
- function Oc(e, t, n) {
6807
+ function jc(e, t, n) {
6727
6808
  let { left: r, top: i, right: a, bottom: o } = n, { backdropColor: s } = t;
6728
6809
  if (!A(s)) {
6729
- let n = An(t.borderRadius), c = J(t.backdropPadding);
6810
+ let n = jn(t.borderRadius), c = q(t.backdropPadding);
6730
6811
  e.fillStyle = s;
6731
6812
  let l = r - c.left, u = i - c.top, d = a - r + c.width, f = o - i + c.height;
6732
- Object.values(n).some((e) => e !== 0) ? (e.beginPath(), Cn(e, {
6813
+ Object.values(n).some((e) => e !== 0) ? (e.beginPath(), wn(e, {
6733
6814
  x: l,
6734
6815
  y: u,
6735
6816
  w: d,
@@ -6738,22 +6819,22 @@ function Oc(e, t, n) {
6738
6819
  }), e.fill()) : e.fillRect(l, u, d, f);
6739
6820
  }
6740
6821
  }
6741
- function kc(e, t) {
6822
+ function Mc(e, t) {
6742
6823
  let { ctx: n, options: { pointLabels: r } } = e;
6743
6824
  for (let i = t - 1; i >= 0; i--) {
6744
6825
  let t = e._pointLabelItems[i];
6745
6826
  if (!t.visible) continue;
6746
6827
  let a = r.setContext(e.getPointLabelContext(i));
6747
- Oc(n, a, t);
6748
- let o = Y(a.font), { x: s, y: c, textAlign: l } = t;
6749
- Sn(n, e._pointLabels[i], s, c + o.lineHeight / 2, o, {
6828
+ jc(n, a, t);
6829
+ let o = J(a.font), { x: s, y: c, textAlign: l } = t;
6830
+ Cn(n, e._pointLabels[i], s, c + o.lineHeight / 2, o, {
6750
6831
  color: a.color,
6751
6832
  textAlign: l,
6752
6833
  textBaseline: "middle"
6753
6834
  });
6754
6835
  }
6755
6836
  }
6756
- function Ac(e, t, n, r) {
6837
+ function Nc(e, t, n, r) {
6757
6838
  let { ctx: i } = e;
6758
6839
  if (n) i.arc(e.xCenter, e.yCenter, t, 0, z);
6759
6840
  else {
@@ -6762,18 +6843,18 @@ function Ac(e, t, n, r) {
6762
6843
  for (let a = 1; a < r; a++) n = e.getPointPosition(a, t), i.lineTo(n.x, n.y);
6763
6844
  }
6764
6845
  }
6765
- function jc(e, t, n, r, i) {
6846
+ function Pc(e, t, n, r, i) {
6766
6847
  let a = e.ctx, o = t.circular, { color: s, lineWidth: c } = t;
6767
- !o && !r || !s || !c || n < 0 || (a.save(), a.strokeStyle = s, a.lineWidth = c, a.setLineDash(i.dash || []), a.lineDashOffset = i.dashOffset, a.beginPath(), Ac(e, n, o, r), a.closePath(), a.stroke(), a.restore());
6848
+ !o && !r || !s || !c || n < 0 || (a.save(), a.strokeStyle = s, a.lineWidth = c, a.setLineDash(i.dash || []), a.lineDashOffset = i.dashOffset, a.beginPath(), Nc(e, n, o, r), a.closePath(), a.stroke(), a.restore());
6768
6849
  }
6769
- function Mc(e, t, n) {
6770
- return Nn(e, {
6850
+ function Fc(e, t, n) {
6851
+ return Pn(e, {
6771
6852
  label: n,
6772
6853
  index: t,
6773
6854
  type: "pointLabel"
6774
6855
  });
6775
6856
  }
6776
- (class extends lc {
6857
+ (class extends fc {
6777
6858
  static id = "radialLinear";
6778
6859
  static defaults = {
6779
6860
  display: !0,
@@ -6813,7 +6894,7 @@ function Mc(e, t, n) {
6813
6894
  super(e), this.xCenter = void 0, this.yCenter = void 0, this.drawingArea = void 0, this._pointLabels = [], this._pointLabelItems = [];
6814
6895
  }
6815
6896
  setDimensions() {
6816
- let e = this._padding = J(_c(this.options) / 2), t = this.width = this.maxWidth - e.width, n = this.height = this.maxHeight - e.height;
6897
+ let e = this._padding = q(bc(this.options) / 2), t = this.width = this.maxWidth - e.width, n = this.height = this.maxHeight - e.height;
6817
6898
  this.xCenter = Math.floor(this.left + t / 2 + e.left), this.yCenter = Math.floor(this.top + n / 2 + e.top), this.drawingArea = Math.floor(Math.min(t, n) / 2);
6818
6899
  }
6819
6900
  determineDataLimits() {
@@ -6821,17 +6902,17 @@ function Mc(e, t, n) {
6821
6902
  this.min = N(e) && !isNaN(e) ? e : 0, this.max = N(t) && !isNaN(t) ? t : 0, this.handleTickRangeOptions();
6822
6903
  }
6823
6904
  computeTickLimit() {
6824
- return Math.ceil(this.drawingArea / _c(this.options));
6905
+ return Math.ceil(this.drawingArea / bc(this.options));
6825
6906
  }
6826
6907
  generateTickLabels(e) {
6827
- lc.prototype.generateTickLabels.call(this, e), this._pointLabels = this.getLabels().map((e, t) => {
6908
+ fc.prototype.generateTickLabels.call(this, e), this._pointLabels = this.getLabels().map((e, t) => {
6828
6909
  let n = I(this.options.pointLabels.callback, [e, t], this);
6829
6910
  return n || n === 0 ? n : "";
6830
6911
  }).filter((e, t) => this.chart.getDataVisibility(t));
6831
6912
  }
6832
6913
  fit() {
6833
6914
  let e = this.options;
6834
- e.display && e.pointLabels.display ? bc(this) : this.setCenterPoint(0, 0, 0, 0);
6915
+ e.display && e.pointLabels.display ? Cc(this) : this.setCenterPoint(0, 0, 0, 0);
6835
6916
  }
6836
6917
  setCenterPoint(e, t, n, r) {
6837
6918
  this.xCenter += Math.floor((e - t) / 2), this.yCenter += Math.floor((n - r) / 2), this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(e, t, n, r));
@@ -6854,7 +6935,7 @@ function Mc(e, t, n) {
6854
6935
  let t = this._pointLabels || [];
6855
6936
  if (e >= 0 && e < t.length) {
6856
6937
  let n = t[e];
6857
- return Mc(this.getContext(), e, n);
6938
+ return Fc(this.getContext(), e, n);
6858
6939
  }
6859
6940
  }
6860
6941
  getPointPosition(e, t, n = 0) {
@@ -6884,16 +6965,16 @@ function Mc(e, t, n) {
6884
6965
  let { backgroundColor: e, grid: { circular: t } } = this.options;
6885
6966
  if (e) {
6886
6967
  let n = this.ctx;
6887
- n.save(), n.beginPath(), Ac(this, this.getDistanceFromCenterForValue(this._endValue), t, this._pointLabels.length), n.closePath(), n.fillStyle = e, n.fill(), n.restore();
6968
+ n.save(), n.beginPath(), Nc(this, this.getDistanceFromCenterForValue(this._endValue), t, this._pointLabels.length), n.closePath(), n.fillStyle = e, n.fill(), n.restore();
6888
6969
  }
6889
6970
  }
6890
6971
  drawGrid() {
6891
6972
  let e = this.ctx, t = this.options, { angleLines: n, grid: r, border: i } = t, a = this._pointLabels.length, o, s, c;
6892
- if (t.pointLabels.display && kc(this, a), r.display && this.ticks.forEach((e, t) => {
6973
+ if (t.pointLabels.display && Mc(this, a), r.display && this.ticks.forEach((e, t) => {
6893
6974
  if (t !== 0 || t === 0 && this.min < 0) {
6894
6975
  s = this.getDistanceFromCenterForValue(e.value);
6895
6976
  let n = this.getContext(t), o = r.setContext(n), c = i.setContext(n);
6896
- jc(this, o, s, a, c);
6977
+ Pc(this, o, s, a, c);
6897
6978
  }
6898
6979
  }), n.display) {
6899
6980
  for (e.save(), o = a - 1; o >= 0; o--) {
@@ -6910,13 +6991,13 @@ function Mc(e, t, n) {
6910
6991
  let r = this.getIndexAngle(0), i, a;
6911
6992
  e.save(), e.translate(this.xCenter, this.yCenter), e.rotate(r), e.textAlign = "center", e.textBaseline = "middle", this.ticks.forEach((r, o) => {
6912
6993
  if (o === 0 && this.min >= 0 && !t.reverse) return;
6913
- let s = n.setContext(this.getContext(o)), c = Y(s.font);
6994
+ let s = n.setContext(this.getContext(o)), c = J(s.font);
6914
6995
  if (i = this.getDistanceFromCenterForValue(this.ticks[o].value), s.showLabelBackdrop) {
6915
6996
  e.font = c.string, a = e.measureText(r.label).width, e.fillStyle = s.backdropColor;
6916
- let t = J(s.backdropPadding);
6997
+ let t = q(s.backdropPadding);
6917
6998
  e.fillRect(-a / 2 - t.left, -i - c.size / 2 - t.top, a + t.width, c.size + t.height);
6918
6999
  }
6919
- Sn(e, r.label, 0, -i, c, {
7000
+ Cn(e, r.label, 0, -i, c, {
6920
7001
  color: s.color,
6921
7002
  strokeColor: s.textStrokeColor,
6922
7003
  strokeWidth: s.textStrokeWidth
@@ -6925,7 +7006,7 @@ function Mc(e, t, n) {
6925
7006
  }
6926
7007
  drawTitle() {}
6927
7008
  });
6928
- var Nc = {
7009
+ var Ic = {
6929
7010
  millisecond: {
6930
7011
  common: !0,
6931
7012
  size: 1,
@@ -6970,54 +7051,54 @@ var Nc = {
6970
7051
  common: !0,
6971
7052
  size: 3154e7
6972
7053
  }
6973
- }, $ = /* #__PURE__ */ Object.keys(Nc);
6974
- function Pc(e, t) {
7054
+ }, $ = /* #__PURE__ */ Object.keys(Ic);
7055
+ function Lc(e, t) {
6975
7056
  return e - t;
6976
7057
  }
6977
- function Fc(e, t) {
7058
+ function Rc(e, t) {
6978
7059
  if (A(t)) return null;
6979
7060
  let n = e._adapter, { parser: r, round: i, isoWeekday: a } = e._parseOpts, o = t;
6980
7061
  return typeof r == "function" && (o = r(o)), N(o) || (o = typeof r == "string" ? n.parse(o, r) : n.parse(o)), o === null ? null : (i && (o = i === "week" && (pt(a) || a === !0) ? n.startOf(o, "isoWeek", a) : n.startOf(o, i)), +o);
6981
7062
  }
6982
- function Ic(e, t, n, r) {
7063
+ function zc(e, t, n, r) {
6983
7064
  let i = $.length;
6984
7065
  for (let a = $.indexOf(e); a < i - 1; ++a) {
6985
- let e = Nc[$[a]], i = e.steps ? e.steps : 2 ** 53 - 1;
7066
+ let e = Ic[$[a]], i = e.steps ? e.steps : 2 ** 53 - 1;
6986
7067
  if (e.common && Math.ceil((n - t) / (i * e.size)) <= r) return $[a];
6987
7068
  }
6988
7069
  return $[i - 1];
6989
7070
  }
6990
- function Lc(e, t, n, r, i) {
7071
+ function Bc(e, t, n, r, i) {
6991
7072
  for (let a = $.length - 1; a >= $.indexOf(n); a--) {
6992
7073
  let n = $[a];
6993
- if (Nc[n].common && e._adapter.diff(i, r, n) >= t - 1) return n;
7074
+ if (Ic[n].common && e._adapter.diff(i, r, n) >= t - 1) return n;
6994
7075
  }
6995
7076
  return $[n ? $.indexOf(n) : 0];
6996
7077
  }
6997
- function Rc(e) {
6998
- for (let t = $.indexOf(e) + 1, n = $.length; t < n; ++t) if (Nc[$[t]].common) return $[t];
7078
+ function Vc(e) {
7079
+ for (let t = $.indexOf(e) + 1, n = $.length; t < n; ++t) if (Ic[$[t]].common) return $[t];
6999
7080
  }
7000
- function zc(e, t, n) {
7081
+ function Hc(e, t, n) {
7001
7082
  if (!n) e[t] = !0;
7002
7083
  else if (n.length) {
7003
7084
  let { lo: r, hi: i } = wt(n, t), a = n[r] >= t ? n[r] : n[i];
7004
7085
  e[a] = !0;
7005
7086
  }
7006
7087
  }
7007
- function Bc(e, t, n, r) {
7088
+ function Uc(e, t, n, r) {
7008
7089
  let i = e._adapter, a = +i.startOf(t[0].value, r), o = t[t.length - 1].value, s, c;
7009
7090
  for (s = a; s <= o; s = +i.add(s, 1, r)) c = n[s], c >= 0 && (t[c].major = !0);
7010
7091
  return t;
7011
7092
  }
7012
- function Vc(e, t, n) {
7093
+ function Wc(e, t, n) {
7013
7094
  let r = [], i = {}, a = t.length, o, s;
7014
7095
  for (o = 0; o < a; ++o) s = t[o], i[s] = o, r.push({
7015
7096
  value: s,
7016
7097
  major: !1
7017
7098
  });
7018
- return a === 0 || !n ? r : Bc(e, r, i, n);
7099
+ return a === 0 || !n ? r : Uc(e, r, i, n);
7019
7100
  }
7020
- var Hc = class extends io {
7101
+ var Gc = class extends io {
7021
7102
  static id = "time";
7022
7103
  static defaults = {
7023
7104
  bounds: "data",
@@ -7044,7 +7125,7 @@ var Hc = class extends io {
7044
7125
  }, this._unit = "day", this._majorUnit = void 0, this._offsets = {}, this._normalized = !1, this._parseOpts = void 0;
7045
7126
  }
7046
7127
  init(e, t = {}) {
7047
- let n = e.time ||= {}, r = this._adapter = new Hi._date(e.adapters.date);
7128
+ let n = e.time ||= {}, r = this._adapter = new Ui._date(e.adapters.date);
7048
7129
  r.init(t), Ke(n.displayFormats, r.formats()), this._parseOpts = {
7049
7130
  parser: n.parser,
7050
7131
  round: n.round,
@@ -7052,7 +7133,7 @@ var Hc = class extends io {
7052
7133
  }, super.init(e), this._normalized = t.normalized;
7053
7134
  }
7054
7135
  parse(e, t) {
7055
- return e === void 0 ? null : Fc(this, e);
7136
+ return e === void 0 ? null : Rc(this, e);
7056
7137
  }
7057
7138
  beforeLayout() {
7058
7139
  super.beforeLayout(), this._cache = {
@@ -7079,7 +7160,7 @@ var Hc = class extends io {
7079
7160
  let e = this.options, t = e.time, n = e.ticks, r = n.source === "labels" ? this.getLabelTimestamps() : this._generate();
7080
7161
  e.bounds === "ticks" && r.length && (this.min = this._userMin || r[0], this.max = this._userMax || r[r.length - 1]);
7081
7162
  let i = this.min, a = this.max, o = Dt(r, i, a);
7082
- return this._unit = t.unit || (n.autoSkip ? Ic(t.minUnit, this.min, this.max, this._getLabelCapacity(i)) : Lc(this, o.length, t.minUnit, this.min, this.max)), this._majorUnit = !n.major.enabled || this._unit === "year" ? void 0 : Rc(this._unit), this.initOffsets(r), e.reverse && o.reverse(), Vc(this, o, this._majorUnit);
7163
+ return this._unit = t.unit || (n.autoSkip ? zc(t.minUnit, this.min, this.max, this._getLabelCapacity(i)) : Bc(this, o.length, t.minUnit, this.min, this.max)), this._majorUnit = !n.major.enabled || this._unit === "year" ? void 0 : Vc(this._unit), this.initOffsets(r), e.reverse && o.reverse(), Wc(this, o, this._majorUnit);
7083
7164
  }
7084
7165
  afterAutoSkip() {
7085
7166
  this.options.offsetAfterAutoskip && this.initOffsets(this.ticks.map((e) => +e.value));
@@ -7095,11 +7176,11 @@ var Hc = class extends io {
7095
7176
  };
7096
7177
  }
7097
7178
  _generate() {
7098
- let e = this._adapter, t = this.min, n = this.max, r = this.options, i = r.time, a = i.unit || Ic(i.minUnit, t, n, this._getLabelCapacity(t)), o = F(r.ticks.stepSize, 1), s = a === "week" && i.isoWeekday, c = pt(s) || s === !0, l = {}, u = t, d, f;
7179
+ let e = this._adapter, t = this.min, n = this.max, r = this.options, i = r.time, a = i.unit || zc(i.minUnit, t, n, this._getLabelCapacity(t)), o = F(r.ticks.stepSize, 1), s = a === "week" && i.isoWeekday, c = pt(s) || s === !0, l = {}, u = t, d, f;
7099
7180
  if (c && (u = +e.startOf(u, "isoWeek", s)), u = +e.startOf(u, c ? "day" : a), e.diff(n, t, a) > 1e5 * o) throw Error(t + " and " + n + " are too far apart with stepSize of " + o + " " + a);
7100
7181
  let p = r.ticks.source === "data" && this.getDataTimestamps();
7101
- for (d = u, f = 0; d < n; d = +e.add(d, o, a), f++) zc(l, d, p);
7102
- return (d === n || r.bounds === "ticks" || f === 1) && zc(l, d, p), Object.keys(l).sort(Pc).map((e) => +e);
7182
+ for (d = u, f = 0; d < n; d = +e.add(d, o, a), f++) Hc(l, d, p);
7183
+ return (d === n || r.bounds === "ticks" || f === 1) && Hc(l, d, p), Object.keys(l).sort(Lc).map((e) => +e);
7103
7184
  }
7104
7185
  getLabelForValue(e) {
7105
7186
  let t = this._adapter, n = this.options.time;
@@ -7142,7 +7223,7 @@ var Hc = class extends io {
7142
7223
  };
7143
7224
  }
7144
7225
  _getLabelCapacity(e) {
7145
- let t = this.options.time, n = t.displayFormats, r = n[t.unit] || n.millisecond, i = this._tickFormatFunction(e, 0, Vc(this, [e], this._majorUnit), r), a = this._getLabelSize(i), o = Math.floor(this.isHorizontal() ? this.width / a.w : this.height / a.h) - 1;
7226
+ let t = this.options.time, n = t.displayFormats, r = n[t.unit] || n.millisecond, i = this._tickFormatFunction(e, 0, Wc(this, [e], this._majorUnit), r), a = this._getLabelSize(i), o = Math.floor(this.isHorizontal() ? this.width / a.w : this.height / a.h) - 1;
7146
7227
  return o > 0 ? o : 1;
7147
7228
  }
7148
7229
  getDataTimestamps() {
@@ -7157,29 +7238,29 @@ var Hc = class extends io {
7157
7238
  let e = this._cache.labels || [], t, n;
7158
7239
  if (e.length) return e;
7159
7240
  let r = this.getLabels();
7160
- for (t = 0, n = r.length; t < n; ++t) e.push(Fc(this, r[t]));
7241
+ for (t = 0, n = r.length; t < n; ++t) e.push(Rc(this, r[t]));
7161
7242
  return this._cache.labels = this._normalized ? e : this.normalize(e);
7162
7243
  }
7163
7244
  normalize(e) {
7164
- return jt(e.sort(Pc));
7245
+ return jt(e.sort(Lc));
7165
7246
  }
7166
7247
  };
7167
- function Uc(e, t, n) {
7248
+ function Kc(e, t, n) {
7168
7249
  let r = 0, i = e.length - 1, a, o, s, c;
7169
7250
  n ? (t >= e[r].pos && t <= e[i].pos && ({lo: r, hi: i} = Tt(e, "pos", t)), {pos: a, time: s} = e[r], {pos: o, time: c} = e[i]) : (t >= e[r].time && t <= e[i].time && ({lo: r, hi: i} = Tt(e, "time", t)), {time: a, pos: s} = e[r], {time: o, pos: c} = e[i]);
7170
7251
  let l = o - a;
7171
7252
  return l ? s + (c - s) * (t - a) / l : s;
7172
7253
  }
7173
7254
  // ../../packages/components/src/chat/PkChart.vue?vue&type=script&setup=true&lang.ts
7174
- (class extends Hc {
7255
+ (class extends Gc {
7175
7256
  static id = "timeseries";
7176
- static defaults = Hc.defaults;
7257
+ static defaults = Gc.defaults;
7177
7258
  constructor(e) {
7178
7259
  super(e), this._table = [], this._minPos = void 0, this._tableRange = void 0;
7179
7260
  }
7180
7261
  initOffsets() {
7181
7262
  let e = this._getTimestampsForTable(), t = this._table = this.buildLookupTable(e);
7182
- this._minPos = Uc(t, this.min), this._tableRange = Uc(t, this.max) - this._minPos, super.initOffsets(e);
7263
+ this._minPos = Kc(t, this.min), this._tableRange = Kc(t, this.max) - this._minPos, super.initOffsets(e);
7183
7264
  }
7184
7265
  buildLookupTable(e) {
7185
7266
  let { min: t, max: n } = this, r = [], i = [], a, o, s, c, l;
@@ -7208,42 +7289,45 @@ function Uc(e, t, n) {
7208
7289
  return e = t.length && n.length ? this.normalize(t.concat(n)) : t.length ? t : n, e = this._cache.all = e, e;
7209
7290
  }
7210
7291
  getDecimalForValue(e) {
7211
- return (Uc(this._table, e) - this._minPos) / this._tableRange;
7292
+ return (Kc(this._table, e) - this._minPos) / this._tableRange;
7212
7293
  }
7213
7294
  getValueForPixel(e) {
7214
7295
  let t = this._offsets, n = this.getDecimalForPixel(e) / t.factor - t.end;
7215
- return Uc(this._table, n * this._tableRange + this._minPos, !0);
7296
+ return Kc(this._table, n * this._tableRange + this._minPos, !0);
7216
7297
  }
7217
7298
  }), o();
7218
- var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7299
+ var qc = ["aria-label"], Jc = /*#__PURE__*/ f(/* @__PURE__ */ s({
7219
7300
  __name: "PkChart",
7220
7301
  props: {
7221
7302
  chart: { type: null },
7222
- isDark: { type: Boolean }
7303
+ isDark: { type: Boolean },
7304
+ paper: { type: Boolean },
7305
+ colors: { type: Array },
7306
+ legend: { type: String }
7223
7307
  },
7224
7308
  setup(o, { expose: s }) {
7225
- Ko.register(rs, Ii, Os, oc, Ri, Ls, uc, zi, gs, Bi, vs, tc);
7226
- let d = o, { locale: m } = u({ useScope: "global" }), g = i("root"), _ = i("canvas"), v, y = [
7309
+ Ko.register(rs, Li, Os, lc, zi, Ls, pc, Bi, gs, Vi, vs, Bs, ic);
7310
+ let f = o, { locale: m, t: g } = u({ useScope: "global" }), _ = i("root"), v = i("canvas"), y, S = [
7227
7311
  "accent",
7228
7312
  "brand",
7229
7313
  "info"
7230
- ], S = [
7314
+ ], C = [
7231
7315
  [100, "surface"],
7232
7316
  [55, "surface"],
7233
7317
  [70, "word"],
7234
7318
  [30, "surface"]
7235
- ].flatMap(([e, t]) => y.map((n) => e === 100 ? `var(--color-${n}-graphic)` : `color-mix(in srgb, var(--color-${n}-graphic) ${e}%, var(--color-${t}))`)), C = {
7319
+ ].flatMap(([e, t]) => S.map((n) => e === 100 ? `var(--color-${n}-graphic)` : `color-mix(in srgb, var(--color-${n}-graphic) ${e}%, var(--color-${t}))`)), w = {
7236
7320
  positive: "var(--color-success-graphic)",
7237
7321
  warning: "var(--color-warning-graphic)",
7238
7322
  negative: "var(--color-danger-graphic)",
7239
7323
  critical: "color-mix(in srgb, var(--color-danger-graphic) 60%, var(--color-word))",
7240
7324
  neutral: "color-mix(in srgb, var(--color-word) 35%, var(--color-surface))"
7241
- }, w = [
7325
+ }, T = [
7242
7326
  "var(--color-word-2)",
7243
7327
  "var(--color-word-3)",
7244
7328
  "var(--color-surface-3)",
7245
7329
  "var(--color-surface)"
7246
- ], T = (e) => ({
7330
+ ], E = (e) => ({
7247
7331
  categorical: [
7248
7332
  "#9365ff",
7249
7333
  "#004775",
@@ -7265,13 +7349,26 @@ var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7265
7349
  tick: e ? "#9ca3af" : "#6b7280",
7266
7350
  grid: e ? "#374151" : "#f3f4f6",
7267
7351
  surface: e ? "#1f2937" : "#ffffff"
7268
- }), E = () => {
7269
- if (!h()) return T(!!d.isDark);
7352
+ }), D = {
7353
+ text: "#595959",
7354
+ tick: "#595959",
7355
+ grid: "#d9d9d9",
7356
+ surface: "#ffffff"
7357
+ }, O = () => {
7358
+ if (f.paper) {
7359
+ let e = E(!1);
7360
+ return {
7361
+ ...e,
7362
+ ...D,
7363
+ categorical: f.colors?.length ? f.colors : e.categorical
7364
+ };
7365
+ }
7366
+ if (!h()) return E(!!f.isDark);
7270
7367
  let e = [
7271
- ...S,
7272
- ...Object.values(C),
7273
- ...w
7274
- ], t = b(g.value, e).map(x), n = t.slice(0, S.length), r = Object.fromEntries(Object.keys(C).map((e, n) => [e, t[S.length + n]])), [i, a, o, s] = t.slice(-w.length);
7368
+ ...C,
7369
+ ...Object.values(w),
7370
+ ...T
7371
+ ], t = b(_.value, e).map(x), n = t.slice(0, C.length), r = Object.fromEntries(Object.keys(w).map((e, n) => [e, t[C.length + n]])), [i, a, o, s] = t.slice(-T.length);
7275
7372
  return {
7276
7373
  categorical: n,
7277
7374
  tones: r,
@@ -7280,41 +7377,42 @@ var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7280
7377
  grid: o,
7281
7378
  surface: s
7282
7379
  };
7283
- }, D = () => {
7284
- let { chart: e } = d, t = E(), n = {
7285
- family: getComputedStyle(g.value).fontFamily,
7380
+ }, k = () => {
7381
+ let { chart: e } = f, t = O(), n = {
7382
+ family: getComputedStyle(_.value).fontFamily,
7286
7383
  size: 11
7287
- }, r = f(m.value, e.format), i = window.matchMedia("(prefers-reduced-motion: reduce)").matches, a = p(e.type), o = 0, s = e.series.map((n) => {
7384
+ }, r = p(m.value, e.format), i = window.matchMedia("(prefers-reduced-motion: reduce)").matches, a = d(e.type), o = !!f.paper, s = 0, c = e.series.map((n, r) => {
7385
+ let i = n.name || g("chart.series", { n: r + 1 });
7288
7386
  if (a) return {
7289
- label: n.name,
7387
+ label: i,
7290
7388
  data: n.values,
7291
7389
  backgroundColor: e.categories.map((e, n) => t.categorical[n % t.categorical.length]),
7292
7390
  borderColor: t.surface,
7293
7391
  borderWidth: 2
7294
7392
  };
7295
- let r = n.tone ? t.tones[n.tone] : t.categorical[o++ % t.categorical.length];
7393
+ let c = n.tone ? t.tones[n.tone] : t.categorical[s++ % t.categorical.length];
7296
7394
  return e.type === "line" ? {
7297
- label: n.name,
7395
+ label: i,
7298
7396
  data: n.values,
7299
- borderColor: r,
7300
- backgroundColor: r,
7397
+ borderColor: c,
7398
+ backgroundColor: c,
7301
7399
  borderWidth: 2,
7302
7400
  pointRadius: 3,
7303
- cubicInterpolationMode: "monotone",
7401
+ cubicInterpolationMode: o ? "default" : "monotone",
7304
7402
  spanGaps: !1
7305
7403
  } : {
7306
- label: n.name,
7404
+ label: i,
7307
7405
  data: n.values,
7308
- backgroundColor: r,
7309
- borderRadius: 3,
7310
- maxBarThickness: 48
7406
+ backgroundColor: c,
7407
+ borderRadius: o ? 0 : 3,
7408
+ maxBarThickness: o ? void 0 : 48
7311
7409
  };
7312
- }), c = (e) => ({
7410
+ }), l = (e) => ({
7313
7411
  display: !!e,
7314
7412
  text: e ?? "",
7315
7413
  color: t.tick,
7316
7414
  font: n
7317
- }), l = {
7415
+ }), u = {
7318
7416
  beginAtZero: !0,
7319
7417
  stacked: !!e.stacked,
7320
7418
  ticks: {
@@ -7327,8 +7425,8 @@ var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7327
7425
  drawTicks: !1
7328
7426
  },
7329
7427
  border: { display: !1 },
7330
- title: c(e.valueLabel)
7331
- }, u = {
7428
+ title: l(e.valueLabel)
7429
+ }, h = {
7332
7430
  stacked: !!e.stacked,
7333
7431
  ticks: {
7334
7432
  color: t.tick,
@@ -7337,31 +7435,45 @@ var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7337
7435
  },
7338
7436
  grid: { display: !1 },
7339
7437
  border: { display: !1 },
7340
- title: c(e.categoryLabel)
7341
- }, h = e.type === "bar" && !!e.horizontal;
7438
+ title: l(e.categoryLabel)
7439
+ }, v = e.type === "bar" && !!e.horizontal;
7342
7440
  return {
7343
7441
  type: e.type,
7344
7442
  data: {
7345
7443
  labels: e.categories,
7346
- datasets: s
7444
+ datasets: c
7347
7445
  },
7348
7446
  options: {
7349
7447
  responsive: !0,
7350
7448
  maintainAspectRatio: !1,
7351
7449
  animation: !i && { duration: 400 },
7352
- indexAxis: h ? "y" : "x",
7450
+ indexAxis: v ? "y" : "x",
7353
7451
  ...a && { cutout: e.type === "doughnut" ? "55%" : 0 },
7354
- scales: a ? {} : h ? {
7355
- x: l,
7356
- y: u
7357
- } : {
7452
+ scales: a ? {} : v ? {
7358
7453
  x: u,
7359
- y: l
7454
+ y: h
7455
+ } : {
7456
+ x: h,
7457
+ y: u
7360
7458
  },
7361
7459
  plugins: {
7460
+ title: {
7461
+ display: o && !!e.title,
7462
+ text: e.title ?? "",
7463
+ color: t.text,
7464
+ font: {
7465
+ ...n,
7466
+ size: 14,
7467
+ weight: "normal"
7468
+ },
7469
+ padding: {
7470
+ top: 4,
7471
+ bottom: 8
7472
+ }
7473
+ },
7362
7474
  legend: {
7363
- display: a || e.series.length > 1,
7364
- position: "bottom",
7475
+ display: o ? !!f.legend : a || e.series.length > 1,
7476
+ position: o && f.legend || "bottom",
7365
7477
  labels: {
7366
7478
  color: t.text,
7367
7479
  font: n,
@@ -7383,29 +7495,35 @@ var Wc = ["aria-label"], Gc = /*#__PURE__*/ d(/* @__PURE__ */ s({
7383
7495
  }
7384
7496
  }
7385
7497
  };
7386
- }, O = async () => {
7387
- await e(), _.value && g.value && (v?.destroy(), v = new Ko(_.value, D()));
7498
+ }, ee = async () => {
7499
+ await e(), v.value && _.value && (y?.destroy(), y = new Ko(v.value, k()));
7388
7500
  };
7389
7501
  return s({ toBlob: async () => {
7390
- if (!_.value || !g.value) return null;
7502
+ if (!v.value || !_.value) return null;
7391
7503
  let e = document.createElement("canvas");
7392
- e.width = _.value.width, e.height = _.value.height;
7504
+ e.width = v.value.width, e.height = v.value.height;
7393
7505
  let t = e.getContext("2d");
7394
- return t ? (t.fillStyle = E().surface, t.fillRect(0, 0, e.width, e.height), t.drawImage(_.value, 0, 0), new Promise((t) => e.toBlob(t, "image/png"))) : null;
7395
- } }), n(O), r(() => `${d.isDark}|${JSON.stringify(d.chart)}`, O), t(() => {
7396
- v?.destroy(), v = void 0;
7506
+ return t ? (t.fillStyle = O().surface, t.fillRect(0, 0, e.width, e.height), t.drawImage(v.value, 0, 0), new Promise((t) => e.toBlob(t, "image/png"))) : null;
7507
+ } }), n(ee), r(() => JSON.stringify([
7508
+ f.isDark,
7509
+ f.paper,
7510
+ f.legend,
7511
+ f.colors,
7512
+ f.chart
7513
+ ]), ee), t(() => {
7514
+ y?.destroy(), y = void 0;
7397
7515
  }), (e, t) => (l(), c("div", {
7398
7516
  ref_key: "root",
7399
- ref: g,
7517
+ ref: _,
7400
7518
  class: "pk-chart"
7401
7519
  }, [a("canvas", {
7402
7520
  ref_key: "canvas",
7403
- ref: _,
7521
+ ref: v,
7404
7522
  role: "img",
7405
7523
  "aria-label": o.chart.title || o.chart.series.map((e) => e.name).join(", ")
7406
- }, null, 8, Wc)], 512));
7524
+ }, null, 8, qc)], 512));
7407
7525
  }
7408
7526
  }), [["styles", [".pk-chart{width:100%;height:100%;min-height:0;position:relative}"]]]);
7409
- export { Gc as default };
7527
+ export { Jc as default };
7410
7528
 
7411
- //# sourceMappingURL=PkChart-CbtMRGWc.js.map
7529
+ //# sourceMappingURL=PkChart-CYFx_UDq.js.map