nemesischart 2.0.4 → 2.0.6

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