@isettingkit/business-rules 2.1.13 → 2.1.15

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.
Files changed (2) hide show
  1. package/dist/index.es.js +345 -344
  2. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as i, jsxs as m, Fragment as P } from "react/jsx-runtime";
2
- import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
3
- import { inube as E, Stack as y, Divider as q, Icon as V, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as cn, Button as H, Grid as Xe, Toggle as un, Checkbox as An, Date as Le, Box as qt, Tag as Ne, Tabs as st, SkeletonIcon as Bt, Fieldset as _e, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
4
- import w, { keyframes as $n, ThemeContext as In } from "styled-components";
5
- import { ValueDataType as U, ValueHowToSetUp as ee, DecisionConditionRender as on, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
2
+ import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as _t, MdOutlineChevronRight as Ut, MdOutlineError as Ht } from "react-icons/md";
3
+ import { inube as E, Stack as y, Divider as q, Icon as V, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as cn, Button as H, Grid as Xe, Toggle as un, Checkbox as An, Date as Le, Box as qt, Tag as Ne, Tabs as st, SkeletonIcon as Bt, Fieldset as Ue, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
4
+ import C, { keyframes as $n, ThemeContext as In } from "styled-components";
5
+ import { ValueDataType as _, ValueHowToSetUp as ee, DecisionConditionRender as on, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
6
6
  import { DecisionViewConditionRenderer as Ie, DecisionViewConditionRendererNew as Je } from "@isettingkit/view";
7
7
  import { createPortal as pn } from "react-dom";
8
8
  import { useFormik as Rn } from "formik";
9
- import { string as se, mixed as ze, object as ne, number as de, lazy as Ge, date as Oe } from "yup";
9
+ import { string as de, mixed as ze, object as ne, number as ce, lazy as Ge, date as Oe } from "yup";
10
10
  import z, { useState as j, useRef as Re, useEffect as Ae, useContext as Fn, forwardRef as Qt, useMemo as dt, useCallback as Kt } from "react";
11
11
  import { Link as ct, useLocation as Zt } from "react-router-dom";
12
12
  import Jt from "axios";
13
13
  import { franc as er } from "franc-min";
14
- const nr = w.div`
14
+ const nr = C.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
@@ -27,7 +27,7 @@ const nr = w.div`
27
27
  height: 100%;
28
28
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
29
29
  `;
30
- w.div`
30
+ C.div`
31
31
  width: 100%;
32
32
  height: 100%;
33
33
  overflow-y: auto;
@@ -81,7 +81,7 @@ const dr = {
81
81
  }, He = (e) => {
82
82
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = dr[e == null ? void 0 : e.howToSetTheDecision] || tr;
83
83
  return t && r(n) || n || void 0;
84
- }, jn = w.div`
84
+ }, jn = C.div`
85
85
  & > div {
86
86
  border-radius: 8px;
87
87
  border: 1px solid
@@ -90,7 +90,7 @@ const dr = {
90
90
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
91
91
  }};
92
92
  }
93
- `, Un = w.div`
93
+ `, _n = C.div`
94
94
  width: 100%;
95
95
  height: 100%;
96
96
  overflow-y: auto;
@@ -132,7 +132,7 @@ const dr = {
132
132
  }
133
133
  ) }, t.ruleName),
134
134
  /* @__PURE__ */ i(q, { dashed: !0 }),
135
- /* @__PURE__ */ i(Un, { children: /* @__PURE__ */ m(
135
+ /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ m(
136
136
  y,
137
137
  {
138
138
  direction: "column",
@@ -182,7 +182,7 @@ const dr = {
182
182
  /* @__PURE__ */ i(q, { dashed: !0 }),
183
183
  /* @__PURE__ */ i(J, { animated: !0, width: "150px" })
184
184
  ] }),
185
- /* @__PURE__ */ i(Un, { children: /* @__PURE__ */ i(
185
+ /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ i(
186
186
  y,
187
187
  {
188
188
  direction: "column",
@@ -212,7 +212,7 @@ const dr = {
212
212
  labelName: r == null ? void 0 : r.terms,
213
213
  value: String(n.effectiveFrom),
214
214
  howToSetTheDecision: ee.RANGE,
215
- decisionDataType: U.DATE
215
+ decisionDataType: _.DATE
216
216
  },
217
217
  valueData: He({
218
218
  labelName: r == null ? void 0 : r.terms,
@@ -221,20 +221,20 @@ const dr = {
221
221
  to: String(n.validUntil)
222
222
  },
223
223
  howToSetTheDecision: ee.RANGE,
224
- decisionDataType: U.DATE
224
+ decisionDataType: _.DATE
225
225
  })
226
226
  } : o && !a ? {
227
227
  element: {
228
228
  labelName: r == null ? void 0 : r.terms,
229
229
  value: String(n.effectiveFrom),
230
230
  howToSetTheDecision: ee.EQUAL,
231
- decisionDataType: U.DATE
231
+ decisionDataType: _.DATE
232
232
  },
233
233
  valueData: He({
234
234
  labelName: r == null ? void 0 : r.terms,
235
235
  value: String(n.effectiveFrom),
236
236
  howToSetTheDecision: ee.EQUAL,
237
- decisionDataType: U.DATE
237
+ decisionDataType: _.DATE
238
238
  })
239
239
  } : null, d = n ? {
240
240
  labelName: n.labelName || "",
@@ -258,12 +258,12 @@ const dr = {
258
258
  visibleConditions: l
259
259
  }
260
260
  );
261
- }, ur = w.div`
261
+ }, ur = C.div`
262
262
  position: relative;
263
263
  & > div {
264
264
  padding: 24px 16px;
265
265
  }
266
- `, pr = w.div`
266
+ `, pr = C.div`
267
267
  background-color: ${({ theme: e }) => {
268
268
  var n, t;
269
269
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
@@ -321,7 +321,7 @@ const dr = {
321
321
  transform: translateY(0);
322
322
  }
323
323
  `;
324
- w.div`
324
+ C.div`
325
325
  border-radius: 8px;
326
326
  border: 1px solid
327
327
  ${({ theme: e }) => {
@@ -335,7 +335,7 @@ w.div`
335
335
  height: 100%;
336
336
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
337
337
  `;
338
- w.div`
338
+ C.div`
339
339
  & > div {
340
340
  border-radius: 8px;
341
341
  border: 1px solid
@@ -345,7 +345,7 @@ w.div`
345
345
  }};
346
346
  }
347
347
  `;
348
- const pt = w.div`
348
+ const pt = C.div`
349
349
  & > div {
350
350
  background-color: ${({ theme: e }) => {
351
351
  var n, t;
@@ -358,18 +358,18 @@ const pt = w.div`
358
358
  height: 100%;
359
359
  padding-bottom: 12px;
360
360
  cursor: pointer;
361
- `, Ke = w.div`
361
+ `, Ke = C.div`
362
362
  width: 100%;
363
363
  height: 100%;
364
364
  & > div {
365
365
  animation: ${gr} 600ms ease-out;
366
366
  }
367
- `, hr = w.div`
367
+ `, hr = C.div`
368
368
  & > div > div {
369
369
  border-radius: 8px;
370
370
  box-sizing: border-box;
371
371
  }
372
- `, fr = w.div`
372
+ `, fr = C.div`
373
373
  & > div {
374
374
  width: 100%;
375
375
  height: 100%;
@@ -504,7 +504,7 @@ const pt = w.div`
504
504
  handleSubmitForm: g,
505
505
  handleDelete: f,
506
506
  terms: h = !0
507
- } = e, x = te("(max-width: 681px)"), b = te("(max-width: 400px)"), { renderedCards: C, shouldRenderAddCard: T } = xr({
507
+ } = e, x = te("(max-width: 681px)"), b = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = xr({
508
508
  controls: n,
509
509
  customTitleContentAddCard: t,
510
510
  decisions: o,
@@ -566,7 +566,7 @@ const pt = w.div`
566
566
  padding: "6px",
567
567
  height: x ? "auto" : "484px",
568
568
  children: [
569
- C,
569
+ D,
570
570
  T && Cn({
571
571
  type: "add",
572
572
  index: o == null ? void 0 : o.length,
@@ -602,12 +602,12 @@ const pt = w.div`
602
602
  }
603
603
  )
604
604
  ] });
605
- }, Tr = w.div`
605
+ }, Tr = C.div`
606
606
  position: relative;
607
607
  & > div {
608
608
  padding: 24px 16px;
609
609
  }
610
- `, wr = w.div`
610
+ `, wr = C.div`
611
611
  background-color: ${({ theme: e }) => {
612
612
  var n, t;
613
613
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
@@ -665,7 +665,7 @@ const pt = w.div`
665
665
  transform: translateY(0);
666
666
  }
667
667
  `;
668
- w.div`
668
+ C.div`
669
669
  border-radius: 8px;
670
670
  border: 1px solid
671
671
  ${({ theme: e }) => {
@@ -679,7 +679,7 @@ w.div`
679
679
  height: 100%;
680
680
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
681
681
  `;
682
- w.div`
682
+ C.div`
683
683
  & > div {
684
684
  border-radius: 8px;
685
685
  border: 1px solid
@@ -689,7 +689,7 @@ w.div`
689
689
  }};
690
690
  }
691
691
  `;
692
- w.div`
692
+ C.div`
693
693
  & > div {
694
694
  background-color: ${({ theme: e }) => {
695
695
  var n, t;
@@ -703,19 +703,19 @@ w.div`
703
703
  padding-bottom: 12px;
704
704
  cursor: pointer;
705
705
  `;
706
- w.div`
706
+ C.div`
707
707
  width: 100%;
708
708
  height: 100%;
709
709
  & > div {
710
710
  animation: ${Dr} 600ms ease-out;
711
711
  }
712
712
  `;
713
- const Sr = w.div`
713
+ const Sr = C.div`
714
714
  & > div > div {
715
715
  border-radius: 8px;
716
716
  box-sizing: border-box;
717
717
  }
718
- `, Er = w.div`
718
+ `, Er = C.div`
719
719
  & > div {
720
720
  width: 100%;
721
721
  height: 100%;
@@ -762,7 +762,7 @@ const Sr = w.div`
762
762
  }, qe = (e) => {
763
763
  const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Or[e == null ? void 0 : e.howToSetTheDecision] || kr;
764
764
  return t && r(n) || n || void 0;
765
- }, _n = w.div`
765
+ }, Un = C.div`
766
766
  & > div {
767
767
  border-radius: 8px;
768
768
  border: 1px solid
@@ -771,7 +771,7 @@ const Sr = w.div`
771
771
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
772
772
  }};
773
773
  }
774
- `, Hn = w.div`
774
+ `, Hn = C.div`
775
775
  width: 100%;
776
776
  height: 100%;
777
777
  overflow-y: auto;
@@ -832,7 +832,7 @@ const Sr = w.div`
832
832
  children: l.factsThatConditionIt
833
833
  }
834
834
  ),
835
- p.length > 0 && p.map((u) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
835
+ p.length > 0 && p.map((u) => /* @__PURE__ */ i(Un, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
836
836
  Ie,
837
837
  {
838
838
  element: { ...u, value: u.value },
@@ -870,7 +870,7 @@ const Sr = w.div`
870
870
  gap: "12px",
871
871
  justifyContent: "space-between",
872
872
  height: "203px",
873
- children: s.map((u, c) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ m(
873
+ children: s.map((u, c) => /* @__PURE__ */ i(Un, { children: /* @__PURE__ */ m(
874
874
  y,
875
875
  {
876
876
  direction: "column",
@@ -895,7 +895,7 @@ const Sr = w.div`
895
895
  labelName: r == null ? void 0 : r.terms,
896
896
  value: String(n.effectiveFrom),
897
897
  howToSetTheDecision: ee.RANGE,
898
- decisionDataType: U.DATE
898
+ decisionDataType: _.DATE
899
899
  },
900
900
  valueData: qe({
901
901
  labelName: r == null ? void 0 : r.terms,
@@ -904,20 +904,20 @@ const Sr = w.div`
904
904
  to: String(n.validUntil)
905
905
  },
906
906
  howToSetTheDecision: ee.RANGE,
907
- decisionDataType: U.DATE
907
+ decisionDataType: _.DATE
908
908
  })
909
909
  } : o && !a ? {
910
910
  element: {
911
911
  labelName: r == null ? void 0 : r.terms,
912
912
  value: String(n.effectiveFrom),
913
913
  howToSetTheDecision: ee.EQUAL,
914
- decisionDataType: U.DATE
914
+ decisionDataType: _.DATE
915
915
  },
916
916
  valueData: qe({
917
917
  labelName: r == null ? void 0 : r.terms,
918
918
  value: String(n.effectiveFrom),
919
919
  howToSetTheDecision: ee.EQUAL,
920
- decisionDataType: U.DATE
920
+ decisionDataType: _.DATE
921
921
  })
922
922
  } : null, d = n ? {
923
923
  labelName: n.labelName || "",
@@ -939,7 +939,7 @@ const Sr = w.div`
939
939
  visibleConditions: l
940
940
  }
941
941
  );
942
- }, jr = w.div`
942
+ }, jr = C.div`
943
943
  border-radius: 8px;
944
944
  border: 1px solid
945
945
  ${({ theme: e }) => {
@@ -955,7 +955,7 @@ const Sr = w.div`
955
955
  height: 100%;
956
956
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
957
957
  `;
958
- w.div`
958
+ C.div`
959
959
  width: 100%;
960
960
  height: 100%;
961
961
  overflow-y: auto;
@@ -974,7 +974,7 @@ w.div`
974
974
  border-radius: 8px;
975
975
  }
976
976
  `;
977
- const Ur = (e) => {
977
+ const _r = (e) => {
978
978
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
979
979
  return /* @__PURE__ */ i(jr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
980
980
  n,
@@ -994,12 +994,12 @@ const Ur = (e) => {
994
994
  ) })
995
995
  ] })
996
996
  ] }) });
997
- }, _r = (e) => {
997
+ }, Ur = (e) => {
998
998
  const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
999
999
  return n ? /* @__PURE__ */ i(Ke, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
1000
1000
  /* @__PURE__ */ i($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
1001
1001
  /* @__PURE__ */ i(
1002
- Ur,
1002
+ _r,
1003
1003
  {
1004
1004
  id: n.decisionId,
1005
1005
  handleDelete: () => o ? o(n.decisionId) : null,
@@ -1047,13 +1047,13 @@ const Ur = (e) => {
1047
1047
  ] }) }, `add-decision-${t}`);
1048
1048
  }, qr = {
1049
1049
  loading: Nr,
1050
- decision: _r,
1050
+ decision: Ur,
1051
1051
  add: Hr
1052
1052
  }, Dn = (e) => {
1053
1053
  const { type: n } = e, t = qr[n];
1054
1054
  return t ? t(e) : null;
1055
1055
  }, Br = (e) => ({
1056
- schema: se().required("Requerido").test(
1056
+ schema: de().required("Requerido").test(
1057
1057
  "non-empty",
1058
1058
  "El valor no puede estar vacío",
1059
1059
  (n) => n != null && n.trim() !== ""
@@ -1081,8 +1081,8 @@ const Ur = (e) => {
1081
1081
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
1082
1082
  return {
1083
1083
  schema: ne({
1084
- from: de().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
- to: de().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1084
+ from: ce().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
1085
+ to: ce().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
1086
1086
  "is-greater",
1087
1087
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
1088
1088
  function(r) {
@@ -1093,11 +1093,11 @@ const Ur = (e) => {
1093
1093
  }),
1094
1094
  value: { from: n, to: t }
1095
1095
  };
1096
- }, bn = (e, n) => n === U.PERCENTAGE ? {
1097
- schema: de().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1096
+ }, bn = (e, n) => n === _.PERCENTAGE ? {
1097
+ schema: ce().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
1098
1098
  value: e
1099
1099
  } : {
1100
- schema: se().required("Requerido"),
1100
+ schema: de().required("Requerido"),
1101
1101
  value: e
1102
1102
  }, Xr = {
1103
1103
  [A.LIST_OF_VALUES]: Gr,
@@ -1135,7 +1135,7 @@ function Zr({
1135
1135
  var c, g;
1136
1136
  const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((f, h) => (tn(h.value) && (f[h.conditionName] = h.value), f), {}), a = Object.keys(o).length > 0, s = {
1137
1137
  ruleName: e.ruleName || "",
1138
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
1138
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
1139
1139
  howToSetTheDecision: e.howToSetTheDecision || "",
1140
1140
  value: e.value ?? "",
1141
1141
  effectiveFrom: e.effectiveFrom || "",
@@ -1151,7 +1151,7 @@ function Zr({
1151
1151
  };
1152
1152
  let d;
1153
1153
  const l = {
1154
- ruleName: se().required("El nombre de la regla es requerido"),
1154
+ ruleName: de().required("El nombre de la regla es requerido"),
1155
1155
  value: Ge(() => Qr(
1156
1156
  d.values.howToSetTheDecision
1157
1157
  )(
@@ -1165,9 +1165,9 @@ function Zr({
1165
1165
  (f, h, { parent: x }) => (x == null ? void 0 : x.checkClosed) ? h.required("La fecha de finalización es requerida").test(
1166
1166
  "is-after-startDate",
1167
1167
  "La fecha de finalización debe ser mayor o igual a la fecha de inicio",
1168
- function(C) {
1168
+ function(D) {
1169
1169
  const T = this.parent.effectiveFrom;
1170
- return !T || !C ? !0 : new Date(C) >= new Date(T);
1170
+ return !T || !D ? !0 : new Date(D) >= new Date(T);
1171
1171
  }
1172
1172
  ) : h.notRequired()
1173
1173
  ));
@@ -1177,8 +1177,8 @@ function Zr({
1177
1177
  validationSchema: p,
1178
1178
  validateOnBlur: !0,
1179
1179
  onSubmit: (f) => {
1180
- var C;
1181
- const h = ((C = e.conditionGroups) == null ? void 0 : C.ConditionGroupId) ?? "group-primary", x = f.toggleNone ? [] : Kr(f, r), b = {
1180
+ var D;
1181
+ const h = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = f.toggleNone ? [] : Kr(f, r), b = {
1182
1182
  ...e,
1183
1183
  ruleName: f.ruleName,
1184
1184
  decisionDataType: f.decisionDataType,
@@ -1210,7 +1210,7 @@ function Zr({
1210
1210
  });
1211
1211
  } };
1212
1212
  }
1213
- const Jr = w.div`
1213
+ const Jr = C.div`
1214
1214
  & > div {
1215
1215
  border-radius: 8px;
1216
1216
  border: 1px solid
@@ -1219,7 +1219,7 @@ const Jr = w.div`
1219
1219
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
1220
1220
  }};
1221
1221
  }
1222
- `, eo = w.div`
1222
+ `, eo = C.div`
1223
1223
  width: 100%;
1224
1224
  height: 100%;
1225
1225
  overflow-y: auto;
@@ -1278,10 +1278,10 @@ const Jr = w.div`
1278
1278
  messageEnd: c = "",
1279
1279
  statusStart: g = "pending",
1280
1280
  statusEnd: f = "pending"
1281
- } = e, [h, x] = j(s), [b, C] = j(l), [T, S] = j(p), N = ({ target: k }) => {
1281
+ } = e, [h, x] = j(s), [b, D] = j(l), [T, S] = j(p), N = ({ target: k }) => {
1282
1282
  x(k.checked), r && r(k.checked);
1283
- }, D = (k) => {
1284
- C(k.target.value), n(k);
1283
+ }, w = (k) => {
1284
+ D(k.target.value), n(k);
1285
1285
  }, I = (k) => {
1286
1286
  S(k.target.value), t(k);
1287
1287
  }, L = te("(max-width: 400px)");
@@ -1329,7 +1329,7 @@ const Jr = w.div`
1329
1329
  {
1330
1330
  id: "dateStart",
1331
1331
  label: o,
1332
- onChange: D,
1332
+ onChange: w,
1333
1333
  value: b,
1334
1334
  required: d,
1335
1335
  size: "compact",
@@ -1478,8 +1478,8 @@ const Jr = w.div`
1478
1478
  visibleConditions: l,
1479
1479
  normalizedDecision: d,
1480
1480
  handleToggleNoneChange: s,
1481
- handleConditionToggleChange: (x, b) => (C) => {
1482
- if (!C)
1481
+ handleConditionToggleChange: (x, b) => (D) => {
1482
+ if (!D)
1483
1483
  a.setFieldValue(
1484
1484
  `conditionsThatEstablishesTheDecision.${x}`,
1485
1485
  void 0
@@ -1550,7 +1550,7 @@ const Jr = w.div`
1550
1550
  handleSubmitForm: g,
1551
1551
  handleDelete: f,
1552
1552
  terms: h = !0
1553
- } = e, x = te("(max-width: 681px)"), b = te("(max-width: 400px)"), { renderedCards: C, shouldRenderAddCard: T } = ao({
1553
+ } = e, x = te("(max-width: 681px)"), b = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ao({
1554
1554
  controls: n,
1555
1555
  customTitleContentAddCard: t,
1556
1556
  decisions: o,
@@ -1612,7 +1612,7 @@ const Jr = w.div`
1612
1612
  padding: "6px",
1613
1613
  height: x ? "auto" : "484px",
1614
1614
  children: [
1615
- C,
1615
+ D,
1616
1616
  T && Dn({
1617
1617
  type: "add",
1618
1618
  index: o == null ? void 0 : o.length,
@@ -1679,7 +1679,7 @@ const Jr = w.div`
1679
1679
  return n;
1680
1680
  }
1681
1681
  return typeof n == "object" && n !== null && !Array.isArray(n) ? (ho[e == null ? void 0 : e.howToSetTheDecision] || io)(n) : n || void 0;
1682
- }, fo = w.div`
1682
+ }, fo = C.div`
1683
1683
  display: flex;
1684
1684
  justify-content: ${({ $justifyContent: e }) => e};
1685
1685
  align-items: ${({ $alignItems: e }) => e};
@@ -1720,7 +1720,7 @@ const Jr = w.div`
1720
1720
  margin: h = "0px",
1721
1721
  padding: x = "0px",
1722
1722
  boxSizing: b,
1723
- scroll: C = !1
1723
+ scroll: D = !1
1724
1724
  } = e;
1725
1725
  return /* @__PURE__ */ i(
1726
1726
  fo,
@@ -1740,14 +1740,14 @@ const Jr = w.div`
1740
1740
  $padding: x,
1741
1741
  $borderRadius: g,
1742
1742
  $boxSizing: b,
1743
- $scroll: C,
1743
+ $scroll: D,
1744
1744
  children: t
1745
1745
  }
1746
1746
  );
1747
1747
  }
1748
1748
  );
1749
1749
  ae.displayName = "BorderStack";
1750
- w.div`
1750
+ C.div`
1751
1751
  & > div {
1752
1752
  border-radius: 8px;
1753
1753
  border: 1px solid
@@ -1757,7 +1757,7 @@ w.div`
1757
1757
  }};
1758
1758
  }
1759
1759
  `;
1760
- w.div`
1760
+ C.div`
1761
1761
  width: 100%;
1762
1762
  height: 100%;
1763
1763
  overflow-y: auto;
@@ -1776,18 +1776,20 @@ w.div`
1776
1776
  border-radius: 8px;
1777
1777
  }
1778
1778
  `;
1779
- const mo = w.div`
1779
+ const mo = C.div`
1780
1780
  cursor: pointer;
1781
- `, bo = w.div`
1781
+ `, bo = C.div`
1782
1782
  & > div > div > div > p {
1783
1783
  text-wrap-mode: nowrap;
1784
1784
  }
1785
- `, vo = w.div`
1785
+ `, vo = C.div`
1786
1786
  & > div {
1787
1787
  justify-content: auto;
1788
1788
  gap: 8px;
1789
1789
  }
1790
- `, yo = (e) => {
1790
+ `;
1791
+ var se = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(se || {});
1792
+ const yo = (e) => {
1791
1793
  const {
1792
1794
  controls: n,
1793
1795
  conditionsAlignment: t,
@@ -1805,7 +1807,7 @@ const mo = w.div`
1805
1807
  onEdit: h,
1806
1808
  onDelete: x,
1807
1809
  tabs: b,
1808
- selectedTab: C,
1810
+ selectedTab: D,
1809
1811
  onTabChange: T,
1810
1812
  currentConditions: S,
1811
1813
  hasMultipleGroups: N
@@ -1847,8 +1849,8 @@ const mo = w.div`
1847
1849
  icon: /* @__PURE__ */ i(Ft, {}),
1848
1850
  size: "24px",
1849
1851
  cursorHover: !0,
1850
- onClick: (D) => {
1851
- D.stopPropagation(), h == null || h();
1852
+ onClick: (w) => {
1853
+ w.stopPropagation(), h == null || h();
1852
1854
  }
1853
1855
  }
1854
1856
  ),
@@ -1859,8 +1861,8 @@ const mo = w.div`
1859
1861
  icon: /* @__PURE__ */ i(sn, {}),
1860
1862
  size: "24px",
1861
1863
  cursorHover: !0,
1862
- onClick: (D) => {
1863
- D.stopPropagation(), x == null || x();
1864
+ onClick: (w) => {
1865
+ w.stopPropagation(), x == null || x();
1864
1866
  }
1865
1867
  }
1866
1868
  )
@@ -1881,7 +1883,7 @@ const mo = w.div`
1881
1883
  ) }),
1882
1884
  l && /* @__PURE__ */ m(P, { children: [
1883
1885
  /* @__PURE__ */ i(q, { dashed: !0 }),
1884
- N ? /* @__PURE__ */ i(st, { tabs: b, selectedTab: C, onChange: T }) : /* @__PURE__ */ i(
1886
+ N ? /* @__PURE__ */ i(st, { tabs: b, selectedTab: D, onChange: T }) : /* @__PURE__ */ i(
1885
1887
  $,
1886
1888
  {
1887
1889
  type: "label",
@@ -1900,7 +1902,7 @@ const mo = w.div`
1900
1902
  gap: "8px",
1901
1903
  justifyContent: t,
1902
1904
  children: [
1903
- S.map((D) => /* @__PURE__ */ i(
1905
+ S.map((w) => /* @__PURE__ */ i(
1904
1906
  ae,
1905
1907
  {
1906
1908
  direction: "column",
@@ -1910,14 +1912,14 @@ const mo = w.div`
1910
1912
  children: /* @__PURE__ */ i(
1911
1913
  Je,
1912
1914
  {
1913
- element: { ...D, value: D.value },
1915
+ element: { ...w, value: w.value, howToSetTheCondition: w.howToSetTheCondition === se.LIST_OF_VALUES ? se.LIST_OF_VALUES_MULTI : w.howToSetTheCondition },
1914
1916
  valueData: Be(
1915
- D
1917
+ w
1916
1918
  )
1917
1919
  }
1918
1920
  )
1919
1921
  },
1920
- D.conditionName
1922
+ w.conditionName
1921
1923
  )),
1922
1924
  u && g && /* @__PURE__ */ i(
1923
1925
  ae,
@@ -1997,7 +1999,7 @@ const mo = w.div`
1997
1999
  }, ht = (e, n) => Object.fromEntries(
1998
2000
  Object.entries(e).map(([t, r]) => [t, r.filter(n)])
1999
2001
  ), Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
2000
- var he, fe, le;
2002
+ var fe, me, le;
2001
2003
  const {
2002
2004
  cardTitle: n = !0,
2003
2005
  decision: t,
@@ -2014,48 +2016,48 @@ const mo = w.div`
2014
2016
  labelName: o == null ? void 0 : o.effectiveFrom,
2015
2017
  value: String(t.effectiveFrom),
2016
2018
  howToSetTheDecision: ee.EQUAL,
2017
- decisionDataType: U.DATE
2019
+ decisionDataType: _.DATE
2018
2020
  },
2019
2021
  valueData: Be({
2020
2022
  labelName: o == null ? void 0 : o.effectiveFrom,
2021
2023
  value: String(t.effectiveFrom),
2022
2024
  howToSetTheDecision: ee.EQUAL,
2023
- decisionDataType: U.DATE
2025
+ decisionDataType: _.DATE
2024
2026
  })
2025
2027
  } : null, h = g ? {
2026
2028
  element: {
2027
2029
  labelName: o == null ? void 0 : o.validUntil,
2028
2030
  value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
2029
2031
  howToSetTheDecision: ee.EQUAL,
2030
- decisionDataType: U.DATE
2032
+ decisionDataType: _.DATE
2031
2033
  },
2032
2034
  valueData: Be({
2033
2035
  labelName: o == null ? void 0 : o.validUntil,
2034
2036
  value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
2035
2037
  howToSetTheDecision: ee.EQUAL,
2036
- decisionDataType: U.DATE
2038
+ decisionDataType: _.DATE
2037
2039
  })
2038
2040
  } : null, x = t ? {
2039
2041
  labelName: n && t.labelName || "",
2040
- decisionDataType: t.decisionDataType || U.ALPHABETICAL,
2042
+ decisionDataType: t.decisionDataType || _.ALPHABETICAL,
2041
2043
  value: Be(t),
2042
2044
  howToSetTheDecision: t.howToSetTheDecision || ee.EQUAL
2043
- } : null, b = t ? Pe(t) : {}, C = ((fe = (he = t == null ? void 0 : t.conditionGroups) == null ? void 0 : he.map(
2045
+ } : null, b = t ? Pe(t) : {}, D = ((me = (fe = t == null ? void 0 : t.conditionGroups) == null ? void 0 : fe.map(
2044
2046
  (F) => F == null ? void 0 : F.ConditionGroupId
2045
- )) == null ? void 0 : fe.filter(Boolean)) || Object.keys(b), T = C[0] || "group-primary", S = z.useMemo(() => {
2047
+ )) == null ? void 0 : me.filter(Boolean)) || Object.keys(b), T = D[0] || "group-primary", S = z.useMemo(() => {
2046
2048
  const F = {}, O = b[T] || [], B = b["group-primary"] || [];
2047
2049
  F["group-primary"] = T === "group-primary" ? B : [...O, ...B];
2048
- for (const Y of C)
2050
+ for (const Y of D)
2049
2051
  !Y || Y === T || Y !== "group-primary" && b[Y] && (F[Y] = b[Y]);
2050
2052
  for (const Y of Object.keys(b))
2051
2053
  Y === "group-primary" || Y === T || Y in F || (F[Y] = b[Y]);
2052
2054
  return F;
2053
- }, [b, T, C]), N = ht(S, (F) => !F.hidden), D = z.useMemo(() => {
2055
+ }, [b, T, D]), N = ht(S, (F) => !F.hidden), w = z.useMemo(() => {
2054
2056
  const F = ["group-primary", ...Object.keys(S).filter((O) => O !== "group-primary")];
2055
2057
  return Array.from(new Set(F));
2056
2058
  }, [S]), I = {};
2057
2059
  let L = 1;
2058
- const k = D.map((F) => {
2060
+ const k = w.map((F) => {
2059
2061
  const O = F === "group-primary" ? "mainCondition" : `alternateCondition-${L++}`;
2060
2062
  return I[O] = F, {
2061
2063
  id: O,
@@ -2064,11 +2066,11 @@ const mo = w.div`
2064
2066
  };
2065
2067
  }), [M, oe] = z.useState(
2066
2068
  ((le = k[0]) == null ? void 0 : le.id) ?? "mainCondition"
2067
- ), be = (F) => oe(F), ve = I[M] ?? "group-primary", ce = N[ve] ?? [], ie = D.length > 1, ye = Array.from({ length: 5 }), Ee = !!(!r && t && o && x), ue = ce.length < 2 ? "start" : "space-between", xe = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
2069
+ ), be = (F) => oe(F), ve = I[M] ?? "group-primary", ue = N[ve] ?? [], ie = w.length > 1, ye = Array.from({ length: 5 }), Ee = !!(!r && t && o && x), pe = ue.length < 2 ? "start" : "space-between", xe = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
2068
2070
  return /* @__PURE__ */ i(
2069
2071
  yo,
2070
2072
  {
2071
- conditionsAlignment: ue,
2073
+ conditionsAlignment: pe,
2072
2074
  controls: u,
2073
2075
  decision: t,
2074
2076
  decisionMapper: x,
@@ -2087,7 +2089,7 @@ const mo = w.div`
2087
2089
  tabs: k,
2088
2090
  selectedTab: M,
2089
2091
  onTabChange: be,
2090
- currentConditions: ce,
2092
+ currentConditions: ue,
2091
2093
  hasMultipleGroups: ie
2092
2094
  }
2093
2095
  );
@@ -2101,7 +2103,7 @@ const mo = w.div`
2101
2103
  transform: translateY(0);
2102
2104
  }
2103
2105
  `;
2104
- w.div`
2106
+ C.div`
2105
2107
  border-radius: 8px;
2106
2108
  border: 1px solid
2107
2109
  ${({ theme: e }) => {
@@ -2115,7 +2117,7 @@ w.div`
2115
2117
  height: 100%;
2116
2118
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
2117
2119
  `;
2118
- w.div`
2120
+ C.div`
2119
2121
  & > div {
2120
2122
  border-radius: 8px;
2121
2123
  border: 1px solid
@@ -2125,7 +2127,7 @@ w.div`
2125
2127
  }};
2126
2128
  }
2127
2129
  `;
2128
- const To = w.div`
2130
+ const To = C.div`
2129
2131
  & > div {
2130
2132
  box-shadow: 0px 2px 3px 0px
2131
2133
  ${({ theme: e }) => {
@@ -2134,18 +2136,18 @@ const To = w.div`
2134
2136
  }};
2135
2137
  cursor: pointer;
2136
2138
  }
2137
- `, wo = w.div`
2139
+ `, wo = C.div`
2138
2140
  width: 100%;
2139
2141
  height: 100%;
2140
2142
  & > div {
2141
2143
  animation: ${xo} 600ms ease-out;
2142
2144
  }
2143
- `, Co = w.div`
2145
+ `, Co = C.div`
2144
2146
  & > div > div {
2145
2147
  border-radius: 8px;
2146
2148
  box-sizing: border-box;
2147
2149
  }
2148
- `, Do = w.div`
2150
+ `, Do = C.div`
2149
2151
  & > div {
2150
2152
  width: 100%;
2151
2153
  height: 100%;
@@ -2304,13 +2306,13 @@ const To = w.div`
2304
2306
  })
2305
2307
  ), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && t;
2306
2308
  return { renderedCards: c, shouldRenderAddCard: g };
2307
- }, $o = w.div`
2309
+ }, $o = C.div`
2308
2310
  position: relative;
2309
2311
  & > div {
2310
2312
  padding: 24px 16px;
2311
2313
  place-items: unset;
2312
2314
  }
2313
- `, Io = w.div`
2315
+ `, Io = C.div`
2314
2316
  background-color: ${({ theme: e }) => {
2315
2317
  var n, t;
2316
2318
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
@@ -2375,7 +2377,7 @@ const To = w.div`
2375
2377
  s
2376
2378
  );
2377
2379
  }, Fo = (e) => ({
2378
- schema: se().required("Requerido").test(
2380
+ schema: de().required("Requerido").test(
2379
2381
  "non-empty",
2380
2382
  "El valor no puede estar vacío",
2381
2383
  (n) => n != null && n.trim() !== ""
@@ -2403,8 +2405,8 @@ const To = w.div`
2403
2405
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
2404
2406
  return {
2405
2407
  schema: ne({
2406
- from: de().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2407
- to: de().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2408
+ from: ce().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
2409
+ to: ce().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
2408
2410
  "is-greater",
2409
2411
  "El rengo hasta debe ser mayor a el rango desde",
2410
2412
  function(r) {
@@ -2418,25 +2420,25 @@ const To = w.div`
2418
2420
  }, vn = (e, n) => {
2419
2421
  if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
2420
2422
  const t = e;
2421
- return n === U.PERCENTAGE ? {
2423
+ return n === _.PERCENTAGE ? {
2422
2424
  schema: ne({
2423
- from: de().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2424
- to: de().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
2425
+ from: ce().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2426
+ to: ce().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
2425
2427
  }),
2426
2428
  value: t
2427
2429
  } : {
2428
2430
  schema: ne({
2429
- from: se().required("Requerido"),
2430
- to: se().required("Requerido")
2431
+ from: de().required("Requerido"),
2432
+ to: de().required("Requerido")
2431
2433
  }),
2432
2434
  value: t
2433
2435
  };
2434
2436
  }
2435
- return n === U.PERCENTAGE ? {
2436
- schema: de().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2437
+ return n === _.PERCENTAGE ? {
2438
+ schema: ce().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
2437
2439
  value: e
2438
2440
  } : {
2439
- schema: se().required("Requerido"),
2441
+ schema: de().required("Requerido"),
2440
2442
  value: e
2441
2443
  };
2442
2444
  }, Mo = {
@@ -2447,7 +2449,6 @@ const To = w.div`
2447
2449
  [A.LESS_THAN]: vn,
2448
2450
  [A.EQUAL]: vn
2449
2451
  }, Gn = (e) => Mo[e] || Fo;
2450
- var me = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(me || {});
2451
2452
  function zo({
2452
2453
  decision: e,
2453
2454
  onSubmitEvent: n,
@@ -2455,7 +2456,7 @@ function zo({
2455
2456
  }) {
2456
2457
  const r = Pe(e) || {}, o = () => Object.values(r).flat(), a = {
2457
2458
  ruleName: e.ruleName || "",
2458
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
2459
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
2459
2460
  howToSetTheDecision: e.howToSetTheDecision || "",
2460
2461
  value: e.value || "",
2461
2462
  effectiveFrom: e.effectiveFrom || "",
@@ -2467,7 +2468,7 @@ function zo({
2467
2468
  };
2468
2469
  let s;
2469
2470
  const d = {
2470
- ruleName: se().required("El nombre de la decision es requerido"),
2471
+ ruleName: de().required("El nombre de la decision es requerido"),
2471
2472
  value: Ge(() => Gn(
2472
2473
  s.values.howToSetTheDecision
2473
2474
  )(
@@ -2522,15 +2523,15 @@ function zo({
2522
2523
  onSubmit: (u) => {
2523
2524
  const c = Object.fromEntries(
2524
2525
  Object.entries(r).map(([f, h]) => {
2525
- const b = h.filter((C) => {
2526
+ const b = h.filter((D) => {
2526
2527
  var S;
2527
- const T = (S = u.conditionsThatEstablishesTheDecision) == null ? void 0 : S[C.conditionName];
2528
+ const T = (S = u.conditionsThatEstablishesTheDecision) == null ? void 0 : S[D.conditionName];
2528
2529
  return T != null && T !== "";
2529
- }).map((C) => {
2530
+ }).map((D) => {
2530
2531
  var T;
2531
2532
  return {
2532
- ...C,
2533
- value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[C.conditionName]
2533
+ ...D,
2534
+ value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[D.conditionName]
2534
2535
  };
2535
2536
  });
2536
2537
  return [f, b];
@@ -2555,7 +2556,7 @@ function zo({
2555
2556
  void 0
2556
2557
  );
2557
2558
  else {
2558
- const f = g.howToSetTheCondition === me.LIST_OF_VALUES_MULTI ? [] : "";
2559
+ const f = g.howToSetTheCondition === se.LIST_OF_VALUES_MULTI ? [] : "";
2559
2560
  s.setFieldValue(
2560
2561
  `conditionsThatEstablishesTheDecision.${g.conditionName}`,
2561
2562
  f
@@ -2564,7 +2565,7 @@ function zo({
2564
2565
  });
2565
2566
  } };
2566
2567
  }
2567
- w.div`
2568
+ C.div`
2568
2569
  & > div {
2569
2570
  border-radius: 8px;
2570
2571
  border: 1px solid
@@ -2574,7 +2575,7 @@ w.div`
2574
2575
  }};
2575
2576
  }
2576
2577
  `;
2577
- w.div`
2578
+ C.div`
2578
2579
  width: 100%;
2579
2580
  height: 100%;
2580
2581
  overflow-y: auto;
@@ -2592,7 +2593,7 @@ w.div`
2592
2593
  border-radius: 8px;
2593
2594
  }
2594
2595
  `;
2595
- const Vo = w.div`
2596
+ const Vo = C.div`
2596
2597
  display: flex;
2597
2598
  width: -webkit-fill-available;
2598
2599
  & > div {
@@ -2616,10 +2617,10 @@ const Vo = w.div`
2616
2617
  messageEnd: c = "",
2617
2618
  statusStart: g = "pending",
2618
2619
  statusEnd: f = "pending"
2619
- } = e, [h, x] = j(s), [b, C] = j(l), [T, S] = j(p), N = ({ target: k }) => {
2620
+ } = e, [h, x] = j(s), [b, D] = j(l), [T, S] = j(p), N = ({ target: k }) => {
2620
2621
  x(k.checked), r && r(k.checked);
2621
- }, D = (k) => {
2622
- C(k.target.value), n(k);
2622
+ }, w = (k) => {
2623
+ D(k.target.value), n(k);
2623
2624
  }, I = (k) => {
2624
2625
  S(k.target.value), t(k);
2625
2626
  }, L = te("(max-width: 400px)");
@@ -2648,7 +2649,7 @@ const Vo = w.div`
2648
2649
  {
2649
2650
  id: "dateStart",
2650
2651
  label: o,
2651
- onChange: D,
2652
+ onChange: w,
2652
2653
  value: b,
2653
2654
  required: d,
2654
2655
  size: "compact",
@@ -2675,7 +2676,7 @@ const Vo = w.div`
2675
2676
  }
2676
2677
  )
2677
2678
  ] });
2678
- }, Uo = (e) => {
2679
+ }, _o = (e) => {
2679
2680
  const {
2680
2681
  activeTab: n,
2681
2682
  conditionsErrorText: t,
@@ -2693,17 +2694,17 @@ const Vo = w.div`
2693
2694
  portalId: h,
2694
2695
  showRedefineConfirm: x,
2695
2696
  onOpenRedefineConfirm: b,
2696
- onCloseRedefineConfirm: C,
2697
+ onCloseRedefineConfirm: D,
2697
2698
  onConfirmRedefine: T
2698
2699
  } = e;
2699
2700
  return /* @__PURE__ */ m(P, { children: [
2700
2701
  /* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
2701
- /* @__PURE__ */ i(_e, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
2702
+ /* @__PURE__ */ i(Ue, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
2702
2703
  condition: a,
2703
2704
  formik: o,
2704
2705
  isDecision: !0
2705
2706
  }) }) }),
2706
- /* @__PURE__ */ i(_e, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
2707
+ /* @__PURE__ */ i(Ue, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
2707
2708
  /* @__PURE__ */ i(
2708
2709
  st,
2709
2710
  {
@@ -2763,7 +2764,7 @@ const Vo = w.div`
2763
2764
  )) }),
2764
2765
  p && /* @__PURE__ */ i($, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
2765
2766
  ] }) }),
2766
- /* @__PURE__ */ i(_e, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
2767
+ /* @__PURE__ */ i(Ue, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
2767
2768
  jo,
2768
2769
  {
2769
2770
  labelStart: f.termStart,
@@ -2792,7 +2793,7 @@ const Vo = w.div`
2792
2793
  {
2793
2794
  portalId: h,
2794
2795
  title: "Redefinir la condición",
2795
- onCloseModal: C,
2796
+ onCloseModal: D,
2796
2797
  children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
2797
2798
  /* @__PURE__ */ i($, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
2798
2799
  /* @__PURE__ */ m(y, { justifyContent: "end", gap: "12px", children: [
@@ -2802,7 +2803,7 @@ const Vo = w.div`
2802
2803
  type: "button",
2803
2804
  appearance: "gray",
2804
2805
  variant: "outlined",
2805
- onClick: C,
2806
+ onClick: D,
2806
2807
  cursorHover: !0,
2807
2808
  children: "Cancelar"
2808
2809
  }
@@ -2813,7 +2814,7 @@ const Vo = w.div`
2813
2814
  }
2814
2815
  )
2815
2816
  ] });
2816
- }, _o = (e) => {
2817
+ }, Uo = (e) => {
2817
2818
  const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Bo(n), a = qo(o), s = r ? "Que" : "Y que", d = a ? o : `${Go(o)} ${o}`, l = Qo(t);
2818
2819
  return `${s} ${d} ${l}`;
2819
2820
  }, Ho = /^(el|la|los|las)\s/i;
@@ -2868,15 +2869,15 @@ function Qo(e) {
2868
2869
  const Ko = (e) => {
2869
2870
  if (typeof e == "string") {
2870
2871
  const n = e.toLowerCase();
2871
- if (n.includes("equal")) return me.EQUAL;
2872
- if (n.includes("greater")) return me.GREATER_THAN;
2873
- if (n.includes("less")) return me.LESS_THAN;
2874
- if (n.includes("range") || n.includes("between")) return me.RANGE;
2875
- if (n.includes("multi")) return me.LIST_OF_VALUES_MULTI;
2872
+ if (n.includes("equal")) return se.EQUAL;
2873
+ if (n.includes("greater")) return se.GREATER_THAN;
2874
+ if (n.includes("less")) return se.LESS_THAN;
2875
+ if (n.includes("range") || n.includes("between")) return se.RANGE;
2876
+ if (n.includes("multi")) return se.LIST_OF_VALUES_MULTI;
2876
2877
  if (n.includes("list_of_values") || n.includes("among") || n.includes("in"))
2877
- return me.LIST_OF_VALUES;
2878
+ return se.LIST_OF_VALUES;
2878
2879
  }
2879
- return e ?? me.EQUAL;
2880
+ return e ?? se.EQUAL;
2880
2881
  }, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Zo = (e) => {
2881
2882
  var je;
2882
2883
  const {
@@ -2898,27 +2899,27 @@ const Ko = (e) => {
2898
2899
  ...h.filter((R) => R === "group-primary"),
2899
2900
  ...h.filter((R) => R !== "group-primary")
2900
2901
  ], b = {};
2901
- let C = 1;
2902
+ let D = 1;
2902
2903
  const T = x.map((R) => {
2903
- const _ = R === "group-primary" ? "mainCondition" : `alternateCondition-${C++}`;
2904
- return b[_] = R, {
2905
- id: _,
2906
- label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(_.split("-").at(-1))),
2904
+ const U = R === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
2905
+ return b[U] = R, {
2906
+ id: U,
2907
+ label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(U.split("-").at(-1))),
2907
2908
  isDisabled: !1
2908
2909
  };
2909
2910
  }), [S, N] = z.useState(
2910
2911
  ((je = T[0]) == null ? void 0 : je.id) ?? "mainCondition"
2911
- ), D = (R) => N(R), I = b[S] ?? "group-primary", L = z.useMemo(() => {
2912
+ ), w = (R) => N(R), I = b[S] ?? "group-primary", L = z.useMemo(() => {
2912
2913
  const R = [
2913
2914
  ...Object.keys(f).filter((K) => K === "group-primary"),
2914
2915
  ...Object.keys(f).filter((K) => K !== "group-primary")
2915
2916
  ];
2916
- let _ = !1;
2917
+ let U = !1;
2917
2918
  const Q = R.map((K) => {
2918
2919
  const At = (f[K] ?? []).map((Ze, $t) => {
2919
- const Mn = !_ && K === "group-primary" && $t === 0;
2920
- Mn && (_ = !0);
2921
- const It = Ko(Ze.howToSetTheCondition ?? Ze.valueUse), Rt = _o({
2920
+ const Mn = !U && K === "group-primary" && $t === 0;
2921
+ Mn && (U = !0);
2922
+ const It = Ko(Ze.howToSetTheCondition ?? Ze.valueUse), Rt = Uo({
2922
2923
  label: Ze.labelName || "",
2923
2924
  howToSet: It,
2924
2925
  isFirst: Mn
@@ -2934,28 +2935,28 @@ const Ko = (e) => {
2934
2935
  labelName: n.labelName,
2935
2936
  listOfPossibleValues: n.listOfPossibleValues,
2936
2937
  ruleName: n.ruleName
2937
- }, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil, ce = be ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ie = ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye = z.useMemo(() => {
2938
+ }, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil, ue = be ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ie = ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye = z.useMemo(() => {
2938
2939
  const R = l.errors.conditionsThatEstablishesTheDecision;
2939
2940
  if (!R) return;
2940
2941
  if (typeof R == "string") return R;
2941
- const _ = (Q) => {
2942
+ const U = (Q) => {
2942
2943
  if (Q) {
2943
2944
  if (typeof Q == "string") return Q;
2944
2945
  if (Array.isArray(Q))
2945
2946
  for (const K of Q) {
2946
- const Te = _(K);
2947
+ const Te = U(K);
2947
2948
  if (Te) return Te;
2948
2949
  }
2949
2950
  else if (typeof Q == "object")
2950
2951
  for (const K of Object.values(Q)) {
2951
- const Te = _(K);
2952
+ const Te = U(K);
2952
2953
  if (Te) return Te;
2953
2954
  }
2954
2955
  }
2955
2956
  };
2956
- return _(R);
2957
- }, [l.errors.conditionsThatEstablishesTheDecision]), Ee = l.submitCount > 0 && !!ye, ue = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", xe = (R) => {
2958
- const Q = Object.values(c).flat().find((Te) => Te.conditionName === R), K = ue(Q);
2957
+ return U(R);
2958
+ }, [l.errors.conditionsThatEstablishesTheDecision]), Ee = l.submitCount > 0 && !!ye, pe = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", xe = (R) => {
2959
+ const Q = Object.values(c).flat().find((Te) => Te.conditionName === R), K = pe(Q);
2959
2960
  l.setFieldValue(
2960
2961
  `conditionsThatEstablishesTheDecision.${R}`,
2961
2962
  K
@@ -2964,14 +2965,14 @@ const Ko = (e) => {
2964
2965
  !1,
2965
2966
  !1
2966
2967
  );
2967
- }, he = () => {
2968
- (c[I] ?? []).forEach((_) => {
2969
- const Q = `conditionsThatEstablishesTheDecision.${_.conditionName}`;
2970
- l.setFieldValue(Q, ue(_)), l.setFieldTouched(Q, !1, !1);
2968
+ }, fe = () => {
2969
+ (c[I] ?? []).forEach((U) => {
2970
+ const Q = `conditionsThatEstablishesTheDecision.${U.conditionName}`;
2971
+ l.setFieldValue(Q, pe(U)), l.setFieldTouched(Q, !1, !1);
2971
2972
  });
2972
- }, [fe, le] = z.useState(!1);
2973
+ }, [me, le] = z.useState(!1);
2973
2974
  return /* @__PURE__ */ i(
2974
- Uo,
2975
+ _o,
2975
2976
  {
2976
2977
  activeTab: S,
2977
2978
  conditionsErrorText: ye,
@@ -2980,27 +2981,27 @@ const Ko = (e) => {
2980
2981
  formik: l,
2981
2982
  normalizedDecision: oe,
2982
2983
  onCancel: o,
2983
- onRedefineCurrentTab: he,
2984
- onTabChange: D,
2984
+ onRedefineCurrentTab: fe,
2985
+ onTabChange: w,
2985
2986
  onClearCondition: (R) => {
2986
2987
  xe(R), a == null || a(R);
2987
2988
  },
2988
2989
  showConditionsError: Ee,
2989
2990
  tabs: T,
2990
2991
  termEndStatus: ie,
2991
- termStartStatus: ce,
2992
+ termStartStatus: ue,
2992
2993
  textValues: r,
2993
2994
  visibleConditions: M,
2994
2995
  visibleConditionsByGroup: L,
2995
2996
  handleToggleNoneChange: p,
2996
2997
  portalId: "redefine-confirm-portal",
2997
- showRedefineConfirm: fe,
2998
+ showRedefineConfirm: me,
2998
2999
  onOpenRedefineConfirm: () => le(!0),
2999
3000
  onCloseRedefineConfirm: () => le(!1),
3000
3001
  onConfirmRedefine: () => {
3001
- he();
3002
+ fe();
3002
3003
  const R = (c[I] ?? []).map(
3003
- (_) => _.conditionName
3004
+ (U) => U.conditionName
3004
3005
  );
3005
3006
  s == null || s(R), le(!1);
3006
3007
  }
@@ -3024,9 +3025,9 @@ const Ko = (e) => {
3024
3025
  handleDelete: h,
3025
3026
  terms: x = !0,
3026
3027
  onRemoveCondition: b,
3027
- onRestoreConditions: C,
3028
+ onRestoreConditions: D,
3028
3029
  baseDecisionTemplate: T
3029
- } = e, [S, N] = j(null), D = te("(max-width: 681px)"), { renderedCards: I, shouldRenderAddCard: L } = Ao({
3030
+ } = e, [S, N] = j(null), w = te("(max-width: 681px)"), { renderedCards: I, shouldRenderAddCard: L } = Ao({
3030
3031
  cardTitle: n,
3031
3032
  controls: t,
3032
3033
  customTitleContentAddCard: r,
@@ -3039,7 +3040,7 @@ const Ko = (e) => {
3039
3040
  toggleAt: (M) => N((oe) => oe === M ? null : M)
3040
3041
  }), k = (a == null ? void 0 : a.length) === 0 && !u;
3041
3042
  return /* @__PURE__ */ m(P, { children: [
3042
- /* @__PURE__ */ i(Co, { children: /* @__PURE__ */ i(Do, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: k ? /* @__PURE__ */ i(_e, { legend: "Decisiones", children: /* @__PURE__ */ m(
3043
+ /* @__PURE__ */ i(Co, { children: /* @__PURE__ */ i(Do, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: k ? /* @__PURE__ */ i(Ue, { legend: "Decisiones", children: /* @__PURE__ */ m(
3043
3044
  y,
3044
3045
  {
3045
3046
  direction: "column",
@@ -3083,7 +3084,7 @@ const Ko = (e) => {
3083
3084
  autoRows: "auto",
3084
3085
  justifyItems: "center",
3085
3086
  padding: "6px",
3086
- height: D ? "auto" : "484px",
3087
+ height: w ? "auto" : "484px",
3087
3088
  children: [
3088
3089
  I,
3089
3090
  L && Sn({
@@ -3119,7 +3120,7 @@ const Ko = (e) => {
3119
3120
  onCancel: () => g ? g() : () => {
3120
3121
  },
3121
3122
  onRemoveCondition: b,
3122
- onRestoreConditions: C
3123
+ onRestoreConditions: D
3123
3124
  }
3124
3125
  )
3125
3126
  }
@@ -3129,7 +3130,7 @@ const Ko = (e) => {
3129
3130
  border: {
3130
3131
  color: E.palette.neutral.N40
3131
3132
  }
3132
- }, ea = w.div`
3133
+ }, ea = C.div`
3133
3134
  border-width: 1px;
3134
3135
  border-style: solid;
3135
3136
  border-color: ${({ theme: e }) => {
@@ -3174,36 +3175,36 @@ const ta = (e, n) => {
3174
3175
  u.querySelectorAll('[data-filter-tag="true"]')
3175
3176
  ), x = 48;
3176
3177
  let b = 0;
3177
- const C = [], T = [];
3178
+ const D = [], T = [];
3178
3179
  for (let N = 0; N < n.length; N++) {
3179
- const D = ((S = h[N]) == null ? void 0 : S.offsetWidth) ?? 0;
3180
- b + D + x <= f ? (C.push(n[N]), b += D) : T.push(n[N]);
3180
+ const w = ((S = h[N]) == null ? void 0 : S.offsetWidth) ?? 0;
3181
+ b + w + x <= f ? (D.push(n[N]), b += w) : T.push(n[N]);
3181
3182
  }
3182
- r(C), a(T), d(T.length > 0);
3183
+ r(D), a(T), d(T.length > 0);
3183
3184
  }, g = new ResizeObserver(() => {
3184
3185
  requestAnimationFrame(c);
3185
3186
  });
3186
3187
  return g.observe(p), () => g.disconnect();
3187
3188
  }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: s, measurementRef: l };
3188
3189
  };
3189
- w.div`
3190
+ C.div`
3190
3191
  & > div {
3191
3192
  width: 100%;
3192
3193
  }
3193
3194
  `;
3194
- const ra = w.div`
3195
+ const ra = C.div`
3195
3196
  position: absolute;
3196
3197
  top: calc(100% + 4px);
3197
3198
  right: 0;
3198
3199
  z-index: 1000;
3199
3200
  width: 170px;
3200
- `, oa = w.div`
3201
+ `, oa = C.div`
3201
3202
  position: absolute;
3202
3203
  visibility: hidden;
3203
3204
  pointer-events: none;
3204
3205
  height: 0;
3205
3206
  overflow: hidden;
3206
- `, aa = w.div`
3207
+ `, aa = C.div`
3207
3208
  cursor: pointer;
3208
3209
  `, En = {
3209
3210
  border: {
@@ -3241,7 +3242,7 @@ const ra = w.div`
3241
3242
  hover: E.palette.neutral.N30
3242
3243
  }
3243
3244
  }
3244
- }, ia = w.li`
3245
+ }, ia = C.li`
3245
3246
  display: flex;
3246
3247
  align-items: center;
3247
3248
  align-self: stretch;
@@ -3260,8 +3261,8 @@ const ra = w.div`
3260
3261
  }};
3261
3262
  }
3262
3263
  `, la = (e) => {
3263
- var g, f, h, x, b, C;
3264
- const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] = j(!1), d = () => s(!0), l = () => s(!1), p = Fn(In), u = ((h = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : h.hover) ?? En.option.appearance.hover, c = ((C = (b = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : b.appearance) == null ? void 0 : C.regular) ?? En.option.appearance.regular;
3264
+ var g, f, h, x, b, D;
3265
+ const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] = j(!1), d = () => s(!0), l = () => s(!1), p = Fn(In), u = ((h = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : h.hover) ?? En.option.appearance.hover, c = ((D = (b = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : b.appearance) == null ? void 0 : D.regular) ?? En.option.appearance.regular;
3265
3266
  return /* @__PURE__ */ i(
3266
3267
  ia,
3267
3268
  {
@@ -3326,38 +3327,38 @@ const ra = w.div`
3326
3327
  hidden: c,
3327
3328
  showOverflowIndicator: g,
3328
3329
  measurementRef: f
3329
- } = ta(d, n), [h, x] = j(!1), b = (D) => {
3330
- D.stopPropagation(), x((I) => !I);
3330
+ } = ta(d, n), [h, x] = j(!1), b = (w) => {
3331
+ w.stopPropagation(), x((I) => !I);
3331
3332
  };
3332
3333
  Ae(() => {
3333
- const D = (I) => {
3334
+ const w = (I) => {
3334
3335
  var M, oe;
3335
3336
  const L = I.target;
3336
3337
  !((M = l.current) != null && M.contains(L)) && !((oe = p.current) != null && oe.contains(L)) && x(!1);
3337
3338
  };
3338
- return h && window.addEventListener("mousedown", D), () => window.removeEventListener("mousedown", D);
3339
+ return h && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
3339
3340
  }, [h]);
3340
- const C = n.length === 0, T = h && c.length > 0, S = c.map((D) => ({
3341
- id: D.label,
3342
- value: D.label,
3343
- label: D.label,
3344
- icon: D.icon
3345
- })), N = (D) => {
3341
+ const D = n.length === 0, T = h && c.length > 0, S = c.map((w) => ({
3342
+ id: w.label,
3343
+ value: w.label,
3344
+ label: w.label,
3345
+ icon: w.icon
3346
+ })), N = (w) => {
3346
3347
  var I, L;
3347
- (L = (I = c.find((k) => k.label === D)) == null ? void 0 : I.onClose) == null || L.call(I), x(!1);
3348
+ (L = (I = c.find((k) => k.label === w)) == null ? void 0 : I.onClose) == null || L.call(I), x(!1);
3348
3349
  };
3349
3350
  return /* @__PURE__ */ m(na, { borderRadius: "8px", width: "100%", children: [
3350
- /* @__PURE__ */ i(oa, { ref: f, children: n.map((D) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
3351
+ /* @__PURE__ */ i(oa, { ref: f, children: n.map((w) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
3351
3352
  Ne,
3352
3353
  {
3353
3354
  appearance: "primary",
3354
3355
  displayIcon: !0,
3355
3356
  removable: !0,
3356
- icon: D.icon,
3357
- label: D.label,
3358
- onClose: D.onClose
3357
+ icon: w.icon,
3358
+ label: w.label,
3359
+ onClose: w.onClose
3359
3360
  }
3360
- ) }, D.label)) }),
3361
+ ) }, w.label)) }),
3361
3362
  /* @__PURE__ */ m(Xe, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3362
3363
  /* @__PURE__ */ i(
3363
3364
  ae,
@@ -3371,19 +3372,19 @@ const ra = w.div`
3371
3372
  alignItems: "center",
3372
3373
  padding: "0px 8px",
3373
3374
  border: !0,
3374
- children: C ? /* @__PURE__ */ i($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(P, { children: [
3375
- u.map((D) => /* @__PURE__ */ i(
3375
+ children: D ? /* @__PURE__ */ i($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(P, { children: [
3376
+ u.map((w) => /* @__PURE__ */ i(
3376
3377
  Ne,
3377
3378
  {
3378
3379
  "data-filter-tag": "true",
3379
3380
  appearance: "primary",
3380
3381
  displayIcon: !0,
3381
3382
  removable: !0,
3382
- icon: D.icon,
3383
- label: D.label,
3384
- onClose: D.onClose
3383
+ icon: w.icon,
3384
+ label: w.label,
3385
+ onClose: w.onClose
3385
3386
  },
3386
- D.label
3387
+ w.label
3387
3388
  )),
3388
3389
  g && /* @__PURE__ */ m(
3389
3390
  "div",
@@ -3403,18 +3404,18 @@ const ra = w.div`
3403
3404
  {
3404
3405
  options: S,
3405
3406
  onOptionClick: N,
3406
- children: c.map((D) => /* @__PURE__ */ i(
3407
+ children: c.map((w) => /* @__PURE__ */ i(
3407
3408
  la,
3408
3409
  {
3409
- id: D.label,
3410
- label: D.label,
3411
- leadingIcon: D.icon,
3410
+ id: w.label,
3411
+ label: w.label,
3412
+ leadingIcon: w.icon,
3412
3413
  onClose: () => {
3413
3414
  var I;
3414
- (I = D.onClose) == null || I.call(D), x(!1);
3415
+ (I = w.onClose) == null || I.call(w), x(!1);
3415
3416
  }
3416
3417
  },
3417
- D.label
3418
+ w.label
3418
3419
  ))
3419
3420
  }
3420
3421
  ) })
@@ -3428,7 +3429,7 @@ const ra = w.div`
3428
3429
  H,
3429
3430
  {
3430
3431
  cursorHover: !0,
3431
- disabled: C,
3432
+ disabled: D,
3432
3433
  iconBefore: /* @__PURE__ */ i(it, {}),
3433
3434
  onClick: t,
3434
3435
  variant: "outlined",
@@ -3447,7 +3448,7 @@ const ra = w.div`
3447
3448
  )
3448
3449
  ] })
3449
3450
  ] });
3450
- }, sa = w.div`
3451
+ }, sa = C.div`
3451
3452
  display: flex;
3452
3453
  flex-direction: column;
3453
3454
  background-color: ${({ theme: e }) => {
@@ -3648,7 +3649,7 @@ const ra = w.div`
3648
3649
  } : t;
3649
3650
  });
3650
3651
  }, ca = (e) => ({
3651
- schema: se().required("Requerido").test(
3652
+ schema: de().required("Requerido").test(
3652
3653
  "non-empty",
3653
3654
  "El valor no puede estar vacío",
3654
3655
  (n) => n != null && n.trim() !== ""
@@ -3676,8 +3677,8 @@ const ra = w.div`
3676
3677
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
3677
3678
  return {
3678
3679
  schema: ne({
3679
- from: de().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3680
- to: de().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3680
+ from: ce().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
3681
+ to: ce().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
3681
3682
  "is-greater",
3682
3683
  "El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
3683
3684
  function(r) {
@@ -3688,11 +3689,11 @@ const ra = w.div`
3688
3689
  }),
3689
3690
  value: { from: n, to: t }
3690
3691
  };
3691
- }, yn = (e, n) => n === U.PERCENTAGE ? {
3692
- schema: de().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
3692
+ }, yn = (e, n) => n === _.PERCENTAGE ? {
3693
+ schema: ce().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
3693
3694
  value: e
3694
3695
  } : {
3695
- schema: se().required("Requerido"),
3696
+ schema: de().required("Requerido"),
3696
3697
  value: e
3697
3698
  }, ha = {
3698
3699
  [A.LIST_OF_VALUES]: ua,
@@ -3709,7 +3710,7 @@ function fa({
3709
3710
  }) {
3710
3711
  const r = {
3711
3712
  ruleName: e.ruleName || "",
3712
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
3713
+ decisionDataType: e.decisionDataType || _.ALPHABETICAL,
3713
3714
  howToSetTheDecision: e.howToSetTheDecision || "",
3714
3715
  value: e.value || "",
3715
3716
  effectiveFrom: e.effectiveFrom || "",
@@ -3721,7 +3722,7 @@ function fa({
3721
3722
  };
3722
3723
  let o;
3723
3724
  const a = {
3724
- ruleName: se().required("El nombre de la regla es requerido"),
3725
+ ruleName: de().required("El nombre de la regla es requerido"),
3725
3726
  value: Ge(() => Wn(
3726
3727
  o.values.howToSetTheDecision
3727
3728
  )(
@@ -3842,7 +3843,7 @@ function fa({
3842
3843
  });
3843
3844
  } };
3844
3845
  }
3845
- const ma = w.div`
3846
+ const ma = C.div`
3846
3847
  & > div {
3847
3848
  border-radius: 8px;
3848
3849
  border: 1px solid
@@ -3851,7 +3852,7 @@ const ma = w.div`
3851
3852
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
3852
3853
  }};
3853
3854
  }
3854
- `, ba = w.div`
3855
+ `, ba = C.div`
3855
3856
  width: 100%;
3856
3857
  height: 100%;
3857
3858
  overflow-y: auto;
@@ -3912,10 +3913,10 @@ const ma = w.div`
3912
3913
  messageEnd: c = "",
3913
3914
  statusStart: g = "pending",
3914
3915
  statusEnd: f = "pending"
3915
- } = e, [h, x] = j(s), [b, C] = j(l), [T, S] = j(p), N = ({ target: k }) => {
3916
+ } = e, [h, x] = j(s), [b, D] = j(l), [T, S] = j(p), N = ({ target: k }) => {
3916
3917
  x(k.checked), r && r(k.checked);
3917
- }, D = (k) => {
3918
- C(k.target.value), n(k);
3918
+ }, w = (k) => {
3919
+ D(k.target.value), n(k);
3919
3920
  }, I = (k) => {
3920
3921
  S(k.target.value), t(k);
3921
3922
  }, L = te("(max-width: 400px)");
@@ -3963,7 +3964,7 @@ const ma = w.div`
3963
3964
  {
3964
3965
  id: "dateStart",
3965
3966
  label: o,
3966
- onChange: D,
3967
+ onChange: w,
3967
3968
  value: b,
3968
3969
  required: d,
3969
3970
  size: "compact",
@@ -4120,10 +4121,10 @@ const ma = w.div`
4120
4121
  !1
4121
4122
  );
4122
4123
  else {
4123
- const C = x ? [] : "";
4124
+ const D = x ? [] : "";
4124
4125
  a.setFieldValue(
4125
4126
  `conditionsThatEstablishesTheDecision.${h}`,
4126
- C
4127
+ D
4127
4128
  );
4128
4129
  }
4129
4130
  },
@@ -4184,7 +4185,7 @@ const ma = w.div`
4184
4185
  color: E.palette.neutral.N0
4185
4186
  }
4186
4187
  }
4187
- }, wa = w.div`
4188
+ }, wa = C.div`
4188
4189
  & > div {
4189
4190
  border: 1px solid
4190
4191
  ${({ theme: e, $active: n }) => {
@@ -4200,27 +4201,27 @@ const ma = w.div`
4200
4201
  return ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || we.item.background.hover;
4201
4202
  }};
4202
4203
  }
4203
- `, Xn = w.div`
4204
+ `, Xn = C.div`
4204
4205
  display: flex;
4205
4206
  align-items: center;
4206
4207
  gap: 12px;
4207
4208
  width: 100%;
4208
4209
  outline: none;
4209
4210
  cursor: pointer;
4210
- `, Ca = w.div`
4211
+ `, Ca = C.div`
4211
4212
  display: flex;
4212
4213
  align-items: center;
4213
4214
  outline: none;
4214
4215
  cursor: pointer;
4215
- `, Da = w(ct)`
4216
+ `, Da = C(ct)`
4216
4217
  display: flex;
4217
4218
  align-items: center;
4218
4219
  text-decoration: none;
4219
- `, Sa = w(ct)`
4220
+ `, Sa = C(ct)`
4220
4221
  display: block;
4221
4222
  text-decoration: none;
4222
4223
  color: inherit;
4223
- `, Ea = w.div`
4224
+ `, Ea = C.div`
4224
4225
  & > div {
4225
4226
  border-bottom: 1px solid
4226
4227
  ${({ theme: e, $active: n }) => {
@@ -4229,7 +4230,7 @@ const ma = w.div`
4229
4230
  }};
4230
4231
  border-radius: 8px 8px 0 0;
4231
4232
  }
4232
- `, mt = w.div`
4233
+ `, mt = C.div`
4233
4234
  display: block;
4234
4235
  text-decoration: none;
4235
4236
  background-color: ${({ theme: e, $active: n }) => {
@@ -4247,7 +4248,7 @@ const ma = w.div`
4247
4248
  return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || we.item.background.hover;
4248
4249
  }};
4249
4250
  }
4250
- `, Na = w.div`
4251
+ `, Na = C.div`
4251
4252
  display: flex;
4252
4253
  flex-direction: column;
4253
4254
 
@@ -4370,7 +4371,7 @@ const ma = w.div`
4370
4371
  ) }) }, h.id);
4371
4372
  }) })
4372
4373
  ] }) });
4373
- }, Aa = w.div`
4374
+ }, Aa = C.div`
4374
4375
  & > div {
4375
4376
  background: ${({ $background: e, theme: n }) => {
4376
4377
  var t, r, o, a;
@@ -4467,7 +4468,7 @@ function Ve(e) {
4467
4468
  return { x: e.clientX, y: e.clientY };
4468
4469
  }
4469
4470
  Array();
4470
- var Pn = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap();
4471
+ var Pn = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap();
4471
4472
  function Tt() {
4472
4473
  if (!Pn) return !1;
4473
4474
  if ("userAgentData" in navigator)
@@ -4642,7 +4643,7 @@ function ja({
4642
4643
  handlePointercancel: ui,
4643
4644
  handleEnd: pi,
4644
4645
  handleDragend: ci,
4645
- handleParentFocus: _a,
4646
+ handleParentFocus: Ua,
4646
4647
  handleNodePointerup: gi,
4647
4648
  handleNodePointerover: ii,
4648
4649
  handleParentPointerover: vi,
@@ -4653,7 +4654,7 @@ function ja({
4653
4654
  handleParentDrop: qa,
4654
4655
  multiDrag: r.multiDrag ?? !1,
4655
4656
  nativeDrag: r.nativeDrag ?? !0,
4656
- performSort: Ua,
4657
+ performSort: _a,
4657
4658
  performTransfer: Ha,
4658
4659
  root: r.root ?? document,
4659
4660
  setupNode: Ga,
@@ -4720,7 +4721,7 @@ function Ct(e, n, t, r, o, a) {
4720
4721
  transferred: !1
4721
4722
  };
4722
4723
  }
4723
- function Ua({
4724
+ function _a({
4724
4725
  parent: e,
4725
4726
  draggedNodes: n,
4726
4727
  targetNodes: t
@@ -4778,7 +4779,7 @@ function en(e, n, t, r, o = !1) {
4778
4779
  parent: e
4779
4780
  }, $e(e, t, r);
4780
4781
  }
4781
- function _a(e, n) {
4782
+ function Ua(e, n) {
4782
4783
  const t = e.targetData.parent.data.enabledNodes[0];
4783
4784
  t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? $e(e.targetData.parent, t, n) : n.selectedState || $e(e.targetData.parent, t, n));
4784
4785
  }
@@ -4861,7 +4862,7 @@ function Ba(e, n) {
4861
4862
  );
4862
4863
  return;
4863
4864
  }
4864
- const o = ge.get(r);
4865
+ const o = he.get(r);
4865
4866
  if (!o) return;
4866
4867
  const a = r.parentNode;
4867
4868
  if (!(a instanceof HTMLElement)) return;
@@ -4911,7 +4912,7 @@ function Ga(e) {
4911
4912
  }
4912
4913
  function St(e) {
4913
4914
  var n;
4914
- ge.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4915
+ he.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4915
4916
  var r, o;
4916
4917
  (o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
4917
4918
  });
@@ -4950,7 +4951,7 @@ function gn(e, n) {
4950
4951
  for (let l = 0; l < e.children.length; l++) {
4951
4952
  const p = e.children[l];
4952
4953
  if (!mn(p) || p.id === "dnd-dragged-node-clone") continue;
4953
- const u = ge.get(p);
4954
+ const u = he.get(p);
4954
4955
  (n || !u) && o.tearDownNode({
4955
4956
  parent: {
4956
4957
  el: e,
@@ -4970,7 +4971,7 @@ function gn(e, n) {
4970
4971
  }
4971
4972
  const a = t.getValues(e), s = [];
4972
4973
  for (let l = 0; l < r.length; l++) {
4973
- const p = r[l], u = ge.get(p);
4974
+ const p = r[l], u = he.get(p);
4974
4975
  if (o.draggableValue && !o.draggableValue(a[l])) continue;
4975
4976
  const c = Object.assign(
4976
4977
  u ?? {
@@ -5350,12 +5351,12 @@ function hi(e, n, t, r, o, a) {
5350
5351
  "height",
5351
5352
  "boxSizing",
5352
5353
  "overflow"
5353
- ], u = (b, C) => {
5354
+ ], u = (b, D) => {
5354
5355
  const T = window.getComputedStyle(b);
5355
5356
  p.forEach((S) => {
5356
- C.style[S] = T[S];
5357
+ D.style[S] = T[S];
5357
5358
  });
5358
- }, c = (b, C = {}) => {
5359
+ }, c = (b, D = {}) => {
5359
5360
  Object.assign(b.style, {
5360
5361
  position: "absolute",
5361
5362
  zIndex: "9999",
@@ -5366,7 +5367,7 @@ function hi(e, n, t, r, o, a) {
5366
5367
  overflow: "hidden",
5367
5368
  width: `${a.width}px`,
5368
5369
  height: `${a.height}px`,
5369
- ...C
5370
+ ...D
5370
5371
  });
5371
5372
  };
5372
5373
  if (s.synthDragImage)
@@ -5375,9 +5376,9 @@ function hi(e, n, t, r, o, a) {
5375
5376
  d = e.el.cloneNode(!0), u(e.el, d), d.setAttribute("popover", "manual"), c(d);
5376
5377
  else {
5377
5378
  const b = document.createElement("div");
5378
- b.setAttribute("popover", "manual"), o.forEach((C) => {
5379
- const T = C.el.cloneNode(!0);
5380
- u(C.el, T), T.style.pointerEvents = "none", T.style.margin = "0", b.append(T);
5379
+ b.setAttribute("popover", "manual"), o.forEach((D) => {
5380
+ const T = D.el.cloneNode(!0);
5381
+ u(D.el, T), T.style.pointerEvents = "none", T.style.margin = "0", b.append(T);
5381
5382
  }), b.style.display = "flex", b.style.flexDirection = "column", b.style.padding = "0", b.style.margin = "0", b.style.position = "absolute", b.style.zIndex = "9999", b.style.pointerEvents = "none", d = b;
5382
5383
  }
5383
5384
  d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
@@ -5538,7 +5539,7 @@ function kt(e, n) {
5538
5539
  }
5539
5540
  function Z(e) {
5540
5541
  function n(t) {
5541
- const r = ge.get(t);
5542
+ const r = he.get(t);
5542
5543
  if (!r) return;
5543
5544
  const o = G.get(t.parentNode);
5544
5545
  if (o)
@@ -5607,10 +5608,10 @@ function nn(e) {
5607
5608
  }
5608
5609
  function Fe(e, n, t = !1) {
5609
5610
  function r(o, a) {
5610
- ge.set(o, a);
5611
+ he.set(o, a);
5611
5612
  }
5612
5613
  for (const o of e) {
5613
- const a = ge.get(o), s = Ci(o, n, a, t);
5614
+ const a = he.get(o), s = Ci(o, n, a, t);
5614
5615
  s && r(o, s);
5615
5616
  }
5616
5617
  }
@@ -5640,7 +5641,7 @@ function Ce(e, n) {
5640
5641
  r.classList.remove(...t);
5641
5642
  continue;
5642
5643
  }
5643
- const o = ge.get(r) || G.get(r);
5644
+ const o = he.get(r) || G.get(r);
5644
5645
  if (o)
5645
5646
  for (const a of t)
5646
5647
  o.privateClasses.includes(a) || r.classList.remove(a);
@@ -5649,17 +5650,17 @@ function Ce(e, n) {
5649
5650
  function Zn(e, n, t, r, o) {
5650
5651
  const s = o.axis === "x", d = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", p = s ? "clientWidth" : "clientHeight", u = s ? "offsetWidth" : "offsetHeight", c = s ? "scrollWidth" : "scrollHeight", g = s ? n.clientX : n.clientY, f = s ? r.left : r.top, h = s ? t.overflowX : t.overflowY;
5651
5652
  if (d) {
5652
- const x = e[l], b = e[p], C = x > 0, T = x + b < (s ? o.state.rootScrollWidth || 0 : e[c]);
5653
+ const x = e[l], b = e[p], D = x > 0, T = x + b < (s ? o.state.rootScrollWidth || 0 : e[c]);
5653
5654
  return s ? {
5654
- left: C && g < b * 0.075,
5655
+ left: D && g < b * 0.075,
5655
5656
  right: T && g > b * (1 - 0.075)
5656
5657
  } : {
5657
- up: C && g < b * 0.075,
5658
+ up: D && g < b * 0.075,
5658
5659
  down: T && g > b * (1 - 0.075)
5659
5660
  };
5660
5661
  }
5661
5662
  if ((h === "auto" || h === "scroll") && e !== document.body && e !== document.documentElement) {
5662
- const x = e[c], b = e[u], C = e[l], T = C > 0, S = C < x - b;
5663
+ const x = e[c], b = e[u], D = e[l], T = D > 0, S = D < x - b;
5663
5664
  return s ? {
5664
5665
  left: T && g < f + b * 0.075,
5665
5666
  right: S && g > f + b * (1 - 0.075)
@@ -5725,7 +5726,7 @@ function Si(e) {
5725
5726
  if (!mn(n)) return;
5726
5727
  let t, r = !0;
5727
5728
  for (; n && r; ) {
5728
- if (ge.has(n) || G.has(n)) {
5729
+ if (he.has(n) || G.has(n)) {
5729
5730
  r = !1, t = G.has(n);
5730
5731
  break;
5731
5732
  }
@@ -5740,7 +5741,7 @@ function Si(e) {
5740
5741
  }
5741
5742
  } : void 0;
5742
5743
  } else {
5743
- const o = ge.get(n);
5744
+ const o = he.get(n);
5744
5745
  if (!o) return;
5745
5746
  const a = G.get(n.parentNode);
5746
5747
  return a ? {
@@ -5820,7 +5821,7 @@ const nt = {
5820
5821
  color: E.palette.neutral.N40
5821
5822
  }
5822
5823
  }
5823
- }, Ri = w.ul`
5824
+ }, Ri = C.ul`
5824
5825
  list-style: none;
5825
5826
  padding: 0;
5826
5827
  margin: 0;
@@ -5829,7 +5830,7 @@ const nt = {
5829
5830
  gap: 12px;
5830
5831
  width: 100%;
5831
5832
  justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
5832
- `, Fi = w.li`
5833
+ `, Fi = C.li`
5833
5834
  & > div {
5834
5835
  border: 1px solid
5835
5836
  ${({ theme: e, $active: n }) => {
@@ -5852,8 +5853,8 @@ const nt = {
5852
5853
  ), x = z.useRef(a);
5853
5854
  z.useEffect(() => {
5854
5855
  if (l) return;
5855
- const N = (D) => {
5856
- const I = D.detail ?? null;
5856
+ const N = (w) => {
5857
+ const I = w.detail ?? null;
5857
5858
  h(I);
5858
5859
  };
5859
5860
  return window.addEventListener(Tn, N), () => window.removeEventListener(Tn, N);
@@ -5862,10 +5863,10 @@ const nt = {
5862
5863
  l || window.dispatchEvent(
5863
5864
  new CustomEvent(Tn, { detail: N })
5864
5865
  );
5865
- }, [l]), C = (N) => {
5866
+ }, [l]), D = (N) => {
5866
5867
  var k;
5867
5868
  if (l) return;
5868
- const D = N.target, I = (k = D == null ? void 0 : D.closest) == null ? void 0 : k.call(D, "li.dnd-item"), L = (I == null ? void 0 : I.getAttribute("data-label")) || null;
5869
+ const w = N.target, I = (k = w == null ? void 0 : w.closest) == null ? void 0 : k.call(w, "li.dnd-item"), L = (I == null ? void 0 : I.getAttribute("data-label")) || null;
5869
5870
  L && (h(L), b(L));
5870
5871
  }, T = z.useCallback(() => {
5871
5872
  l || (h(null), b(null));
@@ -5880,7 +5881,7 @@ const nt = {
5880
5881
  if (l) return;
5881
5882
  const N = x.current;
5882
5883
  if (g.length !== N.length && g.length === N.length + 1) {
5883
- const D = new Set(N), I = g.find((L) => !D.has(L)) || null;
5884
+ const w = new Set(N), I = g.find((L) => !w.has(L)) || null;
5884
5885
  if (I) {
5885
5886
  const L = t === "left" ? "right" : "left";
5886
5887
  d == null || d({ item: I, from: L, to: t });
@@ -5890,7 +5891,7 @@ const nt = {
5890
5891
  }, [g, t, d, l]);
5891
5892
  const S = g.length === 0;
5892
5893
  return /* @__PURE__ */ i(
5893
- _e,
5894
+ Ue,
5894
5895
  {
5895
5896
  legend: o,
5896
5897
  width: "100%",
@@ -5900,7 +5901,7 @@ const nt = {
5900
5901
  Ri,
5901
5902
  {
5902
5903
  ref: c,
5903
- onPointerDownCapture: l ? void 0 : C,
5904
+ onPointerDownCapture: l ? void 0 : D,
5904
5905
  onPointerUpCapture: l ? void 0 : T,
5905
5906
  onPointerCancelCapture: l ? void 0 : T,
5906
5907
  $isEmpty: S,
@@ -5917,14 +5918,14 @@ const nt = {
5917
5918
  justifyContent: "center",
5918
5919
  children: /* @__PURE__ */ i($, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
5919
5920
  }
5920
- ) : g.map((N, D) => {
5921
+ ) : g.map((N, w) => {
5921
5922
  const I = !l && f === N;
5922
5923
  return /* @__PURE__ */ i(
5923
5924
  Fi,
5924
5925
  {
5925
5926
  className: `dnd-item${I ? " is-dragging" : ""}`,
5926
5927
  "data-label": N,
5927
- "data-first": !!(s && D === 0) || void 0,
5928
+ "data-first": !!(s && w === 0) || void 0,
5928
5929
  $active: I,
5929
5930
  children: /* @__PURE__ */ i(ae, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
5930
5931
  $,
@@ -5986,7 +5987,7 @@ const nt = {
5986
5987
  ]
5987
5988
  }
5988
5989
  );
5989
- }, Li = w.div`
5990
+ }, Li = C.div`
5990
5991
  & > button {
5991
5992
  height: 66px;
5992
5993
  min-width: 66px;
@@ -6004,7 +6005,7 @@ const nt = {
6004
6005
  }
6005
6006
  }
6006
6007
  }
6007
- `, kl = (e) => /* @__PURE__ */ i(Li, { children: /* @__PURE__ */ i(H, { ...e }) }), Oi = w.div`
6008
+ `, kl = (e) => /* @__PURE__ */ i(Li, { children: /* @__PURE__ */ i(H, { ...e }) }), Oi = C.div`
6008
6009
  display: flex;
6009
6010
  justify-content: space-between;
6010
6011
  align-items: center;
@@ -6051,7 +6052,7 @@ const nt = {
6051
6052
  H,
6052
6053
  {
6053
6054
  ...e,
6054
- iconBefore: /* @__PURE__ */ i(Ut, {}),
6055
+ iconBefore: /* @__PURE__ */ i(_t, {}),
6055
6056
  variant: "none",
6056
6057
  onClick: t,
6057
6058
  children: a.next,
@@ -6059,7 +6060,7 @@ const nt = {
6059
6060
  }
6060
6061
  )
6061
6062
  ] });
6062
- }, pe = {
6063
+ }, ge = {
6063
6064
  border: {
6064
6065
  color: {
6065
6066
  regular: E.palette.neutral.N40,
@@ -6097,7 +6098,7 @@ const nt = {
6097
6098
  hover: E.palette.neutral.N30
6098
6099
  }
6099
6100
  }
6100
- }, Pi = w.ul`
6101
+ }, Pi = C.ul`
6101
6102
  display: flex;
6102
6103
  flex-direction: column;
6103
6104
  padding: 4px 0px;
@@ -6108,7 +6109,7 @@ const nt = {
6108
6109
  border-radius: 4px;
6109
6110
  background: ${({ theme: e }) => {
6110
6111
  var n, t, r;
6111
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.regular) || pe.option.background.regular;
6112
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.regular) || ge.option.background.regular;
6112
6113
  }};
6113
6114
  box-shadow:
6114
6115
  0px 1px 2px rgba(0, 0, 0, 0.3),
@@ -6145,7 +6146,7 @@ const nt = {
6145
6146
  & > li:hover {
6146
6147
  background: ${({ theme: e }) => {
6147
6148
  var n, t, r;
6148
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || pe.option.background.hover;
6149
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ge.option.background.hover;
6149
6150
  }};
6150
6151
  }
6151
6152
  `, Mi = (e) => {
@@ -6173,17 +6174,17 @@ const nt = {
6173
6174
  children: n
6174
6175
  }
6175
6176
  );
6176
- }, zi = w.div`
6177
+ }, zi = C.div`
6177
6178
  cursor: ${({ $disabled: e }) => e && "not-allowed"};
6178
6179
  width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
6179
6180
  position: relative;
6180
- `, Vi = w.div`
6181
+ `, Vi = C.div`
6181
6182
  display: flex;
6182
6183
  align-items: center;
6183
6184
  margin-bottom: 4px;
6184
6185
  gap: 4px;
6185
6186
  pointer-events: ${({ $disabled: e }) => e && "none"};
6186
- `, ji = w.div`
6187
+ `, ji = C.div`
6187
6188
  display: grid;
6188
6189
  height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
6189
6190
  padding: 8px 16px;
@@ -6198,16 +6199,16 @@ const nt = {
6198
6199
  cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
6199
6200
  background-color: ${({ $disabled: e, theme: n }) => {
6200
6201
  var t, r, o, a, s, d;
6201
- return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.background) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || pe.background.color.disabled : ((d = (s = (a = n == null ? void 0 : n.input) == null ? void 0 : a.background) == null ? void 0 : s.color) == null ? void 0 : d.regular) || pe.background.color.regular;
6202
+ return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.background) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || ge.background.color.disabled : ((d = (s = (a = n == null ? void 0 : n.input) == null ? void 0 : a.background) == null ? void 0 : s.color) == null ? void 0 : d.regular) || ge.background.color.regular;
6202
6203
  }};
6203
6204
 
6204
6205
  border: 1px solid
6205
6206
  ${({ $disabled: e, $invalid: n, $focused: t, theme: r }) => {
6206
6207
  var a, s;
6207
- const o = ((s = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : s.color) || pe.border.color;
6208
+ const o = ((s = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : s.color) || ge.border.color;
6208
6209
  return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
6209
6210
  }};
6210
- `, Ui = w.input`
6211
+ `, _i = C.input`
6211
6212
  display: ${({ $inputWithData: e }) => e ? "none" : "block"};
6212
6213
  outline: none;
6213
6214
  padding: 0;
@@ -6239,13 +6240,13 @@ const nt = {
6239
6240
  }};
6240
6241
  color: ${({ $disabled: e, theme: n }) => {
6241
6242
  var t, r, o, a, s, d;
6242
- return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.content) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || pe.content.color.disabled : ((d = (s = (a = n == null ? void 0 : n.input) == null ? void 0 : a.content) == null ? void 0 : s.color) == null ? void 0 : d.regular) || pe.content.color.regular;
6243
+ return e ? ((o = (r = (t = n == null ? void 0 : n.input) == null ? void 0 : t.content) == null ? void 0 : r.color) == null ? void 0 : o.disabled) || ge.content.color.disabled : ((d = (s = (a = n == null ? void 0 : n.input) == null ? void 0 : a.content) == null ? void 0 : s.color) == null ? void 0 : d.regular) || ge.content.color.regular;
6243
6244
  }};
6244
6245
 
6245
6246
  ::placeholder {
6246
6247
  color: ${({ theme: e }) => {
6247
6248
  var n, t, r;
6248
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.placeholder) == null ? void 0 : t.color) == null ? void 0 : r.regular) || pe.placeholder.color.regular;
6249
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.placeholder) == null ? void 0 : t.color) == null ? void 0 : r.regular) || ge.placeholder.color.regular;
6249
6250
  }};
6250
6251
  }
6251
6252
 
@@ -6265,7 +6266,7 @@ const nt = {
6265
6266
  &:-webkit-autofill {
6266
6267
  -webkit-background-clip: text;
6267
6268
  }
6268
- `, _i = w.div`
6269
+ `, Ui = C.div`
6269
6270
  display: flex;
6270
6271
  justify-content: flex-end;
6271
6272
  transition: ease;
@@ -6278,7 +6279,7 @@ function rt(e, n) {
6278
6279
  }
6279
6280
  const qi = (e) => {
6280
6281
  var o, a;
6281
- const { message: n } = e, t = Fn(In), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || pe.message.appearance;
6282
+ const { message: n } = e, t = Fn(In), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ge.message.appearance;
6282
6283
  return /* @__PURE__ */ m(y, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
6283
6284
  /* @__PURE__ */ i(
6284
6285
  V,
@@ -6300,7 +6301,7 @@ const qi = (e) => {
6300
6301
  )
6301
6302
  ] });
6302
6303
  }, Bi = Qt((e, n) => {
6303
- var fe, le;
6304
+ var me, le;
6304
6305
  const {
6305
6306
  displayList: t,
6306
6307
  disabled: r,
@@ -6317,11 +6318,11 @@ const qi = (e) => {
6317
6318
  required: h,
6318
6319
  size: x,
6319
6320
  value: b,
6320
- picker: C,
6321
+ picker: D,
6321
6322
  showChevron: T,
6322
6323
  checkedItems: S,
6323
6324
  editable: N = !1,
6324
- clearable: D,
6325
+ clearable: w,
6325
6326
  onKeyUp: I,
6326
6327
  onBlur: L,
6327
6328
  onChange: k,
@@ -6329,11 +6330,11 @@ const qi = (e) => {
6329
6330
  onFocus: oe,
6330
6331
  onOptionClick: be,
6331
6332
  onCheckboxChange: ve,
6332
- handleClear: ce
6333
- } = e, ie = Fn(In), ye = ((le = (fe = ie == null ? void 0 : ie.input) == null ? void 0 : fe.required) == null ? void 0 : le.appearance) || pe.required.appearance, Ee = h && !r, ue = C || b === "" ? "" : rt(g, b), xe = dt(
6333
+ handleClear: ue
6334
+ } = e, ie = Fn(In), ye = ((le = (me = ie == null ? void 0 : ie.input) == null ? void 0 : me.required) == null ? void 0 : le.appearance) || ge.required.appearance, Ee = h && !r, pe = D || b === "" ? "" : rt(g, b), xe = dt(
6334
6335
  () => g.filter((F) => S.includes(F.id)),
6335
6336
  [g, S]
6336
- ), he = (F, O) => {
6337
+ ), fe = (F, O) => {
6337
6338
  F.stopPropagation(), ve({
6338
6339
  target: { checked: !1, value: O }
6339
6340
  });
@@ -6373,11 +6374,11 @@ const qi = (e) => {
6373
6374
  $size: x,
6374
6375
  children: [
6375
6376
  /* @__PURE__ */ i(
6376
- Ui,
6377
+ _i,
6377
6378
  {
6378
6379
  $inputWithData: !!b,
6379
6380
  autoComplete: "off",
6380
- value: ue,
6381
+ value: pe,
6381
6382
  name: c,
6382
6383
  id: s,
6383
6384
  placeholder: f,
@@ -6402,14 +6403,14 @@ const qi = (e) => {
6402
6403
  alignItems: "center",
6403
6404
  justifyContent: "space-between",
6404
6405
  children: [
6405
- /* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: D && !r && (C ? xe.map((F) => /* @__PURE__ */ i(
6406
+ /* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((F) => /* @__PURE__ */ i(
6406
6407
  Ne,
6407
6408
  {
6408
6409
  appearance: "gray",
6409
6410
  label: F.label,
6410
6411
  removable: !0,
6411
6412
  displayIcon: !1,
6412
- onClose: (O) => he(O, F.id)
6413
+ onClose: (O) => fe(O, F.id)
6413
6414
  },
6414
6415
  F.id
6415
6416
  )) : (b ?? "") !== "" && /* @__PURE__ */ i(
@@ -6420,15 +6421,15 @@ const qi = (e) => {
6420
6421
  removable: !0,
6421
6422
  displayIcon: !1,
6422
6423
  onClose: (F) => {
6423
- F.stopPropagation(), ce();
6424
+ F.stopPropagation(), ue();
6424
6425
  }
6425
6426
  }
6426
6427
  )) }),
6427
- T && /* @__PURE__ */ i(_i, { $displayList: t, children: /* @__PURE__ */ i(
6428
+ T && /* @__PURE__ */ i(Ui, { $displayList: t, children: /* @__PURE__ */ i(
6428
6429
  V,
6429
6430
  {
6430
6431
  appearance: "dark",
6431
- icon: /* @__PURE__ */ i(_t, {}),
6432
+ icon: /* @__PURE__ */ i(Ut, {}),
6432
6433
  spacing: "narrow",
6433
6434
  disabled: r
6434
6435
  }
@@ -6453,7 +6454,7 @@ const qi = (e) => {
6453
6454
  label: F.label,
6454
6455
  checked: S.includes(F.id),
6455
6456
  onCheckboxChange: ve,
6456
- picker: C
6457
+ picker: D
6457
6458
  },
6458
6459
  F.id
6459
6460
  ))
@@ -6478,22 +6479,22 @@ const qi = (e) => {
6478
6479
  options: h,
6479
6480
  placeholder: x,
6480
6481
  required: b = !1,
6481
- size: C = "wide",
6482
+ size: D = "wide",
6482
6483
  value: T,
6483
6484
  showOptions: S = !1,
6484
6485
  picker: N = !1,
6485
- showChevron: D = !0,
6486
+ showChevron: w = !0,
6486
6487
  editable: I = !1,
6487
6488
  clearable: L = !0
6488
- } = e, [k, M] = j(!1), [oe, be] = j(!1), [ve, ce] = j([]), ie = Re(null);
6489
+ } = e, [k, M] = j(!1), [oe, be] = j(!1), [ve, ue] = j([]), ie = Re(null);
6489
6490
  Ae(() => {
6490
6491
  if (N) {
6491
6492
  const O = T ? T.split(",").map((B) => B.trim()) : [];
6492
- ce(O);
6493
+ ue(O);
6493
6494
  }
6494
6495
  }, [T, N]);
6495
6496
  function ye() {
6496
- u(l, ""), ce([]), M(!1);
6497
+ u(l, ""), ue([]), M(!1);
6497
6498
  }
6498
6499
  function Ee(O) {
6499
6500
  if (!n) {
@@ -6505,7 +6506,7 @@ const qi = (e) => {
6505
6506
  }
6506
6507
  }
6507
6508
  }
6508
- const ue = Kt((O) => {
6509
+ const pe = Kt((O) => {
6509
6510
  ie.current && O.target && !ie.current.contains(O.target) && M(!1);
6510
6511
  }, []);
6511
6512
  function xe(O) {
@@ -6515,7 +6516,7 @@ const qi = (e) => {
6515
6516
  console.error(`Error executing focus/blur callback. ${B}`);
6516
6517
  }
6517
6518
  }
6518
- function he(O) {
6519
+ function fe(O) {
6519
6520
  M(!1);
6520
6521
  try {
6521
6522
  u && u(l, O);
@@ -6523,7 +6524,7 @@ const qi = (e) => {
6523
6524
  console.error(`Error when changing value using callback. ${B}`);
6524
6525
  }
6525
6526
  }
6526
- function fe(O) {
6527
+ function me(O) {
6527
6528
  O.key === "Escape" && M(!1), M(!k);
6528
6529
  try {
6529
6530
  f && f(O);
@@ -6533,14 +6534,14 @@ const qi = (e) => {
6533
6534
  }
6534
6535
  function le(O) {
6535
6536
  const { value: B, checked: Y } = O.target;
6536
- ce((je) => {
6537
- const R = Y ? [...je, B] : je.filter((_) => _ !== B);
6537
+ ue((je) => {
6538
+ const R = Y ? [...je, B] : je.filter((U) => U !== B);
6538
6539
  return u(l, R.join(",")), R;
6539
6540
  });
6540
6541
  }
6541
- Ae(() => (document.addEventListener("click", ue), () => {
6542
- document.removeEventListener("click", ue);
6543
- }), [ue]);
6542
+ Ae(() => (document.addEventListener("click", pe), () => {
6543
+ document.removeEventListener("click", pe);
6544
+ }), [pe]);
6544
6545
  const F = dt(() => L || N ? h : [{ id: "empty-option", label: "", value: "" }, ...h], [h, L, N]);
6545
6546
  return /* @__PURE__ */ i(
6546
6547
  Bi,
@@ -6559,10 +6560,10 @@ const qi = (e) => {
6559
6560
  options: F,
6560
6561
  placeholder: x,
6561
6562
  required: b,
6562
- size: C,
6563
+ size: D,
6563
6564
  value: T,
6564
6565
  picker: N,
6565
- showChevron: D,
6566
+ showChevron: w,
6566
6567
  checkedItems: ve,
6567
6568
  editable: I,
6568
6569
  clearable: L,
@@ -6571,8 +6572,8 @@ const qi = (e) => {
6571
6572
  onChange: u,
6572
6573
  onClick: Ee,
6573
6574
  onFocus: xe,
6574
- onOptionClick: he,
6575
- onKeyUp: fe,
6575
+ onOptionClick: fe,
6576
+ onKeyUp: me,
6576
6577
  onCheckboxChange: le
6577
6578
  }
6578
6579
  );
@@ -6627,11 +6628,11 @@ const qi = (e) => {
6627
6628
  conditionGroups: Yi(n)
6628
6629
  };
6629
6630
  return delete t.conditionsThatEstablishesTheDecision, t;
6630
- }, Ue = /* @__PURE__ */ new Map(), Wi = (e, n) => Ue.get(`${n}:${e}`), Xi = (e, n, t) => {
6631
+ }, _e = /* @__PURE__ */ new Map(), Wi = (e, n) => _e.get(`${n}:${e}`), Xi = (e, n, t) => {
6631
6632
  const r = `${n}:${e}`;
6632
- if (Ue.set(r, t), Ue.size > 1e3) {
6633
- const o = Ue.keys().next().value;
6634
- o !== void 0 && Ue.delete(o);
6633
+ if (_e.set(r, t), _e.size > 1e3) {
6634
+ const o = _e.keys().next().value;
6635
+ o !== void 0 && _e.delete(o);
6635
6636
  }
6636
6637
  }, ot = /* @__PURE__ */ new Map(), Qi = 1e3, Ki = (e) => {
6637
6638
  const n = Date.now(), t = ot.get(e) || 0;
@@ -6707,14 +6708,14 @@ export {
6707
6708
  tt as DraggableList,
6708
6709
  ka as DropdownMenu,
6709
6710
  El as DropdownMenuContainer,
6710
- me as EValueHowToSetUp,
6711
+ se as EValueHowToSetUp,
6711
6712
  bl as Filter,
6712
6713
  vl as FilterModal,
6713
6714
  yl as FormFilter,
6714
6715
  ut as ModalRules,
6715
6716
  Ta as RulesForm,
6716
6717
  kl as SendButton,
6717
- _o as buildEsConditionSentence,
6718
+ Uo as buildEsConditionSentence,
6718
6719
  da as convertRangeToString,
6719
6720
  ht as filterByGroup,
6720
6721
  Il as flatFromGroups,