@sfperusacdev/sf-ui 0.2.6 → 0.2.8

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.js CHANGED
@@ -11,7 +11,7 @@ import { html as L } from "@codemirror/lang-html";
11
11
  import { javascript as R } from "@codemirror/lang-javascript";
12
12
  import { json as z } from "@codemirror/lang-json";
13
13
  import { sql as B } from "@codemirror/lang-sql";
14
- import { Circle as ee, MapContainer as te, Marker as ne, Polygon as re, Polyline as ie, TileLayer as V, Tooltip as H, useMap as U, useMapEvents as ae } from "react-leaflet";
14
+ import { Circle as ee, MapContainer as V, Marker as te, Polygon as ne, Polyline as re, TileLayer as H, Tooltip as ie, useMap as U, useMapEvents as ae } from "react-leaflet";
15
15
  import oe from "leaflet";
16
16
  import { Area as se, AreaChart as W, Bar as ce, BarChart as le, CartesianGrid as ue, Label as de, LabelList as fe, Legend as pe, Line as me, LineChart as he, PolarAngleAxis as ge, PolarGrid as _e, PolarRadiusAxis as ve, Radar as ye, RadarChart as be, ReferenceLine as xe, ResponsiveContainer as Se, Tooltip as Ce, XAxis as we, YAxis as Te } from "recharts";
17
17
  import Ee from "react-easy-crop";
@@ -2720,18 +2720,18 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2720
2720
  let O = b({
2721
2721
  name: t,
2722
2722
  control: e.control
2723
- }), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), te = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), ne = p(() => {
2723
+ }), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), V = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), te = p(() => {
2724
2724
  let e = /* @__PURE__ */ new Map();
2725
2725
  for (let t of n) e.set(t.value, t);
2726
2726
  return e;
2727
- }, [n]), re = p(() => {
2727
+ }, [n]), ne = p(() => {
2728
2728
  let e = [];
2729
- for (let t of te) {
2730
- let n = ne.get(t);
2729
+ for (let t of V) {
2730
+ let n = te.get(t);
2731
2731
  n && e.push(n);
2732
2732
  }
2733
2733
  return e;
2734
- }, [ne, te]), ie = p(() => {
2734
+ }, [te, V]), re = p(() => {
2735
2735
  let e = F.trim().toLowerCase();
2736
2736
  return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
2737
2737
  }, [n, F]);
@@ -2740,28 +2740,28 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2740
2740
  B(ee.current?.scrollTop ?? 0);
2741
2741
  }));
2742
2742
  }, [N, F]);
2743
- let V = (e) => {
2743
+ let H = (e) => {
2744
2744
  O.field.onChange(e), C?.(e);
2745
- }, H = () => {
2745
+ }, ie = () => {
2746
2746
  P(!1), I(""), R(void 0);
2747
2747
  }, U = (e) => {
2748
2748
  if (g) return;
2749
2749
  if (!o) {
2750
- V(e), H();
2750
+ H(e), ie();
2751
2751
  return;
2752
2752
  }
2753
- let t = te.includes(e) ? te.filter((t) => t !== e) : [...te, e];
2754
- V(t);
2753
+ let t = V.includes(e) ? V.filter((t) => t !== e) : [...V, e];
2754
+ H(t);
2755
2755
  }, ae = (e) => {
2756
2756
  if (!g) {
2757
2757
  if (!o) {
2758
- V("");
2758
+ H("");
2759
2759
  return;
2760
2760
  }
2761
- V(te.filter((t) => t !== e));
2761
+ H(V.filter((t) => t !== e));
2762
2762
  }
2763
2763
  }, oe = () => {
2764
- g || V(o ? [] : "");
2764
+ g || H(o ? [] : "");
2765
2765
  }, se = () => {
2766
2766
  let e = M.current;
2767
2767
  if (!e) return;
@@ -2786,7 +2786,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2786
2786
  }, [N]), u(() => {
2787
2787
  let e = (e) => {
2788
2788
  let t = e.target;
2789
- j.current?.contains(t) || H();
2789
+ j.current?.contains(t) || ie();
2790
2790
  };
2791
2791
  return document.addEventListener("pointerdown", e), () => {
2792
2792
  document.removeEventListener("pointerdown", e);
@@ -2810,12 +2810,12 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2810
2810
  onScroll: (e) => {
2811
2811
  B(e.currentTarget.scrollTop);
2812
2812
  },
2813
- children: ie.length ? (() => {
2814
- let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(ie.length, n + t + 12), i = n * bn, a = Math.max(0, (ie.length - r) * bn), s = ie.slice(n, r);
2813
+ children: re.length ? (() => {
2814
+ let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(re.length, n + t + 12), i = n * bn, a = Math.max(0, (re.length - r) * bn), s = re.slice(n, r);
2815
2815
  return /* @__PURE__ */ y(_, { children: [
2816
2816
  i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
2817
2817
  s.map((e) => {
2818
- let t = te.includes(e.value);
2818
+ let t = V.includes(e.value);
2819
2819
  return /* @__PURE__ */ y("button", {
2820
2820
  type: "button",
2821
2821
  onClick: () => U(e.value),
@@ -2871,10 +2871,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2871
2871
  withRightIcon: !0,
2872
2872
  withLeftIcon: !!D,
2873
2873
  disabled: g
2874
- }), "flex items-center gap-1.5 text-left", o && re.length > 1 && "h-auto min-h-[2.5rem] py-2"),
2874
+ }), "flex items-center gap-1.5 text-left", o && ne.length > 1 && "h-auto min-h-[2.5rem] py-2"),
2875
2875
  children: [/* @__PURE__ */ v("span", {
2876
2876
  className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
2877
- children: re.length ? o ? /* @__PURE__ */ y(_, { children: [re.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
2877
+ children: ne.length ? o ? /* @__PURE__ */ y(_, { children: [ne.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
2878
2878
  className: "inline-flex max-w-full items-center gap-1 rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-700",
2879
2879
  children: [/* @__PURE__ */ v("span", {
2880
2880
  className: "truncate",
@@ -2887,19 +2887,19 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
2887
2887
  className: "rounded text-slate-400 hover:text-slate-700",
2888
2888
  children: /* @__PURE__ */ v(q, { size: 12 })
2889
2889
  })]
2890
- }, e.value)), re.length > S && /* @__PURE__ */ y("span", {
2890
+ }, e.value)), ne.length > S && /* @__PURE__ */ y("span", {
2891
2891
  className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
2892
- children: ["+", re.length - S]
2892
+ children: ["+", ne.length - S]
2893
2893
  })] }) : /* @__PURE__ */ v("span", {
2894
2894
  className: "truncate",
2895
- children: re[0]?.label
2895
+ children: ne[0]?.label
2896
2896
  }) : /* @__PURE__ */ v("span", {
2897
2897
  className: "text-slate-400",
2898
2898
  children: c
2899
2899
  })
2900
2900
  }), /* @__PURE__ */ y("span", {
2901
2901
  className: "flex items-center gap-1",
2902
- children: [re.length > 0 && !g && /* @__PURE__ */ v("button", {
2902
+ children: [ne.length > 0 && !g && /* @__PURE__ */ v("button", {
2903
2903
  type: "button",
2904
2904
  onClick: (e) => {
2905
2905
  e.stopPropagation(), oe();
@@ -3073,7 +3073,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3073
3073
  pageSize: f
3074
3074
  }), z = p(() => c ? Jt(j.field.value) : j.field.value ? [String(j.field.value)] : [], [j.field.value, c]), B = p(() => n.filter((e) => z.includes(e.value)), [n, z]), ee = (e) => {
3075
3075
  j.field.onChange(e), m?.(e);
3076
- }, te = (e) => {
3076
+ }, V = (e) => {
3077
3077
  if (u || d) return;
3078
3078
  if (!c) {
3079
3079
  ee(e), j.field.onBlur();
@@ -3081,7 +3081,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3081
3081
  }
3082
3082
  let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
3083
3083
  ee(t), j.field.onBlur();
3084
- }, ne = (e) => {
3084
+ }, te = (e) => {
3085
3085
  if (!(u || d)) {
3086
3086
  if (!c) {
3087
3087
  ee(""), j.field.onBlur();
@@ -3089,9 +3089,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3089
3089
  }
3090
3090
  ee(z.filter((t) => t !== e)), j.field.onBlur();
3091
3091
  }
3092
- }, re = () => {
3092
+ }, ne = () => {
3093
3093
  u || d || (ee(c ? [] : ""), j.field.onBlur());
3094
- }, ie = p(() => [
3094
+ }, re = p(() => [
3095
3095
  {
3096
3096
  id: "selected",
3097
3097
  header: "",
@@ -3123,9 +3123,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3123
3123
  c,
3124
3124
  u,
3125
3125
  z
3126
- ]), V = M({
3126
+ ]), H = M({
3127
3127
  data: n,
3128
- columns: ie,
3128
+ columns: re,
3129
3129
  state: {
3130
3130
  globalFilter: F,
3131
3131
  pagination: L
@@ -3147,7 +3147,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3147
3147
  return n != null && String(n).toLowerCase().includes(r);
3148
3148
  });
3149
3149
  }
3150
- }), H = V.getRowModel().rows, U = V.getFilteredRowModel().rows.length, ae = Math.max(0, f - H.length), oe = V.getState().pagination.pageIndex + 1, se = Math.max(1, V.getPageCount()), W = V.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
3150
+ }), ie = H.getRowModel().rows, U = H.getFilteredRowModel().rows.length, ae = Math.max(0, f - ie.length), oe = H.getState().pagination.pageIndex + 1, se = Math.max(1, H.getPageCount()), W = H.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
3151
3151
  return /* @__PURE__ */ v(Z, {
3152
3152
  id: N,
3153
3153
  label: a,
@@ -3171,7 +3171,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3171
3171
  disabled: u || d,
3172
3172
  placeholder: d ? "Cargando..." : x ?? "Buscar...",
3173
3173
  onBlur: () => j.field.onBlur(),
3174
- onChange: (e) => V.setGlobalFilter(e.target.value),
3174
+ onChange: (e) => H.setGlobalFilter(e.target.value),
3175
3175
  className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400 disabled:cursor-not-allowed"
3176
3176
  })]
3177
3177
  }),
@@ -3195,7 +3195,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3195
3195
  children: e.label
3196
3196
  }), !u && /* @__PURE__ */ v("button", {
3197
3197
  type: "button",
3198
- onClick: () => ne(e.value),
3198
+ onClick: () => te(e.value),
3199
3199
  className: "shrink-0 rounded text-slate-400 hover:text-slate-700",
3200
3200
  children: /* @__PURE__ */ v(q, { size: 12 })
3201
3201
  })]
@@ -3206,7 +3206,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3206
3206
  })]
3207
3207
  }), B.length > 0 && !u && !d && /* @__PURE__ */ v("button", {
3208
3208
  type: "button",
3209
- onClick: re,
3209
+ onClick: ne,
3210
3210
  className: "shrink-0 text-xs font-medium text-slate-500 hover:text-slate-900",
3211
3211
  children: "Limpiar"
3212
3212
  })]
@@ -3231,10 +3231,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3231
3231
  ]
3232
3232
  }) : /* @__PURE__ */ v("table", {
3233
3233
  className: "w-full table-fixed border-collapse text-sm",
3234
- children: /* @__PURE__ */ v("tbody", { children: H.length ? /* @__PURE__ */ y(_, { children: [H.map((e) => {
3234
+ children: /* @__PURE__ */ v("tbody", { children: ie.length ? /* @__PURE__ */ y(_, { children: [ie.map((e) => {
3235
3235
  let t = z.includes(e.original.value);
3236
3236
  return /* @__PURE__ */ v("tr", {
3237
- onClick: () => te(e.original.value),
3237
+ onClick: () => V(e.original.value),
3238
3238
  className: (0, X.default)("h-10 border-b border-slate-100 last:border-b-0", u || d ? "cursor-default" : "cursor-pointer hover:bg-slate-50", t && "bg-slate-50"),
3239
3239
  children: e.getVisibleCells().map((e) => /* @__PURE__ */ v("td", {
3240
3240
  className: (0, X.default)("px-3 py-2 align-middle text-slate-700", e.column.id === "selected" && "w-10"),
@@ -3276,8 +3276,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3276
3276
  children: [
3277
3277
  /* @__PURE__ */ v("button", {
3278
3278
  type: "button",
3279
- disabled: u || d || !V.getCanPreviousPage(),
3280
- onClick: () => V.previousPage(),
3279
+ disabled: u || d || !H.getCanPreviousPage(),
3280
+ onClick: () => H.previousPage(),
3281
3281
  className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
3282
3282
  children: "Anterior"
3283
3283
  }),
@@ -3291,8 +3291,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
3291
3291
  }),
3292
3292
  /* @__PURE__ */ v("button", {
3293
3293
  type: "button",
3294
- disabled: u || d || !V.getCanNextPage(),
3295
- onClick: () => V.nextPage(),
3294
+ disabled: u || d || !H.getCanNextPage(),
3295
+ onClick: () => H.nextPage(),
3296
3296
  className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
3297
3297
  children: "Siguiente"
3298
3298
  })
@@ -4657,7 +4657,7 @@ var Er = (e) => {
4657
4657
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
4658
4658
  return !0;
4659
4659
  };
4660
- function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: ne, onRetry: re, onRefresh: ie, onRowClick: V, enableRowSelection: H = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
4660
+ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: V = !1, error: te, onRetry: ne, onRefresh: re, onRowClick: H, enableRowSelection: ie = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
4661
4661
  let [fe, pe] = h(o), [me, he] = h(() => o.length > 0 ? {} : !0), [ge, _e] = h([]), [ve, ye] = h(""), [be, xe] = h([]), [Se, Ce] = h({}), [we, Te] = h({}), [Ee, De] = h(() => Tr(i).map((e) => e.id)), [G, Oe] = h({}), [ke, Ae] = h({
4662
4662
  pageIndex: 0,
4663
4663
  pageSize: f
@@ -4674,9 +4674,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4674
4674
  }));
4675
4675
  }, Je = p(() => {
4676
4676
  let e = [];
4677
- return We && e.push("__detail"), H && e.push("__select"), U && e.push("__actions"), e;
4677
+ return We && e.push("__detail"), ie && e.push("__select"), U && e.push("__actions"), e;
4678
4678
  }, [
4679
- H,
4679
+ ie,
4680
4680
  U,
4681
4681
  We
4682
4682
  ]), K = p(() => {
@@ -4708,10 +4708,10 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4708
4708
  return e;
4709
4709
  }, [i, r]), ct = p(() => wr(i, G), [G, i]), lt = p(() => {
4710
4710
  let e = [];
4711
- return We && e.push("__detail"), H && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
4711
+ return We && e.push("__detail"), ie && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
4712
4712
  }, [
4713
4713
  Ee,
4714
- H,
4714
+ ie,
4715
4715
  U,
4716
4716
  We
4717
4717
  ]), ut = p(() => {
@@ -4783,13 +4783,13 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4783
4783
  } : null;
4784
4784
  return [
4785
4785
  ...n ? [n] : [],
4786
- ...H ? [e] : [],
4786
+ ...ie ? [e] : [],
4787
4787
  ...ct,
4788
4788
  ...t ? [t] : []
4789
4789
  ];
4790
4790
  }, [
4791
4791
  ct,
4792
- H,
4792
+ ie,
4793
4793
  U,
4794
4794
  Re,
4795
4795
  We,
@@ -4921,7 +4921,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
4921
4921
  getSubRows: (e) => e.subRows,
4922
4922
  getPaginationRowModel: je ? A() : void 0,
4923
4923
  filterFns: { columnFilter: _r },
4924
- enableRowSelection: H
4924
+ enableRowSelection: ie
4925
4925
  });
4926
4926
  Ze.current = Y;
4927
4927
  let pt = je ? Y.getPrePaginationRowModel().rows.length : 0;
@@ -5234,20 +5234,20 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5234
5234
  })] }), /* @__PURE__ */ y("div", {
5235
5235
  className: "sf-table-toolbar-actions",
5236
5236
  children: [
5237
- (te || ie) && /* @__PURE__ */ y("div", {
5237
+ (V || re) && /* @__PURE__ */ y("div", {
5238
5238
  className: "flex items-center gap-2",
5239
- children: [te && /* @__PURE__ */ y("span", {
5239
+ children: [V && /* @__PURE__ */ y("span", {
5240
5240
  className: "sf-table-toolbar-status",
5241
5241
  children: [/* @__PURE__ */ v("span", {
5242
5242
  className: "sf-table-spinner sf-table-spinner--sm",
5243
5243
  "aria-hidden": "true"
5244
5244
  }), "Actualizando"]
5245
- }), ie && /* @__PURE__ */ v("button", {
5245
+ }), re && /* @__PURE__ */ v("button", {
5246
5246
  type: "button",
5247
5247
  "aria-label": "Refrescar",
5248
5248
  className: "sf-table-toolbar-btn",
5249
- disabled: te,
5250
- onClick: ie,
5249
+ disabled: V,
5250
+ onClick: re,
5251
5251
  children: /* @__PURE__ */ v(Kn, {
5252
5252
  className: "h-5 w-5",
5253
5253
  "aria-hidden": "true"
@@ -5308,7 +5308,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5308
5308
  children: "Agrupado"
5309
5309
  }),
5310
5310
  typeof R == "function" ? R(mt, { clearSelection: () => Y.resetRowSelection() }) : R,
5311
- H && mt.length > 0 && /* @__PURE__ */ y("div", {
5311
+ ie && mt.length > 0 && /* @__PURE__ */ y("div", {
5312
5312
  className: "flex items-center gap-2",
5313
5313
  children: [(() => {
5314
5314
  let e = ae?.(mt, { clearSelection: () => Y.resetRowSelection() }) ?? [];
@@ -5346,12 +5346,12 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5346
5346
  ]
5347
5347
  })]
5348
5348
  }),
5349
- ne != null && /* @__PURE__ */ y("div", {
5349
+ te != null && /* @__PURE__ */ y("div", {
5350
5350
  className: "sf-table-error",
5351
- children: [/* @__PURE__ */ v("div", { children: ne }), re && /* @__PURE__ */ v("button", {
5351
+ children: [/* @__PURE__ */ v("div", { children: te }), ne && /* @__PURE__ */ v("button", {
5352
5352
  type: "button",
5353
5353
  className: "sf-table-error__retry",
5354
- onClick: re,
5354
+ onClick: ne,
5355
5355
  children: "Reintentar"
5356
5356
  })]
5357
5357
  }),
@@ -5406,9 +5406,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
5406
5406
  }) }) : /* @__PURE__ */ v(_, { children: Y.getRowModel().rows.map((e) => {
5407
5407
  let t = We && !e.getIsGrouped() && Ge(e.original) && Ke(e.id, e.original);
5408
5408
  return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
5409
- className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", V && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
5410
- onClick: V && !e.getIsGrouped() ? (t) => {
5411
- t.target.closest("button, a, input, select, label, [role=\"button\"]") || V(e.original);
5409
+ className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", H && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
5410
+ onClick: H && !e.getIsGrouped() ? (t) => {
5411
+ t.target.closest("button, a, input, select, label, [role=\"button\"]") || H(e.original);
5412
5412
  } : void 0,
5413
5413
  children: e.getVisibleCells().map((t) => {
5414
5414
  let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
@@ -9579,13 +9579,13 @@ var jr = (e) => {
9579
9579
  lng: e.lng
9580
9580
  }), a(Xo(e.lat), Xo(e.lng));
9581
9581
  }
9582
- }), /* @__PURE__ */ y(te, {
9582
+ }), /* @__PURE__ */ y(V, {
9583
9583
  center: o,
9584
9584
  zoom: n,
9585
9585
  scrollWheelZoom: !r,
9586
9586
  className: "sf-map-frame",
9587
9587
  children: [
9588
- /* @__PURE__ */ v(V, {
9588
+ /* @__PURE__ */ v(H, {
9589
9589
  attribution: ts,
9590
9590
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
9591
9591
  }),
@@ -9598,7 +9598,7 @@ var jr = (e) => {
9598
9598
  readOnly: r,
9599
9599
  onPick: a
9600
9600
  }),
9601
- /* @__PURE__ */ v(ne, {
9601
+ /* @__PURE__ */ v(te, {
9602
9602
  position: o,
9603
9603
  icon: qo,
9604
9604
  draggable: !r,
@@ -9878,9 +9878,9 @@ var jr = (e) => {
9878
9878
  comfortable: "mb-2",
9879
9879
  compact: "mb-1"
9880
9880
  }, As = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, trendDirection: s = "up-good", accentTone: c, progress: l, valueFormat: u, formatOptions: d, sparkline: f, layout: p = "stacked", variant: m = "default", size: h = "md", density: g = "comfortable", accentBar: _, iconStyle: b = "solid", labelWrap: x = !1, className: S, onClick: C, selected: w = !1, showChevron: T = !0 }) => {
9881
- let E = a != null, D = E && a >= 0, O = E ? s === "neutral" ? null : s === "down-good" ? !D : D : null, k = l ? Ss(l.value, l.max) : null, A = l?.label ?? (k === null ? void 0 : `${Math.round(k)}%`), j = _ ?? p === "stacked", M = (e) => typeof e == "number" ? xs(u, d)(e) : e, N = !l && f && f.data.length > 0, P = (e) => {
9881
+ let E = a != null, D = E && a >= 0, O = E ? s === "neutral" ? null : s === "down-good" ? !D : D : null, k = l ? Ss(l.value, l.max) : null, A = l?.label ?? (k === null ? void 0 : `${Math.round(k)}%`), j = _ ?? p === "stacked", M = (e) => typeof e == "number" ? xs(u, d)(e) : e, N = String(M(t)), P = !l && f && f.data.length > 0, F = (e) => {
9882
9882
  C && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), C());
9883
- }, F = k !== null && /* @__PURE__ */ y("div", {
9883
+ }, I = k !== null && /* @__PURE__ */ y("div", {
9884
9884
  className: "mt-2 flex items-center gap-2",
9885
9885
  role: "progressbar",
9886
9886
  "aria-valuenow": Math.round(k),
@@ -9899,7 +9899,7 @@ var jr = (e) => {
9899
9899
  className: "shrink-0 text-xs font-semibold tabular-nums sf-card-muted",
9900
9900
  children: A
9901
9901
  })]
9902
- }), I = N && /* @__PURE__ */ v("div", {
9902
+ }), L = P && /* @__PURE__ */ v("div", {
9903
9903
  className: "mt-2",
9904
9904
  children: /* @__PURE__ */ v(_s, {
9905
9905
  data: f.data,
@@ -9909,39 +9909,41 @@ var jr = (e) => {
9909
9909
  })
9910
9910
  });
9911
9911
  if (p === "leading-icon") {
9912
- let a = c ? ys[c] : "var(--sf-kpi-accent-slate)", o = b === "soft" ? {
9913
- background: `color-mix(in srgb, ${a} 14%, var(--sf-surface))`,
9914
- color: a
9915
- } : { background: a };
9912
+ let t = c ? ys[c] : "var(--sf-kpi-accent-slate)", a = b === "soft" ? {
9913
+ background: `color-mix(in srgb, ${t} 14%, var(--sf-surface))`,
9914
+ color: t
9915
+ } : { background: t };
9916
9916
  return /* @__PURE__ */ y("div", {
9917
- className: (0, X.default)("sf-card flex items-center gap-3", ws[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", w && "sf-kpi-card--selected", S),
9917
+ className: (0, X.default)("sf-card sf-kpi-card--leading flex items-center gap-3", ws[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", w && "sf-kpi-card--selected", S),
9918
9918
  onClick: C,
9919
- onKeyDown: P,
9919
+ onKeyDown: F,
9920
9920
  role: C ? "button" : void 0,
9921
9921
  tabIndex: C ? 0 : void 0,
9922
9922
  "aria-pressed": C ? w : void 0,
9923
9923
  children: [
9924
9924
  r && /* @__PURE__ */ v("span", {
9925
9925
  className: (0, X.default)("sf-kpi-tile", Ds[h], b === "soft" && "sf-kpi-tile--soft", i),
9926
- style: o,
9926
+ style: a,
9927
9927
  "aria-hidden": "true",
9928
9928
  children: r
9929
9929
  }),
9930
9930
  /* @__PURE__ */ y("div", {
9931
- className: "min-w-0 flex-1",
9931
+ className: "sf-kpi-card__body min-w-0 flex-1",
9932
9932
  children: [
9933
9933
  /* @__PURE__ */ v("p", {
9934
9934
  className: (0, X.default)(x ? "sf-kpi-card__label--wrap" : "truncate", "text-sm font-medium sf-card-subtitle"),
9935
9935
  children: e
9936
9936
  }),
9937
9937
  /* @__PURE__ */ v("p", {
9938
- className: (0, X.default)(Es[h], "font-bold tabular-nums sf-card-title"),
9939
- children: M(t)
9938
+ className: (0, X.default)(Es[h], "sf-kpi-card__value--fit", `sf-kpi-card__value--${h}`, "font-bold tabular-nums sf-card-title"),
9939
+ style: { "--sf-kpi-value-chars": N.length },
9940
+ title: N,
9941
+ children: N
9940
9942
  }),
9941
- k === null ? N ? I : n && /* @__PURE__ */ v("p", {
9943
+ k === null ? P ? L : n && /* @__PURE__ */ v("p", {
9942
9944
  className: "mt-1 text-xs sf-card-muted",
9943
9945
  children: n
9944
- }) : F,
9946
+ }) : I,
9945
9947
  w && /* @__PURE__ */ y("p", {
9946
9948
  className: "sf-kpi-card__selected-hint",
9947
9949
  children: [/* @__PURE__ */ v(St, { "aria-hidden": "true" }), "Seleccionado"]
@@ -9959,7 +9961,7 @@ var jr = (e) => {
9959
9961
  return /* @__PURE__ */ y("div", {
9960
9962
  className: (0, X.default)("sf-card", Cs[h], m === "filled" ? "sf-kpi-card--filled" : c && j && "sf-kpi-card", m !== "filled" && c && j && vs[c], C && "sf-card--interactive", S),
9961
9963
  onClick: C,
9962
- onKeyDown: P,
9964
+ onKeyDown: F,
9963
9965
  role: C ? "button" : void 0,
9964
9966
  tabIndex: C ? 0 : void 0,
9965
9967
  children: [
@@ -9988,7 +9990,7 @@ var jr = (e) => {
9988
9990
  title: typeof t == "string" ? t : void 0,
9989
9991
  children: M(t)
9990
9992
  }),
9991
- k === null ? N && I : F,
9993
+ k === null ? P && L : I,
9992
9994
  (n || o) && /* @__PURE__ */ y("div", {
9993
9995
  className: (0, X.default)("flex items-center justify-between gap-2", Os[g]),
9994
9996
  children: [n && /* @__PURE__ */ v("span", {
@@ -10622,27 +10624,32 @@ var jr = (e) => {
10622
10624
  xs: 56,
10623
10625
  sm: 80,
10624
10626
  md: 110,
10625
- lg: 150
10627
+ lg: 150,
10628
+ xl: 285
10626
10629
  }, yc = {
10627
10630
  xs: 13,
10628
10631
  sm: 18,
10629
10632
  md: 24,
10630
- lg: 34
10633
+ lg: 34,
10634
+ xl: 64
10631
10635
  }, bc = {
10632
10636
  xs: 8,
10633
10637
  sm: 10,
10634
10638
  md: 11,
10635
- lg: 13
10639
+ lg: 13,
10640
+ xl: 24
10636
10641
  }, xc = {
10637
10642
  xs: 7,
10638
10643
  sm: 9,
10639
10644
  md: 10,
10640
- lg: 12
10645
+ lg: 12,
10646
+ xl: 22
10641
10647
  }, Sc = {
10642
10648
  xs: 6,
10643
10649
  sm: 8,
10644
10650
  md: 10,
10645
- lg: 13
10651
+ lg: 13,
10652
+ xl: 25
10646
10653
  }, Cc = "var(--sf-success)", wc = "var(--sf-warning)", Tc = "var(--sf-danger)", Ec = (e, t, n) => {
10647
10654
  let { warning: r, critical: i } = n;
10648
10655
  return t ? e >= i ? Cc : e >= r ? wc : Tc : e < r ? Cc : e < i ? wc : Tc;
@@ -10719,132 +10726,160 @@ var jr = (e) => {
10719
10726
  ...e,
10720
10727
  size: e.size ?? t
10721
10728
  }, n))
10722
- }), kc = {
10729
+ }), kc = (e) => `${Math.round(e * 100)}%`, Ac = {
10723
10730
  xs: 56,
10724
10731
  sm: 80,
10725
10732
  md: 110,
10726
- lg: 150
10727
- }, Ac = {
10733
+ lg: 150,
10734
+ xl: 285
10735
+ }, jc = {
10728
10736
  xs: 6,
10729
10737
  sm: 8,
10730
10738
  md: 10,
10731
- lg: 13
10732
- }, jc = {
10739
+ lg: 13,
10740
+ xl: 25
10741
+ }, Mc = {
10733
10742
  xs: 13,
10734
10743
  sm: 18,
10735
10744
  md: 24,
10736
- lg: 34
10737
- }, Mc = {
10745
+ lg: 34,
10746
+ xl: 64
10747
+ }, Nc = {
10738
10748
  xs: 8,
10739
10749
  sm: 10,
10740
10750
  md: 11,
10741
- lg: 13
10742
- }, Nc = [
10751
+ lg: 13,
10752
+ xl: 24
10753
+ }, Pc = [
10743
10754
  "var(--sf-primary)",
10744
10755
  "var(--sf-info)",
10745
10756
  "var(--sf-warning)",
10746
10757
  "var(--sf-accent)"
10747
- ], Pc = ({ segments: e, centerValue: t, centerLabel: n, size: r = "md", strokeWidth: i, showLegend: a = !0, className: o }) => {
10748
- let s = e.reduce((e, t) => e + Math.max(0, t.value), 0), c = kc[r], l = i ?? Ac[r], u = (c - l) / 2, d = c / 2, f = 2 * Math.PI * u, p = 0, m = e.map((e, t) => {
10749
- let n = Math.max(0, e.value), r = s > 0 ? n / s : 0, i = f * r, a = f * (1 - p);
10750
- return p += r, {
10758
+ ], Fc = ({ segments: e, centerValue: t, centerLabel: n, size: r = "md", strokeWidth: i, showLegend: a = !0, legendVariant: o = "list", formatPct: s = kc, className: c }) => {
10759
+ let l = e.reduce((e, t) => e + Math.max(0, t.value), 0), u = Ac[r], d = i ?? jc[r], f = (u - d) / 2, p = u / 2, m = 2 * Math.PI * f, h = e.map((e) => l > 0 ? Math.max(0, e.value) / l : 0), g = e.map((e, t) => {
10760
+ let n = h[t], r = m * n, i = h.slice(0, t).reduce((e, t) => e + t, 0), a = m * (1 - i);
10761
+ return {
10751
10762
  ...e,
10752
- pct: r,
10753
- color: e.color ?? Nc[t % Nc.length],
10754
- dasharray: `${i} ${f - i}`,
10763
+ pct: n,
10764
+ color: e.color ?? Pc[t % Pc.length],
10765
+ dasharray: `${r} ${m - r}`,
10755
10766
  dashoffset: a
10756
10767
  };
10757
10768
  });
10758
10769
  return /* @__PURE__ */ y("div", {
10759
- className: (0, X.default)("sf-donut-breakdown", o),
10760
- children: [/* @__PURE__ */ y("div", {
10761
- className: "relative",
10762
- style: {
10763
- width: c,
10764
- height: c
10765
- },
10766
- children: [/* @__PURE__ */ v("svg", {
10767
- width: c,
10768
- height: c,
10769
- viewBox: `0 0 ${c} ${c}`,
10770
- style: { transform: "rotate(-90deg)" },
10771
- "aria-hidden": "true",
10772
- children: s <= 0 ? /* @__PURE__ */ v("circle", {
10773
- cx: d,
10774
- cy: d,
10775
- r: u,
10776
- fill: "none",
10777
- stroke: "var(--sf-gauge-track)",
10778
- strokeWidth: l
10779
- }) : m.map((e, t) => /* @__PURE__ */ v("circle", {
10780
- cx: d,
10781
- cy: d,
10782
- r: u,
10783
- fill: "none",
10784
- stroke: e.color,
10785
- strokeWidth: l,
10786
- strokeDasharray: e.dasharray,
10787
- strokeDashoffset: e.dashoffset
10788
- }, `${e.label}-${t}`))
10789
- }), /* @__PURE__ */ y("div", {
10790
- className: "absolute inset-0 flex flex-col items-center justify-center",
10791
- children: [/* @__PURE__ */ v("span", {
10792
- className: "sf-donut-breakdown__value",
10793
- style: { fontSize: jc[r] },
10794
- children: t ?? s.toLocaleString("es-PE")
10795
- }), n && /* @__PURE__ */ v("span", {
10796
- className: "sf-donut-breakdown__label",
10797
- style: { fontSize: Mc[r] },
10798
- children: n
10770
+ className: (0, X.default)("sf-donut-breakdown", o === "stat" && "sf-donut-breakdown--stat", c),
10771
+ children: [
10772
+ /* @__PURE__ */ y("div", {
10773
+ className: "relative",
10774
+ style: {
10775
+ width: u,
10776
+ height: u
10777
+ },
10778
+ children: [/* @__PURE__ */ v("svg", {
10779
+ width: u,
10780
+ height: u,
10781
+ viewBox: `0 0 ${u} ${u}`,
10782
+ style: { transform: "rotate(-90deg)" },
10783
+ "aria-hidden": "true",
10784
+ children: l <= 0 ? /* @__PURE__ */ v("circle", {
10785
+ cx: p,
10786
+ cy: p,
10787
+ r: f,
10788
+ fill: "none",
10789
+ stroke: "var(--sf-gauge-track)",
10790
+ strokeWidth: d
10791
+ }) : g.map((e, t) => /* @__PURE__ */ v("circle", {
10792
+ cx: p,
10793
+ cy: p,
10794
+ r: f,
10795
+ fill: "none",
10796
+ stroke: e.color,
10797
+ strokeWidth: d,
10798
+ strokeDasharray: e.dasharray,
10799
+ strokeDashoffset: e.dashoffset
10800
+ }, `${e.label}-${t}`))
10801
+ }), /* @__PURE__ */ y("div", {
10802
+ className: "absolute inset-0 flex flex-col items-center justify-center",
10803
+ children: [/* @__PURE__ */ v("span", {
10804
+ className: "sf-donut-breakdown__value",
10805
+ style: { fontSize: Mc[r] },
10806
+ children: t ?? l.toLocaleString("es-PE")
10807
+ }), n && /* @__PURE__ */ v("span", {
10808
+ className: "sf-donut-breakdown__label",
10809
+ style: { fontSize: Nc[r] },
10810
+ children: n
10811
+ })]
10799
10812
  })]
10800
- })]
10801
- }), a && /* @__PURE__ */ v("ul", {
10802
- className: "sf-donut-breakdown__legend",
10803
- children: m.map((e, t) => /* @__PURE__ */ y("li", {
10804
- className: "sf-donut-breakdown__legend-item",
10805
- children: [
10806
- /* @__PURE__ */ v("span", {
10807
- className: "sf-donut-breakdown__legend-dot",
10813
+ }),
10814
+ a && o === "stat" && /* @__PURE__ */ v("ul", {
10815
+ className: "sf-donut-breakdown__stats",
10816
+ children: g.map((e, t) => /* @__PURE__ */ y("li", {
10817
+ className: "sf-donut-breakdown__stat",
10818
+ children: [/* @__PURE__ */ v("span", {
10819
+ className: "sf-donut-breakdown__stat-dot",
10808
10820
  style: { backgroundColor: e.color },
10809
10821
  "aria-hidden": "true"
10810
- }),
10811
- /* @__PURE__ */ v("span", {
10812
- className: "sf-donut-breakdown__legend-label",
10813
- children: e.label
10814
- }),
10815
- /* @__PURE__ */ v("span", {
10816
- className: "sf-donut-breakdown__legend-value",
10822
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
10823
+ className: "sf-donut-breakdown__stat-value",
10817
10824
  children: e.value.toLocaleString("es-PE")
10818
- }),
10819
- /* @__PURE__ */ y("span", {
10820
- className: "sf-donut-breakdown__legend-pct",
10821
- children: [Math.round(e.pct * 100), "%"]
10822
- })
10823
- ]
10824
- }, `${e.label}-${t}`))
10825
- })]
10825
+ }), /* @__PURE__ */ y("div", {
10826
+ className: "sf-donut-breakdown__stat-text",
10827
+ children: [
10828
+ e.label,
10829
+ " · ",
10830
+ s(e.pct)
10831
+ ]
10832
+ })] })]
10833
+ }, `${e.label}-${t}`))
10834
+ }),
10835
+ a && o === "list" && /* @__PURE__ */ v("ul", {
10836
+ className: "sf-donut-breakdown__legend",
10837
+ children: g.map((e, t) => /* @__PURE__ */ y("li", {
10838
+ className: "sf-donut-breakdown__legend-item",
10839
+ children: [
10840
+ /* @__PURE__ */ v("span", {
10841
+ className: "sf-donut-breakdown__legend-dot",
10842
+ style: { backgroundColor: e.color },
10843
+ "aria-hidden": "true"
10844
+ }),
10845
+ /* @__PURE__ */ v("span", {
10846
+ className: "sf-donut-breakdown__legend-label",
10847
+ children: e.label
10848
+ }),
10849
+ /* @__PURE__ */ v("span", {
10850
+ className: "sf-donut-breakdown__legend-value",
10851
+ children: e.value.toLocaleString("es-PE")
10852
+ }),
10853
+ /* @__PURE__ */ v("span", {
10854
+ className: "sf-donut-breakdown__legend-pct",
10855
+ children: s(e.pct)
10856
+ })
10857
+ ]
10858
+ }, `${e.label}-${t}`))
10859
+ })
10860
+ ]
10826
10861
  });
10827
- }, Fc = {
10862
+ }, Ic = {
10828
10863
  success: "sf-event-log__dot--success",
10829
10864
  warning: "sf-event-log__dot--warning",
10830
10865
  danger: "sf-event-log__dot--danger",
10831
10866
  info: "sf-event-log__dot--info",
10832
10867
  default: "sf-event-log__dot--default"
10833
- }, Ic = {
10868
+ }, Lc = {
10834
10869
  success: "sf-event-log__icon-wrap--success",
10835
10870
  warning: "sf-event-log__icon-wrap--warning",
10836
10871
  danger: "sf-event-log__icon-wrap--danger",
10837
10872
  info: "sf-event-log__icon-wrap--info",
10838
10873
  default: "sf-event-log__icon-wrap--default"
10839
- }, Lc = {
10874
+ }, Rc = {
10840
10875
  success: "sf-alert-row-list__meta--success",
10841
10876
  warning: "sf-alert-row-list__meta--warning",
10842
10877
  danger: "sf-alert-row-list__meta--danger",
10843
10878
  info: "sf-alert-row-list__meta--info",
10844
10879
  default: "sf-alert-row-list__meta--default"
10845
- }, Rc = (e, t) => {
10880
+ }, zc = (e, t) => {
10846
10881
  t && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
10847
- }, zc = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
10882
+ }, Bc = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
10848
10883
  let c = r ? "text-[11px]" : "text-xs", l = r ? "text-[10px]" : "text-[11px]", u = r ? "text-[9px]" : "text-[10px]", d = r ? "py-1.5" : "py-2.5";
10849
10884
  return /* @__PURE__ */ y("div", {
10850
10885
  className: (0, X.default)("sf-event-log", s),
@@ -10885,11 +10920,11 @@ var jr = (e) => {
10885
10920
  /* @__PURE__ */ v("div", {
10886
10921
  className: "mt-0.5 shrink-0",
10887
10922
  children: t.icon ? /* @__PURE__ */ v("div", {
10888
- className: (0, X.default)("sf-event-log__icon-wrap", Ic[r]),
10923
+ className: (0, X.default)("sf-event-log__icon-wrap", Lc[r]),
10889
10924
  "aria-hidden": "true",
10890
10925
  children: t.icon
10891
10926
  }) : /* @__PURE__ */ v("div", {
10892
- className: (0, X.default)("sf-event-log__dot", Fc[r]),
10927
+ className: (0, X.default)("sf-event-log__dot", Ic[r]),
10893
10928
  "aria-hidden": "true"
10894
10929
  })
10895
10930
  }),
@@ -10923,16 +10958,16 @@ var jr = (e) => {
10923
10958
  })]
10924
10959
  })]
10925
10960
  });
10926
- }, Bc = {
10961
+ }, Vc = {
10927
10962
  time: "Hora",
10928
10963
  vehicle: "Vehículo",
10929
10964
  description: "Descripción"
10930
- }, Vc = {
10965
+ }, Hc = {
10931
10966
  critical: "sf-alert-row-list__severity--critical",
10932
10967
  warning: "sf-alert-row-list__severity--warning",
10933
10968
  info: !1
10934
- }, Hc = ({ severity: e }) => {
10935
- let t = Vc[e];
10969
+ }, Uc = ({ severity: e }) => {
10970
+ let t = Hc[e];
10936
10971
  return t ? /* @__PURE__ */ v("span", {
10937
10972
  className: (0, X.default)("sf-alert-row-list__severity", t),
10938
10973
  "aria-hidden": "true",
@@ -10967,7 +11002,7 @@ var jr = (e) => {
10967
11002
  })] })
10968
11003
  })
10969
11004
  }) : null;
10970
- }, Uc = ({ actions: e }) => /* @__PURE__ */ v("span", {
11005
+ }, Wc = ({ actions: e }) => /* @__PURE__ */ v("span", {
10971
11006
  className: "sf-alert-row-list__actions",
10972
11007
  children: e.map((e, t) => /* @__PURE__ */ v("button", {
10973
11008
  type: "button",
@@ -10977,9 +11012,9 @@ var jr = (e) => {
10977
11012
  },
10978
11013
  children: e.label
10979
11014
  }, t))
10980
- }), Wc = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i, density: a = "comfortable", emptyMessage: o = "Sin alertas" }) => {
11015
+ }), Gc = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i, density: a = "comfortable", emptyMessage: o = "Sin alertas" }) => {
10981
11016
  let s = {
10982
- ...Bc,
11017
+ ...Vc,
10983
11018
  ...i
10984
11019
  };
10985
11020
  return /* @__PURE__ */ y("div", {
@@ -11013,13 +11048,13 @@ var jr = (e) => {
11013
11048
  role: a ? "button" : "listitem",
11014
11049
  tabIndex: a ? 0 : void 0,
11015
11050
  onClick: a ? e.onClick : void 0,
11016
- onKeyDown: a ? (t) => Rc(t, e.onClick) : void 0
11051
+ onKeyDown: a ? (t) => zc(t, e.onClick) : void 0
11017
11052
  };
11018
11053
  return r ? /* @__PURE__ */ y("div", {
11019
11054
  ...o,
11020
11055
  children: [
11021
11056
  /* @__PURE__ */ v("span", {
11022
- className: (0, X.default)("sf-event-log__dot", Fc[n]),
11057
+ className: (0, X.default)("sf-event-log__dot", Ic[n]),
11023
11058
  "aria-hidden": "true"
11024
11059
  }),
11025
11060
  /* @__PURE__ */ v("span", {
@@ -11028,7 +11063,7 @@ var jr = (e) => {
11028
11063
  }),
11029
11064
  /* @__PURE__ */ y("span", {
11030
11065
  className: "sf-alert-row-list__vehicle",
11031
- children: [e.severity && /* @__PURE__ */ v(Hc, { severity: e.severity }), e.vehicle]
11066
+ children: [e.severity && /* @__PURE__ */ v(Uc, { severity: e.severity }), e.vehicle]
11032
11067
  }),
11033
11068
  /* @__PURE__ */ y("span", {
11034
11069
  className: "sf-alert-row-list__description",
@@ -11039,17 +11074,17 @@ var jr = (e) => {
11039
11074
  children: e.icon
11040
11075
  }), e.label]
11041
11076
  }), e.meta && /* @__PURE__ */ v("span", {
11042
- className: (0, X.default)("sf-alert-row-list__meta", Lc[n]),
11077
+ className: (0, X.default)("sf-alert-row-list__meta", Rc[n]),
11043
11078
  children: e.meta
11044
11079
  })]
11045
11080
  }),
11046
- i && /* @__PURE__ */ v(Uc, { actions: e.actions })
11081
+ i && /* @__PURE__ */ v(Wc, { actions: e.actions })
11047
11082
  ]
11048
11083
  }, t) : /* @__PURE__ */ y("div", {
11049
11084
  ...o,
11050
11085
  children: [
11051
11086
  /* @__PURE__ */ v("span", {
11052
- className: (0, X.default)("sf-event-log__dot", Fc[n]),
11087
+ className: (0, X.default)("sf-event-log__dot", Ic[n]),
11053
11088
  "aria-hidden": "true"
11054
11089
  }),
11055
11090
  /* @__PURE__ */ y("span", {
@@ -11060,20 +11095,20 @@ var jr = (e) => {
11060
11095
  }), e.label]
11061
11096
  }),
11062
11097
  e.meta && /* @__PURE__ */ v("span", {
11063
- className: (0, X.default)("sf-alert-row-list__meta", Lc[n]),
11098
+ className: (0, X.default)("sf-alert-row-list__meta", Rc[n]),
11064
11099
  children: e.meta
11065
11100
  }),
11066
11101
  e.time && /* @__PURE__ */ v("span", {
11067
11102
  className: "sf-alert-row-list__time",
11068
11103
  children: e.time
11069
11104
  }),
11070
- i && /* @__PURE__ */ v(Uc, { actions: e.actions })
11105
+ i && /* @__PURE__ */ v(Wc, { actions: e.actions })
11071
11106
  ]
11072
11107
  }, t);
11073
11108
  })
11074
11109
  ]
11075
11110
  });
11076
- }, Gc = {
11111
+ }, Kc = {
11077
11112
  success: {
11078
11113
  color: "#1F8A4C",
11079
11114
  halo: "#EAF5EE"
@@ -11094,17 +11129,17 @@ var jr = (e) => {
11094
11129
  color: "var(--sf-text-subtle, #5C7180)",
11095
11130
  halo: "var(--sf-surface-alt, #EEF0F2)"
11096
11131
  }
11097
- }, Kc = {
11132
+ }, qc = {
11098
11133
  display: "flex",
11099
11134
  gap: 12,
11100
11135
  flexWrap: "wrap"
11101
- }, qc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11136
+ }, Jc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11102
11137
  className: (0, X.default)("sf-alert-lane", t),
11103
- style: Kc,
11138
+ style: qc,
11104
11139
  role: "list",
11105
11140
  "aria-label": "Alertas",
11106
11141
  children: e.map((e, t) => {
11107
- let n = Gc[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
11142
+ let n = Kc[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
11108
11143
  return /* @__PURE__ */ y("div", {
11109
11144
  role: "listitem",
11110
11145
  style: {
@@ -11175,7 +11210,7 @@ var jr = (e) => {
11175
11210
  ]
11176
11211
  }, e.id ?? t);
11177
11212
  })
11178
- }), Jc = ({ tone: e = "default" }) => /* @__PURE__ */ v("span", {
11213
+ }), Yc = ({ tone: e = "default" }) => /* @__PURE__ */ v("span", {
11179
11214
  className: (0, X.default)("sf-alert-summary-row__icon", `sf-alert-summary-row__icon--${e}`),
11180
11215
  "aria-hidden": "true",
11181
11216
  children: /* @__PURE__ */ y("svg", {
@@ -11212,7 +11247,7 @@ var jr = (e) => {
11212
11247
  y2: "4.71"
11213
11248
  })] })]
11214
11249
  })
11215
- }), Yc = ({ items: e, className: t, density: n = "comfortable", emptyMessage: r = "Sin alertas", showIcon: i = !1, showChevron: a = !1 }) => /* @__PURE__ */ y("div", {
11250
+ }), Xc = ({ items: e, className: t, density: n = "comfortable", emptyMessage: r = "Sin alertas", showIcon: i = !1, showChevron: a = !1 }) => /* @__PURE__ */ y("div", {
11216
11251
  className: (0, X.default)("sf-alert-summary-list", t),
11217
11252
  children: [e.length === 0 && /* @__PURE__ */ v("p", {
11218
11253
  className: "sf-alert-summary-list__empty",
@@ -11230,7 +11265,7 @@ var jr = (e) => {
11230
11265
  } : void 0,
11231
11266
  children: [/* @__PURE__ */ y("div", {
11232
11267
  className: "flex min-w-0 items-start gap-2",
11233
- children: [i && (e.icon ?? /* @__PURE__ */ v(Jc, { tone: e.tone })), /* @__PURE__ */ y("div", {
11268
+ children: [i && (e.icon ?? /* @__PURE__ */ v(Yc, { tone: e.tone })), /* @__PURE__ */ y("div", {
11234
11269
  className: "min-w-0",
11235
11270
  children: [/* @__PURE__ */ v("p", {
11236
11271
  className: "sf-alert-summary-row__label",
@@ -11267,7 +11302,7 @@ var jr = (e) => {
11267
11302
  })]
11268
11303
  }, `${e.label}-${t}`);
11269
11304
  })]
11270
- }), Xc = ({ items: e, confidence: t, updatedAt: n, className: r }) => {
11305
+ }), Zc = ({ items: e, confidence: t, updatedAt: n, className: r }) => {
11271
11306
  let i = [
11272
11307
  ...e.map((e, t) => /* @__PURE__ */ y("span", {
11273
11308
  className: "sf-evidence-footnote__item",
@@ -11304,7 +11339,7 @@ var jr = (e) => {
11304
11339
  }), e]
11305
11340
  }, t))
11306
11341
  });
11307
- }, Zc = (e) => e.toLocaleString("es-PE"), Qc = ({ rows: e, planLabel: t = "Plan", realLabel: n = "Real", className: r }) => /* @__PURE__ */ y("table", {
11342
+ }, Qc = (e) => e.toLocaleString("es-PE"), $c = ({ rows: e, planLabel: t = "Plan", realLabel: n = "Real", className: r }) => /* @__PURE__ */ y("table", {
11308
11343
  className: (0, X.default)("sf-comparison-table", r),
11309
11344
  children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", { children: [
11310
11345
  /* @__PURE__ */ v("th", { className: "sf-comparison-table__th sf-comparison-table__th--label" }),
@@ -11321,7 +11356,7 @@ var jr = (e) => {
11321
11356
  children: "Desviación"
11322
11357
  })
11323
11358
  ] }) }), /* @__PURE__ */ v("tbody", { children: e.map((e) => {
11324
- let t = e.valueFormat ?? Zc, n = e.direction ?? "up-good", r = e.real - e.plan, i = e.plan === 0 ? 0 : r / Math.abs(e.plan) * 100, a = n === "neutral" ? null : n === "up-good" ? r >= 0 : r <= 0;
11359
+ let t = e.valueFormat ?? Qc, n = e.direction ?? "up-good", r = e.real - e.plan, i = e.plan === 0 ? 0 : r / Math.abs(e.plan) * 100, a = n === "neutral" ? null : n === "up-good" ? r >= 0 : r <= 0;
11325
11360
  return /* @__PURE__ */ y("tr", {
11326
11361
  className: "sf-comparison-table__row",
11327
11362
  children: [
@@ -11352,40 +11387,40 @@ var jr = (e) => {
11352
11387
  ]
11353
11388
  }, e.key);
11354
11389
  }) })]
11355
- }), $c = {
11390
+ }), el = {
11356
11391
  default: "",
11357
11392
  accent: "sf-card--accent",
11358
11393
  critical: "sf-card--critical",
11359
11394
  warning: "sf-card--warning",
11360
11395
  success: "sf-card--success"
11361
- }, el = {
11396
+ }, tl = {
11362
11397
  1: "col-span-1",
11363
11398
  2: "col-span-1 sm:col-span-2",
11364
11399
  3: "col-span-1 sm:col-span-2 lg:col-span-3",
11365
11400
  4: "col-span-1 sm:col-span-2 lg:col-span-4",
11366
11401
  5: "col-span-1 sm:col-span-2 lg:col-span-5",
11367
11402
  6: "col-span-1 sm:col-span-2 lg:col-span-6"
11368
- }, tl = {
11403
+ }, nl = {
11369
11404
  none: "",
11370
11405
  sm: "p-3",
11371
11406
  md: "p-4",
11372
11407
  lg: "p-5"
11373
- }, nl = {
11408
+ }, rl = {
11374
11409
  visible: "",
11375
11410
  auto: "overflow-auto",
11376
11411
  hidden: "overflow-hidden"
11377
- }, rl = () => /* @__PURE__ */ v("div", {
11412
+ }, il = () => /* @__PURE__ */ v("div", {
11378
11413
  className: "sf-card-state__spinner",
11379
11414
  role: "status",
11380
11415
  "aria-label": "Cargando",
11381
11416
  children: /* @__PURE__ */ v("span", { className: "sf-card-state__spinner-ring" })
11382
- }), il = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", look: s = "default", headerSize: c = s === "board" ? "md" : "sm", headerWrap: l = s === "board", headerDivider: u = s !== "board", footer: d, state: f = "idle", loadingMessage: p = "Cargando…", errorMessage: m = "No se pudo cargar la información.", emptyMessage: h = "Sin datos para mostrar.", onRetry: g, retryLabel: b = "Reintentar", minHeight: x, bodyOverflow: S = "visible", className: C, children: w }) => {
11417
+ }), al = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", look: s = "default", headerSize: c = s === "board" ? "md" : "sm", headerWrap: l = s === "board", headerDivider: u = s !== "board", footer: d, state: f = "idle", loadingMessage: p = "Cargando…", errorMessage: m = "No se pudo cargar la información.", emptyMessage: h = "Sin datos para mostrar.", onRetry: g, retryLabel: b = "Reintentar", minHeight: x, bodyOverflow: S = "visible", className: C, children: w }) => {
11383
11418
  let T = x === void 0 ? void 0 : { minHeight: x }, E = f !== "idle" && /* @__PURE__ */ y("div", {
11384
11419
  className: "sf-card-state",
11385
11420
  style: T,
11386
11421
  role: f === "error" ? "alert" : f === "empty" ? "status" : void 0,
11387
11422
  children: [
11388
- f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(rl, {}), p && /* @__PURE__ */ v("p", {
11423
+ f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(il, {}), p && /* @__PURE__ */ v("p", {
11389
11424
  className: "sf-card-state__message",
11390
11425
  children: p
11391
11426
  })] }),
@@ -11407,7 +11442,7 @@ var jr = (e) => {
11407
11442
  return /* @__PURE__ */ y("div", {
11408
11443
  role: e ? "region" : void 0,
11409
11444
  "aria-label": e,
11410
- className: (0, X.default)("sf-card flex flex-col overflow-hidden", $c[i], el[a], C),
11445
+ className: (0, X.default)("sf-card flex flex-col overflow-hidden", el[i], tl[a], C),
11411
11446
  children: [
11412
11447
  (e || n || r) && /* @__PURE__ */ y("div", {
11413
11448
  className: (0, X.default)("sf-card-header", c === "md" && "sf-card-header--md", l && "sf-card-header--wrap", !u && "sf-card-header--no-divider"),
@@ -11438,7 +11473,7 @@ var jr = (e) => {
11438
11473
  ]
11439
11474
  }),
11440
11475
  /* @__PURE__ */ v("div", {
11441
- className: (0, X.default)("flex-1", tl[o], nl[S]),
11476
+ className: (0, X.default)("flex-1", nl[o], rl[S]),
11442
11477
  style: f === "idle" ? T : void 0,
11443
11478
  children: f === "idle" ? w : E
11444
11479
  }),
@@ -11448,24 +11483,24 @@ var jr = (e) => {
11448
11483
  })
11449
11484
  ]
11450
11485
  });
11451
- }, al = {
11486
+ }, ol = {
11452
11487
  2: "grid-cols-1 sm:grid-cols-2",
11453
11488
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
11454
11489
  4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
11455
11490
  5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
11456
11491
  6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6"
11457
- }, ol = {
11492
+ }, sl = {
11458
11493
  sm: "gap-2",
11459
11494
  md: "gap-3",
11460
11495
  lg: "gap-5"
11461
- }, sl = {
11496
+ }, cl = {
11462
11497
  stretch: "items-stretch",
11463
11498
  start: "items-start"
11464
- }, cl = ({ cols: e = 4, gap: t = "md", alignItems: n = "stretch", minColWidth: r, className: i, children: a }) => /* @__PURE__ */ v("div", {
11465
- className: (0, X.default)("grid", !r && al[e], ol[t], sl[n], i),
11499
+ }, ll = ({ cols: e = 4, gap: t = "md", alignItems: n = "stretch", minColWidth: r, className: i, children: a }) => /* @__PURE__ */ v("div", {
11500
+ className: (0, X.default)("grid", !r && ol[e], sl[t], cl[n], i),
11466
11501
  style: r ? { gridTemplateColumns: `repeat(auto-fit, minmax(${r}, 1fr))` } : void 0,
11467
11502
  children: a
11468
- }), ll = ({ title: e, subtitle: t, action: n, icon: r, iconSize: i = "md", variant: a = "plain", className: o, children: s }) => /* @__PURE__ */ y("section", {
11503
+ }), ul = ({ title: e, subtitle: t, action: n, icon: r, iconSize: i = "md", variant: a = "plain", className: o, children: s }) => /* @__PURE__ */ y("section", {
11469
11504
  className: (0, X.default)("flex flex-col gap-3", a === "panel" && "sf-section--panel", o),
11470
11505
  "aria-label": e,
11471
11506
  children: [/* @__PURE__ */ y("div", {
@@ -11488,13 +11523,13 @@ var jr = (e) => {
11488
11523
  children: n
11489
11524
  })]
11490
11525
  }), s]
11491
- }), ul = {
11526
+ }), dl = {
11492
11527
  slate: "sf-stat-tone--slate",
11493
11528
  emerald: "sf-stat-tone--emerald",
11494
11529
  amber: "sf-stat-tone--amber",
11495
11530
  red: "sf-stat-tone--red",
11496
11531
  blue: "sf-stat-tone--blue"
11497
- }, dl = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11532
+ }, fl = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
11498
11533
  role: "list",
11499
11534
  "aria-label": "Resumen de métricas",
11500
11535
  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),
@@ -11503,7 +11538,7 @@ var jr = (e) => {
11503
11538
  role: "listitem",
11504
11539
  children: [
11505
11540
  e.tone && /* @__PURE__ */ v("span", {
11506
- className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", ul[e.tone]),
11541
+ className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", dl[e.tone]),
11507
11542
  "aria-hidden": "true"
11508
11543
  }),
11509
11544
  /* @__PURE__ */ y("span", {
@@ -11516,7 +11551,7 @@ var jr = (e) => {
11516
11551
  })
11517
11552
  ]
11518
11553
  }, t))
11519
- }), fl = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
11554
+ }), pl = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
11520
11555
  className: "sf-card flex min-h-[480px] flex-col overflow-hidden bg-[var(--sf-page-bg)]",
11521
11556
  role: "region",
11522
11557
  "aria-label": "Dashboard",
@@ -11541,7 +11576,7 @@ var jr = (e) => {
11541
11576
  children: n
11542
11577
  })
11543
11578
  ]
11544
- }), pl = ({ title: e, onClose: t, headerAction: n, icon: r, iconSize: i = "sm", heading: a, badge: o, rows: s = [], align: c = "stack", actions: l, sectionTitle: u, items: d = [], width: f = 320, className: p }) => {
11579
+ }), ml = ({ title: e, onClose: t, headerAction: n, icon: r, iconSize: i = "sm", heading: a, badge: o, rows: s = [], align: c = "stack", actions: l, sectionTitle: u, items: d = [], width: f = 320, className: p }) => {
11545
11580
  let m = typeof f == "number" ? `${f}px` : f;
11546
11581
  return /* @__PURE__ */ y("aside", {
11547
11582
  className: (0, X.default)("sf-detail-side-panel", p),
@@ -11634,17 +11669,17 @@ var jr = (e) => {
11634
11669
  })
11635
11670
  ]
11636
11671
  });
11637
- }, ml = ({ text: e, tone: t = "info", className: n }) => /* @__PURE__ */ y("div", {
11672
+ }, hl = ({ text: e, tone: t = "info", className: n }) => /* @__PURE__ */ y("div", {
11638
11673
  className: (0, X.default)("sf-card-note", t === "warning" && "sf-card-note--warning", n),
11639
11674
  role: "note",
11640
11675
  children: [/* @__PURE__ */ v(ut, {
11641
11676
  className: "sf-card-note__icon",
11642
11677
  "aria-hidden": "true"
11643
11678
  }), /* @__PURE__ */ v("span", { children: e })]
11644
- }), hl = (e) => e >= 5 ? 5 : e === 4 ? 4 : 3, gl = ({ block: e }) => e.left && e.right ? /* @__PURE__ */ y("div", {
11679
+ }), gl = (e) => e >= 5 ? 5 : e === 4 ? 4 : 3, _l = ({ block: e }) => e.left && e.right ? /* @__PURE__ */ y("div", {
11645
11680
  className: "sf-board__split",
11646
11681
  children: [e.left, e.right]
11647
- }) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }), _l = ({ kpis: e = [], notes: t = [], hidden: n = [], hiddenTitle: r = (e) => `${e} indicador(es) no aplican a esta empresa`, detail: i, primary: a, secondary: o }) => {
11682
+ }) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }), vl = ({ kpis: e = [], notes: t = [], hidden: n = [], hiddenTitle: r = (e) => `${e} indicador(es) no aplican a esta empresa`, detail: i, primary: a, secondary: o }) => {
11648
11683
  let s = e.filter((e) => e != null && e !== !1);
11649
11684
  return /* @__PURE__ */ y(_, { children: [
11650
11685
  (n.length > 0 || t.length > 0) && /* @__PURE__ */ y("div", {
@@ -11666,31 +11701,34 @@ var jr = (e) => {
11666
11701
  })]
11667
11702
  }),
11668
11703
  s.length > 0 && /* @__PURE__ */ v("div", {
11669
- className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${hl(s.length)}`),
11670
- children: s
11704
+ className: "sf-board__kpis-area",
11705
+ children: /* @__PURE__ */ v("div", {
11706
+ className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${gl(s.length)}`),
11707
+ children: s
11708
+ })
11671
11709
  }),
11672
11710
  i,
11673
- a && /* @__PURE__ */ v(gl, { block: a }),
11674
- o && /* @__PURE__ */ v(gl, { block: o })
11711
+ a && /* @__PURE__ */ v(_l, { block: a }),
11712
+ o && /* @__PURE__ */ v(_l, { block: o })
11675
11713
  ] });
11676
- }, vl = ({ children: e, className: t }) => {
11714
+ }, yl = ({ children: e, className: t }) => {
11677
11715
  let n = e.filter(Boolean), r = n.length >= 3 ? 3 : 2;
11678
11716
  return /* @__PURE__ */ v("div", {
11679
11717
  className: (0, X.default)("sf-card-row", `sf-card-row--${r}`, t),
11680
11718
  children: n
11681
11719
  });
11682
- }, yl = (e) => {
11720
+ }, bl = (e) => {
11683
11721
  let [t, n] = h(0), [r, i] = h(e);
11684
11722
  return r !== e && (i(e), n(0)), u(() => {
11685
11723
  if (!e) return;
11686
11724
  let t = Date.now(), r = window.setInterval(() => n(Math.floor((Date.now() - t) / 1e3)), 1e3);
11687
11725
  return () => window.clearInterval(r);
11688
11726
  }, [e]), t;
11689
- }, bl = (e) => new Date(e).toLocaleTimeString("es-PE", {
11727
+ }, xl = (e) => new Date(e).toLocaleTimeString("es-PE", {
11690
11728
  hour: "2-digit",
11691
11729
  minute: "2-digit"
11692
- }), xl = ({ loading: e, updatedAt: t, live: n, cutoffLabel: r, onRefresh: i, refreshLabel: a, slowAfterSeconds: o }) => {
11693
- let s = yl(!!e), c = t ? bl(t) : null, l = c ? `datos de las ${c}` : "";
11730
+ }), Sl = ({ loading: e, updatedAt: t, live: n, cutoffLabel: r, onRefresh: i, refreshLabel: a, slowAfterSeconds: o }) => {
11731
+ let s = bl(!!e), c = t ? xl(t) : null, l = c ? `datos de las ${c}` : "";
11694
11732
  return e ? l = s >= o ? `calculando… ${s} s` : "calculando…" : n && c && (l = `datos en vivo · ${c}`), /* @__PURE__ */ y("div", {
11695
11733
  className: "sf-page-frame__status",
11696
11734
  "aria-live": "polite",
@@ -11714,15 +11752,15 @@ var jr = (e) => {
11714
11752
  })
11715
11753
  ]
11716
11754
  });
11717
- }, Sl = ({ title: e, subtitle: t, range: n, onApply: r, validate: i, error: a = null, loading: o = !1, updatedAt: s = null, live: c = !1, cutoffLabel: l, onRefresh: u, refreshLabel: d = "Actualizar", compareLabel: f = "con el período anterior de igual duración", pendingLabel: p = "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: m = "Aplicar", filterAriaLabel: g = "Filtro del tablero", slowAfterSeconds: _ = 3, className: b, children: x }) => {
11718
- let [S, C] = h(null), w = S && S.base.from === n.from && S.base.to === n.to ? S : null, T = w?.draft ?? n, E = w?.error ?? null, D = (e) => C({
11719
- base: n,
11755
+ }, Cl = ({ title: e, subtitle: t, mode: n = "range", range: r, onApply: i, fromLabel: a = "Desde", toLabel: o = "Hasta", dayLabel: s = "Día de corte", compareFieldLabel: c = n === "day" ? "Nota" : "Comparar", validate: l, error: u = null, loading: d = !1, stale: f = !1, updatedAt: p = null, live: m = !1, cutoffLabel: g, onRefresh: b, refreshLabel: x = "Actualizar", compareLabel: S = n === "day" ? "" : "con el período anterior de igual duración", pendingLabel: C = n === "day" ? "Pulsa «Aplicar» para consultar el nuevo día" : "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: w = "Aplicar", filterAriaLabel: T = "Filtro del tablero", slowAfterSeconds: E = 3, className: D, children: O }) => {
11756
+ let [k, A] = h(null), j = k && k.base.from === r.from && k.base.to === r.to ? k : null, M = j?.draft ?? r, N = j?.error ?? null, P = (e) => A({
11757
+ base: r,
11720
11758
  draft: e,
11721
11759
  error: null
11722
- }), O = T.from !== n.from || T.to !== n.to;
11760
+ }), F = M.from !== r.from || M.to !== r.to;
11723
11761
  return /* @__PURE__ */ v("div", {
11724
- className: b,
11725
- children: /* @__PURE__ */ y(fl, {
11762
+ className: D,
11763
+ children: /* @__PURE__ */ y(pl, {
11726
11764
  header: /* @__PURE__ */ y("div", {
11727
11765
  className: "sf-page-frame__header",
11728
11766
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
@@ -11731,79 +11769,90 @@ var jr = (e) => {
11731
11769
  }), t && /* @__PURE__ */ v("p", {
11732
11770
  className: "sf-page-frame__subtitle",
11733
11771
  children: t
11734
- })] }), /* @__PURE__ */ v(xl, {
11735
- loading: o,
11736
- updatedAt: s,
11737
- live: c,
11738
- cutoffLabel: l,
11739
- onRefresh: u,
11740
- refreshLabel: d,
11741
- slowAfterSeconds: _
11772
+ })] }), /* @__PURE__ */ v(Sl, {
11773
+ loading: d,
11774
+ updatedAt: p,
11775
+ live: m,
11776
+ cutoffLabel: g,
11777
+ onRefresh: b,
11778
+ refreshLabel: x,
11779
+ slowAfterSeconds: E
11742
11780
  })]
11743
11781
  }),
11744
11782
  children: [
11745
11783
  /* @__PURE__ */ y(Aa, {
11746
- ariaLabel: g,
11784
+ ariaLabel: T,
11747
11785
  onApply: () => {
11748
- let e = i ? i(T) : null;
11749
- C({
11750
- base: n,
11751
- draft: T,
11786
+ let e = l ? l(M) : null;
11787
+ A({
11788
+ base: r,
11789
+ draft: M,
11752
11790
  error: e
11753
- }), e || r(T);
11791
+ }), e || i(M);
11754
11792
  },
11755
- applyLabel: m,
11756
- applyLoading: o && !O,
11757
- children: [
11758
- /* @__PURE__ */ v(ja, {
11759
- label: "Desde",
11760
- children: /* @__PURE__ */ v(Ma, {
11761
- value: T.from,
11762
- onChange: (e) => D({
11763
- ...T,
11764
- from: e
11765
- })
11793
+ applyLabel: w,
11794
+ applyLoading: d && !F,
11795
+ children: [n === "day" ? /* @__PURE__ */ v(ja, {
11796
+ label: s,
11797
+ className: "sf-page-frame__day",
11798
+ children: /* @__PURE__ */ v(Ma, {
11799
+ value: M.to,
11800
+ onChange: (e) => P({
11801
+ ...M,
11802
+ to: e
11766
11803
  })
11767
- }),
11768
- /* @__PURE__ */ v(ja, {
11769
- label: "Hasta",
11770
- children: /* @__PURE__ */ v(Ma, {
11771
- value: T.to,
11772
- onChange: (e) => D({
11773
- ...T,
11774
- to: e
11775
- })
11804
+ })
11805
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(ja, {
11806
+ label: a,
11807
+ children: /* @__PURE__ */ v(Ma, {
11808
+ value: M.from,
11809
+ onChange: (e) => P({
11810
+ ...M,
11811
+ from: e
11776
11812
  })
11777
- }),
11778
- /* @__PURE__ */ v(ja, {
11779
- label: "Comparar",
11780
- children: /* @__PURE__ */ v("span", {
11781
- className: "sf-page-frame__compare",
11782
- children: O ? p : f
11813
+ })
11814
+ }), /* @__PURE__ */ v(ja, {
11815
+ label: o,
11816
+ children: /* @__PURE__ */ v(Ma, {
11817
+ value: M.to,
11818
+ onChange: (e) => P({
11819
+ ...M,
11820
+ to: e
11783
11821
  })
11784
11822
  })
11785
- ]
11823
+ })] }), (F ? C : S) && /* @__PURE__ */ v(ja, {
11824
+ label: c,
11825
+ children: /* @__PURE__ */ v("span", {
11826
+ className: "sf-page-frame__compare",
11827
+ children: F ? C : S
11828
+ })
11829
+ })]
11786
11830
  }),
11787
- (E || a) && /* @__PURE__ */ v(ni, {
11831
+ (N || u) && /* @__PURE__ */ v(ni, {
11788
11832
  variant: "warning",
11789
11833
  title: "Rango no válido",
11790
- message: E ?? a
11834
+ message: N ?? u
11791
11835
  }),
11792
- a ? null : x
11836
+ u ? null : /* @__PURE__ */ v("div", {
11837
+ className: "sf-page-frame__content",
11838
+ "data-stale": f ? "" : void 0,
11839
+ "aria-busy": f || void 0,
11840
+ children: O
11841
+ })
11793
11842
  ]
11794
11843
  })
11795
11844
  });
11796
- }, Cl = [
11845
+ }, wl = [
11797
11846
  70,
11798
11847
  55,
11799
11848
  40,
11800
11849
  25
11801
- ], wl = ({ shape: e }) => e === "chart" ? /* @__PURE__ */ v(fi, {
11850
+ ], Tl = ({ shape: e }) => e === "chart" ? /* @__PURE__ */ v(fi, {
11802
11851
  variant: "block",
11803
11852
  height: 220
11804
11853
  }) : /* @__PURE__ */ v("div", {
11805
11854
  className: "sf-placeholder__rows",
11806
- children: Cl.map((t) => /* @__PURE__ */ y("div", {
11855
+ children: wl.map((t) => /* @__PURE__ */ y("div", {
11807
11856
  className: "sf-placeholder__row",
11808
11857
  children: [/* @__PURE__ */ v(fi, {
11809
11858
  variant: "text",
@@ -11814,7 +11863,7 @@ var jr = (e) => {
11814
11863
  width: `${t}%`
11815
11864
  })]
11816
11865
  }, t))
11817
- }), Tl = ({ title: e, shape: t = "kpi", state: n = "loading", errorMessage: r = "No se pudo obtener este dato. Vuelve a intentarlo en unos minutos.", onRetry: i, className: a }) => n === "error" ? /* @__PURE__ */ v(il, {
11866
+ }), El = ({ title: e, shape: t = "kpi", state: n = "loading", errorMessage: r = "No se pudo obtener este dato. Vuelve a intentarlo en unos minutos.", onRetry: i, className: a }) => n === "error" ? /* @__PURE__ */ v(al, {
11818
11867
  title: e,
11819
11868
  headerSize: "md",
11820
11869
  headerDivider: !1,
@@ -11822,7 +11871,7 @@ var jr = (e) => {
11822
11871
  errorMessage: r,
11823
11872
  onRetry: i,
11824
11873
  className: a
11825
- }) : t === "kpi" ? /* @__PURE__ */ v(il, {
11874
+ }) : t === "kpi" ? /* @__PURE__ */ v(al, {
11826
11875
  padding: "lg",
11827
11876
  className: a,
11828
11877
  children: /* @__PURE__ */ y("div", {
@@ -11852,7 +11901,7 @@ var jr = (e) => {
11852
11901
  ]
11853
11902
  })]
11854
11903
  })
11855
- }) : /* @__PURE__ */ v(il, {
11904
+ }) : /* @__PURE__ */ v(al, {
11856
11905
  title: e,
11857
11906
  headerSize: "md",
11858
11907
  headerWrap: !0,
@@ -11861,14 +11910,14 @@ var jr = (e) => {
11861
11910
  children: /* @__PURE__ */ v("div", {
11862
11911
  role: "status",
11863
11912
  "aria-label": `Cargando ${e}`,
11864
- children: /* @__PURE__ */ v(wl, { shape: t })
11913
+ children: /* @__PURE__ */ v(Tl, { shape: t })
11865
11914
  })
11866
- }), El = (e) => {
11915
+ }), Dl = (e) => {
11867
11916
  let t = String(e ?? ""), n = 0;
11868
11917
  for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
11869
11918
  let r = t.slice(n);
11870
11919
  return /^[=+\-@]/.test(r) ? `'${t}` : t;
11871
- }, Dl = (e) => El(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), Ol = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", kl = (e, t) => {
11920
+ }, Ol = (e) => Dl(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), kl = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", Al = (e, t) => {
11872
11921
  if (typeof document > "u") return;
11873
11922
  let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
11874
11923
  <?mso-application progid="Excel.Sheet"?>
@@ -11881,30 +11930,30 @@ var jr = (e) => {
11881
11930
  </Styles>
11882
11931
  <Worksheet ss:Name="Export">
11883
11932
  <Table>
11884
- <Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Dl(e.header)}</Data></Cell>`).join("")}</Row>
11933
+ <Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Ol(e.header)}</Data></Cell>`).join("")}</Row>
11885
11934
  ${e.map((e) => `<Row>${n.map((t) => {
11886
- let n = t.getValue(e), r = Ol(n);
11887
- return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Dl(n)}</Data></Cell>`;
11935
+ let n = t.getValue(e), r = kl(n);
11936
+ return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Ol(n)}</Data></Cell>`;
11888
11937
  }).join("")}</Row>`).join("")}
11889
11938
  </Table>
11890
11939
  </Worksheet>
11891
11940
  </Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
11892
11941
  s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
11893
- }, Al = () => {
11942
+ }, jl = () => {
11894
11943
  let [e, t] = h(null);
11895
11944
  return {
11896
11945
  open: e,
11897
11946
  toggle: (e) => t((t) => t?.id === e.id ? null : e),
11898
11947
  close: () => t(null)
11899
11948
  };
11900
- }, jl = (e, t) => `Mostrando ${e} de ${t} — exporta a Excel para ver la lista completa.`, Ml = (e) => `${e} registro${e === 1 ? "" : "s"}.`, Nl = ({ detail: e, rowMapper: t = (e) => e, subtitle: n = "Registros detrás de la cifra", countLabel: r = (e) => `${e} registros`, previewRows: i = 10, previewNote: a = jl, totalNote: o = Ml, emptyMessage: s = "Sin registros en este caso", closeLabel: c = "Cerrar detalle", exportLabel: l = "Exportar Excel", exportFilename: u = (e, t) => t ? `${e.id}-${t}` : e.id, actions: d }) => {
11949
+ }, Ml = (e, t) => `Mostrando ${e} de ${t} — exporta a Excel para ver la lista completa.`, Nl = (e) => `${e} registro${e === 1 ? "" : "s"}.`, Pl = ({ detail: e, rowMapper: t = (e) => e, subtitle: n = "Registros detrás de la cifra", countLabel: r = (e) => `${e} registros`, previewRows: i = 10, previewNote: a = Ml, totalNote: o = Nl, emptyMessage: s = "Sin registros en este caso", closeLabel: c = "Cerrar detalle", exportLabel: l = "Exportar Excel", exportFilename: u = (e, t) => t ? `${e.id}-${t}` : e.id, actions: d }) => {
11901
11950
  let f = e.open, [p, m] = h(null);
11902
11951
  if (!f) return null;
11903
11952
  let g = p?.specId === f.id ? p.groupId : null, _ = f.groups?.find((e) => e.id === g) ?? f.groups?.[0] ?? null, b = _ ? _.rows : f.rows, x = b.map(t), S = f.columns.map((e) => ({
11904
11953
  accessorKey: e.key,
11905
11954
  header: e.header
11906
11955
  })), C = f.groups ? f.groups.reduce((e, t) => e + t.rows.length, 0) : f.rows.length;
11907
- return /* @__PURE__ */ y(il, {
11956
+ return /* @__PURE__ */ y(al, {
11908
11957
  title: f.title,
11909
11958
  subtitle: n,
11910
11959
  headerAction: /* @__PURE__ */ y("div", {
@@ -11939,20 +11988,23 @@ ${e.map((e) => `<Row>${n.map((t) => {
11939
11988
  label: e.title,
11940
11989
  count: e.rows.length
11941
11990
  }))
11942
- }), _.note && /* @__PURE__ */ v(ml, {
11991
+ }), _.note && /* @__PURE__ */ v(hl, {
11943
11992
  text: _.note,
11944
11993
  className: "sf-detail-panel__group-note"
11945
11994
  })]
11946
11995
  }),
11947
- /* @__PURE__ */ v(kr, {
11948
- data: x.slice(0, i),
11949
- columns: S,
11950
- title: "",
11951
- enableRowSelection: !1,
11952
- enableSorting: !1,
11953
- enableFiltering: !1,
11954
- enablePagination: !1,
11955
- emptyMessage: s
11996
+ /* @__PURE__ */ v("div", {
11997
+ className: "sf-detail-panel__table",
11998
+ children: /* @__PURE__ */ v(kr, {
11999
+ data: x.slice(0, i),
12000
+ columns: S,
12001
+ title: "",
12002
+ enableRowSelection: !1,
12003
+ enableSorting: !1,
12004
+ enableFiltering: !1,
12005
+ enablePagination: !1,
12006
+ emptyMessage: s
12007
+ })
11956
12008
  }),
11957
12009
  /* @__PURE__ */ y("div", {
11958
12010
  className: "sf-detail-panel__footer",
@@ -11971,12 +12023,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
11971
12023
  size: "sm",
11972
12024
  icon: /* @__PURE__ */ v(mt, {}),
11973
12025
  disabled: b.length === 0,
11974
- onClick: () => kl(x, {
12026
+ onClick: () => Al(x, {
11975
12027
  filename: `${u(f, _?.id ?? null)}.xls`,
11976
12028
  columns: f.columns.map((e) => ({
11977
12029
  id: e.key,
11978
12030
  header: e.header,
11979
- getValue: (t) => String(t[e.key] ?? "")
12031
+ getValue: (t) => String(t[e.exportKey ?? e.key] ?? "")
11980
12032
  }))
11981
12033
  }),
11982
12034
  children: l
@@ -11985,8 +12037,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
11985
12037
  })
11986
12038
  ]
11987
12039
  });
11988
- }, Pl = (e) => e != null && (e.rows.length > 0 || (e.groups ?? []).some((e) => e.rows.length > 0)), Fl = ({ label: e, value: t, sublabel: n, icon: r, accentTone: i, primary: a = !1, trend: o = null, trendDirection: s = "neutral", trendLabel: c = "vs. período anterior", detail: l, spec: u }) => {
11989
- let d = Pl(u);
12040
+ }, Fl = (e) => e != null && (e.rows.length > 0 || (e.groups ?? []).some((e) => e.rows.length > 0)), Il = ({ label: e, value: t, sublabel: n, icon: r, accentTone: i, primary: a = !1, trend: o = null, trendDirection: s = "neutral", trendLabel: c = "vs. período anterior", detail: l, spec: u }) => {
12041
+ let d = Fl(u);
11990
12042
  return /* @__PURE__ */ v(As, {
11991
12043
  layout: "leading-icon",
11992
12044
  size: "lg",
@@ -12004,21 +12056,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
12004
12056
  selected: u != null && l.open?.id === u.id,
12005
12057
  onClick: d ? () => l.toggle(u) : void 0
12006
12058
  });
12007
- }, Il = ({ items: e, detail: t, zeroTone: n = "success", emptyMessage: r = "Nada pendiente" }) => {
12059
+ }, Ll = ({ items: e, detail: t, zeroTone: n = "success", emptyMessage: r = "Nada pendiente" }) => {
12008
12060
  let i = e.map((e) => ({
12009
12061
  label: e.label,
12010
12062
  description: e.description,
12011
12063
  value: e.value,
12012
12064
  tone: e.count > 0 ? e.tone : n,
12013
- onClick: Pl(e.spec) ? () => t.toggle(e.spec) : void 0
12065
+ onClick: Fl(e.spec) ? () => t.toggle(e.spec) : void 0
12014
12066
  }));
12015
- return /* @__PURE__ */ v(il, { children: /* @__PURE__ */ v(Yc, {
12067
+ return /* @__PURE__ */ v(al, { children: /* @__PURE__ */ v(Xc, {
12016
12068
  items: i,
12017
12069
  showIcon: !0,
12018
12070
  showChevron: !0,
12019
12071
  emptyMessage: r
12020
12072
  }) });
12021
- }, Ll = ({ items: e, total: t, totalLabel: n, unit: r = "registros", previewCount: i = 5, emptyText: a, onOpen: o, openLabel: s = "Ver detalle" }) => {
12073
+ }, Rl = ({ items: e, total: t, totalLabel: n, unit: r = "registros", previewCount: i = 5, emptyText: a, onOpen: o, openLabel: s = "Ver detalle" }) => {
12022
12074
  if (t === 0) return /* @__PURE__ */ v("p", {
12023
12075
  className: "sf-detail-preview__empty",
12024
12076
  children: a
@@ -12066,7 +12118,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12066
12118
  }) })
12067
12119
  ]
12068
12120
  });
12069
- }, Rl = ({ title: e, icon: t, tone: n = "default", rows: r = [], children: i, className: a, density: o = "md" }) => {
12121
+ }, zl = ({ title: e, icon: t, tone: n = "default", rows: r = [], children: i, className: a, density: o = "md" }) => {
12070
12122
  let s = r.length > 0 || !!i;
12071
12123
  return /* @__PURE__ */ y("section", {
12072
12124
  className: (0, X.default)("sf-detail-section", n !== "default" && `sf-detail-section--${n}`, o === "sm" && "sf-detail-section--sm", a),
@@ -12107,15 +12159,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
12107
12159
  })]
12108
12160
  })]
12109
12161
  });
12110
- }, zl = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), Bl = (e, t) => {
12162
+ }, Bl = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), Vl = (e, t) => {
12111
12163
  let n = ln(String(e ?? ""), t);
12112
12164
  return Array.from({ length: t }, (e, t) => n[t] ?? "");
12113
- }, Vl = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
12165
+ }, Hl = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
12114
12166
  let u = b({
12115
12167
  name: t,
12116
12168
  control: e.control
12117
- }), d = m([]), [f, p] = h(() => Bl(u.field.value, c)), [g, _] = h(u.field.value);
12118
- u.field.value !== g && (_(u.field.value), p(Bl(u.field.value, c)));
12169
+ }), d = m([]), [f, p] = h(() => Vl(u.field.value, c)), [g, _] = h(u.field.value);
12170
+ u.field.value !== g && (_(u.field.value), p(Vl(u.field.value, c)));
12119
12171
  let y = String(t), x = u.fieldState.error?.message ? String(u.fieldState.error.message) : void 0, S = (e) => {
12120
12172
  p(e);
12121
12173
  let t = e.join("");
@@ -12159,7 +12211,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12159
12211
  onBlur: () => u.field.onBlur(),
12160
12212
  onChange: (e) => C(t, e.target.value),
12161
12213
  onKeyDown: (e) => w(t, e),
12162
- className: zl({
12214
+ className: Bl({
12163
12215
  small: o,
12164
12216
  error: !!x,
12165
12217
  disabled: a
@@ -12167,15 +12219,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
12167
12219
  }, t))
12168
12220
  })
12169
12221
  });
12170
- }, Hl = (e) => {
12222
+ }, Ul = (e) => {
12171
12223
  let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
12172
12224
  return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
12173
- }, Ul = ({ 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 }) => {
12225
+ }, Wl = ({ 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 }) => {
12174
12226
  let f = String(e.watch(t) ?? ""), p = (t, r) => {
12175
12227
  if (l === "none") return;
12176
12228
  let i = t.slice(0, 10), a = r.slice(0, 10);
12177
12229
  if (!Mn(i) || !Mn(a) || a >= i) return;
12178
- let o = l === "month-end" ? Hl(i) : i;
12230
+ let o = l === "month-end" ? Ul(i) : i;
12179
12231
  e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
12180
12232
  };
12181
12233
  return /* @__PURE__ */ y("div", {
@@ -12200,16 +12252,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
12200
12252
  onChange: (n) => p(String(e.getValues(t) ?? ""), n)
12201
12253
  })]
12202
12254
  });
12203
- }, Wl = (e) => /* @__PURE__ */ v(Rn, {
12255
+ }, Gl = (e) => /* @__PURE__ */ v(Rn, {
12204
12256
  ...e,
12205
12257
  utc: !0
12206
- }), Gl = () => ({
12258
+ }), Kl = () => ({
12207
12259
  start: "",
12208
12260
  end: ""
12209
- }), Kl = () => ({
12261
+ }), ql = () => ({
12210
12262
  start: "",
12211
12263
  end: ""
12212
- }), ql = 0, Jl = () => (ql += 1, `photo_${Date.now()}_${ql}`), Yl = (e, t) => {
12264
+ }), Jl = 0, Yl = () => (Jl += 1, `photo_${Date.now()}_${Jl}`), Xl = (e, t) => {
12213
12265
  if (!t || t === "*") return !0;
12214
12266
  let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
12215
12267
  return n.some((e) => {
@@ -12221,20 +12273,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
12221
12273
  }
12222
12274
  return i === t;
12223
12275
  });
12224
- }, Xl = (e, t = !1) => new Promise((n) => {
12276
+ }, Zl = (e, t = !1) => new Promise((n) => {
12225
12277
  let r = document.createElement("input");
12226
12278
  r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
12227
12279
  n(Array.from(r.files ?? [])), r.remove();
12228
12280
  }, document.body.appendChild(r), r.click();
12229
- }), Zl = (e) => ({
12230
- id: Jl(),
12281
+ }), Ql = (e) => ({
12282
+ id: Yl(),
12231
12283
  preview: URL.createObjectURL(e),
12232
12284
  file: e
12233
- }), Ql = (e) => {
12285
+ }), $l = (e) => {
12234
12286
  URL.revokeObjectURL(e.preview);
12235
- }, $l = (e) => {
12236
- e.forEach(Ql);
12237
- }, eu = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], tu = (e, t = .92) => new Promise((n, r) => {
12287
+ }, eu = (e) => {
12288
+ e.forEach($l);
12289
+ }, tu = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], nu = (e, t = .92) => new Promise((n, r) => {
12238
12290
  let i = URL.createObjectURL(e), a = new Image();
12239
12291
  a.onload = () => {
12240
12292
  let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
@@ -12257,7 +12309,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12257
12309
  }, a.onerror = () => {
12258
12310
  URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
12259
12311
  }, a.src = i;
12260
- }), nu = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, ru = (e) => `${e.name}-${e.lastModified}-${e.size}`, iu = ({ 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: _ }) => {
12312
+ }), ru = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, iu = (e) => `${e.name}-${e.lastModified}-${e.size}`, au = ({ 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: _ }) => {
12261
12313
  let x = m(null), S = b({
12262
12314
  name: t,
12263
12315
  control: e.control
@@ -12266,7 +12318,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12266
12318
  return e ? Array.isArray(e) ? e : [e] : [];
12267
12319
  })(), L = async (e) => {
12268
12320
  if (g) for (let t of e) {
12269
- let e = ru(t);
12321
+ let e = iu(t);
12270
12322
  O((t) => new Set(t).add(e)), E((t) => ({
12271
12323
  ...t,
12272
12324
  [e]: 0
@@ -12291,7 +12343,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12291
12343
  }
12292
12344
  }
12293
12345
  }, R = (e) => {
12294
- let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && Yl(e, a)), r = e.length - n.length;
12346
+ let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && Xl(e, a)), r = e.length - n.length;
12295
12347
  if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
12296
12348
  let e = [...I, ...n];
12297
12349
  S.field.onChange(e), p?.(e), L(n);
@@ -12345,7 +12397,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12345
12397
  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"),
12346
12398
  children: [/* @__PURE__ */ v("span", {
12347
12399
  className: "sf-file-drop__title",
12348
- children: C ? "Suelta aquí" : c ?? nu(I)
12400
+ children: C ? "Suelta aquí" : c ?? ru(I)
12349
12401
  }), /* @__PURE__ */ y("span", {
12350
12402
  className: "sf-file-drop__hint",
12351
12403
  children: [
@@ -12360,7 +12412,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12360
12412
  className: "sf-file-list",
12361
12413
  "aria-label": "Archivos seleccionados",
12362
12414
  children: I.map((e) => {
12363
- let t = ru(e), n = T[t], r = D.has(t);
12415
+ let t = iu(e), n = T[t], r = D.has(t);
12364
12416
  return /* @__PURE__ */ y("li", {
12365
12417
  className: "sf-file-list__item",
12366
12418
  children: [/* @__PURE__ */ y("span", {
@@ -12389,7 +12441,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12389
12441
  ]
12390
12442
  })
12391
12443
  });
12392
- }, au = ({ 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: _ }) => {
12444
+ }, ou = ({ 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: _ }) => {
12393
12445
  let x = m(null), S = b({
12394
12446
  name: t,
12395
12447
  control: e.control
@@ -12479,7 +12531,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12479
12531
  ]
12480
12532
  })
12481
12533
  });
12482
- }, ou = ({ 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 }) => {
12534
+ }, su = ({ 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 }) => {
12483
12535
  let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
12484
12536
  name: t,
12485
12537
  control: e.control
@@ -12571,11 +12623,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
12571
12623
  })]
12572
12624
  })
12573
12625
  });
12574
- }, su = ({ 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 }) => {
12626
+ }, cu = ({ 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 }) => {
12575
12627
  let S = m(null), C = b({
12576
12628
  name: t,
12577
12629
  control: e.control
12578
- }), 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(() => eu(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
12630
+ }), 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(() => tu(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
12579
12631
  k,
12580
12632
  a,
12581
12633
  A.length
@@ -12583,7 +12635,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12583
12635
  u(() => {
12584
12636
  N.current = A;
12585
12637
  }, [A]), u(() => () => {
12586
- for (let e of N.current) Ql(e);
12638
+ for (let e of N.current) $l(e);
12587
12639
  }, []);
12588
12640
  let P = s((e) => {
12589
12641
  C.field.onChange(e), _?.(e);
@@ -12598,7 +12650,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12598
12650
  D(`Hay imágenes que superan ${o} MB.`);
12599
12651
  return;
12600
12652
  }
12601
- let r = a - A.length, i = n.slice(0, r).map((e) => Zl(e));
12653
+ let r = a - A.length, i = n.slice(0, r).map((e) => Ql(e));
12602
12654
  if (n.length > r) {
12603
12655
  D(`Solo puedes agregar ${r} imagen(es) más.`);
12604
12656
  return;
@@ -12611,7 +12663,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12611
12663
  A
12612
12664
  ]), I = s((e) => {
12613
12665
  let t = A.find((t) => t.id === e);
12614
- t && Ql(t), P(A.filter((t) => t.id !== e));
12666
+ t && $l(t), P(A.filter((t) => t.id !== e));
12615
12667
  }, [P, A]);
12616
12668
  return /* @__PURE__ */ v(Z, {
12617
12669
  id: w,
@@ -12683,19 +12735,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
12683
12735
  ]
12684
12736
  })
12685
12737
  });
12686
- }, cu = (e) => {
12738
+ }, lu = (e) => {
12687
12739
  switch (e.kind) {
12688
- case "photo": return /* @__PURE__ */ v(au, { ...e });
12689
- case "multiPhoto": return /* @__PURE__ */ v(su, { ...e });
12690
- case "signature": return /* @__PURE__ */ v(ou, { ...e });
12740
+ case "photo": return /* @__PURE__ */ v(ou, { ...e });
12741
+ case "multiPhoto": return /* @__PURE__ */ v(cu, { ...e });
12742
+ case "signature": return /* @__PURE__ */ v(su, { ...e });
12691
12743
  case "file": return /* @__PURE__ */ v(Un, { ...e });
12692
12744
  default: return null;
12693
12745
  }
12694
- }, lu = (e) => new Promise((t, n) => {
12746
+ }, uu = (e) => new Promise((t, n) => {
12695
12747
  let r = new Image();
12696
12748
  r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
12697
- }), uu = async (e, t, n, r = "image/jpeg") => {
12698
- let i = await lu(e), a = document.createElement("canvas");
12749
+ }), du = async (e, t, n, r = "image/jpeg") => {
12750
+ let i = await uu(e), a = document.createElement("canvas");
12699
12751
  a.width = t.width, a.height = t.height;
12700
12752
  let o = a.getContext("2d");
12701
12753
  if (!o) throw Error("Canvas no disponible");
@@ -12708,7 +12760,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12708
12760
  e(new File([i], n, { type: r }));
12709
12761
  }, r, .92);
12710
12762
  });
12711
- }, du = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
12763
+ }, fu = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
12712
12764
  let [o, c] = h({
12713
12765
  x: 0,
12714
12766
  y: 0
@@ -12719,7 +12771,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12719
12771
  m(!0);
12720
12772
  try {
12721
12773
  let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
12722
- i(await uu(e, d, t, n));
12774
+ i(await du(e, d, t, n));
12723
12775
  } finally {
12724
12776
  m(!1);
12725
12777
  }
@@ -12770,7 +12822,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12770
12822
  })
12771
12823
  ]
12772
12824
  });
12773
- }, fu = ({ 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 }) => {
12825
+ }, pu = ({ 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 }) => {
12774
12826
  let S = m(null), C = b({
12775
12827
  name: t,
12776
12828
  control: e.control
@@ -12799,7 +12851,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12799
12851
  }
12800
12852
  T(!0);
12801
12853
  try {
12802
- let t = await tu(e);
12854
+ let t = await nu(e);
12803
12855
  I(t);
12804
12856
  } finally {
12805
12857
  T(!1);
@@ -12891,7 +12943,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12891
12943
  role: "dialog",
12892
12944
  "aria-modal": "true",
12893
12945
  "aria-label": "Editor de recorte",
12894
- children: /* @__PURE__ */ v(du, {
12946
+ children: /* @__PURE__ */ v(fu, {
12895
12947
  imageUrl: E.url,
12896
12948
  fileName: E.fileName,
12897
12949
  aspect: c,
@@ -12903,7 +12955,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12903
12955
  })]
12904
12956
  })]
12905
12957
  });
12906
- }, pu = () => [], mu = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
12958
+ }, mu = () => [], hu = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
12907
12959
  className: (0, X.default)("sf-neutral-map-frame", n),
12908
12960
  children: [(e || t) && /* @__PURE__ */ y("div", {
12909
12961
  className: "sf-neutral-map-frame__header",
@@ -12915,11 +12967,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
12915
12967
  children: t
12916
12968
  })]
12917
12969
  }), r]
12918
- }), hu = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
12970
+ }), gu = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
12919
12971
  className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
12920
12972
  role: e === "error" ? "alert" : "status",
12921
12973
  children: t
12922
- }), gu = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
12974
+ }), _u = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
12923
12975
  className: (0, X.default)("sf-map-legend", t),
12924
12976
  role: "list",
12925
12977
  "aria-label": "Leyenda del mapa",
@@ -12946,7 +12998,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12946
12998
  })
12947
12999
  ]
12948
13000
  }, t))
12949
- }), _u = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
13001
+ }), vu = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
12950
13002
  className: (0, X.default)("sf-map-toolbar", i),
12951
13003
  children: [
12952
13004
  /* @__PURE__ */ y("div", {
@@ -12984,7 +13036,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
12984
13036
  children: /* @__PURE__ */ v(lt, { "aria-hidden": "true" })
12985
13037
  })
12986
13038
  ]
12987
- }), vu = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
13039
+ }), yu = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
12988
13040
  className: (0, X.default)("sf-map-vehicle-popup", a && "sf-map-vehicle-popup--interactive", o),
12989
13041
  onClick: a,
12990
13042
  onKeyDown: (e) => {
@@ -13024,7 +13076,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13024
13076
  ]
13025
13077
  })
13026
13078
  ]
13027
- }), yu = ({ title: e = "Lo que encontré aquí", items: t, loading: n, error: r, warning: i, onClose: a, className: o }) => {
13079
+ }), bu = ({ title: e = "Lo que encontré aquí", items: t, loading: n, error: r, warning: i, onClose: a, className: o }) => {
13028
13080
  let s = t.filter((e) => e.value !== void 0 && e.value !== null && e.value !== "");
13029
13081
  return /* @__PURE__ */ y("section", {
13030
13082
  className: (0, X.default)("sf-map-point-card", o),
@@ -13078,51 +13130,51 @@ ${e.map((e) => `<Row>${n.map((t) => {
13078
13130
  })
13079
13131
  ]
13080
13132
  });
13081
- }, bu = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", xu = {
13133
+ }, xu = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", Su = {
13082
13134
  lat: -12.0464,
13083
13135
  lng: -77.0428
13084
- }, Su = 13, Cu = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", wu = "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Tu = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", Eu = "Imagen &copy; <a href=\"https://www.esri.com\" target=\"_blank\" rel=\"noreferrer\">Esri</a>, Maxar, Earthstar Geographics", Du = {
13136
+ }, Cu = 13, wu = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Tu = "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Eu = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", Du = "Imagen &copy; <a href=\"https://www.esri.com\" target=\"_blank\" rel=\"noreferrer\">Esri</a>, Maxar, Earthstar Geographics", Ou = {
13085
13137
  drawing: "basic",
13086
13138
  streetView: "none",
13087
13139
  clustering: "none",
13088
13140
  heatmap: "none"
13089
- }, Ou = {
13141
+ }, ku = {
13090
13142
  drawing: "basic",
13091
13143
  streetView: "interactive",
13092
13144
  clustering: "client",
13093
13145
  heatmap: "weighted"
13094
- }, ku = "sf-google-maps-script", Au = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
13146
+ }, Au = "sf-google-maps-script", ju = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
13095
13147
  let i = new URLSearchParams({
13096
13148
  key: e,
13097
13149
  language: t,
13098
13150
  region: n
13099
13151
  });
13100
13152
  return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
13101
- }, ju = (e) => {
13153
+ }, Mu = (e) => {
13102
13154
  let t = window;
13103
13155
  return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
13104
- let i = document.getElementById(ku);
13156
+ let i = document.getElementById(Au);
13105
13157
  if (i) {
13106
13158
  i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
13107
13159
  return;
13108
13160
  }
13109
13161
  let a = document.createElement("script");
13110
- a.id = ku, a.src = Au(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);
13162
+ a.id = Au, a.src = ju(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);
13111
13163
  }), t.__sfGoogleMapsPromise);
13112
- }, Mu = (e, t = "") => {
13164
+ }, Nu = (e, t = "") => {
13113
13165
  let n = e.match(/^var\((--[^,)]+)\)$/);
13114
13166
  return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
13115
- }, Nu = 111320, Pu = (e) => ({
13116
- dLat: e.radiusM / Nu,
13117
- dLng: e.radiusM / (Nu * Math.cos(e.center.lat * Math.PI / 180))
13118
- }), Fu = (e) => {
13119
- let { dLat: t, dLng: n } = Pu(e);
13167
+ }, Pu = 111320, Fu = (e) => ({
13168
+ dLat: e.radiusM / Pu,
13169
+ dLng: e.radiusM / (Pu * Math.cos(e.center.lat * Math.PI / 180))
13170
+ }), Iu = (e) => {
13171
+ let { dLat: t, dLng: n } = Fu(e);
13120
13172
  return {
13121
13173
  lat: e.center.lat - t * .62,
13122
13174
  lng: e.center.lng + n * .62
13123
13175
  };
13124
- }, Iu = (e, t = 72) => {
13125
- let { dLat: n, dLng: r } = Pu(e);
13176
+ }, Lu = (e, t = 72) => {
13177
+ let { dLat: n, dLng: r } = Fu(e);
13126
13178
  return Array.from({ length: t + 1 }, (i, a) => {
13127
13179
  let o = a / t * 2 * Math.PI;
13128
13180
  return {
@@ -13130,42 +13182,42 @@ ${e.map((e) => `<Row>${n.map((t) => {
13130
13182
  lng: e.center.lng + r * Math.cos(o)
13131
13183
  };
13132
13184
  });
13133
- }, Lu = (e, t) => ({
13185
+ }, Ru = (e, t) => ({
13134
13186
  map: t,
13135
13187
  paths: e.points,
13136
- strokeColor: e.color ?? Mu("var(--sf-map-area-stroke)"),
13137
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-area-fill)"),
13188
+ strokeColor: e.color ?? Nu("var(--sf-map-area-stroke)"),
13189
+ fillColor: e.fillColor ?? e.color ?? Nu("var(--sf-map-area-fill)"),
13138
13190
  fillOpacity: .14,
13139
13191
  strokeWeight: 2.5
13140
- }), Ru = (e, t) => ({
13192
+ }), zu = (e, t) => ({
13141
13193
  map: t,
13142
13194
  path: e.points,
13143
- strokeColor: e.color ?? Mu("var(--sf-map-route-stroke)"),
13195
+ strokeColor: e.color ?? Nu("var(--sf-map-route-stroke)"),
13144
13196
  strokeWeight: 3.5
13145
- }), zu = (e, t) => ({
13197
+ }), Bu = (e, t) => ({
13146
13198
  map: t,
13147
13199
  center: e.center,
13148
13200
  radius: e.radiusM,
13149
- strokeColor: e.color ?? Mu("var(--sf-map-circle-stroke)"),
13150
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-circle-fill)"),
13201
+ strokeColor: e.color ?? Nu("var(--sf-map-circle-stroke)"),
13202
+ fillColor: e.fillColor ?? e.color ?? Nu("var(--sf-map-circle-fill)"),
13151
13203
  fillOpacity: .16,
13152
13204
  strokeWeight: 2,
13153
13205
  clickable: !1
13154
- }), Bu = (e) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}`, Vu = (e) => Bu(`<svg xmlns="http://www.w3.org/2000/svg" width="30" height="40" viewBox="0 0 24 32"><path fill="${e}" d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6" fill="#fff"/></svg>`), Hu = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Uu = (e, t) => {
13155
- let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${Hu(t)}</text>` : "";
13206
+ }), Vu = (e) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}`, Hu = (e) => Vu(`<svg xmlns="http://www.w3.org/2000/svg" width="30" height="40" viewBox="0 0 24 32"><path fill="${e}" d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6" fill="#fff"/></svg>`), Uu = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Wu = (e, t) => {
13207
+ let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${Uu(t)}</text>` : "";
13156
13208
  return {
13157
13209
  size: n,
13158
- url: Bu(`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}"><circle cx="${n / 2}" cy="${n / 2}" r="${r}" fill="${e}" stroke="#fff" stroke-width="2"/>${i}</svg>`)
13210
+ url: Vu(`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}"><circle cx="${n / 2}" cy="${n / 2}" r="${r}" fill="${e}" stroke="#fff" stroke-width="2"/>${i}</svg>`)
13159
13211
  };
13160
- }, Wu = Bu("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>"), Gu = (e, t, n, r) => {
13161
- let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ? Uu(e.color ?? (Mu("var(--sf-map-pin-bg)") || "#16a34a"), e.options?.text) : null;
13212
+ }, Gu = Vu("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>"), Ku = (e, t, n, r) => {
13213
+ let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ? Wu(e.color ?? (Nu("var(--sf-map-pin-bg)") || "#16a34a"), e.options?.text) : null;
13162
13214
  return {
13163
13215
  map: t,
13164
13216
  position: e.position,
13165
13217
  title: e.title ?? e.label,
13166
13218
  draggable: !n && e.options?.draggable,
13167
13219
  icon: i ? {
13168
- url: Vu(e.color ?? (Mu("var(--sf-map-pin-bg)") || "#16a34a")),
13220
+ url: Hu(e.color ?? (Nu("var(--sf-map-pin-bg)") || "#16a34a")),
13169
13221
  scaledSize: new r.Size(30, 40),
13170
13222
  anchor: new r.Point(15, 40),
13171
13223
  labelOrigin: new r.Point(15, -14)
@@ -13183,7 +13235,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13183
13235
  fontWeight: "600"
13184
13236
  } : i || s || !e.label ? void 0 : e.label.slice(0, 1).toUpperCase()
13185
13237
  };
13186
- }, Ku = ({ config: e, center: t = xu, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], circles: o = [], mapType: s = "roadmap", view: c, onViewChange: l, zoomControl: d = !0, height: f = 320, className: p, readOnly: g, onClick: _, onMarkerClick: y, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13238
+ }, qu = ({ config: e, center: t = Su, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], circles: o = [], mapType: s = "roadmap", view: c, onViewChange: l, zoomControl: d = !0, height: f = 320, className: p, readOnly: g, onClick: _, onMarkerClick: y, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13187
13239
  let C = m(null), w = m(null), T = m(/* @__PURE__ */ new Map()), E = m(/* @__PURE__ */ new Map()), D = m(/* @__PURE__ */ new Map()), O = m(/* @__PURE__ */ new Map()), k = m(l);
13188
13240
  u(() => {
13189
13241
  k.current = l;
@@ -13220,9 +13272,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
13220
13272
  return;
13221
13273
  }
13222
13274
  let t = !1;
13223
- return P("loading"), ju(e).then((n) => {
13275
+ return P("loading"), Mu(e).then((n) => {
13224
13276
  t || !C.current || !n.maps?.Map || (w.current = new n.maps.Map(C.current, {
13225
- center: xu,
13277
+ center: Su,
13226
13278
  zoom: 13,
13227
13279
  mapId: e.mapId,
13228
13280
  disableDefaultUI: g,
@@ -13264,16 +13316,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
13264
13316
  }, [N]), u(() => {
13265
13317
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13266
13318
  let t = !1;
13267
- return ju(e).then((e) => {
13319
+ return Mu(e).then((e) => {
13268
13320
  let n = e.maps;
13269
13321
  t || !n?.Circle || (O.current.forEach((e) => e.forEach((e) => e.setMap?.(null))), O.current.clear(), o.forEach((e) => {
13270
- let t = w.current, r = e.color ?? Mu("var(--sf-map-circle-stroke)"), i = [new n.Circle({
13271
- ...zu(e, t),
13322
+ let t = w.current, r = e.color ?? Nu("var(--sf-map-circle-stroke)"), i = [new n.Circle({
13323
+ ...Bu(e, t),
13272
13324
  strokeOpacity: +!e.dashed
13273
13325
  })];
13274
13326
  e.dashed && i.push(new n.Polyline({
13275
13327
  map: t,
13276
- path: Iu(e),
13328
+ path: Lu(e),
13277
13329
  clickable: !1,
13278
13330
  strokeOpacity: 0,
13279
13331
  icons: [{
@@ -13289,11 +13341,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
13289
13341
  }]
13290
13342
  })), e.label && n.Point && i.push(new n.Marker({
13291
13343
  map: t,
13292
- position: Fu(e),
13344
+ position: Iu(e),
13293
13345
  clickable: !1,
13294
13346
  zIndex: 5,
13295
13347
  icon: {
13296
- url: Wu,
13348
+ url: Gu,
13297
13349
  labelOrigin: new n.Point(0, 0)
13298
13350
  },
13299
13351
  label: {
@@ -13321,7 +13373,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13321
13373
  }, []), u(() => {
13322
13374
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13323
13375
  let t = !1;
13324
- return ju(e).then((e) => {
13376
+ return Mu(e).then((e) => {
13325
13377
  if (t || !e.maps?.Marker) return;
13326
13378
  let n = new Set(r.map((e) => e.id));
13327
13379
  T.current.forEach((e, t) => {
@@ -13330,10 +13382,10 @@ ${e.map((e) => `<Row>${n.map((t) => {
13330
13382
  E.current.set(t.id, t);
13331
13383
  let n = T.current.get(t.id);
13332
13384
  if (n) {
13333
- n.marker.setPosition?.(t.position), n.marker.setOptions?.(Gu(t, w.current, g, e.maps));
13385
+ n.marker.setPosition?.(t.position), n.marker.setOptions?.(Ku(t, w.current, g, e.maps));
13334
13386
  return;
13335
13387
  }
13336
- let r = new e.maps.Marker(Gu(t, w.current, g, e.maps)), i = () => E.current.get(t.id) ?? t, a = [
13388
+ let r = new e.maps.Marker(Ku(t, w.current, g, e.maps)), i = () => E.current.get(t.id) ?? t, a = [
13337
13389
  r.addListener?.("click", () => {
13338
13390
  A.current.onMarkerClick?.({ marker: i() });
13339
13391
  }),
@@ -13377,7 +13429,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13377
13429
  ]), u(() => {
13378
13430
  if (N !== "ready" || !e?.apiKey || !w.current) return;
13379
13431
  let t = !1;
13380
- return ju(e).then((e) => {
13432
+ return Mu(e).then((e) => {
13381
13433
  if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
13382
13434
  let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
13383
13435
  D.current.forEach((e, t) => {
@@ -13385,22 +13437,22 @@ ${e.map((e) => `<Row>${n.map((t) => {
13385
13437
  }), a.forEach((t) => {
13386
13438
  let n = `area:${t.id}`, r = D.current.get(n);
13387
13439
  if (r?.kind === "area") {
13388
- r.shape.setPaths?.(t.points), r.shape.setOptions?.(Lu(t, w.current));
13440
+ r.shape.setPaths?.(t.points), r.shape.setOptions?.(Ru(t, w.current));
13389
13441
  return;
13390
13442
  }
13391
13443
  r?.shape.setMap?.(null), D.current.set(n, {
13392
13444
  kind: "area",
13393
- shape: new e.maps.Polygon(Lu(t, w.current))
13445
+ shape: new e.maps.Polygon(Ru(t, w.current))
13394
13446
  });
13395
13447
  }), i.forEach((t) => {
13396
13448
  let n = `route:${t.id}`, r = D.current.get(n);
13397
13449
  if (r?.kind === "route") {
13398
- r.shape.setPath?.(t.points), r.shape.setOptions?.(Ru(t, w.current));
13450
+ r.shape.setPath?.(t.points), r.shape.setOptions?.(zu(t, w.current));
13399
13451
  return;
13400
13452
  }
13401
13453
  r?.shape.setMap?.(null), D.current.set(n, {
13402
13454
  kind: "route",
13403
- shape: new e.maps.Polyline(Ru(t, w.current))
13455
+ shape: new e.maps.Polyline(zu(t, w.current))
13404
13456
  });
13405
13457
  });
13406
13458
  }), () => {
@@ -13414,7 +13466,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13414
13466
  ]), u(() => {
13415
13467
  if (N !== "ready" || !e?.apiKey || !w.current || !_ || g) return;
13416
13468
  let t = !1, n;
13417
- return ju(e).then(() => {
13469
+ return Mu(e).then(() => {
13418
13470
  let e = w.current;
13419
13471
  t || !e?.addListener || (n = e.addListener("click", (e) => {
13420
13472
  e.latLng && (e.placeId && e.stop?.(), _({
@@ -13446,25 +13498,25 @@ ${e.map((e) => `<Row>${n.map((t) => {
13446
13498
  "aria-busy": N !== "ready" || void 0
13447
13499
  })
13448
13500
  });
13449
- }, qu = (e) => ({
13501
+ }, Ju = (e) => ({
13450
13502
  id: "google",
13451
- capabilities: Ou,
13452
- createRenderer: () => (t) => /* @__PURE__ */ v(Ku, {
13503
+ capabilities: ku,
13504
+ createRenderer: () => (t) => /* @__PURE__ */ v(qu, {
13453
13505
  ...t,
13454
13506
  config: e
13455
13507
  })
13456
- }), Ju = (e) => [e.lat, e.lng], Yu = (e) => oe.divIcon({
13508
+ }), Yu = (e) => [e.lat, e.lng], Xu = (e) => oe.divIcon({
13457
13509
  className: "",
13458
13510
  html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
13459
13511
  iconSize: [18, 18],
13460
13512
  iconAnchor: [9, 9]
13461
- }), Xu = (e) => oe.divIcon({
13513
+ }), Zu = (e) => oe.divIcon({
13462
13514
  className: "",
13463
13515
  html: `<div class="sf-map-pin" style="${e ? `--sf-map-pin-bg:${e};` : ""}"><svg viewBox="0 0 24 32" aria-hidden="true"><path d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6"/></svg></div>`,
13464
13516
  iconSize: [30, 40],
13465
13517
  iconAnchor: [15, 40],
13466
13518
  tooltipAnchor: [0, -40]
13467
- }), Zu = (e, t) => {
13519
+ }), Qu = (e, t) => {
13468
13520
  let n = t ? 26 : 14;
13469
13521
  return oe.divIcon({
13470
13522
  className: "",
@@ -13473,12 +13525,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
13473
13525
  iconAnchor: [n / 2, n / 2],
13474
13526
  tooltipAnchor: [0, -n / 2]
13475
13527
  });
13476
- }, Qu = (e) => e.options?.variant === "pin" ? Xu(e.color) : e.options?.variant === "badge" ? Zu(e.color, e.options.text) : Yu(e.color), $u = (e) => oe.divIcon({
13528
+ }, $u = (e) => e.options?.variant === "pin" ? Zu(e.color) : e.options?.variant === "badge" ? Qu(e.color, e.options.text) : Xu(e.color), ed = (e) => oe.divIcon({
13477
13529
  className: "",
13478
13530
  html: `<span class="sf-map-circle-label">${e.replace(/</g, "&lt;")}</span>`,
13479
13531
  iconSize: void 0,
13480
13532
  iconAnchor: [0, 0]
13481
- }), ed = ({ readOnly: e, onClick: t, onViewChange: n }) => (ae({
13533
+ }), td = ({ readOnly: e, onClick: t, onViewChange: n }) => (ae({
13482
13534
  click(n) {
13483
13535
  e || t?.({ location: {
13484
13536
  lat: n.latlng.lat,
@@ -13496,27 +13548,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
13496
13548
  zoom: t.getZoom()
13497
13549
  });
13498
13550
  }
13499
- }), null), td = (e, t) => {
13551
+ }), null), nd = (e, t) => {
13500
13552
  let n = e.getCenter();
13501
13553
  return e.getZoom() === t.zoom && Math.abs(n.lat - t.center.lat) < 1e-7 && Math.abs(n.lng - t.center.lng) < 1e-7;
13502
- }, nd = ({ view: e }) => {
13554
+ }, rd = ({ view: e }) => {
13503
13555
  let t = U();
13504
13556
  return u(() => {
13505
- !e || td(t, e) || t.setView(Ju(e.center), e.zoom);
13557
+ !e || nd(t, e) || t.setView(Yu(e.center), e.zoom);
13506
13558
  }, [t, e]), null;
13507
- }, rd = () => {
13559
+ }, id = () => {
13508
13560
  let e = U();
13509
13561
  return u(() => {
13510
13562
  if (typeof ResizeObserver > "u") return;
13511
13563
  let t = new ResizeObserver(() => e.invalidateSize());
13512
13564
  return t.observe(e.getContainer()), () => t.disconnect();
13513
13565
  }, [e]), null;
13514
- }, id = ({ center: e = xu, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], circles: a = [], mapType: o = "roadmap", view: s, onViewChange: c, zoomControl: l = !0, height: u = 320, className: d, readOnly: f, tileUrl: m = Cu, attribution: h = wu, onClick: g, onMarkerClick: _, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13515
- let C = Lo(), w = p(() => Ju(s?.center ?? e), [s?.center, e]), T = typeof u == "number" ? { height: `${u}px` } : { height: u }, E = o === "satellite";
13566
+ }, ad = ({ center: e = Su, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], circles: a = [], mapType: o = "roadmap", view: s, onViewChange: c, zoomControl: l = !0, height: u = 320, className: d, readOnly: f, tileUrl: m = wu, attribution: h = Tu, onClick: g, onMarkerClick: _, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
13567
+ let C = Lo(), w = p(() => Yu(s?.center ?? e), [s?.center, e]), T = typeof u == "number" ? { height: `${u}px` } : { height: u }, E = o === "satellite";
13516
13568
  return C ? /* @__PURE__ */ v("div", {
13517
13569
  className: d,
13518
13570
  style: T,
13519
- children: /* @__PURE__ */ y(te, {
13571
+ children: /* @__PURE__ */ y(V, {
13520
13572
  center: w,
13521
13573
  zoom: s?.zoom ?? t,
13522
13574
  scrollWheelZoom: !f,
@@ -13524,54 +13576,54 @@ ${e.map((e) => `<Row>${n.map((t) => {
13524
13576
  zoomControl: l,
13525
13577
  className: "sf-map-frame",
13526
13578
  children: [
13527
- /* @__PURE__ */ v(V, {
13528
- attribution: E ? Eu : h,
13529
- url: E ? Tu : m
13579
+ /* @__PURE__ */ v(H, {
13580
+ attribution: E ? Du : h,
13581
+ url: E ? Eu : m
13530
13582
  }, E ? "satellite" : "roadmap"),
13531
- /* @__PURE__ */ v(ed, {
13583
+ /* @__PURE__ */ v(td, {
13532
13584
  readOnly: f,
13533
13585
  onClick: g,
13534
13586
  onViewChange: c
13535
13587
  }),
13536
- /* @__PURE__ */ v(nd, { view: s }),
13537
- /* @__PURE__ */ v(rd, {}),
13538
- i.map((e) => /* @__PURE__ */ v(re, {
13539
- positions: e.points.map(Ju),
13588
+ /* @__PURE__ */ v(rd, { view: s }),
13589
+ /* @__PURE__ */ v(id, {}),
13590
+ i.map((e) => /* @__PURE__ */ v(ne, {
13591
+ positions: e.points.map(Yu),
13540
13592
  pathOptions: {
13541
- color: e.color ?? Mu("var(--sf-map-area-stroke)"),
13542
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-area-fill)"),
13593
+ color: e.color ?? Nu("var(--sf-map-area-stroke)"),
13594
+ fillColor: e.fillColor ?? e.color ?? Nu("var(--sf-map-area-fill)"),
13543
13595
  fillOpacity: .14,
13544
13596
  weight: 2.5
13545
13597
  }
13546
13598
  }, e.id)),
13547
13599
  a.map((e) => /* @__PURE__ */ v(ee, {
13548
- center: Ju(e.center),
13600
+ center: Yu(e.center),
13549
13601
  radius: e.radiusM,
13550
13602
  bubblingMouseEvents: !1,
13551
13603
  pathOptions: {
13552
- color: e.color ?? Mu("var(--sf-map-circle-stroke)"),
13553
- fillColor: e.fillColor ?? e.color ?? Mu("var(--sf-map-circle-fill)"),
13604
+ color: e.color ?? Nu("var(--sf-map-circle-stroke)"),
13605
+ fillColor: e.fillColor ?? e.color ?? Nu("var(--sf-map-circle-fill)"),
13554
13606
  fillOpacity: .16,
13555
13607
  weight: 2,
13556
13608
  dashArray: e.dashed ? "6 6" : void 0
13557
13609
  }
13558
13610
  }, e.id)),
13559
- a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(ne, {
13560
- position: Ju(Fu(e)),
13561
- icon: $u(e.label ?? ""),
13611
+ a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(te, {
13612
+ position: Yu(Iu(e)),
13613
+ icon: ed(e.label ?? ""),
13562
13614
  interactive: !1,
13563
13615
  keyboard: !1
13564
13616
  }, `${e.id}-label`)),
13565
- r.map((e) => /* @__PURE__ */ v(ie, {
13566
- positions: e.points.map(Ju),
13617
+ r.map((e) => /* @__PURE__ */ v(re, {
13618
+ positions: e.points.map(Yu),
13567
13619
  pathOptions: {
13568
- color: e.color ?? Mu("var(--sf-map-route-stroke)"),
13620
+ color: e.color ?? Nu("var(--sf-map-route-stroke)"),
13569
13621
  weight: 3.5
13570
13622
  }
13571
13623
  }, e.id)),
13572
- n.map((e) => /* @__PURE__ */ v(ne, {
13573
- position: Ju(e.position),
13574
- icon: Qu(e),
13624
+ n.map((e) => /* @__PURE__ */ v(te, {
13625
+ position: Yu(e.position),
13626
+ icon: $u(e),
13575
13627
  title: e.title ?? e.label,
13576
13628
  draggable: !f && e.options?.draggable,
13577
13629
  bubblingMouseEvents: !1,
@@ -13599,7 +13651,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13599
13651
  });
13600
13652
  }
13601
13653
  },
13602
- children: e.options?.showLabel && e.label && /* @__PURE__ */ v(H, {
13654
+ children: e.options?.showLabel && e.label && /* @__PURE__ */ v(ie, {
13603
13655
  permanent: !0,
13604
13656
  direction: "top",
13605
13657
  className: "sf-map-marker-label",
@@ -13614,18 +13666,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
13614
13666
  style: T,
13615
13667
  children: "Cargando mapa…"
13616
13668
  });
13617
- }, ad = (e) => ({
13669
+ }, od = (e) => ({
13618
13670
  id: "leaflet",
13619
- capabilities: Du,
13620
- createRenderer: () => (t) => /* @__PURE__ */ v(id, {
13671
+ capabilities: Ou,
13672
+ createRenderer: () => (t) => /* @__PURE__ */ v(ad, {
13621
13673
  ...t,
13622
13674
  tileUrl: e?.tileUrl,
13623
13675
  attribution: e?.attribution
13624
13676
  })
13625
- }), od = 6371e3, sd = (e) => e * Math.PI / 180, cd = (e, t) => {
13626
- let n = sd(t.lat - e.lat), r = sd(t.lng - e.lng), i = sd(e.lat), a = sd(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
13627
- return 2 * od * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
13628
- }, ld = () => ({
13677
+ }), sd = 6371e3, cd = (e) => e * Math.PI / 180, ld = (e, t) => {
13678
+ let n = cd(t.lat - e.lat), r = cd(t.lng - e.lng), i = cd(e.lat), a = cd(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
13679
+ return 2 * sd * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
13680
+ }, ud = () => ({
13629
13681
  id: "basic",
13630
13682
  capabilities: {
13631
13683
  distance: "point-to-point",
@@ -13633,62 +13685,62 @@ ${e.map((e) => `<Row>${n.map((t) => {
13633
13685
  },
13634
13686
  async calculateDistance(e) {
13635
13687
  let t = e.origins[0], n = e.destinations[0];
13636
- return { distanceMeters: t && n ? cd(t, n) : 0 };
13688
+ return { distanceMeters: t && n ? ld(t, n) : 0 };
13637
13689
  }
13638
- }), ud = (e) => ({
13690
+ }), dd = (e) => ({
13639
13691
  lat: e.lat(),
13640
13692
  lng: e.lng()
13641
- }), dd = /^unnamed road$/i, fd = /^distrito de\s+/i, pd = /^[23456789CFGHJMPQRVWX]{4,8}\+[23456789CFGHJMPQRVWX]{0,3},?\s*/i, md = (e) => e?.replace(/^unnamed road,\s*/i, "").replace(pd, "").trim() || void 0, hd = (e, ...t) => {
13693
+ }), fd = /^unnamed road$/i, pd = /^distrito de\s+/i, md = /^[23456789CFGHJMPQRVWX]{4,8}\+[23456789CFGHJMPQRVWX]{0,3},?\s*/i, hd = (e) => e?.replace(/^unnamed road,\s*/i, "").replace(md, "").trim() || void 0, gd = (e, ...t) => {
13642
13694
  for (let n of t) {
13643
13695
  let t = e.address_components?.find((e) => e.types?.includes(n))?.long_name?.trim();
13644
- if (t && !(n === "route" && dd.test(t))) return t;
13696
+ if (t && !(n === "route" && fd.test(t))) return t;
13645
13697
  }
13646
- }, gd = (e, t = e.find((e) => hd(e, "route"))) => {
13698
+ }, _d = (e, t = e.find((e) => gd(e, "route"))) => {
13647
13699
  let n = (...t) => {
13648
13700
  for (let n of e) {
13649
- let e = hd(n, ...t);
13701
+ let e = gd(n, ...t);
13650
13702
  if (e) return e;
13651
13703
  }
13652
- }, r = t ? hd(t, "route") : void 0, i = t ? hd(t, "street_number") : void 0, a = e.flatMap((e) => [
13704
+ }, r = t ? gd(t, "route") : void 0, i = t ? gd(t, "street_number") : void 0, a = e.flatMap((e) => [
13653
13705
  "sublocality_level_1",
13654
13706
  "sublocality",
13655
13707
  "neighborhood"
13656
- ].map((t) => hd(e, t)).filter(Boolean)), o = a.find((e) => fd.test(e))?.replace(fd, "");
13708
+ ].map((t) => gd(e, t)).filter(Boolean)), o = a.find((e) => pd.test(e))?.replace(pd, "");
13657
13709
  return {
13658
13710
  street: r,
13659
13711
  number: i,
13660
13712
  line: r ? [r, i].filter(Boolean).join(" ") : void 0,
13661
- neighborhood: a.find((e) => !fd.test(e)),
13713
+ neighborhood: a.find((e) => !pd.test(e)),
13662
13714
  locality: n("locality"),
13663
- district: o || n("administrative_area_level_3", "locality")?.replace(fd, ""),
13715
+ district: o || n("administrative_area_level_3", "locality")?.replace(pd, ""),
13664
13716
  province: n("administrative_area_level_2"),
13665
13717
  department: n("administrative_area_level_1"),
13666
13718
  country: n("country"),
13667
13719
  postalCode: n("postal_code")
13668
13720
  };
13669
- }, _d = (e) => {
13721
+ }, vd = (e) => {
13670
13722
  let t = e.geometry?.location;
13671
13723
  if (!t) return null;
13672
- let n = md(e.formatted_address), r = n ?? e.place_id ?? "Ubicación Google Maps";
13724
+ let n = hd(e.formatted_address), r = n ?? e.place_id ?? "Ubicación Google Maps";
13673
13725
  return {
13674
13726
  id: e.place_id ?? r,
13675
13727
  label: r,
13676
13728
  address: n,
13677
- location: ud(t),
13729
+ location: dd(t),
13678
13730
  provider: "google",
13679
- parts: e.address_components ? gd([e]) : void 0,
13731
+ parts: e.address_components ? _d([e]) : void 0,
13680
13732
  raw: e
13681
13733
  };
13682
- }, vd = (e, t) => {
13734
+ }, yd = (e, t) => {
13683
13735
  let n = (e) => e * Math.PI / 180, r = Math.sin(n(t.lat - e.lat) / 2) ** 2 + Math.cos(n(e.lat)) * Math.cos(n(t.lat)) * Math.sin(n(t.lng - e.lng) / 2) ** 2;
13684
13736
  return 12742e3 * Math.asin(Math.sqrt(r));
13685
- }, yd = /* @__PURE__ */ new Set(["ROOFTOP", "RANGE_INTERPOLATED"]), bd = (e, t) => {
13737
+ }, bd = /* @__PURE__ */ new Set(["ROOFTOP", "RANGE_INTERPOLATED"]), xd = (e, t) => {
13686
13738
  if (t.length === 0) return null;
13687
- let n = t.filter((e) => hd(e, "route") && e.geometry?.location).map((t) => ({
13739
+ let n = t.filter((e) => gd(e, "route") && e.geometry?.location).map((t) => ({
13688
13740
  result: t,
13689
- punto: yd.has(t.geometry?.location_type ?? ""),
13690
- distancia: vd(e, ud(t.geometry.location))
13691
- })).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i = md(r.formatted_address), a = i ?? `${e.lat.toFixed(6)}, ${e.lng.toFixed(6)}`, o = gd(t, n?.result);
13741
+ punto: bd.has(t.geometry?.location_type ?? ""),
13742
+ distancia: yd(e, dd(t.geometry.location))
13743
+ })).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i = hd(r.formatted_address), a = i ?? `${e.lat.toFixed(6)}, ${e.lng.toFixed(6)}`, o = _d(t, n?.result);
13692
13744
  return {
13693
13745
  id: r.place_id ?? a,
13694
13746
  label: a,
@@ -13701,27 +13753,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
13701
13753
  } : o,
13702
13754
  raw: r
13703
13755
  };
13704
- }, xd = (e) => ({
13756
+ }, Sd = (e) => ({
13705
13757
  id: "google",
13706
13758
  capabilities: { geocoding: "full" },
13707
13759
  async geocode(t) {
13708
- let n = (await ju(e)).maps?.Geocoder;
13760
+ let n = (await Mu(e)).maps?.Geocoder;
13709
13761
  return n ? new Promise((e) => {
13710
13762
  new n().geocode({ address: t }, (t) => {
13711
- e((t ?? []).map((e) => _d(e)).filter((e) => !!e));
13763
+ e((t ?? []).map((e) => vd(e)).filter((e) => !!e));
13712
13764
  });
13713
13765
  }) : [];
13714
13766
  },
13715
13767
  async reverseGeocode(t) {
13716
- let n = (await ju(e)).maps?.Geocoder;
13768
+ let n = (await Mu(e)).maps?.Geocoder;
13717
13769
  return n ? new Promise((e) => {
13718
13770
  new n().geocode({ location: t }, (n) => {
13719
- e(bd(t, n ?? []));
13771
+ e(xd(t, n ?? []));
13720
13772
  });
13721
13773
  }) : null;
13722
13774
  },
13723
13775
  async placeDetails(t) {
13724
- let n = (await ju(e)).maps;
13776
+ let n = (await Mu(e)).maps;
13725
13777
  if (!n) return null;
13726
13778
  !n.places?.PlacesService && n.importLibrary && await n.importLibrary("places").catch(() => void 0);
13727
13779
  let r = n.places?.PlacesService;
@@ -13740,34 +13792,34 @@ ${e.map((e) => `<Row>${n.map((t) => {
13740
13792
  e(null);
13741
13793
  return;
13742
13794
  }
13743
- let a = _d({
13795
+ let a = vd({
13744
13796
  ...i,
13745
13797
  place_id: i.place_id ?? t
13746
13798
  });
13747
13799
  e(a && {
13748
13800
  ...a,
13749
13801
  name: i.name?.trim() || void 0,
13750
- parts: i.address_components ? gd([i]) : void 0
13802
+ parts: i.address_components ? _d([i]) : void 0
13751
13803
  });
13752
13804
  });
13753
13805
  }) : null;
13754
13806
  }
13755
- }), Sd = (e) => e.toFixed(6), Cd = (e, t, n) => Math.min(Math.max(e, t), n), wd = (e) => Cd(e, -90, 90), Td = (e) => Cd(e, -180, 180), Ed = (e, t = 0) => {
13807
+ }), Cd = (e) => e.toFixed(6), wd = (e, t, n) => Math.min(Math.max(e, t), n), Td = (e) => wd(e, -90, 90), Ed = (e) => wd(e, -180, 180), Dd = (e, t = 0) => {
13756
13808
  if (typeof e == "number") return Number.isFinite(e) ? e : t;
13757
13809
  let n = Number.parseFloat(e.trim().replace(",", "."));
13758
13810
  return Number.isFinite(n) ? n : t;
13759
- }, Dd = (e) => `${Sd(e.lat)}, ${Sd(e.lng)}`, Od = (e, t) => {
13811
+ }, Od = (e) => `${Cd(e.lat)}, ${Cd(e.lng)}`, kd = (e, t) => {
13760
13812
  if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
13761
- let n = Ed(e.lat, t.lat), r = Ed(e.lng, t.lng);
13813
+ let n = Dd(e.lat, t.lat), r = Dd(e.lng, t.lng);
13762
13814
  return {
13763
- lat: wd(n),
13764
- lng: Td(r)
13815
+ lat: Td(n),
13816
+ lng: Ed(r)
13765
13817
  };
13766
- }, kd = (e, t = "Ubicación") => ({
13818
+ }, Ad = (e, t = "Ubicación") => ({
13767
13819
  id: `${e.lat}:${e.lng}`,
13768
13820
  position: e,
13769
13821
  label: t
13770
- }), Ad = (e) => {
13822
+ }), jd = (e) => {
13771
13823
  let t = e.road, n = e.house_number;
13772
13824
  return {
13773
13825
  street: t,
@@ -13781,7 +13833,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13781
13833
  country: e.country,
13782
13834
  postalCode: e.postcode
13783
13835
  };
13784
- }, jd = () => ({
13836
+ }, Md = () => ({
13785
13837
  id: "nominatim",
13786
13838
  capabilities: { geocoding: "basic" },
13787
13839
  async geocode(e) {
@@ -13813,20 +13865,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
13813
13865
  label: Go(r.display_name),
13814
13866
  address: r.display_name,
13815
13867
  name: r.name?.trim() || void 0,
13816
- parts: Ad(r.address ?? {}),
13868
+ parts: jd(r.address ?? {}),
13817
13869
  raw: r
13818
13870
  } : t;
13819
13871
  } catch {
13820
13872
  return t;
13821
13873
  }
13822
13874
  }
13823
- }), Md = (e) => ({
13875
+ }), Nd = (e) => ({
13824
13876
  id: e.id,
13825
13877
  capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
13826
13878
  searchPlaces(t) {
13827
13879
  return e.geocode(t);
13828
13880
  }
13829
- }), Nd = () => ({
13881
+ }), Pd = () => ({
13830
13882
  id: "basic",
13831
13883
  capabilities: {
13832
13884
  routing: "basic",
@@ -13844,31 +13896,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
13844
13896
  ]
13845
13897
  };
13846
13898
  }
13847
- }), Pd = i({}), Fd = (e) => {
13899
+ }), Fd = i({}), Id = (e) => {
13848
13900
  let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
13849
- return t === "google" && n ? xd(n) : jd();
13850
- }, Id = (e) => {
13851
- let t = e.defaultEngine === "google" ? qu(e.engines.google) : ad(e.engines.leaflet), n = Fd(e);
13901
+ return t === "google" && n ? Sd(n) : Md();
13902
+ }, Ld = (e) => {
13903
+ let t = e.defaultEngine === "google" ? Ju(e.engines.google) : od(e.engines.leaflet), n = Id(e);
13852
13904
  return {
13853
13905
  config: e,
13854
13906
  engine: t,
13855
13907
  geocodingService: n,
13856
- placesService: Md(n),
13857
- routingService: Nd(),
13858
- distanceService: ld()
13908
+ placesService: Nd(n),
13909
+ routingService: Pd(),
13910
+ distanceService: ud()
13859
13911
  };
13860
- }, Ld = ({ maps: e, children: t }) => {
13861
- let n = p(() => ({ maps: e ? Id(e) : void 0 }), [e]);
13862
- return /* @__PURE__ */ v(Pd.Provider, {
13912
+ }, Rd = ({ maps: e, children: t }) => {
13913
+ let n = p(() => ({ maps: e ? Ld(e) : void 0 }), [e]);
13914
+ return /* @__PURE__ */ v(Fd.Provider, {
13863
13915
  value: n,
13864
13916
  children: t
13865
13917
  });
13866
- }, Rd = () => c(Pd), zd = () => {
13867
- let e = Rd();
13868
- if (!e.maps) throw Error(bu);
13918
+ }, zd = () => c(Fd), Bd = () => {
13919
+ let e = zd();
13920
+ if (!e.maps) throw Error(xu);
13869
13921
  return e.maps;
13870
- }, Bd = () => {
13871
- let e = zd(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
13922
+ }, Vd = () => {
13923
+ let e = Bd(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
13872
13924
  return {
13873
13925
  loading: t,
13874
13926
  results: r,
@@ -13892,15 +13944,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
13892
13944
  }
13893
13945
  }, [e.geocodingService])
13894
13946
  };
13895
- }, Vd = () => {
13896
- let e = zd();
13947
+ }, Hd = () => {
13948
+ let e = Bd();
13897
13949
  return p(() => ({
13898
13950
  id: e.engine.id,
13899
13951
  capabilities: e.engine.capabilities,
13900
13952
  renderer: e.engine.createRenderer()
13901
13953
  }), [e.engine]);
13902
- }, Hd = () => zd().config, Ud = () => {
13903
- let e = zd(), [t, n] = h(!1), [r, i] = h(null), [a, o] = h(null), c = m(0), l = s(async (t, r) => {
13954
+ }, Ud = () => Bd().config, Wd = () => {
13955
+ let e = Bd(), [t, n] = h(!1), [r, i] = h(null), [a, o] = h(null), c = m(0), l = s(async (t, r) => {
13904
13956
  c.current += 1;
13905
13957
  let a = c.current;
13906
13958
  n(!0), o(null);
@@ -13914,7 +13966,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
13914
13966
  address: l?.address ?? s?.address,
13915
13967
  parts: {
13916
13968
  ...s?.parts,
13917
- ...Wd(l?.parts),
13969
+ ...Gd(l?.parts),
13918
13970
  ...l?.parts?.line ? { lineDistanceM: void 0 } : {}
13919
13971
  }
13920
13972
  };
@@ -13935,11 +13987,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
13935
13987
  show: u,
13936
13988
  clear: s(() => u(null), [u])
13937
13989
  };
13938
- }, Wd = (e) => Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e !== void 0 && e !== "")), Gd = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", Kd = ({ 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 }) => {
13990
+ }, Gd = (e) => Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e !== void 0 && e !== "")), Kd = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", qd = ({ 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 }) => {
13939
13991
  let d = b({
13940
13992
  name: t,
13941
13993
  control: e.control
13942
- }), { loading: f, results: p, error: m, search: g } = Bd(), [_, x] = h(() => Gd(d.field.value)), [S, C] = h(!1), w = String(t), T = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, E = o || s, D = !E && !f && _.trim().length >= 3, O = () => {
13994
+ }), { loading: f, results: p, error: m, search: g } = Vd(), [_, x] = h(() => Kd(d.field.value)), [S, C] = h(!1), w = String(t), T = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, E = o || s, D = !E && !f && _.trim().length >= 3, O = () => {
13943
13995
  D && (C(!0), g(_));
13944
13996
  }, k = (e) => {
13945
13997
  d.field.onChange(e), l?.(e);
@@ -14019,8 +14071,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14019
14071
  ]
14020
14072
  })
14021
14073
  });
14022
- }, qd = 19, Jd = 3, Yd = (e, t) => e.zoom === t.zoom && Math.abs(e.center.lat - t.center.lat) < 1e-7 && Math.abs(e.center.lng - t.center.lng) < 1e-7, Xd = ({ title: e, description: t, center: n = xu, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], circles: s = [], mapType: c = "roadmap", onMapTypeChange: l, showControls: u, recenterTo: d, focus: f, focusZoom: m = 16, legend: g, panel: _, height: b = 360, className: x, readOnly: S, onClick: C, onMarkerClick: w, onMarkerDoubleClick: T, onMarkerDrag: E, onMarkerDragEnd: D }) => {
14023
- let O = Vd(), k = p(() => O.renderer, [O.renderer]), A = !!u || f !== void 0, j = f ? `${f.lat},${f.lng}` : "", [M, N] = h({
14074
+ }, Jd = 19, Yd = 3, Xd = (e, t) => e.zoom === t.zoom && Math.abs(e.center.lat - t.center.lat) < 1e-7 && Math.abs(e.center.lng - t.center.lng) < 1e-7, Zd = ({ title: e, description: t, center: n = Su, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], circles: s = [], mapType: c = "roadmap", onMapTypeChange: l, showControls: u, recenterTo: d, focus: f, focusZoom: m = 16, legend: g, panel: _, height: b = 360, className: x, readOnly: S, onClick: C, onMarkerClick: w, onMarkerDoubleClick: T, onMarkerDrag: E, onMarkerDragEnd: D }) => {
14075
+ let O = Hd(), k = p(() => O.renderer, [O.renderer]), A = !!u || f !== void 0, j = f ? `${f.lat},${f.lng}` : "", [M, N] = h({
14024
14076
  vista: {
14025
14077
  center: n,
14026
14078
  zoom: r
@@ -14042,7 +14094,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14042
14094
  };
14043
14095
  }), I = (e) => F((t) => ({
14044
14096
  ...t,
14045
- zoom: Math.min(qd, Math.max(Jd, t.zoom + e))
14097
+ zoom: Math.min(Jd, Math.max(Yd, t.zoom + e))
14046
14098
  })), L = k({
14047
14099
  center: n,
14048
14100
  zoom: r,
@@ -14054,7 +14106,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14054
14106
  height: b,
14055
14107
  readOnly: S,
14056
14108
  view: A ? P : void 0,
14057
- onViewChange: A ? (e) => F((t) => Yd(t, e) ? t : e) : void 0,
14109
+ onViewChange: A ? (e) => F((t) => Xd(t, e) ? t : e) : void 0,
14058
14110
  zoomControl: !u,
14059
14111
  onClick: C,
14060
14112
  onMarkerClick: w,
@@ -14062,7 +14114,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14062
14114
  onMarkerDrag: E,
14063
14115
  onMarkerDragEnd: D
14064
14116
  }), R = !!l;
14065
- return /* @__PURE__ */ v(mu, {
14117
+ return /* @__PURE__ */ v(hu, {
14066
14118
  title: e,
14067
14119
  description: t,
14068
14120
  className: x,
@@ -14138,16 +14190,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
14138
14190
  ]
14139
14191
  })
14140
14192
  });
14141
- }, Zd = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
14193
+ }, Qd = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
14142
14194
  let [d, f] = h(!1), [p, m] = h(null), g = b({
14143
14195
  name: t,
14144
14196
  control: e.control
14145
- }), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = Od(g.field.value, xu), w = (e) => {
14197
+ }), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = kd(g.field.value, Su), w = (e) => {
14146
14198
  g.field.onChange(e), l?.(e);
14147
14199
  }, T = (e, t) => {
14148
14200
  w({
14149
14201
  ...C,
14150
- [e]: Ed(t, C[e])
14202
+ [e]: Dd(t, C[e])
14151
14203
  });
14152
14204
  };
14153
14205
  return /* @__PURE__ */ v(Z, {
@@ -14170,7 +14222,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14170
14222
  id: `${_}-lat`,
14171
14223
  type: "text",
14172
14224
  inputMode: "decimal",
14173
- value: Sd(C.lat),
14225
+ value: Cd(C.lat),
14174
14226
  readOnly: S,
14175
14227
  disabled: s,
14176
14228
  "aria-invalid": !!x || void 0,
@@ -14190,7 +14242,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14190
14242
  id: `${_}-lng`,
14191
14243
  type: "text",
14192
14244
  inputMode: "decimal",
14193
- value: Sd(C.lng),
14245
+ value: Cd(C.lng),
14194
14246
  readOnly: S,
14195
14247
  disabled: s,
14196
14248
  "aria-invalid": !!x || void 0,
@@ -14209,8 +14261,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14209
14261
  onClick: () => {
14210
14262
  !navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
14211
14263
  let t = {
14212
- lat: Number(Sd(e.coords.latitude)),
14213
- lng: Number(Sd(e.coords.longitude))
14264
+ lat: Number(Cd(e.coords.latitude)),
14265
+ lng: Number(Cd(e.coords.longitude))
14214
14266
  };
14215
14267
  w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
14216
14268
  }, () => {
@@ -14231,7 +14283,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14231
14283
  role: "status",
14232
14284
  children: p
14233
14285
  }),
14234
- /* @__PURE__ */ v(Xd, {
14286
+ /* @__PURE__ */ v(Zd, {
14235
14287
  center: C,
14236
14288
  zoom: a,
14237
14289
  height: 220,
@@ -14243,8 +14295,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
14243
14295
  }],
14244
14296
  onClick: (e) => {
14245
14297
  w({
14246
- lat: Number(Sd(e.location.lat)),
14247
- lng: Number(Sd(e.location.lng))
14298
+ lat: Number(Cd(e.location.lat)),
14299
+ lng: Number(Cd(e.location.lng))
14248
14300
  }), g.field.onBlur();
14249
14301
  }
14250
14302
  }),
@@ -14255,19 +14307,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
14255
14307
  ]
14256
14308
  })
14257
14309
  });
14258
- }, Qd = (e) => /* @__PURE__ */ v(Zd, { ...e }), $d = (e) => Array.isArray(e) ? e.map((e) => Od(e, xu)) : [], ef = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, tf = "var(--sf-map-area-stroke)", nf = "var(--sf-map-area-fill)", rf = "var(--sf-map-route-stroke)", af = ({ 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 }) => {
14310
+ }, $d = (e) => /* @__PURE__ */ v(Qd, { ...e }), ef = (e) => Array.isArray(e) ? e.map((e) => kd(e, Su)) : [], tf = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, nf = "var(--sf-map-area-stroke)", rf = "var(--sf-map-area-fill)", af = "var(--sf-map-route-stroke)", of = ({ 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 }) => {
14259
14311
  let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
14260
14312
  name: t,
14261
14313
  control: e.control,
14262
14314
  rules: { validate: (e) => {
14263
- let t = $d(e).length;
14315
+ let t = ef(e).length;
14264
14316
  return t === 0 && !a ? !0 : t < f ? p : !0;
14265
14317
  } }
14266
- }), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = $d(m.field.value), S = x.at(-1) ?? xu, C = {
14318
+ }), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = ef(m.field.value), S = x.at(-1) ?? Su, C = {
14267
14319
  id: `${h}-${n}`,
14268
14320
  points: x,
14269
- color: n === "area" ? tf : rf,
14270
- fillColor: n === "area" ? nf : void 0
14321
+ color: n === "area" ? nf : af,
14322
+ fillColor: n === "area" ? rf : void 0
14271
14323
  }, w = (e) => {
14272
14324
  m.field.onChange(e), u?.(e);
14273
14325
  }, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
@@ -14300,7 +14352,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14300
14352
  children: "Limpiar"
14301
14353
  })]
14302
14354
  }),
14303
- /* @__PURE__ */ v(Xd, {
14355
+ /* @__PURE__ */ v(Zd, {
14304
14356
  center: S,
14305
14357
  zoom: o,
14306
14358
  height: 260,
@@ -14309,7 +14361,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14309
14361
  id: `${h}-point-${t}`,
14310
14362
  position: e,
14311
14363
  label: String(t + 1),
14312
- color: n === "area" ? tf : rf,
14364
+ color: n === "area" ? nf : af,
14313
14365
  options: { draggable: !_ }
14314
14366
  })),
14315
14367
  areas: n === "area" && x.length >= 3 ? [C] : [],
@@ -14332,7 +14384,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14332
14384
  className: "sf-map-hint",
14333
14385
  "aria-live": "polite",
14334
14386
  children: [
14335
- ef(x),
14387
+ tf(x),
14336
14388
  " · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
14337
14389
  " ",
14338
14390
  /* @__PURE__ */ v("span", {
@@ -14344,38 +14396,38 @@ ${e.map((e) => `<Row>${n.map((t) => {
14344
14396
  ]
14345
14397
  })
14346
14398
  });
14347
- }, of = (e) => /* @__PURE__ */ v(af, {
14399
+ }, sf = (e) => /* @__PURE__ */ v(of, {
14348
14400
  ...e,
14349
14401
  mode: "area"
14350
- }), sf = (e) => /* @__PURE__ */ v(af, {
14402
+ }), cf = (e) => /* @__PURE__ */ v(of, {
14351
14403
  ...e,
14352
14404
  mode: "route"
14353
- }), cf = (e) => {
14405
+ }), lf = (e) => {
14354
14406
  switch (e.kind) {
14355
- case "coordinates": return /* @__PURE__ */ v(Qd, { ...e });
14356
- case "location": return /* @__PURE__ */ v(Zd, { ...e });
14357
- case "address": return /* @__PURE__ */ v(Kd, { ...e });
14358
- case "area": return /* @__PURE__ */ v(of, { ...e });
14359
- case "route": return /* @__PURE__ */ v(sf, { ...e });
14407
+ case "coordinates": return /* @__PURE__ */ v($d, { ...e });
14408
+ case "location": return /* @__PURE__ */ v(Qd, { ...e });
14409
+ case "address": return /* @__PURE__ */ v(qd, { ...e });
14410
+ case "area": return /* @__PURE__ */ v(sf, { ...e });
14411
+ case "route": return /* @__PURE__ */ v(cf, { ...e });
14360
14412
  default: return null;
14361
14413
  }
14362
- }, lf = /^#[0-9a-fA-F]{6}$/, uf = "#".padEnd(7, "0"), df = () => {
14414
+ }, uf = /^#[0-9a-fA-F]{6}$/, df = "#".padEnd(7, "0"), ff = () => {
14363
14415
  if (typeof document > "u") return "";
14364
14416
  let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
14365
- return lf.test(e) ? e.toLowerCase() : "";
14366
- }, ff = (e, t, n) => Math.min(n, Math.max(t, e)), pf = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), mf = () => [], hf = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], gf = () => [], _f = (e) => Array.isArray(e) ? e.map((e) => {
14417
+ return uf.test(e) ? e.toLowerCase() : "";
14418
+ }, pf = (e, t, n) => Math.min(n, Math.max(t, e)), mf = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), hf = () => [], gf = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], _f = () => [], vf = (e) => Array.isArray(e) ? e.map((e) => {
14367
14419
  if (typeof e != "object" || !e) return null;
14368
14420
  let t = e;
14369
14421
  return {
14370
14422
  key: String(t.key ?? ""),
14371
14423
  value: String(t.value ?? "")
14372
14424
  };
14373
- }).filter((e) => e != null) : [], vf = (e = 0, t = 100) => ({
14425
+ }).filter((e) => e != null) : [], yf = (e = 0, t = 100) => ({
14374
14426
  start: e,
14375
14427
  end: t
14376
- }), yf = (e, t = 0, n = 100) => {
14428
+ }), bf = (e, t = 0, n = 100) => {
14377
14429
  if (e && typeof e == "object" && "start" in e && "end" in e) {
14378
- let r = e, i = ff(Number(r.start), t, n), a = ff(Number(r.end), t, n);
14430
+ let r = e, i = pf(Number(r.start), t, n), a = pf(Number(r.end), t, n);
14379
14431
  return i <= a ? {
14380
14432
  start: i,
14381
14433
  end: a
@@ -14384,15 +14436,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
14384
14436
  end: i
14385
14437
  };
14386
14438
  }
14387
- return vf(t, n);
14388
- }, bf = (e, t) => {
14389
- let n = df(), r = String(t ?? (n || uf)).trim(), i = lf.test(r) ? r.toLowerCase() : uf, a = String(e ?? i).trim();
14390
- return lf.test(a) ? a.toLowerCase() : i;
14391
- }, xf = (e, t, n) => n <= t ? 0 : Math.round((ff(e, t, n) - t) / (n - t) * 100), Sf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Cf = ({ 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 }) => {
14439
+ return yf(t, n);
14440
+ }, xf = (e, t) => {
14441
+ let n = ff(), r = String(t ?? (n || df)).trim(), i = uf.test(r) ? r.toLowerCase() : df, a = String(e ?? i).trim();
14442
+ return uf.test(a) ? a.toLowerCase() : i;
14443
+ }, Sf = (e, t, n) => n <= t ? 0 : Math.round((pf(e, t, n) - t) / (n - t) * 100), Cf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), wf = ({ 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 }) => {
14392
14444
  let h = b({
14393
14445
  name: t,
14394
14446
  control: e.control
14395
- }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = ff(Number(h.field.value ?? a), a, o), C = (e) => {
14447
+ }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = pf(Number(h.field.value ?? a), a, o), C = (e) => {
14396
14448
  h.field.onChange(e), p?.(e);
14397
14449
  };
14398
14450
  return /* @__PURE__ */ v(Z, {
@@ -14416,17 +14468,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
14416
14468
  "aria-invalid": !!_ || void 0,
14417
14469
  onBlur: () => h.field.onBlur(),
14418
14470
  onChange: (e) => C(Number(e.target.value)),
14419
- className: Sf(x)
14471
+ className: Cf(x)
14420
14472
  }), /* @__PURE__ */ v("span", {
14421
14473
  className: "sf-slider__value",
14422
- children: pf(S, {
14474
+ children: mf(S, {
14423
14475
  suffix: c,
14424
14476
  formatValue: f
14425
14477
  })
14426
14478
  })]
14427
14479
  })
14428
14480
  });
14429
- }, wf = {
14481
+ }, Tf = {
14430
14482
  slate: {
14431
14483
  wrap: "border-slate-300 bg-white",
14432
14484
  button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
@@ -14447,7 +14499,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14447
14499
  button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
14448
14500
  value: "text-blue-700"
14449
14501
  }
14450
- }, Tf = {
14502
+ }, Ef = {
14451
14503
  sm: {
14452
14504
  button: "h-6 w-6",
14453
14505
  icon: "h-3 w-3",
@@ -14458,13 +14510,13 @@ ${e.map((e) => `<Row>${n.map((t) => {
14458
14510
  icon: "h-3.5 w-3.5",
14459
14511
  value: "min-w-[2.5rem] px-1.5 text-sm"
14460
14512
  }
14461
- }, Ef = (e, t) => {
14513
+ }, Df = (e, t) => {
14462
14514
  let n = (String(t).split(".")[1] ?? "").length;
14463
14515
  return Number(e.toFixed(n));
14464
- }, Df = ({ 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 }) => {
14465
- let f = wf[a], p = Tf[o], m = s || c, h = (a) => {
14516
+ }, Of = ({ 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 }) => {
14517
+ let f = Tf[a], p = Ef[o], m = s || c, h = (a) => {
14466
14518
  if (m) return;
14467
- let o = Math.min(r, Math.max(n, Ef(a, i)));
14519
+ let o = Math.min(r, Math.max(n, Df(a, i)));
14468
14520
  o !== e && t(o);
14469
14521
  }, 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);
14470
14522
  return /* @__PURE__ */ y("div", {
@@ -14500,11 +14552,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14500
14552
  })
14501
14553
  ]
14502
14554
  });
14503
- }, Of = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), kf = ({ 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 }) => {
14555
+ }, kf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Af = ({ 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 }) => {
14504
14556
  let h = b({
14505
14557
  name: t,
14506
14558
  control: e.control
14507
- }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = yf(h.field.value, a, o), C = (e) => {
14559
+ }), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = bf(h.field.value, a, o), C = (e) => {
14508
14560
  h.field.onChange(e), p?.(e);
14509
14561
  }, w = {
14510
14562
  suffix: c,
@@ -14522,7 +14574,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14522
14574
  children: [
14523
14575
  /* @__PURE__ */ v("span", {
14524
14576
  className: "sf-slider__value sf-slider__value--sm",
14525
- children: pf(S.start, w)
14577
+ children: mf(S.start, w)
14526
14578
  }),
14527
14579
  /* @__PURE__ */ y("div", {
14528
14580
  className: "grid flex-1 gap-2",
@@ -14544,7 +14596,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14544
14596
  end: Math.max(t, S.end)
14545
14597
  });
14546
14598
  },
14547
- className: Of(x)
14599
+ className: kf(x)
14548
14600
  }), /* @__PURE__ */ v("input", {
14549
14601
  id: `${g}-end`,
14550
14602
  type: "range",
@@ -14563,21 +14615,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
14563
14615
  end: t
14564
14616
  });
14565
14617
  },
14566
- className: Of(x)
14618
+ className: kf(x)
14567
14619
  })]
14568
14620
  }),
14569
14621
  /* @__PURE__ */ v("span", {
14570
14622
  className: "sf-slider__value sf-slider__value--sm",
14571
- children: pf(S.end, w)
14623
+ children: mf(S.end, w)
14572
14624
  })
14573
14625
  ]
14574
14626
  })
14575
14627
  });
14576
- }, Af = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
14628
+ }, jf = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
14577
14629
  let d = b({
14578
14630
  name: t,
14579
14631
  control: e.control
14580
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = ff(Number(d.field.value ?? a), a, o), h = xf(m, a, o);
14632
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = pf(Number(d.field.value ?? a), a, o), h = Sf(m, a, o);
14581
14633
  return /* @__PURE__ */ v(Z, {
14582
14634
  id: f,
14583
14635
  label: n,
@@ -14600,21 +14652,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
14600
14652
  })
14601
14653
  }), /* @__PURE__ */ v("span", {
14602
14654
  className: "sf-progress-bar__value",
14603
- children: pf(m, {
14655
+ children: mf(m, {
14604
14656
  suffix: s,
14605
14657
  formatValue: l
14606
14658
  })
14607
14659
  })]
14608
14660
  })
14609
14661
  });
14610
- }, jf = {
14662
+ }, Mf = {
14611
14663
  default: "sf-progress-bar-readonly__fill--default",
14612
14664
  success: "sf-progress-bar-readonly__fill--success",
14613
14665
  warning: "sf-progress-bar-readonly__fill--warning",
14614
14666
  danger: "sf-progress-bar-readonly__fill--danger",
14615
14667
  info: "sf-progress-bar-readonly__fill--info"
14616
- }, Mf = ({ 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 }) => {
14617
- let u = ff(e, t, n), d = xf(u, t, n), f = pf(u, {
14668
+ }, Nf = ({ 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 }) => {
14669
+ let u = pf(e, t, n), d = Sf(u, t, n), f = mf(u, {
14618
14670
  suffix: a,
14619
14671
  formatValue: o
14620
14672
  });
@@ -14628,7 +14680,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14628
14680
  /* @__PURE__ */ v("div", {
14629
14681
  className: "sf-progress-bar-readonly__track",
14630
14682
  children: /* @__PURE__ */ v("div", {
14631
- className: (0, X.default)("sf-progress-bar-readonly__fill", jf[s]),
14683
+ className: (0, X.default)("sf-progress-bar-readonly__fill", Mf[s]),
14632
14684
  style: { width: `${d}%` },
14633
14685
  role: "progressbar",
14634
14686
  "aria-label": r ?? "Progreso",
@@ -14643,11 +14695,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14643
14695
  })
14644
14696
  ]
14645
14697
  });
14646
- }, Nf = ({ 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 }) => {
14698
+ }, Pf = ({ 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 }) => {
14647
14699
  let [f, p] = h(0), m = b({
14648
14700
  name: t,
14649
14701
  control: e.control
14650
- }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = Pf(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
14702
+ }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = Ff(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
14651
14703
  m.field.onChange(e), u?.(e), m.field.onBlur();
14652
14704
  }, w = (e, t) => {
14653
14705
  if (y) return;
@@ -14687,12 +14739,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
14687
14739
  }, e))
14688
14740
  })
14689
14741
  });
14690
- }, Pf = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), Ff = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14742
+ }, Ff = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), If = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14691
14743
  let d = b({
14692
14744
  name: t,
14693
14745
  control: e.control
14694
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = bf(d.field.value), g = (e) => {
14695
- let t = bf(e, h);
14746
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = xf(d.field.value), g = (e) => {
14747
+ let t = xf(e, h);
14696
14748
  d.field.onChange(t), l?.(t);
14697
14749
  };
14698
14750
  return /* @__PURE__ */ v(Z, {
@@ -14735,11 +14787,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14735
14787
  })]
14736
14788
  })
14737
14789
  });
14738
- }, If = ({ 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 }) => {
14790
+ }, Lf = ({ 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 }) => {
14739
14791
  let [f, p] = h(""), m = b({
14740
14792
  name: t,
14741
14793
  control: e.control
14742
- }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = hf(m.field.value), C = o != null && S.length >= o, w = (e) => {
14794
+ }), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = gf(m.field.value), C = o != null && S.length >= o, w = (e) => {
14743
14795
  m.field.onChange(e), u?.(e);
14744
14796
  }, T = () => {
14745
14797
  let e = f.trim();
@@ -14791,11 +14843,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
14791
14843
  })]
14792
14844
  })
14793
14845
  });
14794
- }, Lf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14846
+ }, Rf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
14795
14847
  let d = b({
14796
14848
  name: t,
14797
14849
  control: e.control
14798
- }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = _f(d.field.value), g = (e) => {
14850
+ }), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = vf(d.field.value), g = (e) => {
14799
14851
  d.field.onChange(e), l?.(e);
14800
14852
  }, _ = (e, t, n) => {
14801
14853
  g(h.map((r, i) => i === e ? {
@@ -14880,7 +14932,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14880
14932
  })]
14881
14933
  })
14882
14934
  });
14883
- }, Rf = ({ items: e, onReorder: t, className: n }) => {
14935
+ }, zf = ({ items: e, onReorder: t, className: n }) => {
14884
14936
  let [r, i] = h(null), a = (n) => (a) => {
14885
14937
  if (a.preventDefault(), !r) return;
14886
14938
  let o = e.findIndex((e) => e.id === r);
@@ -14906,7 +14958,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14906
14958
  })]
14907
14959
  }, e.id))
14908
14960
  });
14909
- }, zf = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
14961
+ }, Bf = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
14910
14962
  className: (0, X.default)("sf-card-radio-group", i),
14911
14963
  role: "radiogroup",
14912
14964
  "aria-label": a,
@@ -14951,7 +15003,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
14951
15003
  ]
14952
15004
  }, n.value);
14953
15005
  })
14954
- }), Bf = ({ value: e, onChange: t, zones: n, label: r, disabled: i, className: a }) => {
15006
+ }), Vf = ({ value: e, onChange: t, zones: n, label: r, disabled: i, className: a }) => {
14955
15007
  let o = Math.max(0, n.findIndex((t) => t.value === e)), s = n[o], c = n.length > 1 ? o / (n.length - 1) * 100 : 0;
14956
15008
  return /* @__PURE__ */ y("div", {
14957
15009
  className: (0, X.default)("sf-semantic-slider", a),
@@ -14982,19 +15034,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
14982
15034
  })
14983
15035
  ]
14984
15036
  });
14985
- }, Vf = {
15037
+ }, Hf = {
14986
15038
  slate: "var(--sf-metric-tone-slate)",
14987
15039
  emerald: "var(--sf-metric-tone-emerald)",
14988
15040
  amber: "var(--sf-metric-tone-amber)",
14989
15041
  red: "var(--sf-metric-tone-red)",
14990
15042
  blue: "var(--sf-metric-tone-blue)"
14991
- }, Hf = [
15043
+ }, Uf = [
14992
15044
  "slate",
14993
15045
  "blue",
14994
15046
  "amber",
14995
15047
  "emerald",
14996
15048
  "red"
14997
- ], Uf = ({ segments: e, onChange: t, unit: n, valueFormat: r, className: i }) => {
15049
+ ], Wf = ({ segments: e, onChange: t, unit: n, valueFormat: r, className: i }) => {
14998
15050
  let a = m(null), o = m(null), [s, c] = h(null), l = e.reduce((e, t) => e + t.value, 0), u = r ?? ((e) => `${e.toLocaleString("es-PE")}${n ? ` ${n}` : ""}`), d = (n, r, i) => {
14999
15051
  t && t(e.map((e, t) => t === n ? {
15000
15052
  ...e,
@@ -15036,14 +15088,14 @@ ${e.map((e) => `<Row>${n.map((t) => {
15036
15088
  ref: a,
15037
15089
  className: "sf-allocation-bar__track",
15038
15090
  children: e.map((n, r) => {
15039
- let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ?? Hf[r % Hf.length], c = r === e.length - 1, d = c ? 0 : n.value + e[r + 1].value, m = d > 0 ? Math.round(n.value / d * 100) : 50;
15091
+ let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ?? Uf[r % Uf.length], c = r === e.length - 1, d = c ? 0 : n.value + e[r + 1].value, m = d > 0 ? Math.round(n.value / d * 100) : 50;
15040
15092
  return /* @__PURE__ */ y("div", {
15041
15093
  className: "contents",
15042
15094
  children: [/* @__PURE__ */ v("div", {
15043
15095
  className: "sf-allocation-bar__seg",
15044
15096
  style: {
15045
15097
  width: `${i}%`,
15046
- backgroundColor: Vf[o]
15098
+ backgroundColor: Hf[o]
15047
15099
  },
15048
15100
  title: `${n.label} · ${u(n.value)} (${Math.round(i)}%)`
15049
15101
  }), !c && t && /* @__PURE__ */ v("div", {
@@ -15073,7 +15125,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15073
15125
  children: [
15074
15126
  /* @__PURE__ */ v("span", {
15075
15127
  className: "sf-allocation-bar__label-dot",
15076
- style: { backgroundColor: Vf[t.tone ?? Hf[e.indexOf(t) % Hf.length]] },
15128
+ style: { backgroundColor: Hf[t.tone ?? Uf[e.indexOf(t) % Uf.length]] },
15077
15129
  "aria-hidden": "true"
15078
15130
  }),
15079
15131
  t.label,
@@ -15087,11 +15139,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15087
15139
  })
15088
15140
  })]
15089
15141
  });
15090
- }, Wf = (e) => new Date(e).toLocaleTimeString("es-PE", {
15142
+ }, Gf = (e) => new Date(e).toLocaleTimeString("es-PE", {
15091
15143
  hour: "2-digit",
15092
15144
  minute: "2-digit"
15093
- }), Gf = ({ value: e, onChange: t, min: n, max: r, step: i, marks: a, formatValue: o, label: s, disabled: c, className: l }) => {
15094
- let u = o ?? Wf, d = r > n ? Math.min(100, Math.max(0, (e - n) / (r - n) * 100)) : 0, f = i ?? Math.max(1, Math.round((r - n) / 200));
15145
+ }), Kf = ({ value: e, onChange: t, min: n, max: r, step: i, marks: a, formatValue: o, label: s, disabled: c, className: l }) => {
15146
+ let u = o ?? Gf, d = r > n ? Math.min(100, Math.max(0, (e - n) / (r - n) * 100)) : 0, f = i ?? Math.max(1, Math.round((r - n) / 200));
15095
15147
  return /* @__PURE__ */ y("div", {
15096
15148
  className: (0, X.default)("sf-temporal-scrub", l),
15097
15149
  children: [s && /* @__PURE__ */ v("p", {
@@ -15133,7 +15185,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15133
15185
  ]
15134
15186
  })]
15135
15187
  });
15136
- }, Kf = {
15188
+ }, qf = {
15137
15189
  group: {
15138
15190
  label: "Grupo / Entidad",
15139
15191
  labelShort: "GRP",
@@ -15152,7 +15204,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15152
15204
  rowClass: "sf-org-tree-row--role",
15153
15205
  barClass: "sf-org-tree-bar--role"
15154
15206
  }
15155
- }, qf = (e) => {
15207
+ }, Jf = (e) => {
15156
15208
  let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
15157
15209
  for (let n of e) {
15158
15210
  let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
@@ -15179,16 +15231,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
15179
15231
  hasChildren: !1
15180
15232
  });
15181
15233
  return r;
15182
- }, Jf = (e, t = Kf) => t[e] ?? Kf[e] ?? null, Yf = (e) => e.length, Xf = (e) => {
15234
+ }, Yf = (e, t = qf) => t[e] ?? qf[e] ?? null, Xf = (e) => e.length, Zf = (e) => {
15183
15235
  let t = new Set(e.map((e) => e.id));
15184
15236
  return e.filter((e) => {
15185
15237
  let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
15186
15238
  return n == null || !t.has(n);
15187
15239
  });
15188
- }, Zf = ({ type: e, className: t }) => v(e === "group" ? wt : e === "role" ? Ze : Xe, {
15240
+ }, Qf = ({ type: e, className: t }) => v(e === "group" ? wt : e === "role" ? Ze : Xe, {
15189
15241
  className: t,
15190
15242
  "aria-hidden": "true"
15191
- }), Qf = ({ 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 = Kf, onRenderNode: _, maxHeight: b = 480, className: x }) => {
15243
+ }), $f = ({ 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 = qf, onRenderNode: _, maxHeight: b = 480, className: x }) => {
15192
15244
  let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
15193
15245
  visible: !1,
15194
15246
  x: 0,
@@ -15211,7 +15263,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15211
15263
  window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
15212
15264
  };
15213
15265
  }, [w.visible]);
15214
- let D = p(() => qf(e), [e]), O = s((e) => {
15266
+ let D = p(() => Jf(e), [e]), O = s((e) => {
15215
15267
  let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
15216
15268
  for (; t != null;) {
15217
15269
  if (S.has(t)) return !0;
@@ -15298,7 +15350,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15298
15350
  className: "sf-org-tree__empty",
15299
15351
  children: "Sin nodos"
15300
15352
  }), k.map((e) => {
15301
- let t = Jf(e.type, g);
15353
+ let t = Yf(e.type, g);
15302
15354
  return /* @__PURE__ */ v("li", {
15303
15355
  role: "treeitem",
15304
15356
  "aria-level": e.depth + 1,
@@ -15318,7 +15370,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15318
15370
  tabIndex: e.hasChildren ? 0 : -1,
15319
15371
  children: S.has(e.id) ? /* @__PURE__ */ v(vt, { className: "h-4 w-4" }) : /* @__PURE__ */ v(bt, { className: "h-4 w-4" })
15320
15372
  }),
15321
- /* @__PURE__ */ v(Zf, {
15373
+ /* @__PURE__ */ v(Qf, {
15322
15374
  type: e.type,
15323
15375
  className: "h-4 w-4 shrink-0 opacity-70"
15324
15376
  }),
@@ -15403,7 +15455,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15403
15455
  })
15404
15456
  ]
15405
15457
  });
15406
- }, $f = {
15458
+ }, ep = {
15407
15459
  street: {
15408
15460
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
15409
15461
  attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
@@ -15412,27 +15464,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
15412
15464
  url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
15413
15465
  attribution: "Tiles &copy; Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
15414
15466
  }
15415
- }, ep = {
15467
+ }, tp = {
15416
15468
  default: "Nodo",
15417
15469
  nap: "NAP",
15418
15470
  olt: "OLT",
15419
15471
  splitter: "Splitter"
15420
- }, tp = {
15472
+ }, np = {
15421
15473
  default: "var(--sf-accent)",
15422
15474
  nap: "var(--sf-network-kind-nap)",
15423
15475
  olt: "var(--sf-network-kind-olt)",
15424
15476
  splitter: "var(--sf-network-kind-splitter)"
15425
- }, np = {
15477
+ }, rp = {
15426
15478
  normal: "var(--sf-network-status-normal)",
15427
15479
  warning: "var(--sf-network-status-warning)",
15428
15480
  critical: "var(--sf-network-status-critical)",
15429
15481
  maintenance: "var(--sf-network-status-maintenance)"
15430
- }, rp = {
15482
+ }, ip = {
15431
15483
  normal: "Normal",
15432
15484
  warning: "Advertencia",
15433
15485
  critical: "Crítico",
15434
15486
  maintenance: "Mantenimiento"
15435
- }, ip = {
15487
+ }, ap = {
15436
15488
  backbone: {
15437
15489
  color: "var(--sf-network-edge-backbone)",
15438
15490
  weight: 2.5
@@ -15446,7 +15498,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15446
15498
  weight: 1.5,
15447
15499
  dashArray: "6 4"
15448
15500
  }
15449
- }, ap = Mu, op = (e) => {
15501
+ }, op = Nu, sp = (e) => {
15450
15502
  if (!Array.isArray(e)) return [];
15451
15503
  let t = [];
15452
15504
  for (let n of e) {
@@ -15455,24 +15507,24 @@ ${e.map((e) => `<Row>${n.map((t) => {
15455
15507
  if (!r) continue;
15456
15508
  let i = Number(e.lat), a = Number(e.lng);
15457
15509
  if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
15458
- let o = String(e.status ?? "normal"), s = o in np ? o : "normal", c = {
15510
+ let o = String(e.status ?? "normal"), s = o in rp ? o : "normal", c = {
15459
15511
  id: r,
15460
15512
  label: String(e.label ?? ""),
15461
15513
  lat: i,
15462
15514
  lng: a,
15463
15515
  status: s
15464
15516
  }, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
15465
- l in ep && (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);
15517
+ l in tp && (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);
15466
15518
  }
15467
15519
  return t;
15468
- }, sp = (e) => {
15520
+ }, cp = (e) => {
15469
15521
  if (!Array.isArray(e)) return [];
15470
15522
  let t = [];
15471
15523
  for (let n of e) {
15472
15524
  if (typeof n != "object" || !n) continue;
15473
15525
  let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
15474
15526
  if (!r || !i) continue;
15475
- let a = String(e.type ?? "backbone"), o = a in ip ? a : "backbone";
15527
+ let a = String(e.type ?? "backbone"), o = a in ap ? a : "backbone";
15476
15528
  t.push({
15477
15529
  from: r,
15478
15530
  to: i,
@@ -15480,7 +15532,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15480
15532
  });
15481
15533
  }
15482
15534
  return t;
15483
- }, cp = (e) => {
15535
+ }, lp = (e) => {
15484
15536
  let t = {
15485
15537
  normal: 0,
15486
15538
  warning: 0,
@@ -15489,18 +15541,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
15489
15541
  };
15490
15542
  for (let n of e) t[n.status] += 1;
15491
15543
  return t;
15492
- }, lp = (e) => {
15544
+ }, up = (e) => {
15493
15545
  if (e.length === 0) return null;
15494
15546
  let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
15495
15547
  return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
15496
- }, up = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), dp = (e, t) => e.flatMap((e) => {
15548
+ }, dp = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), fp = (e, t) => e.flatMap((e) => {
15497
15549
  let n = t[e.from], r = t[e.to];
15498
15550
  return !n || !r ? [] : [{
15499
15551
  edge: e,
15500
15552
  line: [n, r]
15501
15553
  }];
15502
- }), fp = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
15503
- let i = cp(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
15554
+ }), pp = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
15555
+ let i = lp(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
15504
15556
  return /* @__PURE__ */ y("div", {
15505
15557
  className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
15506
15558
  role: "region",
@@ -15512,15 +15564,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
15512
15564
  }),
15513
15565
  /* @__PURE__ */ v("ul", {
15514
15566
  className: "space-y-1",
15515
- children: Object.keys(rp).map((e) => /* @__PURE__ */ y("li", {
15567
+ children: Object.keys(ip).map((e) => /* @__PURE__ */ y("li", {
15516
15568
  className: "sf-network-legend__item",
15517
15569
  children: [/* @__PURE__ */ y("span", {
15518
15570
  className: "flex items-center gap-2",
15519
15571
  children: [/* @__PURE__ */ v("span", {
15520
15572
  className: "inline-block h-2.5 w-2.5 rounded-full",
15521
- style: { background: np[e] },
15573
+ style: { background: rp[e] },
15522
15574
  "aria-hidden": "true"
15523
- }), rp[e]]
15575
+ }), ip[e]]
15524
15576
  }), /* @__PURE__ */ v("span", {
15525
15577
  className: "sf-network-legend__count",
15526
15578
  children: i[e]
@@ -15533,7 +15585,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15533
15585
  }), /* @__PURE__ */ v("ul", {
15534
15586
  className: "space-y-1",
15535
15587
  children: a.map((e) => {
15536
- let t = ip[e ?? "backbone"];
15588
+ let t = ap[e ?? "backbone"];
15537
15589
  return /* @__PURE__ */ y("li", {
15538
15590
  className: "sf-network-legend__item sf-network-legend__item--edge",
15539
15591
  children: [/* @__PURE__ */ v("span", {
@@ -15553,19 +15605,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
15553
15605
  })
15554
15606
  ]
15555
15607
  });
15556
- }, pp = [-12.0464, -77.0428], mp = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), hp = (e, t) => {
15557
- let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? ep[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = mp(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
15608
+ }, mp = [-12.0464, -77.0428], hp = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), gp = (e, t) => {
15609
+ let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? tp[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = hp(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
15558
15610
  return oe.divIcon({
15559
15611
  className: "sf-network-marker-root",
15560
15612
  iconAnchor: [24, 42],
15561
15613
  iconSize: [48, 48],
15562
15614
  html: `<div class="sf-network-marker${o}">
15563
15615
  <div class="sf-network-marker__label">${a}</div>
15564
- <div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${mp(String(i))}</div>
15616
+ <div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${hp(String(i))}</div>
15565
15617
  </div>`
15566
15618
  });
15567
- }, gp = ({ nodes: e }) => {
15568
- let t = U(), n = lp(e);
15619
+ }, _p = ({ nodes: e }) => {
15620
+ let t = U(), n = up(e);
15569
15621
  return u(() => {
15570
15622
  n && t.fitBounds(n, {
15571
15623
  padding: [32, 32],
@@ -15576,8 +15628,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
15576
15628
  t,
15577
15629
  e
15578
15630
  ]), null;
15579
- }, _p = ({ nodes: e, edges: t = [], center: n = pp, 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 }) => {
15580
- let g = Lo(), [_, b] = h("street"), x = l ?? _, S = $f[x], C = p(() => up(e), [e]), w = p(() => dp(t, C), [t, C]), T = (e) => {
15631
+ }, vp = ({ nodes: e, edges: t = [], center: n = mp, 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 }) => {
15632
+ let g = Lo(), [_, b] = h("street"), x = l ?? _, S = ep[x], C = p(() => dp(e), [e]), w = p(() => fp(t, C), [t, C]), T = (e) => {
15581
15633
  l === void 0 && b(e), u?.(e);
15582
15634
  };
15583
15635
  return /* @__PURE__ */ y("div", {
@@ -15586,31 +15638,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
15586
15638
  role: "region",
15587
15639
  "aria-label": f,
15588
15640
  children: [
15589
- g ? /* @__PURE__ */ y(te, {
15641
+ g ? /* @__PURE__ */ y(V, {
15590
15642
  center: n,
15591
15643
  zoom: r,
15592
15644
  scrollWheelZoom: !0,
15593
15645
  className: "h-full w-full",
15594
15646
  children: [
15595
- /* @__PURE__ */ v(V, {
15647
+ /* @__PURE__ */ v(H, {
15596
15648
  attribution: S.attribution,
15597
15649
  url: S.url
15598
15650
  }),
15599
- c && e.length > 0 && /* @__PURE__ */ v(gp, { nodes: e }),
15651
+ c && e.length > 0 && /* @__PURE__ */ v(_p, { nodes: e }),
15600
15652
  w.map(({ edge: e, line: t }) => {
15601
- let n = ip[e.type ?? "backbone"];
15602
- return /* @__PURE__ */ v(ie, {
15653
+ let n = ap[e.type ?? "backbone"];
15654
+ return /* @__PURE__ */ v(re, {
15603
15655
  positions: t,
15604
15656
  pathOptions: {
15605
- color: ap(n.color),
15657
+ color: op(n.color),
15606
15658
  weight: n.weight,
15607
15659
  dashArray: n.dashArray
15608
15660
  }
15609
15661
  }, `${e.from}-${e.to}-${e.type ?? "backbone"}`);
15610
15662
  }),
15611
- e.map((e) => /* @__PURE__ */ v(ne, {
15663
+ e.map((e) => /* @__PURE__ */ v(te, {
15612
15664
  position: C[e.id],
15613
- icon: hp(e, e.id === a),
15665
+ icon: gp(e, e.id === a),
15614
15666
  title: e.label,
15615
15667
  alt: `${e.label}, estado ${e.status}`,
15616
15668
  keyboard: !!o,
@@ -15634,17 +15686,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
15634
15686
  children: e === "street" ? "Mapa" : "Satélite"
15635
15687
  }, e))
15636
15688
  }),
15637
- s && e.length > 0 && /* @__PURE__ */ v(fp, {
15689
+ s && e.length > 0 && /* @__PURE__ */ v(pp, {
15638
15690
  nodes: e,
15639
15691
  edges: t
15640
15692
  })
15641
15693
  ]
15642
15694
  });
15643
- }, vp = {
15695
+ }, yp = {
15644
15696
  edit: "sf-audit-timeline__icon-wrap--edit",
15645
15697
  sync: "sf-audit-timeline__icon-wrap--sync",
15646
15698
  create: "sf-audit-timeline__icon-wrap--create"
15647
- }, yp = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
15699
+ }, bp = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
15648
15700
  let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
15649
15701
  return /* @__PURE__ */ y("section", {
15650
15702
  className: (0, X.default)("sf-audit-timeline", a),
@@ -15683,11 +15735,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15683
15735
  /* @__PURE__ */ v("div", {
15684
15736
  className: "sf-audit-timeline__marker",
15685
15737
  children: t.icon ? /* @__PURE__ */ v("span", {
15686
- className: (0, X.default)("sf-audit-timeline__icon-wrap", vp[r]),
15738
+ className: (0, X.default)("sf-audit-timeline__icon-wrap", yp[r]),
15687
15739
  "aria-hidden": "true",
15688
15740
  children: t.icon
15689
15741
  }) : /* @__PURE__ */ v("span", {
15690
- className: (0, X.default)("sf-audit-timeline__icon-wrap", vp[r]),
15742
+ className: (0, X.default)("sf-audit-timeline__icon-wrap", yp[r]),
15691
15743
  "aria-hidden": "true"
15692
15744
  })
15693
15745
  }),
@@ -15723,16 +15775,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
15723
15775
  })]
15724
15776
  })]
15725
15777
  });
15726
- }, bp = {
15778
+ }, xp = {
15727
15779
  info: "sf-record-list__icon--info",
15728
15780
  warning: "sf-record-list__icon--warning",
15729
15781
  success: "sf-record-list__icon--success",
15730
15782
  neutral: "sf-record-list__icon--neutral"
15731
- }, xp = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
15783
+ }, Sp = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
15732
15784
  className: (0, X.default)("sf-record-list__item", o),
15733
15785
  children: [
15734
15786
  e && /* @__PURE__ */ v("span", {
15735
- className: (0, X.default)("sf-record-list__icon", bp[t]),
15787
+ className: (0, X.default)("sf-record-list__icon", xp[t]),
15736
15788
  "aria-hidden": "true",
15737
15789
  children: e
15738
15790
  }),
@@ -15757,7 +15809,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15757
15809
  children: a
15758
15810
  })
15759
15811
  ]
15760
- }), Sp = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
15812
+ }), Cp = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
15761
15813
  className: (0, X.default)("sf-record-list", r),
15762
15814
  "aria-label": i ?? (typeof e == "string" ? e : void 0),
15763
15815
  children: [(e || t) && /* @__PURE__ */ y("div", {
@@ -15771,9 +15823,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
15771
15823
  })]
15772
15824
  }), /* @__PURE__ */ v("div", {
15773
15825
  className: "sf-record-list__items",
15774
- children: n.map((e, t) => /* @__PURE__ */ v(xp, { ...e }, e.id ?? t))
15826
+ children: n.map((e, t) => /* @__PURE__ */ v(Sp, { ...e }, e.id ?? t))
15775
15827
  })]
15776
- }), Cp = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
15828
+ }), wp = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
15777
15829
  className: (0, X.default)("sf-live-chip", n),
15778
15830
  children: [/* @__PURE__ */ v("span", {
15779
15831
  className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
@@ -15782,12 +15834,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
15782
15834
  className: "sf-live-chip__label",
15783
15835
  children: e
15784
15836
  })]
15785
- }), wp = {
15837
+ }), Tp = {
15786
15838
  default: "var(--sf-text, #1B2A38)",
15787
15839
  success: "#1F8A4C",
15788
15840
  warning: "#C76A12",
15789
15841
  danger: "#C0392B"
15790
- }, Tp = {
15842
+ }, Ep = {
15791
15843
  display: "flex",
15792
15844
  alignItems: "center",
15793
15845
  justifyContent: "space-between",
@@ -15798,110 +15850,110 @@ ${e.map((e) => `<Row>${n.map((t) => {
15798
15850
  border: "1px solid var(--sf-border, #E2E8EC)",
15799
15851
  borderRadius: 13,
15800
15852
  boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
15801
- }, Ep = {
15853
+ }, Dp = {
15802
15854
  display: "flex",
15803
15855
  alignItems: "center",
15804
15856
  gap: 14,
15805
15857
  flexWrap: "wrap"
15806
- }, Dp = {
15858
+ }, Op = {
15807
15859
  width: 1,
15808
15860
  height: 20,
15809
15861
  background: "var(--sf-border, #DCE3E7)"
15810
- }, Op = {
15862
+ }, kp = {
15811
15863
  fontSize: 13,
15812
15864
  fontWeight: 600,
15813
15865
  color: "var(--sf-text-subtle, #8A98A4)"
15814
- }, kp = {
15866
+ }, Ap = {
15815
15867
  fontSize: 15,
15816
15868
  fontWeight: 800,
15817
15869
  color: "var(--sf-text, #1B2A38)",
15818
15870
  fontVariantNumeric: "tabular-nums"
15819
- }, Ap = {
15871
+ }, jp = {
15820
15872
  fontSize: 12.5,
15821
15873
  fontWeight: 800,
15822
15874
  color: "#C76A12"
15823
- }, jp = {
15875
+ }, Mp = {
15824
15876
  fontSize: 13,
15825
15877
  fontWeight: 700,
15826
15878
  color: "var(--sf-text-subtle, #5C7180)"
15827
- }, Mp = {
15879
+ }, Np = {
15828
15880
  display: "flex",
15829
15881
  alignItems: "center",
15830
15882
  gap: 22,
15831
15883
  margin: 0
15832
- }, Np = {
15884
+ }, Pp = {
15833
15885
  display: "flex",
15834
15886
  alignItems: "baseline",
15835
15887
  gap: 6
15836
- }, Pp = {
15888
+ }, Fp = {
15837
15889
  fontSize: 10.5,
15838
15890
  fontWeight: 700,
15839
15891
  letterSpacing: ".05em",
15840
15892
  textTransform: "uppercase",
15841
15893
  color: "var(--sf-text-subtle, #8A98A4)"
15842
- }, Fp = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
15894
+ }, Ip = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
15843
15895
  className: (0, X.default)("sf-live-status-bar", r),
15844
15896
  "aria-label": i,
15845
- style: Tp,
15897
+ style: Ep,
15846
15898
  children: [/* @__PURE__ */ y("div", {
15847
- style: Ep,
15899
+ style: Dp,
15848
15900
  children: [
15849
- /* @__PURE__ */ v(Cp, { label: "En vivo" }),
15901
+ /* @__PURE__ */ v(wp, { label: "En vivo" }),
15850
15902
  /* @__PURE__ */ v("span", {
15851
- style: jp,
15903
+ style: Mp,
15852
15904
  children: e
15853
15905
  }),
15854
15906
  n && /* @__PURE__ */ y(_, { children: [
15855
15907
  /* @__PURE__ */ v("span", {
15856
- style: Dp,
15908
+ style: Op,
15857
15909
  "aria-hidden": "true"
15858
15910
  }),
15859
15911
  /* @__PURE__ */ v("span", {
15860
- style: Op,
15912
+ style: kp,
15861
15913
  children: n.label ?? "Próxima salida"
15862
15914
  }),
15863
15915
  /* @__PURE__ */ v("span", {
15864
- style: kp,
15916
+ style: Ap,
15865
15917
  children: n.time
15866
15918
  }),
15867
15919
  n.countdown != null && /* @__PURE__ */ v("span", {
15868
- style: Ap,
15920
+ style: jp,
15869
15921
  children: n.countdown
15870
15922
  })
15871
15923
  ] })
15872
15924
  ]
15873
15925
  }), /* @__PURE__ */ v("dl", {
15874
- style: Mp,
15926
+ style: Np,
15875
15927
  children: t.map((e, t) => /* @__PURE__ */ y("div", {
15876
- style: Np,
15928
+ style: Pp,
15877
15929
  children: [/* @__PURE__ */ v("dd", {
15878
15930
  style: {
15879
15931
  margin: 0,
15880
15932
  fontSize: 20,
15881
15933
  fontWeight: 800,
15882
15934
  fontVariantNumeric: "tabular-nums",
15883
- color: wp[e.accent ?? "default"]
15935
+ color: Tp[e.accent ?? "default"]
15884
15936
  },
15885
15937
  children: e.value
15886
15938
  }), /* @__PURE__ */ v("dt", {
15887
- style: Pp,
15939
+ style: Fp,
15888
15940
  children: e.label
15889
15941
  })]
15890
15942
  }, e.id ?? `${e.label}-${t}`))
15891
15943
  })]
15892
- }), Ip = {
15944
+ }), Lp = {
15893
15945
  success: "sf-timeline__dot--success",
15894
15946
  warning: "sf-timeline__dot--warning",
15895
15947
  danger: "sf-timeline__dot--danger",
15896
15948
  info: "sf-timeline__dot--info",
15897
15949
  default: "sf-timeline__dot--default"
15898
- }, Lp = {
15950
+ }, Rp = {
15899
15951
  success: "sf-timeline__icon-wrap--success",
15900
15952
  warning: "sf-timeline__icon-wrap--warning",
15901
15953
  danger: "sf-timeline__icon-wrap--danger",
15902
15954
  info: "sf-timeline__icon-wrap--info",
15903
15955
  default: "sf-timeline__icon-wrap--default"
15904
- }, Rp = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
15956
+ }, zp = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
15905
15957
  className: (0, X.default)("sf-timeline", r),
15906
15958
  "aria-label": t,
15907
15959
  children: [e.length === 0 && /* @__PURE__ */ v("li", {
@@ -15920,11 +15972,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
15920
15972
  /* @__PURE__ */ v("div", {
15921
15973
  className: "sf-timeline__marker",
15922
15974
  children: t.icon ? /* @__PURE__ */ v("span", {
15923
- className: (0, X.default)("sf-timeline__icon-wrap", Lp[r]),
15975
+ className: (0, X.default)("sf-timeline__icon-wrap", Rp[r]),
15924
15976
  "aria-hidden": "true",
15925
15977
  children: t.icon
15926
15978
  }) : /* @__PURE__ */ v("span", {
15927
- className: (0, X.default)("sf-timeline__dot", Ip[r]),
15979
+ className: (0, X.default)("sf-timeline__dot", Lp[r]),
15928
15980
  "aria-hidden": "true"
15929
15981
  })
15930
15982
  }),
@@ -15947,7 +15999,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
15947
15999
  ]
15948
16000
  }, t.id ?? n);
15949
16001
  })]
15950
- }), zp = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
16002
+ }), Bp = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
15951
16003
  let o = m(null), [c, l] = h(0), d = s((t) => {
15952
16004
  let n = o.current;
15953
16005
  if (!n || e.length === 0) return;
@@ -16009,7 +16061,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16009
16061
  })
16010
16062
  ]
16011
16063
  });
16012
- }, Bp = ({ src: e, alt: t, aspectRatio: n = "16/9", fit: r = "cover", overlay: i = "none", children: a, rounded: o = !0, loading: s = "lazy", fallback: c, className: l, imgProps: u }) => {
16064
+ }, Vp = ({ src: e, alt: t, aspectRatio: n = "16/9", fit: r = "cover", overlay: i = "none", children: a, rounded: o = !0, loading: s = "lazy", fallback: c, className: l, imgProps: u }) => {
16013
16065
  let [d, f] = h(!1), p = !!e && !d;
16014
16066
  return /* @__PURE__ */ y("div", {
16015
16067
  className: (0, X.default)("sf-media-panel", o && "sf-media-panel--rounded", l),
@@ -16036,19 +16088,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
16036
16088
  })
16037
16089
  ]
16038
16090
  });
16039
- }, Vp = {
16091
+ }, Hp = {
16040
16092
  top: 8,
16041
16093
  right: 8,
16042
16094
  left: 0,
16043
16095
  bottom: 0
16044
- }, Hp = {
16096
+ }, Up = {
16045
16097
  top: 20,
16046
16098
  right: 8,
16047
16099
  left: 0,
16048
16100
  bottom: 0
16049
- }, Up = (e, t) => {
16101
+ }, Wp = (e, t) => {
16050
16102
  if (t !== "none") return e.stackId ?? "sf-stack";
16051
- }, Wp = (e) => e?.map((e, t) => {
16103
+ }, Gp = (e) => e?.map((e, t) => {
16052
16104
  let n = e.color ?? "var(--sf-chart-reference)", r = {
16053
16105
  stroke: n,
16054
16106
  strokeDasharray: e.strokeDasharray ?? "4 4",
@@ -16079,7 +16131,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16079
16131
  }
16080
16132
  })
16081
16133
  }, `ref-${t}`);
16082
- }), Gp = ({ 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, orientation: d = "vertical", stacking: f = "none", unit: m, yDomain: h, xAxisFormat: g, yAxisFormat: b, tooltipFormat: x, valueLabelFormat: S, showValueLabels: C = !1, referenceLines: w, onDataPointClick: T }) => {
16134
+ }), Kp = ({ 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, orientation: d = "vertical", stacking: f = "none", unit: m, yDomain: h, xAxisFormat: g, yAxisFormat: b, tooltipFormat: x, valueLabelFormat: S, showValueLabels: C = !1, referenceLines: w, onDataPointClick: T }) => {
16083
16135
  let E = e === "bar" && d === "horizontal", D = e === "line" ? "none" : f, O = D === "stacked-100", k = p(() => O ? gs(t, r) : t, [
16084
16136
  t,
16085
16137
  r,
@@ -16114,7 +16166,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16114
16166
  0,
16115
16167
  0
16116
16168
  ],
16117
- stackId: Up(e, D),
16169
+ stackId: Wp(e, D),
16118
16170
  maxBarSize: D === "none" ? 48 : void 0,
16119
16171
  children: z(e.key)
16120
16172
  }, e.key))
@@ -16150,7 +16202,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16150
16202
  fill: n,
16151
16203
  fillOpacity: .15,
16152
16204
  strokeWidth: 2,
16153
- stackId: Up(e, D),
16205
+ stackId: Wp(e, D),
16154
16206
  children: z(e.key)
16155
16207
  }, e.key);
16156
16208
  })
@@ -16167,7 +16219,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16167
16219
  children: /* @__PURE__ */ y(B, {
16168
16220
  data: k,
16169
16221
  layout: E ? "vertical" : "horizontal",
16170
- margin: C ? Hp : Vp,
16222
+ margin: C ? Up : Hp,
16171
16223
  onClick: R,
16172
16224
  children: [
16173
16225
  c && /* @__PURE__ */ v(ue, {
@@ -16205,7 +16257,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16205
16257
  formatter: L
16206
16258
  }),
16207
16259
  u && /* @__PURE__ */ v(pe, { wrapperStyle: ds }),
16208
- Wp(w),
16260
+ Gp(w),
16209
16261
  ee()
16210
16262
  ]
16211
16263
  })
@@ -16215,7 +16267,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
16215
16267
  children: o
16216
16268
  })
16217
16269
  });
16218
- }, Kp = ({ x: e, y: t, payload: n, data: r, showValues: i, format: a, color: o }) => {
16270
+ }, qp = ({ items: e, className: t }) => /* @__PURE__ */ v("ul", {
16271
+ className: (0, X.default)("sf-chart-legend", t),
16272
+ children: e.map((e) => /* @__PURE__ */ y("li", {
16273
+ className: "sf-chart-legend__item",
16274
+ children: [/* @__PURE__ */ v("span", {
16275
+ className: "sf-chart-legend__swatch",
16276
+ style: { backgroundColor: e.color },
16277
+ "aria-hidden": "true"
16278
+ }), e.label]
16279
+ }, e.label))
16280
+ }), Jp = ({ x: e, y: t, payload: n, data: r, showValues: i, format: a, color: o }) => {
16219
16281
  let s = r.find((e) => e.label === n.value);
16220
16282
  return /* @__PURE__ */ y("g", { children: [/* @__PURE__ */ v("text", {
16221
16283
  x: e,
@@ -16236,7 +16298,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16236
16298
  },
16237
16299
  children: a(s.value, s.key)
16238
16300
  })] });
16239
- }, qp = ({ data: e, max: t = 100, color: n, height: r = 280, ariaLabel: i = "Diagnóstico", emptyMessage: a = "Sin datos para mostrar", className: o, showTooltip: s = !0, showLegend: c = !1, showValues: l = !1, valueFormat: u }) => {
16301
+ }, Yp = ({ data: e, max: t = 100, color: n, height: r = 280, ariaLabel: i = "Diagnóstico", emptyMessage: a = "Sin datos para mostrar", className: o, showTooltip: s = !0, showLegend: c = !1, showValues: l = !1, valueFormat: u }) => {
16240
16302
  let d = e.length > 0, f = cs({ color: n }, 0), p = u ?? ps();
16241
16303
  return /* @__PURE__ */ v("div", {
16242
16304
  className: (0, X.default)("sf-chart", o),
@@ -16253,7 +16315,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16253
16315
  /* @__PURE__ */ v(_e, { stroke: "var(--sf-chart-grid)" }),
16254
16316
  /* @__PURE__ */ v(ge, {
16255
16317
  dataKey: "label",
16256
- tick: /* @__PURE__ */ v(Kp, {
16318
+ tick: /* @__PURE__ */ v(Jp, {
16257
16319
  x: 0,
16258
16320
  y: 0,
16259
16321
  payload: { value: "" },
@@ -16291,8 +16353,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
16291
16353
  children: a
16292
16354
  })
16293
16355
  });
16294
- }, Jp = (e) => Math.min(100, Math.max(0, e)), Yp = ({ value: e, average: t, min: n, max: r, unit: i, label: a, valueFormat: o, direction: s = "down-good", className: c }) => {
16295
- let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ? Jp((e - d) / (f - d) * 100) : 50, m = p(e), h = p(t), g = t === 0 ? 0 : (e - t) / Math.abs(t) * 100, _ = s === "neutral" ? null : s === "down-good" ? g <= 0 : g >= 0, b = Math.abs(g) >= .5;
16356
+ }, Xp = (e) => Math.min(100, Math.max(0, e)), Zp = ({ value: e, average: t, min: n, max: r, unit: i, label: a, valueFormat: o, direction: s = "down-good", className: c }) => {
16357
+ let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ? Xp((e - d) / (f - d) * 100) : 50, m = p(e), h = p(t), g = t === 0 ? 0 : (e - t) / Math.abs(t) * 100, _ = s === "neutral" ? null : s === "down-good" ? g <= 0 : g >= 0, b = Math.abs(g) >= .5;
16296
16358
  return /* @__PURE__ */ y("div", {
16297
16359
  className: (0, X.default)("sf-deviation-band", c),
16298
16360
  children: [
@@ -16332,7 +16394,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
16332
16394
  })
16333
16395
  ]
16334
16396
  });
16335
- }, Xp = (e, { initialPageSize: t = 10 } = {}) => {
16397
+ }, Qp = (e, { initialPageSize: t = 10 } = {}) => {
16336
16398
  let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
16337
16399
  let t = n.trim().toLowerCase();
16338
16400
  return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
@@ -16359,37 +16421,37 @@ ${e.map((e) => `<Row>${n.map((t) => {
16359
16421
  ]),
16360
16422
  totalItems: l
16361
16423
  };
16362
- }, Zp = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), Qp = (e) => typeof e == "string" || typeof e == "number", $p = (e, t) => {
16363
- let n = Zp(t);
16424
+ }, $p = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), em = (e) => typeof e == "string" || typeof e == "number", tm = (e, t) => {
16425
+ let n = $p(t);
16364
16426
  return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
16365
- }, em = (e, t, n) => {
16427
+ }, nm = (e, t, n) => {
16366
16428
  if (t?.length) return [...t];
16367
16429
  let r = new Set(n), i = [];
16368
- for (let t in e) r.has(t) || Qp(e[t]) && i.push(t);
16430
+ for (let t in e) r.has(t) || em(e[t]) && i.push(t);
16369
16431
  return i;
16370
- }, tm = (e, t, n) => {
16371
- let r = "", i = em(e, t, n);
16432
+ }, rm = (e, t, n) => {
16433
+ let r = "", i = nm(e, t, n);
16372
16434
  for (let t of i) {
16373
16435
  let n = e[t];
16374
- if (!Qp(n)) continue;
16375
- let i = $p(t, n);
16436
+ if (!em(n)) continue;
16437
+ let i = tm(t, n);
16376
16438
  i && (r += `${i} `);
16377
16439
  }
16378
16440
  return r;
16379
- }, nm = (e) => {
16441
+ }, im = (e) => {
16380
16442
  let t = e.split(";"), n = [];
16381
16443
  for (let e of t) {
16382
- let t = Zp(e);
16444
+ let t = $p(e);
16383
16445
  t.length >= 2 && n.push(t);
16384
16446
  }
16385
16447
  return n;
16386
- }, rm = (e, t) => {
16387
- let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => nm(i), [i]), u = p(() => {
16448
+ }, am = (e, t) => {
16449
+ let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => im(i), [i]), u = p(() => {
16388
16450
  if (!e?.length) return [];
16389
16451
  let t = [];
16390
16452
  for (let n of e) t.push({
16391
16453
  item: n,
16392
- searchIndex: tm(n, o, s)
16454
+ searchIndex: rm(n, o, s)
16393
16455
  });
16394
16456
  return t;
16395
16457
  }, [
@@ -16431,15 +16493,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
16431
16493
  };
16432
16494
  //#endregion
16433
16495
  //#region src/hooks/useArrayPaginator.ts
16434
- function im(e, t, n) {
16496
+ function om(e, t, n) {
16435
16497
  if (t <= 0) return [];
16436
16498
  let r = Math.max(0, n);
16437
16499
  return r >= e.length ? [] : e.slice(r, r + t);
16438
16500
  }
16439
- var am = (e, t, n) => {
16501
+ var sm = (e, t, n) => {
16440
16502
  let r = e?.[n], i = t?.[n];
16441
16503
  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" });
16442
- }, om = (e, t) => {
16504
+ }, cm = (e, t) => {
16443
16505
  let [n, r] = h([]), [i, a] = h(() => ({
16444
16506
  limit: Math.max(1, t?.limit ?? 100),
16445
16507
  offset: 0
@@ -16452,7 +16514,7 @@ var am = (e, t, n) => {
16452
16514
  if (e.length === 0) return [];
16453
16515
  let r = [...e];
16454
16516
  if (n.length > 0) {
16455
- let e = t?.onSortFunc ?? am, i = t?.strictSort ?? !1;
16517
+ let e = t?.onSortFunc ?? sm, i = t?.strictSort ?? !1;
16456
16518
  r.sort((t, r) => {
16457
16519
  for (let { id: a, desc: o } of n) {
16458
16520
  if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
@@ -16462,7 +16524,7 @@ var am = (e, t, n) => {
16462
16524
  return 0;
16463
16525
  });
16464
16526
  }
16465
- return im(r, o, c);
16527
+ return om(r, o, c);
16466
16528
  }, [
16467
16529
  e,
16468
16530
  o,
@@ -16481,7 +16543,7 @@ var am = (e, t, n) => {
16481
16543
  onSortChange: r,
16482
16544
  pageData: u
16483
16545
  };
16484
- }, sm = (e, t) => {
16546
+ }, lm = (e, t) => {
16485
16547
  if (typeof window > "u") return t;
16486
16548
  try {
16487
16549
  let n = window.localStorage.getItem(e);
@@ -16489,8 +16551,8 @@ var am = (e, t, n) => {
16489
16551
  } catch {
16490
16552
  return t;
16491
16553
  }
16492
- }, cm = (e, t) => {
16493
- let [n, r] = h(() => sm(e, t));
16554
+ }, um = (e, t) => {
16555
+ let [n, r] = h(() => lm(e, t));
16494
16556
  return [n, (t) => {
16495
16557
  r((n) => {
16496
16558
  let r = typeof t == "function" ? t(n) : t;
@@ -16500,82 +16562,82 @@ var am = (e, t, n) => {
16500
16562
  return r;
16501
16563
  });
16502
16564
  }];
16503
- }, lm = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), um = (e, t) => {
16565
+ }, dm = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), fm = (e, t) => {
16504
16566
  if (typeof window > "u") return;
16505
16567
  let n = new URL(window.location.href);
16506
16568
  t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
16507
- }, dm = (e) => {
16508
- um(e, null);
16509
- }, fm = (e, t) => {
16569
+ }, pm = (e) => {
16570
+ fm(e, null);
16571
+ }, mm = (e, t) => {
16510
16572
  let [n, r] = h(() => {
16511
16573
  let n = typeof e == "function" ? e() : e;
16512
16574
  if (!t) return n;
16513
- let r = lm(t);
16514
- return r == null || r === "" ? (um(t, n), n) : r;
16575
+ let r = dm(t);
16576
+ return r == null || r === "" ? (fm(t, n), n) : r;
16515
16577
  });
16516
16578
  return [n, (e) => {
16517
16579
  r((n) => {
16518
16580
  let r = typeof e == "function" ? e(n) : e;
16519
- return t && um(t, r), r;
16581
+ return t && fm(t, r), r;
16520
16582
  });
16521
16583
  }];
16522
- }, pm = () => {
16584
+ }, hm = () => {
16523
16585
  let e = globalThis.process?.env?.NODE_ENV;
16524
16586
  return e != null && e === "development";
16525
- }, mm = (e, t) => {
16587
+ }, gm = (e, t) => {
16526
16588
  let n = x({
16527
16589
  resolver: De(e),
16528
16590
  defaultValues: t?.defaultValues
16529
16591
  }), r = (e, t) => n.handleSubmit(e, (e, n) => {
16530
- pm() && console.log(e), t?.(e, n);
16592
+ hm() && console.log(e), t?.(e, n);
16531
16593
  });
16532
16594
  return {
16533
16595
  ...n,
16534
16596
  handleSubmit: r
16535
16597
  };
16536
- }, hm = (e) => {
16537
- let t = El(e);
16598
+ }, _m = (e) => {
16599
+ let t = Dl(e);
16538
16600
  return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
16539
- }, gm = (e, t) => {
16601
+ }, vm = (e, t) => {
16540
16602
  if (typeof document > "u") return;
16541
- let n = `\uFEFF${[t.columns.map((e) => hm(e.header)).join(","), ...e.map((e) => t.columns.map((t) => hm(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
16603
+ let n = `\uFEFF${[t.columns.map((e) => _m(e.header)).join(","), ...e.map((e) => t.columns.map((t) => _m(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
16542
16604
  a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
16543
- }, _m = "Este campo es requerido", vm = "Introduce una dirección de correo electrónico válida", ym = "El correo electrónico es obligatorio", bm = "El valor de este campo es inválido", xm = "Introduce un número de celular válido", Sm = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Cm = (e = _m) => G.string().transform(Sm).required(e), wm = () => G.string().transform(Sm).default(null).nullable(), Tm = (e = ym) => G.string().transform(Sm).email(vm).required(e), Em = (e = vm) => G.string().transform(Sm).test("emailTest", e, (e) => e == null || e === "" || G.string().email().isValidSync(e)).default(null).nullable(), Dm = (e, t = bm, n = _m) => G.string().transform(Sm).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), Om = (e, t = bm) => G.string().transform(Sm).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), km = (e) => {
16605
+ }, ym = "Este campo es requerido", bm = "Introduce una dirección de correo electrónico válida", xm = "El correo electrónico es obligatorio", Sm = "El valor de este campo es inválido", Cm = "Introduce un número de celular válido", wm = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Tm = (e = ym) => G.string().transform(wm).required(e), Em = () => G.string().transform(wm).default(null).nullable(), Dm = (e = xm) => G.string().transform(wm).email(bm).required(e), Om = (e = bm) => G.string().transform(wm).test("emailTest", e, (e) => e == null || e === "" || G.string().email().isValidSync(e)).default(null).nullable(), km = (e, t = Sm, n = ym) => G.string().transform(wm).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), Am = (e, t = Sm) => G.string().transform(wm).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), jm = (e) => {
16544
16606
  let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
16545
16607
  return {
16546
16608
  minLength: t,
16547
16609
  maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
16548
16610
  };
16549
- }, Am = (e) => {
16550
- let { minLength: t, maxLength: n } = km(e), r = /^[0-9]+$/, i = G.string().transform(Sm).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
16611
+ }, Mm = (e) => {
16612
+ let { minLength: t, maxLength: n } = jm(e), r = /^[0-9]+$/, i = G.string().transform(wm).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
16551
16613
  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;
16552
- }, jm = (e) => Am(e).required(_m), Mm = (e) => Am(e).default(null).nullable(), Nm = (e = _m) => G.boolean().typeError("El tipo de dato debe ser booleano").required(e), Pm = () => G.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), Fm = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Im = (e = _m) => G.number().transform(Fm).typeError("Debe ser numérico").required(e), Lm = () => G.number().transform(Fm).typeError("Debe ser numérico").default(null).nullable().notRequired(), Rm = (e = _m) => G.number().transform(Fm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), zm = (e = _m) => Rm(e).integer("Este campo debe ser un número entero"), Bm = () => G.number().transform(Fm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), Vm = () => Bm().integer("Este campo debe ser un número entero"), Hm = (e) => {
16614
+ }, Nm = (e) => Mm(e).required(ym), Pm = (e) => Mm(e).default(null).nullable(), Fm = (e = ym) => G.boolean().typeError("El tipo de dato debe ser booleano").required(e), Im = () => G.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), Lm = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Rm = (e = ym) => G.number().transform(Lm).typeError("Debe ser numérico").required(e), zm = () => G.number().transform(Lm).typeError("Debe ser numérico").default(null).nullable().notRequired(), Bm = (e = ym) => G.number().transform(Lm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), Vm = (e = ym) => Bm(e).integer("Este campo debe ser un número entero"), Hm = () => G.number().transform(Lm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), Um = () => Hm().integer("Este campo debe ser un número entero"), Wm = (e) => {
16553
16615
  let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
16554
16616
  return G.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);
16555
- }, Um = (e = xm) => Hm(e).nullable(), Wm = (e = xm) => Hm(e).required(_m), Gm = (e = _m) => G.array().of(Cm()).min(1, "Debe contener al menos un elemento").required(e), Km = () => G.array().of(wm()).default(null).nullable(), qm = {
16556
- transformNullIfEmpty: Sm,
16557
- requiredString: Cm,
16558
- nullableString: wm,
16559
- requiredEmail: Tm,
16560
- nullableEmail: Em,
16561
- requiredMatchString: Dm,
16562
- nullableOrMatchString: Om,
16563
- requiredStringNumbersOnly: jm,
16564
- nullableStringNumbersOnly: Mm,
16565
- requiredBoolean: Nm,
16566
- nullableBoolean: Pm,
16567
- requiredNumber: Im,
16568
- nullableNumber: Lm,
16569
- requiredPositiveNumber: Rm,
16570
- requiredPositiveInteger: zm,
16571
- nullablePositiveNumber: Bm,
16572
- nullablePositiveInteger: Vm,
16573
- nullableCelular: Um,
16574
- requiredCelular: Wm,
16575
- requiredStringArray: Gm,
16576
- nullableStringArray: Km
16577
- }, Jm = (e) => G.object().shape(e(qm));
16617
+ }, Gm = (e = Cm) => Wm(e).nullable(), Km = (e = Cm) => Wm(e).required(ym), qm = (e = ym) => G.array().of(Tm()).min(1, "Debe contener al menos un elemento").required(e), Jm = () => G.array().of(Em()).default(null).nullable(), Ym = {
16618
+ transformNullIfEmpty: wm,
16619
+ requiredString: Tm,
16620
+ nullableString: Em,
16621
+ requiredEmail: Dm,
16622
+ nullableEmail: Om,
16623
+ requiredMatchString: km,
16624
+ nullableOrMatchString: Am,
16625
+ requiredStringNumbersOnly: Nm,
16626
+ nullableStringNumbersOnly: Pm,
16627
+ requiredBoolean: Fm,
16628
+ nullableBoolean: Im,
16629
+ requiredNumber: Rm,
16630
+ nullableNumber: zm,
16631
+ requiredPositiveNumber: Bm,
16632
+ requiredPositiveInteger: Vm,
16633
+ nullablePositiveNumber: Hm,
16634
+ nullablePositiveInteger: Um,
16635
+ nullableCelular: Gm,
16636
+ requiredCelular: Km,
16637
+ requiredStringArray: qm,
16638
+ nullableStringArray: Jm
16639
+ }, Xm = (e) => G.object().shape(e(Ym));
16578
16640
  //#endregion
16579
- export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar, Kd as AddressSearchInput, ni as Alert, qc as AlertLane, Wc as AlertRowList, Yc as AlertSummaryList, Uf as AllocationBar, Oo as AppBarContainer, Do as AppShell, Co as AppsGridIcon, of as AreaInput, En as AsyncCardSelect, Ar as AsyncCustomTable, wn as AsyncSearchSelect, kn as AsyncSearchTableSelect, yp as AuditTimeline, za as Avatar, Ba as AvatarGroup, Ua as Badge, an as BooleanCheckbox, pa as Breadcrumb, $ as Button, Yr as ButtonGroup, ss as CHART_SERIES_COLORS, cn as COUNTRY_DIAL_CODES, sn as CURRENCY_SYMBOLS, _c as Calendar, ml as CardNote, zf as CardRadioGroup, Tn as CardSelect, zp as Carousel, Gp as Chart, $t as Checkbox, en as CheckboxGroup, Vo as CodeEditor, Ff as ColorInput, Ji as CommandPalette, Qc as ComparisonTable, Ci as ConfirmDialog, Ii as ContextMenuProvider, Qd as CoordinatesInput, _n as CurrencyInput, kr as CustomTable, lr as DEFAULT_PAGE_SIZE_OPTIONS, _l as DashboardBoard, il as DashboardCard, vl as DashboardCardRow, cl as DashboardGrid, fl as DashboardLayout, Sl as DashboardPageFrame, Tl as DashboardPlaceholder, ll as DashboardSection, dl as DashboardStatBar, Lt as DateInput, Ht as DatePicker, Ul as DateRangeFields, Rn as DateRangeInput, Wl as DateRangeUtcInput, yo as DateWeekStrip, Nl as DetailPanel, Ll as DetailPreviewList, Rl as DetailSection, pl as DetailSidePanel, Yp as DeviationBand, qp as DiagnosticRadar, Gn as DisplayField, fn as DniInput, Pc as DonutBreakdown, Dc as DonutGauge, Oc as DonutGaugeRow, Wi as Drawer, Il as DrilldownAlertList, Fl as DrilldownKPICard, Oi as DropdownMenu, ki as DropdownMenuItem, Gr as EditableDataGrid, ri as EmptyState, Zs as EntityCard, $s as EntityCardGrid, ai as ErrorView, zc as EventLog, Xc as EvidenceFootnote, Jr as ExpandableTableSection, Z as FieldLayout, iu as FileDropInput, Un as FileInput, Aa as FilterBar, Ma as FilterBarDate, ja as FilterBarField, Na as FilterBarSelect, Pa as FilterBarText, Qr as FormActions, Da as FormWizard, ca as HeightProvider, Pt as Input, La as ItineraryEditor, As as KPICard, Ms as KPIGrid, Lf as KeyValueInput, Cp as LiveChip, lo as LiveRouteBoard, Fp as LiveStatusBar, ci as LoadingView, Zd as LocationPicker, Uo as MIN_MAP_GEOCODER_QUERY_LENGTH, uc as MONTH_NAMES, Fa as MaestroLayout, mu as MapFrame, gu as MapLegend, os as MapPicker, yu as MapPointCard, hu as MapStatus, _u as MapToolbar, vu as MapVehiclePopup, Xd as MapView, ka as MasterDetailLayout, Oa as MasterDetailListItem, Bp as MediaPanel, Ti as MessageDialog, Vs as MetricBarList, Bs as MetricBarRow, xi as Modal, ac as ModuleCard, oc as ModuleCardGrid, su as MultiPhotoInput, $f as NETWORK_BASEMAPS, ip as NETWORK_EDGE_STYLES, tp as NETWORK_KIND_COLORS, ep as NETWORK_KIND_LABELS, np as NETWORK_STATUS_COLORS, rp as NETWORK_STATUS_LABELS, mr as NUMBER_FILTER_OPS, fp as NetworkLegend, _p as NetworkMap, Vi as NotificationBell, It as NumberInput, Df as NumberStepper, Kf as ORG_TREE_DEFAULT_THEMES, Ai as OptionItem, Qf as OrgTree, Vl as OtpInput, Zi as PageContainer, $i as PageHeader, fr as Pagination, ar as PaginationRangeInput, Za as PassengerBoardCard, Wt as PasswordInput, hn as PhoneInput, fu as PhotoCropInput, au as PhotoInput, Rt as Popover, Xi as ProductTour, Af as ProgressBar, Mf as ProgressBarReadonly, zi as QRView, Ls as QuickActionGrid, Is as QuickActionTile, tn as RadioGroup, kf as RangeSliderInput, Nf as RatingInput, nc as RecommendationCard, Sp as RecordList, xp as RecordListItem, li as RetryBlock, Fo as RichTextEditor, sf as RouteInput, Zr as RowActions, pn as RucInput, xu as SF_DEFAULT_MAP_CENTER, Su as SF_DEFAULT_MAP_ZOOM, Ou as SF_GOOGLE_ENGINE_CAPABILITIES, Du as SF_LEAFLET_ENGINE_CAPABILITIES, bu as SF_MAPS_CONFIG_ERROR, wu as SF_OSM_ATTRIBUTION, Cu as SF_OSM_TILE_URL, Eu as SF_SATELLITE_ATTRIBUTION, Tu as SF_SATELLITE_TILE_URL, pr as STRING_FILTER_OPS, ga as ScrollArea, Sn as SearchSelect, On as SearchTableSelect, Qt as Select, Bf as SemanticSlider, fa as Separator, Ld as SfProvider, Gi as Sheet, ea as SidePanel, oa as SidePanelContainer, ou as SignaturePad, fi as Skeleton, Cf as SliderInput, Bn as SmartDateInput, vn as SmartInput, cf as SmartMapInput, cu as SmartMediaInput, An as SmartSelect, Rf as SortableList, _s as Sparkline, si as Spinner, Fs as SplitBar, lc as StatCard, wa as Stepper, _a as SummaryItem, wo as SyncIcon, ji as TabMenuOption, Rr as TableColumnSettings, vr as TableFiltersPanel, Qi as TablePageLayout, yr as TableSortingPanel, ta as Tabs, If as TagsInput, Gf as TemporalScrub, Ft as TextArea, zn as TimeRangeInput, Rp as Timeline, vi as ToastProvider, nn as Toggle, rn as ToggleCard, Xr as ToolbarButton, Hi as Tooltip, sc as TramoCard, Zt as Transfer, Yt as TreeSelect, uo as UnitSelector, ua as Visibility, da as Visivility, dc as WEEKDAY_LABELS, So as WeekdayToggleStrip, on as YesNoSelect, Va as badgeClassName, Ha as badgeDotClassName, Hr as buildActiveFilterChips, ps as buildDefaultFormatter, mc as buildMonthGrid, qf as buildOrgTreeRows, Xt as buttonClassName, Ln as calcTimeDuration, ff as clampNumber, Ro as codeEditorClassName, _r as columnFilterFn, cp as countNetworkStatus, Yf as countOrgTreeNodes, Jm as createFormSchema, er as createLocalStorageAsyncStateStore, Zl as createPhotoItem, tu as cropImageToSquare, am as defaultOnSortFunc, Pl as detailHasRows, Gl as emptyDateRange, gf as emptyKeyValuePairs, vf as emptyNumberRange, pu as emptyPhotoItems, mf as emptyTags, Kl as emptyTimeRange, gm as exportTableCsv, kl as exportTableXlsx, Q as fieldClassName, Vr as formatColumnFilterValue, Go as formatMapGeocoderLabel, pf as formatSliderLabel, Pn as fromUtcDateIso, gr as inferInitialFilterValue, jt as inputFocusTransition, Wr as isBlankRow, hr as isColumnFilterValue, Mn as isValidDateString, Yl as isValidFileType, dp as networkEdgeLines, lp as networkMapBounds, up as networkNodePositions, Jl as nextPhotoId, Fn as normalizeDateRange, bf as normalizeHexColor, _f as normalizeKeyValuePairs, sp as normalizeNetworkEdges, op as normalizeNetworkNodes, yf as normalizeNumberRange, eu as normalizePhotoItems, hf as normalizeTags, In as normalizeTimeRange, Pm as nullableBoolean, Um as nullableCelular, Em as nullableEmail, Lm as nullableNumber, Om as nullableOrMatchString, Vm as nullablePositiveInteger, Bm as nullablePositiveNumber, wm as nullableString, Km as nullableStringArray, Mm as nullableStringNumbersOnly, Xf as orgTreeRootNodes, pc as parseYMD, xf as progressPercent, hs as rawValueKey, lm as readQueryValue, dm as removeQueryValue, Nm as requiredBoolean, Wm as requiredCelular, Tm as requiredEmail, Dm as requiredMatchString, Im as requiredNumber, zm as requiredPositiveInteger, Rm as requiredPositiveNumber, Cm as requiredString, Gm as requiredStringArray, jm as requiredStringNumbersOnly, Jf as resolveOrgTreeTheme, cs as resolveSeriesColor, Ql as revokePhotoPreview, $l as revokePhotoPreviews, ln as sanitizeDigits, Wo as searchMapAddresses, wd as sfClampLatitude, Td as sfClampLongitude, Sd as sfFormatCoordinate, Dd as sfLatLngToString, kd as sfMarkerFromLatLng, Od as sfNormalizeLatLng, Ed as sfParseCoordinate, Xl as showFilePicker, Mt as textareaClassName, mo as toIsoDate, jn as toLocalDateYMD, fc as toLocalYMD, gs as toStacked100Data, Jt as toStringArray, Nn as toUtcDateIso, Sm as transformNullIfEmpty, um as updateQueryValue, Bd as useAddressSearch, om as useArrayPaginator, Cn as useAsyncOptions, Mi as useClickAway, la as useContainerHeight, Ri as useContextMenu, mm as useCustomForm, jr as useCustomTableController, Al as useDetailPanel, Di as useDropdownClose, rm as useFilterData, Ea as useFormWizard, Lo as useIsClient, Xp as useMaestroFilter, Vd as useMapEngine, Hd as useMapsConfig, Si as useModal, fm as useQueryStringState, Ud as useReverseGeocode, Rd as useSf, zd as useSfMaps, ia as useSidePanelContainer, na as useSidePanelHandle, cm as useStoredState, Ir as useTableColumnSettings, yi as useToast, dn as validateDni, un as validateRuc, qm as validators };
16641
+ export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar, qd as AddressSearchInput, ni as Alert, Jc as AlertLane, Gc as AlertRowList, Xc as AlertSummaryList, Wf as AllocationBar, Oo as AppBarContainer, Do as AppShell, Co as AppsGridIcon, sf as AreaInput, En as AsyncCardSelect, Ar as AsyncCustomTable, wn as AsyncSearchSelect, kn as AsyncSearchTableSelect, bp as AuditTimeline, za as Avatar, Ba as AvatarGroup, Ua as Badge, an as BooleanCheckbox, pa as Breadcrumb, $ as Button, Yr as ButtonGroup, ss as CHART_SERIES_COLORS, cn as COUNTRY_DIAL_CODES, sn as CURRENCY_SYMBOLS, _c as Calendar, hl as CardNote, Bf as CardRadioGroup, Tn as CardSelect, Bp as Carousel, Kp as Chart, qp as ChartLegend, $t as Checkbox, en as CheckboxGroup, Vo as CodeEditor, If as ColorInput, Ji as CommandPalette, $c as ComparisonTable, Ci as ConfirmDialog, Ii as ContextMenuProvider, $d as CoordinatesInput, _n as CurrencyInput, kr as CustomTable, lr as DEFAULT_PAGE_SIZE_OPTIONS, vl as DashboardBoard, al as DashboardCard, yl as DashboardCardRow, ll as DashboardGrid, pl as DashboardLayout, Cl as DashboardPageFrame, El as DashboardPlaceholder, ul as DashboardSection, fl as DashboardStatBar, Lt as DateInput, Ht as DatePicker, Wl as DateRangeFields, Rn as DateRangeInput, Gl as DateRangeUtcInput, yo as DateWeekStrip, Pl as DetailPanel, Rl as DetailPreviewList, zl as DetailSection, ml as DetailSidePanel, Zp as DeviationBand, Yp as DiagnosticRadar, Gn as DisplayField, fn as DniInput, Fc as DonutBreakdown, Dc as DonutGauge, Oc as DonutGaugeRow, Wi as Drawer, Ll as DrilldownAlertList, Il as DrilldownKPICard, Oi as DropdownMenu, ki as DropdownMenuItem, Gr as EditableDataGrid, ri as EmptyState, Zs as EntityCard, $s as EntityCardGrid, ai as ErrorView, Bc as EventLog, Zc as EvidenceFootnote, Jr as ExpandableTableSection, Z as FieldLayout, au as FileDropInput, Un as FileInput, Aa as FilterBar, Ma as FilterBarDate, ja as FilterBarField, Na as FilterBarSelect, Pa as FilterBarText, Qr as FormActions, Da as FormWizard, ca as HeightProvider, Pt as Input, La as ItineraryEditor, As as KPICard, Ms as KPIGrid, Rf as KeyValueInput, wp as LiveChip, lo as LiveRouteBoard, Ip as LiveStatusBar, ci as LoadingView, Qd as LocationPicker, Uo as MIN_MAP_GEOCODER_QUERY_LENGTH, uc as MONTH_NAMES, Fa as MaestroLayout, hu as MapFrame, _u as MapLegend, os as MapPicker, bu as MapPointCard, gu as MapStatus, vu as MapToolbar, yu as MapVehiclePopup, Zd as MapView, ka as MasterDetailLayout, Oa as MasterDetailListItem, Vp as MediaPanel, Ti as MessageDialog, Vs as MetricBarList, Bs as MetricBarRow, xi as Modal, ac as ModuleCard, oc as ModuleCardGrid, cu as MultiPhotoInput, ep as NETWORK_BASEMAPS, ap as NETWORK_EDGE_STYLES, np as NETWORK_KIND_COLORS, tp as NETWORK_KIND_LABELS, rp as NETWORK_STATUS_COLORS, ip as NETWORK_STATUS_LABELS, mr as NUMBER_FILTER_OPS, pp as NetworkLegend, vp as NetworkMap, Vi as NotificationBell, It as NumberInput, Of as NumberStepper, qf as ORG_TREE_DEFAULT_THEMES, Ai as OptionItem, $f as OrgTree, Hl as OtpInput, Zi as PageContainer, $i as PageHeader, fr as Pagination, ar as PaginationRangeInput, Za as PassengerBoardCard, Wt as PasswordInput, hn as PhoneInput, pu as PhotoCropInput, ou as PhotoInput, Rt as Popover, Xi as ProductTour, jf as ProgressBar, Nf as ProgressBarReadonly, zi as QRView, Ls as QuickActionGrid, Is as QuickActionTile, tn as RadioGroup, Af as RangeSliderInput, Pf as RatingInput, nc as RecommendationCard, Cp as RecordList, Sp as RecordListItem, li as RetryBlock, Fo as RichTextEditor, cf as RouteInput, Zr as RowActions, pn as RucInput, Su as SF_DEFAULT_MAP_CENTER, Cu as SF_DEFAULT_MAP_ZOOM, ku as SF_GOOGLE_ENGINE_CAPABILITIES, Ou as SF_LEAFLET_ENGINE_CAPABILITIES, xu as SF_MAPS_CONFIG_ERROR, Tu as SF_OSM_ATTRIBUTION, wu as SF_OSM_TILE_URL, Du as SF_SATELLITE_ATTRIBUTION, Eu as SF_SATELLITE_TILE_URL, pr as STRING_FILTER_OPS, ga as ScrollArea, Sn as SearchSelect, On as SearchTableSelect, Qt as Select, Vf as SemanticSlider, fa as Separator, Rd as SfProvider, Gi as Sheet, ea as SidePanel, oa as SidePanelContainer, su as SignaturePad, fi as Skeleton, wf as SliderInput, Bn as SmartDateInput, vn as SmartInput, lf as SmartMapInput, lu as SmartMediaInput, An as SmartSelect, zf as SortableList, _s as Sparkline, si as Spinner, Fs as SplitBar, lc as StatCard, wa as Stepper, _a as SummaryItem, wo as SyncIcon, ji as TabMenuOption, Rr as TableColumnSettings, vr as TableFiltersPanel, Qi as TablePageLayout, yr as TableSortingPanel, ta as Tabs, Lf as TagsInput, Kf as TemporalScrub, Ft as TextArea, zn as TimeRangeInput, zp as Timeline, vi as ToastProvider, nn as Toggle, rn as ToggleCard, Xr as ToolbarButton, Hi as Tooltip, sc as TramoCard, Zt as Transfer, Yt as TreeSelect, uo as UnitSelector, ua as Visibility, da as Visivility, dc as WEEKDAY_LABELS, So as WeekdayToggleStrip, on as YesNoSelect, Va as badgeClassName, Ha as badgeDotClassName, Hr as buildActiveFilterChips, ps as buildDefaultFormatter, mc as buildMonthGrid, Jf as buildOrgTreeRows, Xt as buttonClassName, Ln as calcTimeDuration, pf as clampNumber, Ro as codeEditorClassName, _r as columnFilterFn, lp as countNetworkStatus, Xf as countOrgTreeNodes, Xm as createFormSchema, er as createLocalStorageAsyncStateStore, Ql as createPhotoItem, nu as cropImageToSquare, sm as defaultOnSortFunc, Fl as detailHasRows, Kl as emptyDateRange, _f as emptyKeyValuePairs, yf as emptyNumberRange, mu as emptyPhotoItems, hf as emptyTags, ql as emptyTimeRange, vm as exportTableCsv, Al as exportTableXlsx, Q as fieldClassName, Vr as formatColumnFilterValue, Go as formatMapGeocoderLabel, mf as formatSliderLabel, Pn as fromUtcDateIso, gr as inferInitialFilterValue, jt as inputFocusTransition, Wr as isBlankRow, hr as isColumnFilterValue, Mn as isValidDateString, Xl as isValidFileType, fp as networkEdgeLines, up as networkMapBounds, dp as networkNodePositions, Yl as nextPhotoId, Fn as normalizeDateRange, xf as normalizeHexColor, vf as normalizeKeyValuePairs, cp as normalizeNetworkEdges, sp as normalizeNetworkNodes, bf as normalizeNumberRange, tu as normalizePhotoItems, gf as normalizeTags, In as normalizeTimeRange, Im as nullableBoolean, Gm as nullableCelular, Om as nullableEmail, zm as nullableNumber, Am as nullableOrMatchString, Um as nullablePositiveInteger, Hm as nullablePositiveNumber, Em as nullableString, Jm as nullableStringArray, Pm as nullableStringNumbersOnly, Zf as orgTreeRootNodes, pc as parseYMD, Sf as progressPercent, hs as rawValueKey, dm as readQueryValue, pm as removeQueryValue, Fm as requiredBoolean, Km as requiredCelular, Dm as requiredEmail, km as requiredMatchString, Rm as requiredNumber, Vm as requiredPositiveInteger, Bm as requiredPositiveNumber, Tm as requiredString, qm as requiredStringArray, Nm as requiredStringNumbersOnly, Yf as resolveOrgTreeTheme, cs as resolveSeriesColor, $l as revokePhotoPreview, eu as revokePhotoPreviews, ln as sanitizeDigits, Wo as searchMapAddresses, Td as sfClampLatitude, Ed as sfClampLongitude, Cd as sfFormatCoordinate, Od as sfLatLngToString, Ad as sfMarkerFromLatLng, kd as sfNormalizeLatLng, Dd as sfParseCoordinate, Zl as showFilePicker, Mt as textareaClassName, mo as toIsoDate, jn as toLocalDateYMD, fc as toLocalYMD, gs as toStacked100Data, Jt as toStringArray, Nn as toUtcDateIso, wm as transformNullIfEmpty, fm as updateQueryValue, Vd as useAddressSearch, cm as useArrayPaginator, Cn as useAsyncOptions, Mi as useClickAway, la as useContainerHeight, Ri as useContextMenu, gm as useCustomForm, jr as useCustomTableController, jl as useDetailPanel, Di as useDropdownClose, am as useFilterData, Ea as useFormWizard, Lo as useIsClient, Qp as useMaestroFilter, Hd as useMapEngine, Ud as useMapsConfig, Si as useModal, mm as useQueryStringState, Wd as useReverseGeocode, zd as useSf, Bd as useSfMaps, ia as useSidePanelContainer, na as useSidePanelHandle, um as useStoredState, Ir as useTableColumnSettings, yi as useToast, dn as validateDni, un as validateRuc, Ym as validators };
16580
16642
 
16581
16643
  //# sourceMappingURL=sf-ui.js.map