nemesischart 2.0.5 → 2.0.7

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.
@@ -1,11 +1,11 @@
1
- import { ref as tt, shallowRef as Rt, onMounted as Et, onBeforeUnmount as Ft, watch as vt, openBlock as n, createElementBlock as s, normalizeStyle as y, createElementVNode as x, computed as w, unref as r, normalizeClass as rt, renderSlot as C, createTextVNode as O, toDisplayString as $, createCommentVNode as f, createVNode as dt, Fragment as pt, renderList as yt } from "vue";
2
- import { Chart as $t, Title as Tt, Tooltip as qt, Legend as Lt, Filler as zt, LineController as jt, LineElement as Ht, PointElement as Vt, BarController as Mt, BarElement as Nt, PieController as Dt, PolarAreaController as Pt, ArcElement as Ot, CategoryScale as Wt, LinearScale as It, RadialLinearScale as Xt } from "chart.js";
3
- const et = (t, v) => {
1
+ import { ref as ot, shallowRef as Mt, onMounted as jt, onBeforeUnmount as Ht, watch as Bt, openBlock as l, createElementBlock as s, normalizeStyle as h, createElementVNode as S, computed as z, unref as a, normalizeClass as lt, renderSlot as F, createTextVNode as X, toDisplayString as A, createCommentVNode as g, createVNode as ft, Fragment as mt, renderList as yt, useCssVars as Vt } from "vue";
2
+ import { Chart as wt, Title as Nt, Tooltip as Pt, Legend as Dt, Filler as It, LineController as Wt, LineElement as Ot, PointElement as Xt, BarController as Yt, BarElement as Jt, PieController as Qt, PolarAreaController as Ut, ArcElement as Gt, CategoryScale as Zt, LinearScale as Kt, RadialLinearScale as _t } from "chart.js";
3
+ const at = (t, m) => {
4
4
  const e = t.__vccOpts || t;
5
- for (const [g, o] of v)
6
- e[g] = o;
5
+ for (const [i, o] of m)
6
+ e[i] = o;
7
7
  return e;
8
- }, Yt = {
8
+ }, te = {
9
9
  __name: "ChartBase",
10
10
  props: {
11
11
  type: { type: String, required: !0 },
@@ -15,123 +15,144 @@ const et = (t, v) => {
15
15
  height: { type: [String, Number], default: 300 },
16
16
  width: { type: [String, Number], default: null }
17
17
  },
18
- setup(t, { expose: v }) {
19
- $t.register(
20
- Tt,
21
- qt,
22
- Lt,
23
- zt,
24
- jt,
25
- Ht,
26
- Vt,
27
- Mt,
18
+ setup(t, { expose: m }) {
19
+ wt.register(
28
20
  Nt,
29
- Dt,
30
21
  Pt,
31
- Ot,
32
- Wt,
22
+ Dt,
33
23
  It,
34
- Xt
24
+ Wt,
25
+ Ot,
26
+ Xt,
27
+ Yt,
28
+ Jt,
29
+ Qt,
30
+ Ut,
31
+ Gt,
32
+ Zt,
33
+ Kt,
34
+ _t
35
35
  );
36
- const e = t, g = tt(null), o = Rt(null), R = {
36
+ const e = t, i = ot(null), o = Mt(null), C = {
37
37
  responsive: !0,
38
38
  maintainAspectRatio: !1,
39
39
  plugins: {
40
40
  legend: { position: "top" }
41
41
  }
42
42
  };
43
- function S() {
44
- return { ...R, ...e.options };
43
+ function $() {
44
+ return { ...C, ...e.options };
45
45
  }
46
- function j() {
47
- g.value && (o.value = new $t(g.value, {
46
+ function w() {
47
+ i.value && (o.value = new wt(i.value, {
48
48
  type: e.type,
49
49
  data: e.data,
50
- options: S(),
50
+ options: $(),
51
51
  plugins: e.plugins
52
52
  }));
53
53
  }
54
- function Q() {
54
+ function P() {
55
55
  o.value && (o.value.destroy(), o.value = null);
56
56
  }
57
- return Et(j), Ft(Q), vt(
57
+ return jt(w), Ht(P), Bt(
58
58
  () => e.data,
59
- (Z) => {
59
+ (R) => {
60
60
  if (!o.value) return;
61
- o.value.data.labels = Z.labels;
62
- const T = o.value.data.datasets, E = Z.datasets;
63
- T.length !== E.length ? o.value.data.datasets = E : E.forEach((X, I) => Object.assign(T[I], X)), o.value.update();
61
+ o.value.data.labels = R.labels;
62
+ const q = o.value.data.datasets, L = R.datasets;
63
+ q.length !== L.length ? o.value.data.datasets = L : L.forEach((Q, W) => Object.assign(q[W], Q)), o.value.update();
64
64
  },
65
65
  { deep: !0 }
66
- ), vt(
66
+ ), Bt(
67
67
  () => e.options,
68
68
  () => {
69
- o.value && (o.value.options = S(), o.value.update());
69
+ o.value && (o.value.options = $(), o.value.update());
70
70
  },
71
71
  { deep: !0 }
72
- ), v({ chart: o }), (Z, T) => (n(), s("div", {
72
+ ), m({ chart: o }), (R, q) => (l(), s("div", {
73
73
  class: "nc-chart-wrapper w-full",
74
- style: y({
74
+ style: h({
75
75
  height: typeof t.height == "number" ? `${t.height}px` : t.height,
76
76
  width: t.width ? typeof t.width == "number" ? `${t.width}px` : t.width : "100%"
77
77
  })
78
78
  }, [
79
- x("canvas", {
79
+ S("canvas", {
80
80
  ref_key: "canvasRef",
81
- ref: g
81
+ ref: i
82
82
  }, null, 512)
83
83
  ], 4));
84
84
  }
85
- }, lt = /* @__PURE__ */ et(Yt, [["__scopeId", "data-v-9828990e"]]), Jt = {
85
+ }, st = /* @__PURE__ */ at(te, [["__scopeId", "data-v-9828990e"]]);
86
+ function ee(t) {
87
+ const m = t.replace("#", ""), e = m.length === 3 ? m.split("").map((Q) => Q + Q).join("") : m, i = parseInt(e.slice(0, 2), 16) / 255, o = parseInt(e.slice(2, 4), 16) / 255, C = parseInt(e.slice(4, 6), 16) / 255, $ = Math.max(i, o, C), w = Math.min(i, o, C), P = ($ + w) / 2;
88
+ if ($ === w) return [0, 0, P * 100];
89
+ const R = $ - w, q = P > 0.5 ? R / (2 - $ - w) : R / ($ + w);
90
+ let L;
91
+ return $ === i ? L = ((o - C) / R + (o < C ? 6 : 0)) / 6 : $ === o ? L = ((C - i) / R + 2) / 6 : L = ((i - o) / R + 4) / 6, [L * 360, q * 100, P * 100];
92
+ }
93
+ function oe(t, m, e) {
94
+ t /= 360, m /= 100, e /= 100;
95
+ const i = e < 0.5 ? e * (1 + m) : e + m - e * m, o = 2 * e - i, C = (R) => (R < 0 && (R += 1), R > 1 && (R -= 1), R < 1 / 6 ? o + (i - o) * 6 * R : R < 1 / 2 ? i : R < 2 / 3 ? o + (i - o) * (2 / 3 - R) * 6 : o), $ = m === 0 ? e : C(t + 1 / 3), w = m === 0 ? e : C(t), P = m === 0 ? e : C(t - 1 / 3);
96
+ return "#" + [$, w, P].map((R) => Math.round(R * 255).toString(16).padStart(2, "0")).join("");
97
+ }
98
+ function ht(t, m = 7) {
99
+ if (!(t != null && t.startsWith("#"))) return Array.from({ length: m }, () => t ?? "#3B82F6");
100
+ const [e, i] = ee(t), o = 20, C = 72;
101
+ return Array.from({ length: m }, ($, w) => {
102
+ const P = m === 1 ? 0.5 : w / (m - 1), R = o + P * (C - o), q = Math.max(50, i - Math.max(0, R - 55) * 0.6);
103
+ return oe(e, q, R);
104
+ });
105
+ }
106
+ const ae = {
86
107
  light: { bg: "#ffffff", text: "#000000", muted: "#64748B", grid: "rgba(15,23,42,0.06)" },
87
108
  dark: { bg: "#000000", text: "#ffffff", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" },
88
109
  transparent: { bg: "transparent", text: "inherit", muted: "#7b7b7b", grid: "rgba(127,127,127,0.15)" }
89
110
  };
90
- function D(t, v) {
91
- if (!t) return `rgba(59,130,246,${v})`;
111
+ function N(t, m) {
112
+ if (!t) return `rgba(59,130,246,${m})`;
92
113
  if (t.startsWith("#")) {
93
- const e = t.replace("#", ""), g = e.length === 3 ? e.split("").map((j) => j + j).join("") : e, o = parseInt(g.slice(0, 2), 16), R = parseInt(g.slice(2, 4), 16), S = parseInt(g.slice(4, 6), 16);
94
- return `rgba(${o},${R},${S},${v})`;
114
+ const e = t.replace("#", ""), i = e.length === 3 ? e.split("").map((w) => w + w).join("") : e, o = parseInt(i.slice(0, 2), 16), C = parseInt(i.slice(2, 4), 16), $ = parseInt(i.slice(4, 6), 16);
115
+ return `rgba(${o},${C},${$},${m})`;
95
116
  }
96
117
  if (t.startsWith("rgb")) {
97
118
  const e = t.match(/[\d.]+/g);
98
- if (e && e.length >= 3) return `rgba(${e[0]},${e[1]},${e[2]},${v})`;
119
+ if (e && e.length >= 3) return `rgba(${e[0]},${e[1]},${e[2]},${m})`;
99
120
  }
100
121
  return t;
101
122
  }
102
- function nt(t) {
103
- const v = w(() => {
104
- const g = Jt[t.tema], o = g ? { ...g, bg: t.corFundo || g.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" };
123
+ function it(t) {
124
+ const m = z(() => {
125
+ const i = ae[t.tema], o = i ? { ...i, bg: t.corFundo || i.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#7b7b7b", grid: "rgba(255,255,255,0.08)" };
105
126
  return {
106
127
  ...o,
107
128
  text: t.corTexto || o.text,
108
129
  muted: t.corTexto || o.muted
109
130
  };
110
- }), e = w(() => ({
111
- background: v.value.bg,
112
- color: v.value.text,
131
+ }), e = z(() => ({
132
+ background: m.value.bg,
133
+ color: m.value.text,
113
134
  borderRadius: typeof t.borderRadius == "number" ? `${t.borderRadius}px` : t.borderRadius,
114
135
  boxShadow: t.sombra,
115
136
  border: t.corBorda ? `1px solid ${t.corBorda}` : "none"
116
137
  }));
117
- return { palette: v, cardStyle: e, toRgba: D };
138
+ return { palette: m, cardStyle: e, toRgba: N };
118
139
  }
119
- function ut(t) {
120
- const v = w(() => t.tipoValor === "moeda" ? new Intl.NumberFormat(t.locale, { style: "currency", currency: t.moeda }) : t.tipoValor === "percentual" ? new Intl.NumberFormat(t.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(t.locale, { maximumFractionDigits: 2 }));
121
- function e(g) {
122
- if (g == null) return "";
123
- const o = Number(g);
124
- return Number.isNaN(o) ? String(g) : t.tipoValor === "percentual" ? v.value.format(o / 100) : v.value.format(o);
140
+ function pt(t) {
141
+ const m = z(() => t.tipoValor === "moeda" ? new Intl.NumberFormat(t.locale, { style: "currency", currency: t.moeda }) : t.tipoValor === "percentual" ? new Intl.NumberFormat(t.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(t.locale, { maximumFractionDigits: 2 }));
142
+ function e(i) {
143
+ if (i == null) return "";
144
+ const o = Number(i);
145
+ return Number.isNaN(o) ? String(i) : t.tipoValor === "percentual" ? m.value.format(o / 100) : m.value.format(o);
125
146
  }
126
- return { formatador: v, formatar: e };
147
+ return { formatador: m, formatar: e };
127
148
  }
128
- function gt(t, { caretFlexivel: v = !1 } = {}) {
149
+ function gt(t, { caretFlexivel: m = !1 } = {}) {
129
150
  let e = t.querySelector(".nc-tt");
130
151
  if (e) return e;
131
152
  e = document.createElement("div"), e.className = "nc-tt", Object.assign(e.style, {
132
153
  position: "absolute",
133
154
  pointerEvents: "none",
134
- transform: v ? "translateX(-50%)" : "translate(-50%, calc(-100% - 16px))",
155
+ transform: m ? "translateX(-50%)" : "translate(-50%, calc(-100% - 16px))",
135
156
  transition: "opacity .18s ease, left .12s ease, top .12s ease",
136
157
  opacity: "0",
137
158
  background: "#ffffff",
@@ -145,8 +166,8 @@ function gt(t, { caretFlexivel: v = !1 } = {}) {
145
166
  fontFamily: "inherit",
146
167
  textAlign: "left"
147
168
  });
148
- const g = document.createElement("div");
149
- g.className = "nc-tt__caret";
169
+ const i = document.createElement("div");
170
+ i.className = "nc-tt__caret";
150
171
  const o = {
151
172
  position: "absolute",
152
173
  left: "50%",
@@ -156,96 +177,96 @@ function gt(t, { caretFlexivel: v = !1 } = {}) {
156
177
  transform: "translateX(-50%) rotate(45deg)",
157
178
  borderRadius: "2px"
158
179
  };
159
- v ? Object.assign(g.style, o) : Object.assign(g.style, o, {
180
+ m ? Object.assign(i.style, o) : Object.assign(i.style, o, {
160
181
  bottom: "-5px",
161
182
  borderRight: "1px solid rgba(15,23,42,.06)",
162
183
  borderBottom: "1px solid rgba(15,23,42,.06)"
163
- }), e.appendChild(g);
164
- const R = document.createElement("div");
165
- return R.className = "nc-tt__content", Object.assign(R.style, { position: "relative", background: "#fff", borderRadius: "8px" }), e.appendChild(R), t.appendChild(e), e;
184
+ }), e.appendChild(i);
185
+ const C = document.createElement("div");
186
+ return C.className = "nc-tt__content", Object.assign(C.style, { position: "relative", background: "#fff", borderRadius: "8px" }), e.appendChild(C), t.appendChild(e), e;
166
187
  }
167
- function ot(t) {
168
- const v = t.canvas.parentNode;
169
- return v ? (getComputedStyle(v).position === "static" && (v.style.position = "relative"), v) : null;
188
+ function rt(t) {
189
+ const m = t.canvas.parentNode;
190
+ return m ? (getComputedStyle(m).position === "static" && (m.style.position = "relative"), m) : null;
170
191
  }
171
- function at(t, v, e, g = 4) {
172
- const o = v / 2;
173
- return t - o < g ? o + g : t + o > e - g ? e - o - g : t;
192
+ function nt(t, m, e, i = 4) {
193
+ const o = m / 2;
194
+ return t - o < i ? o + i : t + o > e - i ? e - o - i : t;
174
195
  }
175
- function St(t, v) {
196
+ function Rt(t, m) {
176
197
  const e = window.getComputedStyle(t);
177
- let g = "";
198
+ let i = "";
178
199
  for (let o = 0; o < e.length; o++) {
179
- const R = e[o];
180
- let S = e.getPropertyValue(R);
181
- if (S && S.indexOf("url(") !== -1 && !/url\(["']?data:/.test(S))
182
- if (R === "background-image" || R === "background" || R === "mask-image" || R === "border-image" || R === "border-image-source")
183
- S = "none";
200
+ const C = e[o];
201
+ let $ = e.getPropertyValue(C);
202
+ if ($ && $.indexOf("url(") !== -1 && !/url\(["']?data:/.test($))
203
+ if (C === "background-image" || C === "background" || C === "mask-image" || C === "border-image" || C === "border-image-source")
204
+ $ = "none";
184
205
  else
185
206
  continue;
186
- g += `${R}:${S};`;
207
+ i += `${C}:${$};`;
187
208
  }
188
- v.setAttribute("style", g);
209
+ m.setAttribute("style", i);
189
210
  }
190
- function Qt(t, v) {
191
- St(t, v);
192
- const e = t.querySelectorAll("*"), g = v.querySelectorAll("*");
211
+ function re(t, m) {
212
+ Rt(t, m);
213
+ const e = t.querySelectorAll("*"), i = m.querySelectorAll("*");
193
214
  for (let o = 0; o < e.length; o++)
194
- g[o] && St(e[o], g[o]);
215
+ i[o] && Rt(e[o], i[o]);
195
216
  }
196
- function Ut(t, v) {
197
- const e = t.querySelectorAll("canvas"), g = v.querySelectorAll("canvas");
198
- e.forEach((o, R) => {
199
- if (!g[R]) return;
200
- const S = document.createElement("img");
217
+ function ne(t, m) {
218
+ const e = t.querySelectorAll("canvas"), i = m.querySelectorAll("canvas");
219
+ e.forEach((o, C) => {
220
+ if (!i[C]) return;
221
+ const $ = document.createElement("img");
201
222
  try {
202
- S.src = o.toDataURL("image/png");
223
+ $.src = o.toDataURL("image/png");
203
224
  } catch {
204
225
  return;
205
226
  }
206
- const j = o.getBoundingClientRect();
207
- S.setAttribute("style", `width:${j.width}px;height:${j.height}px;display:block;`), g[R].replaceWith(S);
227
+ const w = o.getBoundingClientRect();
228
+ $.setAttribute("style", `width:${w.width}px;height:${w.height}px;display:block;`), i[C].replaceWith($);
208
229
  });
209
230
  }
210
- async function st(t, v = {}) {
231
+ async function ct(t, m = {}) {
211
232
  if (!t) return;
212
233
  const {
213
234
  nomeArquivo: e = "componente.png",
214
- escala: g = 2,
235
+ escala: i = 2,
215
236
  corFundo: o = null
216
- } = v, R = t.getBoundingClientRect(), S = Math.ceil(R.width), j = Math.ceil(R.height), Q = t.cloneNode(!0);
217
- Qt(t, Q), Ut(t, Q), Q.style.margin = "0", Q.style.transform = "none";
218
- const Z = new XMLSerializer().serializeToString(Q), T = `<svg xmlns="http://www.w3.org/2000/svg" width="${S}" height="${j}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${S}px;height:${j}px;">` + Z + "</div></foreignObject></svg>", X = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(T))) : ""), I = new Image();
219
- await new Promise((H, Y) => {
220
- I.onload = H, I.onerror = Y, I.src = X;
237
+ } = m, C = t.getBoundingClientRect(), $ = Math.ceil(C.width), w = Math.ceil(C.height), P = t.cloneNode(!0);
238
+ re(t, P), ne(t, P), P.style.margin = "0", P.style.transform = "none";
239
+ const R = new XMLSerializer().serializeToString(P), q = `<svg xmlns="http://www.w3.org/2000/svg" width="${$}" height="${w}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${$}px;height:${w}px;">` + R + "</div></foreignObject></svg>", Q = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(q))) : ""), W = new Image();
240
+ await new Promise((M, G) => {
241
+ W.onload = M, W.onerror = G, W.src = Q;
221
242
  });
222
243
  const K = document.createElement("canvas");
223
- K.width = S * g, K.height = j * g;
244
+ K.width = $ * i, K.height = w * i;
224
245
  const _ = K.getContext("2d");
225
- _.scale(g, g), o && (_.fillStyle = o, _.fillRect(0, 0, S, j)), _.drawImage(I, 0, 0);
226
- let u;
246
+ _.scale(i, i), o && (_.fillStyle = o, _.fillRect(0, 0, $, w)), _.drawImage(W, 0, 0);
247
+ let f;
227
248
  try {
228
- u = K.toDataURL("image/png");
229
- } catch (H) {
230
- console.error("Falha ao exportar imagem: canvas contaminado.", H);
249
+ f = K.toDataURL("image/png");
250
+ } catch (M) {
251
+ console.error("Falha ao exportar imagem: canvas contaminado.", M);
231
252
  return;
232
253
  }
233
- const F = document.createElement("a");
234
- F.download = e, F.href = u, document.body.appendChild(F), F.click(), document.body.removeChild(F);
254
+ const T = document.createElement("a");
255
+ T.download = e, T.href = f, document.body.appendChild(T), T.click(), document.body.removeChild(T);
235
256
  }
236
- const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', Gt = { class: "card-linhas__header flex flex-column" }, Zt = { class: "card-linhas__topo flex align-items-start justify-content-between gap-3" }, Kt = {
257
+ const dt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', le = { class: "card-linhas__header flex flex-column" }, se = { class: "card-linhas__topo flex align-items-start justify-content-between gap-3" }, ie = {
237
258
  key: 0,
238
259
  class: "nc-legendas-flex flex flex-column"
239
- }, _t = {
260
+ }, ce = {
240
261
  key: 1,
241
262
  class: "nc-actions inline-flex align-items-center gap-2"
242
- }, te = ["innerHTML"], ee = {
263
+ }, de = ["innerHTML"], ue = {
243
264
  key: 0,
244
265
  class: "card-linhas__titulos mt-3 mb-2 flex flex-column"
245
- }, oe = { class: "card-linhas__chart flex-1" }, ae = {
266
+ }, fe = { class: "card-linhas__chart flex-1" }, pe = {
246
267
  key: 0,
247
268
  class: "card-linhas__footer mt-3"
248
- }, re = {
269
+ }, ge = {
249
270
  __name: "CardLinhas",
250
271
  props: {
251
272
  legenda: { type: String, default: null },
@@ -296,76 +317,76 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
296
317
  nomeArquivoExport: { type: String, default: "card-linhas.png" }
297
318
  },
298
319
  emits: ["botaoAcao", "exportado"],
299
- setup(t, { emit: v }) {
300
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), { formatar: S } = ut(e), j = tt(null), Q = it;
301
- async function Z() {
302
- await st(j.value, {
320
+ setup(t, { emit: m }) {
321
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
322
+ async function R() {
323
+ await ct(w.value, {
303
324
  nomeArquivo: e.nomeArquivoExport,
304
325
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
305
- }), g("exportado");
326
+ }), i("exportado");
306
327
  }
307
- const T = w(() => `card-linhas--${e.direcao}`), E = w(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((i) => i && (typeof i == "number" || typeof i.valor == "number")).map((i) => typeof i == "number" ? { valor: i, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
308
- valor: i.valor,
309
- rotulo: i.rotulo ?? null,
310
- cor: i.cor || "#0F172A",
311
- corRotulo: i.corRotulo || i.cor || "#0F172A",
312
- corTexto: i.corTexto || "#FFFFFF",
313
- tracejado: i.tracejado || [6, 6],
314
- espessura: i.espessura ?? 1
315
- }) : []), X = [];
316
- let I = null;
328
+ const q = z(() => `card-linhas--${e.direcao}`), L = z(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((d) => d && (typeof d == "number" || typeof d.valor == "number")).map((d) => typeof d == "number" ? { valor: d, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
329
+ valor: d.valor,
330
+ rotulo: d.rotulo ?? null,
331
+ cor: d.cor || "#0F172A",
332
+ corRotulo: d.corRotulo || d.cor || "#0F172A",
333
+ corTexto: d.corTexto || "#FFFFFF",
334
+ tracejado: d.tracejado || [6, 6],
335
+ espessura: d.espessura ?? 1
336
+ }) : []), Q = [];
337
+ let W = null;
317
338
  const K = {
318
339
  id: "linhaReferencia",
319
- afterDatasetsDraw(d) {
320
- const i = E.value;
321
- if (X.length = 0, !i.length) return;
322
- const { ctx: c, chartArea: h, scales: a } = d, m = a.y;
323
- m && i.forEach((l) => {
324
- const p = m.getPixelForValue(l.valor);
325
- if (X.push({ linha: l, pos: p, chartArea: h }), c.save(), c.beginPath(), c.setLineDash(l.tracejado), c.lineWidth = l.espessura, c.strokeStyle = l.cor, p < h.top || p > h.bottom) {
326
- c.restore();
340
+ afterDatasetsDraw(p) {
341
+ const d = L.value;
342
+ if (Q.length = 0, !d.length) return;
343
+ const { ctx: r, chartArea: b, scales: x } = p, c = x.y;
344
+ c && d.forEach((u) => {
345
+ const n = c.getPixelForValue(u.valor);
346
+ if (Q.push({ linha: u, pos: n, chartArea: b }), r.save(), r.beginPath(), r.setLineDash(u.tracejado), r.lineWidth = u.espessura, r.strokeStyle = u.cor, n < b.top || n > b.bottom) {
347
+ r.restore();
327
348
  return;
328
349
  }
329
- if (c.moveTo(h.left, p), c.lineTo(h.right, p), c.stroke(), c.setLineDash([]), l.rotulo) {
330
- c.font = "600 11px 'Inter', sans-serif";
331
- const b = 8, q = 5, A = c.measureText(l.rotulo).width, k = 12, V = A + b * 2, J = k + q * 2, W = J / 2;
332
- let z = h.left - V - 6, M = p - J / 2;
333
- z < 0 && (z = h.left + 6), c.fillStyle = l.corRotulo, c.beginPath(), c.roundRect ? c.roundRect(z, M, V, J, W) : (c.moveTo(z + W, M), c.lineTo(z + V - W, M), c.quadraticCurveTo(z + V, M, z + V, M + W), c.lineTo(z + V, M + J - W), c.quadraticCurveTo(z + V, M + J, z + V - W, M + J), c.lineTo(z + W, M + J), c.quadraticCurveTo(z, M + J, z, M + J - W), c.lineTo(z, M + W), c.quadraticCurveTo(z, M, z + W, M)), c.fill(), c.fillStyle = l.corTexto, c.textBaseline = "middle", c.textAlign = "center", c.fillText(l.rotulo, z + V / 2, M + J / 2);
350
+ if (r.moveTo(b.left, n), r.lineTo(b.right, n), r.stroke(), r.setLineDash([]), u.rotulo) {
351
+ r.font = "600 11px 'Inter', sans-serif";
352
+ const y = 8, v = 5, E = r.measureText(u.rotulo).width, B = 12, k = E + y * 2, O = B + v * 2, Y = O / 2;
353
+ let V = b.left - k - 6, I = n - O / 2;
354
+ V < 0 && (V = b.left + 6), r.fillStyle = u.corRotulo, r.beginPath(), r.roundRect ? r.roundRect(V, I, k, O, Y) : (r.moveTo(V + Y, I), r.lineTo(V + k - Y, I), r.quadraticCurveTo(V + k, I, V + k, I + Y), r.lineTo(V + k, I + O - Y), r.quadraticCurveTo(V + k, I + O, V + k - Y, I + O), r.lineTo(V + Y, I + O), r.quadraticCurveTo(V, I + O, V, I + O - Y), r.lineTo(V, I + Y), r.quadraticCurveTo(V, I, V + Y, I)), r.fill(), r.fillStyle = u.corTexto, r.textBaseline = "middle", r.textAlign = "center", r.fillText(u.rotulo, V + k / 2, I + O / 2);
334
355
  }
335
- c.restore();
356
+ r.restore();
336
357
  });
337
358
  },
338
- beforeEvent(d, i) {
339
- if (!X.length) {
340
- I = null;
359
+ beforeEvent(p, d) {
360
+ if (!Q.length) {
361
+ W = null;
341
362
  return;
342
363
  }
343
- const c = i.event;
344
- if (!c || c.type === "mouseout" || c.x == null || c.y == null) {
345
- I = null;
364
+ const r = d.event;
365
+ if (!r || r.type === "mouseout" || r.x == null || r.y == null) {
366
+ W = null;
346
367
  return;
347
368
  }
348
- const h = 8;
349
- let a = null, m = 1 / 0;
350
- for (const l of X) {
351
- const p = Math.abs(c.y - l.pos), b = c.x >= l.chartArea.left && c.x <= l.chartArea.right;
352
- p <= h && b && p < m && (m = p, a = l);
369
+ const b = 8;
370
+ let x = null, c = 1 / 0;
371
+ for (const u of Q) {
372
+ const n = Math.abs(r.y - u.pos), y = r.x >= u.chartArea.left && r.x <= u.chartArea.right;
373
+ n <= b && y && n < c && (c = n, x = u);
353
374
  }
354
- I = a;
375
+ W = x;
355
376
  },
356
- afterEvent(d, i) {
357
- if (!X.length) return;
358
- const c = i.event;
359
- if (!c) return;
360
- const h = ot(d);
361
- if (!h) return;
362
- let a = h.querySelector(".nc-tt-linhaRef");
363
- if (!I) {
364
- a && (a.style.opacity = "0");
377
+ afterEvent(p, d) {
378
+ if (!Q.length) return;
379
+ const r = d.event;
380
+ if (!r) return;
381
+ const b = rt(p);
382
+ if (!b) return;
383
+ let x = b.querySelector(".nc-tt-linhaRef");
384
+ if (!W) {
385
+ x && (x.style.opacity = "0");
365
386
  return;
366
387
  }
367
- const m = I;
368
- a || (a = document.createElement("div"), a.className = "nc-tt-linhaRef", Object.assign(a.style, {
388
+ const c = W;
389
+ x || (x = document.createElement("div"), x.className = "nc-tt-linhaRef", Object.assign(x.style, {
369
390
  position: "absolute",
370
391
  pointerEvents: "none",
371
392
  transform: "translate(-50%, calc(-100% - 12px))",
@@ -380,30 +401,30 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
380
401
  zIndex: "11",
381
402
  fontFamily: "'Inter', sans-serif",
382
403
  textAlign: "left"
383
- }), h.appendChild(a));
384
- const l = m.linha.cor || "#0F172A", p = S(m.linha.valor), b = m.linha.rotulo;
385
- a.innerHTML = (b ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${b}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${l};box-shadow:0 0 0 2px ${D(l, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${p}</span></div>`;
386
- const q = d.canvas;
387
- a.style.opacity = "1", a.style.visibility = "hidden", a.style.left = "0px", a.style.top = "0px";
388
- const B = a.offsetWidth, A = a.offsetHeight, k = 4, V = q.offsetLeft + c.x, J = q.offsetTop + m.pos, W = at(V, B, h.clientWidth, k);
389
- let z = J;
390
- const M = A + 16 + k;
391
- z < M && (z = M), a.style.left = W + "px", a.style.top = z + "px", a.style.visibility = "visible";
404
+ }), b.appendChild(x));
405
+ const u = c.linha.cor || "#0F172A", n = $(c.linha.valor), y = c.linha.rotulo;
406
+ x.innerHTML = (y ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${y}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${u};box-shadow:0 0 0 2px ${N(u, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${n}</span></div>`;
407
+ const v = p.canvas;
408
+ x.style.opacity = "1", x.style.visibility = "hidden", x.style.left = "0px", x.style.top = "0px";
409
+ const j = x.offsetWidth, E = x.offsetHeight, B = 4, k = v.offsetLeft + r.x, O = v.offsetTop + c.pos, Y = nt(k, j, b.clientWidth, B);
410
+ let V = O;
411
+ const I = E + 16 + B;
412
+ V < I && (V = I), x.style.left = Y + "px", x.style.top = V + "px", x.style.visibility = "visible";
392
413
  }
393
- }, _ = w(() => E.value.length ? [K] : []), u = w(() => ({
394
- labels: e.data.map((d) => d.rotulo),
414
+ }, _ = z(() => L.value.length ? [K] : []), f = z(() => ({
415
+ labels: e.data.map((p) => p.rotulo),
395
416
  datasets: [
396
417
  {
397
- data: e.data.map((d) => d.quantidade),
418
+ data: e.data.map((p) => p.quantidade),
398
419
  borderColor: e.corDetalhes,
399
420
  borderWidth: 3,
400
421
  borderJoinStyle: "round",
401
422
  borderCapStyle: "round",
402
- backgroundColor: (d) => {
403
- const { chart: i } = d, { ctx: c, chartArea: h } = i;
404
- if (!h) return "transparent";
405
- const a = e.corDetalhes || "#0400FF", m = "#7C7C7C", l = c.createLinearGradient(0, h.top, 0, h.bottom);
406
- return l.addColorStop(0.16, D(a, 0.2)), l.addColorStop(1, D(m, 0)), l;
423
+ backgroundColor: (p) => {
424
+ const { chart: d } = p, { ctx: r, chartArea: b } = d;
425
+ if (!b) return "transparent";
426
+ const x = e.corDetalhes || "#0400FF", c = "#7C7C7C", u = r.createLinearGradient(0, b.top, 0, b.bottom);
427
+ return u.addColorStop(0.16, N(x, 0.2)), u.addColorStop(1, N(c, 0)), u;
407
428
  },
408
429
  fill: !0,
409
430
  tension: 0.45,
@@ -416,54 +437,54 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
416
437
  }
417
438
  ]
418
439
  }));
419
- function F(d) {
420
- const { chart: i, tooltip: c } = d, h = ot(i);
421
- if (!h) return;
422
- const a = gt(h);
423
- if (c.opacity === 0 || I) {
424
- a.style.opacity = "0";
440
+ function T(p) {
441
+ const { chart: d, tooltip: r } = p, b = rt(d);
442
+ if (!b) return;
443
+ const x = gt(b);
444
+ if (r.opacity === 0 || W) {
445
+ x.style.opacity = "0";
425
446
  return;
426
447
  }
427
- const m = c.title || [], l = (c.body || []).flatMap((N) => N.lines), p = a.querySelector(".nc-tt__content"), b = e.corDetalhes || "#3B82F6";
428
- p.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${m.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${D(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${l.join(" ")}</span></div>`;
429
- const { offsetLeft: q, offsetTop: B } = i.canvas;
430
- a.style.opacity = "1", a.style.visibility = "hidden", a.style.left = "0px", a.style.top = "0px";
431
- const A = a.offsetWidth, k = a.offsetHeight, V = 4, J = q + c.caretX, W = B + c.caretY, z = at(J, A, h.clientWidth, V), M = k + 16 + V, U = W < M;
432
- let G;
433
- U ? (a.style.transform = "translateX(-50%) translateY(16px)", G = W) : (a.style.transform = "translate(-50%, calc(-100% - 16px))", G = W), a.style.left = z + "px", a.style.top = G + "px";
434
- const L = a.querySelector(".nc-tt__caret");
435
- if (L) {
436
- const N = J - z, P = A / 2, ft = Math.max(-P + 8, Math.min(P - 8, N));
437
- L.style.left = `calc(50% + ${ft}px)`, U ? (L.style.bottom = "", L.style.top = "-5px", L.style.borderRight = "", L.style.borderBottom = "", L.style.borderLeft = "1px solid rgba(15,23,42,.06)", L.style.borderTop = "1px solid rgba(15,23,42,.06)") : (L.style.top = "", L.style.bottom = "-5px", L.style.borderLeft = "", L.style.borderTop = "", L.style.borderRight = "1px solid rgba(15,23,42,.06)", L.style.borderBottom = "1px solid rgba(15,23,42,.06)");
448
+ const c = r.title || [], u = (r.body || []).flatMap((Z) => Z.lines), n = x.querySelector(".nc-tt__content"), y = e.corDetalhes || "#3B82F6";
449
+ n.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${y};box-shadow:0 0 0 2px ${N(y, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${u.join(" ")}</span></div>`;
450
+ const { offsetLeft: v, offsetTop: j } = d.canvas;
451
+ x.style.opacity = "1", x.style.visibility = "hidden", x.style.left = "0px", x.style.top = "0px";
452
+ const E = x.offsetWidth, B = x.offsetHeight, k = 4, O = v + r.caretX, Y = j + r.caretY, V = nt(O, E, b.clientWidth, k), I = B + 16 + k, tt = Y < I;
453
+ let U;
454
+ tt ? (x.style.transform = "translateX(-50%) translateY(16px)", U = Y) : (x.style.transform = "translate(-50%, calc(-100% - 16px))", U = Y), x.style.left = V + "px", x.style.top = U + "px";
455
+ const H = x.querySelector(".nc-tt__caret");
456
+ if (H) {
457
+ const Z = O - V, D = E / 2, J = Math.max(-D + 8, Math.min(D - 8, Z));
458
+ H.style.left = `calc(50% + ${J}px)`, tt ? (H.style.bottom = "", H.style.top = "-5px", H.style.borderRight = "", H.style.borderBottom = "", H.style.borderLeft = "1px solid rgba(15,23,42,.06)", H.style.borderTop = "1px solid rgba(15,23,42,.06)") : (H.style.top = "", H.style.bottom = "-5px", H.style.borderLeft = "", H.style.borderTop = "", H.style.borderRight = "1px solid rgba(15,23,42,.06)", H.style.borderBottom = "1px solid rgba(15,23,42,.06)");
438
459
  }
439
- a.style.visibility = "visible";
460
+ x.style.visibility = "visible";
440
461
  }
441
- const H = w(() => ({
462
+ const M = z(() => ({
442
463
  responsive: !0,
443
464
  maintainAspectRatio: !1,
444
465
  interaction: { intersect: !1, mode: "index" },
445
466
  layout: {
446
- padding: { top: E.value.length ? 24 : 0, right: 0, bottom: 0, left: 0 }
467
+ padding: { top: L.value.length ? 24 : 0, right: 0, bottom: 0, left: 0 }
447
468
  },
448
469
  plugins: {
449
470
  legend: { display: !1 },
450
471
  tooltip: {
451
472
  enabled: !1,
452
- external: F,
473
+ external: T,
453
474
  callbacks: {
454
- title: (d) => {
455
- var i;
456
- return ((i = d[0]) == null ? void 0 : i.label) ?? "";
475
+ title: (p) => {
476
+ var d;
477
+ return ((d = p[0]) == null ? void 0 : d.label) ?? "";
457
478
  },
458
- label: (d) => S(d.parsed.y)
479
+ label: (p) => $(p.parsed.y)
459
480
  }
460
481
  }
461
482
  },
462
483
  scales: {
463
484
  x: {
464
485
  display: !0,
465
- afterFit: (d) => {
466
- d.paddingLeft = 0, d.paddingRight = 0;
486
+ afterFit: (p) => {
487
+ p.paddingLeft = 0, p.paddingRight = 0;
467
488
  },
468
489
  grid: { display: !1, drawBorder: !1 },
469
490
  border: { display: !1 },
@@ -478,112 +499,112 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
478
499
  display: !1,
479
500
  grid: { display: !1 },
480
501
  beginAtZero: !0,
481
- suggestedMax: E.value.length ? Math.max(...E.value.map((d) => d.valor)) : void 0
502
+ suggestedMax: L.value.length ? Math.max(...L.value.map((p) => p.valor)) : void 0
482
503
  }
483
504
  }
484
505
  }));
485
- function Y() {
486
- g("botaoAcao");
506
+ function G() {
507
+ i("botaoAcao");
487
508
  }
488
- return (d, i) => (n(), s("div", {
509
+ return (p, d) => (l(), s("div", {
489
510
  ref_key: "cardRef",
490
- ref: j,
491
- class: rt(["card-linhas p-4 flex", T.value]),
492
- style: y(r(R))
511
+ ref: w,
512
+ class: lt(["card-linhas p-4 flex", q.value]),
513
+ style: h(a(C))
493
514
  }, [
494
- x("div", Gt, [
495
- x("div", Zt, [
496
- d.$slots.legenda || t.legenda || d.$slots.sublegenda || t.sublegenda ? (n(), s("div", Kt, [
497
- d.$slots.legenda || t.legenda ? (n(), s("div", {
515
+ S("div", le, [
516
+ S("div", se, [
517
+ p.$slots.legenda || t.legenda || p.$slots.sublegenda || t.sublegenda ? (l(), s("div", ie, [
518
+ p.$slots.legenda || t.legenda ? (l(), s("div", {
498
519
  key: 0,
499
520
  class: "text-xs font-medium",
500
- style: y({ color: r(o).text, opacity: 0.85 })
521
+ style: h({ color: a(o).text, opacity: 0.85 })
501
522
  }, [
502
- C(d.$slots, "legenda", {}, () => [
503
- O($(t.legenda), 1)
523
+ F(p.$slots, "legenda", {}, () => [
524
+ X(A(t.legenda), 1)
504
525
  ], !0)
505
- ], 4)) : f("", !0),
506
- d.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
526
+ ], 4)) : g("", !0),
527
+ p.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
507
528
  key: 1,
508
529
  class: "text-xs",
509
- style: y({ color: r(o).muted })
530
+ style: h({ color: a(o).muted })
510
531
  }, [
511
- C(d.$slots, "sublegenda", {}, () => [
512
- O($(t.sublegenda), 1)
532
+ F(p.$slots, "sublegenda", {}, () => [
533
+ X(A(t.sublegenda), 1)
513
534
  ], !0)
514
- ], 4)) : f("", !0)
515
- ])) : f("", !0),
516
- d.$slots.actions || t.botaoVisivel || t.exportar ? (n(), s("div", _t, [
517
- C(d.$slots, "actions", {}, () => [
518
- t.botaoVisivel ? (n(), s("button", {
535
+ ], 4)) : g("", !0)
536
+ ])) : g("", !0),
537
+ p.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ce, [
538
+ F(p.$slots, "actions", {}, () => [
539
+ t.botaoVisivel ? (l(), s("button", {
519
540
  key: 0,
520
541
  class: "nc-btn inline-flex align-items-center",
521
- style: y({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
522
- onClick: Y
542
+ style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
543
+ onClick: G
523
544
  }, [
524
- x("span", null, $(t.textoBotao), 1)
525
- ], 4)) : f("", !0)
545
+ S("span", null, A(t.textoBotao), 1)
546
+ ], 4)) : g("", !0)
526
547
  ], !0),
527
- t.exportar ? (n(), s("button", {
548
+ t.exportar ? (l(), s("button", {
528
549
  key: 0,
529
550
  type: "button",
530
551
  class: "nc-exportar inline-flex align-items-center justify-content-center",
531
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
552
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
532
553
  title: "Exportar como imagem",
533
554
  "aria-label": "Exportar como imagem",
534
- onClick: Z,
535
- innerHTML: r(Q)
536
- }, null, 12, te)) : f("", !0)
537
- ])) : f("", !0)
555
+ onClick: R,
556
+ innerHTML: a(P)
557
+ }, null, 12, de)) : g("", !0)
558
+ ])) : g("", !0)
538
559
  ]),
539
- d.$slots.titulo || t.titulo || d.$slots.descricao || t.descricao ? (n(), s("div", ee, [
540
- d.$slots.titulo || t.titulo ? (n(), s("div", {
560
+ p.$slots.titulo || t.titulo || p.$slots.descricao || t.descricao ? (l(), s("div", ue, [
561
+ p.$slots.titulo || t.titulo ? (l(), s("div", {
541
562
  key: 0,
542
563
  class: "m-0 text-3xl font-semibold",
543
- style: y({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
564
+ style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
544
565
  }, [
545
- C(d.$slots, "titulo", {}, () => [
546
- O($(t.titulo), 1)
566
+ F(p.$slots, "titulo", {}, () => [
567
+ X(A(t.titulo), 1)
547
568
  ], !0)
548
- ], 4)) : f("", !0),
549
- d.$slots.descricao || t.descricao ? (n(), s("div", {
569
+ ], 4)) : g("", !0),
570
+ p.$slots.descricao || t.descricao ? (l(), s("div", {
550
571
  key: 1,
551
572
  class: "text-sm mt-1",
552
- style: y({ color: r(o).muted })
573
+ style: h({ color: a(o).muted })
553
574
  }, [
554
- C(d.$slots, "descricao", {}, () => [
555
- O($(t.descricao), 1)
575
+ F(p.$slots, "descricao", {}, () => [
576
+ X(A(t.descricao), 1)
556
577
  ], !0)
557
- ], 4)) : f("", !0)
558
- ])) : f("", !0)
578
+ ], 4)) : g("", !0)
579
+ ])) : g("", !0)
559
580
  ]),
560
- x("div", oe, [
561
- dt(lt, {
581
+ S("div", fe, [
582
+ ft(st, {
562
583
  type: "line",
563
- data: u.value,
564
- options: H.value,
584
+ data: f.value,
585
+ options: M.value,
565
586
  plugins: _.value,
566
587
  height: t.height
567
588
  }, null, 8, ["data", "options", "plugins", "height"])
568
589
  ]),
569
- d.$slots.footer ? (n(), s("div", ae, [
570
- C(d.$slots, "footer", {}, void 0, !0)
571
- ])) : f("", !0)
590
+ p.$slots.footer ? (l(), s("div", pe, [
591
+ F(p.$slots, "footer", {}, void 0, !0)
592
+ ])) : g("", !0)
572
593
  ], 6));
573
594
  }
574
- }, le = /* @__PURE__ */ et(re, [["__scopeId", "data-v-223eed61"]]), ne = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, se = {
595
+ }, me = /* @__PURE__ */ at(ge, [["__scopeId", "data-v-364ce1d1"]]), ye = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, he = {
575
596
  key: 0,
576
597
  class: "nc-legendas-flex flex flex-column"
577
- }, ie = {
598
+ }, be = {
578
599
  key: 1,
579
600
  class: "nc-actions inline-flex align-items-center gap-2"
580
- }, ce = ["innerHTML"], de = { class: "card-pizza__corpo flex align-items-center gap-4" }, ue = { class: "nc-tabela flex flex-column" }, fe = { class: "nc-tabela-valor" }, pe = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, ge = { class: "nc-tabela-valor" }, ye = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, me = { class: "card-pizza__chart" }, be = {
601
+ }, xe = ["innerHTML"], ve = { class: "card-pizza__corpo flex align-items-center" }, $e = { class: "nc-tabela flex flex-column" }, Se = { class: "nc-tabela-valor" }, ke = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, Ce = { class: "nc-tabela-valor" }, Ae = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, Be = { class: "card-pizza__chart" }, we = {
581
602
  key: 0,
582
603
  class: "nc-centro flex flex-column align-items-center justify-content-center"
583
- }, he = {
604
+ }, Re = {
584
605
  key: 0,
585
606
  class: "card-pizza__footer mt-3"
586
- }, xe = {
607
+ }, Te = {
587
608
  __name: "CardPizza",
588
609
  props: {
589
610
  legenda: { type: String, default: null },
@@ -596,10 +617,7 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
596
617
  corBorda: { type: String, default: "#EAE8E8" },
597
618
  borderRadius: { type: [String, Number], default: "0.75rem" },
598
619
  sombra: { type: String, default: "0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06)" },
599
- cores: {
600
- type: Array,
601
- default: () => ["#0A1A6B", "#1535B5", "#1A5FD4", "#2F8DDF", "#5BB1E8", "#93D0F0", "#CDEAF6"]
602
- },
620
+ corDetalhes: { type: String, default: "#3B82F6" },
603
621
  textoBotao: { type: String, default: "Ver mais" },
604
622
  botaoVisivel: { type: Boolean, default: !1 },
605
623
  direcao: {
@@ -635,22 +653,23 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
635
653
  nomeArquivoExport: { type: String, default: "card-pizza.png" }
636
654
  },
637
655
  emits: ["botaoAcao", "exportado"],
638
- setup(t, { emit: v }) {
639
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), { formatar: S } = ut(e), j = tt(null);
640
- async function Q() {
641
- await st(j.value, {
656
+ setup(t, { emit: m }) {
657
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null);
658
+ async function P() {
659
+ await ct(w.value, {
642
660
  nomeArquivo: e.nomeArquivoExport,
643
661
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
644
- }), g("exportado");
662
+ }), i("exportado");
645
663
  }
646
- const Z = w(() => `card-pizza--${e.direcao}`), T = w(
647
- () => e.data.map((u, F) => e.cores[F % e.cores.length])
648
- ), E = w(() => ({
649
- labels: e.data.map((u) => u.rotulo),
664
+ const R = z(() => `card-pizza--${e.direcao}`), q = z(() => {
665
+ const f = ht(e.corDetalhes, e.data.length);
666
+ return e.data.map((T, M) => T.cor ?? f[M]);
667
+ }), L = z(() => ({
668
+ labels: e.data.map((f) => f.rotulo),
650
669
  datasets: [
651
670
  {
652
- data: e.data.map((u) => u.quantidade),
653
- backgroundColor: T.value,
671
+ data: e.data.map((f) => f.quantidade),
672
+ backgroundColor: q.value,
654
673
  borderWidth: 0,
655
674
  borderColor: "transparent",
656
675
  hoverOffset: 6,
@@ -659,24 +678,24 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
659
678
  }
660
679
  ]
661
680
  }));
662
- function X(u) {
663
- const { chart: F, tooltip: H } = u, Y = ot(F);
664
- if (!Y) return;
665
- const d = gt(Y);
666
- if (H.opacity === 0) {
667
- d.style.opacity = "0";
681
+ function Q(f) {
682
+ const { chart: T, tooltip: M } = f, G = rt(T);
683
+ if (!G) return;
684
+ const p = gt(G);
685
+ if (M.opacity === 0) {
686
+ p.style.opacity = "0";
668
687
  return;
669
688
  }
670
- const i = H.title || [], c = H.dataPoints && H.dataPoints[0], h = c ? T.value[c.dataIndex] : "#3B82F6", a = c ? S(c.parsed) : "", m = d.querySelector(".nc-tt__content");
671
- m.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${i.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${h};box-shadow:0 0 0 2px ${D(h, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${a}</span></div>`;
672
- const { offsetLeft: l, offsetTop: p } = F.canvas;
673
- d.style.opacity = "1", d.style.visibility = "hidden", d.style.left = "0px", d.style.top = "0px";
674
- const b = d.offsetWidth, q = d.offsetHeight, B = 4, A = at(l + H.caretX, b, Y.clientWidth, B);
675
- let k = p + H.caretY;
676
- const V = q + 16 + B;
677
- k < V && (k = V), d.style.left = A + "px", d.style.top = k + "px", d.style.visibility = "visible";
689
+ const d = M.title || [], r = M.dataPoints && M.dataPoints[0], b = r ? q.value[r.dataIndex] : "#3B82F6", x = r ? $(r.parsed) : "", c = p.querySelector(".nc-tt__content");
690
+ c.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${d.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${N(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${x}</span></div>`;
691
+ const { offsetLeft: u, offsetTop: n } = T.canvas;
692
+ p.style.opacity = "1", p.style.visibility = "hidden", p.style.left = "0px", p.style.top = "0px";
693
+ const y = p.offsetWidth, v = p.offsetHeight, j = 4, E = nt(u + M.caretX, y, G.clientWidth, j);
694
+ let B = n + M.caretY;
695
+ const k = v + 16 + j;
696
+ B < k && (B = k), p.style.left = E + "px", p.style.top = B + "px", p.style.visibility = "visible";
678
697
  }
679
- const I = w(() => ({
698
+ const W = z(() => ({
680
699
  responsive: !0,
681
700
  maintainAspectRatio: !1,
682
701
  cutout: e.cutout,
@@ -685,145 +704,145 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
685
704
  legend: { display: !1 },
686
705
  tooltip: {
687
706
  enabled: !1,
688
- external: X,
707
+ external: Q,
689
708
  callbacks: {
690
- title: (u) => {
691
- var F;
692
- return ((F = u[0]) == null ? void 0 : F.label) ?? "";
709
+ title: (f) => {
710
+ var T;
711
+ return ((T = f[0]) == null ? void 0 : T.label) ?? "";
693
712
  },
694
- label: (u) => S(u.parsed)
713
+ label: (f) => $(f.parsed)
695
714
  }
696
715
  }
697
716
  }
698
717
  }));
699
718
  function K() {
700
- g("botaoAcao");
719
+ i("botaoAcao");
701
720
  }
702
- const _ = it;
703
- return (u, F) => (n(), s("div", {
721
+ const _ = dt;
722
+ return (f, T) => (l(), s("div", {
704
723
  ref_key: "cardRef",
705
- ref: j,
706
- class: rt(["card-pizza p-4 flex flex-column", Z.value]),
707
- style: y(r(R))
724
+ ref: w,
725
+ class: lt(["card-pizza p-4 flex flex-column", R.value]),
726
+ style: h(a(C))
708
727
  }, [
709
- x("div", ne, [
710
- u.$slots.legenda || t.legenda || u.$slots.sublegenda || t.sublegenda ? (n(), s("div", se, [
711
- u.$slots.legenda || t.legenda ? (n(), s("div", {
728
+ S("div", ye, [
729
+ f.$slots.legenda || t.legenda || f.$slots.sublegenda || t.sublegenda ? (l(), s("div", he, [
730
+ f.$slots.legenda || t.legenda ? (l(), s("div", {
712
731
  key: 0,
713
732
  class: "text-xs font-medium",
714
- style: y({ color: r(o).text, opacity: 0.95 })
733
+ style: h({ color: a(o).text, opacity: 0.95 })
715
734
  }, [
716
- C(u.$slots, "legenda", {}, () => [
717
- O($(t.legenda), 1)
735
+ F(f.$slots, "legenda", {}, () => [
736
+ X(A(t.legenda), 1)
718
737
  ], !0)
719
- ], 4)) : f("", !0),
720
- u.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
738
+ ], 4)) : g("", !0),
739
+ f.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
721
740
  key: 1,
722
741
  class: "text-xs",
723
- style: y({ color: r(o).muted })
742
+ style: h({ color: a(o).muted })
724
743
  }, [
725
- C(u.$slots, "sublegenda", {}, () => [
726
- O($(t.sublegenda), 1)
744
+ F(f.$slots, "sublegenda", {}, () => [
745
+ X(A(t.sublegenda), 1)
727
746
  ], !0)
728
- ], 4)) : f("", !0)
729
- ])) : f("", !0),
730
- u.$slots.actions || t.botaoVisivel || t.exportar ? (n(), s("div", ie, [
731
- C(u.$slots, "actions", {}, () => [
732
- t.botaoVisivel ? (n(), s("button", {
747
+ ], 4)) : g("", !0)
748
+ ])) : g("", !0),
749
+ f.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", be, [
750
+ F(f.$slots, "actions", {}, () => [
751
+ t.botaoVisivel ? (l(), s("button", {
733
752
  key: 0,
734
753
  class: "nc-btn inline-flex align-items-center",
735
- style: y({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
754
+ style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
736
755
  onClick: K
737
756
  }, [
738
- x("span", null, $(t.textoBotao), 1)
739
- ], 4)) : f("", !0)
757
+ S("span", null, A(t.textoBotao), 1)
758
+ ], 4)) : g("", !0)
740
759
  ], !0),
741
- t.exportar ? (n(), s("button", {
760
+ t.exportar ? (l(), s("button", {
742
761
  key: 0,
743
762
  type: "button",
744
763
  class: "nc-exportar inline-flex align-items-center justify-content-center",
745
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
764
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
746
765
  title: "Exportar como imagem",
747
766
  "aria-label": "Exportar como imagem",
748
- onClick: Q,
749
- innerHTML: r(_)
750
- }, null, 12, ce)) : f("", !0)
751
- ])) : f("", !0)
767
+ onClick: P,
768
+ innerHTML: a(_)
769
+ }, null, 12, xe)) : g("", !0)
770
+ ])) : g("", !0)
752
771
  ]),
753
- x("div", de, [
754
- x("div", ue, [
755
- t.mostrarCabecalho ? (n(), s("div", {
772
+ S("div", ve, [
773
+ S("div", $e, [
774
+ t.mostrarCabecalho ? (l(), s("div", {
756
775
  key: 0,
757
776
  class: "nc-tabela-cab flex align-items-center justify-content-between",
758
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).muted, 0.25) })
777
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).muted, 0.25) })
759
778
  }, [
760
- x("span", null, $(t.rotuloCategoria), 1),
761
- x("span", fe, $(t.rotuloQuantidade), 1)
762
- ], 4)) : f("", !0),
763
- (n(!0), s(pt, null, yt(t.data, (H, Y) => (n(), s("div", {
764
- key: Y,
779
+ S("span", null, A(t.rotuloCategoria), 1),
780
+ S("span", Se, A(t.rotuloQuantidade), 1)
781
+ ], 4)) : g("", !0),
782
+ (l(!0), s(mt, null, yt(t.data, (M, G) => (l(), s("div", {
783
+ key: G,
765
784
  class: "nc-tabela-linha flex align-items-center justify-content-between",
766
- style: y({ color: r(o).text })
785
+ style: h({ color: a(o).text })
767
786
  }, [
768
- x("span", pe, [
769
- x("span", {
787
+ S("span", ke, [
788
+ S("span", {
770
789
  class: "nc-bolinha",
771
- style: y({ background: T.value[Y] })
790
+ style: h({ background: q.value[G] })
772
791
  }, null, 4),
773
- x("span", null, $(H.rotulo), 1)
792
+ S("span", null, A(M.rotulo), 1)
774
793
  ]),
775
- x("span", ge, $(r(S)(H.quantidade)), 1)
794
+ S("span", Ce, A(a($)(M.quantidade)), 1)
776
795
  ], 4))), 128))
777
796
  ]),
778
- x("div", ye, [
779
- x("div", me, [
780
- dt(lt, {
797
+ S("div", Ae, [
798
+ S("div", Be, [
799
+ ft(st, {
781
800
  type: "doughnut",
782
- data: E.value,
783
- options: I.value,
801
+ data: L.value,
802
+ options: W.value,
784
803
  height: t.height
785
804
  }, null, 8, ["data", "options", "height"]),
786
- u.$slots.titulo || t.titulo || u.$slots.descricao || t.descricao ? (n(), s("div", be, [
787
- u.$slots.titulo || t.titulo ? (n(), s("div", {
805
+ f.$slots.titulo || t.titulo || f.$slots.descricao || t.descricao ? (l(), s("div", we, [
806
+ f.$slots.titulo || t.titulo ? (l(), s("div", {
788
807
  key: 0,
789
808
  class: "nc-centro-titulo m-0 font-semibold",
790
- style: y({ color: r(o).text })
809
+ style: h({ color: a(o).text })
791
810
  }, [
792
- C(u.$slots, "titulo", {}, () => [
793
- O($(t.titulo), 1)
811
+ F(f.$slots, "titulo", {}, () => [
812
+ X(A(t.titulo), 1)
794
813
  ], !0)
795
- ], 4)) : f("", !0),
796
- u.$slots.descricao || t.descricao ? (n(), s("div", {
814
+ ], 4)) : g("", !0),
815
+ f.$slots.descricao || t.descricao ? (l(), s("div", {
797
816
  key: 1,
798
817
  class: "nc-centro-desc",
799
- style: y({ color: r(o).muted })
818
+ style: h({ color: a(o).muted })
800
819
  }, [
801
- C(u.$slots, "descricao", {}, () => [
802
- O($(t.descricao), 1)
820
+ F(f.$slots, "descricao", {}, () => [
821
+ X(A(t.descricao), 1)
803
822
  ], !0)
804
- ], 4)) : f("", !0)
805
- ])) : f("", !0)
823
+ ], 4)) : g("", !0)
824
+ ])) : g("", !0)
806
825
  ])
807
826
  ])
808
827
  ]),
809
- u.$slots.footer ? (n(), s("div", he, [
810
- C(u.$slots, "footer", {}, void 0, !0)
811
- ])) : f("", !0)
828
+ f.$slots.footer ? (l(), s("div", Re, [
829
+ F(f.$slots, "footer", {}, void 0, !0)
830
+ ])) : g("", !0)
812
831
  ], 6));
813
832
  }
814
- }, ve = /* @__PURE__ */ et(xe, [["__scopeId", "data-v-227dd705"]]), $e = { class: "card-barra__header flex flex-column" }, Se = { class: "card-barra__topo flex align-items-start justify-content-between gap-3" }, ke = {
833
+ }, Ee = /* @__PURE__ */ at(Te, [["__scopeId", "data-v-2a65258f"]]), qe = { class: "card-barra__header flex flex-column" }, Fe = { class: "card-barra__topo flex align-items-start justify-content-between gap-3" }, Le = {
815
834
  key: 0,
816
835
  class: "nc-legendas-flex flex flex-column"
817
- }, Be = {
836
+ }, ze = {
818
837
  key: 1,
819
838
  class: "nc-actions inline-flex align-items-center gap-2"
820
- }, Ae = ["innerHTML"], Ce = {
839
+ }, Me = ["innerHTML"], je = {
821
840
  key: 0,
822
841
  class: "card-barra__titulos mt-3 mb-2 flex flex-column"
823
- }, we = { class: "card-barra__chart flex-1" }, Re = {
842
+ }, He = { class: "card-barra__chart flex-1" }, Ve = {
824
843
  key: 0,
825
844
  class: "card-barra__footer mt-3"
826
- }, Ee = {
845
+ }, Ne = {
827
846
  __name: "CardBarra",
828
847
  props: {
829
848
  legenda: { type: String, default: null },
@@ -889,62 +908,68 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
889
908
  corHover: { type: String, default: null }
890
909
  },
891
910
  emits: ["botaoAcao", "exportado"],
892
- setup(t, { emit: v }) {
893
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), { formatar: S } = ut(e), j = tt(null), Q = it;
894
- async function Z() {
895
- await st(j.value, {
911
+ setup(t, { emit: m }) {
912
+ Vt((c) => ({
913
+ c9bf3d56: L.value
914
+ }));
915
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
916
+ async function R() {
917
+ await ct(w.value, {
896
918
  nomeArquivo: e.nomeArquivoExport,
897
919
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
898
- }), g("exportado");
920
+ }), i("exportado");
899
921
  }
900
- const T = w(() => `card-barra--${e.direcao}`), E = w(() => e.orientacao === "horizontal"), X = w(() => Array.isArray(e.series) && e.series.length > 0 ? e.series.map((a, m) => ({
901
- nome: a.nome ?? `Série ${m + 1}`,
902
- cor: a.cor || e.cores[m % e.cores.length],
903
- dados: Array.isArray(a.dados) ? a.dados : []
904
- })) : [{ nome: e.legenda || "Valores", cor: e.corDetalhes, dados: e.data }]), I = w(() => {
905
- const a = X.value[0];
906
- return a ? a.dados.map((m) => m.rotulo) : [];
907
- }), K = w(() => {
908
- const a = X.value, m = a.length - 1, l = typeof e.larguraBarra == "number" ? e.larguraBarra : Number(e.larguraBarra) || 0.6, p = e.raioBarra, b = E.value;
909
- function q(B) {
910
- if (!e.empilhado || a.length === 1) return p;
911
- const A = B === 0, k = B === m;
912
- return b ? {
913
- topLeft: A ? p : 0,
914
- bottomLeft: A ? p : 0,
915
- topRight: k ? p : 0,
916
- bottomRight: k ? p : 0
922
+ const q = z(() => `card-barra--${e.direcao}`), L = z(
923
+ () => typeof e.height == "number" ? `${e.height}px` : e.height
924
+ ), Q = z(() => e.orientacao === "horizontal"), W = z(() => Array.isArray(e.series) && e.series.length > 0 ? e.series.map((c, u) => ({
925
+ nome: c.nome ?? `Série ${u + 1}`,
926
+ cor: c.cor || e.cores[u % e.cores.length],
927
+ dados: Array.isArray(c.dados) ? c.dados : []
928
+ })) : [{ nome: e.legenda || "Valores", cor: e.corDetalhes, dados: e.data }]), K = z(() => {
929
+ const c = W.value[0];
930
+ return c ? c.dados.map((u) => u.rotulo) : [];
931
+ }), _ = z(() => {
932
+ const c = W.value, u = c.length - 1, n = typeof e.larguraBarra == "number" ? e.larguraBarra : Number(e.larguraBarra) || 0.6, y = e.raioBarra, v = Q.value;
933
+ function j(E) {
934
+ if (!e.empilhado || c.length === 1) return y;
935
+ const B = E === 0, k = E === u;
936
+ return v ? {
937
+ topLeft: B ? y : 0,
938
+ bottomLeft: B ? y : 0,
939
+ topRight: k ? y : 0,
940
+ bottomRight: k ? y : 0
917
941
  } : {
918
- bottomLeft: A ? p : 0,
919
- bottomRight: A ? p : 0,
920
- topLeft: k ? p : 0,
921
- topRight: k ? p : 0
942
+ bottomLeft: B ? y : 0,
943
+ bottomRight: B ? y : 0,
944
+ topLeft: k ? y : 0,
945
+ topRight: k ? y : 0
922
946
  };
923
947
  }
924
948
  return {
925
- labels: I.value,
926
- datasets: a.map((B, A) => ({
927
- label: B.nome,
928
- data: B.dados.map((k) => k.quantidade),
929
- backgroundColor: D(B.cor, 0.72),
930
- hoverBackgroundColor: e.corHover || B.cor,
949
+ labels: K.value,
950
+ datasets: c.map((E, B) => ({
951
+ label: E.nome,
952
+ data: E.dados.map((k) => k.quantidade),
953
+ previstos: E.dados.map((k) => k.previsto != null ? k.previsto : null),
954
+ backgroundColor: N(E.cor, 0.72),
955
+ hoverBackgroundColor: e.corHover || E.cor,
931
956
  borderWidth: 0,
932
- borderRadius: q(A),
957
+ borderRadius: j(B),
933
958
  borderSkipped: !1,
934
959
  categoryPercentage: 1,
935
- barPercentage: l
960
+ barPercentage: n
936
961
  }))
937
962
  };
938
963
  });
939
- function _(a, m) {
940
- m ? Object.assign(a.style, {
964
+ function f(c, u) {
965
+ u ? Object.assign(c.style, {
941
966
  top: "-5px",
942
967
  bottom: "auto",
943
968
  borderTop: "1px solid rgba(15,23,42,.06)",
944
969
  borderLeft: "1px solid rgba(15,23,42,.06)",
945
970
  borderRight: "none",
946
971
  borderBottom: "none"
947
- }) : Object.assign(a.style, {
972
+ }) : Object.assign(c.style, {
948
973
  bottom: "-5px",
949
974
  top: "auto",
950
975
  borderRight: "1px solid rgba(15,23,42,.06)",
@@ -953,57 +978,68 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
953
978
  borderLeft: "none"
954
979
  });
955
980
  }
956
- let u = null;
957
- function F(a) {
958
- const { chart: m, tooltip: l } = a, p = ot(m);
959
- if (!p) return;
960
- const b = gt(p, { caretFlexivel: !0 });
961
- if (l.opacity === 0 || u) {
962
- b.style.opacity = "0";
981
+ let T = null;
982
+ function M(c) {
983
+ var kt, Ct;
984
+ const { chart: u, tooltip: n } = c, y = rt(u);
985
+ if (!y) return;
986
+ const v = gt(y, { caretFlexivel: !0 });
987
+ if (n.opacity === 0 || T) {
988
+ v.style.opacity = "0";
963
989
  return;
964
990
  }
965
- const q = l.title || [], B = l.dataPoints || [], A = b.querySelector(".nc-tt__content"), k = B.map((ct) => {
966
- var xt;
967
- const ht = ((xt = X.value[ct.datasetIndex]) == null ? void 0 : xt.cor) || e.corDetalhes, Ct = S(E.value ? ct.parsed.x : ct.parsed.y), wt = ct.dataset.label && X.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${ct.dataset.label}</span>` : "";
968
- return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ht};box-shadow:0 0 0 2px ${D(ht, 0.15)};flex:0 0 auto;"></span>` + wt + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${Ct}</span></div>`;
969
- }).join("");
970
- A.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${q.join(" ")}</div>` + k;
971
- const { offsetLeft: V, offsetTop: J } = m.canvas;
972
- b.style.opacity = "1", b.style.visibility = "hidden", b.style.left = "0px", b.style.top = "0px";
973
- const W = b.offsetWidth, z = b.offsetHeight, M = 4, U = V + l.caretX, G = J + l.caretY, L = at(U, W, p.clientWidth, M), N = W / 2, P = 14, ft = G - P - z, mt = ft < M, kt = mt ? G + P : ft, bt = b.querySelector(".nc-tt__caret");
974
- _(bt, mt);
975
- const Bt = U - (L - N), At = Math.max(10, Math.min(W - 10, Bt));
976
- bt.style.left = At + "px", b.style.left = L + "px", b.style.top = kt + "px", b.style.visibility = "visible";
991
+ const j = n.title || [], E = n.dataPoints || [], B = v.querySelector(".nc-tt__content"), k = E.map((et) => {
992
+ var At;
993
+ const ut = ((At = W.value[et.datasetIndex]) == null ? void 0 : At.cor) || e.corDetalhes, Lt = $(Q.value ? et.parsed.x : et.parsed.y), zt = et.dataset.label && W.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${et.dataset.label}</span>` : "";
994
+ return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ut};box-shadow:0 0 0 2px ${N(ut, 0.15)};flex:0 0 auto;"></span>` + zt + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${Lt}</span></div>`;
995
+ }).join(""), O = (kt = E[0]) == null ? void 0 : kt.dataIndex;
996
+ let Y = null;
997
+ if (O != null)
998
+ for (const et of u.data.datasets) {
999
+ const ut = (Ct = et.previstos) == null ? void 0 : Ct[O];
1000
+ if (ut != null) {
1001
+ Y = ut;
1002
+ break;
1003
+ }
1004
+ }
1005
+ const V = Y != null ? `<div style="display:flex;align-items:center;gap:6px;margin-top:6px;padding-top:4px;border-top:1px dashed rgba(15,23,42,.08);"><span style="font-size:11px;color:#64748B;margin-right:6px;">Previsto</span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${$(Y)}</span></div>` : "";
1006
+ B.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${j.join(" ")}</div>` + k + V;
1007
+ const { offsetLeft: I, offsetTop: tt } = u.canvas;
1008
+ v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
1009
+ const U = v.offsetWidth, H = v.offsetHeight, Z = 4, D = I + n.caretX, J = tt + n.caretY, bt = nt(D, U, y.clientWidth, Z), Tt = U / 2, xt = 14, vt = J - xt - H, $t = vt < Z, Et = $t ? J + xt : vt, St = v.querySelector(".nc-tt__caret");
1010
+ f(St, $t);
1011
+ const qt = D - (bt - Tt), Ft = Math.max(10, Math.min(U - 10, qt));
1012
+ St.style.left = Ft + "px", v.style.left = bt + "px", v.style.top = Et + "px", v.style.visibility = "visible";
977
1013
  }
978
- const H = w(() => {
979
- const a = E.value, m = {
1014
+ const G = z(() => {
1015
+ const c = Q.value, u = {
980
1016
  grid: { display: !1, drawBorder: !1 },
981
1017
  border: { display: !1 },
982
1018
  ticks: { color: o.value.muted, font: { size: 10, family: "'Inter', sans-serif" }, padding: 8 },
983
1019
  stacked: e.empilhado
984
- }, l = {
1020
+ }, n = {
985
1021
  display: !1,
986
1022
  grid: { display: !1 },
987
1023
  beginAtZero: !0,
988
1024
  stacked: e.empilhado,
989
- suggestedMax: d.value.length ? Math.max(...d.value.map((p) => p.valor)) : void 0
1025
+ suggestedMax: d.value.length ? Math.max(...d.value.map((y) => y.valor)) : void 0
990
1026
  };
991
1027
  return {
992
1028
  responsive: !0,
993
1029
  maintainAspectRatio: !1,
994
- indexAxis: a ? "y" : "x",
995
- interaction: { intersect: !1, mode: "index", axis: a ? "y" : "x" },
1030
+ indexAxis: c ? "y" : "x",
1031
+ interaction: { intersect: !1, mode: "index", axis: c ? "y" : "x" },
996
1032
  layout: {
997
1033
  padding: {
998
- top: d.value.length && !a ? 24 : 12,
999
- right: a ? 12 : 0,
1034
+ top: d.value.length && !c ? 24 : 12,
1035
+ right: c ? 12 : 0,
1000
1036
  bottom: 0,
1001
- left: d.value.length && a ? 60 : 0
1037
+ left: d.value.length && c ? 60 : 0
1002
1038
  }
1003
1039
  },
1004
1040
  plugins: {
1005
1041
  legend: {
1006
- display: e.mostrarLegendaSeries && X.value.length > 1,
1042
+ display: e.mostrarLegendaSeries && W.value.length > 1,
1007
1043
  position: "bottom",
1008
1044
  align: "start",
1009
1045
  labels: {
@@ -1018,94 +1054,94 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1018
1054
  },
1019
1055
  tooltip: {
1020
1056
  enabled: !1,
1021
- external: F,
1057
+ external: M,
1022
1058
  callbacks: {
1023
- title: (p) => {
1024
- var b;
1025
- return ((b = p[0]) == null ? void 0 : b.label) ?? "";
1059
+ title: (y) => {
1060
+ var v;
1061
+ return ((v = y[0]) == null ? void 0 : v.label) ?? "";
1026
1062
  },
1027
- label: (p) => S(a ? p.parsed.x : p.parsed.y)
1063
+ label: (y) => $(c ? y.parsed.x : y.parsed.y)
1028
1064
  }
1029
1065
  }
1030
1066
  },
1031
1067
  scales: {
1032
- x: a ? l : m,
1033
- y: a ? m : l
1068
+ x: c ? n : u,
1069
+ y: c ? u : n
1034
1070
  }
1035
1071
  };
1036
1072
  });
1037
- function Y() {
1038
- g("botaoAcao");
1073
+ function p() {
1074
+ i("botaoAcao");
1039
1075
  }
1040
- const d = w(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((m) => m && (typeof m == "number" || typeof m.valor == "number")).map((m) => typeof m == "number" ? { valor: m, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
1041
- valor: m.valor,
1042
- rotulo: m.rotulo ?? null,
1043
- cor: m.cor || "#0F172A",
1044
- corRotulo: m.corRotulo || m.cor || "#0F172A",
1045
- corTexto: m.corTexto || "#FFFFFF",
1046
- tracejado: m.tracejado || [6, 6],
1047
- espessura: m.espessura ?? 1
1048
- }) : []), i = [], c = {
1076
+ const d = z(() => e.linhasReferencia ? (Array.isArray(e.linhasReferencia) ? e.linhasReferencia : [e.linhasReferencia]).filter((u) => u && (typeof u == "number" || typeof u.valor == "number")).map((u) => typeof u == "number" ? { valor: u, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
1077
+ valor: u.valor,
1078
+ rotulo: u.rotulo ?? null,
1079
+ cor: u.cor || "#0F172A",
1080
+ corRotulo: u.corRotulo || u.cor || "#0F172A",
1081
+ corTexto: u.corTexto || "#FFFFFF",
1082
+ tracejado: u.tracejado || [6, 6],
1083
+ espessura: u.espessura ?? 1
1084
+ }) : []), r = [], b = {
1049
1085
  id: "linhaReferencia",
1050
- afterDatasetsDraw(a) {
1051
- const m = d.value;
1052
- if (i.length = 0, !m.length) return;
1053
- const { ctx: l, chartArea: p, scales: b } = a, q = E.value, B = q ? b.x : b.y;
1054
- B && m.forEach((A) => {
1055
- const k = B.getPixelForValue(A.valor);
1056
- if (i.push({ linha: A, pos: k, horizontal: q, chartArea: p }), l.save(), l.beginPath(), l.setLineDash(A.tracejado), l.lineWidth = A.espessura, l.strokeStyle = A.cor, q) {
1057
- if (k < p.left || k > p.right) {
1058
- l.restore();
1086
+ afterDatasetsDraw(c) {
1087
+ const u = d.value;
1088
+ if (r.length = 0, !u.length) return;
1089
+ const { ctx: n, chartArea: y, scales: v } = c, j = Q.value, E = j ? v.x : v.y;
1090
+ E && u.forEach((B) => {
1091
+ const k = E.getPixelForValue(B.valor);
1092
+ if (r.push({ linha: B, pos: k, horizontal: j, chartArea: y }), n.save(), n.beginPath(), n.setLineDash(B.tracejado), n.lineWidth = B.espessura, n.strokeStyle = B.cor, j) {
1093
+ if (k < y.left || k > y.right) {
1094
+ n.restore();
1059
1095
  return;
1060
1096
  }
1061
- l.moveTo(k, p.top), l.lineTo(k, p.bottom);
1097
+ n.moveTo(k, y.top), n.lineTo(k, y.bottom);
1062
1098
  } else {
1063
- if (k < p.top || k > p.bottom) {
1064
- l.restore();
1099
+ if (k < y.top || k > y.bottom) {
1100
+ n.restore();
1065
1101
  return;
1066
1102
  }
1067
- l.moveTo(p.left, k), l.lineTo(p.right, k);
1103
+ n.moveTo(y.left, k), n.lineTo(y.right, k);
1068
1104
  }
1069
- if (l.stroke(), l.setLineDash([]), A.rotulo) {
1070
- l.font = "600 11px 'Inter', sans-serif";
1071
- const V = 8, J = 5, z = l.measureText(A.rotulo).width, M = 12, U = z + V * 2, G = M + J * 2, L = G / 2;
1072
- let N, P;
1073
- q ? (N = k - U / 2, P = p.top - G - 6, P < 0 && (P = p.top + 6)) : (N = p.left - U - 6, P = k - G / 2, N < 0 && (N = p.left + 6)), l.fillStyle = A.corRotulo, l.beginPath(), l.roundRect ? l.roundRect(N, P, U, G, L) : (l.moveTo(N + L, P), l.lineTo(N + U - L, P), l.quadraticCurveTo(N + U, P, N + U, P + L), l.lineTo(N + U, P + G - L), l.quadraticCurveTo(N + U, P + G, N + U - L, P + G), l.lineTo(N + L, P + G), l.quadraticCurveTo(N, P + G, N, P + G - L), l.lineTo(N, P + L), l.quadraticCurveTo(N, P, N + L, P)), l.fill(), l.fillStyle = A.corTexto, l.textBaseline = "middle", l.textAlign = "center", l.fillText(A.rotulo, N + U / 2, P + G / 2);
1105
+ if (n.stroke(), n.setLineDash([]), B.rotulo) {
1106
+ n.font = "600 11px 'Inter', sans-serif";
1107
+ const O = 8, Y = 5, I = n.measureText(B.rotulo).width, tt = 12, U = I + O * 2, H = tt + Y * 2, Z = H / 2;
1108
+ let D, J;
1109
+ j ? (D = k - U / 2, J = y.top - H - 6, J < 0 && (J = y.top + 6)) : (D = y.left - U - 6, J = k - H / 2, D < 0 && (D = y.left + 6)), n.fillStyle = B.corRotulo, n.beginPath(), n.roundRect ? n.roundRect(D, J, U, H, Z) : (n.moveTo(D + Z, J), n.lineTo(D + U - Z, J), n.quadraticCurveTo(D + U, J, D + U, J + Z), n.lineTo(D + U, J + H - Z), n.quadraticCurveTo(D + U, J + H, D + U - Z, J + H), n.lineTo(D + Z, J + H), n.quadraticCurveTo(D, J + H, D, J + H - Z), n.lineTo(D, J + Z), n.quadraticCurveTo(D, J, D + Z, J)), n.fill(), n.fillStyle = B.corTexto, n.textBaseline = "middle", n.textAlign = "center", n.fillText(B.rotulo, D + U / 2, J + H / 2);
1074
1110
  }
1075
- l.restore();
1111
+ n.restore();
1076
1112
  });
1077
1113
  },
1078
- beforeEvent(a, m) {
1079
- if (!i.length) {
1080
- u = null;
1114
+ beforeEvent(c, u) {
1115
+ if (!r.length) {
1116
+ T = null;
1081
1117
  return;
1082
1118
  }
1083
- const l = m.event;
1084
- if (!l || l.type === "mouseout" || l.x == null || l.y == null) {
1085
- u = null;
1119
+ const n = u.event;
1120
+ if (!n || n.type === "mouseout" || n.x == null || n.y == null) {
1121
+ T = null;
1086
1122
  return;
1087
1123
  }
1088
- const p = 8;
1089
- let b = null, q = 1 / 0;
1090
- for (const B of i) {
1091
- const A = B.horizontal ? Math.abs(l.x - B.pos) : Math.abs(l.y - B.pos), k = B.horizontal ? l.y >= B.chartArea.top && l.y <= B.chartArea.bottom : l.x >= B.chartArea.left && l.x <= B.chartArea.right;
1092
- A <= p && k && A < q && (q = A, b = B);
1124
+ const y = 8;
1125
+ let v = null, j = 1 / 0;
1126
+ for (const E of r) {
1127
+ const B = E.horizontal ? Math.abs(n.x - E.pos) : Math.abs(n.y - E.pos), k = E.horizontal ? n.y >= E.chartArea.top && n.y <= E.chartArea.bottom : n.x >= E.chartArea.left && n.x <= E.chartArea.right;
1128
+ B <= y && k && B < j && (j = B, v = E);
1093
1129
  }
1094
- u = b;
1130
+ T = v;
1095
1131
  },
1096
- afterEvent(a, m) {
1097
- if (!i.length) return;
1098
- const l = m.event;
1099
- if (!l) return;
1100
- const p = ot(a);
1101
- if (!p) return;
1102
- let b = p.querySelector(".nc-tt-linhaRef");
1103
- if (!u) {
1104
- b && (b.style.opacity = "0");
1132
+ afterEvent(c, u) {
1133
+ if (!r.length) return;
1134
+ const n = u.event;
1135
+ if (!n) return;
1136
+ const y = rt(c);
1137
+ if (!y) return;
1138
+ let v = y.querySelector(".nc-tt-linhaRef");
1139
+ if (!T) {
1140
+ v && (v.style.opacity = "0");
1105
1141
  return;
1106
1142
  }
1107
- const q = u;
1108
- b || (b = document.createElement("div"), b.className = "nc-tt-linhaRef", Object.assign(b.style, {
1143
+ const j = T;
1144
+ v || (v = document.createElement("div"), v.className = "nc-tt-linhaRef", Object.assign(v.style, {
1109
1145
  position: "absolute",
1110
1146
  pointerEvents: "none",
1111
1147
  transform: "translate(-50%, calc(-100% - 12px))",
@@ -1120,119 +1156,119 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1120
1156
  zIndex: "11",
1121
1157
  fontFamily: "'Inter', sans-serif",
1122
1158
  textAlign: "left"
1123
- }), p.appendChild(b));
1124
- const B = q.linha.cor || "#0F172A", A = S(q.linha.valor), k = q.linha.rotulo;
1125
- b.innerHTML = (k ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${k}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${B};box-shadow:0 0 0 2px ${D(B, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${A}</span></div>`;
1126
- const V = a.canvas;
1127
- b.style.opacity = "1", b.style.visibility = "hidden", b.style.left = "0px", b.style.top = "0px";
1128
- const J = b.offsetWidth, W = b.offsetHeight, z = 4;
1129
- let M, U;
1130
- q.horizontal ? (M = V.offsetLeft + q.pos, U = V.offsetTop + l.y) : (M = V.offsetLeft + l.x, U = V.offsetTop + q.pos);
1131
- const G = at(M, J, p.clientWidth, z);
1132
- let L = U;
1133
- const N = W + 16 + z;
1134
- L < N && (L = N), b.style.left = G + "px", b.style.top = L + "px", b.style.visibility = "visible";
1159
+ }), y.appendChild(v));
1160
+ const E = j.linha.cor || "#0F172A", B = $(j.linha.valor), k = j.linha.rotulo;
1161
+ v.innerHTML = (k ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${k}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${E};box-shadow:0 0 0 2px ${N(E, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${B}</span></div>`;
1162
+ const O = c.canvas;
1163
+ v.style.opacity = "1", v.style.visibility = "hidden", v.style.left = "0px", v.style.top = "0px";
1164
+ const Y = v.offsetWidth, V = v.offsetHeight, I = 4;
1165
+ let tt, U;
1166
+ j.horizontal ? (tt = O.offsetLeft + j.pos, U = O.offsetTop + n.y) : (tt = O.offsetLeft + n.x, U = O.offsetTop + j.pos);
1167
+ const H = nt(tt, Y, y.clientWidth, I);
1168
+ let Z = U;
1169
+ const D = V + 16 + I;
1170
+ Z < D && (Z = D), v.style.left = H + "px", v.style.top = Z + "px", v.style.visibility = "visible";
1135
1171
  }
1136
- }, h = w(() => d.value.length ? [c] : []);
1137
- return (a, m) => (n(), s("div", {
1172
+ }, x = z(() => d.value.length ? [b] : []);
1173
+ return (c, u) => (l(), s("div", {
1138
1174
  ref_key: "cardRef",
1139
- ref: j,
1140
- class: rt(["card-barra p-4 flex", T.value]),
1141
- style: y(r(R))
1175
+ ref: w,
1176
+ class: lt(["card-barra p-4 flex", q.value]),
1177
+ style: h(a(C))
1142
1178
  }, [
1143
- x("div", $e, [
1144
- x("div", Se, [
1145
- a.$slots.legenda || t.legenda || a.$slots.sublegenda || t.sublegenda ? (n(), s("div", ke, [
1146
- a.$slots.legenda || t.legenda ? (n(), s("div", {
1179
+ S("div", qe, [
1180
+ S("div", Fe, [
1181
+ c.$slots.legenda || t.legenda || c.$slots.sublegenda || t.sublegenda ? (l(), s("div", Le, [
1182
+ c.$slots.legenda || t.legenda ? (l(), s("div", {
1147
1183
  key: 0,
1148
1184
  class: "text-xs font-medium",
1149
- style: y({ color: r(o).text, opacity: 0.85 })
1185
+ style: h({ color: a(o).text, opacity: 0.85 })
1150
1186
  }, [
1151
- C(a.$slots, "legenda", {}, () => [
1152
- O($(t.legenda), 1)
1187
+ F(c.$slots, "legenda", {}, () => [
1188
+ X(A(t.legenda), 1)
1153
1189
  ], !0)
1154
- ], 4)) : f("", !0),
1155
- a.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
1190
+ ], 4)) : g("", !0),
1191
+ c.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1156
1192
  key: 1,
1157
1193
  class: "text-xs",
1158
- style: y({ color: r(o).muted })
1194
+ style: h({ color: a(o).muted })
1159
1195
  }, [
1160
- C(a.$slots, "sublegenda", {}, () => [
1161
- O($(t.sublegenda), 1)
1196
+ F(c.$slots, "sublegenda", {}, () => [
1197
+ X(A(t.sublegenda), 1)
1162
1198
  ], !0)
1163
- ], 4)) : f("", !0)
1164
- ])) : f("", !0),
1165
- a.$slots.actions || t.botaoVisivel || t.exportar ? (n(), s("div", Be, [
1166
- C(a.$slots, "actions", {}, () => [
1167
- t.botaoVisivel ? (n(), s("button", {
1199
+ ], 4)) : g("", !0)
1200
+ ])) : g("", !0),
1201
+ c.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ze, [
1202
+ F(c.$slots, "actions", {}, () => [
1203
+ t.botaoVisivel ? (l(), s("button", {
1168
1204
  key: 0,
1169
1205
  class: "nc-btn inline-flex align-items-center",
1170
- style: y({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1171
- onClick: Y
1206
+ style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1207
+ onClick: p
1172
1208
  }, [
1173
- x("span", null, $(t.textoBotao), 1)
1174
- ], 4)) : f("", !0)
1209
+ S("span", null, A(t.textoBotao), 1)
1210
+ ], 4)) : g("", !0)
1175
1211
  ], !0),
1176
- t.exportar ? (n(), s("button", {
1212
+ t.exportar ? (l(), s("button", {
1177
1213
  key: 0,
1178
1214
  type: "button",
1179
1215
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1180
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1216
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
1181
1217
  title: "Exportar como imagem",
1182
1218
  "aria-label": "Exportar como imagem",
1183
- onClick: Z,
1184
- innerHTML: r(Q)
1185
- }, null, 12, Ae)) : f("", !0)
1186
- ])) : f("", !0)
1219
+ onClick: R,
1220
+ innerHTML: a(P)
1221
+ }, null, 12, Me)) : g("", !0)
1222
+ ])) : g("", !0)
1187
1223
  ]),
1188
- a.$slots.titulo || t.titulo || a.$slots.descricao || t.descricao ? (n(), s("div", Ce, [
1189
- a.$slots.titulo || t.titulo ? (n(), s("div", {
1224
+ c.$slots.titulo || t.titulo || c.$slots.descricao || t.descricao ? (l(), s("div", je, [
1225
+ c.$slots.titulo || t.titulo ? (l(), s("div", {
1190
1226
  key: 0,
1191
1227
  class: "m-0 text-3xl font-semibold",
1192
- style: y({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1228
+ style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1193
1229
  }, [
1194
- C(a.$slots, "titulo", {}, () => [
1195
- O($(t.titulo), 1)
1230
+ F(c.$slots, "titulo", {}, () => [
1231
+ X(A(t.titulo), 1)
1196
1232
  ], !0)
1197
- ], 4)) : f("", !0),
1198
- a.$slots.descricao || t.descricao ? (n(), s("div", {
1233
+ ], 4)) : g("", !0),
1234
+ c.$slots.descricao || t.descricao ? (l(), s("div", {
1199
1235
  key: 1,
1200
1236
  class: "text-sm mt-1",
1201
- style: y({ color: r(o).muted })
1237
+ style: h({ color: a(o).muted })
1202
1238
  }, [
1203
- C(a.$slots, "descricao", {}, () => [
1204
- O($(t.descricao), 1)
1239
+ F(c.$slots, "descricao", {}, () => [
1240
+ X(A(t.descricao), 1)
1205
1241
  ], !0)
1206
- ], 4)) : f("", !0)
1207
- ])) : f("", !0)
1242
+ ], 4)) : g("", !0)
1243
+ ])) : g("", !0)
1208
1244
  ]),
1209
- x("div", we, [
1210
- dt(lt, {
1245
+ S("div", He, [
1246
+ ft(st, {
1211
1247
  type: "bar",
1212
- data: K.value,
1213
- options: H.value,
1214
- plugins: h.value,
1215
- height: t.height
1216
- }, null, 8, ["data", "options", "plugins", "height"])
1248
+ data: _.value,
1249
+ options: G.value,
1250
+ plugins: x.value,
1251
+ height: "100%"
1252
+ }, null, 8, ["data", "options", "plugins"])
1217
1253
  ]),
1218
- a.$slots.footer ? (n(), s("div", Re, [
1219
- C(a.$slots, "footer", {}, void 0, !0)
1220
- ])) : f("", !0)
1254
+ c.$slots.footer ? (l(), s("div", Ve, [
1255
+ F(c.$slots, "footer", {}, void 0, !0)
1256
+ ])) : g("", !0)
1221
1257
  ], 6));
1222
1258
  }
1223
- }, Fe = /* @__PURE__ */ et(Ee, [["__scopeId", "data-v-6c196222"]]), Te = { class: "card-polar__topo flex align-items-start justify-content-between gap-3" }, qe = {
1259
+ }, Pe = /* @__PURE__ */ at(Ne, [["__scopeId", "data-v-474043e8"]]), De = { class: "card-polar__topo flex align-items-start justify-content-between gap-3" }, Ie = {
1224
1260
  key: 0,
1225
1261
  class: "nc-legendas-flex flex flex-column"
1226
- }, Le = {
1262
+ }, We = {
1227
1263
  key: 1,
1228
1264
  class: "nc-actions inline-flex align-items-center gap-2"
1229
- }, ze = ["innerHTML"], je = { class: "card-polar__corpo flex align-items-center gap-4" }, He = { class: "nc-tabela flex flex-column" }, Ve = { class: "nc-tabela-valor" }, Me = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, Ne = { class: "nc-tabela-valor" }, De = { class: "card-polar__chart-wrap flex align-items-center justify-content-center" }, Pe = { class: "card-polar__chart" }, Oe = {
1265
+ }, Oe = ["innerHTML"], Xe = { class: "card-polar__corpo flex align-items-center" }, Ye = { class: "nc-tabela flex flex-column" }, Je = { class: "nc-tabela-valor" }, Qe = { class: "nc-tabela-rotulo inline-flex align-items-center gap-2" }, Ue = { class: "nc-tabela-valor" }, Ge = { class: "card-polar__chart-wrap flex align-items-center justify-content-center" }, Ze = { class: "card-polar__chart" }, Ke = {
1230
1266
  key: 0,
1231
1267
  class: "card-polar__centro-bottom"
1232
- }, We = {
1268
+ }, _e = {
1233
1269
  key: 0,
1234
1270
  class: "card-polar__footer mt-3"
1235
- }, Ie = {
1271
+ }, to = {
1236
1272
  __name: "CardPolar",
1237
1273
  props: {
1238
1274
  legenda: { type: String, default: null },
@@ -1245,10 +1281,7 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1245
1281
  corBorda: { type: String, default: "#EAE8E8" },
1246
1282
  borderRadius: { type: [String, Number], default: "0.75rem" },
1247
1283
  sombra: { type: String, default: "0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06)" },
1248
- cores: {
1249
- type: Array,
1250
- default: () => ["#0A1A6B", "#1535B5", "#1A5FD4", "#2F8DDF", "#5BB1E8", "#93D0F0", "#CDEAF6"]
1251
- },
1284
+ corDetalhes: { type: String, default: "#3B82F6" },
1252
1285
  textoBotao: { type: String, default: "Ver mais" },
1253
1286
  botaoVisivel: { type: Boolean, default: !1 },
1254
1287
  direcao: {
@@ -1284,46 +1317,47 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1284
1317
  nomeArquivoExport: { type: String, default: "card-polar.png" }
1285
1318
  },
1286
1319
  emits: ["botaoAcao", "exportado"],
1287
- setup(t, { emit: v }) {
1288
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), { formatar: S } = ut(e), j = tt(null), Q = it;
1289
- async function Z() {
1290
- await st(j.value, {
1320
+ setup(t, { emit: m }) {
1321
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
1322
+ async function R() {
1323
+ await ct(w.value, {
1291
1324
  nomeArquivo: e.nomeArquivoExport,
1292
1325
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1293
- }), g("exportado");
1326
+ }), i("exportado");
1294
1327
  }
1295
- const T = w(() => `card-polar--${e.direcao}`), E = w(
1296
- () => e.data.map((u, F) => e.cores[F % e.cores.length])
1297
- ), X = w(() => ({
1298
- labels: e.data.map((u) => u.rotulo),
1328
+ const q = z(() => `card-polar--${e.direcao}`), L = z(() => {
1329
+ const f = ht(e.corDetalhes, e.data.length);
1330
+ return e.data.map((T, M) => T.cor ?? f[M]);
1331
+ }), Q = z(() => ({
1332
+ labels: e.data.map((f) => f.rotulo),
1299
1333
  datasets: [
1300
1334
  {
1301
- data: e.data.map((u) => u.quantidade),
1302
- backgroundColor: E.value,
1303
- borderColor: E.value,
1335
+ data: e.data.map((f) => f.quantidade),
1336
+ backgroundColor: L.value,
1337
+ borderColor: L.value,
1304
1338
  borderWidth: 0,
1305
1339
  hoverOffset: 6
1306
1340
  }
1307
1341
  ]
1308
1342
  }));
1309
- function I(u) {
1310
- const { chart: F, tooltip: H } = u, Y = ot(F);
1311
- if (!Y) return;
1312
- const d = gt(Y);
1313
- if (H.opacity === 0) {
1314
- d.style.opacity = "0";
1343
+ function W(f) {
1344
+ const { chart: T, tooltip: M } = f, G = rt(T);
1345
+ if (!G) return;
1346
+ const p = gt(G);
1347
+ if (M.opacity === 0) {
1348
+ p.style.opacity = "0";
1315
1349
  return;
1316
1350
  }
1317
- const i = H.title || [], c = H.dataPoints && H.dataPoints[0], h = c ? E.value[c.dataIndex] : "#3B82F6", a = c ? S(c.parsed.r ?? c.parsed) : "", m = d.querySelector(".nc-tt__content");
1318
- m.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${i.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${h};box-shadow:0 0 0 2px ${D(h, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${a}</span></div>`;
1319
- const { offsetLeft: l, offsetTop: p } = F.canvas;
1320
- d.style.opacity = "1", d.style.visibility = "hidden", d.style.left = "0px", d.style.top = "0px";
1321
- const b = d.offsetWidth, q = d.offsetHeight, B = 4, A = at(l + H.caretX, b, Y.clientWidth, B);
1322
- let k = p + H.caretY;
1323
- const V = q + 16 + B;
1324
- k < V && (k = V), d.style.left = A + "px", d.style.top = k + "px", d.style.visibility = "visible";
1351
+ const d = M.title || [], r = M.dataPoints && M.dataPoints[0], b = r ? L.value[r.dataIndex] : "#3B82F6", x = r ? $(r.parsed.r ?? r.parsed) : "", c = p.querySelector(".nc-tt__content");
1352
+ c.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${d.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${b};box-shadow:0 0 0 2px ${N(b, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${x}</span></div>`;
1353
+ const { offsetLeft: u, offsetTop: n } = T.canvas;
1354
+ p.style.opacity = "1", p.style.visibility = "hidden", p.style.left = "0px", p.style.top = "0px";
1355
+ const y = p.offsetWidth, v = p.offsetHeight, j = 4, E = nt(u + M.caretX, y, G.clientWidth, j);
1356
+ let B = n + M.caretY;
1357
+ const k = v + 16 + j;
1358
+ B < k && (B = k), p.style.left = E + "px", p.style.top = B + "px", p.style.visibility = "visible";
1325
1359
  }
1326
- const K = w(() => ({
1360
+ const K = z(() => ({
1327
1361
  responsive: !0,
1328
1362
  maintainAspectRatio: !1,
1329
1363
  layout: { padding: 4 },
@@ -1333,11 +1367,11 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1333
1367
  ticks: { display: !1, backdropColor: "transparent" },
1334
1368
  grid: {
1335
1369
  display: e.mostrarLinhasGrade,
1336
- color: D(o.value.muted, 0.18)
1370
+ color: N(o.value.muted, 0.18)
1337
1371
  },
1338
1372
  angleLines: {
1339
1373
  display: e.mostrarLinhasGrade,
1340
- color: D(o.value.muted, 0.18)
1374
+ color: N(o.value.muted, 0.18)
1341
1375
  },
1342
1376
  pointLabels: { display: !1 }
1343
1377
  }
@@ -1346,150 +1380,153 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1346
1380
  legend: { display: !1 },
1347
1381
  tooltip: {
1348
1382
  enabled: !1,
1349
- external: I,
1383
+ external: W,
1350
1384
  callbacks: {
1351
- title: (u) => {
1352
- var F;
1353
- return ((F = u[0]) == null ? void 0 : F.label) ?? "";
1385
+ title: (f) => {
1386
+ var T;
1387
+ return ((T = f[0]) == null ? void 0 : T.label) ?? "";
1354
1388
  },
1355
- label: (u) => {
1356
- var F;
1357
- return S(((F = u.parsed) == null ? void 0 : F.r) ?? u.parsed);
1389
+ label: (f) => {
1390
+ var T;
1391
+ return $(((T = f.parsed) == null ? void 0 : T.r) ?? f.parsed);
1358
1392
  }
1359
1393
  }
1360
1394
  }
1361
1395
  }
1362
1396
  }));
1363
1397
  function _() {
1364
- g("botaoAcao");
1398
+ i("botaoAcao");
1365
1399
  }
1366
- return (u, F) => (n(), s("div", {
1400
+ return (f, T) => (l(), s("div", {
1367
1401
  ref_key: "cardRef",
1368
- ref: j,
1369
- class: rt(["card-polar p-4 flex flex-column", T.value]),
1370
- style: y(r(R))
1402
+ ref: w,
1403
+ class: lt(["card-polar p-4 flex flex-column", q.value]),
1404
+ style: h(a(C))
1371
1405
  }, [
1372
- x("div", Te, [
1373
- u.$slots.legenda || t.legenda || u.$slots.sublegenda || t.sublegenda ? (n(), s("div", qe, [
1374
- u.$slots.legenda || t.legenda ? (n(), s("div", {
1406
+ S("div", De, [
1407
+ f.$slots.legenda || t.legenda || f.$slots.sublegenda || t.sublegenda ? (l(), s("div", Ie, [
1408
+ f.$slots.legenda || t.legenda ? (l(), s("div", {
1375
1409
  key: 0,
1376
1410
  class: "text-xs font-medium",
1377
- style: y({ color: r(o).text, opacity: 0.95 })
1411
+ style: h({ color: a(o).text, opacity: 0.95 })
1378
1412
  }, [
1379
- C(u.$slots, "legenda", {}, () => [
1380
- O($(t.legenda), 1)
1413
+ F(f.$slots, "legenda", {}, () => [
1414
+ X(A(t.legenda), 1)
1381
1415
  ], !0)
1382
- ], 4)) : f("", !0),
1383
- u.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
1416
+ ], 4)) : g("", !0),
1417
+ f.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1384
1418
  key: 1,
1385
1419
  class: "text-xs",
1386
- style: y({ color: r(o).muted })
1420
+ style: h({ color: a(o).muted })
1387
1421
  }, [
1388
- C(u.$slots, "sublegenda", {}, () => [
1389
- O($(t.sublegenda), 1)
1422
+ F(f.$slots, "sublegenda", {}, () => [
1423
+ X(A(t.sublegenda), 1)
1390
1424
  ], !0)
1391
- ], 4)) : f("", !0)
1392
- ])) : f("", !0),
1393
- u.$slots.actions || t.botaoVisivel || t.exportar ? (n(), s("div", Le, [
1394
- C(u.$slots, "actions", {}, () => [
1395
- t.botaoVisivel ? (n(), s("button", {
1425
+ ], 4)) : g("", !0)
1426
+ ])) : g("", !0),
1427
+ f.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", We, [
1428
+ F(f.$slots, "actions", {}, () => [
1429
+ t.botaoVisivel ? (l(), s("button", {
1396
1430
  key: 0,
1397
1431
  class: "nc-btn inline-flex align-items-center",
1398
- style: y({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1432
+ style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1399
1433
  onClick: _
1400
1434
  }, [
1401
- x("span", null, $(t.textoBotao), 1)
1402
- ], 4)) : f("", !0)
1435
+ S("span", null, A(t.textoBotao), 1)
1436
+ ], 4)) : g("", !0)
1403
1437
  ], !0),
1404
- t.exportar ? (n(), s("button", {
1438
+ t.exportar ? (l(), s("button", {
1405
1439
  key: 0,
1406
1440
  type: "button",
1407
1441
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1408
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1442
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
1409
1443
  title: "Exportar como imagem",
1410
1444
  "aria-label": "Exportar como imagem",
1411
- onClick: Z,
1412
- innerHTML: r(Q)
1413
- }, null, 12, ze)) : f("", !0)
1414
- ])) : f("", !0)
1445
+ onClick: R,
1446
+ innerHTML: a(P)
1447
+ }, null, 12, Oe)) : g("", !0)
1448
+ ])) : g("", !0)
1415
1449
  ]),
1416
- x("div", je, [
1417
- x("div", He, [
1418
- t.mostrarCabecalho ? (n(), s("div", {
1450
+ S("div", Xe, [
1451
+ S("div", Ye, [
1452
+ t.mostrarCabecalho ? (l(), s("div", {
1419
1453
  key: 0,
1420
1454
  class: "nc-tabela-cab flex align-items-center justify-content-between",
1421
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).muted, 0.25) })
1455
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).muted, 0.25) })
1422
1456
  }, [
1423
- x("span", null, $(t.rotuloCategoria), 1),
1424
- x("span", Ve, $(t.rotuloQuantidade), 1)
1425
- ], 4)) : f("", !0),
1426
- (n(!0), s(pt, null, yt(t.data, (H, Y) => (n(), s("div", {
1427
- key: Y,
1457
+ S("span", null, A(t.rotuloCategoria), 1),
1458
+ S("span", Je, A(t.rotuloQuantidade), 1)
1459
+ ], 4)) : g("", !0),
1460
+ (l(!0), s(mt, null, yt(t.data, (M, G) => (l(), s("div", {
1461
+ key: G,
1428
1462
  class: "nc-tabela-linha flex align-items-center justify-content-between",
1429
- style: y({ color: r(o).text })
1463
+ style: h({ color: a(o).text })
1430
1464
  }, [
1431
- x("span", Me, [
1432
- x("span", {
1465
+ S("span", Qe, [
1466
+ S("span", {
1433
1467
  class: "nc-bolinha",
1434
- style: y({ background: E.value[Y] })
1468
+ style: h({ background: L.value[G] })
1435
1469
  }, null, 4),
1436
- x("span", null, $(H.rotulo), 1)
1470
+ S("span", null, A(M.rotulo), 1)
1437
1471
  ]),
1438
- x("span", Ne, $(r(S)(H.quantidade)), 1)
1472
+ S("span", Ue, A(a($)(M.quantidade)), 1)
1439
1473
  ], 4))), 128))
1440
1474
  ]),
1441
- x("div", De, [
1442
- x("div", Pe, [
1443
- dt(lt, {
1475
+ S("div", Ge, [
1476
+ S("div", Ze, [
1477
+ ft(st, {
1444
1478
  type: "polarArea",
1445
- data: X.value,
1479
+ data: Q.value,
1446
1480
  options: K.value,
1447
1481
  height: t.height
1448
1482
  }, null, 8, ["data", "options", "height"]),
1449
- u.$slots.titulo || t.titulo || u.$slots.descricao || t.descricao ? (n(), s("div", Oe, [
1450
- u.$slots.titulo || t.titulo ? (n(), s("div", {
1483
+ f.$slots.titulo || t.titulo || f.$slots.descricao || t.descricao ? (l(), s("div", Ke, [
1484
+ f.$slots.titulo || t.titulo ? (l(), s("div", {
1451
1485
  key: 0,
1452
1486
  class: "card-polar__centro-titulo m-0 text-3xl font-semibold",
1453
- style: y({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1487
+ style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1454
1488
  }, [
1455
- C(u.$slots, "titulo", {}, () => [
1456
- O($(t.titulo), 1)
1489
+ F(f.$slots, "titulo", {}, () => [
1490
+ X(A(t.titulo), 1)
1457
1491
  ], !0)
1458
- ], 4)) : f("", !0),
1459
- u.$slots.descricao || t.descricao ? (n(), s("div", {
1492
+ ], 4)) : g("", !0),
1493
+ f.$slots.descricao || t.descricao ? (l(), s("div", {
1460
1494
  key: 1,
1461
1495
  class: "card-polar__centro-desc",
1462
- style: y({ color: r(o).muted })
1496
+ style: h({ color: a(o).muted })
1463
1497
  }, [
1464
- C(u.$slots, "descricao", {}, () => [
1465
- O($(t.descricao), 1)
1498
+ F(f.$slots, "descricao", {}, () => [
1499
+ X(A(t.descricao), 1)
1466
1500
  ], !0)
1467
- ], 4)) : f("", !0)
1468
- ])) : f("", !0)
1501
+ ], 4)) : g("", !0)
1502
+ ])) : g("", !0)
1469
1503
  ])
1470
1504
  ])
1471
1505
  ]),
1472
- u.$slots.footer ? (n(), s("div", We, [
1473
- C(u.$slots, "footer", {}, void 0, !0)
1474
- ])) : f("", !0)
1506
+ f.$slots.footer ? (l(), s("div", _e, [
1507
+ F(f.$slots, "footer", {}, void 0, !0)
1508
+ ])) : g("", !0)
1475
1509
  ], 6));
1476
1510
  }
1477
- }, Xe = /* @__PURE__ */ et(Ie, [["__scopeId", "data-v-9dc121fd"]]), Ye = { class: "card-progresso__topo flex align-items-start justify-content-between gap-3" }, Je = {
1511
+ }, eo = /* @__PURE__ */ at(to, [["__scopeId", "data-v-94cbf2b0"]]), oo = { class: "card-progresso__topo flex align-items-start justify-content-between gap-3" }, ao = {
1478
1512
  key: 0,
1479
1513
  class: "nc-legendas-flex flex flex-column"
1480
- }, Qe = {
1514
+ }, ro = {
1481
1515
  key: 1,
1482
1516
  class: "nc-actions inline-flex align-items-center gap-2"
1483
- }, Ue = ["innerHTML"], Ge = {
1517
+ }, no = ["innerHTML"], lo = {
1484
1518
  key: 0,
1485
1519
  class: "card-progresso__titulos mt-3 mb-2 flex flex-column"
1486
- }, Ze = { class: "card-progresso__corpo flex align-items-center gap-4 flex-wrap" }, Ke = {
1520
+ }, so = { class: "card-progresso__corpo flex align-items-center flex-wrap" }, io = {
1487
1521
  key: 0,
1488
1522
  class: "card-progresso__chart-wrap flex align-items-center justify-content-center"
1489
- }, _e = { class: "card-progresso__chart" }, to = { class: "nc-centro flex flex-column align-items-center justify-content-center" }, eo = { class: "card-progresso__lista flex flex-column" }, oo = { class: "card-progresso__item-cab flex align-items-center justify-content-between" }, ao = {
1523
+ }, co = { class: "card-progresso__chart" }, uo = { class: "nc-centro flex flex-column align-items-center justify-content-center" }, fo = { class: "card-progresso__lista flex flex-column" }, po = { class: "card-progresso__item-cab flex align-items-center justify-content-between" }, go = {
1524
+ key: 0,
1525
+ class: "card-progresso__item-valor inline-flex align-items-center gap-2"
1526
+ }, mo = { key: 0 }, yo = {
1490
1527
  key: 1,
1491
1528
  class: "card-progresso__footer mt-3"
1492
- }, ro = {
1529
+ }, ho = {
1493
1530
  __name: "CardProgresso",
1494
1531
  props: {
1495
1532
  legenda: { type: String, default: null },
@@ -1502,10 +1539,6 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1502
1539
  corBorda: { type: String, default: "#EAE8E8" },
1503
1540
  borderRadius: { type: [String, Number], default: "0.75rem" },
1504
1541
  sombra: { type: String, default: "0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06)" },
1505
- cores: {
1506
- type: Array,
1507
- default: () => ["#3B82F6", "#10B981", "#F59E0B", "#EF4444", "#8B5CF6", "#06B6D4", "#EC4899"]
1508
- },
1509
1542
  corDetalhes: { type: String, default: "#3B82F6" },
1510
1543
  corExcesso: { type: String, default: "#EF4444" },
1511
1544
  textoBotao: { type: String, default: "Ver mais" },
@@ -1547,41 +1580,42 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1547
1580
  nomeArquivoExport: { type: String, default: "card-progresso.png" }
1548
1581
  },
1549
1582
  emits: ["botaoAcao", "exportado"],
1550
- setup(t, { emit: v }) {
1551
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), { formatar: S } = ut(e), j = tt(null), Q = it;
1552
- async function Z() {
1553
- await st(j.value, {
1583
+ setup(t, { emit: m }) {
1584
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), { formatar: $ } = pt(e), w = ot(null), P = dt;
1585
+ async function R() {
1586
+ await ct(w.value, {
1554
1587
  nomeArquivo: e.nomeArquivoExport,
1555
1588
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1556
- }), g("exportado");
1589
+ }), i("exportado");
1557
1590
  }
1558
- const T = w(() => `card-progresso--${e.direcao}`), E = w(
1559
- () => e.data.map((i, c) => {
1560
- const h = Number(i.meta ?? e.metaPadrao) || 0, a = Number(i.quantidade) || 0, m = i.cor || e.cores[c % e.cores.length], l = i.modo === "reducao";
1561
- let p;
1562
- if (l) {
1563
- const b = Number(i.valor_referencia) || 0, q = b - h;
1564
- p = q > 0 ? Math.max(0, Math.min(100, (b - a) / q * 100)) : 0;
1591
+ const q = z(() => `card-progresso--${e.direcao}`), L = z(() => {
1592
+ const d = ht(e.corDetalhes, e.data.length);
1593
+ return e.data.map((r, b) => {
1594
+ const x = Number(r.meta ?? e.metaPadrao) || 0, c = Number(r.quantidade) || 0, u = r.cor ?? d[b], n = r.modo === "reducao";
1595
+ let y;
1596
+ if (n) {
1597
+ const v = Number(r.valor_referencia) || 0, j = v - x;
1598
+ y = j > 0 ? Math.max(0, Math.min(100, (v - c) / j * 100)) : 0;
1565
1599
  } else
1566
- p = h > 0 ? Math.max(0, Math.min(100, a / h * 100)) : 0;
1567
- return { rotulo: i.rotulo, quantidade: a, meta: h, valorReferencia: i.valor_referencia ?? null, cor: m, percentual: p, reducao: l };
1568
- })
1569
- ), X = w(
1600
+ y = x > 0 ? Math.max(0, Math.min(100, c / x * 100)) : 0;
1601
+ return { rotulo: r.rotulo, quantidade: c, meta: x, valorReferencia: r.valor_referencia ?? null, cor: u, percentual: y, reducao: n };
1602
+ });
1603
+ }), Q = z(
1570
1604
  () => typeof e.alturaBarra == "number" ? `${e.alturaBarra}px` : e.alturaBarra
1571
- ), I = w(
1605
+ ), W = z(
1572
1606
  () => typeof e.raioBarra == "number" ? `${e.raioBarra}px` : e.raioBarra
1573
- ), K = w(() => E.value.reduce((i, c) => i + c.quantidade, 0)), _ = w(() => E.value.reduce((i, c) => i + c.meta, 0)), u = w(() => {
1574
- if (!E.value.length) return 0;
1575
- const i = E.value.reduce((c, h) => c + h.meta, 0);
1576
- return i <= 0 ? 0 : E.value.reduce((c, h) => c + h.percentual * h.meta, 0) / i;
1577
- }), F = w(() => E.value.every((i) => i.reducao)), H = w(() => {
1578
- const i = Math.min(u.value, 100), c = Math.max(0, 100 - i), h = F.value ? e.corExcesso : e.corDetalhes;
1607
+ ), K = z(() => L.value.reduce((d, r) => d + r.quantidade, 0)), _ = z(() => L.value.reduce((d, r) => d + r.meta, 0)), f = z(() => {
1608
+ if (!L.value.length) return 0;
1609
+ const d = (b) => b.reducao && b.valorReferencia != null ? Math.max(0, Number(b.valorReferencia) - b.meta) : b.meta, r = L.value.reduce((b, x) => b + d(x), 0);
1610
+ return r <= 0 ? 0 : L.value.reduce((b, x) => b + x.percentual * d(x), 0) / r;
1611
+ }), T = z(() => L.value.every((d) => d.reducao)), M = z(() => {
1612
+ const d = Math.min(f.value, 100), r = Math.max(0, 100 - d), b = T.value ? e.corExcesso : e.corDetalhes;
1579
1613
  return {
1580
1614
  labels: ["Progresso", "Restante"],
1581
1615
  datasets: [
1582
1616
  {
1583
- data: [i, c],
1584
- backgroundColor: [h, D(o.value.muted, 0.15)],
1617
+ data: [d, r],
1618
+ backgroundColor: [b, N(o.value.muted, 0.15)],
1585
1619
  borderWidth: 0,
1586
1620
  borderColor: "transparent",
1587
1621
  hoverOffset: 0,
@@ -1589,7 +1623,7 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1589
1623
  }
1590
1624
  ]
1591
1625
  };
1592
- }), Y = w(() => ({
1626
+ }), G = z(() => ({
1593
1627
  responsive: !0,
1594
1628
  maintainAspectRatio: !1,
1595
1629
  cutout: e.cutout,
@@ -1601,174 +1635,171 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1601
1635
  tooltip: { enabled: !1 }
1602
1636
  }
1603
1637
  }));
1604
- function d() {
1605
- g("botaoAcao");
1638
+ function p() {
1639
+ i("botaoAcao");
1606
1640
  }
1607
- return (i, c) => (n(), s("div", {
1641
+ return (d, r) => (l(), s("div", {
1608
1642
  ref_key: "cardRef",
1609
- ref: j,
1610
- class: rt(["card-progresso p-4 flex flex-column", T.value]),
1611
- style: y(r(R))
1643
+ ref: w,
1644
+ class: lt(["card-progresso p-4 flex flex-column", q.value]),
1645
+ style: h(a(C))
1612
1646
  }, [
1613
- x("div", Ye, [
1614
- i.$slots.legenda || t.legenda || i.$slots.sublegenda || t.sublegenda ? (n(), s("div", Je, [
1615
- i.$slots.legenda || t.legenda ? (n(), s("div", {
1647
+ S("div", oo, [
1648
+ d.$slots.legenda || t.legenda || d.$slots.sublegenda || t.sublegenda ? (l(), s("div", ao, [
1649
+ d.$slots.legenda || t.legenda ? (l(), s("div", {
1616
1650
  key: 0,
1617
1651
  class: "text-xs font-medium",
1618
- style: y({ color: r(o).text, opacity: 0.95 })
1652
+ style: h({ color: a(o).text, opacity: 0.95 })
1619
1653
  }, [
1620
- C(i.$slots, "legenda", {}, () => [
1621
- O($(t.legenda), 1)
1654
+ F(d.$slots, "legenda", {}, () => [
1655
+ X(A(t.legenda), 1)
1622
1656
  ], !0)
1623
- ], 4)) : f("", !0),
1624
- i.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
1657
+ ], 4)) : g("", !0),
1658
+ d.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1625
1659
  key: 1,
1626
1660
  class: "text-xs",
1627
- style: y({ color: r(o).muted })
1661
+ style: h({ color: a(o).muted })
1628
1662
  }, [
1629
- C(i.$slots, "sublegenda", {}, () => [
1630
- O($(t.sublegenda), 1)
1663
+ F(d.$slots, "sublegenda", {}, () => [
1664
+ X(A(t.sublegenda), 1)
1631
1665
  ], !0)
1632
- ], 4)) : f("", !0)
1633
- ])) : f("", !0),
1634
- i.$slots.actions || t.botaoVisivel || t.exportar ? (n(), s("div", Qe, [
1635
- C(i.$slots, "actions", {}, () => [
1636
- t.botaoVisivel ? (n(), s("button", {
1666
+ ], 4)) : g("", !0)
1667
+ ])) : g("", !0),
1668
+ d.$slots.actions || t.botaoVisivel || t.exportar ? (l(), s("div", ro, [
1669
+ F(d.$slots, "actions", {}, () => [
1670
+ t.botaoVisivel ? (l(), s("button", {
1637
1671
  key: 0,
1638
1672
  class: "nc-btn inline-flex align-items-center",
1639
- style: y({ color: r(o).text, borderColor: r(D)(r(o).text, 0.18) }),
1640
- onClick: d
1673
+ style: h({ color: a(o).text, borderColor: a(N)(a(o).text, 0.18) }),
1674
+ onClick: p
1641
1675
  }, [
1642
- x("span", null, $(t.textoBotao), 1)
1643
- ], 4)) : f("", !0)
1676
+ S("span", null, A(t.textoBotao), 1)
1677
+ ], 4)) : g("", !0)
1644
1678
  ], !0),
1645
- t.exportar ? (n(), s("button", {
1679
+ t.exportar ? (l(), s("button", {
1646
1680
  key: 0,
1647
1681
  type: "button",
1648
1682
  class: "nc-exportar inline-flex align-items-center justify-content-center",
1649
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text, 0.18) }),
1683
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text, 0.18) }),
1650
1684
  title: "Exportar como imagem",
1651
1685
  "aria-label": "Exportar como imagem",
1652
- onClick: Z,
1653
- innerHTML: r(Q)
1654
- }, null, 12, Ue)) : f("", !0)
1655
- ])) : f("", !0)
1686
+ onClick: R,
1687
+ innerHTML: a(P)
1688
+ }, null, 12, no)) : g("", !0)
1689
+ ])) : g("", !0)
1656
1690
  ]),
1657
- i.$slots.titulo || t.titulo || i.$slots.descricao || t.descricao ? (n(), s("div", Ge, [
1658
- i.$slots.titulo || t.titulo ? (n(), s("div", {
1691
+ d.$slots.titulo || t.titulo || d.$slots.descricao || t.descricao ? (l(), s("div", lo, [
1692
+ d.$slots.titulo || t.titulo ? (l(), s("div", {
1659
1693
  key: 0,
1660
1694
  class: "m-0 text-3xl font-semibold",
1661
- style: y({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1695
+ style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1662
1696
  }, [
1663
- C(i.$slots, "titulo", {}, () => [
1664
- O($(t.titulo), 1)
1697
+ F(d.$slots, "titulo", {}, () => [
1698
+ X(A(t.titulo), 1)
1665
1699
  ], !0)
1666
- ], 4)) : f("", !0),
1667
- i.$slots.descricao || t.descricao ? (n(), s("div", {
1700
+ ], 4)) : g("", !0),
1701
+ d.$slots.descricao || t.descricao ? (l(), s("div", {
1668
1702
  key: 1,
1669
1703
  class: "text-sm mt-1",
1670
- style: y({ color: r(o).muted })
1704
+ style: h({ color: a(o).muted })
1671
1705
  }, [
1672
- C(i.$slots, "descricao", {}, () => [
1673
- O($(t.descricao), 1)
1706
+ F(d.$slots, "descricao", {}, () => [
1707
+ X(A(t.descricao), 1)
1674
1708
  ], !0)
1675
- ], 4)) : f("", !0)
1676
- ])) : f("", !0),
1677
- x("div", Ze, [
1678
- t.formato === "circular" ? (n(), s("div", Ke, [
1679
- x("div", _e, [
1680
- dt(lt, {
1709
+ ], 4)) : g("", !0)
1710
+ ])) : g("", !0),
1711
+ S("div", so, [
1712
+ t.formato === "circular" ? (l(), s("div", io, [
1713
+ S("div", co, [
1714
+ ft(st, {
1681
1715
  type: "doughnut",
1682
- data: H.value,
1683
- options: Y.value,
1716
+ data: M.value,
1717
+ options: G.value,
1684
1718
  height: t.height
1685
1719
  }, null, 8, ["data", "options", "height"]),
1686
- x("div", to, [
1687
- x("div", {
1720
+ S("div", uo, [
1721
+ S("div", {
1688
1722
  class: "nc-centro-titulo",
1689
- style: y({ color: F.value ? e.corExcesso : r(o).text })
1690
- }, $(Math.round(u.value)) + "% ", 5),
1691
- x("div", {
1723
+ style: h({ color: T.value ? e.corExcesso : a(o).text })
1724
+ }, A(Math.round(f.value)) + "% ", 5),
1725
+ S("div", {
1692
1726
  class: "nc-centro-desc",
1693
- style: y({ color: r(o).muted })
1694
- }, $(r(S)(K.value)) + " / " + $(r(S)(_.value)), 5)
1727
+ style: h({ color: a(o).muted })
1728
+ }, A(a($)(K.value)) + " / " + A(a($)(_.value)), 5)
1695
1729
  ])
1696
1730
  ])
1697
- ])) : f("", !0),
1698
- x("div", eo, [
1699
- (n(!0), s(pt, null, yt(E.value, (h, a) => (n(), s("div", {
1700
- key: a,
1731
+ ])) : g("", !0),
1732
+ S("div", fo, [
1733
+ (l(!0), s(mt, null, yt(L.value, (b, x) => (l(), s("div", {
1734
+ key: x,
1701
1735
  class: "card-progresso__item flex flex-column"
1702
1736
  }, [
1703
- x("div", oo, [
1704
- x("span", {
1737
+ S("div", po, [
1738
+ S("span", {
1705
1739
  class: "card-progresso__item-rotulo inline-flex align-items-center gap-2",
1706
- style: y({ color: r(o).text })
1740
+ style: h({ color: a(o).text })
1707
1741
  }, [
1708
- x("span", {
1742
+ S("span", {
1709
1743
  class: "nc-bolinha",
1710
- style: y({ background: h.cor })
1744
+ style: h({ background: b.cor })
1711
1745
  }, null, 4),
1712
- x("span", null, $(h.rotulo), 1)
1746
+ S("span", null, A(b.rotulo), 1),
1747
+ b.reducao ? (l(), s("span", {
1748
+ key: 0,
1749
+ class: "card-progresso__item-modo",
1750
+ style: h({ color: a(o).muted })
1751
+ }, "↓", 4)) : g("", !0)
1713
1752
  ], 4),
1714
- t.mostrarValor || t.mostrarPercentual ? (n(), s("span", {
1715
- key: 0,
1716
- class: "card-progresso__item-valor inline-flex align-items-baseline gap-2",
1717
- style: y({ color: r(o).text })
1718
- }, [
1719
- t.mostrarValor ? (n(), s(pt, { key: 0 }, [
1720
- O($(r(S)(h.quantidade)), 1),
1721
- h.meta ? (n(), s("span", {
1722
- key: 0,
1723
- style: y({ color: r(o).muted })
1724
- }, " / " + $(r(S)(h.meta)), 5)) : f("", !0),
1725
- h.reducao && h.valorReferencia != null ? (n(), s("span", {
1726
- key: 1,
1727
- class: "card-progresso__item-ref",
1728
- style: y({ color: r(o).muted })
1729
- }, " (ref: " + $(r(S)(h.valorReferencia)) + ")", 5)) : f("", !0)
1730
- ], 64)) : f("", !0),
1731
- t.mostrarPercentual ? (n(), s("span", {
1753
+ t.mostrarValor || t.mostrarPercentual ? (l(), s("span", go, [
1754
+ t.mostrarValor ? (l(), s("span", {
1755
+ key: 0,
1756
+ class: "card-progresso__item-nums",
1757
+ style: h({ color: a(o).muted })
1758
+ }, [
1759
+ X(A(a($)(b.quantidade)), 1),
1760
+ b.meta ? (l(), s("span", mo, " / " + A(a($)(b.meta)), 1)) : g("", !0)
1761
+ ], 4)) : g("", !0),
1762
+ t.mostrarPercentual ? (l(), s("span", {
1732
1763
  key: 1,
1733
1764
  class: "card-progresso__item-pct",
1734
- style: y({ color: h.reducao ? e.corExcesso : r(o).muted })
1735
- }, $(Math.round(h.percentual)) + "% ", 5)) : f("", !0)
1736
- ], 4)) : f("", !0)
1765
+ style: h({ background: a(N)(b.cor, 0.12), color: b.cor })
1766
+ }, A(Math.round(b.percentual)) + "% ", 5)) : g("", !0)
1767
+ ])) : g("", !0)
1737
1768
  ]),
1738
- x("div", {
1769
+ S("div", {
1739
1770
  class: "card-progresso__trilha w-full",
1740
- style: y({
1741
- height: X.value,
1742
- borderRadius: I.value,
1743
- background: h.reducao ? r(D)(e.corExcesso, 0.18) : r(D)(r(o).muted, 0.15)
1771
+ style: h({
1772
+ height: Q.value,
1773
+ borderRadius: W.value,
1774
+ background: b.reducao ? a(N)(e.corExcesso, 0.18) : a(N)(a(o).muted, 0.15)
1744
1775
  })
1745
1776
  }, [
1746
- x("div", {
1777
+ S("div", {
1747
1778
  class: "card-progresso__preenchimento",
1748
- style: y({ width: h.percentual + "%", background: h.cor, borderRadius: I.value })
1779
+ style: h({ width: b.percentual + "%", background: b.cor, borderRadius: W.value })
1749
1780
  }, null, 4)
1750
1781
  ], 4)
1751
1782
  ]))), 128))
1752
1783
  ])
1753
1784
  ]),
1754
- i.$slots.footer ? (n(), s("div", ao, [
1755
- C(i.$slots, "footer", {}, void 0, !0)
1756
- ])) : f("", !0)
1785
+ d.$slots.footer ? (l(), s("div", yo, [
1786
+ F(d.$slots, "footer", {}, void 0, !0)
1787
+ ])) : g("", !0)
1757
1788
  ], 6));
1758
1789
  }
1759
- }, lo = /* @__PURE__ */ et(ro, [["__scopeId", "data-v-0183d8c4"]]), no = {
1790
+ }, bo = /* @__PURE__ */ at(ho, [["__scopeId", "data-v-36cee8f0"]]), xo = {
1760
1791
  key: 0,
1761
1792
  class: "card-base__topo"
1762
- }, so = ["innerHTML"], io = { class: "card-base__legendas flex flex-column" }, co = {
1793
+ }, vo = ["innerHTML"], $o = { class: "card-base__legendas flex flex-column" }, So = {
1763
1794
  key: 1,
1764
1795
  class: "card-base__titulos flex flex-column"
1765
- }, uo = {
1796
+ }, ko = {
1766
1797
  key: 2,
1767
1798
  class: "card-base__acao flex"
1768
- }, fo = {
1799
+ }, Co = {
1769
1800
  key: 3,
1770
1801
  class: "card-base__footer"
1771
- }, po = {
1802
+ }, Ao = {
1772
1803
  __name: "CardBase",
1773
1804
  props: {
1774
1805
  legenda: { type: String, default: null },
@@ -1792,116 +1823,117 @@ const it = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1792
1823
  nomeArquivoExport: { type: String, default: "card-base.png" }
1793
1824
  },
1794
1825
  emits: ["botaoAcao", "exportado"],
1795
- setup(t, { emit: v }) {
1796
- const e = t, g = v, { palette: o, cardStyle: R } = nt(e), S = tt(null), j = it;
1797
- function Q() {
1798
- g("botaoAcao");
1826
+ setup(t, { emit: m }) {
1827
+ const e = t, i = m, { palette: o, cardStyle: C } = it(e), $ = ot(null), w = dt;
1828
+ function P() {
1829
+ i("botaoAcao");
1799
1830
  }
1800
- async function Z() {
1801
- await st(S.value, {
1831
+ async function R() {
1832
+ await ct($.value, {
1802
1833
  nomeArquivo: e.nomeArquivoExport,
1803
1834
  corFundo: o.value.bg !== "transparent" ? o.value.bg : null
1804
- }), g("exportado");
1835
+ }), i("exportado");
1805
1836
  }
1806
- return (T, E) => (n(), s("div", {
1837
+ return (q, L) => (l(), s("div", {
1807
1838
  ref_key: "cardRef",
1808
- ref: S,
1809
- class: rt(["card-base p-4 flex flex-column", `card-base--${t.alinhamento}`]),
1810
- style: y(r(R))
1839
+ ref: $,
1840
+ class: lt(["card-base flex flex-column", `card-base--${t.alinhamento}`]),
1841
+ style: h(a(C))
1811
1842
  }, [
1812
- t.exportar ? (n(), s("div", no, [
1813
- x("button", {
1843
+ t.exportar ? (l(), s("div", xo, [
1844
+ S("button", {
1814
1845
  type: "button",
1815
1846
  class: "nc-exportar card-base__exportar inline-flex align-items-center justify-content-center",
1816
- style: y({ color: r(o).muted, borderColor: r(D)(r(o).text === "inherit" ? "#0F172A" : r(o).text, 0.18) }),
1847
+ style: h({ color: a(o).muted, borderColor: a(N)(a(o).text === "inherit" ? "#0F172A" : a(o).text, 0.18) }),
1817
1848
  title: "Exportar como imagem",
1818
1849
  "aria-label": "Exportar como imagem",
1819
- onClick: Z,
1820
- innerHTML: r(j)
1821
- }, null, 12, so)
1822
- ])) : f("", !0),
1823
- x("div", io, [
1824
- T.$slots.legenda || t.legenda ? (n(), s("div", {
1850
+ onClick: R,
1851
+ innerHTML: a(w)
1852
+ }, null, 12, vo)
1853
+ ])) : g("", !0),
1854
+ S("div", $o, [
1855
+ q.$slots.legenda || t.legenda ? (l(), s("div", {
1825
1856
  key: 0,
1826
1857
  class: "card-base__legenda font-medium text-xs",
1827
- style: y({ color: r(o).text })
1858
+ style: h({ color: a(o).text })
1828
1859
  }, [
1829
- C(T.$slots, "legenda", {}, () => [
1830
- O($(t.legenda), 1)
1860
+ F(q.$slots, "legenda", {}, () => [
1861
+ X(A(t.legenda), 1)
1831
1862
  ], !0)
1832
- ], 4)) : f("", !0),
1833
- T.$slots.sublegenda || t.sublegenda ? (n(), s("div", {
1863
+ ], 4)) : g("", !0),
1864
+ q.$slots.sublegenda || t.sublegenda ? (l(), s("div", {
1834
1865
  key: 1,
1835
1866
  class: "card-base__sublegenda text-xs",
1836
- style: y({ color: r(o).muted })
1867
+ style: h({ color: a(o).muted })
1837
1868
  }, [
1838
- C(T.$slots, "sublegenda", {}, () => [
1839
- O($(t.sublegenda), 1)
1869
+ F(q.$slots, "sublegenda", {}, () => [
1870
+ X(A(t.sublegenda), 1)
1840
1871
  ], !0)
1841
- ], 4)) : f("", !0)
1872
+ ], 4)) : g("", !0)
1842
1873
  ]),
1843
- T.$slots.titulo || t.titulo || T.$slots.descricao || t.descricao ? (n(), s("div", co, [
1844
- T.$slots.titulo || t.titulo ? (n(), s("div", {
1874
+ q.$slots.titulo || t.titulo || q.$slots.descricao || t.descricao ? (l(), s("div", So, [
1875
+ q.$slots.titulo || t.titulo ? (l(), s("div", {
1845
1876
  key: 0,
1846
1877
  class: "card-base__titulo m-0 text-3xl font-semibold",
1847
- style: y({ color: r(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1878
+ style: h({ color: a(o).text, lineHeight: "33px", letterSpacing: "-1px" })
1848
1879
  }, [
1849
- C(T.$slots, "titulo", {}, () => [
1850
- O($(t.titulo), 1)
1880
+ F(q.$slots, "titulo", {}, () => [
1881
+ X(A(t.titulo), 1)
1851
1882
  ], !0)
1852
- ], 4)) : f("", !0),
1853
- T.$slots.descricao || t.descricao ? (n(), s("div", {
1883
+ ], 4)) : g("", !0),
1884
+ q.$slots.descricao || t.descricao ? (l(), s("div", {
1854
1885
  key: 1,
1855
1886
  class: "text-sm",
1856
- style: y({ color: r(o).muted })
1887
+ style: h({ color: a(o).muted })
1857
1888
  }, [
1858
- C(T.$slots, "descricao", {}, () => [
1859
- O($(t.descricao), 1)
1889
+ F(q.$slots, "descricao", {}, () => [
1890
+ X(A(t.descricao), 1)
1860
1891
  ], !0)
1861
- ], 4)) : f("", !0)
1862
- ])) : f("", !0),
1863
- T.$slots.acao || t.botaoVisivel ? (n(), s("div", uo, [
1864
- C(T.$slots, "acao", {}, () => [
1865
- t.botaoVisivel ? (n(), s("button", {
1892
+ ], 4)) : g("", !0)
1893
+ ])) : g("", !0),
1894
+ q.$slots.acao || t.botaoVisivel ? (l(), s("div", ko, [
1895
+ F(q.$slots, "acao", {}, () => [
1896
+ t.botaoVisivel ? (l(), s("button", {
1866
1897
  key: 0,
1867
1898
  type: "button",
1868
1899
  class: "card-base__link text-xs inline-flex align-items-center",
1869
- style: y({ color: r(o).text }),
1870
- onClick: Q
1900
+ style: h({ color: a(o).text }),
1901
+ onClick: P
1871
1902
  }, [
1872
- x("span", null, $(t.textoBotao), 1),
1873
- E[0] || (E[0] = x("span", {
1903
+ S("span", null, A(t.textoBotao), 1),
1904
+ L[0] || (L[0] = S("span", {
1874
1905
  class: "card-base__chevron",
1875
1906
  "aria-hidden": "true"
1876
1907
  }, "›", -1))
1877
- ], 4)) : f("", !0)
1908
+ ], 4)) : g("", !0)
1878
1909
  ], !0)
1879
- ])) : f("", !0),
1880
- T.$slots.footer ? (n(), s("div", fo, [
1881
- C(T.$slots, "footer", {}, void 0, !0)
1882
- ])) : f("", !0)
1910
+ ])) : g("", !0),
1911
+ q.$slots.footer ? (l(), s("div", Co, [
1912
+ F(q.$slots, "footer", {}, void 0, !0)
1913
+ ])) : g("", !0)
1883
1914
  ], 6));
1884
1915
  }
1885
- }, go = /* @__PURE__ */ et(po, [["__scopeId", "data-v-95d52049"]]), bo = {
1916
+ }, Bo = /* @__PURE__ */ at(Ao, [["__scopeId", "data-v-61091b7c"]]), To = {
1886
1917
  install(t) {
1887
- t.component("ChartBase", lt), t.component("CardBase", go), t.component("CardLinhas", le), t.component("CardPizza", ve), t.component("CardBarra", Fe), t.component("CardPolar", Xe), t.component("CardProgresso", lo);
1918
+ t.component("ChartBase", st), t.component("CardBase", Bo), t.component("CardLinhas", me), t.component("CardPizza", Ee), t.component("CardBarra", Pe), t.component("CardPolar", eo), t.component("CardProgresso", bo);
1888
1919
  }
1889
1920
  };
1890
1921
  export {
1891
- Fe as CardBarra,
1892
- go as CardBase,
1893
- le as CardLinhas,
1894
- ve as CardPizza,
1895
- Xe as CardPolar,
1896
- lo as CardProgresso,
1897
- lt as ChartBase,
1898
- it as ICONE_EXPORTAR_SVG,
1899
- at as clampHorizontal,
1922
+ Pe as CardBarra,
1923
+ Bo as CardBase,
1924
+ me as CardLinhas,
1925
+ Ee as CardPizza,
1926
+ eo as CardPolar,
1927
+ bo as CardProgresso,
1928
+ st as ChartBase,
1929
+ dt as ICONE_EXPORTAR_SVG,
1930
+ nt as clampHorizontal,
1900
1931
  gt as criarTooltipEl,
1901
- bo as default,
1902
- st as exportarElementoComoImagem,
1903
- ot as prepararTooltipParent,
1904
- D as toRgba,
1905
- ut as useFormatadorValor,
1906
- nt as useTema
1932
+ To as default,
1933
+ ct as exportarElementoComoImagem,
1934
+ ht as gerarPaleta,
1935
+ rt as prepararTooltipParent,
1936
+ N as toRgba,
1937
+ pt as useFormatadorValor,
1938
+ it as useTema
1907
1939
  };