@sfperusacdev/sf-ui 0.1.30 → 0.1.31
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/dist/sf-ui.css +1 -1
- package/dist/sf-ui.js +627 -507
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/cards/Badge.d.ts +6 -3
- package/dist/types/src/components/cards/Badge.test.d.ts +1 -0
- package/dist/types/src/components/cards/KPICard.d.ts +8 -2
- package/dist/types/src/components/cards/index.d.ts +2 -1
- package/dist/types/src/components/dashboard/AlertRowList.test.d.ts +1 -0
- package/dist/types/src/components/dashboard/EventLog.d.ts +7 -2
- package/dist/types/src/components/dashboard/index.d.ts +1 -1
- package/dist/types/src/components/dashboard/types.d.ts +13 -0
- package/dist/types/src/components/layout/FilterBar.d.ts +4 -1
- package/package.json +1 -1
package/dist/sf-ui.js
CHANGED
|
@@ -7433,17 +7433,27 @@ var dr = (e) => {
|
|
|
7433
7433
|
disabled: e.disabled,
|
|
7434
7434
|
children: e.label
|
|
7435
7435
|
}, e.value))]
|
|
7436
|
-
}), pa = ({ value: e, defaultValue: t, onChange: n, placeholder: r, disabled: i, className: a, id: o, "aria-label": s }) =>
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7436
|
+
}), pa = ({ value: e, defaultValue: t, onChange: n, placeholder: r, disabled: i, className: a, id: o, "aria-label": s, leadingIcon: c }) => {
|
|
7437
|
+
let l = /* @__PURE__ */ v("input", {
|
|
7438
|
+
type: "search",
|
|
7439
|
+
id: o,
|
|
7440
|
+
"aria-label": s ?? r,
|
|
7441
|
+
placeholder: r,
|
|
7442
|
+
value: e,
|
|
7443
|
+
defaultValue: e === void 0 ? t : void 0,
|
|
7444
|
+
disabled: i,
|
|
7445
|
+
className: (0, X.default)("sf-filter-bar__input", a),
|
|
7446
|
+
onChange: n ? (e) => n(e.target.value) : void 0
|
|
7447
|
+
});
|
|
7448
|
+
return c ? /* @__PURE__ */ y("div", {
|
|
7449
|
+
className: "sf-filter-bar__text sf-filter-bar__text--with-icon",
|
|
7450
|
+
children: [/* @__PURE__ */ v("span", {
|
|
7451
|
+
className: "sf-filter-bar__text-icon",
|
|
7452
|
+
"aria-hidden": "true",
|
|
7453
|
+
children: c
|
|
7454
|
+
}), l]
|
|
7455
|
+
}) : l;
|
|
7456
|
+
}, ma = ({ title: e, searchValue: t = "", onSearchChange: n, searchPlaceholder: r = "Buscar en todos los campos…", onNew: i, newLabel: a = "Nuevo", actions: o, children: s, footer: c, className: l, ariaLabel: u = "Listado maestro" }) => /* @__PURE__ */ y("section", {
|
|
7447
7457
|
className: (0, X.default)("sf-maestro-layout", l),
|
|
7448
7458
|
"aria-label": u,
|
|
7449
7459
|
children: [
|
|
@@ -7626,7 +7636,7 @@ var dr = (e) => {
|
|
|
7626
7636
|
children: e
|
|
7627
7637
|
}, t))]
|
|
7628
7638
|
});
|
|
7629
|
-
}, ba = ({ variant: e = "neutral", size: t = "sm", shape: n = "pill", className: r }) => (0, X.default)("sf-badge", t === "sm" ? "sf-badge--sm" : "sf-badge--md", n === "circle" && "sf-badge--circle", e === "neutral" && "sf-badge--neutral", e === "primary" && "sf-badge--primary", e === "success" && "sf-badge--success", e === "warning" && "sf-badge--warning", e === "danger" && "sf-badge--danger", e === "info" && "sf-badge--info", r), xa = (e) => (0, X.default)("sf-badge-dot", e === "neutral" && "sf-badge-dot--neutral", e === "primary" && "sf-badge-dot--primary", e === "success" && "sf-badge-dot--success", e === "warning" && "sf-badge-dot--warning", e === "danger" && "sf-badge-dot--danger", e === "info" && "sf-badge-dot--info"), Sa = ({ label: e, variant: t = "neutral", dot: n = !1, size: r = "sm", shape: i = "pill", className: a }) => i === "circle" ? /* @__PURE__ */ v("span", {
|
|
7639
|
+
}, ba = ({ variant: e = "neutral", size: t = "sm", shape: n = "pill", className: r }) => (0, X.default)("sf-badge", t === "sm" ? "sf-badge--sm" : "sf-badge--md", n === "circle" && "sf-badge--circle", e === "neutral" && "sf-badge--neutral", e === "primary" && "sf-badge--primary", e === "success" && "sf-badge--success", e === "warning" && "sf-badge--warning", e === "danger" && "sf-badge--danger", e === "info" && "sf-badge--info", r), xa = (e) => (0, X.default)("sf-badge-dot", e === "neutral" && "sf-badge-dot--neutral", e === "primary" && "sf-badge-dot--primary", e === "success" && "sf-badge-dot--success", e === "warning" && "sf-badge-dot--warning", e === "danger" && "sf-badge-dot--danger", e === "info" && "sf-badge-dot--info"), Sa = ({ label: e, variant: t = "neutral", dot: n = !1, size: r = "sm", shape: i = "pill", className: a, icon: o }) => i === "circle" ? /* @__PURE__ */ v("span", {
|
|
7630
7640
|
className: ba({
|
|
7631
7641
|
variant: t,
|
|
7632
7642
|
size: r,
|
|
@@ -7640,10 +7650,18 @@ var dr = (e) => {
|
|
|
7640
7650
|
size: r,
|
|
7641
7651
|
className: a
|
|
7642
7652
|
}),
|
|
7643
|
-
children: [
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7653
|
+
children: [
|
|
7654
|
+
n && /* @__PURE__ */ v("span", {
|
|
7655
|
+
className: xa(t),
|
|
7656
|
+
"aria-hidden": "true"
|
|
7657
|
+
}),
|
|
7658
|
+
o && /* @__PURE__ */ v("span", {
|
|
7659
|
+
className: "sf-badge__icon",
|
|
7660
|
+
"aria-hidden": "true",
|
|
7661
|
+
children: o
|
|
7662
|
+
}),
|
|
7663
|
+
e
|
|
7664
|
+
]
|
|
7647
7665
|
}), Ca = ({ size: e = 15 }) => /* @__PURE__ */ v("svg", {
|
|
7648
7666
|
width: e,
|
|
7649
7667
|
height: e,
|
|
@@ -9303,13 +9321,13 @@ var dr = (e) => {
|
|
|
9303
9321
|
red: "var(--sf-kpi-accent-red)",
|
|
9304
9322
|
teal: "var(--sf-kpi-accent-teal)",
|
|
9305
9323
|
slate: "var(--sf-kpi-accent-slate)"
|
|
9306
|
-
}, Ho = (e) => `${e > 0 ? "+" : ""}${e}%`, Uo = (e) => typeof e == "number" ? e.toLocaleString("es-PE") : e, Wo = (e, t) => !Number.isFinite(e) || !Number.isFinite(t) || t <= 0 ? null : Math.min(100, Math.max(0, e / t * 100)), Go = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, accentTone: s, progress: c, layout: l = "stacked", accentBar: u,
|
|
9307
|
-
let
|
|
9308
|
-
|
|
9309
|
-
},
|
|
9324
|
+
}, Ho = (e) => `${e > 0 ? "+" : ""}${e}%`, Uo = (e) => typeof e == "number" ? e.toLocaleString("es-PE") : e, Wo = (e, t) => !Number.isFinite(e) || !Number.isFinite(t) || t <= 0 ? null : Math.min(100, Math.max(0, e / t * 100)), Go = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, accentTone: s, progress: c, layout: l = "stacked", accentBar: u, iconStyle: d = "solid", className: f, onClick: p }) => {
|
|
9325
|
+
let m = a != null, h = m && a >= 0, g = c ? Wo(c.value, c.max) : null, _ = c?.label ?? (g === null ? void 0 : `${Math.round(g)}%`), b = u ?? l === "stacked", x = (e) => {
|
|
9326
|
+
p && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p());
|
|
9327
|
+
}, S = g !== null && /* @__PURE__ */ y("div", {
|
|
9310
9328
|
className: "mt-2 flex items-center gap-2",
|
|
9311
9329
|
role: "progressbar",
|
|
9312
|
-
"aria-valuenow": Math.round(
|
|
9330
|
+
"aria-valuenow": Math.round(g),
|
|
9313
9331
|
"aria-valuemin": 0,
|
|
9314
9332
|
"aria-valuemax": 100,
|
|
9315
9333
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -9317,57 +9335,64 @@ var dr = (e) => {
|
|
|
9317
9335
|
children: /* @__PURE__ */ v("div", {
|
|
9318
9336
|
className: "h-full rounded-full transition-[width]",
|
|
9319
9337
|
style: {
|
|
9320
|
-
width: `${
|
|
9338
|
+
width: `${g}%`,
|
|
9321
9339
|
backgroundColor: s ? Vo[s] : "var(--sf-kpi-accent-slate)"
|
|
9322
9340
|
}
|
|
9323
9341
|
})
|
|
9324
|
-
}),
|
|
9342
|
+
}), _ && /* @__PURE__ */ v("span", {
|
|
9325
9343
|
className: "shrink-0 text-xs font-semibold tabular-nums sf-card-muted",
|
|
9326
|
-
children:
|
|
9344
|
+
children: _
|
|
9327
9345
|
})]
|
|
9328
9346
|
});
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9347
|
+
if (l === "leading-icon") {
|
|
9348
|
+
let a = s ? Vo[s] : "var(--sf-kpi-accent-slate)", o = d === "soft" ? {
|
|
9349
|
+
background: `color-mix(in srgb, ${a} 14%, var(--sf-surface))`,
|
|
9350
|
+
color: a
|
|
9351
|
+
} : { background: a };
|
|
9352
|
+
return /* @__PURE__ */ y("div", {
|
|
9353
|
+
className: (0, X.default)("sf-card p-5 flex items-center gap-3", s && b && "sf-kpi-card", s && b && Bo[s], p && "sf-card--interactive", f),
|
|
9354
|
+
onClick: p,
|
|
9355
|
+
onKeyDown: x,
|
|
9356
|
+
role: p ? "button" : void 0,
|
|
9357
|
+
tabIndex: p ? 0 : void 0,
|
|
9358
|
+
children: [
|
|
9359
|
+
r && /* @__PURE__ */ v("span", {
|
|
9360
|
+
className: (0, X.default)("sf-kpi-tile", d === "soft" && "sf-kpi-tile--soft", i),
|
|
9361
|
+
style: o,
|
|
9362
|
+
"aria-hidden": "true",
|
|
9363
|
+
children: r
|
|
9364
|
+
}),
|
|
9365
|
+
/* @__PURE__ */ y("div", {
|
|
9366
|
+
className: "min-w-0 flex-1",
|
|
9367
|
+
children: [
|
|
9368
|
+
/* @__PURE__ */ v("p", {
|
|
9369
|
+
className: "truncate text-sm font-medium sf-card-subtitle",
|
|
9370
|
+
children: e
|
|
9371
|
+
}),
|
|
9372
|
+
/* @__PURE__ */ v("p", {
|
|
9373
|
+
className: "text-[28px] font-bold tabular-nums sf-card-title",
|
|
9374
|
+
children: Uo(t)
|
|
9375
|
+
}),
|
|
9376
|
+
g === null ? n && /* @__PURE__ */ v("p", {
|
|
9377
|
+
className: "mt-1 text-xs sf-card-muted",
|
|
9378
|
+
children: n
|
|
9379
|
+
}) : S
|
|
9380
|
+
]
|
|
9381
|
+
}),
|
|
9382
|
+
p && /* @__PURE__ */ v("span", {
|
|
9383
|
+
className: "sf-kpi-chevron",
|
|
9384
|
+
"aria-hidden": "true",
|
|
9385
|
+
children: /* @__PURE__ */ v(ot, {})
|
|
9386
|
+
})
|
|
9387
|
+
]
|
|
9388
|
+
});
|
|
9389
|
+
}
|
|
9390
|
+
return /* @__PURE__ */ y("div", {
|
|
9391
|
+
className: (0, X.default)("sf-card p-4", s && b && "sf-kpi-card", s && b && Bo[s], p && "sf-card--interactive", f),
|
|
9392
|
+
onClick: p,
|
|
9393
|
+
onKeyDown: x,
|
|
9394
|
+
role: p ? "button" : void 0,
|
|
9395
|
+
tabIndex: p ? 0 : void 0,
|
|
9371
9396
|
children: [
|
|
9372
9397
|
/* @__PURE__ */ y("div", {
|
|
9373
9398
|
className: "mb-2 flex items-start justify-between gap-2",
|
|
@@ -9381,11 +9406,11 @@ var dr = (e) => {
|
|
|
9381
9406
|
className: "truncate text-sm font-medium sf-card-subtitle",
|
|
9382
9407
|
children: e
|
|
9383
9408
|
})]
|
|
9384
|
-
}),
|
|
9385
|
-
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums",
|
|
9409
|
+
}), m && /* @__PURE__ */ y("span", {
|
|
9410
|
+
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums", h ? "text-[var(--sf-success)]" : "text-[var(--sf-danger)]"),
|
|
9386
9411
|
children: [/* @__PURE__ */ v("span", {
|
|
9387
9412
|
"aria-hidden": "true",
|
|
9388
|
-
children:
|
|
9413
|
+
children: h ? "↑" : "↓"
|
|
9389
9414
|
}), Ho(a)]
|
|
9390
9415
|
})]
|
|
9391
9416
|
}),
|
|
@@ -9393,7 +9418,7 @@ var dr = (e) => {
|
|
|
9393
9418
|
className: "text-2xl font-semibold tabular-nums sf-card-title",
|
|
9394
9419
|
children: Uo(t)
|
|
9395
9420
|
}),
|
|
9396
|
-
|
|
9421
|
+
S,
|
|
9397
9422
|
(n || o) && /* @__PURE__ */ y("div", {
|
|
9398
9423
|
className: "mt-1.5 flex items-center justify-between gap-2",
|
|
9399
9424
|
children: [n && /* @__PURE__ */ v("span", {
|
|
@@ -10170,50 +10195,145 @@ var dr = (e) => {
|
|
|
10170
10195
|
})]
|
|
10171
10196
|
})]
|
|
10172
10197
|
});
|
|
10173
|
-
}, Ws =
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
})
|
|
10198
|
+
}, Ws = {
|
|
10199
|
+
time: "Hora",
|
|
10200
|
+
vehicle: "Vehículo",
|
|
10201
|
+
description: "Descripción"
|
|
10202
|
+
}, Gs = {
|
|
10203
|
+
critical: "sf-alert-row-list__severity--critical",
|
|
10204
|
+
warning: "sf-alert-row-list__severity--warning",
|
|
10205
|
+
info: !1
|
|
10206
|
+
}, Ks = ({ severity: e }) => {
|
|
10207
|
+
let t = Gs[e];
|
|
10208
|
+
return t ? /* @__PURE__ */ v("span", {
|
|
10209
|
+
className: (0, X.default)("sf-alert-row-list__severity", t),
|
|
10210
|
+
"aria-hidden": "true",
|
|
10211
|
+
children: /* @__PURE__ */ v("svg", {
|
|
10212
|
+
viewBox: "0 0 12 12",
|
|
10213
|
+
width: "8",
|
|
10214
|
+
height: "8",
|
|
10215
|
+
fill: "none",
|
|
10216
|
+
stroke: "currentColor",
|
|
10217
|
+
strokeWidth: "2",
|
|
10218
|
+
strokeLinecap: "round",
|
|
10219
|
+
children: e === "critical" ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("line", {
|
|
10220
|
+
x1: "3",
|
|
10221
|
+
y1: "3",
|
|
10222
|
+
x2: "9",
|
|
10223
|
+
y2: "9"
|
|
10224
|
+
}), /* @__PURE__ */ v("line", {
|
|
10225
|
+
x1: "9",
|
|
10226
|
+
y1: "3",
|
|
10227
|
+
x2: "3",
|
|
10228
|
+
y2: "9"
|
|
10229
|
+
})] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("line", {
|
|
10230
|
+
x1: "6",
|
|
10231
|
+
y1: "2",
|
|
10232
|
+
x2: "6",
|
|
10233
|
+
y2: "7"
|
|
10234
|
+
}), /* @__PURE__ */ v("line", {
|
|
10235
|
+
x1: "6",
|
|
10236
|
+
y1: "10",
|
|
10237
|
+
x2: "6",
|
|
10238
|
+
y2: "10.01"
|
|
10239
|
+
})] })
|
|
10240
|
+
})
|
|
10241
|
+
}) : null;
|
|
10242
|
+
}, qs = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i }) => {
|
|
10243
|
+
let a = {
|
|
10244
|
+
...Ws,
|
|
10245
|
+
...i
|
|
10246
|
+
};
|
|
10247
|
+
return /* @__PURE__ */ y("div", {
|
|
10248
|
+
className: (0, X.default)("sf-alert-row-list sf-alert-row-list--divided", r && "sf-alert-row-list--columns", n),
|
|
10249
|
+
style: t ? {
|
|
10250
|
+
maxHeight: t,
|
|
10251
|
+
overflowY: "auto"
|
|
10252
|
+
} : void 0,
|
|
10253
|
+
role: "list",
|
|
10254
|
+
"aria-label": "Alertas",
|
|
10255
|
+
children: [
|
|
10256
|
+
r && /* @__PURE__ */ y("div", {
|
|
10257
|
+
className: "sf-alert-row-list__header",
|
|
10258
|
+
role: "presentation",
|
|
10259
|
+
"aria-hidden": "true",
|
|
10260
|
+
children: [
|
|
10261
|
+
/* @__PURE__ */ v("span", {}),
|
|
10262
|
+
/* @__PURE__ */ v("span", { children: a.time }),
|
|
10263
|
+
/* @__PURE__ */ v("span", { children: a.vehicle }),
|
|
10264
|
+
/* @__PURE__ */ v("span", { children: a.description })
|
|
10265
|
+
]
|
|
10266
|
+
}),
|
|
10267
|
+
e.length === 0 && /* @__PURE__ */ v("p", {
|
|
10268
|
+
className: "sf-event-log__empty",
|
|
10269
|
+
role: "status",
|
|
10270
|
+
children: "Sin alertas"
|
|
10271
|
+
}),
|
|
10272
|
+
e.map((e, t) => {
|
|
10273
|
+
let n = e.status ?? "default", i = {
|
|
10274
|
+
className: (0, X.default)("sf-alert-row-list__row", e.onClick && "sf-alert-row-list__row--clickable"),
|
|
10275
|
+
role: e.onClick ? "button" : "listitem",
|
|
10276
|
+
tabIndex: e.onClick ? 0 : void 0,
|
|
10277
|
+
onClick: e.onClick,
|
|
10278
|
+
onKeyDown: (t) => Hs(t, e.onClick)
|
|
10279
|
+
};
|
|
10280
|
+
return r ? /* @__PURE__ */ y("div", {
|
|
10281
|
+
...i,
|
|
10282
|
+
children: [
|
|
10283
|
+
/* @__PURE__ */ v("span", {
|
|
10284
|
+
className: (0, X.default)("sf-event-log__dot", zs[n]),
|
|
10285
|
+
"aria-hidden": "true"
|
|
10286
|
+
}),
|
|
10287
|
+
/* @__PURE__ */ v("span", {
|
|
10288
|
+
className: "sf-alert-row-list__time",
|
|
10289
|
+
children: e.time
|
|
10290
|
+
}),
|
|
10291
|
+
/* @__PURE__ */ y("span", {
|
|
10292
|
+
className: "sf-alert-row-list__vehicle",
|
|
10293
|
+
children: [e.severity && /* @__PURE__ */ v(Ks, { severity: e.severity }), e.vehicle]
|
|
10294
|
+
}),
|
|
10295
|
+
/* @__PURE__ */ y("span", {
|
|
10296
|
+
className: "sf-alert-row-list__description",
|
|
10297
|
+
children: [/* @__PURE__ */ y("span", {
|
|
10298
|
+
className: "sf-alert-row-list__label",
|
|
10299
|
+
children: [e.icon && /* @__PURE__ */ v("span", {
|
|
10300
|
+
className: "mr-1",
|
|
10301
|
+
children: e.icon
|
|
10302
|
+
}), e.label]
|
|
10303
|
+
}), e.meta && /* @__PURE__ */ v("span", {
|
|
10304
|
+
className: (0, X.default)("sf-alert-row-list__meta", Vs[n]),
|
|
10305
|
+
children: e.meta
|
|
10306
|
+
})]
|
|
10307
|
+
})
|
|
10308
|
+
]
|
|
10309
|
+
}, t) : /* @__PURE__ */ y("div", {
|
|
10310
|
+
...i,
|
|
10311
|
+
children: [
|
|
10312
|
+
/* @__PURE__ */ v("span", {
|
|
10313
|
+
className: (0, X.default)("sf-event-log__dot", zs[n]),
|
|
10314
|
+
"aria-hidden": "true"
|
|
10315
|
+
}),
|
|
10316
|
+
/* @__PURE__ */ y("span", {
|
|
10317
|
+
className: "sf-alert-row-list__label",
|
|
10318
|
+
children: [e.icon && /* @__PURE__ */ v("span", {
|
|
10319
|
+
className: "mr-1",
|
|
10320
|
+
children: e.icon
|
|
10321
|
+
}), e.label]
|
|
10322
|
+
}),
|
|
10323
|
+
e.meta && /* @__PURE__ */ v("span", {
|
|
10324
|
+
className: (0, X.default)("sf-alert-row-list__meta", Vs[n]),
|
|
10325
|
+
children: e.meta
|
|
10326
|
+
}),
|
|
10327
|
+
e.time && /* @__PURE__ */ v("span", {
|
|
10328
|
+
className: "sf-alert-row-list__time",
|
|
10329
|
+
children: e.time
|
|
10330
|
+
})
|
|
10331
|
+
]
|
|
10332
|
+
}, t);
|
|
10333
|
+
})
|
|
10334
|
+
]
|
|
10335
|
+
});
|
|
10336
|
+
}, Js = {
|
|
10217
10337
|
success: {
|
|
10218
10338
|
color: "#1F8A4C",
|
|
10219
10339
|
halo: "#EAF5EE"
|
|
@@ -10234,17 +10354,17 @@ var dr = (e) => {
|
|
|
10234
10354
|
color: "var(--sf-text-subtle, #5C7180)",
|
|
10235
10355
|
halo: "var(--sf-surface-alt, #EEF0F2)"
|
|
10236
10356
|
}
|
|
10237
|
-
},
|
|
10357
|
+
}, Ys = {
|
|
10238
10358
|
display: "flex",
|
|
10239
10359
|
gap: 12,
|
|
10240
10360
|
flexWrap: "wrap"
|
|
10241
|
-
},
|
|
10361
|
+
}, Xs = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
10242
10362
|
className: (0, X.default)("sf-alert-lane", t),
|
|
10243
|
-
style:
|
|
10363
|
+
style: Ys,
|
|
10244
10364
|
role: "list",
|
|
10245
10365
|
"aria-label": "Alertas",
|
|
10246
10366
|
children: e.map((e, t) => {
|
|
10247
|
-
let n =
|
|
10367
|
+
let n = Js[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
|
|
10248
10368
|
return /* @__PURE__ */ y("div", {
|
|
10249
10369
|
role: "listitem",
|
|
10250
10370
|
style: {
|
|
@@ -10315,26 +10435,26 @@ var dr = (e) => {
|
|
|
10315
10435
|
]
|
|
10316
10436
|
}, e.id ?? t);
|
|
10317
10437
|
})
|
|
10318
|
-
}),
|
|
10438
|
+
}), Zs = {
|
|
10319
10439
|
default: "",
|
|
10320
10440
|
accent: "sf-card--accent",
|
|
10321
10441
|
critical: "sf-card--critical",
|
|
10322
10442
|
warning: "sf-card--warning",
|
|
10323
10443
|
success: "sf-card--success"
|
|
10324
|
-
},
|
|
10444
|
+
}, Qs = {
|
|
10325
10445
|
1: "col-span-1",
|
|
10326
10446
|
2: "col-span-1 sm:col-span-2",
|
|
10327
10447
|
3: "col-span-1 sm:col-span-2 lg:col-span-3",
|
|
10328
10448
|
4: "col-span-1 sm:col-span-2 lg:col-span-4"
|
|
10329
|
-
},
|
|
10449
|
+
}, $s = {
|
|
10330
10450
|
none: "",
|
|
10331
10451
|
sm: "p-3",
|
|
10332
10452
|
md: "p-4",
|
|
10333
10453
|
lg: "p-5"
|
|
10334
|
-
},
|
|
10454
|
+
}, ec = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", headerSize: s = "sm", className: c, children: l }) => /* @__PURE__ */ y("div", {
|
|
10335
10455
|
role: e ? "region" : void 0,
|
|
10336
10456
|
"aria-label": e,
|
|
10337
|
-
className: (0, X.default)("sf-card flex flex-col overflow-hidden",
|
|
10457
|
+
className: (0, X.default)("sf-card flex flex-col overflow-hidden", Zs[i], Qs[a], c),
|
|
10338
10458
|
children: [(e || n || r) && /* @__PURE__ */ y("div", {
|
|
10339
10459
|
className: (0, X.default)("sf-card-header", s === "md" && "sf-card-header--md"),
|
|
10340
10460
|
children: [
|
|
@@ -10363,23 +10483,23 @@ var dr = (e) => {
|
|
|
10363
10483
|
})
|
|
10364
10484
|
]
|
|
10365
10485
|
}), /* @__PURE__ */ v("div", {
|
|
10366
|
-
className: (0, X.default)("flex-1",
|
|
10486
|
+
className: (0, X.default)("flex-1", $s[o]),
|
|
10367
10487
|
children: l
|
|
10368
10488
|
})]
|
|
10369
|
-
}),
|
|
10489
|
+
}), tc = {
|
|
10370
10490
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
10371
10491
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
10372
10492
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
10373
10493
|
5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
|
|
10374
10494
|
6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6"
|
|
10375
|
-
},
|
|
10495
|
+
}, nc = {
|
|
10376
10496
|
sm: "gap-2",
|
|
10377
10497
|
md: "gap-3",
|
|
10378
10498
|
lg: "gap-5"
|
|
10379
|
-
},
|
|
10380
|
-
className: (0, X.default)("grid",
|
|
10499
|
+
}, rc = ({ cols: e = 4, gap: t = "md", className: n, children: r }) => /* @__PURE__ */ v("div", {
|
|
10500
|
+
className: (0, X.default)("grid", tc[e], nc[t], n),
|
|
10381
10501
|
children: r
|
|
10382
|
-
}),
|
|
10502
|
+
}), ic = ({ title: e, subtitle: t, action: n, className: r, children: i }) => /* @__PURE__ */ y("section", {
|
|
10383
10503
|
className: (0, X.default)("flex flex-col gap-3", r),
|
|
10384
10504
|
"aria-label": e,
|
|
10385
10505
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -10395,13 +10515,13 @@ var dr = (e) => {
|
|
|
10395
10515
|
children: n
|
|
10396
10516
|
})]
|
|
10397
10517
|
}), i]
|
|
10398
|
-
}),
|
|
10518
|
+
}), ac = {
|
|
10399
10519
|
slate: "sf-stat-tone--slate",
|
|
10400
10520
|
emerald: "sf-stat-tone--emerald",
|
|
10401
10521
|
amber: "sf-stat-tone--amber",
|
|
10402
10522
|
red: "sf-stat-tone--red",
|
|
10403
10523
|
blue: "sf-stat-tone--blue"
|
|
10404
|
-
},
|
|
10524
|
+
}, oc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
10405
10525
|
role: "list",
|
|
10406
10526
|
"aria-label": "Resumen de métricas",
|
|
10407
10527
|
className: (0, X.default)("flex flex-wrap items-center gap-5 border-t border-[var(--sf-border)] bg-[var(--sf-card-bg)] px-4 py-2", t),
|
|
@@ -10410,7 +10530,7 @@ var dr = (e) => {
|
|
|
10410
10530
|
role: "listitem",
|
|
10411
10531
|
children: [
|
|
10412
10532
|
e.tone && /* @__PURE__ */ v("span", {
|
|
10413
|
-
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full",
|
|
10533
|
+
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", ac[e.tone]),
|
|
10414
10534
|
"aria-hidden": "true"
|
|
10415
10535
|
}),
|
|
10416
10536
|
/* @__PURE__ */ y("span", {
|
|
@@ -10423,7 +10543,7 @@ var dr = (e) => {
|
|
|
10423
10543
|
})
|
|
10424
10544
|
]
|
|
10425
10545
|
}, t))
|
|
10426
|
-
}),
|
|
10546
|
+
}), sc = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
|
|
10427
10547
|
className: "sf-card flex min-h-[480px] flex-col overflow-hidden bg-[var(--sf-page-bg)]",
|
|
10428
10548
|
role: "region",
|
|
10429
10549
|
"aria-label": "Dashboard",
|
|
@@ -10448,7 +10568,7 @@ var dr = (e) => {
|
|
|
10448
10568
|
children: n
|
|
10449
10569
|
})
|
|
10450
10570
|
]
|
|
10451
|
-
}),
|
|
10571
|
+
}), cc = ({ title: e, onClose: t, headerAction: n, icon: r, heading: i, badge: a, rows: o = [], align: s = "stack", actions: c, sectionTitle: l, items: u = [], width: d = 320, className: f }) => {
|
|
10452
10572
|
let p = typeof d == "number" ? `${d}px` : d;
|
|
10453
10573
|
return /* @__PURE__ */ y("aside", {
|
|
10454
10574
|
className: (0, X.default)("sf-detail-side-panel", f),
|
|
@@ -10541,15 +10661,15 @@ var dr = (e) => {
|
|
|
10541
10661
|
})
|
|
10542
10662
|
]
|
|
10543
10663
|
});
|
|
10544
|
-
},
|
|
10664
|
+
}, lc = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), uc = (e, t) => {
|
|
10545
10665
|
let n = Yt(String(e ?? ""), t);
|
|
10546
10666
|
return Array.from({ length: t }, (e, t) => n[t] ?? "");
|
|
10547
|
-
},
|
|
10667
|
+
}, dc = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
|
|
10548
10668
|
let u = b({
|
|
10549
10669
|
name: t,
|
|
10550
10670
|
control: e.control
|
|
10551
|
-
}), d = m([]), [f, p] = h(() =>
|
|
10552
|
-
u.field.value !== g && (_(u.field.value), p(
|
|
10671
|
+
}), d = m([]), [f, p] = h(() => uc(u.field.value, c)), [g, _] = h(u.field.value);
|
|
10672
|
+
u.field.value !== g && (_(u.field.value), p(uc(u.field.value, c)));
|
|
10553
10673
|
let y = String(t), x = u.fieldState.error?.message ? String(u.fieldState.error.message) : void 0, S = (e) => {
|
|
10554
10674
|
p(e);
|
|
10555
10675
|
let t = e.join("");
|
|
@@ -10593,7 +10713,7 @@ var dr = (e) => {
|
|
|
10593
10713
|
onBlur: () => u.field.onBlur(),
|
|
10594
10714
|
onChange: (e) => C(t, e.target.value),
|
|
10595
10715
|
onKeyDown: (e) => w(t, e),
|
|
10596
|
-
className:
|
|
10716
|
+
className: lc({
|
|
10597
10717
|
small: o,
|
|
10598
10718
|
error: !!x,
|
|
10599
10719
|
disabled: a
|
|
@@ -10601,15 +10721,15 @@ var dr = (e) => {
|
|
|
10601
10721
|
}, t))
|
|
10602
10722
|
})
|
|
10603
10723
|
});
|
|
10604
|
-
},
|
|
10724
|
+
}, fc = (e) => {
|
|
10605
10725
|
let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
|
|
10606
10726
|
return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
|
|
10607
|
-
},
|
|
10727
|
+
}, pc = ({ form: e, startName: t, endName: n, startLabel: r = "Desde", endLabel: i = "Hasta", required: a, endRequired: o, small: s, readOnlyEnd: c, adjustEnd: l = "start", onEndAdjusted: u, className: d }) => {
|
|
10608
10728
|
let f = String(e.watch(t) ?? ""), p = (t, r) => {
|
|
10609
10729
|
if (l === "none") return;
|
|
10610
10730
|
let i = t.slice(0, 10), a = r.slice(0, 10);
|
|
10611
10731
|
if (!yn(i) || !yn(a) || a >= i) return;
|
|
10612
|
-
let o = l === "month-end" ?
|
|
10732
|
+
let o = l === "month-end" ? fc(i) : i;
|
|
10613
10733
|
e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
|
|
10614
10734
|
};
|
|
10615
10735
|
return /* @__PURE__ */ y("div", {
|
|
@@ -10634,16 +10754,16 @@ var dr = (e) => {
|
|
|
10634
10754
|
onChange: (n) => p(String(e.getValues(t) ?? ""), n)
|
|
10635
10755
|
})]
|
|
10636
10756
|
});
|
|
10637
|
-
},
|
|
10757
|
+
}, mc = (e) => /* @__PURE__ */ v(Tn, {
|
|
10638
10758
|
...e,
|
|
10639
10759
|
utc: !0
|
|
10640
|
-
}),
|
|
10760
|
+
}), hc = () => ({
|
|
10641
10761
|
start: "",
|
|
10642
10762
|
end: ""
|
|
10643
|
-
}),
|
|
10763
|
+
}), gc = () => ({
|
|
10644
10764
|
start: "",
|
|
10645
10765
|
end: ""
|
|
10646
|
-
}),
|
|
10766
|
+
}), _c = 0, vc = () => (_c += 1, `photo_${Date.now()}_${_c}`), yc = (e, t) => {
|
|
10647
10767
|
if (!t || t === "*") return !0;
|
|
10648
10768
|
let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
|
|
10649
10769
|
return n.some((e) => {
|
|
@@ -10655,20 +10775,20 @@ var dr = (e) => {
|
|
|
10655
10775
|
}
|
|
10656
10776
|
return i === t;
|
|
10657
10777
|
});
|
|
10658
|
-
},
|
|
10778
|
+
}, bc = (e, t = !1) => new Promise((n) => {
|
|
10659
10779
|
let r = document.createElement("input");
|
|
10660
10780
|
r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
|
|
10661
10781
|
n(Array.from(r.files ?? [])), r.remove();
|
|
10662
10782
|
}, document.body.appendChild(r), r.click();
|
|
10663
|
-
}),
|
|
10664
|
-
id:
|
|
10783
|
+
}), xc = (e) => ({
|
|
10784
|
+
id: vc(),
|
|
10665
10785
|
preview: URL.createObjectURL(e),
|
|
10666
10786
|
file: e
|
|
10667
|
-
}),
|
|
10787
|
+
}), Sc = (e) => {
|
|
10668
10788
|
URL.revokeObjectURL(e.preview);
|
|
10669
|
-
},
|
|
10670
|
-
e.forEach(
|
|
10671
|
-
},
|
|
10789
|
+
}, Cc = (e) => {
|
|
10790
|
+
e.forEach(Sc);
|
|
10791
|
+
}, wc = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], Tc = (e, t = .92) => new Promise((n, r) => {
|
|
10672
10792
|
let i = URL.createObjectURL(e), a = new Image();
|
|
10673
10793
|
a.onload = () => {
|
|
10674
10794
|
let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
|
|
@@ -10691,7 +10811,7 @@ var dr = (e) => {
|
|
|
10691
10811
|
}, a.onerror = () => {
|
|
10692
10812
|
URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
|
|
10693
10813
|
}, a.src = i;
|
|
10694
|
-
}),
|
|
10814
|
+
}), Ec = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, Dc = (e) => `${e.name}-${e.lastModified}-${e.size}`, Oc = ({ form: e, name: t, label: n, info: r, required: i, accept: a = "*", multiple: o = !1, maxSizeMb: s = 10, dropLabel: c, readOnly: l, disabled: u, small: d, className: f, onChange: p, onUpload: g, onRefresh: _ }) => {
|
|
10695
10815
|
let x = m(null), S = b({
|
|
10696
10816
|
name: t,
|
|
10697
10817
|
control: e.control
|
|
@@ -10700,7 +10820,7 @@ var dr = (e) => {
|
|
|
10700
10820
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
10701
10821
|
})(), L = async (e) => {
|
|
10702
10822
|
if (g) for (let t of e) {
|
|
10703
|
-
let e =
|
|
10823
|
+
let e = Dc(t);
|
|
10704
10824
|
O((t) => new Set(t).add(e)), E((t) => ({
|
|
10705
10825
|
...t,
|
|
10706
10826
|
[e]: 0
|
|
@@ -10725,7 +10845,7 @@ var dr = (e) => {
|
|
|
10725
10845
|
}
|
|
10726
10846
|
}
|
|
10727
10847
|
}, ee = (e) => {
|
|
10728
|
-
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t &&
|
|
10848
|
+
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && yc(e, a)), r = e.length - n.length;
|
|
10729
10849
|
if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
|
|
10730
10850
|
let e = [...I, ...n];
|
|
10731
10851
|
S.field.onChange(e), p?.(e), L(n);
|
|
@@ -10779,7 +10899,7 @@ var dr = (e) => {
|
|
|
10779
10899
|
className: (0, X.default)("sf-file-drop", C && "sf-file-drop--dragging", !P && "sf-file-drop--interactive", P && "sf-file-drop--disabled", d ? "sf-file-drop--sm" : "sf-file-drop--md", N && "sf-file-drop--error"),
|
|
10780
10900
|
children: [/* @__PURE__ */ v("span", {
|
|
10781
10901
|
className: "sf-file-drop__title",
|
|
10782
|
-
children: C ? "Suelta aquí" : c ??
|
|
10902
|
+
children: C ? "Suelta aquí" : c ?? Ec(I)
|
|
10783
10903
|
}), /* @__PURE__ */ y("span", {
|
|
10784
10904
|
className: "sf-file-drop__hint",
|
|
10785
10905
|
children: [
|
|
@@ -10794,7 +10914,7 @@ var dr = (e) => {
|
|
|
10794
10914
|
className: "sf-file-list",
|
|
10795
10915
|
"aria-label": "Archivos seleccionados",
|
|
10796
10916
|
children: I.map((e) => {
|
|
10797
|
-
let t =
|
|
10917
|
+
let t = Dc(e), n = T[t], r = D.has(t);
|
|
10798
10918
|
return /* @__PURE__ */ y("li", {
|
|
10799
10919
|
className: "sf-file-list__item",
|
|
10800
10920
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -10823,7 +10943,7 @@ var dr = (e) => {
|
|
|
10823
10943
|
]
|
|
10824
10944
|
})
|
|
10825
10945
|
});
|
|
10826
|
-
},
|
|
10946
|
+
}, kc = ({ form: e, name: t, label: n, info: r, required: i, capture: a, maxSizeMb: o = 5, readOnly: c, disabled: l, small: d, className: f, onChange: g, onRefresh: _ }) => {
|
|
10827
10947
|
let x = m(null), S = b({
|
|
10828
10948
|
name: t,
|
|
10829
10949
|
control: e.control
|
|
@@ -10913,7 +11033,7 @@ var dr = (e) => {
|
|
|
10913
11033
|
]
|
|
10914
11034
|
})
|
|
10915
11035
|
});
|
|
10916
|
-
},
|
|
11036
|
+
}, Ac = ({ form: e, name: t, label: n, info: r, required: i, width: a = 400, height: o = 160, readOnly: c, disabled: l, className: d, onChange: f, onRefresh: p }) => {
|
|
10917
11037
|
let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
|
|
10918
11038
|
name: t,
|
|
10919
11039
|
control: e.control
|
|
@@ -11005,11 +11125,11 @@ var dr = (e) => {
|
|
|
11005
11125
|
})]
|
|
11006
11126
|
})
|
|
11007
11127
|
});
|
|
11008
|
-
},
|
|
11128
|
+
}, jc = ({ form: e, name: t, label: n, info: r, required: i, max: a = 10, maxSizeMb: o = 5, camera: c = !1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
11009
11129
|
let S = m(null), C = b({
|
|
11010
11130
|
name: t,
|
|
11011
11131
|
control: e.control
|
|
11012
|
-
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() =>
|
|
11132
|
+
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() => wc(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
|
|
11013
11133
|
k,
|
|
11014
11134
|
a,
|
|
11015
11135
|
A.length
|
|
@@ -11017,7 +11137,7 @@ var dr = (e) => {
|
|
|
11017
11137
|
u(() => {
|
|
11018
11138
|
N.current = A;
|
|
11019
11139
|
}, [A]), u(() => () => {
|
|
11020
|
-
for (let e of N.current)
|
|
11140
|
+
for (let e of N.current) Sc(e);
|
|
11021
11141
|
}, []);
|
|
11022
11142
|
let P = s((e) => {
|
|
11023
11143
|
C.field.onChange(e), _?.(e);
|
|
@@ -11032,7 +11152,7 @@ var dr = (e) => {
|
|
|
11032
11152
|
D(`Hay imágenes que superan ${o} MB.`);
|
|
11033
11153
|
return;
|
|
11034
11154
|
}
|
|
11035
|
-
let r = a - A.length, i = n.slice(0, r).map((e) =>
|
|
11155
|
+
let r = a - A.length, i = n.slice(0, r).map((e) => xc(e));
|
|
11036
11156
|
if (n.length > r) {
|
|
11037
11157
|
D(`Solo puedes agregar ${r} imagen(es) más.`);
|
|
11038
11158
|
return;
|
|
@@ -11045,7 +11165,7 @@ var dr = (e) => {
|
|
|
11045
11165
|
A
|
|
11046
11166
|
]), I = s((e) => {
|
|
11047
11167
|
let t = A.find((t) => t.id === e);
|
|
11048
|
-
t &&
|
|
11168
|
+
t && Sc(t), P(A.filter((t) => t.id !== e));
|
|
11049
11169
|
}, [P, A]);
|
|
11050
11170
|
return /* @__PURE__ */ v(Z, {
|
|
11051
11171
|
id: w,
|
|
@@ -11117,19 +11237,19 @@ var dr = (e) => {
|
|
|
11117
11237
|
]
|
|
11118
11238
|
})
|
|
11119
11239
|
});
|
|
11120
|
-
},
|
|
11240
|
+
}, Mc = (e) => {
|
|
11121
11241
|
switch (e.kind) {
|
|
11122
|
-
case "photo": return /* @__PURE__ */ v(
|
|
11123
|
-
case "multiPhoto": return /* @__PURE__ */ v(
|
|
11124
|
-
case "signature": return /* @__PURE__ */ v(
|
|
11242
|
+
case "photo": return /* @__PURE__ */ v(kc, { ...e });
|
|
11243
|
+
case "multiPhoto": return /* @__PURE__ */ v(jc, { ...e });
|
|
11244
|
+
case "signature": return /* @__PURE__ */ v(Ac, { ...e });
|
|
11125
11245
|
case "file": return /* @__PURE__ */ v(An, { ...e });
|
|
11126
11246
|
default: return null;
|
|
11127
11247
|
}
|
|
11128
|
-
},
|
|
11248
|
+
}, Nc = (e) => new Promise((t, n) => {
|
|
11129
11249
|
let r = new Image();
|
|
11130
11250
|
r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
|
|
11131
|
-
}),
|
|
11132
|
-
let i = await
|
|
11251
|
+
}), Pc = async (e, t, n, r = "image/jpeg") => {
|
|
11252
|
+
let i = await Nc(e), a = document.createElement("canvas");
|
|
11133
11253
|
a.width = t.width, a.height = t.height;
|
|
11134
11254
|
let o = a.getContext("2d");
|
|
11135
11255
|
if (!o) throw Error("Canvas no disponible");
|
|
@@ -11142,7 +11262,7 @@ var dr = (e) => {
|
|
|
11142
11262
|
e(new File([i], n, { type: r }));
|
|
11143
11263
|
}, r, .92);
|
|
11144
11264
|
});
|
|
11145
|
-
},
|
|
11265
|
+
}, Fc = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
|
|
11146
11266
|
let [o, c] = h({
|
|
11147
11267
|
x: 0,
|
|
11148
11268
|
y: 0
|
|
@@ -11153,7 +11273,7 @@ var dr = (e) => {
|
|
|
11153
11273
|
m(!0);
|
|
11154
11274
|
try {
|
|
11155
11275
|
let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
|
|
11156
|
-
i(await
|
|
11276
|
+
i(await Pc(e, d, t, n));
|
|
11157
11277
|
} finally {
|
|
11158
11278
|
m(!1);
|
|
11159
11279
|
}
|
|
@@ -11204,7 +11324,7 @@ var dr = (e) => {
|
|
|
11204
11324
|
})
|
|
11205
11325
|
]
|
|
11206
11326
|
});
|
|
11207
|
-
},
|
|
11327
|
+
}, Ic = ({ form: e, name: t, label: n, info: r, required: i, maxSizeMb: a = 5, interactive: o = !0, aspect: c = 1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
11208
11328
|
let S = m(null), C = b({
|
|
11209
11329
|
name: t,
|
|
11210
11330
|
control: e.control
|
|
@@ -11233,7 +11353,7 @@ var dr = (e) => {
|
|
|
11233
11353
|
}
|
|
11234
11354
|
T(!0);
|
|
11235
11355
|
try {
|
|
11236
|
-
let t = await
|
|
11356
|
+
let t = await Tc(e);
|
|
11237
11357
|
I(t);
|
|
11238
11358
|
} finally {
|
|
11239
11359
|
T(!1);
|
|
@@ -11325,7 +11445,7 @@ var dr = (e) => {
|
|
|
11325
11445
|
role: "dialog",
|
|
11326
11446
|
"aria-modal": "true",
|
|
11327
11447
|
"aria-label": "Editor de recorte",
|
|
11328
|
-
children: /* @__PURE__ */ v(
|
|
11448
|
+
children: /* @__PURE__ */ v(Fc, {
|
|
11329
11449
|
imageUrl: E.url,
|
|
11330
11450
|
fileName: E.fileName,
|
|
11331
11451
|
aspect: c,
|
|
@@ -11337,7 +11457,7 @@ var dr = (e) => {
|
|
|
11337
11457
|
})]
|
|
11338
11458
|
})]
|
|
11339
11459
|
});
|
|
11340
|
-
},
|
|
11460
|
+
}, Lc = () => [], Rc = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
11341
11461
|
className: (0, X.default)("sf-neutral-map-frame", n),
|
|
11342
11462
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
11343
11463
|
className: "sf-neutral-map-frame__header",
|
|
@@ -11349,11 +11469,11 @@ var dr = (e) => {
|
|
|
11349
11469
|
children: t
|
|
11350
11470
|
})]
|
|
11351
11471
|
}), r]
|
|
11352
|
-
}),
|
|
11472
|
+
}), zc = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
|
|
11353
11473
|
className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
|
|
11354
11474
|
role: e === "error" ? "alert" : "status",
|
|
11355
11475
|
children: t
|
|
11356
|
-
}),
|
|
11476
|
+
}), Bc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
11357
11477
|
className: (0, X.default)("sf-map-legend", t),
|
|
11358
11478
|
role: "list",
|
|
11359
11479
|
"aria-label": "Leyenda del mapa",
|
|
@@ -11380,7 +11500,7 @@ var dr = (e) => {
|
|
|
11380
11500
|
})
|
|
11381
11501
|
]
|
|
11382
11502
|
}, t))
|
|
11383
|
-
}),
|
|
11503
|
+
}), Vc = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
|
|
11384
11504
|
className: (0, X.default)("sf-map-toolbar", i),
|
|
11385
11505
|
children: [
|
|
11386
11506
|
/* @__PURE__ */ y("div", {
|
|
@@ -11418,7 +11538,7 @@ var dr = (e) => {
|
|
|
11418
11538
|
children: /* @__PURE__ */ v($e, { "aria-hidden": "true" })
|
|
11419
11539
|
})
|
|
11420
11540
|
]
|
|
11421
|
-
}),
|
|
11541
|
+
}), Hc = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
|
|
11422
11542
|
className: (0, X.default)("sf-map-vehicle-popup", a && "sf-map-vehicle-popup--interactive", o),
|
|
11423
11543
|
onClick: a,
|
|
11424
11544
|
onKeyDown: (e) => {
|
|
@@ -11458,59 +11578,59 @@ var dr = (e) => {
|
|
|
11458
11578
|
]
|
|
11459
11579
|
})
|
|
11460
11580
|
]
|
|
11461
|
-
}),
|
|
11581
|
+
}), Uc = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", Wc = {
|
|
11462
11582
|
lat: -12.0464,
|
|
11463
11583
|
lng: -77.0428
|
|
11464
|
-
},
|
|
11584
|
+
}, Gc = 13, Kc = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", qc = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Jc = {
|
|
11465
11585
|
drawing: "basic",
|
|
11466
11586
|
streetView: "none",
|
|
11467
11587
|
clustering: "none",
|
|
11468
11588
|
heatmap: "none"
|
|
11469
|
-
},
|
|
11589
|
+
}, Yc = {
|
|
11470
11590
|
drawing: "basic",
|
|
11471
11591
|
streetView: "interactive",
|
|
11472
11592
|
clustering: "client",
|
|
11473
11593
|
heatmap: "weighted"
|
|
11474
|
-
},
|
|
11594
|
+
}, Xc = "sf-google-maps-script", Zc = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
|
|
11475
11595
|
let i = new URLSearchParams({
|
|
11476
11596
|
key: e,
|
|
11477
11597
|
language: t,
|
|
11478
11598
|
region: n
|
|
11479
11599
|
});
|
|
11480
11600
|
return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
|
|
11481
|
-
},
|
|
11601
|
+
}, Qc = (e) => {
|
|
11482
11602
|
let t = window;
|
|
11483
11603
|
return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
|
|
11484
|
-
let i = document.getElementById(
|
|
11604
|
+
let i = document.getElementById(Xc);
|
|
11485
11605
|
if (i) {
|
|
11486
11606
|
i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
|
|
11487
11607
|
return;
|
|
11488
11608
|
}
|
|
11489
11609
|
let a = document.createElement("script");
|
|
11490
|
-
a.id =
|
|
11610
|
+
a.id = Xc, a.src = Zc(e), a.async = !0, a.defer = !0, a.addEventListener("load", () => n(t.google ?? {})), a.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps."))), document.head.appendChild(a);
|
|
11491
11611
|
}), t.__sfGoogleMapsPromise);
|
|
11492
|
-
},
|
|
11612
|
+
}, $c = (e, t = "") => {
|
|
11493
11613
|
let n = e.match(/^var\((--[^,)]+)\)$/);
|
|
11494
11614
|
return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
|
|
11495
|
-
},
|
|
11615
|
+
}, el = (e, t) => ({
|
|
11496
11616
|
map: t,
|
|
11497
11617
|
paths: e.points,
|
|
11498
|
-
strokeColor: e.color ??
|
|
11499
|
-
fillColor: e.fillColor ?? e.color ??
|
|
11618
|
+
strokeColor: e.color ?? $c("var(--sf-map-area-stroke)"),
|
|
11619
|
+
fillColor: e.fillColor ?? e.color ?? $c("var(--sf-map-area-fill)"),
|
|
11500
11620
|
fillOpacity: .14,
|
|
11501
11621
|
strokeWeight: 2.5
|
|
11502
|
-
}),
|
|
11622
|
+
}), tl = (e, t) => ({
|
|
11503
11623
|
map: t,
|
|
11504
11624
|
path: e.points,
|
|
11505
|
-
strokeColor: e.color ??
|
|
11625
|
+
strokeColor: e.color ?? $c("var(--sf-map-route-stroke)"),
|
|
11506
11626
|
strokeWeight: 3.5
|
|
11507
|
-
}),
|
|
11627
|
+
}), nl = (e, t, n) => ({
|
|
11508
11628
|
map: t,
|
|
11509
11629
|
position: e.position,
|
|
11510
11630
|
title: e.title ?? e.label,
|
|
11511
11631
|
label: e.label ? e.label.slice(0, 1).toUpperCase() : void 0,
|
|
11512
11632
|
draggable: !n && e.options?.draggable
|
|
11513
|
-
}),
|
|
11633
|
+
}), rl = ({ config: e, center: t = Wc, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], height: o = 320, className: s, readOnly: c, onClick: l, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: p, onMarkerDragEnd: g }) => {
|
|
11514
11634
|
let _ = m(null), y = m(null), b = m(/* @__PURE__ */ new Map()), x = m(/* @__PURE__ */ new Map()), S = m(/* @__PURE__ */ new Map()), C = m({
|
|
11515
11635
|
onMarkerClick: d,
|
|
11516
11636
|
onMarkerDoubleClick: f,
|
|
@@ -11543,9 +11663,9 @@ var dr = (e) => {
|
|
|
11543
11663
|
return;
|
|
11544
11664
|
}
|
|
11545
11665
|
let t = !1;
|
|
11546
|
-
return D("loading"),
|
|
11666
|
+
return D("loading"), Qc(e).then((n) => {
|
|
11547
11667
|
t || !_.current || !n.maps?.Map || (y.current = new n.maps.Map(_.current, {
|
|
11548
|
-
center:
|
|
11668
|
+
center: Wc,
|
|
11549
11669
|
zoom: 13,
|
|
11550
11670
|
mapId: e.mapId,
|
|
11551
11671
|
disableDefaultUI: c
|
|
@@ -11564,7 +11684,7 @@ var dr = (e) => {
|
|
|
11564
11684
|
}, []), u(() => {
|
|
11565
11685
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
11566
11686
|
let t = !1;
|
|
11567
|
-
return
|
|
11687
|
+
return Qc(e).then((e) => {
|
|
11568
11688
|
if (t || !e.maps?.Marker) return;
|
|
11569
11689
|
let n = new Set(r.map((e) => e.id));
|
|
11570
11690
|
b.current.forEach((e, t) => {
|
|
@@ -11573,10 +11693,10 @@ var dr = (e) => {
|
|
|
11573
11693
|
x.current.set(t.id, t);
|
|
11574
11694
|
let n = b.current.get(t.id);
|
|
11575
11695
|
if (n) {
|
|
11576
|
-
n.marker.setPosition?.(t.position), n.marker.setOptions?.(
|
|
11696
|
+
n.marker.setPosition?.(t.position), n.marker.setOptions?.(nl(t, y.current, c));
|
|
11577
11697
|
return;
|
|
11578
11698
|
}
|
|
11579
|
-
let r = new e.maps.Marker(
|
|
11699
|
+
let r = new e.maps.Marker(nl(t, y.current, c)), i = () => x.current.get(t.id) ?? t, a = [
|
|
11580
11700
|
r.addListener?.("click", () => {
|
|
11581
11701
|
C.current.onMarkerClick?.({ marker: i() });
|
|
11582
11702
|
}),
|
|
@@ -11620,7 +11740,7 @@ var dr = (e) => {
|
|
|
11620
11740
|
]), u(() => {
|
|
11621
11741
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
11622
11742
|
let t = !1;
|
|
11623
|
-
return
|
|
11743
|
+
return Qc(e).then((e) => {
|
|
11624
11744
|
if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
|
|
11625
11745
|
let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
|
|
11626
11746
|
S.current.forEach((e, t) => {
|
|
@@ -11628,22 +11748,22 @@ var dr = (e) => {
|
|
|
11628
11748
|
}), a.forEach((t) => {
|
|
11629
11749
|
let n = `area:${t.id}`, r = S.current.get(n);
|
|
11630
11750
|
if (r?.kind === "area") {
|
|
11631
|
-
r.shape.setPaths?.(t.points), r.shape.setOptions?.(
|
|
11751
|
+
r.shape.setPaths?.(t.points), r.shape.setOptions?.(el(t, y.current));
|
|
11632
11752
|
return;
|
|
11633
11753
|
}
|
|
11634
11754
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
11635
11755
|
kind: "area",
|
|
11636
|
-
shape: new e.maps.Polygon(
|
|
11756
|
+
shape: new e.maps.Polygon(el(t, y.current))
|
|
11637
11757
|
});
|
|
11638
11758
|
}), i.forEach((t) => {
|
|
11639
11759
|
let n = `route:${t.id}`, r = S.current.get(n);
|
|
11640
11760
|
if (r?.kind === "route") {
|
|
11641
|
-
r.shape.setPath?.(t.points), r.shape.setOptions?.(
|
|
11761
|
+
r.shape.setPath?.(t.points), r.shape.setOptions?.(tl(t, y.current));
|
|
11642
11762
|
return;
|
|
11643
11763
|
}
|
|
11644
11764
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
11645
11765
|
kind: "route",
|
|
11646
|
-
shape: new e.maps.Polyline(
|
|
11766
|
+
shape: new e.maps.Polyline(tl(t, y.current))
|
|
11647
11767
|
});
|
|
11648
11768
|
});
|
|
11649
11769
|
}), () => {
|
|
@@ -11657,7 +11777,7 @@ var dr = (e) => {
|
|
|
11657
11777
|
]), u(() => {
|
|
11658
11778
|
if (E !== "ready" || !e?.apiKey || !y.current || !l || c) return;
|
|
11659
11779
|
let t = !1, n;
|
|
11660
|
-
return
|
|
11780
|
+
return Qc(e).then(() => {
|
|
11661
11781
|
let e = y.current;
|
|
11662
11782
|
t || !e?.addListener || (n = e.addListener("click", (e) => {
|
|
11663
11783
|
e.latLng && l({ location: {
|
|
@@ -11686,25 +11806,25 @@ var dr = (e) => {
|
|
|
11686
11806
|
"aria-busy": E !== "ready" || void 0
|
|
11687
11807
|
})
|
|
11688
11808
|
});
|
|
11689
|
-
},
|
|
11809
|
+
}, il = (e) => ({
|
|
11690
11810
|
id: "google",
|
|
11691
|
-
capabilities:
|
|
11692
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11811
|
+
capabilities: Yc,
|
|
11812
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(rl, {
|
|
11693
11813
|
...t,
|
|
11694
11814
|
config: e
|
|
11695
11815
|
})
|
|
11696
|
-
}),
|
|
11816
|
+
}), al = (e) => [e.lat, e.lng], ol = (e) => ae.divIcon({
|
|
11697
11817
|
className: "",
|
|
11698
11818
|
html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
|
|
11699
11819
|
iconSize: [18, 18],
|
|
11700
11820
|
iconAnchor: [9, 9]
|
|
11701
|
-
}),
|
|
11821
|
+
}), sl = ({ readOnly: e, onClick: t }) => (ie({ click(n) {
|
|
11702
11822
|
e || t?.({ location: {
|
|
11703
11823
|
lat: n.latlng.lat,
|
|
11704
11824
|
lng: n.latlng.lng
|
|
11705
11825
|
} });
|
|
11706
|
-
} }), null),
|
|
11707
|
-
let g = go(), _ = p(() =>
|
|
11826
|
+
} }), null), cl = ({ center: e = Wc, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], height: a = 320, className: o, readOnly: s, tileUrl: c = Kc, attribution: l = qc, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11827
|
+
let g = go(), _ = p(() => al(e), [e]), b = typeof a == "number" ? { height: `${a}px` } : { height: a };
|
|
11708
11828
|
return g ? /* @__PURE__ */ v("div", {
|
|
11709
11829
|
className: o,
|
|
11710
11830
|
style: b,
|
|
@@ -11719,29 +11839,29 @@ var dr = (e) => {
|
|
|
11719
11839
|
attribution: l,
|
|
11720
11840
|
url: c
|
|
11721
11841
|
}),
|
|
11722
|
-
/* @__PURE__ */ v(
|
|
11842
|
+
/* @__PURE__ */ v(sl, {
|
|
11723
11843
|
readOnly: s,
|
|
11724
11844
|
onClick: u
|
|
11725
11845
|
}),
|
|
11726
11846
|
i.map((e) => /* @__PURE__ */ v(B, {
|
|
11727
|
-
positions: e.points.map(
|
|
11847
|
+
positions: e.points.map(al),
|
|
11728
11848
|
pathOptions: {
|
|
11729
|
-
color: e.color ??
|
|
11730
|
-
fillColor: e.fillColor ?? e.color ??
|
|
11849
|
+
color: e.color ?? $c("var(--sf-map-area-stroke)"),
|
|
11850
|
+
fillColor: e.fillColor ?? e.color ?? $c("var(--sf-map-area-fill)"),
|
|
11731
11851
|
fillOpacity: .14,
|
|
11732
11852
|
weight: 2.5
|
|
11733
11853
|
}
|
|
11734
11854
|
}, e.id)),
|
|
11735
11855
|
r.map((e) => /* @__PURE__ */ v(V, {
|
|
11736
|
-
positions: e.points.map(
|
|
11856
|
+
positions: e.points.map(al),
|
|
11737
11857
|
pathOptions: {
|
|
11738
|
-
color: e.color ??
|
|
11858
|
+
color: e.color ?? $c("var(--sf-map-route-stroke)"),
|
|
11739
11859
|
weight: 3.5
|
|
11740
11860
|
}
|
|
11741
11861
|
}, e.id)),
|
|
11742
11862
|
n.map((e) => /* @__PURE__ */ v(ne, {
|
|
11743
|
-
position:
|
|
11744
|
-
icon:
|
|
11863
|
+
position: al(e.position),
|
|
11864
|
+
icon: ol(e.color),
|
|
11745
11865
|
title: e.title ?? e.label,
|
|
11746
11866
|
draggable: !s && e.options?.draggable,
|
|
11747
11867
|
bubblingMouseEvents: !1,
|
|
@@ -11778,18 +11898,18 @@ var dr = (e) => {
|
|
|
11778
11898
|
style: b,
|
|
11779
11899
|
children: "Cargando mapa…"
|
|
11780
11900
|
});
|
|
11781
|
-
},
|
|
11901
|
+
}, ll = (e) => ({
|
|
11782
11902
|
id: "leaflet",
|
|
11783
|
-
capabilities:
|
|
11784
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11903
|
+
capabilities: Jc,
|
|
11904
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(cl, {
|
|
11785
11905
|
...t,
|
|
11786
11906
|
tileUrl: e?.tileUrl,
|
|
11787
11907
|
attribution: e?.attribution
|
|
11788
11908
|
})
|
|
11789
|
-
}),
|
|
11790
|
-
let n =
|
|
11791
|
-
return 2 *
|
|
11792
|
-
},
|
|
11909
|
+
}), ul = 6371e3, dl = (e) => e * Math.PI / 180, fl = (e, t) => {
|
|
11910
|
+
let n = dl(t.lat - e.lat), r = dl(t.lng - e.lng), i = dl(e.lat), a = dl(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
|
|
11911
|
+
return 2 * ul * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
|
|
11912
|
+
}, pl = () => ({
|
|
11793
11913
|
id: "basic",
|
|
11794
11914
|
capabilities: {
|
|
11795
11915
|
distance: "point-to-point",
|
|
@@ -11797,12 +11917,12 @@ var dr = (e) => {
|
|
|
11797
11917
|
},
|
|
11798
11918
|
async calculateDistance(e) {
|
|
11799
11919
|
let t = e.origins[0], n = e.destinations[0];
|
|
11800
|
-
return { distanceMeters: t && n ?
|
|
11920
|
+
return { distanceMeters: t && n ? fl(t, n) : 0 };
|
|
11801
11921
|
}
|
|
11802
|
-
}),
|
|
11922
|
+
}), ml = (e) => ({
|
|
11803
11923
|
lat: e.lat(),
|
|
11804
11924
|
lng: e.lng()
|
|
11805
|
-
}),
|
|
11925
|
+
}), hl = (e) => {
|
|
11806
11926
|
let t = e.geometry?.location;
|
|
11807
11927
|
if (!t) return null;
|
|
11808
11928
|
let n = e.formatted_address ?? e.place_id ?? "Ubicación Google Maps";
|
|
@@ -11810,45 +11930,45 @@ var dr = (e) => {
|
|
|
11810
11930
|
id: e.place_id ?? n,
|
|
11811
11931
|
label: n,
|
|
11812
11932
|
address: e.formatted_address,
|
|
11813
|
-
location:
|
|
11933
|
+
location: ml(t),
|
|
11814
11934
|
provider: "google",
|
|
11815
11935
|
raw: e
|
|
11816
11936
|
};
|
|
11817
|
-
},
|
|
11937
|
+
}, gl = (e) => ({
|
|
11818
11938
|
id: "google",
|
|
11819
11939
|
capabilities: { geocoding: "full" },
|
|
11820
11940
|
async geocode(t) {
|
|
11821
|
-
let n = (await
|
|
11941
|
+
let n = (await Qc(e)).maps?.Geocoder;
|
|
11822
11942
|
return n ? new Promise((e) => {
|
|
11823
11943
|
new n().geocode({ address: t }, (t) => {
|
|
11824
|
-
e((t ?? []).map((e) =>
|
|
11944
|
+
e((t ?? []).map((e) => hl(e)).filter((e) => !!e));
|
|
11825
11945
|
});
|
|
11826
11946
|
}) : [];
|
|
11827
11947
|
},
|
|
11828
11948
|
async reverseGeocode(t) {
|
|
11829
|
-
let n = (await
|
|
11949
|
+
let n = (await Qc(e)).maps?.Geocoder;
|
|
11830
11950
|
return n ? new Promise((e) => {
|
|
11831
11951
|
new n().geocode({ location: t }, (t) => {
|
|
11832
|
-
e(
|
|
11952
|
+
e(hl(t?.[0] ?? {}));
|
|
11833
11953
|
});
|
|
11834
11954
|
}) : null;
|
|
11835
11955
|
}
|
|
11836
|
-
}),
|
|
11956
|
+
}), _l = (e) => e.toFixed(6), vl = (e, t, n) => Math.min(Math.max(e, t), n), yl = (e) => vl(e, -90, 90), bl = (e) => vl(e, -180, 180), xl = (e, t = 0) => {
|
|
11837
11957
|
if (typeof e == "number") return Number.isFinite(e) ? e : t;
|
|
11838
11958
|
let n = Number.parseFloat(e.trim().replace(",", "."));
|
|
11839
11959
|
return Number.isFinite(n) ? n : t;
|
|
11840
|
-
},
|
|
11960
|
+
}, Sl = (e) => `${_l(e.lat)}, ${_l(e.lng)}`, Cl = (e, t) => {
|
|
11841
11961
|
if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
|
|
11842
|
-
let n =
|
|
11962
|
+
let n = xl(e.lat, t.lat), r = xl(e.lng, t.lng);
|
|
11843
11963
|
return {
|
|
11844
|
-
lat:
|
|
11845
|
-
lng:
|
|
11964
|
+
lat: yl(n),
|
|
11965
|
+
lng: bl(r)
|
|
11846
11966
|
};
|
|
11847
|
-
},
|
|
11967
|
+
}, wl = (e, t = "Ubicación") => ({
|
|
11848
11968
|
id: `${e.lat}:${e.lng}`,
|
|
11849
11969
|
position: e,
|
|
11850
11970
|
label: t
|
|
11851
|
-
}),
|
|
11971
|
+
}), Tl = () => ({
|
|
11852
11972
|
id: "nominatim",
|
|
11853
11973
|
capabilities: { geocoding: "basic" },
|
|
11854
11974
|
async geocode(e) {
|
|
@@ -11872,13 +11992,13 @@ var dr = (e) => {
|
|
|
11872
11992
|
provider: "nominatim"
|
|
11873
11993
|
};
|
|
11874
11994
|
}
|
|
11875
|
-
}),
|
|
11995
|
+
}), El = (e) => ({
|
|
11876
11996
|
id: e.id,
|
|
11877
11997
|
capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
|
|
11878
11998
|
searchPlaces(t) {
|
|
11879
11999
|
return e.geocode(t);
|
|
11880
12000
|
}
|
|
11881
|
-
}),
|
|
12001
|
+
}), Dl = () => ({
|
|
11882
12002
|
id: "basic",
|
|
11883
12003
|
capabilities: {
|
|
11884
12004
|
routing: "basic",
|
|
@@ -11896,31 +12016,31 @@ var dr = (e) => {
|
|
|
11896
12016
|
]
|
|
11897
12017
|
};
|
|
11898
12018
|
}
|
|
11899
|
-
}),
|
|
12019
|
+
}), Ol = i({}), kl = (e) => {
|
|
11900
12020
|
let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
|
|
11901
|
-
return t === "google" && n ?
|
|
11902
|
-
},
|
|
11903
|
-
let t = e.defaultEngine === "google" ?
|
|
12021
|
+
return t === "google" && n ? gl(n) : Tl();
|
|
12022
|
+
}, Al = (e) => {
|
|
12023
|
+
let t = e.defaultEngine === "google" ? il(e.engines.google) : ll(e.engines.leaflet), n = kl(e);
|
|
11904
12024
|
return {
|
|
11905
12025
|
config: e,
|
|
11906
12026
|
engine: t,
|
|
11907
12027
|
geocodingService: n,
|
|
11908
|
-
placesService:
|
|
11909
|
-
routingService:
|
|
11910
|
-
distanceService:
|
|
12028
|
+
placesService: El(n),
|
|
12029
|
+
routingService: Dl(),
|
|
12030
|
+
distanceService: pl()
|
|
11911
12031
|
};
|
|
11912
|
-
},
|
|
11913
|
-
let n = p(() => ({ maps: e ?
|
|
11914
|
-
return /* @__PURE__ */ v(
|
|
12032
|
+
}, jl = ({ maps: e, children: t }) => {
|
|
12033
|
+
let n = p(() => ({ maps: e ? Al(e) : void 0 }), [e]);
|
|
12034
|
+
return /* @__PURE__ */ v(Ol.Provider, {
|
|
11915
12035
|
value: n,
|
|
11916
12036
|
children: t
|
|
11917
12037
|
});
|
|
11918
|
-
},
|
|
11919
|
-
let e =
|
|
11920
|
-
if (!e.maps) throw Error(
|
|
12038
|
+
}, Ml = () => c(Ol), Nl = () => {
|
|
12039
|
+
let e = Ml();
|
|
12040
|
+
if (!e.maps) throw Error(Uc);
|
|
11921
12041
|
return e.maps;
|
|
11922
|
-
},
|
|
11923
|
-
let e =
|
|
12042
|
+
}, Pl = () => {
|
|
12043
|
+
let e = Nl(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
|
|
11924
12044
|
return {
|
|
11925
12045
|
loading: t,
|
|
11926
12046
|
results: r,
|
|
@@ -11944,18 +12064,18 @@ var dr = (e) => {
|
|
|
11944
12064
|
}
|
|
11945
12065
|
}, [e.geocodingService])
|
|
11946
12066
|
};
|
|
11947
|
-
},
|
|
11948
|
-
let e =
|
|
12067
|
+
}, Fl = () => {
|
|
12068
|
+
let e = Nl();
|
|
11949
12069
|
return p(() => ({
|
|
11950
12070
|
id: e.engine.id,
|
|
11951
12071
|
capabilities: e.engine.capabilities,
|
|
11952
12072
|
renderer: e.engine.createRenderer()
|
|
11953
12073
|
}), [e.engine]);
|
|
11954
|
-
},
|
|
12074
|
+
}, Il = () => Nl().config, Ll = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", Rl = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Buscar dirección", readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11955
12075
|
let d = b({
|
|
11956
12076
|
name: t,
|
|
11957
12077
|
control: e.control
|
|
11958
|
-
}), { loading: f, results: p, error: m, search: g } =
|
|
12078
|
+
}), { loading: f, results: p, error: m, search: g } = Pl(), [_, x] = h(() => Ll(d.field.value)), S = String(t), C = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, w = o || s, T = (e) => {
|
|
11959
12079
|
d.field.onChange(e), l?.(e);
|
|
11960
12080
|
};
|
|
11961
12081
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -12022,9 +12142,9 @@ var dr = (e) => {
|
|
|
12022
12142
|
]
|
|
12023
12143
|
})
|
|
12024
12144
|
});
|
|
12025
|
-
},
|
|
12026
|
-
let g =
|
|
12027
|
-
return /* @__PURE__ */ v(
|
|
12145
|
+
}, zl = ({ title: e, description: t, center: n = Wc, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], height: s = 360, className: c, readOnly: l, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
12146
|
+
let g = Fl(), _ = p(() => g.renderer, [g.renderer]);
|
|
12147
|
+
return /* @__PURE__ */ v(Rc, {
|
|
12028
12148
|
title: e,
|
|
12029
12149
|
description: t,
|
|
12030
12150
|
className: c,
|
|
@@ -12043,16 +12163,16 @@ var dr = (e) => {
|
|
|
12043
12163
|
onMarkerDragEnd: h
|
|
12044
12164
|
})
|
|
12045
12165
|
});
|
|
12046
|
-
},
|
|
12166
|
+
}, Bl = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12047
12167
|
let [d, f] = h(!1), [p, m] = h(null), g = b({
|
|
12048
12168
|
name: t,
|
|
12049
12169
|
control: e.control
|
|
12050
|
-
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C =
|
|
12170
|
+
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = Cl(g.field.value, Wc), w = (e) => {
|
|
12051
12171
|
g.field.onChange(e), l?.(e);
|
|
12052
12172
|
}, T = (e, t) => {
|
|
12053
12173
|
w({
|
|
12054
12174
|
...C,
|
|
12055
|
-
[e]:
|
|
12175
|
+
[e]: xl(t, C[e])
|
|
12056
12176
|
});
|
|
12057
12177
|
};
|
|
12058
12178
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -12075,7 +12195,7 @@ var dr = (e) => {
|
|
|
12075
12195
|
id: `${_}-lat`,
|
|
12076
12196
|
type: "text",
|
|
12077
12197
|
inputMode: "decimal",
|
|
12078
|
-
value:
|
|
12198
|
+
value: _l(C.lat),
|
|
12079
12199
|
readOnly: S,
|
|
12080
12200
|
disabled: s,
|
|
12081
12201
|
"aria-invalid": !!x || void 0,
|
|
@@ -12095,7 +12215,7 @@ var dr = (e) => {
|
|
|
12095
12215
|
id: `${_}-lng`,
|
|
12096
12216
|
type: "text",
|
|
12097
12217
|
inputMode: "decimal",
|
|
12098
|
-
value:
|
|
12218
|
+
value: _l(C.lng),
|
|
12099
12219
|
readOnly: S,
|
|
12100
12220
|
disabled: s,
|
|
12101
12221
|
"aria-invalid": !!x || void 0,
|
|
@@ -12114,8 +12234,8 @@ var dr = (e) => {
|
|
|
12114
12234
|
onClick: () => {
|
|
12115
12235
|
!navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
|
|
12116
12236
|
let t = {
|
|
12117
|
-
lat: Number(
|
|
12118
|
-
lng: Number(
|
|
12237
|
+
lat: Number(_l(e.coords.latitude)),
|
|
12238
|
+
lng: Number(_l(e.coords.longitude))
|
|
12119
12239
|
};
|
|
12120
12240
|
w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
|
|
12121
12241
|
}, () => {
|
|
@@ -12136,7 +12256,7 @@ var dr = (e) => {
|
|
|
12136
12256
|
role: "status",
|
|
12137
12257
|
children: p
|
|
12138
12258
|
}),
|
|
12139
|
-
/* @__PURE__ */ v(
|
|
12259
|
+
/* @__PURE__ */ v(zl, {
|
|
12140
12260
|
center: C,
|
|
12141
12261
|
zoom: a,
|
|
12142
12262
|
height: 220,
|
|
@@ -12148,8 +12268,8 @@ var dr = (e) => {
|
|
|
12148
12268
|
}],
|
|
12149
12269
|
onClick: (e) => {
|
|
12150
12270
|
w({
|
|
12151
|
-
lat: Number(
|
|
12152
|
-
lng: Number(
|
|
12271
|
+
lat: Number(_l(e.location.lat)),
|
|
12272
|
+
lng: Number(_l(e.location.lng))
|
|
12153
12273
|
}), g.field.onBlur();
|
|
12154
12274
|
}
|
|
12155
12275
|
}),
|
|
@@ -12160,19 +12280,19 @@ var dr = (e) => {
|
|
|
12160
12280
|
]
|
|
12161
12281
|
})
|
|
12162
12282
|
});
|
|
12163
|
-
},
|
|
12283
|
+
}, Vl = (e) => /* @__PURE__ */ v(Bl, { ...e }), Hl = (e) => Array.isArray(e) ? e.map((e) => Cl(e, Wc)) : [], Ul = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, Wl = "var(--sf-map-area-stroke)", Gl = "var(--sf-map-area-fill)", Kl = "var(--sf-map-route-stroke)", ql = ({ form: e, name: t, mode: n, label: r, info: i, required: a = !0, zoom: o = 13, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
12164
12284
|
let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
|
|
12165
12285
|
name: t,
|
|
12166
12286
|
control: e.control,
|
|
12167
12287
|
rules: { validate: (e) => {
|
|
12168
|
-
let t =
|
|
12288
|
+
let t = Hl(e).length;
|
|
12169
12289
|
return t === 0 && !a ? !0 : t < f ? p : !0;
|
|
12170
12290
|
} }
|
|
12171
|
-
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x =
|
|
12291
|
+
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = Hl(m.field.value), S = x.at(-1) ?? Wc, C = {
|
|
12172
12292
|
id: `${h}-${n}`,
|
|
12173
12293
|
points: x,
|
|
12174
|
-
color: n === "area" ?
|
|
12175
|
-
fillColor: n === "area" ?
|
|
12294
|
+
color: n === "area" ? Wl : Kl,
|
|
12295
|
+
fillColor: n === "area" ? Gl : void 0
|
|
12176
12296
|
}, w = (e) => {
|
|
12177
12297
|
m.field.onChange(e), u?.(e);
|
|
12178
12298
|
}, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
|
|
@@ -12205,7 +12325,7 @@ var dr = (e) => {
|
|
|
12205
12325
|
children: "Limpiar"
|
|
12206
12326
|
})]
|
|
12207
12327
|
}),
|
|
12208
|
-
/* @__PURE__ */ v(
|
|
12328
|
+
/* @__PURE__ */ v(zl, {
|
|
12209
12329
|
center: S,
|
|
12210
12330
|
zoom: o,
|
|
12211
12331
|
height: 260,
|
|
@@ -12214,7 +12334,7 @@ var dr = (e) => {
|
|
|
12214
12334
|
id: `${h}-point-${t}`,
|
|
12215
12335
|
position: e,
|
|
12216
12336
|
label: String(t + 1),
|
|
12217
|
-
color: n === "area" ?
|
|
12337
|
+
color: n === "area" ? Wl : Kl,
|
|
12218
12338
|
options: { draggable: !_ }
|
|
12219
12339
|
})),
|
|
12220
12340
|
areas: n === "area" && x.length >= 3 ? [C] : [],
|
|
@@ -12237,7 +12357,7 @@ var dr = (e) => {
|
|
|
12237
12357
|
className: "sf-map-hint",
|
|
12238
12358
|
"aria-live": "polite",
|
|
12239
12359
|
children: [
|
|
12240
|
-
|
|
12360
|
+
Ul(x),
|
|
12241
12361
|
" · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
|
|
12242
12362
|
" ",
|
|
12243
12363
|
/* @__PURE__ */ v("span", {
|
|
@@ -12249,38 +12369,38 @@ var dr = (e) => {
|
|
|
12249
12369
|
]
|
|
12250
12370
|
})
|
|
12251
12371
|
});
|
|
12252
|
-
},
|
|
12372
|
+
}, Jl = (e) => /* @__PURE__ */ v(ql, {
|
|
12253
12373
|
...e,
|
|
12254
12374
|
mode: "area"
|
|
12255
|
-
}),
|
|
12375
|
+
}), Yl = (e) => /* @__PURE__ */ v(ql, {
|
|
12256
12376
|
...e,
|
|
12257
12377
|
mode: "route"
|
|
12258
|
-
}),
|
|
12378
|
+
}), Xl = (e) => {
|
|
12259
12379
|
switch (e.kind) {
|
|
12260
|
-
case "coordinates": return /* @__PURE__ */ v(
|
|
12261
|
-
case "location": return /* @__PURE__ */ v(
|
|
12262
|
-
case "address": return /* @__PURE__ */ v(
|
|
12263
|
-
case "area": return /* @__PURE__ */ v(
|
|
12264
|
-
case "route": return /* @__PURE__ */ v(
|
|
12380
|
+
case "coordinates": return /* @__PURE__ */ v(Vl, { ...e });
|
|
12381
|
+
case "location": return /* @__PURE__ */ v(Bl, { ...e });
|
|
12382
|
+
case "address": return /* @__PURE__ */ v(Rl, { ...e });
|
|
12383
|
+
case "area": return /* @__PURE__ */ v(Jl, { ...e });
|
|
12384
|
+
case "route": return /* @__PURE__ */ v(Yl, { ...e });
|
|
12265
12385
|
default: return null;
|
|
12266
12386
|
}
|
|
12267
|
-
},
|
|
12387
|
+
}, Zl = /^#[0-9a-fA-F]{6}$/, Ql = "#".padEnd(7, "0"), $l = () => {
|
|
12268
12388
|
if (typeof document > "u") return "";
|
|
12269
12389
|
let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
|
|
12270
|
-
return
|
|
12271
|
-
},
|
|
12390
|
+
return Zl.test(e) ? e.toLowerCase() : "";
|
|
12391
|
+
}, eu = (e, t, n) => Math.min(n, Math.max(t, e)), tu = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), nu = () => [], ru = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], iu = () => [], au = (e) => Array.isArray(e) ? e.map((e) => {
|
|
12272
12392
|
if (typeof e != "object" || !e) return null;
|
|
12273
12393
|
let t = e;
|
|
12274
12394
|
return {
|
|
12275
12395
|
key: String(t.key ?? ""),
|
|
12276
12396
|
value: String(t.value ?? "")
|
|
12277
12397
|
};
|
|
12278
|
-
}).filter((e) => e != null) : [],
|
|
12398
|
+
}).filter((e) => e != null) : [], ou = (e = 0, t = 100) => ({
|
|
12279
12399
|
start: e,
|
|
12280
12400
|
end: t
|
|
12281
|
-
}),
|
|
12401
|
+
}), su = (e, t = 0, n = 100) => {
|
|
12282
12402
|
if (e && typeof e == "object" && "start" in e && "end" in e) {
|
|
12283
|
-
let r = e, i =
|
|
12403
|
+
let r = e, i = eu(Number(r.start), t, n), a = eu(Number(r.end), t, n);
|
|
12284
12404
|
return i <= a ? {
|
|
12285
12405
|
start: i,
|
|
12286
12406
|
end: a
|
|
@@ -12289,15 +12409,15 @@ var dr = (e) => {
|
|
|
12289
12409
|
end: i
|
|
12290
12410
|
};
|
|
12291
12411
|
}
|
|
12292
|
-
return
|
|
12293
|
-
},
|
|
12294
|
-
let n =
|
|
12295
|
-
return
|
|
12296
|
-
},
|
|
12412
|
+
return ou(t, n);
|
|
12413
|
+
}, cu = (e, t) => {
|
|
12414
|
+
let n = $l(), r = String(t ?? (n || Ql)).trim(), i = Zl.test(r) ? r.toLowerCase() : Ql, a = String(e ?? i).trim();
|
|
12415
|
+
return Zl.test(a) ? a.toLowerCase() : i;
|
|
12416
|
+
}, lu = (e, t, n) => n <= t ? 0 : Math.round((eu(e, t, n) - t) / (n - t) * 100), uu = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), du = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
12297
12417
|
let h = b({
|
|
12298
12418
|
name: t,
|
|
12299
12419
|
control: e.control
|
|
12300
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
12420
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = eu(Number(h.field.value ?? a), a, o), C = (e) => {
|
|
12301
12421
|
h.field.onChange(e), p?.(e);
|
|
12302
12422
|
};
|
|
12303
12423
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -12321,17 +12441,17 @@ var dr = (e) => {
|
|
|
12321
12441
|
"aria-invalid": !!_ || void 0,
|
|
12322
12442
|
onBlur: () => h.field.onBlur(),
|
|
12323
12443
|
onChange: (e) => C(Number(e.target.value)),
|
|
12324
|
-
className:
|
|
12444
|
+
className: uu(x)
|
|
12325
12445
|
}), /* @__PURE__ */ v("span", {
|
|
12326
12446
|
className: "sf-slider__value",
|
|
12327
|
-
children:
|
|
12447
|
+
children: tu(S, {
|
|
12328
12448
|
suffix: c,
|
|
12329
12449
|
formatValue: f
|
|
12330
12450
|
})
|
|
12331
12451
|
})]
|
|
12332
12452
|
})
|
|
12333
12453
|
});
|
|
12334
|
-
},
|
|
12454
|
+
}, fu = {
|
|
12335
12455
|
slate: {
|
|
12336
12456
|
wrap: "border-slate-300 bg-white",
|
|
12337
12457
|
button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
|
|
@@ -12352,7 +12472,7 @@ var dr = (e) => {
|
|
|
12352
12472
|
button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
|
|
12353
12473
|
value: "text-blue-700"
|
|
12354
12474
|
}
|
|
12355
|
-
},
|
|
12475
|
+
}, pu = {
|
|
12356
12476
|
sm: {
|
|
12357
12477
|
button: "h-6 w-6",
|
|
12358
12478
|
icon: "h-3 w-3",
|
|
@@ -12363,13 +12483,13 @@ var dr = (e) => {
|
|
|
12363
12483
|
icon: "h-3.5 w-3.5",
|
|
12364
12484
|
value: "min-w-[2.5rem] px-1.5 text-sm"
|
|
12365
12485
|
}
|
|
12366
|
-
},
|
|
12486
|
+
}, mu = (e, t) => {
|
|
12367
12487
|
let n = (String(t).split(".")[1] ?? "").length;
|
|
12368
12488
|
return Number(e.toFixed(n));
|
|
12369
|
-
},
|
|
12370
|
-
let f =
|
|
12489
|
+
}, hu = ({ value: e, onChange: t, min: n = 0, max: r = Infinity, step: i = 1, tone: a = "slate", size: o = "md", disabled: s = !1, readOnly: c = !1, ariaLabel: l, formatValue: u, className: d }) => {
|
|
12490
|
+
let f = fu[a], p = pu[o], m = s || c, h = (a) => {
|
|
12371
12491
|
if (m) return;
|
|
12372
|
-
let o = Math.min(r, Math.max(n,
|
|
12492
|
+
let o = Math.min(r, Math.max(n, mu(a, i)));
|
|
12373
12493
|
o !== e && t(o);
|
|
12374
12494
|
}, g = e <= n, _ = e >= r, b = u ? u(e) : String(e), x = (0, X.default)("flex items-center justify-center font-bold leading-none transition-colors disabled:cursor-not-allowed disabled:opacity-40", f.button, p.button);
|
|
12375
12495
|
return /* @__PURE__ */ y("div", {
|
|
@@ -12405,11 +12525,11 @@ var dr = (e) => {
|
|
|
12405
12525
|
})
|
|
12406
12526
|
]
|
|
12407
12527
|
});
|
|
12408
|
-
},
|
|
12528
|
+
}, gu = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), _u = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
12409
12529
|
let h = b({
|
|
12410
12530
|
name: t,
|
|
12411
12531
|
control: e.control
|
|
12412
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
12532
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = su(h.field.value, a, o), C = (e) => {
|
|
12413
12533
|
h.field.onChange(e), p?.(e);
|
|
12414
12534
|
}, w = {
|
|
12415
12535
|
suffix: c,
|
|
@@ -12427,7 +12547,7 @@ var dr = (e) => {
|
|
|
12427
12547
|
children: [
|
|
12428
12548
|
/* @__PURE__ */ v("span", {
|
|
12429
12549
|
className: "sf-slider__value sf-slider__value--sm",
|
|
12430
|
-
children:
|
|
12550
|
+
children: tu(S.start, w)
|
|
12431
12551
|
}),
|
|
12432
12552
|
/* @__PURE__ */ y("div", {
|
|
12433
12553
|
className: "grid flex-1 gap-2",
|
|
@@ -12449,7 +12569,7 @@ var dr = (e) => {
|
|
|
12449
12569
|
end: Math.max(t, S.end)
|
|
12450
12570
|
});
|
|
12451
12571
|
},
|
|
12452
|
-
className:
|
|
12572
|
+
className: gu(x)
|
|
12453
12573
|
}), /* @__PURE__ */ v("input", {
|
|
12454
12574
|
id: `${g}-end`,
|
|
12455
12575
|
type: "range",
|
|
@@ -12468,21 +12588,21 @@ var dr = (e) => {
|
|
|
12468
12588
|
end: t
|
|
12469
12589
|
});
|
|
12470
12590
|
},
|
|
12471
|
-
className:
|
|
12591
|
+
className: gu(x)
|
|
12472
12592
|
})]
|
|
12473
12593
|
}),
|
|
12474
12594
|
/* @__PURE__ */ v("span", {
|
|
12475
12595
|
className: "sf-slider__value sf-slider__value--sm",
|
|
12476
|
-
children:
|
|
12596
|
+
children: tu(S.end, w)
|
|
12477
12597
|
})
|
|
12478
12598
|
]
|
|
12479
12599
|
})
|
|
12480
12600
|
});
|
|
12481
|
-
},
|
|
12601
|
+
}, vu = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
|
|
12482
12602
|
let d = b({
|
|
12483
12603
|
name: t,
|
|
12484
12604
|
control: e.control
|
|
12485
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m =
|
|
12605
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = eu(Number(d.field.value ?? a), a, o), h = lu(m, a, o);
|
|
12486
12606
|
return /* @__PURE__ */ v(Z, {
|
|
12487
12607
|
id: f,
|
|
12488
12608
|
label: n,
|
|
@@ -12505,21 +12625,21 @@ var dr = (e) => {
|
|
|
12505
12625
|
})
|
|
12506
12626
|
}), /* @__PURE__ */ v("span", {
|
|
12507
12627
|
className: "sf-progress-bar__value",
|
|
12508
|
-
children:
|
|
12628
|
+
children: tu(m, {
|
|
12509
12629
|
suffix: s,
|
|
12510
12630
|
formatValue: l
|
|
12511
12631
|
})
|
|
12512
12632
|
})]
|
|
12513
12633
|
})
|
|
12514
12634
|
});
|
|
12515
|
-
},
|
|
12635
|
+
}, yu = {
|
|
12516
12636
|
default: "sf-progress-bar-readonly__fill--default",
|
|
12517
12637
|
success: "sf-progress-bar-readonly__fill--success",
|
|
12518
12638
|
warning: "sf-progress-bar-readonly__fill--warning",
|
|
12519
12639
|
danger: "sf-progress-bar-readonly__fill--danger",
|
|
12520
12640
|
info: "sf-progress-bar-readonly__fill--info"
|
|
12521
|
-
},
|
|
12522
|
-
let u =
|
|
12641
|
+
}, bu = ({ value: e, min: t = 0, max: n = 100, label: r, showValue: i = !0, suffix: a, formatValue: o, tone: s = "default", size: c = "md", className: l }) => {
|
|
12642
|
+
let u = eu(e, t, n), d = lu(u, t, n), f = tu(u, {
|
|
12523
12643
|
suffix: a,
|
|
12524
12644
|
formatValue: o
|
|
12525
12645
|
});
|
|
@@ -12533,7 +12653,7 @@ var dr = (e) => {
|
|
|
12533
12653
|
/* @__PURE__ */ v("div", {
|
|
12534
12654
|
className: "sf-progress-bar-readonly__track",
|
|
12535
12655
|
children: /* @__PURE__ */ v("div", {
|
|
12536
|
-
className: (0, X.default)("sf-progress-bar-readonly__fill",
|
|
12656
|
+
className: (0, X.default)("sf-progress-bar-readonly__fill", yu[s]),
|
|
12537
12657
|
style: { width: `${d}%` },
|
|
12538
12658
|
role: "progressbar",
|
|
12539
12659
|
"aria-label": r ?? "Progreso",
|
|
@@ -12548,11 +12668,11 @@ var dr = (e) => {
|
|
|
12548
12668
|
})
|
|
12549
12669
|
]
|
|
12550
12670
|
});
|
|
12551
|
-
},
|
|
12671
|
+
}, xu = ({ form: e, name: t, label: n, info: r, required: i, stars: a = 5, readOnly: o, disabled: s, small: c, className: l, onChange: u, onRefresh: d }) => {
|
|
12552
12672
|
let [f, p] = h(0), m = b({
|
|
12553
12673
|
name: t,
|
|
12554
12674
|
control: e.control
|
|
12555
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x =
|
|
12675
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = Su(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
|
|
12556
12676
|
m.field.onChange(e), u?.(e), m.field.onBlur();
|
|
12557
12677
|
}, w = (e, t) => {
|
|
12558
12678
|
if (y) return;
|
|
@@ -12592,12 +12712,12 @@ var dr = (e) => {
|
|
|
12592
12712
|
}, e))
|
|
12593
12713
|
})
|
|
12594
12714
|
});
|
|
12595
|
-
},
|
|
12715
|
+
}, Su = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), Cu = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12596
12716
|
let d = b({
|
|
12597
12717
|
name: t,
|
|
12598
12718
|
control: e.control
|
|
12599
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
12600
|
-
let t =
|
|
12719
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = cu(d.field.value), g = (e) => {
|
|
12720
|
+
let t = cu(e, h);
|
|
12601
12721
|
d.field.onChange(t), l?.(t);
|
|
12602
12722
|
};
|
|
12603
12723
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -12640,11 +12760,11 @@ var dr = (e) => {
|
|
|
12640
12760
|
})]
|
|
12641
12761
|
})
|
|
12642
12762
|
});
|
|
12643
|
-
},
|
|
12763
|
+
}, wu = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Escribe y presiona Enter", maxItems: o, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
12644
12764
|
let [f, p] = h(""), m = b({
|
|
12645
12765
|
name: t,
|
|
12646
12766
|
control: e.control
|
|
12647
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S =
|
|
12767
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = ru(m.field.value), C = o != null && S.length >= o, w = (e) => {
|
|
12648
12768
|
m.field.onChange(e), u?.(e);
|
|
12649
12769
|
}, T = () => {
|
|
12650
12770
|
let e = f.trim();
|
|
@@ -12696,11 +12816,11 @@ var dr = (e) => {
|
|
|
12696
12816
|
})]
|
|
12697
12817
|
})
|
|
12698
12818
|
});
|
|
12699
|
-
},
|
|
12819
|
+
}, Tu = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12700
12820
|
let d = b({
|
|
12701
12821
|
name: t,
|
|
12702
12822
|
control: e.control
|
|
12703
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
12823
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = au(d.field.value), g = (e) => {
|
|
12704
12824
|
d.field.onChange(e), l?.(e);
|
|
12705
12825
|
}, _ = (e, t, n) => {
|
|
12706
12826
|
g(h.map((r, i) => i === e ? {
|
|
@@ -12785,7 +12905,7 @@ var dr = (e) => {
|
|
|
12785
12905
|
})]
|
|
12786
12906
|
})
|
|
12787
12907
|
});
|
|
12788
|
-
},
|
|
12908
|
+
}, Eu = ({ items: e, onReorder: t, className: n }) => {
|
|
12789
12909
|
let [r, i] = h(null), a = (n) => (a) => {
|
|
12790
12910
|
if (a.preventDefault(), !r) return;
|
|
12791
12911
|
let o = e.findIndex((e) => e.id === r);
|
|
@@ -12811,7 +12931,7 @@ var dr = (e) => {
|
|
|
12811
12931
|
})]
|
|
12812
12932
|
}, e.id))
|
|
12813
12933
|
});
|
|
12814
|
-
},
|
|
12934
|
+
}, Du = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
|
|
12815
12935
|
className: (0, X.default)("sf-card-radio-group", i),
|
|
12816
12936
|
role: "radiogroup",
|
|
12817
12937
|
"aria-label": a,
|
|
@@ -12848,7 +12968,7 @@ var dr = (e) => {
|
|
|
12848
12968
|
]
|
|
12849
12969
|
}, n.value);
|
|
12850
12970
|
})
|
|
12851
|
-
}),
|
|
12971
|
+
}), Ou = {
|
|
12852
12972
|
group: {
|
|
12853
12973
|
label: "Grupo / Entidad",
|
|
12854
12974
|
labelShort: "GRP",
|
|
@@ -12867,7 +12987,7 @@ var dr = (e) => {
|
|
|
12867
12987
|
rowClass: "sf-org-tree-row--role",
|
|
12868
12988
|
barClass: "sf-org-tree-bar--role"
|
|
12869
12989
|
}
|
|
12870
|
-
},
|
|
12990
|
+
}, ku = (e) => {
|
|
12871
12991
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
|
|
12872
12992
|
for (let n of e) {
|
|
12873
12993
|
let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
|
|
@@ -12894,16 +13014,16 @@ var dr = (e) => {
|
|
|
12894
13014
|
hasChildren: !1
|
|
12895
13015
|
});
|
|
12896
13016
|
return r;
|
|
12897
|
-
},
|
|
13017
|
+
}, Au = (e, t = Ou) => t[e] ?? Ou[e] ?? null, ju = (e) => e.length, Mu = (e) => {
|
|
12898
13018
|
let t = new Set(e.map((e) => e.id));
|
|
12899
13019
|
return e.filter((e) => {
|
|
12900
13020
|
let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12901
13021
|
return n == null || !t.has(n);
|
|
12902
13022
|
});
|
|
12903
|
-
},
|
|
13023
|
+
}, Nu = ({ type: e, className: t }) => v(e === "group" ? ft : e === "role" ? He : Ve, {
|
|
12904
13024
|
className: t,
|
|
12905
13025
|
"aria-hidden": "true"
|
|
12906
|
-
}),
|
|
13026
|
+
}), Pu = ({ nodes: e, title: t = "Estructura", subtitle: n, loading: r = !1, error: i = null, onRefresh: a, canEdit: o = !1, onAddNode: c, onEditNode: l, onDeleteNode: d, showLegend: f = !1, themes: g = Ou, onRenderNode: _, maxHeight: b = 480, className: x }) => {
|
|
12907
13027
|
let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
|
|
12908
13028
|
visible: !1,
|
|
12909
13029
|
x: 0,
|
|
@@ -12926,7 +13046,7 @@ var dr = (e) => {
|
|
|
12926
13046
|
window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
|
|
12927
13047
|
};
|
|
12928
13048
|
}, [w.visible]);
|
|
12929
|
-
let D = p(() =>
|
|
13049
|
+
let D = p(() => ku(e), [e]), O = s((e) => {
|
|
12930
13050
|
let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12931
13051
|
for (; t != null;) {
|
|
12932
13052
|
if (S.has(t)) return !0;
|
|
@@ -13013,7 +13133,7 @@ var dr = (e) => {
|
|
|
13013
13133
|
className: "sf-org-tree__empty",
|
|
13014
13134
|
children: "Sin nodos"
|
|
13015
13135
|
}), k.map((e) => {
|
|
13016
|
-
let t =
|
|
13136
|
+
let t = Au(e.type, g);
|
|
13017
13137
|
return /* @__PURE__ */ v("li", {
|
|
13018
13138
|
role: "treeitem",
|
|
13019
13139
|
"aria-level": e.depth + 1,
|
|
@@ -13033,7 +13153,7 @@ var dr = (e) => {
|
|
|
13033
13153
|
tabIndex: e.hasChildren ? 0 : -1,
|
|
13034
13154
|
children: S.has(e.id) ? /* @__PURE__ */ v(ot, { className: "h-4 w-4" }) : /* @__PURE__ */ v(ct, { className: "h-4 w-4" })
|
|
13035
13155
|
}),
|
|
13036
|
-
/* @__PURE__ */ v(
|
|
13156
|
+
/* @__PURE__ */ v(Nu, {
|
|
13037
13157
|
type: e.type,
|
|
13038
13158
|
className: "h-4 w-4 shrink-0 opacity-70"
|
|
13039
13159
|
}),
|
|
@@ -13118,7 +13238,7 @@ var dr = (e) => {
|
|
|
13118
13238
|
})
|
|
13119
13239
|
]
|
|
13120
13240
|
});
|
|
13121
|
-
},
|
|
13241
|
+
}, Fu = {
|
|
13122
13242
|
street: {
|
|
13123
13243
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
13124
13244
|
attribution: "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
|
|
@@ -13127,27 +13247,27 @@ var dr = (e) => {
|
|
|
13127
13247
|
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
13128
13248
|
attribution: "Tiles © Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
|
|
13129
13249
|
}
|
|
13130
|
-
},
|
|
13250
|
+
}, Iu = {
|
|
13131
13251
|
default: "Nodo",
|
|
13132
13252
|
nap: "NAP",
|
|
13133
13253
|
olt: "OLT",
|
|
13134
13254
|
splitter: "Splitter"
|
|
13135
|
-
},
|
|
13255
|
+
}, Lu = {
|
|
13136
13256
|
default: "var(--sf-accent)",
|
|
13137
13257
|
nap: "var(--sf-network-kind-nap)",
|
|
13138
13258
|
olt: "var(--sf-network-kind-olt)",
|
|
13139
13259
|
splitter: "var(--sf-network-kind-splitter)"
|
|
13140
|
-
},
|
|
13260
|
+
}, Ru = {
|
|
13141
13261
|
normal: "var(--sf-network-status-normal)",
|
|
13142
13262
|
warning: "var(--sf-network-status-warning)",
|
|
13143
13263
|
critical: "var(--sf-network-status-critical)",
|
|
13144
13264
|
maintenance: "var(--sf-network-status-maintenance)"
|
|
13145
|
-
},
|
|
13265
|
+
}, zu = {
|
|
13146
13266
|
normal: "Normal",
|
|
13147
13267
|
warning: "Advertencia",
|
|
13148
13268
|
critical: "Crítico",
|
|
13149
13269
|
maintenance: "Mantenimiento"
|
|
13150
|
-
},
|
|
13270
|
+
}, Bu = {
|
|
13151
13271
|
backbone: {
|
|
13152
13272
|
color: "var(--sf-network-edge-backbone)",
|
|
13153
13273
|
weight: 2.5
|
|
@@ -13161,7 +13281,7 @@ var dr = (e) => {
|
|
|
13161
13281
|
weight: 1.5,
|
|
13162
13282
|
dashArray: "6 4"
|
|
13163
13283
|
}
|
|
13164
|
-
},
|
|
13284
|
+
}, Vu = $c, Hu = (e) => {
|
|
13165
13285
|
if (!Array.isArray(e)) return [];
|
|
13166
13286
|
let t = [];
|
|
13167
13287
|
for (let n of e) {
|
|
@@ -13170,24 +13290,24 @@ var dr = (e) => {
|
|
|
13170
13290
|
if (!r) continue;
|
|
13171
13291
|
let i = Number(e.lat), a = Number(e.lng);
|
|
13172
13292
|
if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
|
|
13173
|
-
let o = String(e.status ?? "normal"), s = o in
|
|
13293
|
+
let o = String(e.status ?? "normal"), s = o in Ru ? o : "normal", c = {
|
|
13174
13294
|
id: r,
|
|
13175
13295
|
label: String(e.label ?? ""),
|
|
13176
13296
|
lat: i,
|
|
13177
13297
|
lng: a,
|
|
13178
13298
|
status: s
|
|
13179
13299
|
}, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
|
|
13180
|
-
l in
|
|
13300
|
+
l in Iu && (c.kind = l), e.value != null && Number.isFinite(Number(e.value)) && (c.value = Number(e.value)), e.icon != null && (c.icon = String(e.icon)), t.push(c);
|
|
13181
13301
|
}
|
|
13182
13302
|
return t;
|
|
13183
|
-
},
|
|
13303
|
+
}, Uu = (e) => {
|
|
13184
13304
|
if (!Array.isArray(e)) return [];
|
|
13185
13305
|
let t = [];
|
|
13186
13306
|
for (let n of e) {
|
|
13187
13307
|
if (typeof n != "object" || !n) continue;
|
|
13188
13308
|
let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
|
|
13189
13309
|
if (!r || !i) continue;
|
|
13190
|
-
let a = String(e.type ?? "backbone"), o = a in
|
|
13310
|
+
let a = String(e.type ?? "backbone"), o = a in Bu ? a : "backbone";
|
|
13191
13311
|
t.push({
|
|
13192
13312
|
from: r,
|
|
13193
13313
|
to: i,
|
|
@@ -13195,7 +13315,7 @@ var dr = (e) => {
|
|
|
13195
13315
|
});
|
|
13196
13316
|
}
|
|
13197
13317
|
return t;
|
|
13198
|
-
},
|
|
13318
|
+
}, Wu = (e) => {
|
|
13199
13319
|
let t = {
|
|
13200
13320
|
normal: 0,
|
|
13201
13321
|
warning: 0,
|
|
@@ -13204,18 +13324,18 @@ var dr = (e) => {
|
|
|
13204
13324
|
};
|
|
13205
13325
|
for (let n of e) t[n.status] += 1;
|
|
13206
13326
|
return t;
|
|
13207
|
-
},
|
|
13327
|
+
}, Gu = (e) => {
|
|
13208
13328
|
if (e.length === 0) return null;
|
|
13209
13329
|
let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
|
|
13210
13330
|
return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
|
|
13211
|
-
},
|
|
13331
|
+
}, Ku = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), qu = (e, t) => e.flatMap((e) => {
|
|
13212
13332
|
let n = t[e.from], r = t[e.to];
|
|
13213
13333
|
return !n || !r ? [] : [{
|
|
13214
13334
|
edge: e,
|
|
13215
13335
|
line: [n, r]
|
|
13216
13336
|
}];
|
|
13217
|
-
}),
|
|
13218
|
-
let i =
|
|
13337
|
+
}), Ju = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
|
|
13338
|
+
let i = Wu(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
|
|
13219
13339
|
return /* @__PURE__ */ y("div", {
|
|
13220
13340
|
className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
|
|
13221
13341
|
role: "region",
|
|
@@ -13227,15 +13347,15 @@ var dr = (e) => {
|
|
|
13227
13347
|
}),
|
|
13228
13348
|
/* @__PURE__ */ v("ul", {
|
|
13229
13349
|
className: "space-y-1",
|
|
13230
|
-
children: Object.keys(
|
|
13350
|
+
children: Object.keys(zu).map((e) => /* @__PURE__ */ y("li", {
|
|
13231
13351
|
className: "sf-network-legend__item",
|
|
13232
13352
|
children: [/* @__PURE__ */ y("span", {
|
|
13233
13353
|
className: "flex items-center gap-2",
|
|
13234
13354
|
children: [/* @__PURE__ */ v("span", {
|
|
13235
13355
|
className: "inline-block h-2.5 w-2.5 rounded-full",
|
|
13236
|
-
style: { background:
|
|
13356
|
+
style: { background: Ru[e] },
|
|
13237
13357
|
"aria-hidden": "true"
|
|
13238
|
-
}),
|
|
13358
|
+
}), zu[e]]
|
|
13239
13359
|
}), /* @__PURE__ */ v("span", {
|
|
13240
13360
|
className: "sf-network-legend__count",
|
|
13241
13361
|
children: i[e]
|
|
@@ -13248,7 +13368,7 @@ var dr = (e) => {
|
|
|
13248
13368
|
}), /* @__PURE__ */ v("ul", {
|
|
13249
13369
|
className: "space-y-1",
|
|
13250
13370
|
children: a.map((e) => {
|
|
13251
|
-
let t =
|
|
13371
|
+
let t = Bu[e ?? "backbone"];
|
|
13252
13372
|
return /* @__PURE__ */ y("li", {
|
|
13253
13373
|
className: "sf-network-legend__item sf-network-legend__item--edge",
|
|
13254
13374
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -13268,19 +13388,19 @@ var dr = (e) => {
|
|
|
13268
13388
|
})
|
|
13269
13389
|
]
|
|
13270
13390
|
});
|
|
13271
|
-
},
|
|
13272
|
-
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ??
|
|
13391
|
+
}, Yu = [-12.0464, -77.0428], Xu = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Zu = (e, t) => {
|
|
13392
|
+
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? Iu[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = Xu(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
|
|
13273
13393
|
return ae.divIcon({
|
|
13274
13394
|
className: "sf-network-marker-root",
|
|
13275
13395
|
iconAnchor: [24, 42],
|
|
13276
13396
|
iconSize: [48, 48],
|
|
13277
13397
|
html: `<div class="sf-network-marker${o}">
|
|
13278
13398
|
<div class="sf-network-marker__label">${a}</div>
|
|
13279
|
-
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${
|
|
13399
|
+
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${Xu(String(i))}</div>
|
|
13280
13400
|
</div>`
|
|
13281
13401
|
});
|
|
13282
|
-
},
|
|
13283
|
-
let t = re(), n =
|
|
13402
|
+
}, Qu = ({ nodes: e }) => {
|
|
13403
|
+
let t = re(), n = Gu(e);
|
|
13284
13404
|
return u(() => {
|
|
13285
13405
|
n && t.fitBounds(n, {
|
|
13286
13406
|
padding: [32, 32],
|
|
@@ -13291,8 +13411,8 @@ var dr = (e) => {
|
|
|
13291
13411
|
t,
|
|
13292
13412
|
e
|
|
13293
13413
|
]), null;
|
|
13294
|
-
},
|
|
13295
|
-
let g = go(), [_, b] = h("street"), x = l ?? _, S =
|
|
13414
|
+
}, $u = ({ nodes: e, edges: t = [], center: n = Yu, zoom: r = 12, height: i = 420, selectedNodeId: a, onNodeClick: o, showLegend: s = !0, fitBoundsToNodes: c = !0, basemap: l, onBasemapChange: u, showBasemapSwitcher: d = !1, ariaLabel: f = "Mapa de red", className: m }) => {
|
|
13415
|
+
let g = go(), [_, b] = h("street"), x = l ?? _, S = Fu[x], C = p(() => Ku(e), [e]), w = p(() => qu(t, C), [t, C]), T = (e) => {
|
|
13296
13416
|
l === void 0 && b(e), u?.(e);
|
|
13297
13417
|
};
|
|
13298
13418
|
return /* @__PURE__ */ y("div", {
|
|
@@ -13311,13 +13431,13 @@ var dr = (e) => {
|
|
|
13311
13431
|
attribution: S.attribution,
|
|
13312
13432
|
url: S.url
|
|
13313
13433
|
}),
|
|
13314
|
-
c && e.length > 0 && /* @__PURE__ */ v(
|
|
13434
|
+
c && e.length > 0 && /* @__PURE__ */ v(Qu, { nodes: e }),
|
|
13315
13435
|
w.map(({ edge: e, line: t }) => {
|
|
13316
|
-
let n =
|
|
13436
|
+
let n = Bu[e.type ?? "backbone"];
|
|
13317
13437
|
return /* @__PURE__ */ v(V, {
|
|
13318
13438
|
positions: t,
|
|
13319
13439
|
pathOptions: {
|
|
13320
|
-
color:
|
|
13440
|
+
color: Vu(n.color),
|
|
13321
13441
|
weight: n.weight,
|
|
13322
13442
|
dashArray: n.dashArray
|
|
13323
13443
|
}
|
|
@@ -13325,7 +13445,7 @@ var dr = (e) => {
|
|
|
13325
13445
|
}),
|
|
13326
13446
|
e.map((e) => /* @__PURE__ */ v(ne, {
|
|
13327
13447
|
position: C[e.id],
|
|
13328
|
-
icon:
|
|
13448
|
+
icon: Zu(e, e.id === a),
|
|
13329
13449
|
title: e.label,
|
|
13330
13450
|
alt: `${e.label}, estado ${e.status}`,
|
|
13331
13451
|
keyboard: !!o,
|
|
@@ -13349,17 +13469,17 @@ var dr = (e) => {
|
|
|
13349
13469
|
children: e === "street" ? "Mapa" : "Satélite"
|
|
13350
13470
|
}, e))
|
|
13351
13471
|
}),
|
|
13352
|
-
s && e.length > 0 && /* @__PURE__ */ v(
|
|
13472
|
+
s && e.length > 0 && /* @__PURE__ */ v(Ju, {
|
|
13353
13473
|
nodes: e,
|
|
13354
13474
|
edges: t
|
|
13355
13475
|
})
|
|
13356
13476
|
]
|
|
13357
13477
|
});
|
|
13358
|
-
},
|
|
13478
|
+
}, ed = {
|
|
13359
13479
|
edit: "sf-audit-timeline__icon-wrap--edit",
|
|
13360
13480
|
sync: "sf-audit-timeline__icon-wrap--sync",
|
|
13361
13481
|
create: "sf-audit-timeline__icon-wrap--create"
|
|
13362
|
-
},
|
|
13482
|
+
}, td = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
|
|
13363
13483
|
let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
|
|
13364
13484
|
return /* @__PURE__ */ y("section", {
|
|
13365
13485
|
className: (0, X.default)("sf-audit-timeline", a),
|
|
@@ -13398,11 +13518,11 @@ var dr = (e) => {
|
|
|
13398
13518
|
/* @__PURE__ */ v("div", {
|
|
13399
13519
|
className: "sf-audit-timeline__marker",
|
|
13400
13520
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
13401
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
13521
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", ed[r]),
|
|
13402
13522
|
"aria-hidden": "true",
|
|
13403
13523
|
children: t.icon
|
|
13404
13524
|
}) : /* @__PURE__ */ v("span", {
|
|
13405
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
13525
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", ed[r]),
|
|
13406
13526
|
"aria-hidden": "true"
|
|
13407
13527
|
})
|
|
13408
13528
|
}),
|
|
@@ -13438,16 +13558,16 @@ var dr = (e) => {
|
|
|
13438
13558
|
})]
|
|
13439
13559
|
})]
|
|
13440
13560
|
});
|
|
13441
|
-
},
|
|
13561
|
+
}, nd = {
|
|
13442
13562
|
info: "sf-record-list__icon--info",
|
|
13443
13563
|
warning: "sf-record-list__icon--warning",
|
|
13444
13564
|
success: "sf-record-list__icon--success",
|
|
13445
13565
|
neutral: "sf-record-list__icon--neutral"
|
|
13446
|
-
},
|
|
13566
|
+
}, rd = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
|
|
13447
13567
|
className: (0, X.default)("sf-record-list__item", o),
|
|
13448
13568
|
children: [
|
|
13449
13569
|
e && /* @__PURE__ */ v("span", {
|
|
13450
|
-
className: (0, X.default)("sf-record-list__icon",
|
|
13570
|
+
className: (0, X.default)("sf-record-list__icon", nd[t]),
|
|
13451
13571
|
"aria-hidden": "true",
|
|
13452
13572
|
children: e
|
|
13453
13573
|
}),
|
|
@@ -13472,7 +13592,7 @@ var dr = (e) => {
|
|
|
13472
13592
|
children: a
|
|
13473
13593
|
})
|
|
13474
13594
|
]
|
|
13475
|
-
}),
|
|
13595
|
+
}), id = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
|
|
13476
13596
|
className: (0, X.default)("sf-record-list", r),
|
|
13477
13597
|
"aria-label": i ?? (typeof e == "string" ? e : void 0),
|
|
13478
13598
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
@@ -13486,9 +13606,9 @@ var dr = (e) => {
|
|
|
13486
13606
|
})]
|
|
13487
13607
|
}), /* @__PURE__ */ v("div", {
|
|
13488
13608
|
className: "sf-record-list__items",
|
|
13489
|
-
children: n.map((e, t) => /* @__PURE__ */ v(
|
|
13609
|
+
children: n.map((e, t) => /* @__PURE__ */ v(rd, { ...e }, e.id ?? t))
|
|
13490
13610
|
})]
|
|
13491
|
-
}),
|
|
13611
|
+
}), ad = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
|
|
13492
13612
|
className: (0, X.default)("sf-live-chip", n),
|
|
13493
13613
|
children: [/* @__PURE__ */ v("span", {
|
|
13494
13614
|
className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
|
|
@@ -13497,12 +13617,12 @@ var dr = (e) => {
|
|
|
13497
13617
|
className: "sf-live-chip__label",
|
|
13498
13618
|
children: e
|
|
13499
13619
|
})]
|
|
13500
|
-
}),
|
|
13620
|
+
}), od = {
|
|
13501
13621
|
default: "var(--sf-text, #1B2A38)",
|
|
13502
13622
|
success: "#1F8A4C",
|
|
13503
13623
|
warning: "#C76A12",
|
|
13504
13624
|
danger: "#C0392B"
|
|
13505
|
-
},
|
|
13625
|
+
}, sd = {
|
|
13506
13626
|
display: "flex",
|
|
13507
13627
|
alignItems: "center",
|
|
13508
13628
|
justifyContent: "space-between",
|
|
@@ -13513,110 +13633,110 @@ var dr = (e) => {
|
|
|
13513
13633
|
border: "1px solid var(--sf-border, #E2E8EC)",
|
|
13514
13634
|
borderRadius: 13,
|
|
13515
13635
|
boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
|
|
13516
|
-
},
|
|
13636
|
+
}, cd = {
|
|
13517
13637
|
display: "flex",
|
|
13518
13638
|
alignItems: "center",
|
|
13519
13639
|
gap: 14,
|
|
13520
13640
|
flexWrap: "wrap"
|
|
13521
|
-
},
|
|
13641
|
+
}, ld = {
|
|
13522
13642
|
width: 1,
|
|
13523
13643
|
height: 20,
|
|
13524
13644
|
background: "var(--sf-border, #DCE3E7)"
|
|
13525
|
-
},
|
|
13645
|
+
}, ud = {
|
|
13526
13646
|
fontSize: 13,
|
|
13527
13647
|
fontWeight: 600,
|
|
13528
13648
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
13529
|
-
},
|
|
13649
|
+
}, dd = {
|
|
13530
13650
|
fontSize: 15,
|
|
13531
13651
|
fontWeight: 800,
|
|
13532
13652
|
color: "var(--sf-text, #1B2A38)",
|
|
13533
13653
|
fontVariantNumeric: "tabular-nums"
|
|
13534
|
-
},
|
|
13654
|
+
}, fd = {
|
|
13535
13655
|
fontSize: 12.5,
|
|
13536
13656
|
fontWeight: 800,
|
|
13537
13657
|
color: "#C76A12"
|
|
13538
|
-
},
|
|
13658
|
+
}, pd = {
|
|
13539
13659
|
fontSize: 13,
|
|
13540
13660
|
fontWeight: 700,
|
|
13541
13661
|
color: "var(--sf-text-subtle, #5C7180)"
|
|
13542
|
-
},
|
|
13662
|
+
}, md = {
|
|
13543
13663
|
display: "flex",
|
|
13544
13664
|
alignItems: "center",
|
|
13545
13665
|
gap: 22,
|
|
13546
13666
|
margin: 0
|
|
13547
|
-
},
|
|
13667
|
+
}, hd = {
|
|
13548
13668
|
display: "flex",
|
|
13549
13669
|
alignItems: "baseline",
|
|
13550
13670
|
gap: 6
|
|
13551
|
-
},
|
|
13671
|
+
}, gd = {
|
|
13552
13672
|
fontSize: 10.5,
|
|
13553
13673
|
fontWeight: 700,
|
|
13554
13674
|
letterSpacing: ".05em",
|
|
13555
13675
|
textTransform: "uppercase",
|
|
13556
13676
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
13557
|
-
},
|
|
13677
|
+
}, _d = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
|
|
13558
13678
|
className: (0, X.default)("sf-live-status-bar", r),
|
|
13559
13679
|
"aria-label": i,
|
|
13560
|
-
style:
|
|
13680
|
+
style: sd,
|
|
13561
13681
|
children: [/* @__PURE__ */ y("div", {
|
|
13562
|
-
style:
|
|
13682
|
+
style: cd,
|
|
13563
13683
|
children: [
|
|
13564
|
-
/* @__PURE__ */ v(
|
|
13684
|
+
/* @__PURE__ */ v(ad, { label: "En vivo" }),
|
|
13565
13685
|
/* @__PURE__ */ v("span", {
|
|
13566
|
-
style:
|
|
13686
|
+
style: pd,
|
|
13567
13687
|
children: e
|
|
13568
13688
|
}),
|
|
13569
13689
|
n && /* @__PURE__ */ y(_, { children: [
|
|
13570
13690
|
/* @__PURE__ */ v("span", {
|
|
13571
|
-
style:
|
|
13691
|
+
style: ld,
|
|
13572
13692
|
"aria-hidden": "true"
|
|
13573
13693
|
}),
|
|
13574
13694
|
/* @__PURE__ */ v("span", {
|
|
13575
|
-
style:
|
|
13695
|
+
style: ud,
|
|
13576
13696
|
children: n.label ?? "Próxima salida"
|
|
13577
13697
|
}),
|
|
13578
13698
|
/* @__PURE__ */ v("span", {
|
|
13579
|
-
style:
|
|
13699
|
+
style: dd,
|
|
13580
13700
|
children: n.time
|
|
13581
13701
|
}),
|
|
13582
13702
|
n.countdown != null && /* @__PURE__ */ v("span", {
|
|
13583
|
-
style:
|
|
13703
|
+
style: fd,
|
|
13584
13704
|
children: n.countdown
|
|
13585
13705
|
})
|
|
13586
13706
|
] })
|
|
13587
13707
|
]
|
|
13588
13708
|
}), /* @__PURE__ */ v("dl", {
|
|
13589
|
-
style:
|
|
13709
|
+
style: md,
|
|
13590
13710
|
children: t.map((e, t) => /* @__PURE__ */ y("div", {
|
|
13591
|
-
style:
|
|
13711
|
+
style: hd,
|
|
13592
13712
|
children: [/* @__PURE__ */ v("dd", {
|
|
13593
13713
|
style: {
|
|
13594
13714
|
margin: 0,
|
|
13595
13715
|
fontSize: 20,
|
|
13596
13716
|
fontWeight: 800,
|
|
13597
13717
|
fontVariantNumeric: "tabular-nums",
|
|
13598
|
-
color:
|
|
13718
|
+
color: od[e.accent ?? "default"]
|
|
13599
13719
|
},
|
|
13600
13720
|
children: e.value
|
|
13601
13721
|
}), /* @__PURE__ */ v("dt", {
|
|
13602
|
-
style:
|
|
13722
|
+
style: gd,
|
|
13603
13723
|
children: e.label
|
|
13604
13724
|
})]
|
|
13605
13725
|
}, e.id ?? `${e.label}-${t}`))
|
|
13606
13726
|
})]
|
|
13607
|
-
}),
|
|
13727
|
+
}), vd = {
|
|
13608
13728
|
success: "sf-timeline__dot--success",
|
|
13609
13729
|
warning: "sf-timeline__dot--warning",
|
|
13610
13730
|
danger: "sf-timeline__dot--danger",
|
|
13611
13731
|
info: "sf-timeline__dot--info",
|
|
13612
13732
|
default: "sf-timeline__dot--default"
|
|
13613
|
-
},
|
|
13733
|
+
}, yd = {
|
|
13614
13734
|
success: "sf-timeline__icon-wrap--success",
|
|
13615
13735
|
warning: "sf-timeline__icon-wrap--warning",
|
|
13616
13736
|
danger: "sf-timeline__icon-wrap--danger",
|
|
13617
13737
|
info: "sf-timeline__icon-wrap--info",
|
|
13618
13738
|
default: "sf-timeline__icon-wrap--default"
|
|
13619
|
-
},
|
|
13739
|
+
}, bd = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
|
|
13620
13740
|
className: (0, X.default)("sf-timeline", r),
|
|
13621
13741
|
"aria-label": t,
|
|
13622
13742
|
children: [e.length === 0 && /* @__PURE__ */ v("li", {
|
|
@@ -13635,11 +13755,11 @@ var dr = (e) => {
|
|
|
13635
13755
|
/* @__PURE__ */ v("div", {
|
|
13636
13756
|
className: "sf-timeline__marker",
|
|
13637
13757
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
13638
|
-
className: (0, X.default)("sf-timeline__icon-wrap",
|
|
13758
|
+
className: (0, X.default)("sf-timeline__icon-wrap", yd[r]),
|
|
13639
13759
|
"aria-hidden": "true",
|
|
13640
13760
|
children: t.icon
|
|
13641
13761
|
}) : /* @__PURE__ */ v("span", {
|
|
13642
|
-
className: (0, X.default)("sf-timeline__dot",
|
|
13762
|
+
className: (0, X.default)("sf-timeline__dot", vd[r]),
|
|
13643
13763
|
"aria-hidden": "true"
|
|
13644
13764
|
})
|
|
13645
13765
|
}),
|
|
@@ -13662,7 +13782,7 @@ var dr = (e) => {
|
|
|
13662
13782
|
]
|
|
13663
13783
|
}, t.id ?? n);
|
|
13664
13784
|
})]
|
|
13665
|
-
}),
|
|
13785
|
+
}), xd = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
|
|
13666
13786
|
let o = m(null), [c, l] = h(0), d = s((t) => {
|
|
13667
13787
|
let n = o.current;
|
|
13668
13788
|
if (!n || e.length === 0) return;
|
|
@@ -13724,36 +13844,36 @@ var dr = (e) => {
|
|
|
13724
13844
|
})
|
|
13725
13845
|
]
|
|
13726
13846
|
});
|
|
13727
|
-
},
|
|
13847
|
+
}, Sd = [
|
|
13728
13848
|
"var(--sf-chart-1)",
|
|
13729
13849
|
"var(--sf-chart-2)",
|
|
13730
13850
|
"var(--sf-chart-3)",
|
|
13731
13851
|
"var(--sf-chart-4)",
|
|
13732
13852
|
"var(--sf-chart-5)"
|
|
13733
|
-
],
|
|
13853
|
+
], Cd = (e, t) => e.color ?? Sd[t % Sd.length], wd = {
|
|
13734
13854
|
borderRadius: "0.375rem",
|
|
13735
13855
|
border: "1px solid var(--sf-chart-tooltip-border)",
|
|
13736
13856
|
background: "var(--sf-chart-tooltip-bg)",
|
|
13737
13857
|
fontSize: "0.75rem",
|
|
13738
13858
|
color: "var(--sf-chart-tooltip-text)"
|
|
13739
|
-
},
|
|
13859
|
+
}, Td = {
|
|
13740
13860
|
fill: "var(--sf-chart-axis)",
|
|
13741
13861
|
fontSize: 11
|
|
13742
|
-
},
|
|
13862
|
+
}, Ed = {
|
|
13743
13863
|
fontSize: "0.75rem",
|
|
13744
13864
|
color: "var(--sf-chart-axis)"
|
|
13745
|
-
},
|
|
13865
|
+
}, Dd = {
|
|
13746
13866
|
top: 8,
|
|
13747
13867
|
right: 8,
|
|
13748
13868
|
left: 0,
|
|
13749
13869
|
bottom: 0
|
|
13750
|
-
},
|
|
13870
|
+
}, Od = {
|
|
13751
13871
|
bar: {
|
|
13752
13872
|
Root: le,
|
|
13753
13873
|
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(ce, {
|
|
13754
13874
|
dataKey: e.key,
|
|
13755
13875
|
name: e.label ?? e.key,
|
|
13756
|
-
fill:
|
|
13876
|
+
fill: Cd(e, t),
|
|
13757
13877
|
radius: [
|
|
13758
13878
|
4,
|
|
13759
13879
|
4,
|
|
@@ -13765,7 +13885,7 @@ var dr = (e) => {
|
|
|
13765
13885
|
line: {
|
|
13766
13886
|
Root: pe,
|
|
13767
13887
|
renderSeries: (e) => e.map((e, t) => {
|
|
13768
|
-
let n =
|
|
13888
|
+
let n = Cd(e, t);
|
|
13769
13889
|
return /* @__PURE__ */ v(fe, {
|
|
13770
13890
|
type: "monotone",
|
|
13771
13891
|
dataKey: e.key,
|
|
@@ -13783,7 +13903,7 @@ var dr = (e) => {
|
|
|
13783
13903
|
area: {
|
|
13784
13904
|
Root: U,
|
|
13785
13905
|
renderSeries: (e) => e.map((e, t) => {
|
|
13786
|
-
let n =
|
|
13906
|
+
let n = Cd(e, t);
|
|
13787
13907
|
return /* @__PURE__ */ v(se, {
|
|
13788
13908
|
type: "monotone",
|
|
13789
13909
|
dataKey: e.key,
|
|
@@ -13795,8 +13915,8 @@ var dr = (e) => {
|
|
|
13795
13915
|
}, e.key);
|
|
13796
13916
|
})
|
|
13797
13917
|
}
|
|
13798
|
-
},
|
|
13799
|
-
let { Root: d, renderSeries: f } =
|
|
13918
|
+
}, kd = ({ type: e, data: t, xKey: n, series: r, height: i = 280, ariaLabel: a, emptyMessage: o = "Sin datos para mostrar", className: s, showGrid: c = !0, showTooltip: l = !0, showLegend: u = r.length > 1 }) => {
|
|
13919
|
+
let { Root: d, renderSeries: f } = Od[e], p = t.length > 0 && r.length > 0;
|
|
13800
13920
|
return /* @__PURE__ */ v("div", {
|
|
13801
13921
|
className: (0, X.default)("sf-chart", s),
|
|
13802
13922
|
style: { height: i },
|
|
@@ -13807,7 +13927,7 @@ var dr = (e) => {
|
|
|
13807
13927
|
height: "100%",
|
|
13808
13928
|
children: /* @__PURE__ */ y(d, {
|
|
13809
13929
|
data: t,
|
|
13810
|
-
margin:
|
|
13930
|
+
margin: Dd,
|
|
13811
13931
|
children: [
|
|
13812
13932
|
c && /* @__PURE__ */ v(ue, {
|
|
13813
13933
|
strokeDasharray: "3 3",
|
|
@@ -13815,16 +13935,16 @@ var dr = (e) => {
|
|
|
13815
13935
|
}),
|
|
13816
13936
|
/* @__PURE__ */ v(ge, {
|
|
13817
13937
|
dataKey: n,
|
|
13818
|
-
tick:
|
|
13938
|
+
tick: Td,
|
|
13819
13939
|
axisLine: { stroke: "var(--sf-chart-grid)" }
|
|
13820
13940
|
}),
|
|
13821
13941
|
/* @__PURE__ */ v(_e, {
|
|
13822
|
-
tick:
|
|
13942
|
+
tick: Td,
|
|
13823
13943
|
axisLine: { stroke: "var(--sf-chart-grid)" },
|
|
13824
13944
|
width: 48
|
|
13825
13945
|
}),
|
|
13826
|
-
l && /* @__PURE__ */ v(he, { contentStyle:
|
|
13827
|
-
u && /* @__PURE__ */ v(de, { wrapperStyle:
|
|
13946
|
+
l && /* @__PURE__ */ v(he, { contentStyle: wd }),
|
|
13947
|
+
u && /* @__PURE__ */ v(de, { wrapperStyle: Ed }),
|
|
13828
13948
|
f(r)
|
|
13829
13949
|
]
|
|
13830
13950
|
})
|
|
@@ -13834,8 +13954,8 @@ var dr = (e) => {
|
|
|
13834
13954
|
children: o
|
|
13835
13955
|
})
|
|
13836
13956
|
});
|
|
13837
|
-
},
|
|
13838
|
-
let c = p(() =>
|
|
13957
|
+
}, Ad = ({ data: e, dataKey: t, height: n = 40, width: r = "100%", color: i, ariaLabel: a = "Tendencia", emptyMessage: o = "Sin datos", className: s }) => {
|
|
13958
|
+
let c = p(() => Cd({ color: i }, 0), [i]), l = e.length > 0, u = p(() => ({
|
|
13839
13959
|
top: 4,
|
|
13840
13960
|
right: 4,
|
|
13841
13961
|
left: 4,
|
|
@@ -13870,7 +13990,7 @@ var dr = (e) => {
|
|
|
13870
13990
|
children: o
|
|
13871
13991
|
})
|
|
13872
13992
|
});
|
|
13873
|
-
},
|
|
13993
|
+
}, jd = (e, { initialPageSize: t = 10 } = {}) => {
|
|
13874
13994
|
let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
|
|
13875
13995
|
let t = n.trim().toLowerCase();
|
|
13876
13996
|
return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
|
|
@@ -13897,37 +14017,37 @@ var dr = (e) => {
|
|
|
13897
14017
|
]),
|
|
13898
14018
|
totalItems: l
|
|
13899
14019
|
};
|
|
13900
|
-
},
|
|
13901
|
-
let n =
|
|
14020
|
+
}, Md = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), Nd = (e) => typeof e == "string" || typeof e == "number", Pd = (e, t) => {
|
|
14021
|
+
let n = Md(t);
|
|
13902
14022
|
return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
|
|
13903
|
-
},
|
|
14023
|
+
}, Fd = (e, t, n) => {
|
|
13904
14024
|
if (t?.length) return [...t];
|
|
13905
14025
|
let r = new Set(n), i = [];
|
|
13906
|
-
for (let t in e) r.has(t) ||
|
|
14026
|
+
for (let t in e) r.has(t) || Nd(e[t]) && i.push(t);
|
|
13907
14027
|
return i;
|
|
13908
|
-
},
|
|
13909
|
-
let r = "", i =
|
|
14028
|
+
}, Id = (e, t, n) => {
|
|
14029
|
+
let r = "", i = Fd(e, t, n);
|
|
13910
14030
|
for (let t of i) {
|
|
13911
14031
|
let n = e[t];
|
|
13912
|
-
if (!
|
|
13913
|
-
let i =
|
|
14032
|
+
if (!Nd(n)) continue;
|
|
14033
|
+
let i = Pd(t, n);
|
|
13914
14034
|
i && (r += `${i} `);
|
|
13915
14035
|
}
|
|
13916
14036
|
return r;
|
|
13917
|
-
},
|
|
14037
|
+
}, Ld = (e) => {
|
|
13918
14038
|
let t = e.split(";"), n = [];
|
|
13919
14039
|
for (let e of t) {
|
|
13920
|
-
let t =
|
|
14040
|
+
let t = Md(e);
|
|
13921
14041
|
t.length >= 2 && n.push(t);
|
|
13922
14042
|
}
|
|
13923
14043
|
return n;
|
|
13924
|
-
},
|
|
13925
|
-
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() =>
|
|
14044
|
+
}, Rd = (e, t) => {
|
|
14045
|
+
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => Ld(i), [i]), u = p(() => {
|
|
13926
14046
|
if (!e?.length) return [];
|
|
13927
14047
|
let t = [];
|
|
13928
14048
|
for (let n of e) t.push({
|
|
13929
14049
|
item: n,
|
|
13930
|
-
searchIndex:
|
|
14050
|
+
searchIndex: Id(n, o, s)
|
|
13931
14051
|
});
|
|
13932
14052
|
return t;
|
|
13933
14053
|
}, [
|
|
@@ -13969,15 +14089,15 @@ var dr = (e) => {
|
|
|
13969
14089
|
};
|
|
13970
14090
|
//#endregion
|
|
13971
14091
|
//#region src/hooks/useArrayPaginator.ts
|
|
13972
|
-
function
|
|
14092
|
+
function zd(e, t, n) {
|
|
13973
14093
|
if (t <= 0) return [];
|
|
13974
14094
|
let r = Math.max(0, n);
|
|
13975
14095
|
return r >= e.length ? [] : e.slice(r, r + t);
|
|
13976
14096
|
}
|
|
13977
|
-
var
|
|
14097
|
+
var Bd = (e, t, n) => {
|
|
13978
14098
|
let r = e?.[n], i = t?.[n];
|
|
13979
14099
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : typeof r == "boolean" && typeof i == "boolean" ? Number(r) - Number(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : typeof r == "string" && typeof i == "string" ? r.localeCompare(i, void 0, { sensitivity: "base" }) : String(r).localeCompare(String(i), void 0, { sensitivity: "base" });
|
|
13980
|
-
},
|
|
14100
|
+
}, Vd = (e, t) => {
|
|
13981
14101
|
let [n, r] = h([]), [i, a] = h(() => ({
|
|
13982
14102
|
limit: Math.max(1, t?.limit ?? 100),
|
|
13983
14103
|
offset: 0
|
|
@@ -13990,7 +14110,7 @@ var Ld = (e, t, n) => {
|
|
|
13990
14110
|
if (e.length === 0) return [];
|
|
13991
14111
|
let r = [...e];
|
|
13992
14112
|
if (n.length > 0) {
|
|
13993
|
-
let e = t?.onSortFunc ??
|
|
14113
|
+
let e = t?.onSortFunc ?? Bd, i = t?.strictSort ?? !1;
|
|
13994
14114
|
r.sort((t, r) => {
|
|
13995
14115
|
for (let { id: a, desc: o } of n) {
|
|
13996
14116
|
if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
|
|
@@ -14000,7 +14120,7 @@ var Ld = (e, t, n) => {
|
|
|
14000
14120
|
return 0;
|
|
14001
14121
|
});
|
|
14002
14122
|
}
|
|
14003
|
-
return
|
|
14123
|
+
return zd(r, o, c);
|
|
14004
14124
|
}, [
|
|
14005
14125
|
e,
|
|
14006
14126
|
o,
|
|
@@ -14019,7 +14139,7 @@ var Ld = (e, t, n) => {
|
|
|
14019
14139
|
onSortChange: r,
|
|
14020
14140
|
pageData: u
|
|
14021
14141
|
};
|
|
14022
|
-
},
|
|
14142
|
+
}, Hd = (e, t) => {
|
|
14023
14143
|
if (typeof window > "u") return t;
|
|
14024
14144
|
try {
|
|
14025
14145
|
let n = window.localStorage.getItem(e);
|
|
@@ -14027,8 +14147,8 @@ var Ld = (e, t, n) => {
|
|
|
14027
14147
|
} catch {
|
|
14028
14148
|
return t;
|
|
14029
14149
|
}
|
|
14030
|
-
},
|
|
14031
|
-
let [n, r] = h(() =>
|
|
14150
|
+
}, Ud = (e, t) => {
|
|
14151
|
+
let [n, r] = h(() => Hd(e, t));
|
|
14032
14152
|
return [n, (t) => {
|
|
14033
14153
|
r((n) => {
|
|
14034
14154
|
let r = typeof t == "function" ? t(n) : t;
|
|
@@ -14038,52 +14158,52 @@ var Ld = (e, t, n) => {
|
|
|
14038
14158
|
return r;
|
|
14039
14159
|
});
|
|
14040
14160
|
}];
|
|
14041
|
-
},
|
|
14161
|
+
}, Wd = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), Gd = (e, t) => {
|
|
14042
14162
|
if (typeof window > "u") return;
|
|
14043
14163
|
let n = new URL(window.location.href);
|
|
14044
14164
|
t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
|
|
14045
|
-
},
|
|
14046
|
-
|
|
14047
|
-
},
|
|
14165
|
+
}, Kd = (e) => {
|
|
14166
|
+
Gd(e, null);
|
|
14167
|
+
}, qd = (e, t) => {
|
|
14048
14168
|
let [n, r] = h(() => {
|
|
14049
14169
|
let n = typeof e == "function" ? e() : e;
|
|
14050
14170
|
if (!t) return n;
|
|
14051
|
-
let r =
|
|
14052
|
-
return r == null || r === "" ? (
|
|
14171
|
+
let r = Wd(t);
|
|
14172
|
+
return r == null || r === "" ? (Gd(t, n), n) : r;
|
|
14053
14173
|
});
|
|
14054
14174
|
return [n, (e) => {
|
|
14055
14175
|
r((n) => {
|
|
14056
14176
|
let r = typeof e == "function" ? e(n) : e;
|
|
14057
|
-
return t &&
|
|
14177
|
+
return t && Gd(t, r), r;
|
|
14058
14178
|
});
|
|
14059
14179
|
}];
|
|
14060
|
-
},
|
|
14180
|
+
}, Jd = () => {
|
|
14061
14181
|
let e = globalThis.process?.env?.NODE_ENV;
|
|
14062
14182
|
return e != null && e === "development";
|
|
14063
|
-
},
|
|
14183
|
+
}, Yd = (e, t) => {
|
|
14064
14184
|
let n = x({
|
|
14065
14185
|
resolver: ve(e),
|
|
14066
14186
|
defaultValues: t?.defaultValues
|
|
14067
14187
|
}), r = (e, t) => n.handleSubmit(e, (e, n) => {
|
|
14068
|
-
|
|
14188
|
+
Jd() && console.log(e), t?.(e, n);
|
|
14069
14189
|
});
|
|
14070
14190
|
return {
|
|
14071
14191
|
...n,
|
|
14072
14192
|
handleSubmit: r
|
|
14073
14193
|
};
|
|
14074
|
-
},
|
|
14194
|
+
}, Xd = (e) => {
|
|
14075
14195
|
let t = String(e ?? ""), n = 0;
|
|
14076
14196
|
for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
|
|
14077
14197
|
let r = t.slice(n);
|
|
14078
14198
|
return /^[=+\-@]/.test(r) ? `'${t}` : t;
|
|
14079
|
-
},
|
|
14080
|
-
let t =
|
|
14199
|
+
}, Zd = (e) => {
|
|
14200
|
+
let t = Xd(e);
|
|
14081
14201
|
return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
14082
|
-
},
|
|
14202
|
+
}, Qd = (e, t) => {
|
|
14083
14203
|
if (typeof document > "u") return;
|
|
14084
|
-
let n = `\uFEFF${[t.columns.map((e) =>
|
|
14204
|
+
let n = `\uFEFF${[t.columns.map((e) => Zd(e.header)).join(","), ...e.map((e) => t.columns.map((t) => Zd(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
14085
14205
|
a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
|
|
14086
|
-
},
|
|
14206
|
+
}, $d = (e) => Xd(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), ef = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", tf = (e, t) => {
|
|
14087
14207
|
if (typeof document > "u") return;
|
|
14088
14208
|
let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
|
|
14089
14209
|
<?mso-application progid="Excel.Sheet"?>
|
|
@@ -14096,51 +14216,51 @@ var Ld = (e, t, n) => {
|
|
|
14096
14216
|
</Styles>
|
|
14097
14217
|
<Worksheet ss:Name="Export">
|
|
14098
14218
|
<Table>
|
|
14099
|
-
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${
|
|
14219
|
+
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${$d(e.header)}</Data></Cell>`).join("")}</Row>
|
|
14100
14220
|
${e.map((e) => `<Row>${n.map((t) => {
|
|
14101
|
-
let n = t.getValue(e), r =
|
|
14102
|
-
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) :
|
|
14221
|
+
let n = t.getValue(e), r = ef(n);
|
|
14222
|
+
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : $d(n)}</Data></Cell>`;
|
|
14103
14223
|
}).join("")}</Row>`).join("")}
|
|
14104
14224
|
</Table>
|
|
14105
14225
|
</Worksheet>
|
|
14106
14226
|
</Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
14107
14227
|
s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
|
|
14108
|
-
},
|
|
14228
|
+
}, nf = "Este campo es requerido", rf = "Introduce una dirección de correo electrónico válida", af = "El correo electrónico es obligatorio", of = "El valor de este campo es inválido", sf = "Introduce un número de celular válido", cf = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, lf = (e = nf) => W.string().transform(cf).required(e), uf = () => W.string().transform(cf).default(null).nullable(), df = (e = af) => W.string().transform(cf).email(rf).required(e), ff = (e = rf) => W.string().transform(cf).test("emailTest", e, (e) => e == null || e === "" || W.string().email().isValidSync(e)).default(null).nullable(), pf = (e, t = of, n = nf) => W.string().transform(cf).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), mf = (e, t = of) => W.string().transform(cf).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), hf = (e) => {
|
|
14109
14229
|
let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
|
|
14110
14230
|
return {
|
|
14111
14231
|
minLength: t,
|
|
14112
14232
|
maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
|
|
14113
14233
|
};
|
|
14114
|
-
},
|
|
14115
|
-
let { minLength: t, maxLength: n } =
|
|
14234
|
+
}, gf = (e) => {
|
|
14235
|
+
let { minLength: t, maxLength: n } = hf(e), r = /^[0-9]+$/, i = W.string().transform(cf).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
|
|
14116
14236
|
return t != null && (i = i.min(t, `El campo debe tener al menos ${t} caracteres`)), n != null && (i = i.max(n, `La longitud máxima permitida es de ${n} caracteres`)), i;
|
|
14117
|
-
},
|
|
14237
|
+
}, _f = (e) => gf(e).required(nf), vf = (e) => gf(e).default(null).nullable(), yf = (e = nf) => W.boolean().typeError("El tipo de dato debe ser booleano").required(e), bf = () => W.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), xf = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Sf = (e = nf) => W.number().transform(xf).typeError("Debe ser numérico").required(e), Cf = () => W.number().transform(xf).typeError("Debe ser numérico").default(null).nullable().notRequired(), wf = (e = nf) => W.number().transform(xf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), Tf = (e = nf) => wf(e).integer("Este campo debe ser un número entero"), Ef = () => W.number().transform(xf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), Df = () => Ef().integer("Este campo debe ser un número entero"), Of = (e) => {
|
|
14118
14238
|
let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
|
|
14119
14239
|
return W.string().transform((e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim().startsWith("+") ? e.trim() : `+51 ${e.trim()}` : e).test("rgxValidation", e, (e) => e == null || e === "" || e.match(t) != null).default(null);
|
|
14120
|
-
},
|
|
14121
|
-
transformNullIfEmpty:
|
|
14122
|
-
requiredString:
|
|
14123
|
-
nullableString:
|
|
14124
|
-
requiredEmail:
|
|
14125
|
-
nullableEmail:
|
|
14126
|
-
requiredMatchString:
|
|
14127
|
-
nullableOrMatchString:
|
|
14128
|
-
requiredStringNumbersOnly:
|
|
14129
|
-
nullableStringNumbersOnly:
|
|
14130
|
-
requiredBoolean:
|
|
14131
|
-
nullableBoolean:
|
|
14132
|
-
requiredNumber:
|
|
14133
|
-
nullableNumber:
|
|
14134
|
-
requiredPositiveNumber:
|
|
14135
|
-
requiredPositiveInteger:
|
|
14136
|
-
nullablePositiveNumber:
|
|
14137
|
-
nullablePositiveInteger:
|
|
14138
|
-
nullableCelular:
|
|
14139
|
-
requiredCelular:
|
|
14140
|
-
requiredStringArray:
|
|
14141
|
-
nullableStringArray:
|
|
14142
|
-
},
|
|
14240
|
+
}, kf = (e = sf) => Of(e).nullable(), Af = (e = sf) => Of(e).required(nf), jf = (e = nf) => W.array().of(lf()).min(1, "Debe contener al menos un elemento").required(e), Mf = () => W.array().of(uf()).default(null).nullable(), Nf = {
|
|
14241
|
+
transformNullIfEmpty: cf,
|
|
14242
|
+
requiredString: lf,
|
|
14243
|
+
nullableString: uf,
|
|
14244
|
+
requiredEmail: df,
|
|
14245
|
+
nullableEmail: ff,
|
|
14246
|
+
requiredMatchString: pf,
|
|
14247
|
+
nullableOrMatchString: mf,
|
|
14248
|
+
requiredStringNumbersOnly: _f,
|
|
14249
|
+
nullableStringNumbersOnly: vf,
|
|
14250
|
+
requiredBoolean: yf,
|
|
14251
|
+
nullableBoolean: bf,
|
|
14252
|
+
requiredNumber: Sf,
|
|
14253
|
+
nullableNumber: Cf,
|
|
14254
|
+
requiredPositiveNumber: wf,
|
|
14255
|
+
requiredPositiveInteger: Tf,
|
|
14256
|
+
nullablePositiveNumber: Ef,
|
|
14257
|
+
nullablePositiveInteger: Df,
|
|
14258
|
+
nullableCelular: kf,
|
|
14259
|
+
requiredCelular: Af,
|
|
14260
|
+
requiredStringArray: jf,
|
|
14261
|
+
nullableStringArray: Mf
|
|
14262
|
+
}, Pf = (e) => W.object().shape(e(Nf));
|
|
14143
14263
|
//#endregion
|
|
14144
|
-
export { Ur as AccessDenied, Ji as Accordion, Nr as ActionButton, yr as ActiveFiltersBar,
|
|
14264
|
+
export { Ur as AccessDenied, Ji as Accordion, Nr as ActionButton, yr as ActiveFiltersBar, Rl as AddressSearchInput, Fr as Alert, Xs as AlertLane, qs as AlertRowList, oo as AppBarContainer, ao as AppShell, to as AppsGridIcon, Jl as AreaInput, pn as AsyncCardSelect, ur as AsyncCustomTable, dn as AsyncSearchSelect, gn as AsyncSearchTableSelect, td as AuditTimeline, va as Avatar, ya as AvatarGroup, Sa as Badge, Gt as BooleanCheckbox, Ki as Breadcrumb, $ as Button, Or as ButtonGroup, Sd as CHART_SERIES_COLORS, Jt as COUNTRY_DIAL_CODES, qt as CURRENCY_SYMBOLS, Ds as Calendar, Du as CardRadioGroup, fn as CardSelect, xd as Carousel, kd as Chart, Bt as Checkbox, Vt as CheckboxGroup, bo as CodeEditor, Cu as ColorInput, Di as CommandPalette, ni as ConfirmDialog, hi as ContextMenuProvider, Vl as CoordinatesInput, rn as CurrencyInput, lr as CustomTable, ec as DashboardCard, rc as DashboardGrid, sc as DashboardLayout, ic as DashboardSection, oc as DashboardStatBar, wt as DateInput, kt as DatePicker, pc as DateRangeFields, Tn as DateRangeInput, mc as DateRangeUtcInput, Za as DateWeekStrip, cc as DetailSidePanel, Mn as DisplayField, Qt as DniInput, Ls as DonutGauge, Rs as DonutGaugeRow, Ci as Drawer, si as DropdownMenu, ci as DropdownMenuItem, wr as EditableDataGrid, Ir as EmptyState, cs as EntityCard, us as EntityCardGrid, Rr as ErrorView, Us as EventLog, Dr as ExpandableTableSection, Z as FieldLayout, Oc as FileDropInput, An as FileInput, la as FilterBar, da as FilterBarDate, ua as FilterBarField, fa as FilterBarSelect, pa as FilterBarText, jr as FormActions, oa as FormWizard, Vi as HeightProvider, xt as Input, ga as ItineraryEditor, Go as KPICard, qo as KPIGrid, Tu as KeyValueInput, ad as LiveChip, Ha as LiveRouteBoard, _d as LiveStatusBar, Vr as LoadingView, Bl as LocationPicker, So as MIN_MAP_GEOCODER_QUERY_LENGTH, bs as MONTH_NAMES, ma as MaestroLayout, Rc as MapFrame, Bc as MapLegend, zo as MapPicker, zc as MapStatus, Vc as MapToolbar, Hc as MapVehiclePopup, zl as MapView, ca as MasterDetailLayout, sa as MasterDetailListItem, ii as MessageDialog, Qo as MetricBarList, Zo as MetricBarRow, ei as Modal, gs as ModuleCard, _s as ModuleCardGrid, jc as MultiPhotoInput, Fu as NETWORK_BASEMAPS, Bu as NETWORK_EDGE_STYLES, Lu as NETWORK_KIND_COLORS, Iu as NETWORK_KIND_LABELS, Ru as NETWORK_STATUS_COLORS, zu as NETWORK_STATUS_LABELS, Jn as NUMBER_FILTER_OPS, Ju as NetworkLegend, $u as NetworkMap, bi as NotificationBell, Ct as NumberInput, hu as NumberStepper, Ou as ORG_TREE_DEFAULT_THEMES, li as OptionItem, Pu as OrgTree, dc as OtpInput, Ai as PageContainer, Mi as PageHeader, Kn as PaginationRangeInput, Aa as PassengerBoardCard, jt as PasswordInput, tn as PhoneInput, Ic as PhotoCropInput, kc as PhotoInput, Tt as Popover, ki as ProductTour, vu as ProgressBar, bu as ProgressBarReadonly, vi as QRView, Yo as QuickActionGrid, Jo as QuickActionTile, Ht as RadioGroup, _u as RangeSliderInput, xu as RatingInput, ps as RecommendationCard, id as RecordList, rd as RecordListItem, Hr as RetryBlock, mo as RichTextEditor, Yl as RouteInput, Ar as RowActions, $t as RucInput, Wc as SF_DEFAULT_MAP_CENTER, Gc as SF_DEFAULT_MAP_ZOOM, Yc as SF_GOOGLE_ENGINE_CAPABILITIES, Jc as SF_LEAFLET_ENGINE_CAPABILITIES, Uc as SF_MAPS_CONFIG_ERROR, qc as SF_OSM_ATTRIBUTION, Kc as SF_OSM_TILE_URL, qn as STRING_FILTER_OPS, Yi as ScrollArea, ln as SearchSelect, hn as SearchTableSelect, zt as Select, Gi as Separator, jl as SfProvider, wi as Sheet, Ni as SidePanel, zi as SidePanelContainer, Ac as SignaturePad, Gr as Skeleton, du as SliderInput, Dn as SmartDateInput, an as SmartInput, Xl as SmartMapInput, Mc as SmartMediaInput, _n as SmartSelect, Eu as SortableList, Ad as Sparkline, Br as Spinner, ys as StatCard, ra as Stepper, Xi as SummaryItem, no as SyncIcon, ui as TabMenuOption, vr as TableColumnSettings, Qn as TableFiltersPanel, ji as TablePageLayout, $n as TableSortingPanel, Pi as Tabs, wu as TagsInput, St as TextArea, En as TimeRangeInput, bd as Timeline, Zr as ToastProvider, Ut as Toggle, Wt as ToggleCard, kr as ToolbarButton, xi as Tooltip, vs as TramoCard, Rt as Transfer, It as TreeSelect, Ua as UnitSelector, Ui as Visibility, Wi as Visivility, xs as WEEKDAY_LABELS, eo as WeekdayToggleStrip, Kt as YesNoSelect, ba as badgeClassName, xa as badgeDotClassName, Sr as buildActiveFilterChips, ws as buildMonthGrid, ku as buildOrgTreeRows, Lt as buttonClassName, wn as calcTimeDuration, eu as clampNumber, _o as codeEditorClassName, Zn as columnFilterFn, Wu as countNetworkStatus, ju as countOrgTreeNodes, Pf as createFormSchema, Vn as createLocalStorageAsyncStateStore, xc as createPhotoItem, Tc as cropImageToSquare, Bd as defaultOnSortFunc, hc as emptyDateRange, iu as emptyKeyValuePairs, ou as emptyNumberRange, Lc as emptyPhotoItems, nu as emptyTags, gc as emptyTimeRange, Qd as exportTableCsv, tf as exportTableXlsx, Q as fieldClassName, xr as formatColumnFilterValue, wo as formatMapGeocoderLabel, tu as formatSliderLabel, xn as fromUtcDateIso, Xn as inferInitialFilterValue, yt as inputFocusTransition, Cr as isBlankRow, Yn as isColumnFilterValue, yn as isValidDateString, yc as isValidFileType, qu as networkEdgeLines, Gu as networkMapBounds, Ku as networkNodePositions, vc as nextPhotoId, Sn as normalizeDateRange, cu as normalizeHexColor, au as normalizeKeyValuePairs, Uu as normalizeNetworkEdges, Hu as normalizeNetworkNodes, su as normalizeNumberRange, wc as normalizePhotoItems, ru as normalizeTags, Cn as normalizeTimeRange, bf as nullableBoolean, kf as nullableCelular, ff as nullableEmail, Cf as nullableNumber, mf as nullableOrMatchString, Df as nullablePositiveInteger, Ef as nullablePositiveNumber, uf as nullableString, Mf as nullableStringArray, vf as nullableStringNumbersOnly, Mu as orgTreeRootNodes, Cs as parseYMD, lu as progressPercent, Wd as readQueryValue, Kd as removeQueryValue, yf as requiredBoolean, Af as requiredCelular, df as requiredEmail, pf as requiredMatchString, Sf as requiredNumber, Tf as requiredPositiveInteger, wf as requiredPositiveNumber, lf as requiredString, jf as requiredStringArray, _f as requiredStringNumbersOnly, Au as resolveOrgTreeTheme, Cd as resolveSeriesColor, Sc as revokePhotoPreview, Cc as revokePhotoPreviews, Yt as sanitizeDigits, Co as searchMapAddresses, yl as sfClampLatitude, bl as sfClampLongitude, _l as sfFormatCoordinate, Sl as sfLatLngToString, wl as sfMarkerFromLatLng, Cl as sfNormalizeLatLng, xl as sfParseCoordinate, bc as showFilePicker, bt as textareaClassName, Ka as toIsoDate, vn as toLocalDateYMD, Ss as toLocalYMD, Ft as toStringArray, bn as toUtcDateIso, cf as transformNullIfEmpty, Gd as updateQueryValue, Pl as useAddressSearch, Vd as useArrayPaginator, un as useAsyncOptions, di as useClickAway, Hi as useContainerHeight, _i as useContextMenu, Yd as useCustomForm, dr as useCustomTableController, oi as useDropdownClose, Rd as useFilterData, aa as useFormWizard, go as useIsClient, jd as useMaestroFilter, Fl as useMapEngine, Il as useMapsConfig, ti as useModal, qd as useQueryStringState, Ml as useSf, Nl as useSfMaps, Li as useSidePanelContainer, Fi as useSidePanelHandle, Ud as useStoredState, gr as useTableColumnSettings, Qr as useToast, Zt as validateDni, Xt as validateRuc, Nf as validators };
|
|
14145
14265
|
|
|
14146
14266
|
//# sourceMappingURL=sf-ui.js.map
|