@celke/kole-react 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/dist/components/Site/CabecalhoSecao.d.ts +18 -0
- package/dist/components/Site/CampoPesquisa.d.ts +15 -0
- package/dist/components/Site/CardConteudo.d.ts +28 -0
- package/dist/components/Site/CardDepoimento.d.ts +14 -0
- package/dist/components/Site/CardPlano.d.ts +22 -0
- package/dist/components/Site/CardRecurso.d.ts +22 -0
- package/dist/components/Site/ConteudoArtigo.d.ts +12 -0
- package/dist/components/Site/DestaqueSite.d.ts +27 -0
- package/dist/components/Site/EstruturaSite.d.ts +60 -0
- package/dist/components/Site/FaixaChamada.d.ts +14 -0
- package/dist/components/Site/FaixaNumeros.d.ts +20 -0
- package/dist/components/Site/FiltroPilulas.d.ts +17 -0
- package/dist/components/Site/ListaNumerada.d.ts +21 -0
- package/dist/components/Site/Newsletter.d.ts +16 -0
- package/dist/components/Site/SecaoSite.d.ts +15 -0
- package/dist/components/Site/SumarioPagina.d.ts +17 -0
- package/dist/components/Site/linkSite.d.ts +18 -0
- package/dist/estilos.css +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +910 -175
- package/dist/index.js.map +1 -1
- package/dist/tailwind.css +14 -0
- package/dist/tokens.css +28 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4593,7 +4593,10 @@ function Ha({ rotulo: e, dica: t, erro: n, aviso: r, obrigatorio: i, variante: a
|
|
|
4593
4593
|
msgId: v,
|
|
4594
4594
|
children: [/* @__PURE__ */ q("div", {
|
|
4595
4595
|
ref: x,
|
|
4596
|
-
className: Z("lp-sel", !b && "lp-ctl-frame", n && "is-invalid", f && "is-disabled"),
|
|
4596
|
+
className: Z("lp-sel", "lp-sel--lista", !b && "lp-ctl-frame", n && "is-invalid", f && "is-disabled"),
|
|
4597
|
+
onClick: (e) => {
|
|
4598
|
+
e.target !== e.currentTarget || f || (w ? P() : (F(), C.current?.focus()));
|
|
4599
|
+
},
|
|
4597
4600
|
children: [
|
|
4598
4601
|
u ? /* @__PURE__ */ K("input", {
|
|
4599
4602
|
ref: C,
|
|
@@ -6185,31 +6188,763 @@ function Fo({ valor: e = 0, max: t = 100, segmentos: n, cor: r = "pri", aparenci
|
|
|
6185
6188
|
});
|
|
6186
6189
|
}
|
|
6187
6190
|
//#endregion
|
|
6191
|
+
//#region src/components/Site/linkSite.tsx
|
|
6192
|
+
var Io = xt({}), Lo = Io.Provider;
|
|
6193
|
+
function Ro(e) {
|
|
6194
|
+
return e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey;
|
|
6195
|
+
}
|
|
6196
|
+
function zo() {
|
|
6197
|
+
let { aoNavegar: e, renderLink: t, aoNavegou: n } = Tt(Io);
|
|
6198
|
+
return (r, i, a, o) => {
|
|
6199
|
+
let s = {
|
|
6200
|
+
href: r,
|
|
6201
|
+
className: a,
|
|
6202
|
+
children: i,
|
|
6203
|
+
"aria-current": o?.atual ? "page" : void 0,
|
|
6204
|
+
onClick: (i) => {
|
|
6205
|
+
o?.aoClicar?.(), !Ro(i) && (e && !t && (i.preventDefault(), e(r)), n?.());
|
|
6206
|
+
}
|
|
6207
|
+
};
|
|
6208
|
+
return o?.rotulo && (s["aria-label"] = o.rotulo), t ? t(s) : /* @__PURE__ */ K("a", { ...s });
|
|
6209
|
+
};
|
|
6210
|
+
}
|
|
6211
|
+
//#endregion
|
|
6212
|
+
//#region src/components/Site/EstruturaSite.tsx
|
|
6213
|
+
var Bo = "lp-site-conteudo";
|
|
6214
|
+
function Vo(e, t, n) {
|
|
6215
|
+
return t === e || e !== "/" && e !== n && t.startsWith(`${e}/`);
|
|
6216
|
+
}
|
|
6217
|
+
function Ho(e, t, n) {
|
|
6218
|
+
if (t) return e.map((e) => e.rota).filter((e) => Vo(e, t, n)).sort((e, t) => t.length - e.length)[0];
|
|
6219
|
+
}
|
|
6220
|
+
function Uo({ marca: e, nav: t, rotaAtual: n, aoNavegar: r, renderLink: i, acoes: a, alternarTema: o = !0, aviso: s, avisoLateral: c, rodape: l, children: u, className: d }) {
|
|
6221
|
+
let [f, p] = X(!1);
|
|
6222
|
+
return /* @__PURE__ */ K(Lo, {
|
|
6223
|
+
value: {
|
|
6224
|
+
aoNavegar: r,
|
|
6225
|
+
renderLink: i,
|
|
6226
|
+
aoNavegou: () => p(!1)
|
|
6227
|
+
},
|
|
6228
|
+
children: /* @__PURE__ */ K(Wo, {
|
|
6229
|
+
marca: e,
|
|
6230
|
+
nav: t,
|
|
6231
|
+
rotaAtual: n,
|
|
6232
|
+
acoes: a,
|
|
6233
|
+
alternarTema: o,
|
|
6234
|
+
aviso: s,
|
|
6235
|
+
avisoLateral: c,
|
|
6236
|
+
rodape: l,
|
|
6237
|
+
menuAberto: f,
|
|
6238
|
+
setMenuAberto: p,
|
|
6239
|
+
className: d,
|
|
6240
|
+
children: u
|
|
6241
|
+
})
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6244
|
+
function Wo({ marca: e, nav: t, rotaAtual: n, acoes: r, alternarTema: i, aviso: a, avisoLateral: o, rodape: s, menuAberto: c, setMenuAberto: l, children: u, className: d }) {
|
|
6245
|
+
let f = zo(), p = ri(), [m, h] = X(!0), g = Ho(t, n, e.href ?? "/"), _ = (e) => t.map((t) => /* @__PURE__ */ K("li", { children: f(t.rota, t.rotulo, Z(e, t.rota === g && "is-ativo"), { atual: t.rota === g }) }, t.rota)), v = i && p ? /* @__PURE__ */ K("button", {
|
|
6246
|
+
type: "button",
|
|
6247
|
+
className: "lp-site-tema",
|
|
6248
|
+
onClick: p.alternarTema,
|
|
6249
|
+
"aria-label": p.escuro ? "Usar o tema claro" : "Usar o tema escuro",
|
|
6250
|
+
title: p.escuro ? "Tema claro" : "Tema escuro",
|
|
6251
|
+
children: /* @__PURE__ */ K(Q, { icone: p.escuro ? "sun" : "moon" })
|
|
6252
|
+
}) : null;
|
|
6253
|
+
return /* @__PURE__ */ K(ui, {
|
|
6254
|
+
value: {
|
|
6255
|
+
itens: [],
|
|
6256
|
+
link: (e, t, n) => f(e, t, n)
|
|
6257
|
+
},
|
|
6258
|
+
children: /* @__PURE__ */ q("div", {
|
|
6259
|
+
className: Z("lp-site", d),
|
|
6260
|
+
children: [
|
|
6261
|
+
/* @__PURE__ */ K("a", {
|
|
6262
|
+
className: "lp-site-pular",
|
|
6263
|
+
href: `#${Bo}`,
|
|
6264
|
+
children: "Pular para o conteúdo"
|
|
6265
|
+
}),
|
|
6266
|
+
a && /* @__PURE__ */ K("div", {
|
|
6267
|
+
className: "lp-site-aviso",
|
|
6268
|
+
children: /* @__PURE__ */ q("div", {
|
|
6269
|
+
className: "lp-site-aviso-in",
|
|
6270
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6271
|
+
className: "lp-site-aviso-tx",
|
|
6272
|
+
children: a
|
|
6273
|
+
}), o && /* @__PURE__ */ K("div", {
|
|
6274
|
+
className: "lp-site-aviso-lateral",
|
|
6275
|
+
children: o
|
|
6276
|
+
})]
|
|
6277
|
+
})
|
|
6278
|
+
}),
|
|
6279
|
+
/* @__PURE__ */ K("header", {
|
|
6280
|
+
className: "lp-site-topo",
|
|
6281
|
+
children: /* @__PURE__ */ q("div", {
|
|
6282
|
+
className: "lp-site-topo-in",
|
|
6283
|
+
children: [
|
|
6284
|
+
f(e.href ?? "/", /* @__PURE__ */ q(G, { children: [e.logo && m ? /* @__PURE__ */ K("img", {
|
|
6285
|
+
className: "lp-site-logo",
|
|
6286
|
+
src: e.logo,
|
|
6287
|
+
alt: "",
|
|
6288
|
+
onError: () => h(!1)
|
|
6289
|
+
}) : /* @__PURE__ */ K("span", {
|
|
6290
|
+
className: "lp-site-logo lp-site-logo--letra",
|
|
6291
|
+
"aria-hidden": "true",
|
|
6292
|
+
children: e.nome.slice(0, 1)
|
|
6293
|
+
}), /* @__PURE__ */ q("span", {
|
|
6294
|
+
className: "lp-site-marca-tx",
|
|
6295
|
+
children: [/* @__PURE__ */ q("span", {
|
|
6296
|
+
className: "lp-site-marca-nome",
|
|
6297
|
+
children: [e.nome, /* @__PURE__ */ K("span", {
|
|
6298
|
+
className: "lp-site-marca-ponto",
|
|
6299
|
+
children: "."
|
|
6300
|
+
})]
|
|
6301
|
+
}), e.subtitulo && /* @__PURE__ */ K("span", {
|
|
6302
|
+
className: "lp-site-marca-sub",
|
|
6303
|
+
children: e.subtitulo
|
|
6304
|
+
})]
|
|
6305
|
+
})] }), "lp-site-marca", { rotulo: `${e.nome}: página inicial` }),
|
|
6306
|
+
/* @__PURE__ */ K("nav", {
|
|
6307
|
+
className: "lp-site-nav",
|
|
6308
|
+
"aria-label": "Menu principal",
|
|
6309
|
+
children: /* @__PURE__ */ K("ul", { children: _("lp-site-nav-item") })
|
|
6310
|
+
}),
|
|
6311
|
+
/* @__PURE__ */ q("div", {
|
|
6312
|
+
className: "lp-site-acoes",
|
|
6313
|
+
children: [
|
|
6314
|
+
v,
|
|
6315
|
+
r && /* @__PURE__ */ K("div", {
|
|
6316
|
+
className: "lp-site-acoes-extra",
|
|
6317
|
+
children: r
|
|
6318
|
+
}),
|
|
6319
|
+
/* @__PURE__ */ K("button", {
|
|
6320
|
+
type: "button",
|
|
6321
|
+
className: "lp-site-menu",
|
|
6322
|
+
"aria-label": "Abrir o menu",
|
|
6323
|
+
"aria-expanded": c,
|
|
6324
|
+
onClick: () => l(!0),
|
|
6325
|
+
children: /* @__PURE__ */ K(Q, { icone: "menu" })
|
|
6326
|
+
})
|
|
6327
|
+
]
|
|
6328
|
+
})
|
|
6329
|
+
]
|
|
6330
|
+
})
|
|
6331
|
+
}),
|
|
6332
|
+
/* @__PURE__ */ q(ra, {
|
|
6333
|
+
aberto: c,
|
|
6334
|
+
aoFechar: () => l(!1),
|
|
6335
|
+
titulo: e.nome,
|
|
6336
|
+
aparencia: "lateral",
|
|
6337
|
+
tamanho: "pequeno",
|
|
6338
|
+
children: [/* @__PURE__ */ K("nav", {
|
|
6339
|
+
"aria-label": "Menu principal",
|
|
6340
|
+
children: /* @__PURE__ */ K("ul", {
|
|
6341
|
+
className: "lp-site-gaveta",
|
|
6342
|
+
children: _("lp-site-gaveta-item")
|
|
6343
|
+
})
|
|
6344
|
+
}), r && /* @__PURE__ */ K("div", {
|
|
6345
|
+
className: "lp-site-gaveta-acoes",
|
|
6346
|
+
children: r
|
|
6347
|
+
})]
|
|
6348
|
+
}),
|
|
6349
|
+
/* @__PURE__ */ K("main", {
|
|
6350
|
+
className: "lp-site-main",
|
|
6351
|
+
id: Bo,
|
|
6352
|
+
tabIndex: -1,
|
|
6353
|
+
children: u
|
|
6354
|
+
}),
|
|
6355
|
+
s
|
|
6356
|
+
]
|
|
6357
|
+
})
|
|
6358
|
+
});
|
|
6359
|
+
}
|
|
6360
|
+
function Go({ nome: e, descricao: t, colunas: n = [], extra: r, copyright: i, redes: a = [], className: o }) {
|
|
6361
|
+
let s = zo();
|
|
6362
|
+
return /* @__PURE__ */ q("footer", {
|
|
6363
|
+
className: Z("lp-site-rodape", o),
|
|
6364
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6365
|
+
className: "lp-site-rodape-in",
|
|
6366
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6367
|
+
className: Z("lp-site-rodape-marca", !!r && "lp-site-rodape-marca--larga"),
|
|
6368
|
+
children: [
|
|
6369
|
+
/* @__PURE__ */ q("div", {
|
|
6370
|
+
className: "lp-site-rodape-nome",
|
|
6371
|
+
children: [e, /* @__PURE__ */ K("span", {
|
|
6372
|
+
className: "lp-site-marca-ponto",
|
|
6373
|
+
children: "."
|
|
6374
|
+
})]
|
|
6375
|
+
}),
|
|
6376
|
+
t && /* @__PURE__ */ K("p", {
|
|
6377
|
+
className: "lp-site-rodape-desc",
|
|
6378
|
+
children: t
|
|
6379
|
+
}),
|
|
6380
|
+
r
|
|
6381
|
+
]
|
|
6382
|
+
}), n.map((e) => /* @__PURE__ */ q("nav", {
|
|
6383
|
+
className: "lp-site-rodape-col",
|
|
6384
|
+
"aria-label": e.titulo,
|
|
6385
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6386
|
+
className: "lp-site-rodape-titulo",
|
|
6387
|
+
children: e.titulo
|
|
6388
|
+
}), /* @__PURE__ */ K("ul", { children: e.links.map((e) => /* @__PURE__ */ K("li", { children: s(e.rota, e.rotulo, "lp-site-rodape-link") }, `${e.rota}-${e.rotulo}`)) })]
|
|
6389
|
+
}, e.titulo))]
|
|
6390
|
+
}), (i || a.length > 0) && /* @__PURE__ */ q("div", {
|
|
6391
|
+
className: "lp-site-rodape-base",
|
|
6392
|
+
children: [/* @__PURE__ */ K("span", { children: i }), a.length > 0 && /* @__PURE__ */ K("ul", {
|
|
6393
|
+
className: "lp-site-rodape-redes",
|
|
6394
|
+
"aria-label": "Redes sociais",
|
|
6395
|
+
children: a.map((e) => /* @__PURE__ */ K("li", { children: s(e.rota, e.rotulo, "lp-site-rodape-link") }, e.rotulo))
|
|
6396
|
+
})]
|
|
6397
|
+
})]
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
//#endregion
|
|
6401
|
+
//#region src/components/Site/SecaoSite.tsx
|
|
6402
|
+
function Ko({ children: e, fundo: t = "padrao", largura: n = "padrao", espaco: r = "medio", rotulo: i, className: a }) {
|
|
6403
|
+
return /* @__PURE__ */ K("section", {
|
|
6404
|
+
className: Z("lp-site-secao", `lp-site-secao--${t}`, `lp-site-secao--${r}`, n === "estreita" && "lp-site-secao--estreita", a),
|
|
6405
|
+
"aria-label": i,
|
|
6406
|
+
children: /* @__PURE__ */ K("div", {
|
|
6407
|
+
className: "lp-site-secao-in",
|
|
6408
|
+
children: e
|
|
6409
|
+
})
|
|
6410
|
+
});
|
|
6411
|
+
}
|
|
6412
|
+
//#endregion
|
|
6413
|
+
//#region src/components/Site/DestaqueSite.tsx
|
|
6414
|
+
function qo(e, t) {
|
|
6415
|
+
let n = t ? e.indexOf(t) : -1;
|
|
6416
|
+
return !t || n < 0 ? e : /* @__PURE__ */ q(G, { children: [
|
|
6417
|
+
e.slice(0, n),
|
|
6418
|
+
/* @__PURE__ */ K("span", {
|
|
6419
|
+
className: "lp-destaque-realce",
|
|
6420
|
+
children: t
|
|
6421
|
+
}),
|
|
6422
|
+
e.slice(n + t.length)
|
|
6423
|
+
] });
|
|
6424
|
+
}
|
|
6425
|
+
function Jo({ topo: e, titulo: t, realce: n, selo: r, sobretitulo: i, descricao: a, children: o, aparencia: s = "escuro", lateral: c, midia: l, nivel: u = 1, className: d }) {
|
|
6426
|
+
let f = u === 1 ? "h1" : "h2", p = s === "claro";
|
|
6427
|
+
return /* @__PURE__ */ q("section", {
|
|
6428
|
+
className: Z("lp-destaque", p && "lp-destaque--claro", d),
|
|
6429
|
+
children: [
|
|
6430
|
+
/* @__PURE__ */ K("div", {
|
|
6431
|
+
className: "lp-destaque-brilho",
|
|
6432
|
+
"aria-hidden": "true"
|
|
6433
|
+
}),
|
|
6434
|
+
/* @__PURE__ */ q("div", {
|
|
6435
|
+
className: Z("lp-destaque-in", !p && !!c && "lp-destaque-in--lateral"),
|
|
6436
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6437
|
+
className: "lp-destaque-texto",
|
|
6438
|
+
children: [
|
|
6439
|
+
e,
|
|
6440
|
+
r && /* @__PURE__ */ q("div", {
|
|
6441
|
+
className: "lp-destaque-selo",
|
|
6442
|
+
children: [/* @__PURE__ */ K("span", {
|
|
6443
|
+
className: "lp-destaque-selo-ponto",
|
|
6444
|
+
"aria-hidden": "true"
|
|
6445
|
+
}), r]
|
|
6446
|
+
}),
|
|
6447
|
+
i && /* @__PURE__ */ K("div", {
|
|
6448
|
+
className: "lp-destaque-sobre",
|
|
6449
|
+
children: i
|
|
6450
|
+
}),
|
|
6451
|
+
/* @__PURE__ */ K(f, {
|
|
6452
|
+
className: "lp-destaque-titulo",
|
|
6453
|
+
children: qo(t, n)
|
|
6454
|
+
}),
|
|
6455
|
+
a && /* @__PURE__ */ K("p", {
|
|
6456
|
+
className: "lp-destaque-desc",
|
|
6457
|
+
children: a
|
|
6458
|
+
}),
|
|
6459
|
+
o
|
|
6460
|
+
]
|
|
6461
|
+
}), !p && c && /* @__PURE__ */ K("div", {
|
|
6462
|
+
className: "lp-destaque-lateral",
|
|
6463
|
+
children: c
|
|
6464
|
+
})]
|
|
6465
|
+
}),
|
|
6466
|
+
p && l && /* @__PURE__ */ K("div", {
|
|
6467
|
+
className: "lp-destaque-midia",
|
|
6468
|
+
children: l
|
|
6469
|
+
})
|
|
6470
|
+
]
|
|
6471
|
+
});
|
|
6472
|
+
}
|
|
6473
|
+
//#endregion
|
|
6474
|
+
//#region src/components/Site/CampoPesquisa.tsx
|
|
6475
|
+
function Yo({ valor: e, aoMudar: t, aoPesquisar: n, placeholder: r = "Pesquisar", rotulo: i, rotuloBotao: a = "Buscar", aparencia: o = "padrao", className: s }) {
|
|
6476
|
+
let c = Et();
|
|
6477
|
+
return /* @__PURE__ */ q("form", {
|
|
6478
|
+
role: "search",
|
|
6479
|
+
className: Z("lp-pesquisa", `lp-pesquisa--${o}`, s),
|
|
6480
|
+
onSubmit: (t) => {
|
|
6481
|
+
t.preventDefault(), n?.(e.trim());
|
|
6482
|
+
},
|
|
6483
|
+
children: [
|
|
6484
|
+
/* @__PURE__ */ K("label", {
|
|
6485
|
+
className: "lp-sr",
|
|
6486
|
+
htmlFor: c,
|
|
6487
|
+
children: i ?? r
|
|
6488
|
+
}),
|
|
6489
|
+
/* @__PURE__ */ K(Q, {
|
|
6490
|
+
icone: "search",
|
|
6491
|
+
className: "lp-pesquisa-ic"
|
|
6492
|
+
}),
|
|
6493
|
+
/* @__PURE__ */ K("input", {
|
|
6494
|
+
id: c,
|
|
6495
|
+
className: "lp-pesquisa-input",
|
|
6496
|
+
type: "search",
|
|
6497
|
+
value: e,
|
|
6498
|
+
placeholder: r,
|
|
6499
|
+
onChange: (e) => t(e.target.value)
|
|
6500
|
+
}),
|
|
6501
|
+
/* @__PURE__ */ K("button", {
|
|
6502
|
+
type: "submit",
|
|
6503
|
+
className: "lp-pesquisa-botao",
|
|
6504
|
+
children: a
|
|
6505
|
+
})
|
|
6506
|
+
]
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6509
|
+
//#endregion
|
|
6510
|
+
//#region src/components/Site/CabecalhoSecao.tsx
|
|
6511
|
+
function Xo({ titulo: e, sobretitulo: t, descricao: n, acao: r, nivel: i = 2, tamanho: a = "secao", alinhamento: o = "inicio", className: s }) {
|
|
6512
|
+
let c = `h${i}`;
|
|
6513
|
+
return /* @__PURE__ */ q("div", {
|
|
6514
|
+
className: Z("lp-cab-secao", `lp-cab-secao--${a}`, o === "centro" && "lp-cab-secao--centro", s),
|
|
6515
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6516
|
+
className: "lp-cab-secao-tx",
|
|
6517
|
+
children: [
|
|
6518
|
+
t && /* @__PURE__ */ K("div", {
|
|
6519
|
+
className: "lp-cab-secao-sobre",
|
|
6520
|
+
children: t
|
|
6521
|
+
}),
|
|
6522
|
+
/* @__PURE__ */ K(c, {
|
|
6523
|
+
className: "lp-cab-secao-titulo",
|
|
6524
|
+
children: e
|
|
6525
|
+
}),
|
|
6526
|
+
n && /* @__PURE__ */ K("p", {
|
|
6527
|
+
className: "lp-cab-secao-desc",
|
|
6528
|
+
children: n
|
|
6529
|
+
})
|
|
6530
|
+
]
|
|
6531
|
+
}), r && /* @__PURE__ */ K("div", {
|
|
6532
|
+
className: "lp-cab-secao-acao",
|
|
6533
|
+
children: r
|
|
6534
|
+
})]
|
|
6535
|
+
});
|
|
6536
|
+
}
|
|
6537
|
+
//#endregion
|
|
6538
|
+
//#region src/components/Site/CardConteudo.tsx
|
|
6539
|
+
function Zo({ titulo: e, formato: t = "vertical", resumo: n, etiquetas: r, midia: i, rodape: a, lateral: o, href: s, aoClicar: c, nivel: l = 3, className: u }) {
|
|
6540
|
+
let d = zo(), f = `h${l}`, p = !!s || !!c, m = s ? d(s, e, "lp-cc-link", { aoClicar: c }) : c ? /* @__PURE__ */ K("button", {
|
|
6541
|
+
type: "button",
|
|
6542
|
+
className: "lp-cc-link",
|
|
6543
|
+
onClick: c,
|
|
6544
|
+
children: e
|
|
6545
|
+
}) : e;
|
|
6546
|
+
return /* @__PURE__ */ q("article", {
|
|
6547
|
+
className: Z("lp-cc", `lp-cc--${t}`, p && "lp-cc--acionavel", u),
|
|
6548
|
+
children: [
|
|
6549
|
+
i && /* @__PURE__ */ K("div", {
|
|
6550
|
+
className: "lp-cc-midia",
|
|
6551
|
+
children: i
|
|
6552
|
+
}),
|
|
6553
|
+
/* @__PURE__ */ q("div", {
|
|
6554
|
+
className: "lp-cc-corpo",
|
|
6555
|
+
children: [
|
|
6556
|
+
r && /* @__PURE__ */ K("div", {
|
|
6557
|
+
className: "lp-cc-etiquetas",
|
|
6558
|
+
children: r
|
|
6559
|
+
}),
|
|
6560
|
+
/* @__PURE__ */ K(f, {
|
|
6561
|
+
className: "lp-cc-titulo",
|
|
6562
|
+
children: m
|
|
6563
|
+
}),
|
|
6564
|
+
n && /* @__PURE__ */ K("p", {
|
|
6565
|
+
className: "lp-cc-resumo",
|
|
6566
|
+
children: n
|
|
6567
|
+
}),
|
|
6568
|
+
a && /* @__PURE__ */ K("div", {
|
|
6569
|
+
className: "lp-cc-rodape",
|
|
6570
|
+
children: a
|
|
6571
|
+
})
|
|
6572
|
+
]
|
|
6573
|
+
}),
|
|
6574
|
+
o && t === "linha" && /* @__PURE__ */ K("div", {
|
|
6575
|
+
className: "lp-cc-lateral",
|
|
6576
|
+
children: o
|
|
6577
|
+
})
|
|
6578
|
+
]
|
|
6579
|
+
});
|
|
6580
|
+
}
|
|
6581
|
+
//#endregion
|
|
6582
|
+
//#region src/components/Site/ListaNumerada.tsx
|
|
6583
|
+
function Qo({ itens: e, tamanho: t = "padrao", rotulo: n, className: r }) {
|
|
6584
|
+
let i = zo();
|
|
6585
|
+
return /* @__PURE__ */ K("ol", {
|
|
6586
|
+
className: Z("lp-lnum", `lp-lnum--${t}`, r),
|
|
6587
|
+
"aria-label": n,
|
|
6588
|
+
children: e.map((e, n) => /* @__PURE__ */ q("li", {
|
|
6589
|
+
className: "lp-lnum-item",
|
|
6590
|
+
children: [/* @__PURE__ */ K("span", {
|
|
6591
|
+
className: "lp-lnum-n",
|
|
6592
|
+
"aria-hidden": "true",
|
|
6593
|
+
children: t === "compacto" ? n + 1 : String(n + 1).padStart(2, "0")
|
|
6594
|
+
}), /* @__PURE__ */ q("span", {
|
|
6595
|
+
className: "lp-lnum-tx",
|
|
6596
|
+
children: [
|
|
6597
|
+
e.href ? i(e.href, e.titulo, "lp-lnum-titulo lp-lnum-titulo--link") : /* @__PURE__ */ K("span", {
|
|
6598
|
+
className: "lp-lnum-titulo",
|
|
6599
|
+
children: e.titulo
|
|
6600
|
+
}),
|
|
6601
|
+
e.descricao && /* @__PURE__ */ K("span", {
|
|
6602
|
+
className: "lp-lnum-desc",
|
|
6603
|
+
children: e.descricao
|
|
6604
|
+
}),
|
|
6605
|
+
e.detalhe && /* @__PURE__ */ K("span", {
|
|
6606
|
+
className: "lp-lnum-detalhe",
|
|
6607
|
+
children: e.detalhe
|
|
6608
|
+
})
|
|
6609
|
+
]
|
|
6610
|
+
})]
|
|
6611
|
+
}, e.id ?? e.titulo))
|
|
6612
|
+
});
|
|
6613
|
+
}
|
|
6614
|
+
//#endregion
|
|
6615
|
+
//#region src/components/Site/FiltroPilulas.tsx
|
|
6616
|
+
function $o({ opcoes: e, valor: t, aoMudar: n, rotulo: r, disposicao: i = "quebrar", alinhamento: a = "inicio", className: o }) {
|
|
6617
|
+
return /* @__PURE__ */ K("div", {
|
|
6618
|
+
className: Z("lp-pilulas", `lp-pilulas--${i}`, `lp-pilulas--${a}`, o),
|
|
6619
|
+
role: "group",
|
|
6620
|
+
"aria-label": r,
|
|
6621
|
+
children: e.map((e) => /* @__PURE__ */ K("button", {
|
|
6622
|
+
type: "button",
|
|
6623
|
+
className: "lp-pilula",
|
|
6624
|
+
"aria-pressed": e.valor === t,
|
|
6625
|
+
onClick: () => n(e.valor),
|
|
6626
|
+
children: e.rotulo
|
|
6627
|
+
}, e.valor))
|
|
6628
|
+
});
|
|
6629
|
+
}
|
|
6630
|
+
//#endregion
|
|
6631
|
+
//#region src/components/Site/CardRecurso.tsx
|
|
6632
|
+
function es({ titulo: e, children: t, icone: n, numero: r, sobretitulo: i, acao: a, formato: o = "vertical", nivel: s = 3, className: c }) {
|
|
6633
|
+
let l = `h${s}`;
|
|
6634
|
+
return /* @__PURE__ */ q("article", {
|
|
6635
|
+
className: Z("lp-recurso", `lp-recurso--${o}`, c),
|
|
6636
|
+
children: [n ? /* @__PURE__ */ K("span", {
|
|
6637
|
+
className: "lp-recurso-ic",
|
|
6638
|
+
"aria-hidden": "true",
|
|
6639
|
+
children: /* @__PURE__ */ K(Q, { icone: n })
|
|
6640
|
+
}) : r ? /* @__PURE__ */ K("span", {
|
|
6641
|
+
className: "lp-recurso-num",
|
|
6642
|
+
"aria-hidden": "true",
|
|
6643
|
+
children: r
|
|
6644
|
+
}) : null, /* @__PURE__ */ q("div", {
|
|
6645
|
+
className: "lp-recurso-tx",
|
|
6646
|
+
children: [
|
|
6647
|
+
i && /* @__PURE__ */ K("div", {
|
|
6648
|
+
className: "lp-recurso-sobre",
|
|
6649
|
+
children: i
|
|
6650
|
+
}),
|
|
6651
|
+
/* @__PURE__ */ K(l, {
|
|
6652
|
+
className: "lp-recurso-titulo",
|
|
6653
|
+
children: e
|
|
6654
|
+
}),
|
|
6655
|
+
t && /* @__PURE__ */ K("div", {
|
|
6656
|
+
className: "lp-recurso-desc",
|
|
6657
|
+
children: t
|
|
6658
|
+
}),
|
|
6659
|
+
a && /* @__PURE__ */ K("div", {
|
|
6660
|
+
className: "lp-recurso-acao",
|
|
6661
|
+
children: a
|
|
6662
|
+
})
|
|
6663
|
+
]
|
|
6664
|
+
})]
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6667
|
+
//#endregion
|
|
6668
|
+
//#region src/components/Site/FaixaNumeros.tsx
|
|
6669
|
+
function ts({ itens: e, aparencia: t = "faixa", rotulo: n, className: r }) {
|
|
6670
|
+
return /* @__PURE__ */ q("div", {
|
|
6671
|
+
className: Z("lp-numeros", `lp-numeros--${t}`, r),
|
|
6672
|
+
role: "list",
|
|
6673
|
+
"aria-label": n,
|
|
6674
|
+
children: [t === "faixa" && /* @__PURE__ */ K("div", {
|
|
6675
|
+
className: "lp-numeros-brilho",
|
|
6676
|
+
"aria-hidden": "true"
|
|
6677
|
+
}), e.map((e) => /* @__PURE__ */ q("div", {
|
|
6678
|
+
className: "lp-numeros-item",
|
|
6679
|
+
role: "listitem",
|
|
6680
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6681
|
+
className: "lp-numeros-valor",
|
|
6682
|
+
children: [e.valor, e.sufixo && /* @__PURE__ */ K("span", {
|
|
6683
|
+
className: "lp-numeros-sufixo",
|
|
6684
|
+
children: e.sufixo
|
|
6685
|
+
})]
|
|
6686
|
+
}), /* @__PURE__ */ K("div", {
|
|
6687
|
+
className: "lp-numeros-rotulo",
|
|
6688
|
+
children: e.rotulo
|
|
6689
|
+
})]
|
|
6690
|
+
}, e.rotulo))]
|
|
6691
|
+
});
|
|
6692
|
+
}
|
|
6693
|
+
//#endregion
|
|
6694
|
+
//#region src/components/Site/CardDepoimento.tsx
|
|
6695
|
+
function ns({ texto: e, nome: t, cargo: n, foto: r, nota: i = 5, className: a }) {
|
|
6696
|
+
let o = Math.max(0, Math.min(5, Math.round(i)));
|
|
6697
|
+
return /* @__PURE__ */ q("figure", {
|
|
6698
|
+
className: Z("lp-depo", a),
|
|
6699
|
+
children: [
|
|
6700
|
+
o > 0 && /* @__PURE__ */ q("div", {
|
|
6701
|
+
className: "lp-depo-nota",
|
|
6702
|
+
role: "img",
|
|
6703
|
+
"aria-label": `Nota ${o} de 5`,
|
|
6704
|
+
children: ["★".repeat(o), /* @__PURE__ */ K("span", {
|
|
6705
|
+
className: "lp-depo-nota-vazia",
|
|
6706
|
+
children: "★".repeat(5 - o)
|
|
6707
|
+
})]
|
|
6708
|
+
}),
|
|
6709
|
+
/* @__PURE__ */ q("blockquote", {
|
|
6710
|
+
className: "lp-depo-texto",
|
|
6711
|
+
children: [
|
|
6712
|
+
"“",
|
|
6713
|
+
e,
|
|
6714
|
+
"”"
|
|
6715
|
+
]
|
|
6716
|
+
}),
|
|
6717
|
+
/* @__PURE__ */ q("figcaption", {
|
|
6718
|
+
className: "lp-depo-autor",
|
|
6719
|
+
children: [/* @__PURE__ */ K(oi, {
|
|
6720
|
+
nome: t,
|
|
6721
|
+
foto: r,
|
|
6722
|
+
tamanho: "2.5rem"
|
|
6723
|
+
}), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ K("span", {
|
|
6724
|
+
className: "lp-depo-nome",
|
|
6725
|
+
children: t
|
|
6726
|
+
}), n && /* @__PURE__ */ K("span", {
|
|
6727
|
+
className: "lp-depo-cargo",
|
|
6728
|
+
children: n
|
|
6729
|
+
})] })]
|
|
6730
|
+
})
|
|
6731
|
+
]
|
|
6732
|
+
});
|
|
6733
|
+
}
|
|
6734
|
+
//#endregion
|
|
6735
|
+
//#region src/components/Site/CardPlano.tsx
|
|
6736
|
+
function rs({ nome: e, descricao: t, preco: n, moeda: r = "R$", periodo: i, itens: a, destaque: o, rotuloDestaque: s = "Mais escolhido", acao: c, className: l }) {
|
|
6737
|
+
return /* @__PURE__ */ q("article", {
|
|
6738
|
+
className: Z("lp-plano", o && "lp-plano--destaque", l),
|
|
6739
|
+
children: [
|
|
6740
|
+
o && /* @__PURE__ */ K("span", {
|
|
6741
|
+
className: "lp-plano-selo",
|
|
6742
|
+
children: s
|
|
6743
|
+
}),
|
|
6744
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("h3", {
|
|
6745
|
+
className: "lp-plano-nome",
|
|
6746
|
+
children: e
|
|
6747
|
+
}), t && /* @__PURE__ */ K("p", {
|
|
6748
|
+
className: "lp-plano-desc",
|
|
6749
|
+
children: t
|
|
6750
|
+
})] }),
|
|
6751
|
+
/* @__PURE__ */ q("div", {
|
|
6752
|
+
className: "lp-plano-preco",
|
|
6753
|
+
children: [
|
|
6754
|
+
/* @__PURE__ */ K("span", {
|
|
6755
|
+
className: "lp-plano-moeda",
|
|
6756
|
+
children: r
|
|
6757
|
+
}),
|
|
6758
|
+
/* @__PURE__ */ K("span", {
|
|
6759
|
+
className: "lp-plano-valor",
|
|
6760
|
+
children: n
|
|
6761
|
+
}),
|
|
6762
|
+
i && /* @__PURE__ */ K("span", {
|
|
6763
|
+
className: "lp-plano-periodo",
|
|
6764
|
+
children: i
|
|
6765
|
+
})
|
|
6766
|
+
]
|
|
6767
|
+
}),
|
|
6768
|
+
/* @__PURE__ */ K("ul", {
|
|
6769
|
+
className: "lp-plano-itens",
|
|
6770
|
+
children: a.map((e) => /* @__PURE__ */ q("li", { children: [/* @__PURE__ */ K(Q, {
|
|
6771
|
+
icone: "check",
|
|
6772
|
+
className: "lp-plano-check"
|
|
6773
|
+
}), /* @__PURE__ */ K("span", { children: e })] }, e))
|
|
6774
|
+
}),
|
|
6775
|
+
c && /* @__PURE__ */ K("div", {
|
|
6776
|
+
className: "lp-plano-acao",
|
|
6777
|
+
children: c
|
|
6778
|
+
})
|
|
6779
|
+
]
|
|
6780
|
+
});
|
|
6781
|
+
}
|
|
6782
|
+
//#endregion
|
|
6783
|
+
//#region src/components/Site/FaixaChamada.tsx
|
|
6784
|
+
function is({ titulo: e, descricao: t, acoes: n, cor: r = "pri", nivel: i = 2, className: a }) {
|
|
6785
|
+
let o = `h${i}`;
|
|
6786
|
+
return /* @__PURE__ */ q("div", {
|
|
6787
|
+
className: Z("lp-faixa-cta", `lp-faixa-cta--${r}`, a),
|
|
6788
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6789
|
+
className: "lp-faixa-cta-tx",
|
|
6790
|
+
children: [/* @__PURE__ */ K(o, {
|
|
6791
|
+
className: "lp-faixa-cta-titulo",
|
|
6792
|
+
children: e
|
|
6793
|
+
}), t && /* @__PURE__ */ K("p", {
|
|
6794
|
+
className: "lp-faixa-cta-desc",
|
|
6795
|
+
children: t
|
|
6796
|
+
})]
|
|
6797
|
+
}), n && /* @__PURE__ */ K("div", {
|
|
6798
|
+
className: "lp-faixa-cta-acoes",
|
|
6799
|
+
children: n
|
|
6800
|
+
})]
|
|
6801
|
+
});
|
|
6802
|
+
}
|
|
6803
|
+
//#endregion
|
|
6804
|
+
//#region src/components/Site/ConteudoArtigo.tsx
|
|
6805
|
+
function as({ children: e, className: t }) {
|
|
6806
|
+
return /* @__PURE__ */ K("div", {
|
|
6807
|
+
className: Z("lp-artigo", t),
|
|
6808
|
+
children: e
|
|
6809
|
+
});
|
|
6810
|
+
}
|
|
6811
|
+
//#endregion
|
|
6812
|
+
//#region src/components/Site/Newsletter.tsx
|
|
6813
|
+
function os({ aoInscrever: e, titulo: t = "Receba novidades", descricao: n, placeholder: r = "Seu e-mail", rotuloBotao: i = "Inscrever", mensagemSucesso: a = "Inscrição feita. Confira seu e-mail.", aparencia: o = "cartao", className: s }) {
|
|
6814
|
+
let c = Et(), [l, u] = X(""), [d, f] = X(""), [p, m] = X(!1), [h, g] = X(!1);
|
|
6815
|
+
return /* @__PURE__ */ q("form", {
|
|
6816
|
+
className: Z("lp-news", `lp-news--${o}`, s),
|
|
6817
|
+
onSubmit: async (t) => {
|
|
6818
|
+
t.preventDefault();
|
|
6819
|
+
let n = l.trim();
|
|
6820
|
+
if (!Yt(n)) f("Informe um e-mail válido.");
|
|
6821
|
+
else {
|
|
6822
|
+
f(""), m(!0);
|
|
6823
|
+
try {
|
|
6824
|
+
await e(n), g(!0), u("");
|
|
6825
|
+
} catch {
|
|
6826
|
+
f("Não foi possível inscrever agora. Tente de novo.");
|
|
6827
|
+
} finally {
|
|
6828
|
+
m(!1);
|
|
6829
|
+
}
|
|
6830
|
+
}
|
|
6831
|
+
},
|
|
6832
|
+
noValidate: !0,
|
|
6833
|
+
"aria-label": t,
|
|
6834
|
+
children: [
|
|
6835
|
+
o === "cartao" && /* @__PURE__ */ K("h3", {
|
|
6836
|
+
className: "lp-news-titulo",
|
|
6837
|
+
children: t
|
|
6838
|
+
}),
|
|
6839
|
+
n && /* @__PURE__ */ K("p", {
|
|
6840
|
+
className: "lp-news-desc",
|
|
6841
|
+
children: n
|
|
6842
|
+
}),
|
|
6843
|
+
/* @__PURE__ */ q("div", {
|
|
6844
|
+
className: "lp-news-campo",
|
|
6845
|
+
children: [
|
|
6846
|
+
/* @__PURE__ */ K("label", {
|
|
6847
|
+
className: "lp-sr",
|
|
6848
|
+
htmlFor: c,
|
|
6849
|
+
children: "E-mail"
|
|
6850
|
+
}),
|
|
6851
|
+
/* @__PURE__ */ K("input", {
|
|
6852
|
+
id: c,
|
|
6853
|
+
className: "lp-news-input",
|
|
6854
|
+
type: "email",
|
|
6855
|
+
autoComplete: "email",
|
|
6856
|
+
maxLength: 254,
|
|
6857
|
+
value: l,
|
|
6858
|
+
placeholder: r,
|
|
6859
|
+
"aria-invalid": d ? !0 : void 0,
|
|
6860
|
+
"aria-describedby": d || h ? `${c}-msg` : void 0,
|
|
6861
|
+
onChange: (e) => {
|
|
6862
|
+
u(e.target.value), h && g(!1);
|
|
6863
|
+
}
|
|
6864
|
+
}),
|
|
6865
|
+
/* @__PURE__ */ K("button", {
|
|
6866
|
+
type: "submit",
|
|
6867
|
+
className: "lp-news-botao",
|
|
6868
|
+
disabled: p,
|
|
6869
|
+
children: i
|
|
6870
|
+
})
|
|
6871
|
+
]
|
|
6872
|
+
}),
|
|
6873
|
+
(d || h) && /* @__PURE__ */ K("p", {
|
|
6874
|
+
id: `${c}-msg`,
|
|
6875
|
+
className: Z("lp-news-msg", d && "is-erro"),
|
|
6876
|
+
role: d ? "alert" : "status",
|
|
6877
|
+
children: d || a
|
|
6878
|
+
})
|
|
6879
|
+
]
|
|
6880
|
+
});
|
|
6881
|
+
}
|
|
6882
|
+
//#endregion
|
|
6883
|
+
//#region src/components/Site/SumarioPagina.tsx
|
|
6884
|
+
function ss({ itens: e, titulo: t = "Nesta página", className: n }) {
|
|
6885
|
+
let [r, i] = X(e[0]?.id);
|
|
6886
|
+
J(() => {
|
|
6887
|
+
let t = e.map((e) => document.getElementById(e.id)).filter((e) => !!e);
|
|
6888
|
+
if (!t.length || typeof IntersectionObserver > "u") return;
|
|
6889
|
+
let n = () => {
|
|
6890
|
+
let e = window.scrollY + window.innerHeight >= document.documentElement.scrollHeight - 2, n = t.filter((e) => e.getBoundingClientRect().top < window.innerHeight * .3);
|
|
6891
|
+
i((e ? t[t.length - 1] : n[n.length - 1] ?? t[0]).id);
|
|
6892
|
+
}, r = new IntersectionObserver(n, { rootMargin: "0px 0px -70% 0px" });
|
|
6893
|
+
return t.forEach((e) => r.observe(e)), window.addEventListener("scroll", n, { passive: !0 }), () => {
|
|
6894
|
+
r.disconnect(), window.removeEventListener("scroll", n);
|
|
6895
|
+
};
|
|
6896
|
+
}, [e]);
|
|
6897
|
+
let a = (e, t) => {
|
|
6898
|
+
let n = document.getElementById(t);
|
|
6899
|
+
n && (e.preventDefault(), n.scrollIntoView({
|
|
6900
|
+
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
6901
|
+
block: "start"
|
|
6902
|
+
}), n.hasAttribute("tabindex") || n.setAttribute("tabindex", "-1"), n.focus({ preventScroll: !0 }), i(t));
|
|
6903
|
+
};
|
|
6904
|
+
return /* @__PURE__ */ q("nav", {
|
|
6905
|
+
className: Z("lp-sumario", n),
|
|
6906
|
+
"aria-label": t,
|
|
6907
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6908
|
+
className: "lp-sumario-titulo",
|
|
6909
|
+
children: t
|
|
6910
|
+
}), /* @__PURE__ */ K("ol", {
|
|
6911
|
+
className: "lp-sumario-lista",
|
|
6912
|
+
children: e.map((e) => /* @__PURE__ */ K("li", { children: /* @__PURE__ */ K("a", {
|
|
6913
|
+
className: Z("lp-sumario-link", r === e.id && "is-atual"),
|
|
6914
|
+
href: `#${e.id}`,
|
|
6915
|
+
"aria-current": r === e.id ? "location" : void 0,
|
|
6916
|
+
onClick: (t) => a(t, e.id),
|
|
6917
|
+
children: e.rotulo
|
|
6918
|
+
}) }, e.id))
|
|
6919
|
+
})]
|
|
6920
|
+
});
|
|
6921
|
+
}
|
|
6922
|
+
//#endregion
|
|
6188
6923
|
//#region src/components/Grafico/escalas.ts
|
|
6189
|
-
var
|
|
6190
|
-
function
|
|
6924
|
+
var cs = new Intl.NumberFormat("pt-BR", { maximumFractionDigits: 2 });
|
|
6925
|
+
function ls(e, t) {
|
|
6191
6926
|
if (e == null || !Number.isFinite(e)) return "sem dado";
|
|
6192
|
-
let n = t?.formatar ? t.formatar(e) :
|
|
6927
|
+
let n = t?.formatar ? t.formatar(e) : cs.format(e);
|
|
6193
6928
|
return t?.unidade ? `${n} ${t.unidade}` : n;
|
|
6194
6929
|
}
|
|
6195
|
-
function
|
|
6930
|
+
function us(e, t) {
|
|
6196
6931
|
return t?.formatar ? t.formatar(e) : En(e, { compacto: Math.abs(e) >= 1e4 });
|
|
6197
6932
|
}
|
|
6198
|
-
function
|
|
6933
|
+
function ds(e) {
|
|
6199
6934
|
return typeof e == "number" && Number.isFinite(e) ? e : null;
|
|
6200
6935
|
}
|
|
6201
|
-
function
|
|
6936
|
+
function fs(e) {
|
|
6202
6937
|
if (!(e > 0)) return 1;
|
|
6203
6938
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
6204
6939
|
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
|
|
6205
6940
|
}
|
|
6206
|
-
function
|
|
6941
|
+
function ps(e, t, n = 5) {
|
|
6207
6942
|
let r = e, i = t;
|
|
6208
6943
|
if (r === i) {
|
|
6209
6944
|
let e = r === 0 ? 1 : Math.abs(r) * .1;
|
|
6210
6945
|
r -= e, i += e;
|
|
6211
6946
|
}
|
|
6212
|
-
let a =
|
|
6947
|
+
let a = fs((i - r) / Math.max(1, n)), o = Math.max(0, -Math.floor(Math.log10(a))), s = Math.floor(r / a + 1e-9) * a, c = Math.ceil(i / a - 1e-9) * a, l = [];
|
|
6213
6948
|
for (let e = s; e <= c + a / 2; e += a) l.push(Number(e.toFixed(o)));
|
|
6214
6949
|
return {
|
|
6215
6950
|
de: l[0],
|
|
@@ -6217,14 +6952,14 @@ function Vo(e, t, n = 5) {
|
|
|
6217
6952
|
passos: l
|
|
6218
6953
|
};
|
|
6219
6954
|
}
|
|
6220
|
-
function
|
|
6955
|
+
function ms(e, t, n) {
|
|
6221
6956
|
let { de: r, ate: i } = e, a = i === r ? 0 : (n - t) / (i - r), o = ((e) => t + (e - r) * a);
|
|
6222
6957
|
return o.de = r, o.ate = i, o.passos = e.passos, o;
|
|
6223
6958
|
}
|
|
6224
|
-
function
|
|
6959
|
+
function hs(e, t, n, r) {
|
|
6225
6960
|
let i = e.length ? Math.min(...e) : 0, a = e.length ? Math.max(...e) : 1;
|
|
6226
6961
|
r && (i = Math.min(i, 0), a = Math.max(a, 0)), t?.minimo !== void 0 && (i = t.minimo), t?.maximo !== void 0 && (a = t.maximo);
|
|
6227
|
-
let o =
|
|
6962
|
+
let o = ps(i, a, n);
|
|
6228
6963
|
if (t?.minimo === void 0 && t?.maximo === void 0) return o;
|
|
6229
6964
|
let s = t?.minimo ?? o.de, c = t?.maximo ?? o.ate;
|
|
6230
6965
|
return {
|
|
@@ -6233,7 +6968,7 @@ function Uo(e, t, n, r) {
|
|
|
6233
6968
|
passos: o.passos.filter((e) => e >= s - 1e-9 && e <= c + 1e-9)
|
|
6234
6969
|
};
|
|
6235
6970
|
}
|
|
6236
|
-
function
|
|
6971
|
+
function gs(e, t, n, r = .2) {
|
|
6237
6972
|
let i = e > 0 ? (n - t) / e : 0, a = i * (1 - r);
|
|
6238
6973
|
return {
|
|
6239
6974
|
inicio: (e) => t + e * i + (i - a) / 2,
|
|
@@ -6243,7 +6978,7 @@ function Wo(e, t, n, r = .2) {
|
|
|
6243
6978
|
indice: (n) => Math.min(e - 1, Math.max(0, Math.floor((n - t) / (i || 1))))
|
|
6244
6979
|
};
|
|
6245
6980
|
}
|
|
6246
|
-
var
|
|
6981
|
+
var _s = [
|
|
6247
6982
|
"jan",
|
|
6248
6983
|
"fev",
|
|
6249
6984
|
"mar",
|
|
@@ -6257,7 +6992,7 @@ var Go = [
|
|
|
6257
6992
|
"nov",
|
|
6258
6993
|
"dez"
|
|
6259
6994
|
];
|
|
6260
|
-
function
|
|
6995
|
+
function vs(e) {
|
|
6261
6996
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
|
|
6262
6997
|
if (typeof e == "number") return Number.isFinite(e) ? new Date(e) : null;
|
|
6263
6998
|
if (typeof e != "string") return null;
|
|
@@ -6266,27 +7001,27 @@ function Ko(e) {
|
|
|
6266
7001
|
let n = Date.parse(e);
|
|
6267
7002
|
return Number.isNaN(n) ? null : new Date(n);
|
|
6268
7003
|
}
|
|
6269
|
-
function
|
|
7004
|
+
function ys(e) {
|
|
6270
7005
|
let t = e.map((e) => e.getTime()).sort((e, t) => e - t), n = Infinity;
|
|
6271
7006
|
for (let e = 1; e < t.length; e++) t[e] > t[e - 1] && (n = Math.min(n, t[e] - t[e - 1]));
|
|
6272
7007
|
let r = n / 864e5;
|
|
6273
7008
|
return Number.isFinite(r) ? r >= 360 ? "ano" : r >= 28 ? "mes" : "dia" : e.every((e) => e.getMonth() === 0 && e.getDate() === 1) ? "ano" : "dia";
|
|
6274
7009
|
}
|
|
6275
|
-
var
|
|
6276
|
-
function
|
|
6277
|
-
let t =
|
|
7010
|
+
var bs = (e) => String(e).padStart(2, "0");
|
|
7011
|
+
function xs(e) {
|
|
7012
|
+
let t = ys(e);
|
|
6278
7013
|
return t === "ano" ? {
|
|
6279
7014
|
curto: (e) => String(e.getFullYear()),
|
|
6280
7015
|
completo: (e) => String(e.getFullYear())
|
|
6281
7016
|
} : t === "mes" ? {
|
|
6282
|
-
curto: (e) => `${
|
|
6283
|
-
completo: (e) => `${
|
|
7017
|
+
curto: (e) => `${_s[e.getMonth()]}/${String(e.getFullYear()).slice(2)}`,
|
|
7018
|
+
completo: (e) => `${_s[e.getMonth()]}/${e.getFullYear()}`
|
|
6284
7019
|
} : {
|
|
6285
|
-
curto: (e) => `${
|
|
7020
|
+
curto: (e) => `${bs(e.getDate())}/${bs(e.getMonth() + 1)}`,
|
|
6286
7021
|
completo: Fn
|
|
6287
7022
|
};
|
|
6288
7023
|
}
|
|
6289
|
-
function
|
|
7024
|
+
function Ss(e, t) {
|
|
6290
7025
|
if (t.formatar) {
|
|
6291
7026
|
let n = t.formatar, r = e.map((e) => e == null ? "" : n(e));
|
|
6292
7027
|
return {
|
|
@@ -6295,14 +7030,14 @@ function Xo(e, t) {
|
|
|
6295
7030
|
};
|
|
6296
7031
|
}
|
|
6297
7032
|
if (t.tipo === "data") {
|
|
6298
|
-
let t = e.map(
|
|
7033
|
+
let t = e.map(vs), { curto: n, completo: r } = xs(t.filter((e) => !!e));
|
|
6299
7034
|
return {
|
|
6300
7035
|
curtos: t.map((e) => e ? n(e) : ""),
|
|
6301
7036
|
completos: t.map((e) => e ? r(e) : "")
|
|
6302
7037
|
};
|
|
6303
7038
|
}
|
|
6304
7039
|
if (t.tipo === "numero") {
|
|
6305
|
-
let t = e.map((e) => typeof e == "number" ?
|
|
7040
|
+
let t = e.map((e) => typeof e == "number" ? cs.format(e) : String(e ?? ""));
|
|
6306
7041
|
return {
|
|
6307
7042
|
curtos: t,
|
|
6308
7043
|
completos: t
|
|
@@ -6314,24 +7049,24 @@ function Xo(e, t) {
|
|
|
6314
7049
|
completos: n
|
|
6315
7050
|
};
|
|
6316
7051
|
}
|
|
6317
|
-
function
|
|
6318
|
-
return t === "data" ?
|
|
7052
|
+
function Cs(e, t) {
|
|
7053
|
+
return t === "data" ? vs(e)?.getTime() ?? null : ds(e);
|
|
6319
7054
|
}
|
|
6320
|
-
function
|
|
7055
|
+
function ws(e, t = 12) {
|
|
6321
7056
|
return e.length * t * .56;
|
|
6322
7057
|
}
|
|
6323
|
-
function
|
|
7058
|
+
function Ts(e, t, n = 10) {
|
|
6324
7059
|
let r = [], i = -Infinity;
|
|
6325
7060
|
return e.forEach((e, a) => {
|
|
6326
|
-
let o =
|
|
7061
|
+
let o = ws(t[a]) / 2;
|
|
6327
7062
|
!t[a] || e - o < i + n || (r.push(a), i = e + o);
|
|
6328
7063
|
}), r;
|
|
6329
7064
|
}
|
|
6330
|
-
function
|
|
6331
|
-
let r = Math.max(0, ...t.map((e) =>
|
|
7065
|
+
function Es(e, t, n = 10) {
|
|
7066
|
+
let r = Math.max(0, ...t.map((e) => ws(e))), i = Math.max(1, Math.ceil((r + n) / Math.max(1, e)));
|
|
6332
7067
|
return t.map((e, t) => t).filter((e) => e % i === 0);
|
|
6333
7068
|
}
|
|
6334
|
-
function
|
|
7069
|
+
function Ds(e) {
|
|
6335
7070
|
let t = e.filter((e) => typeof e.x == "number" && typeof e.y == "number" && Number.isFinite(e.x) && Number.isFinite(e.y)), n = t.length;
|
|
6336
7071
|
if (n < 3) return null;
|
|
6337
7072
|
let r = t.reduce((e, t) => e + t.x, 0) / n, i = t.reduce((e, t) => e + t.y, 0) / n, a = 0, o = 0, s = 0;
|
|
@@ -6348,7 +7083,7 @@ function ts(e) {
|
|
|
6348
7083
|
}
|
|
6349
7084
|
//#endregion
|
|
6350
7085
|
//#region src/components/Grafico/MolduraGrafico.tsx
|
|
6351
|
-
function
|
|
7086
|
+
function Os() {
|
|
6352
7087
|
let e = Y(null), [t, n] = X(0);
|
|
6353
7088
|
return Ot(() => {
|
|
6354
7089
|
let t = e.current;
|
|
@@ -6359,7 +7094,7 @@ function ns() {
|
|
|
6359
7094
|
return i.observe(t), () => i.disconnect();
|
|
6360
7095
|
}, []), [e, t];
|
|
6361
7096
|
}
|
|
6362
|
-
function
|
|
7097
|
+
function ks({ cor: e, forma: t, tracejada: n }) {
|
|
6363
7098
|
return /* @__PURE__ */ K("svg", {
|
|
6364
7099
|
className: "lp-graf-amostra",
|
|
6365
7100
|
width: "16",
|
|
@@ -6390,8 +7125,8 @@ function rs({ cor: e, forma: t, tracejada: n }) {
|
|
|
6390
7125
|
})
|
|
6391
7126
|
});
|
|
6392
7127
|
}
|
|
6393
|
-
function
|
|
6394
|
-
let [m, h] = X(!1), [g, _] =
|
|
7128
|
+
function As({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoVazio: i = "Sem dados para mostrar.", verDados: a = !0, animacao: o, className: s, semDados: c, itensLegenda: l = [], aoAlternarSerie: u, tabela: d, nota: f, children: p }) {
|
|
7129
|
+
let [m, h] = X(!1), [g, _] = Os(), v = n && l.length > 1 && !r && !c && !m, y = m && !r && !c ? d() : null;
|
|
6395
7130
|
return /* @__PURE__ */ q("figure", {
|
|
6396
7131
|
className: Z("lp-graf", o && "lp-graf--animado", s),
|
|
6397
7132
|
children: [
|
|
@@ -6420,7 +7155,7 @@ function is({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoV
|
|
|
6420
7155
|
"aria-pressed": e.visivel,
|
|
6421
7156
|
title: e.visivel ? "Esconder a série" : "Mostrar a série",
|
|
6422
7157
|
onClick: () => u?.(e.chave),
|
|
6423
|
-
children: [/* @__PURE__ */ K(
|
|
7158
|
+
children: [/* @__PURE__ */ K(ks, {
|
|
6424
7159
|
cor: e.cor,
|
|
6425
7160
|
forma: e.forma,
|
|
6426
7161
|
tracejada: e.tracejada
|
|
@@ -6447,7 +7182,7 @@ function is({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoV
|
|
|
6447
7182
|
]
|
|
6448
7183
|
});
|
|
6449
7184
|
}
|
|
6450
|
-
function
|
|
7185
|
+
function js() {
|
|
6451
7186
|
let [e, t] = X(/* @__PURE__ */ new Set());
|
|
6452
7187
|
return [e, wt((e, n) => {
|
|
6453
7188
|
t((t) => {
|
|
@@ -6456,7 +7191,7 @@ function as() {
|
|
|
6456
7191
|
});
|
|
6457
7192
|
}, [])];
|
|
6458
7193
|
}
|
|
6459
|
-
function
|
|
7194
|
+
function Ms(e) {
|
|
6460
7195
|
let [t, n] = X(null);
|
|
6461
7196
|
return {
|
|
6462
7197
|
ativo: t !== null && t < e ? t : null,
|
|
@@ -6468,7 +7203,7 @@ function os(e) {
|
|
|
6468
7203
|
}
|
|
6469
7204
|
};
|
|
6470
7205
|
}
|
|
6471
|
-
function
|
|
7206
|
+
function Ns({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
6472
7207
|
let a = e <= n / 2;
|
|
6473
7208
|
return /* @__PURE__ */ q("div", {
|
|
6474
7209
|
className: "lp-graf-caixa",
|
|
@@ -6486,7 +7221,7 @@ function ss({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
|
6486
7221
|
}), i.map((e) => /* @__PURE__ */ q("div", {
|
|
6487
7222
|
className: "lp-graf-caixa-linha",
|
|
6488
7223
|
children: [
|
|
6489
|
-
/* @__PURE__ */ K(
|
|
7224
|
+
/* @__PURE__ */ K(ks, {
|
|
6490
7225
|
cor: e.cor,
|
|
6491
7226
|
forma: e.forma
|
|
6492
7227
|
}),
|
|
@@ -6502,10 +7237,10 @@ function ss({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
|
6502
7237
|
}, e.chave))]
|
|
6503
7238
|
});
|
|
6504
7239
|
}
|
|
6505
|
-
function
|
|
7240
|
+
function Ps(e, t) {
|
|
6506
7241
|
return [e, ...t.map((e) => `${e.rotulo}: ${e.valor}`)].join(". ");
|
|
6507
7242
|
}
|
|
6508
|
-
function
|
|
7243
|
+
function Fs(e, t, n) {
|
|
6509
7244
|
let r = `lp-graf-rev-${Et().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
6510
7245
|
return e ? {
|
|
6511
7246
|
recorte: `url(#${r})`,
|
|
@@ -6524,33 +7259,33 @@ function ls(e, t, n) {
|
|
|
6524
7259
|
definicao: null
|
|
6525
7260
|
};
|
|
6526
7261
|
}
|
|
6527
|
-
function
|
|
7262
|
+
function Is(e, t) {
|
|
6528
7263
|
return t ?? `var(--graf-${e % 6 + 1})`;
|
|
6529
7264
|
}
|
|
6530
7265
|
//#endregion
|
|
6531
7266
|
//#region src/components/Grafico/Cartesiano.tsx
|
|
6532
|
-
var
|
|
7267
|
+
var Ls = {
|
|
6533
7268
|
categoria: "Categoria",
|
|
6534
7269
|
data: "Data",
|
|
6535
7270
|
numero: "Valor"
|
|
6536
|
-
},
|
|
6537
|
-
function
|
|
7271
|
+
}, Rs = new Intl.NumberFormat("pt-BR", { maximumFractionDigits: 2 });
|
|
7272
|
+
function zs(e) {
|
|
6538
7273
|
return e ? e.rotulo && e.unidade ? `${e.rotulo} (${e.unidade})` : e.rotulo ?? e.unidade ?? "" : "";
|
|
6539
7274
|
}
|
|
6540
|
-
function
|
|
7275
|
+
function Bs(e) {
|
|
6541
7276
|
let t = "", n = !0;
|
|
6542
7277
|
for (let r of e) r ? (t += `${n ? "M" : "L"}${r[0].toFixed(1)} ${r[1].toFixed(1)}`, n = !1) : n = !0;
|
|
6543
7278
|
return t;
|
|
6544
7279
|
}
|
|
6545
|
-
function
|
|
7280
|
+
function Vs(e) {
|
|
6546
7281
|
let t = [], n = [];
|
|
6547
7282
|
for (let r of e) r ? n.push(r) : n.length && (t.push(n), n = []);
|
|
6548
7283
|
return n.length && t.push(n), t;
|
|
6549
7284
|
}
|
|
6550
|
-
function
|
|
6551
|
-
if (
|
|
6552
|
-
let n = Math.max(2, Math.floor(t /
|
|
6553
|
-
for (; r.length &&
|
|
7285
|
+
function Hs(e, t) {
|
|
7286
|
+
if (ws(e) <= t) return [e];
|
|
7287
|
+
let n = Math.max(2, Math.floor(t / ws("m"))), r = e.split(" "), i = "";
|
|
7288
|
+
for (; r.length && ws(i ? `${i} ${r[0]}` : r[0]) <= t;) i = i ? `${i} ${r.shift()}` : r.shift() ?? "";
|
|
6554
7289
|
if (!i) {
|
|
6555
7290
|
let e = r.shift() ?? "";
|
|
6556
7291
|
i = e.length > n ? `${e.slice(0, n - 1)}…` : e;
|
|
@@ -6558,17 +7293,17 @@ function gs(e, t) {
|
|
|
6558
7293
|
let a = r.join(" ");
|
|
6559
7294
|
return a ? [i, a.length > n ? `${a.slice(0, n - 1)}…` : a] : [i];
|
|
6560
7295
|
}
|
|
6561
|
-
function
|
|
6562
|
-
let r =
|
|
7296
|
+
function Us(e, t, n) {
|
|
7297
|
+
let r = ws(t) / 2;
|
|
6563
7298
|
return e - r < 0 ? "start" : e + r > n ? "end" : "middle";
|
|
6564
7299
|
}
|
|
6565
|
-
function
|
|
6566
|
-
let { dados: t, eixoX: n, eixoY: r, eixoYDireito: i, series: a } = e, [o, s] =
|
|
7300
|
+
function Ws(e) {
|
|
7301
|
+
let { dados: t, eixoX: n, eixoY: r, eixoYDireito: i, series: a } = e, [o, s] = js(), c = !!i, l = (e) => c ? e.eixo ?? (e.tipo === "barra" ? "esquerdo" : "direito") : "esquerdo", u = (e) => e === "direito" ? i : r, { completos: d } = Ss(t.map((e) => e[n.chave]), n), f = a.map((t, n) => {
|
|
6567
7302
|
let r = l(t), i = u(r)?.unidade, a = c ? ` (${i ? `${i}, ` : ""}eixo ${r})` : "";
|
|
6568
7303
|
return {
|
|
6569
7304
|
chave: t.chave,
|
|
6570
7305
|
rotulo: t.rotulo + a,
|
|
6571
|
-
cor: e.divergente && t.tipo === "barra" ? "var(--graf-pos)" :
|
|
7306
|
+
cor: e.divergente && t.tipo === "barra" ? "var(--graf-pos)" : Is(n, t.cor),
|
|
6572
7307
|
forma: t.tipo === "barra" ? "barra" : "linha",
|
|
6573
7308
|
tracejada: t.tracejada,
|
|
6574
7309
|
visivel: !o.has(t.chave)
|
|
@@ -6576,14 +7311,14 @@ function vs(e) {
|
|
|
6576
7311
|
}), p = () => ({
|
|
6577
7312
|
colunas: [{
|
|
6578
7313
|
campo: "__x",
|
|
6579
|
-
rotulo: n.rotulo ??
|
|
7314
|
+
rotulo: n.rotulo ?? Ls[n.tipo]
|
|
6580
7315
|
}, ...a.map((e) => {
|
|
6581
7316
|
let t = u(l(e));
|
|
6582
7317
|
return {
|
|
6583
7318
|
campo: e.chave,
|
|
6584
7319
|
rotulo: t?.unidade ? `${e.rotulo} (${t.unidade})` : e.rotulo,
|
|
6585
7320
|
alinhamento: "direita",
|
|
6586
|
-
formato: (e) =>
|
|
7321
|
+
formato: (e) => ls(ds(e), {
|
|
6587
7322
|
...t,
|
|
6588
7323
|
unidade: void 0
|
|
6589
7324
|
})
|
|
@@ -6594,13 +7329,13 @@ function vs(e) {
|
|
|
6594
7329
|
__x: d[t]
|
|
6595
7330
|
}))
|
|
6596
7331
|
});
|
|
6597
|
-
return /* @__PURE__ */ K(
|
|
7332
|
+
return /* @__PURE__ */ K(As, {
|
|
6598
7333
|
...e,
|
|
6599
7334
|
semDados: t.length === 0 || a.length === 0,
|
|
6600
7335
|
itensLegenda: f,
|
|
6601
7336
|
aoAlternarSerie: (e) => s(e, a.length),
|
|
6602
7337
|
tabela: p,
|
|
6603
|
-
children: (t) => /* @__PURE__ */ K(
|
|
7338
|
+
children: (t) => /* @__PURE__ */ K(Gs, {
|
|
6604
7339
|
...e,
|
|
6605
7340
|
largura: t,
|
|
6606
7341
|
ocultas: o,
|
|
@@ -6609,8 +7344,8 @@ function vs(e) {
|
|
|
6609
7344
|
})
|
|
6610
7345
|
});
|
|
6611
7346
|
}
|
|
6612
|
-
function
|
|
6613
|
-
let b = r.length, { ativo: x, setAtivo: S, aoTeclar: C } =
|
|
7347
|
+
function Gs({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixoY: a, eixoYDireito: o, series: s, orientacao: c = "vertical", pontos: l, area: u, referencias: d = [], faixas: f = [], divergente: p, rotulosNasBarras: m, animacao: h, largura: g, ocultas: _, ladoDe: v, completos: y }) {
|
|
7348
|
+
let b = r.length, { ativo: x, setAtivo: S, aoTeclar: C } = Ms(b), [w, T] = X(!1), E = c === "horizontal", D = new Map(s.map((e, t) => [e.chave, t])), O = s.filter((e) => !_.has(e.chave)), k = O.filter((e) => e.tipo === "barra"), A = O.filter((e) => e.tipo === "linha"), j = E || s.some((e) => e.tipo === "barra") || i.tipo === "categoria", M = (e) => e === "direito" ? o : a, N = (e, t) => ds(r[t][e.chave]), P = (e, t) => p && e.tipo === "barra" ? t != null && t < 0 ? "var(--graf-neg)" : "var(--graf-pos)" : Is(D.get(e.chave) ?? 0, e.cor), { curtos: F } = Ss(r.map((e) => e[i.chave]), i), I = (e) => {
|
|
6614
7349
|
let t = [];
|
|
6615
7350
|
for (let n of O) if (v(n) === e) for (let e = 0; e < b; e++) {
|
|
6616
7351
|
let r = N(n, e);
|
|
@@ -6618,27 +7353,27 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6618
7353
|
}
|
|
6619
7354
|
for (let n of d) (n.eixo ?? "esquerdo") === e && t.push(n.valor);
|
|
6620
7355
|
return t;
|
|
6621
|
-
}, L = A[0], ee = (e) => k.some((t) => v(t) === e) || !!u && !!L && v(L) === e, R =
|
|
7356
|
+
}, L = A[0], ee = (e) => k.some((t) => v(t) === e) || !!u && !!L && v(L) === e, R = zs(a), te = zs(o), ne = R || te ? 24 : 10, re = (g - 90) / Math.max(1, b), ie = !E && i.tipo === "categoria" && F.some((e) => ws(e) > re - 6) ? F.map((e) => Hs(e, re - 6)) : null, ae = !!ie && re >= ws("mmm") + 6, oe = ae ? 40 : 26, se = g * .5 - 12, ce = E ? F.map((e) => Hs(e, se)) : [], le = ce.some((e) => e.length > 1), ue = E ? Math.max(n, b * (le ? 36 : 24) + ne + oe) : n, de = Math.max(2, Math.round((ue - ne - oe) / 50)), z, B, V = ne, fe = ue - oe, H, pe = null, me = [];
|
|
6622
7357
|
if (E) {
|
|
6623
|
-
let e = Math.max(0, ...ce.flat().map((e) =>
|
|
7358
|
+
let e = Math.max(0, ...ce.flat().map((e) => ws(e)));
|
|
6624
7359
|
z = Math.min(e + 12, g * .5);
|
|
6625
|
-
let t = I("esquerdo"), n = m ? Math.max(0, ...t.map((e) =>
|
|
7360
|
+
let t = I("esquerdo"), n = m ? Math.max(0, ...t.map((e) => ws(ls(e, {
|
|
6626
7361
|
...a,
|
|
6627
7362
|
unidade: void 0
|
|
6628
7363
|
})))) + 8 : 0;
|
|
6629
7364
|
B = g - Math.max(14, n);
|
|
6630
|
-
let r = Math.max(2, Math.floor((B - z) / 60)), i =
|
|
6631
|
-
for (; r > 2 && (B - z) / Math.max(1, i.passos.length - 1) < o(i) + 16;) i =
|
|
6632
|
-
H =
|
|
7365
|
+
let r = Math.max(2, Math.floor((B - z) / 60)), i = hs(t, a, r, !0), o = (e) => Math.max(...e.passos.map((e) => ws(us(e, a))));
|
|
7366
|
+
for (; r > 2 && (B - z) / Math.max(1, i.passos.length - 1) < o(i) + 16;) i = hs(t, a, --r, !0);
|
|
7367
|
+
H = ms(i, z, B);
|
|
6633
7368
|
} else {
|
|
6634
|
-
let e =
|
|
6635
|
-
if (e.passos.forEach((e) => me.push(
|
|
6636
|
-
let e =
|
|
6637
|
-
B = g - Math.max(28, t + 12), pe =
|
|
7369
|
+
let e = hs(I("esquerdo"), a, de, ee("esquerdo"));
|
|
7370
|
+
if (e.passos.forEach((e) => me.push(us(e, a))), z = Math.max(28, Math.max(...me.map((e) => ws(e))) + 12), o) {
|
|
7371
|
+
let e = hs(I("direito"), o, de, ee("direito")), t = Math.max(...e.passos.map((e) => ws(us(e, o))));
|
|
7372
|
+
B = g - Math.max(28, t + 12), pe = ms(e, fe, V);
|
|
6638
7373
|
} else B = g - 12;
|
|
6639
|
-
H =
|
|
7374
|
+
H = ms(e, fe, V);
|
|
6640
7375
|
}
|
|
6641
|
-
let he = (e) => e === "direito" && pe ? pe : H, ge = (e) => e(Math.min(e.ate, Math.max(e.de, 0))), U = E ?
|
|
7376
|
+
let he = (e) => e === "direito" && pe ? pe : H, ge = (e) => e(Math.min(e.ate, Math.max(e.de, 0))), U = E ? gs(b, V, fe, .25) : gs(b, z, B, k.length ? .2 : 0), _e = j ? [] : r.map((e) => Cs(e[i.chave], i.tipo)), ve = _e.filter((e) => e !== null), W = !j && ve.length ? ms({
|
|
6642
7377
|
de: Math.min(...ve),
|
|
6643
7378
|
ate: Math.max(...ve),
|
|
6644
7379
|
passos: []
|
|
@@ -6653,19 +7388,19 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6653
7388
|
texto: F[t],
|
|
6654
7389
|
linhas: e
|
|
6655
7390
|
}));
|
|
6656
|
-
else if (j) for (let e of
|
|
7391
|
+
else if (j) for (let e of Es(U.passo, F)) be.push({
|
|
6657
7392
|
x: U.centro(e),
|
|
6658
7393
|
texto: F[e]
|
|
6659
7394
|
});
|
|
6660
7395
|
else if (i.tipo === "numero" && W && !i.formatar) {
|
|
6661
|
-
let e =
|
|
7396
|
+
let e = ps(W.de, W.ate, Math.max(2, Math.floor((B - z) / 80))).passos.filter((e) => e >= W.de && e <= W.ate);
|
|
6662
7397
|
for (let t of e) be.push({
|
|
6663
7398
|
x: W(t),
|
|
6664
|
-
texto:
|
|
7399
|
+
texto: Rs.format(t)
|
|
6665
7400
|
});
|
|
6666
7401
|
} else {
|
|
6667
7402
|
let e = r.map((e, t) => ye(t) ?? -Infinity);
|
|
6668
|
-
for (let t of
|
|
7403
|
+
for (let t of Ts(e, F)) be.push({
|
|
6669
7404
|
x: e[t],
|
|
6670
7405
|
texto: F[t]
|
|
6671
7406
|
});
|
|
@@ -6678,7 +7413,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6678
7413
|
if (r < 0 || i < 0) return [];
|
|
6679
7414
|
t = U.centro(Math.min(r, i)) - U.passo / 2, n = U.centro(Math.max(r, i)) + U.passo / 2;
|
|
6680
7415
|
} else {
|
|
6681
|
-
let r =
|
|
7416
|
+
let r = Cs(e.de, i.tipo), a = Cs(e.ate, i.tipo);
|
|
6682
7417
|
if (r === null || a === null || !W || (t = Math.max(z, Math.min(W(r), W(a))), n = Math.min(B, Math.max(W(r), W(a))), n <= t)) return [];
|
|
6683
7418
|
}
|
|
6684
7419
|
return [{
|
|
@@ -6693,7 +7428,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6693
7428
|
rotulo: t.rotulo,
|
|
6694
7429
|
cor: P(t, n),
|
|
6695
7430
|
forma: t.tipo === "barra" ? "barra" : "linha",
|
|
6696
|
-
valor:
|
|
7431
|
+
valor: ls(n, M(v(t)))
|
|
6697
7432
|
};
|
|
6698
7433
|
}), we = (e) => {
|
|
6699
7434
|
if (!b) return null;
|
|
@@ -6709,7 +7444,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6709
7444
|
r < a && (a = r, i = e);
|
|
6710
7445
|
}
|
|
6711
7446
|
return i < 0 ? null : i;
|
|
6712
|
-
}, Te = new Set(E ?
|
|
7447
|
+
}, Te = new Set(E ? Ts(H.passos.map((e) => H(e)), H.passos.map((e) => us(e, a))) : []), Ee = l ?? b <= 60, De = t ? `${e}. ${t}` : e, Oe = [], ke = [], { recorte: Ae, definicao: je } = Fs(h, g, ue);
|
|
6713
7448
|
if (k.length) {
|
|
6714
7449
|
let e = k.length, t = U.largura / e, n = e > 1 ? Math.min(2, t * .15) : 0;
|
|
6715
7450
|
k.forEach((e, r) => {
|
|
@@ -6735,7 +7470,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6735
7470
|
rx: 1.5,
|
|
6736
7471
|
fill: p
|
|
6737
7472
|
}, `b${e.chave}${o}`)), m) {
|
|
6738
|
-
let n =
|
|
7473
|
+
let n = ls(s, {
|
|
6739
7474
|
...M(v(e)),
|
|
6740
7475
|
unidade: void 0
|
|
6741
7476
|
});
|
|
@@ -6745,7 +7480,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6745
7480
|
y: d + f / 2 + 4,
|
|
6746
7481
|
textAnchor: s < 0 ? "end" : "start",
|
|
6747
7482
|
children: n
|
|
6748
|
-
}, `r${e.chave}${o}`)) :
|
|
7483
|
+
}, `r${e.chave}${o}`)) : ws(n) <= t + 6 && Oe.push(/* @__PURE__ */ K("text", {
|
|
6749
7484
|
className: "lp-graf-texto lp-graf-depois",
|
|
6750
7485
|
x: d + f / 2,
|
|
6751
7486
|
y: s < 0 ? c + 14 : c - 4,
|
|
@@ -6763,9 +7498,9 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6763
7498
|
});
|
|
6764
7499
|
if (u && e === L) {
|
|
6765
7500
|
let r = ge(t);
|
|
6766
|
-
|
|
7501
|
+
Vs(i).forEach((t, i) => {
|
|
6767
7502
|
if (t.length < 2) return;
|
|
6768
|
-
let a = `${
|
|
7503
|
+
let a = `${Bs(t)}L${t[t.length - 1][0].toFixed(1)} ${r.toFixed(1)}L${t[0][0].toFixed(1)} ${r.toFixed(1)}Z`;
|
|
6769
7504
|
ke.push(/* @__PURE__ */ K("path", {
|
|
6770
7505
|
className: "lp-graf-area-serie",
|
|
6771
7506
|
d: a,
|
|
@@ -6775,10 +7510,10 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6775
7510
|
}
|
|
6776
7511
|
ke.push(/* @__PURE__ */ K("path", {
|
|
6777
7512
|
className: "lp-graf-linha",
|
|
6778
|
-
d:
|
|
7513
|
+
d: Bs(i),
|
|
6779
7514
|
stroke: n,
|
|
6780
7515
|
strokeDasharray: e.tracejada ? "6 4" : void 0
|
|
6781
|
-
}, `l${e.chave}`)),
|
|
7516
|
+
}, `l${e.chave}`)), Vs(i).forEach((t, r) => {
|
|
6782
7517
|
(Ee || t.length === 1) && t.forEach(([t, i], a) => ke.push(/* @__PURE__ */ K("circle", {
|
|
6783
7518
|
className: "lp-graf-ponto",
|
|
6784
7519
|
cx: t,
|
|
@@ -6846,8 +7581,8 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6846
7581
|
className: "lp-graf-texto",
|
|
6847
7582
|
x: H(e),
|
|
6848
7583
|
y: fe + 17,
|
|
6849
|
-
textAnchor:
|
|
6850
|
-
children:
|
|
7584
|
+
textAnchor: Us(H(e), us(e, a), g),
|
|
7585
|
+
children: us(e, a)
|
|
6851
7586
|
})] }, `g${e}`)) : H.passos.map((e, t) => /* @__PURE__ */ q("g", { children: [/* @__PURE__ */ K("line", {
|
|
6852
7587
|
className: "lp-graf-grade",
|
|
6853
7588
|
x1: z,
|
|
@@ -6865,7 +7600,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6865
7600
|
className: "lp-graf-texto",
|
|
6866
7601
|
x: B + 6,
|
|
6867
7602
|
y: pe(e) + 4,
|
|
6868
|
-
children:
|
|
7603
|
+
children: us(e, o)
|
|
6869
7604
|
}, `d${e}`)),
|
|
6870
7605
|
R && /* @__PURE__ */ K("text", {
|
|
6871
7606
|
className: "lp-graf-texto lp-graf-texto--eixo",
|
|
@@ -6916,7 +7651,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6916
7651
|
className: "lp-graf-texto",
|
|
6917
7652
|
x: e.x,
|
|
6918
7653
|
y: fe + 17,
|
|
6919
|
-
textAnchor:
|
|
7654
|
+
textAnchor: Us(e.x, e.texto, g),
|
|
6920
7655
|
children: e.texto
|
|
6921
7656
|
}, `x${t}`))] }),
|
|
6922
7657
|
(p || H.de < 0 && H.ate > 0) && (E ? /* @__PURE__ */ K("line", {
|
|
@@ -6988,7 +7723,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6988
7723
|
}, `m${e.chave}`);
|
|
6989
7724
|
})
|
|
6990
7725
|
]
|
|
6991
|
-
}), x !== null && /* @__PURE__ */ K(
|
|
7726
|
+
}), x !== null && /* @__PURE__ */ K(Ns, {
|
|
6992
7727
|
x: E ? B : Me ?? z,
|
|
6993
7728
|
y: E ? Math.min(ue - 70, U.centro(x) + U.passo / 2 + 4) : V,
|
|
6994
7729
|
largura: g,
|
|
@@ -6998,13 +7733,13 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6998
7733
|
}), /* @__PURE__ */ K("div", {
|
|
6999
7734
|
className: "lp-sr",
|
|
7000
7735
|
"aria-live": "polite",
|
|
7001
|
-
children: x === null ? "" :
|
|
7736
|
+
children: x === null ? "" : Ps(y[x], Ce(x))
|
|
7002
7737
|
})] });
|
|
7003
7738
|
}
|
|
7004
7739
|
//#endregion
|
|
7005
7740
|
//#region src/components/Grafico/GraficoLinha.tsx
|
|
7006
|
-
function
|
|
7007
|
-
return /* @__PURE__ */ K(
|
|
7741
|
+
function Ks({ series: e, ...t }) {
|
|
7742
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7008
7743
|
...t,
|
|
7009
7744
|
series: e.map((e) => ({
|
|
7010
7745
|
...e,
|
|
@@ -7015,8 +7750,8 @@ function bs({ series: e, ...t }) {
|
|
|
7015
7750
|
}
|
|
7016
7751
|
//#endregion
|
|
7017
7752
|
//#region src/components/Grafico/GraficoBarras.tsx
|
|
7018
|
-
function
|
|
7019
|
-
return /* @__PURE__ */ K(
|
|
7753
|
+
function qs({ series: e, ...t }) {
|
|
7754
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7020
7755
|
...t,
|
|
7021
7756
|
series: e.map((e) => ({
|
|
7022
7757
|
...e,
|
|
@@ -7027,8 +7762,8 @@ function xs({ series: e, ...t }) {
|
|
|
7027
7762
|
}
|
|
7028
7763
|
//#endregion
|
|
7029
7764
|
//#region src/components/Grafico/GraficoCombinado.tsx
|
|
7030
|
-
function
|
|
7031
|
-
return /* @__PURE__ */ K(
|
|
7765
|
+
function Js({ barras: e = [], linhas: t = [], eixoYDireito: n, ...r }) {
|
|
7766
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7032
7767
|
...r,
|
|
7033
7768
|
eixoYDireito: n ?? {},
|
|
7034
7769
|
series: [...e.map((e) => ({
|
|
@@ -7042,15 +7777,15 @@ function Ss({ barras: e = [], linhas: t = [], eixoYDireito: n, ...r }) {
|
|
|
7042
7777
|
}
|
|
7043
7778
|
//#endregion
|
|
7044
7779
|
//#region src/components/Grafico/GraficoDispersao.tsx
|
|
7045
|
-
var
|
|
7780
|
+
var Ys = new Intl.NumberFormat("pt-BR", {
|
|
7046
7781
|
minimumFractionDigits: 2,
|
|
7047
7782
|
maximumFractionDigits: 2
|
|
7048
7783
|
});
|
|
7049
|
-
function
|
|
7784
|
+
function Xs(e) {
|
|
7050
7785
|
return e ? e.rotulo && e.unidade ? `${e.rotulo} (${e.unidade})` : e.rotulo ?? e.unidade ?? "" : "";
|
|
7051
7786
|
}
|
|
7052
|
-
function
|
|
7053
|
-
let { dados: t, chaveX: n, chaveY: r, chaveRotulo: i, chaveDestaque: a, regressao: o, eixoX: s, eixoY: c } = e, { rotuloPontos: l = "Pontos", rotuloDestaque: u = "Destaque", rotuloRegressao: d = "Tendência linear" } = e, [f, p] =
|
|
7787
|
+
function Zs(e) {
|
|
7788
|
+
let { dados: t, chaveX: n, chaveY: r, chaveRotulo: i, chaveDestaque: a, regressao: o, eixoX: s, eixoY: c } = e, { rotuloPontos: l = "Pontos", rotuloDestaque: u = "Destaque", rotuloRegressao: d = "Tendência linear" } = e, [f, p] = js(), m = [
|
|
7054
7789
|
{
|
|
7055
7790
|
chave: "pontos",
|
|
7056
7791
|
rotulo: l,
|
|
@@ -7081,18 +7816,18 @@ function Ts(e) {
|
|
|
7081
7816
|
}] : [],
|
|
7082
7817
|
{
|
|
7083
7818
|
campo: n,
|
|
7084
|
-
rotulo:
|
|
7819
|
+
rotulo: Xs(s) || n,
|
|
7085
7820
|
alinhamento: "direita",
|
|
7086
|
-
formato: (e) =>
|
|
7821
|
+
formato: (e) => ls(ds(e), {
|
|
7087
7822
|
...s,
|
|
7088
7823
|
unidade: void 0
|
|
7089
7824
|
})
|
|
7090
7825
|
},
|
|
7091
7826
|
{
|
|
7092
7827
|
campo: r,
|
|
7093
|
-
rotulo:
|
|
7828
|
+
rotulo: Xs(c) || r,
|
|
7094
7829
|
alinhamento: "direita",
|
|
7095
|
-
formato: (e) =>
|
|
7830
|
+
formato: (e) => ls(ds(e), {
|
|
7096
7831
|
...c,
|
|
7097
7832
|
unidade: void 0
|
|
7098
7833
|
})
|
|
@@ -7105,23 +7840,23 @@ function Ts(e) {
|
|
|
7105
7840
|
],
|
|
7106
7841
|
registros: t
|
|
7107
7842
|
});
|
|
7108
|
-
return /* @__PURE__ */ K(
|
|
7843
|
+
return /* @__PURE__ */ K(As, {
|
|
7109
7844
|
...e,
|
|
7110
7845
|
semDados: t.length === 0,
|
|
7111
7846
|
itensLegenda: m,
|
|
7112
7847
|
aoAlternarSerie: (e) => p(e, m.length),
|
|
7113
7848
|
tabela: h,
|
|
7114
|
-
children: (t) => /* @__PURE__ */ K(
|
|
7849
|
+
children: (t) => /* @__PURE__ */ K(Qs, {
|
|
7115
7850
|
...e,
|
|
7116
7851
|
largura: t,
|
|
7117
7852
|
ocultas: f
|
|
7118
7853
|
})
|
|
7119
7854
|
});
|
|
7120
7855
|
}
|
|
7121
|
-
function
|
|
7856
|
+
function Qs({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixoY: a, chaveX: o, chaveY: s, chaveRotulo: c, chaveDestaque: l, regressao: u, animacao: d, largura: f, ocultas: p }) {
|
|
7122
7857
|
let m = [];
|
|
7123
7858
|
r.forEach((e, t) => {
|
|
7124
|
-
let n =
|
|
7859
|
+
let n = ds(e[o]), r = ds(e[s]);
|
|
7125
7860
|
n !== null && r !== null && m.push({
|
|
7126
7861
|
indice: t,
|
|
7127
7862
|
x: n,
|
|
@@ -7130,18 +7865,18 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7130
7865
|
rotulo: c ? String(e[c] ?? "") : `Ponto ${t + 1}`
|
|
7131
7866
|
});
|
|
7132
7867
|
}), m.sort((e, t) => e.x - t.x || e.y - t.y);
|
|
7133
|
-
let h = m.filter((e) => !p.has(e.destaque ? "destaque" : "pontos")), { ativo: g, setAtivo: _, aoTeclar: v } =
|
|
7868
|
+
let h = m.filter((e) => !p.has(e.destaque ? "destaque" : "pontos")), { ativo: g, setAtivo: _, aoTeclar: v } = Ms(h.length), [y, b] = X(!1), x = u ? Ds(m) : null, S = Xs(i), C = Xs(a), w = C ? 24 : 10, T = S ? 42 : 26, E = w, D = n - T, O = hs(m.map((e) => e.y), a, Math.max(2, Math.round((D - E) / 50)), !1), k = O.passos.map((e) => us(e, a)), A = Math.max(28, Math.max(...k.map((e) => ws(e))) + 12), j = f - 12, M = hs(m.map((e) => e.x), i, Math.max(2, Math.floor((j - A) / 80)), !1), N = ms(M, A, j), P = ms(O, D, E), F = (e) => [{
|
|
7134
7869
|
chave: "x",
|
|
7135
7870
|
rotulo: i?.rotulo ?? o,
|
|
7136
7871
|
cor: e.destaque ? "var(--graf-2)" : "var(--graf-1)",
|
|
7137
7872
|
forma: "ponto",
|
|
7138
|
-
valor:
|
|
7873
|
+
valor: ls(e.x, i)
|
|
7139
7874
|
}, {
|
|
7140
7875
|
chave: "y",
|
|
7141
7876
|
rotulo: a?.rotulo ?? s,
|
|
7142
7877
|
cor: e.destaque ? "var(--graf-2)" : "var(--graf-1)",
|
|
7143
7878
|
forma: "ponto",
|
|
7144
|
-
valor:
|
|
7879
|
+
valor: ls(e.y, a)
|
|
7145
7880
|
}], I = (e) => {
|
|
7146
7881
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = null, a = 1024;
|
|
7147
7882
|
return h.forEach((e, t) => {
|
|
@@ -7162,7 +7897,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7162
7897
|
P(e(r))
|
|
7163
7898
|
]);
|
|
7164
7899
|
}
|
|
7165
|
-
let ee = x ? `r = ${
|
|
7900
|
+
let ee = x ? `r = ${Ys.format(x.r)} · r² = ${Ys.format(x.r2)} · n = ${x.n}` : "", R = g === null ? null : h[g];
|
|
7166
7901
|
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ q("div", {
|
|
7167
7902
|
className: "lp-graf-plot",
|
|
7168
7903
|
role: "img",
|
|
@@ -7202,7 +7937,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7202
7937
|
children: k[t]
|
|
7203
7938
|
})] }, `y${e}`)),
|
|
7204
7939
|
M.passos.map((e, t) => {
|
|
7205
|
-
let n =
|
|
7940
|
+
let n = us(e, i);
|
|
7206
7941
|
return /* @__PURE__ */ q("g", { children: [/* @__PURE__ */ K("line", {
|
|
7207
7942
|
className: "lp-graf-grade",
|
|
7208
7943
|
x1: N(e),
|
|
@@ -7274,7 +8009,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7274
8009
|
children: ee
|
|
7275
8010
|
})
|
|
7276
8011
|
]
|
|
7277
|
-
}), R && /* @__PURE__ */ K(
|
|
8012
|
+
}), R && /* @__PURE__ */ K(Ns, {
|
|
7278
8013
|
x: N(R.x),
|
|
7279
8014
|
y: Math.max(4, Math.min(n - 80, P(R.y) - 30)),
|
|
7280
8015
|
largura: f,
|
|
@@ -7284,14 +8019,14 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7284
8019
|
}), /* @__PURE__ */ K("div", {
|
|
7285
8020
|
className: "lp-sr",
|
|
7286
8021
|
"aria-live": "polite",
|
|
7287
|
-
children: R ?
|
|
8022
|
+
children: R ? Ps(R.rotulo, F(R)) : ""
|
|
7288
8023
|
})] });
|
|
7289
8024
|
}
|
|
7290
8025
|
//#endregion
|
|
7291
8026
|
//#region src/components/Grafico/MapaCalor.tsx
|
|
7292
|
-
var
|
|
7293
|
-
function
|
|
7294
|
-
let { linhas: t, colunas: n, valores: r, formatar: i, unidade: a, rotuloLinhas: o = "Linha" } = e, s = new Map(r.map((e) => [
|
|
8027
|
+
var $s = 5, ec = (e, t) => `${e}\u0000${t}`;
|
|
8028
|
+
function tc(e) {
|
|
8029
|
+
let { linhas: t, colunas: n, valores: r, formatar: i, unidade: a, rotuloLinhas: o = "Linha" } = e, s = new Map(r.map((e) => [ec(e.linha, e.coluna), e.valor])), c = {
|
|
7295
8030
|
formatar: i,
|
|
7296
8031
|
unidade: a
|
|
7297
8032
|
}, l = () => ({
|
|
@@ -7302,19 +8037,19 @@ function ks(e) {
|
|
|
7302
8037
|
campo: `c${t}`,
|
|
7303
8038
|
rotulo: String(e),
|
|
7304
8039
|
alinhamento: "direita",
|
|
7305
|
-
formato: (e) =>
|
|
8040
|
+
formato: (e) => ls(typeof e == "number" ? e : null, { formatar: i })
|
|
7306
8041
|
}))],
|
|
7307
8042
|
registros: t.map((e) => {
|
|
7308
8043
|
let t = { __linha: String(e) };
|
|
7309
|
-
return n.forEach((n, r) => t[`c${r}`] = s.get(
|
|
8044
|
+
return n.forEach((n, r) => t[`c${r}`] = s.get(ec(e, n)) ?? null), t;
|
|
7310
8045
|
})
|
|
7311
8046
|
});
|
|
7312
|
-
return /* @__PURE__ */ K(
|
|
8047
|
+
return /* @__PURE__ */ K(As, {
|
|
7313
8048
|
...e,
|
|
7314
8049
|
legenda: !1,
|
|
7315
8050
|
semDados: !t.length || !n.length,
|
|
7316
8051
|
tabela: l,
|
|
7317
|
-
children: (t) => /* @__PURE__ */ K(
|
|
8052
|
+
children: (t) => /* @__PURE__ */ K(nc, {
|
|
7318
8053
|
...e,
|
|
7319
8054
|
largura: t,
|
|
7320
8055
|
mapa: s,
|
|
@@ -7322,8 +8057,8 @@ function ks(e) {
|
|
|
7322
8057
|
})
|
|
7323
8058
|
});
|
|
7324
8059
|
}
|
|
7325
|
-
function
|
|
7326
|
-
let [f, p] = X(null), m = [...u.values()].filter((e) => typeof e == "number" && Number.isFinite(e)), h = a ?? (m.length ? Math.min(...m) : 0), g = o ?? (m.length ? Math.max(...m) : 1), _ = r.some((e) => i.some((t) => u.get(
|
|
8060
|
+
function nc({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, minimo: a, maximo: o, legendaEscala: s = !0, animacao: c, largura: l, mapa: u, eixo: d }) {
|
|
8061
|
+
let [f, p] = X(null), m = [...u.values()].filter((e) => typeof e == "number" && Number.isFinite(e)), h = a ?? (m.length ? Math.min(...m) : 0), g = o ?? (m.length ? Math.max(...m) : 1), _ = r.some((e) => i.some((t) => u.get(ec(e, t)) == null)), v = (e) => g === h ? $s : Math.min($s, Math.max(1, Math.floor((e - h) / (g - h) * $s) + 1)), y = (e, t) => u.get(ec(r[e], i[t])) ?? null, b = f ? `${r[f[0]]} · ${i[f[1]]}: ${ls(y(f[0], f[1]), d)}` : "", x = (e) => {
|
|
7327
8062
|
let [t, n] = f ?? [0, 0], a = {
|
|
7328
8063
|
ArrowUp: [t - 1, n],
|
|
7329
8064
|
ArrowDown: [t + 1, n],
|
|
@@ -7335,7 +8070,7 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7335
8070
|
if (e.key === "Escape") return p(null);
|
|
7336
8071
|
let o = a[e.key];
|
|
7337
8072
|
o && (e.preventDefault(), p([Math.min(r.length - 1, Math.max(0, o[0])), Math.min(i.length - 1, Math.max(0, o[1]))]));
|
|
7338
|
-
}, S = (l - (Math.max(...r.map((e) =>
|
|
8073
|
+
}, S = (l - (Math.max(...r.map((e) => ws(String(e)))) + 8)) / Math.max(1, i.length), C = Math.max(...i.map((e) => ws(String(e)))), w = Math.max(1, Math.ceil((C + 4) / Math.max(1, S))), T = {
|
|
7339
8074
|
"--mapa-colunas": i.length,
|
|
7340
8075
|
maxHeight: `${n}px`
|
|
7341
8076
|
};
|
|
@@ -7389,13 +8124,13 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7389
8124
|
}), s && /* @__PURE__ */ q("span", {
|
|
7390
8125
|
className: "lp-graf-mapa-escala",
|
|
7391
8126
|
children: [
|
|
7392
|
-
/* @__PURE__ */ K("span", { children:
|
|
8127
|
+
/* @__PURE__ */ K("span", { children: ls(h, d) }),
|
|
7393
8128
|
/* @__PURE__ */ K("span", {
|
|
7394
8129
|
className: "lp-graf-mapa-cores",
|
|
7395
8130
|
"aria-hidden": "true",
|
|
7396
|
-
children: Array.from({ length:
|
|
8131
|
+
children: Array.from({ length: $s }, (e, t) => /* @__PURE__ */ K("span", { style: { background: `var(--graf-seq-${t + 1})` } }, t))
|
|
7397
8132
|
}),
|
|
7398
|
-
/* @__PURE__ */ K("span", { children:
|
|
8133
|
+
/* @__PURE__ */ K("span", { children: ls(g, d) }),
|
|
7399
8134
|
_ && /* @__PURE__ */ q("span", {
|
|
7400
8135
|
className: "lp-graf-mapa-falha",
|
|
7401
8136
|
children: [/* @__PURE__ */ K("span", {
|
|
@@ -7410,8 +8145,8 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7410
8145
|
}
|
|
7411
8146
|
//#endregion
|
|
7412
8147
|
//#region src/components/Conversa/Conversa.tsx
|
|
7413
|
-
var
|
|
7414
|
-
function
|
|
8148
|
+
var rc = 24;
|
|
8149
|
+
function ic({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Conversa", rotuloIrParaFim: a = "Ir para o fim", className: o }) {
|
|
7415
8150
|
let s = Y(null), c = Y(null), l = Y(!0), [u, d] = X(!1), f = vt.toArray(e), p = f.length === 0, m = Y(f.length), h = f.length > m.current && f.slice(m.current).some((e) => Ct(e) && e.props.autor === "usuario"), g = wt(() => {
|
|
7416
8151
|
let e = s.current;
|
|
7417
8152
|
e && (e.scrollTop = e.scrollHeight, l.current = !0, d(!1));
|
|
@@ -7430,7 +8165,7 @@ function Ms({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Co
|
|
|
7430
8165
|
let _ = () => {
|
|
7431
8166
|
let e = s.current;
|
|
7432
8167
|
if (!e) return;
|
|
7433
|
-
let t = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
8168
|
+
let t = e.scrollHeight - e.scrollTop - e.clientHeight <= rc;
|
|
7434
8169
|
l.current = t, d(!t);
|
|
7435
8170
|
}, v = r ? { "--conversa-largura": r } : void 0;
|
|
7436
8171
|
return /* @__PURE__ */ q("div", {
|
|
@@ -7475,10 +8210,10 @@ function Ms({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Co
|
|
|
7475
8210
|
}
|
|
7476
8211
|
//#endregion
|
|
7477
8212
|
//#region src/components/Mensagem/Mensagem.tsx
|
|
7478
|
-
function
|
|
8213
|
+
function ac(e) {
|
|
7479
8214
|
return e.toDateString() === (/* @__PURE__ */ new Date()).toDateString() ? Ln(e) : zn(e);
|
|
7480
8215
|
}
|
|
7481
|
-
function
|
|
8216
|
+
function oc({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i, estado: a = "concluida", erro: o, aoTentarNovamente: s, copiavel: c = !1, textoCopia: l, acoes: u, rodape: d, rotuloTentarNovamente: f = "Tentar novamente", rotuloCopiar: p = "Copiar mensagem", rotuloGerando: m = "Gerando resposta", rotuloEnviando: h = "Enviando", className: g }) {
|
|
7482
8217
|
let _ = Ur(), v = Y(null), y = Y(void 0), [b, x] = X(!1);
|
|
7483
8218
|
J(() => () => window.clearTimeout(y.current), []);
|
|
7484
8219
|
let S = t == null || t === !1 || t === "", C = typeof t == "string", w = a === "gerando", T = a === "erro", E = async () => {
|
|
@@ -7520,7 +8255,7 @@ function Ps({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i,
|
|
|
7520
8255
|
children: n
|
|
7521
8256
|
}), i && /* @__PURE__ */ K("time", {
|
|
7522
8257
|
dateTime: k,
|
|
7523
|
-
children: i instanceof Date ?
|
|
8258
|
+
children: i instanceof Date ? ac(i) : i
|
|
7524
8259
|
})]
|
|
7525
8260
|
}),
|
|
7526
8261
|
(!S || w || d) && /* @__PURE__ */ q("div", {
|
|
@@ -7592,7 +8327,7 @@ function Ps({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i,
|
|
|
7592
8327
|
}
|
|
7593
8328
|
//#endregion
|
|
7594
8329
|
//#region src/components/CampoMensagem/CampoMensagem.tsx
|
|
7595
|
-
var
|
|
8330
|
+
var sc = .8, cc = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r = !1, aoParar: i, desabilitado: a = !1, placeholder: o = "Escreva uma mensagem", maxCaracteres: s, linhasMaximas: c = 6, autoFocus: l, acoesExtras: u, rotulo: d = "Mensagem", rotuloEnviar: f = "Enviar mensagem", rotuloParar: p = "Parar", id: m, className: h }, g) {
|
|
7596
8331
|
let { id: _ } = Mi(m), v = Y(null);
|
|
7597
8332
|
Dt(g, () => v.current);
|
|
7598
8333
|
let y = e.trim(), b = !a && !r && y !== "" && (!s || e.length <= s), x = s ? e.length / s : 0, S = wt(() => {
|
|
@@ -7645,7 +8380,7 @@ var Fs = .8, Is = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r =
|
|
|
7645
8380
|
className: "lp-campo-mensagem-extras",
|
|
7646
8381
|
children: u
|
|
7647
8382
|
}),
|
|
7648
|
-
s && x >=
|
|
8383
|
+
s && x >= sc && /* @__PURE__ */ q("span", {
|
|
7649
8384
|
className: Z("lp-campo-mensagem-contador", x >= 1 ? "is-err" : x >= .9 && "is-warn"),
|
|
7650
8385
|
"aria-hidden": "true",
|
|
7651
8386
|
children: [
|
|
@@ -7672,8 +8407,8 @@ var Fs = .8, Is = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r =
|
|
|
7672
8407
|
})
|
|
7673
8408
|
]
|
|
7674
8409
|
});
|
|
7675
|
-
}),
|
|
7676
|
-
function
|
|
8410
|
+
}), lc = (e) => e === 1 ? "1 fonte" : `${e} fontes`;
|
|
8411
|
+
function uc({ children: e, mais: t, menos: n }) {
|
|
7677
8412
|
let r = Y(null), [i, a] = X(!1), [o, s] = X(!1);
|
|
7678
8413
|
return Ot(() => {
|
|
7679
8414
|
let e = r.current;
|
|
@@ -7694,7 +8429,7 @@ function Rs({ children: e, mais: t, menos: n }) {
|
|
|
7694
8429
|
children: i ? n : t
|
|
7695
8430
|
})] });
|
|
7696
8431
|
}
|
|
7697
|
-
function
|
|
8432
|
+
function dc({ itens: e, abertoInicial: t = !1, rotulo: n = lc, rotuloMostrarMais: r = "Mostrar trecho completo", rotuloMostrarMenos: i = "Mostrar menos", className: a }) {
|
|
7698
8433
|
let o = Et(), [s, c] = X(t);
|
|
7699
8434
|
return e.length ? /* @__PURE__ */ q("div", {
|
|
7700
8435
|
className: Z("lp-referencias", s && "is-aberto", a),
|
|
@@ -7740,7 +8475,7 @@ function zs({ itens: e, abertoInicial: t = !1, rotulo: n = Ls, rotuloMostrarMais
|
|
|
7740
8475
|
className: "lp-referencias-detalhe",
|
|
7741
8476
|
children: e.detalhe
|
|
7742
8477
|
})]
|
|
7743
|
-
}), e.trecho && /* @__PURE__ */ K(
|
|
8478
|
+
}), e.trecho && /* @__PURE__ */ K(uc, {
|
|
7744
8479
|
mais: r,
|
|
7745
8480
|
menos: i,
|
|
7746
8481
|
children: e.trecho
|
|
@@ -7753,24 +8488,24 @@ function zs({ itens: e, abertoInicial: t = !1, rotulo: n = Ls, rotuloMostrarMais
|
|
|
7753
8488
|
}
|
|
7754
8489
|
//#endregion
|
|
7755
8490
|
//#region src/components/Arquivo/VisualizadorArquivo.tsx
|
|
7756
|
-
var
|
|
8491
|
+
var fc = [
|
|
7757
8492
|
1,
|
|
7758
8493
|
1.5,
|
|
7759
8494
|
2,
|
|
7760
8495
|
3,
|
|
7761
8496
|
4
|
|
7762
8497
|
];
|
|
7763
|
-
function
|
|
8498
|
+
function pc({ arquivo: e, aoFalhar: t, className: n }) {
|
|
7764
8499
|
let r = e ? `${e.url ?? ""}|${e.nome}` : "vazio";
|
|
7765
8500
|
return /* @__PURE__ */ K("div", {
|
|
7766
8501
|
className: Z("lp-visu", n),
|
|
7767
|
-
children: /* @__PURE__ */ K(
|
|
8502
|
+
children: /* @__PURE__ */ K(mc, {
|
|
7768
8503
|
arquivo: e,
|
|
7769
8504
|
aoFalhar: t
|
|
7770
8505
|
}, r)
|
|
7771
8506
|
});
|
|
7772
8507
|
}
|
|
7773
|
-
function
|
|
8508
|
+
function mc({ arquivo: e, aoFalhar: t }) {
|
|
7774
8509
|
let [n, r] = X(!1), i = e?.url?.trim(), a = e ? Jn(e.tipo, e.nome) : "outro", o = () => {
|
|
7775
8510
|
r(!0), e && t?.(e);
|
|
7776
8511
|
};
|
|
@@ -7793,7 +8528,7 @@ function Hs({ arquivo: e, aoFalhar: t }) {
|
|
|
7793
8528
|
})
|
|
7794
8529
|
});
|
|
7795
8530
|
}
|
|
7796
|
-
return a === "imagem" ? /* @__PURE__ */ K(
|
|
8531
|
+
return a === "imagem" ? /* @__PURE__ */ K(hc, {
|
|
7797
8532
|
url: i,
|
|
7798
8533
|
nome: e.nome,
|
|
7799
8534
|
aoFalhar: o
|
|
@@ -7825,11 +8560,11 @@ function Hs({ arquivo: e, aoFalhar: t }) {
|
|
|
7825
8560
|
]
|
|
7826
8561
|
});
|
|
7827
8562
|
}
|
|
7828
|
-
function
|
|
8563
|
+
function hc({ url: e, nome: t, aoFalhar: n }) {
|
|
7829
8564
|
let [r, i] = X(0), [a, o] = X(0), [s, c] = X({
|
|
7830
8565
|
x: 0,
|
|
7831
8566
|
y: 0
|
|
7832
|
-
}), l = Y(null), u = Y(null), d =
|
|
8567
|
+
}), l = Y(null), u = Y(null), d = fc[r], f = (e, t) => {
|
|
7833
8568
|
let n = l.current?.getBoundingClientRect();
|
|
7834
8569
|
if (!n) return {
|
|
7835
8570
|
x: e,
|
|
@@ -7841,7 +8576,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7841
8576
|
y: Math.max(-i, Math.min(i, t))
|
|
7842
8577
|
};
|
|
7843
8578
|
}, p = (e) => {
|
|
7844
|
-
let t = Math.max(0, Math.min(
|
|
8579
|
+
let t = Math.max(0, Math.min(fc.length - 1, e));
|
|
7845
8580
|
i(t), t === 0 && c({
|
|
7846
8581
|
x: 0,
|
|
7847
8582
|
y: 0
|
|
@@ -7873,7 +8608,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7873
8608
|
else return;
|
|
7874
8609
|
e.preventDefault();
|
|
7875
8610
|
},
|
|
7876
|
-
onDoubleClick: () => r === 0 ? i(
|
|
8611
|
+
onDoubleClick: () => r === 0 ? i(fc.indexOf(2)) : m(),
|
|
7877
8612
|
onPointerDown: (e) => {
|
|
7878
8613
|
d <= 1 || (e.currentTarget.setPointerCapture(e.pointerId), u.current = {
|
|
7879
8614
|
x: e.clientX,
|
|
@@ -7920,7 +8655,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7920
8655
|
aparencia: "texto",
|
|
7921
8656
|
dica: "Ampliar",
|
|
7922
8657
|
"aria-label": "Ampliar",
|
|
7923
|
-
disabled: r ===
|
|
8658
|
+
disabled: r === fc.length - 1,
|
|
7924
8659
|
onClick: () => p(r + 1)
|
|
7925
8660
|
}),
|
|
7926
8661
|
/* @__PURE__ */ K($, {
|
|
@@ -7945,13 +8680,13 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7945
8680
|
}
|
|
7946
8681
|
//#endregion
|
|
7947
8682
|
//#region src/components/Arquivo/DialogoArquivo.tsx
|
|
7948
|
-
var
|
|
7949
|
-
function
|
|
8683
|
+
var gc = "video, audio, input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]";
|
|
8684
|
+
function _c({ aberto: e, aoFechar: t, arquivos: n, indice: r, aoMudarIndice: i }) {
|
|
7950
8685
|
let a = n.length, o = Math.max(0, Math.min(r, a - 1)), s = n[o] ?? null;
|
|
7951
8686
|
return J(() => {
|
|
7952
8687
|
if (!e || a < 2) return;
|
|
7953
8688
|
let t = (e) => {
|
|
7954
|
-
e.target?.closest?.(
|
|
8689
|
+
e.target?.closest?.(gc) || (e.key === "ArrowLeft" && o > 0 ? i(o - 1) : e.key === "ArrowRight" && o < a - 1 && i(o + 1));
|
|
7955
8690
|
};
|
|
7956
8691
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
7957
8692
|
}, [
|
|
@@ -7993,14 +8728,14 @@ function Gs({ aberto: e, aoFechar: t, arquivos: n, indice: r, aoMudarIndice: i }
|
|
|
7993
8728
|
onClick: () => i(o + 1)
|
|
7994
8729
|
})
|
|
7995
8730
|
] }) : void 0,
|
|
7996
|
-
children: /* @__PURE__ */ K(
|
|
8731
|
+
children: /* @__PURE__ */ K(pc, { arquivo: s })
|
|
7997
8732
|
});
|
|
7998
8733
|
}
|
|
7999
8734
|
//#endregion
|
|
8000
8735
|
//#region src/components/Arquivo/CampoAnexo.tsx
|
|
8001
|
-
var
|
|
8736
|
+
var vc = (e) => `${e.nome}|${e.tamanho}`, yc = St(function({ rotulo: e, dica: t, erro: n, aviso: r, className: i, id: a, valor: o = [], aoMudar: s, accept: c, multiple: l = !0, maxTamanho: u = 0, minimo: d = 0, disabled: f = !1 }, p) {
|
|
8002
8737
|
let { id: m, msgId: h } = Mi(a), g = Y(null), _ = Y(/* @__PURE__ */ new Map()), v = Y(/* @__PURE__ */ new Map()), [y, b] = X(!1), [x, S] = X(""), [C, w] = X(null), [T, E] = X(!1), D = Tt(ki);
|
|
8003
|
-
Dt(p, () => ({ arquivoDe: (e) => _.current.get(
|
|
8738
|
+
Dt(p, () => ({ arquivoDe: (e) => _.current.get(vc(e)) ?? null }), []), J(() => () => v.current.forEach((e) => URL.revokeObjectURL(e)), []);
|
|
8004
8739
|
let O = (e) => {
|
|
8005
8740
|
if (!e?.length || f) return;
|
|
8006
8741
|
E(!0);
|
|
@@ -8010,7 +8745,7 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8010
8745
|
n.push(r.name);
|
|
8011
8746
|
continue;
|
|
8012
8747
|
}
|
|
8013
|
-
let e =
|
|
8748
|
+
let e = vc({
|
|
8014
8749
|
nome: r.name,
|
|
8015
8750
|
tamanho: r.size
|
|
8016
8751
|
});
|
|
@@ -8026,12 +8761,12 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8026
8761
|
if (S(n.length ? `${mn(n)} excede${n.length > 1 ? "m" : ""} ${Kn(u)}.` : ""), t.length) {
|
|
8027
8762
|
if (!l) s?.(t.slice(0, 1));
|
|
8028
8763
|
else {
|
|
8029
|
-
let e = new Set(o.map(
|
|
8030
|
-
s?.([...o, ...t.filter((t) => !e.has(
|
|
8764
|
+
let e = new Set(o.map(vc));
|
|
8765
|
+
s?.([...o, ...t.filter((t) => !e.has(vc(t)))]);
|
|
8031
8766
|
}
|
|
8032
8767
|
}
|
|
8033
8768
|
}, k = (e) => {
|
|
8034
|
-
E(!0), s?.(o.filter((t) =>
|
|
8769
|
+
E(!0), s?.(o.filter((t) => vc(t) !== vc(e)));
|
|
8035
8770
|
}, A = (e) => {
|
|
8036
8771
|
e.preventDefault(), b(!1), O(e.dataTransfer.files);
|
|
8037
8772
|
}, j = d > 0 && o.length < d && (T || D > 0), M = n || x || (j ? d === 1 ? "Anexe pelo menos um arquivo" : `Anexe pelo menos ${d} arquivos` : void 0);
|
|
@@ -8114,9 +8849,9 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8114
8849
|
severidade: "err",
|
|
8115
8850
|
onClick: () => k(e)
|
|
8116
8851
|
})]
|
|
8117
|
-
},
|
|
8852
|
+
}, vc(e)))
|
|
8118
8853
|
}),
|
|
8119
|
-
/* @__PURE__ */ K(
|
|
8854
|
+
/* @__PURE__ */ K(_c, {
|
|
8120
8855
|
aberto: C !== null,
|
|
8121
8856
|
aoFechar: () => w(null),
|
|
8122
8857
|
arquivos: o,
|
|
@@ -8125,18 +8860,18 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8125
8860
|
})
|
|
8126
8861
|
]
|
|
8127
8862
|
});
|
|
8128
|
-
}),
|
|
8863
|
+
}), bc = {
|
|
8129
8864
|
sm: "3rem",
|
|
8130
8865
|
md: "4.5rem",
|
|
8131
8866
|
lg: "6rem"
|
|
8132
|
-
},
|
|
8867
|
+
}, xc = (e) => (e == null ? [] : Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? {
|
|
8133
8868
|
nome: "",
|
|
8134
8869
|
tamanho: 0,
|
|
8135
8870
|
tipo: "image/*",
|
|
8136
8871
|
url: e
|
|
8137
8872
|
} : e).filter((e) => !!e?.url?.trim());
|
|
8138
|
-
function
|
|
8139
|
-
let f =
|
|
8873
|
+
function Sc({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampliavel: a = !1, indice: o, aoMudarIndice: s, aoAmpliar: c, semFoto: l, sobreposto: u, className: d }) {
|
|
8874
|
+
let f = xc(e), [p, m] = X(0), [h, g] = X(!1), _ = Math.max(0, Math.min(o ?? p, f.length - 1)), v = (e) => {
|
|
8140
8875
|
m(e), s?.(e);
|
|
8141
8876
|
}, y = f[_], b = {
|
|
8142
8877
|
height: r,
|
|
@@ -8149,7 +8884,7 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8149
8884
|
nome: t,
|
|
8150
8885
|
tom: "escuro",
|
|
8151
8886
|
formato: "quadrado",
|
|
8152
|
-
tamanho:
|
|
8887
|
+
tamanho: bc[n]
|
|
8153
8888
|
}), u && /* @__PURE__ */ K("div", {
|
|
8154
8889
|
className: "lp-foto-sobreposto",
|
|
8155
8890
|
children: u
|
|
@@ -8187,7 +8922,7 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8187
8922
|
className: "lp-foto-sobreposto",
|
|
8188
8923
|
children: u
|
|
8189
8924
|
}),
|
|
8190
|
-
a && /* @__PURE__ */ K(
|
|
8925
|
+
a && /* @__PURE__ */ K(_c, {
|
|
8191
8926
|
aberto: h,
|
|
8192
8927
|
aoFechar: () => g(!1),
|
|
8193
8928
|
arquivos: f.map((e, t) => ({
|
|
@@ -8201,6 +8936,6 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8201
8936
|
});
|
|
8202
8937
|
}
|
|
8203
8938
|
//#endregion
|
|
8204
|
-
export { _a as Aba, va as Abas, Aa as AcaoLinha, Oa as Acordeao, Oi as Alerta, Za as Avaliacao, oi as Avatar, to as BUSCA_ATRASO_MS, Co as Badge, Ia as Balao, ua as BarraBotoes, Ei as BoasVindas, $ as Botao, ko as BotaoFechar, ci as Busca, Si as CabecalhoPagina, Pi as Campo,
|
|
8939
|
+
export { _a as Aba, va as Abas, Aa as AcaoLinha, Oa as Acordeao, Oi as Alerta, Za as Avaliacao, oi as Avatar, to as BUSCA_ATRASO_MS, Co as Badge, Ia as Balao, ua as BarraBotoes, Ei as BoasVindas, $ as Botao, ko as BotaoFechar, ci as Busca, Si as CabecalhoPagina, Xo as CabecalhoSecao, Pi as Campo, yc as CampoAnexo, ro as CampoBusca, Vi as CampoCep, Gi as CampoChassi, io as CampoCidade, Ki as CampoCnh, zi as CampoCnpj, Ri as CampoCpf, Bi as CampoCpfCnpj, Yi as CampoData, Zi as CampoDataHora, Ui as CampoEmail, Xi as CampoHora, qi as CampoImei, ea as CampoInteiro, Fi as CampoMarcacao, cc as CampoMensagem, $i as CampoMoeda, Yo as CampoPesquisa, Hi as CampoPlaca, Wi as CampoRenavam, Ua as CampoSelect, Wa as CampoSelectMultiplo, na as CampoSenha, Ji as CampoTelefone, Ba as CampoTextarea, Ii as CampoTexto, Ja as CampoTipoPessoa, Ka as CampoUf, qa as CampoUfMultiplo, ya as Card, Zo as CardConteudo, ns as CardDepoimento, rs as CardPlano, es as CardRecurso, Ao as Carregando, Ca as Carrossel, Qa as Chip, Eo as Citacao, wo as ComBadge, as as ConteudoArtigo, ic as Conversa, Jo as DestaqueSite, So as Detalhes, ra as Dialogo, _c as DialogoArquivo, Dr as Dica, un as ESTADOS, Ya as Escolha, xi as Estrutura, Uo as EstruturaSite, is as FaixaChamada, ts as FaixaNumeros, Oo as Figura, $o as FiltroPilulas, $a as Filtros, Ra as Form, za as FormSecao, Sc as Foto, Mo as Girador, qs as GraficoBarras, Js as GraficoCombinado, Zs as GraficoDispersao, Ks as GraficoLinha, la as GrupoAlternancia, ca as GrupoBotoes, ba as GrupoCards, Q as Icone, Do as Imagem, bo as Indicador, xo as Indicadores, ka as ItemAcordeao, ho as ItemLista, mo as Lista, go as ListaCards, Qo as ListaNumerada, Vt as MASCARAS, Ai as MSG_OBRIGATORIO, tc as MapaCalor, oc as Mensagem, ga as MenuSuspenso, _o as Minigrafico, os as Newsletter, fn as OPCOES_ESTADOS, ur as PICKLIST_VAZIO, ar as POLITICA_PADRAO, oo as Paginacao, eo as Picklist, To as Placa, Fo as Progresso, Fr as ProvedorConfirmacao, ei as ProvedorPreferencias, Vr as ProvedorToast, ni as ProvedorUi, Ea as QuadroArrastavel, xa as Recolhivel, dc as Referencias, ki as RevelarCamposCtx, Go as RodapeSite, tr as SEVERIDADES, Ko as SecaoSite, so as Skeleton, ia as Status, ss as SumarioPagina, ln as TIPOS_CAMPO, Ht as TIPOS_DE_CAMPO, pn as TIPOS_PESSOA, po as Tabela, sa as TelaErro, oa as TelaLogin, Rr as Toast, mi as Trilha, dn as UF_SIGLAS, co as Vazio, pc as VisualizadorArquivo, er as apiDefinida, Bt as aplicarMascara, fi as caminhoNoMenu, Z as cx, Vn as dataBrParaIso, Xn as decodificarJwt, ir as ehSeveridade, Zn as expiracaoJwt, vr as filtrarItens, cr as forcaSenha, Kn as formatBytes, An as formatCpfCnpj, Fn as formatDataBr, zn as formatDataHoraBr, Ln as formatHoraBr, En as formatarNumero, Yn as iconeArquivo, On as iniciais, Xt as isCep, en as isChassi, tn as isCnh, qt as isCnpj, Kt as isCpf, Jt as isCpfCnpj, an as isData, on as isDataHora, Yt as isEmail, rn as isHora, nn as isImei, Qt as isPlaca, $t as isRenavam, Zt as isTelefone, Bn as isoParaDataBr, Qn as jwtExpirado, Cn as lerCampo, mn as listaPorExtenso, $n as margemRefreshJwt, pr as moverParaAlvo, mr as moverParaFonte, hr as moverTudoParaAlvo, gr as moverTudoParaFonte, Mn as nomeCurto, Wn as nomeDeArquivo, jn as nomeProprio, kn as normalizar, dr as normalizarPicklistValor, xn as numeroPorExtenso, Pn as parseDataBr, Rn as parseDataHoraBr, In as parseHoraBr, Nt as registrarIcones, Ds as regressaoLinear, _r as reordenarLista, Dn as saudacaoPorHora, $r as scriptTemaInicial, zt as semMascara, lr as senhasIguais, rr as severidadeCor, Jn as tipoDeArquivo, Un as tituloDeEntidade, no as useBuscaAssincrona, Mi as useCampoIds, Ir as useConfirmacao, ti as usePreferencias, ri as usePreferenciasOpcional, Hr as useToast, di as useTrilha, ji as useValidacaoCampo, cn as validar, sr as validarSenha, sn as validarTelefone, lo as valorDoCampo, Sn as valorMonetarioPorExtenso };
|
|
8205
8940
|
|
|
8206
8941
|
//# sourceMappingURL=index.js.map
|