@isettingkit/business-rules 2.1.9 → 2.1.11

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/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
2
- import { MdOutlineDelete as an, MdClear as ln, MdAdd as Ge, MdOutlineCreate as It, MdExpandLess as Rt, MdExpandMore as xn, MdInfo as Ft, MdCached as Lt, MdOutlineInfo as Ot, MdClose as Pt, MdOutlineFilterAltOff as ot, MdOutlineFilterAlt as at, MdChevronRight as Mn, MdArrowRight as Mt, MdOutlineArrowCircleLeft as zt, MdOutlineArrowCircleRight as Vt, MdOutlineChevronRight as Ut, MdOutlineError as _t } from "react-icons/md";
3
- import { inube as E, Stack as v, Divider as B, Icon as M, Text as A, SkeletonLine as J, useMediaQuery as te, Blanket as sn, Button as q, Grid as Ye, Toggle as dn, Checkbox as Nn, Date as Fe, Box as Ht, Tag as De, Tabs as it, SkeletonIcon as jt, Fieldset as Ue, OptionList as qt, Checkpicker as Bt, Label as Gt, OptionItem as Yt } from "@inubekit/inubekit";
4
- import w, { keyframes as kn, ThemeContext as $n } from "styled-components";
5
- import { ValueDataType as U, ValueHowToSetUp as ee, DecisionConditionRender as nn, DecisionConditionRenderNew as zn } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as Ae, DecisionViewConditionRendererNew as Ze } from "@isettingkit/view";
7
- import { createPortal as cn } from "react-dom";
8
- import { useFormik as An } from "formik";
9
- import { string as le, mixed as Pe, object as ne, number as se, lazy as qe, date as Le } from "yup";
10
- import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as In, forwardRef as Wt, useMemo as lt, useCallback as Xt } from "react";
11
- import { Link as st, useLocation as Qt } from "react-router-dom";
12
- import Zt from "axios";
13
- import { franc as Kt } from "franc-min";
14
- const Jt = w.div`
2
+ import { MdOutlineDelete as ln, MdClear as sn, MdAdd as Ye, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as Tn, 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 v, Divider as B, Icon as M, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as dn, Button as q, Grid as We, Toggle as cn, Checkbox as kn, Date as Fe, Box as qt, Tag as De, 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 w, { keyframes as An, ThemeContext as $n } from "styled-components";
5
+ import { ValueDataType as j, ValueHowToSetUp as ee, DecisionConditionRender as rn, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as $e, DecisionViewConditionRendererNew as Ke } from "@isettingkit/view";
7
+ import { createPortal as un } from "react-dom";
8
+ import { useFormik as In } from "formik";
9
+ import { string as le, mixed as Me, object as ne, number as se, lazy as Be, date as Le } from "yup";
10
+ import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as Rn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
11
+ import { Link as ct, useLocation as Kt } from "react-router-dom";
12
+ import Jt from "axios";
13
+ import { franc as er } from "franc-min";
14
+ const nr = w.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
@@ -46,9 +46,9 @@ w.div`
46
46
  border-radius: 8px;
47
47
  }
48
48
  `;
49
- const We = (e) => {
49
+ const Xe = (e) => {
50
50
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
51
- return /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
51
+ return /* @__PURE__ */ a(nr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
52
  n,
53
53
  t && /* @__PURE__ */ m(O, { children: [
54
54
  /* @__PURE__ */ a(B, {}),
@@ -58,7 +58,7 @@ const We = (e) => {
58
58
  cursorHover: !0,
59
59
  appearance: "danger",
60
60
  size: "24px",
61
- icon: /* @__PURE__ */ a(an, {}),
61
+ icon: /* @__PURE__ */ a(ln, {}),
62
62
  onClick: () => {
63
63
  r(o);
64
64
  }
@@ -66,22 +66,22 @@ const We = (e) => {
66
66
  ) })
67
67
  ] })
68
68
  ] }) });
69
- }, er = (e) => e.value, nr = (e) => e.value, tr = (e) => e.value, rr = (e) => ({
69
+ }, tr = (e) => e.value, rr = (e) => e.value, or = (e) => e.value, ar = (e) => ({
70
70
  from: e.from ?? "",
71
71
  to: e.to ?? ""
72
- }), or = (e) => e.value, ar = (e) => e.value, ir = (e) => e.value;
73
- var $ = /* @__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))($ || {});
74
- const lr = {
75
- [$.LIST_OF_VALUES]: nr,
76
- [$.LIST_OF_VALUES_MULTI]: tr,
77
- [$.RANGE]: rr,
78
- [$.GREATER_THAN]: or,
79
- [$.LESS_THAN]: ar,
80
- [$.EQUAL]: ir
72
+ }), ir = (e) => e.value, lr = (e) => e.value, sr = (e) => e.value;
73
+ var A = /* @__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))(A || {});
74
+ const dr = {
75
+ [A.LIST_OF_VALUES]: rr,
76
+ [A.LIST_OF_VALUES_MULTI]: or,
77
+ [A.RANGE]: ar,
78
+ [A.GREATER_THAN]: ir,
79
+ [A.LESS_THAN]: lr,
80
+ [A.EQUAL]: sr
81
81
  }, _e = (e) => {
82
- const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = lr[e == null ? void 0 : e.howToSetTheDecision] || er;
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
- }, Vn = w.div`
84
+ }, jn = w.div`
85
85
  & > div {
86
86
  border-radius: 8px;
87
87
  border: 1px solid
@@ -108,7 +108,7 @@ const lr = {
108
108
  background-color: #ebecf0;
109
109
  border-radius: 8px;
110
110
  }
111
- `, sr = (e) => {
111
+ `, cr = (e) => {
112
112
  const {
113
113
  conditionsAlignment: n,
114
114
  decision: t,
@@ -122,7 +122,7 @@ const lr = {
122
122
  } = e;
123
123
  return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
124
124
  /* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
125
- Ae,
125
+ $e,
126
126
  {
127
127
  element: o,
128
128
  valueData: _e(
@@ -141,7 +141,7 @@ const lr = {
141
141
  height: "203px",
142
142
  children: [
143
143
  p.length > 0 && /* @__PURE__ */ a(
144
- A,
144
+ $,
145
145
  {
146
146
  type: "label",
147
147
  size: "large",
@@ -151,8 +151,8 @@ const lr = {
151
151
  children: l.factsThatConditionIt
152
152
  }
153
153
  ),
154
- p.length > 0 && p.map((u) => /* @__PURE__ */ a(Vn, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
155
- Ae,
154
+ p.length > 0 && p.map((u) => /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
155
+ $e,
156
156
  {
157
157
  element: { ...u, value: u.value },
158
158
  valueData: _e(
@@ -162,7 +162,7 @@ const lr = {
162
162
  ) }) }, u.conditionName)),
163
163
  p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
164
164
  d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
165
- Ae,
165
+ $e,
166
166
  {
167
167
  element: r.element,
168
168
  valueData: r.valueData,
@@ -189,7 +189,7 @@ const lr = {
189
189
  gap: "12px",
190
190
  justifyContent: "space-between",
191
191
  height: "203px",
192
- children: s.map((u, c) => /* @__PURE__ */ a(Vn, { children: /* @__PURE__ */ m(
192
+ children: s.map((u, c) => /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ m(
193
193
  v,
194
194
  {
195
195
  direction: "column",
@@ -205,14 +205,14 @@ const lr = {
205
205
  }
206
206
  ) })
207
207
  ] });
208
- }, Rn = (e) => {
208
+ }, Fn = (e) => {
209
209
  var g;
210
210
  const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), i = !!(n != null && n.validUntil), s = o && i ? {
211
211
  element: {
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: j.DATE
216
216
  },
217
217
  valueData: _e({
218
218
  labelName: r == null ? void 0 : r.terms,
@@ -221,20 +221,20 @@ const lr = {
221
221
  to: String(n.validUntil)
222
222
  },
223
223
  howToSetTheDecision: ee.RANGE,
224
- decisionDataType: U.DATE
224
+ decisionDataType: j.DATE
225
225
  })
226
226
  } : o && !i ? {
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: j.DATE
232
232
  },
233
233
  valueData: _e({
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: j.DATE
238
238
  })
239
239
  } : null, d = n ? {
240
240
  labelName: n.labelName || "",
@@ -245,7 +245,7 @@ const lr = {
245
245
  (h) => !h.hidden
246
246
  )) || [], p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
247
247
  return /* @__PURE__ */ a(
248
- sr,
248
+ cr,
249
249
  {
250
250
  conditionsAlignment: c,
251
251
  decision: n,
@@ -258,12 +258,12 @@ const lr = {
258
258
  visibleConditions: l
259
259
  }
260
260
  );
261
- }, dr = w.div`
261
+ }, ur = w.div`
262
262
  position: relative;
263
263
  & > div {
264
264
  padding: 24px 16px;
265
265
  }
266
- `, cr = w.div`
266
+ `, pr = w.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;
@@ -294,24 +294,24 @@ const lr = {
294
294
  background-color: #ebecf0;
295
295
  border-radius: 8px;
296
296
  }
297
- `, dt = (e) => {
297
+ `, ut = (e) => {
298
298
  const { children: n, portalId: t, onCloseModal: r, title: o } = e, i = document.getElementById(t);
299
299
  if (!i)
300
300
  throw new Error(
301
301
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
302
302
  );
303
303
  const s = te("(max-width: 400px)");
304
- return cn(
305
- /* @__PURE__ */ a(dr, { smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(cr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
304
+ return un(
305
+ /* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
306
306
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
307
- /* @__PURE__ */ a(A, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
308
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
307
+ /* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
308
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
309
309
  ] }) }),
310
310
  n
311
311
  ] }) }) }) }),
312
312
  i
313
313
  );
314
- }, ur = kn`
314
+ }, gr = An`
315
315
  from {
316
316
  opacity: 0;
317
317
  transform: translateY(20px);
@@ -345,7 +345,7 @@ w.div`
345
345
  }};
346
346
  }
347
347
  `;
348
- const ct = w.div`
348
+ const pt = w.div`
349
349
  & > div {
350
350
  background-color: ${({ theme: e }) => {
351
351
  var n, t;
@@ -358,18 +358,18 @@ const ct = w.div`
358
358
  height: 100%;
359
359
  padding-bottom: 12px;
360
360
  cursor: pointer;
361
- `, Xe = w.div`
361
+ `, Qe = w.div`
362
362
  width: 100%;
363
363
  height: 100%;
364
364
  & > div {
365
- animation: ${ur} 600ms ease-out;
365
+ animation: ${gr} 600ms ease-out;
366
366
  }
367
- `, pr = w.div`
367
+ `, hr = w.div`
368
368
  & > div > div {
369
369
  border-radius: 8px;
370
370
  box-sizing: border-box;
371
371
  }
372
- `, gr = w.div`
372
+ `, fr = w.div`
373
373
  & > div {
374
374
  width: 100%;
375
375
  height: 100%;
@@ -389,50 +389,50 @@ const ct = w.div`
389
389
  border-radius: 8px;
390
390
  }
391
391
  }
392
- `, hr = (e) => {
392
+ `, mr = (e) => {
393
393
  const { index: n, handleOpenModal: t } = e;
394
394
  return /* @__PURE__ */ a(
395
- We,
395
+ Xe,
396
396
  {
397
397
  id: `loading-card-${n}`,
398
398
  handleDelete: () => {
399
399
  },
400
400
  handleView: () => t ? t() : null,
401
401
  controls: !1,
402
- children: /* @__PURE__ */ a(Rn, { loading: !0 })
402
+ children: /* @__PURE__ */ a(Fn, { loading: !0 })
403
403
  },
404
404
  `loading-card-${n}`
405
405
  );
406
- }, fr = (e) => {
406
+ }, br = (e) => {
407
407
  const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
408
- return n ? /* @__PURE__ */ a(Xe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
409
- /* @__PURE__ */ a(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
408
+ return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
409
+ /* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
410
410
  /* @__PURE__ */ a(
411
- We,
411
+ Xe,
412
412
  {
413
413
  id: n.decisionId,
414
414
  handleDelete: () => o ? o(n.decisionId) : null,
415
415
  handleView: () => r ? r(n) : null,
416
416
  controls: t,
417
- children: /* @__PURE__ */ a(Rn, { decision: n, textValues: i })
417
+ children: /* @__PURE__ */ a(Fn, { decision: n, textValues: i })
418
418
  }
419
419
  )
420
420
  ] }) }, n.decisionId) : null;
421
- }, mr = (e) => {
421
+ }, vr = (e) => {
422
422
  const {
423
423
  customTitleContentAddCard: n,
424
424
  index: t,
425
425
  handleOpenModal: r,
426
426
  shouldRenderEmptyMessage: o
427
427
  } = e, i = n || "Agregar decisión";
428
- return /* @__PURE__ */ a(Xe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
429
- /* @__PURE__ */ a(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
428
+ return /* @__PURE__ */ a(Qe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
429
+ /* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
430
430
  /* @__PURE__ */ a(
431
- ct,
431
+ pt,
432
432
  {
433
433
  onClick: () => r ? r() : null,
434
434
  children: /* @__PURE__ */ a(
435
- We,
435
+ Xe,
436
436
  {
437
437
  id: `add-decision-${t}`,
438
438
  handleDelete: () => {
@@ -440,22 +440,22 @@ const ct = w.div`
440
440
  handleView: () => r ? r() : null,
441
441
  controls: !1,
442
442
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
443
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ge, {}), size: "35px" }),
444
- /* @__PURE__ */ a(A, { appearance: "gray", type: "body", size: "large", children: i })
443
+ /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
444
+ /* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
445
445
  ] })
446
446
  }
447
447
  )
448
448
  }
449
449
  )
450
450
  ] }) }, `add-decision-${t}`);
451
- }, br = {
452
- loading: hr,
453
- decision: fr,
454
- add: mr
455
- }, Tn = (e) => {
456
- const { type: n } = e, t = br[n];
451
+ }, yr = {
452
+ loading: mr,
453
+ decision: br,
454
+ add: vr
455
+ }, wn = (e) => {
456
+ const { type: n } = e, t = yr[n];
457
457
  return t ? t(e) : null;
458
- }, vr = (e) => {
458
+ }, xr = (e) => {
459
459
  const {
460
460
  controls: n,
461
461
  customTitleContentAddCard: t,
@@ -465,7 +465,7 @@ const ct = w.div`
465
465
  handleDelete: s,
466
466
  textValues: d
467
467
  } = e, l = o ? Array.from({ length: 3 }).map(
468
- (u, c) => Tn({
468
+ (u, c) => wn({
469
469
  type: "loading",
470
470
  index: c,
471
471
  controls: n,
@@ -476,7 +476,7 @@ const ct = w.div`
476
476
  textValues: d
477
477
  })
478
478
  ) : r == null ? void 0 : r.map(
479
- (u) => Tn({
479
+ (u) => wn({
480
480
  type: "decision",
481
481
  decision: u,
482
482
  controls: n,
@@ -488,7 +488,7 @@ const ct = w.div`
488
488
  })
489
489
  ), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
490
490
  return { renderedCards: l, shouldRenderAddCard: p };
491
- }, ul = (e) => {
491
+ }, hl = (e) => {
492
492
  const {
493
493
  controls: n = !0,
494
494
  customTitleContentAddCard: t,
@@ -504,7 +504,7 @@ const ct = w.div`
504
504
  handleSubmitForm: g,
505
505
  handleDelete: h,
506
506
  terms: f = !0
507
- } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = vr({
507
+ } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = xr({
508
508
  controls: n,
509
509
  customTitleContentAddCard: t,
510
510
  decisions: o,
@@ -514,7 +514,7 @@ const ct = w.div`
514
514
  textValues: i
515
515
  }), S = (o == null ? void 0 : o.length) === 0 && !p;
516
516
  return /* @__PURE__ */ m(O, { children: [
517
- /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ a(gr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
517
+ /* @__PURE__ */ a(hr, { children: /* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
518
518
  v,
519
519
  {
520
520
  direction: "column",
@@ -524,10 +524,10 @@ const ct = w.div`
524
524
  justifyContent: "center",
525
525
  alignItems: "center",
526
526
  children: [
527
- /* @__PURE__ */ a(A, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
527
+ /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
528
528
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
529
529
  /* @__PURE__ */ m(
530
- A,
530
+ $,
531
531
  {
532
532
  as: "span",
533
533
  type: "label",
@@ -546,7 +546,7 @@ const ct = w.div`
546
546
  /* @__PURE__ */ a(
547
547
  q,
548
548
  {
549
- iconBefore: /* @__PURE__ */ a(Ge, {}),
549
+ iconBefore: /* @__PURE__ */ a(Ye, {}),
550
550
  onClick: () => u ? u() : null,
551
551
  children: t || "Agregar decisión"
552
552
  }
@@ -554,7 +554,7 @@ const ct = w.div`
554
554
  ]
555
555
  }
556
556
  ) : /* @__PURE__ */ m(
557
- Ye,
557
+ We,
558
558
  {
559
559
  templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
560
560
  autoFlow: "row dense",
@@ -567,7 +567,7 @@ const ct = w.div`
567
567
  height: x ? "auto" : "484px",
568
568
  children: [
569
569
  D,
570
- T && Tn({
570
+ T && wn({
571
571
  type: "add",
572
572
  index: o == null ? void 0 : o.length,
573
573
  controls: n,
@@ -584,13 +584,13 @@ const ct = w.div`
584
584
  }
585
585
  ) }) }) }),
586
586
  d && /* @__PURE__ */ a(
587
- dt,
587
+ ut,
588
588
  {
589
589
  portalId: "modal-portal",
590
590
  onCloseModal: c,
591
591
  title: l ? "Editar Decisión" : "Nueva decisión",
592
592
  children: /* @__PURE__ */ a(
593
- ya,
593
+ Ta,
594
594
  {
595
595
  decision: l || s,
596
596
  onSubmitEvent: g,
@@ -602,12 +602,12 @@ const ct = w.div`
602
602
  }
603
603
  )
604
604
  ] });
605
- }, yr = w.div`
605
+ }, Tr = w.div`
606
606
  position: relative;
607
607
  & > div {
608
608
  padding: 24px 16px;
609
609
  }
610
- `, xr = w.div`
610
+ `, wr = w.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;
@@ -638,24 +638,24 @@ const ct = w.div`
638
638
  background-color: #ebecf0;
639
639
  border-radius: 8px;
640
640
  }
641
- `, Tr = (e) => {
641
+ `, Cr = (e) => {
642
642
  const { children: n, portalId: t, onCloseModal: r, title: o } = e, i = document.getElementById(t);
643
643
  if (!i)
644
644
  throw new Error(
645
645
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
646
646
  );
647
647
  const s = te("(max-width: 400px)");
648
- return cn(
649
- /* @__PURE__ */ a(yr, { $smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(xr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
648
+ return un(
649
+ /* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(wr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
650
650
  /* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
651
- /* @__PURE__ */ a(A, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
652
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
651
+ /* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
652
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: r })
653
653
  ] }) }),
654
654
  n
655
655
  ] }) }) }) }),
656
656
  i
657
657
  );
658
- }, wr = kn`
658
+ }, Dr = An`
659
659
  from {
660
660
  opacity: 0;
661
661
  transform: translateY(20px);
@@ -707,15 +707,15 @@ w.div`
707
707
  width: 100%;
708
708
  height: 100%;
709
709
  & > div {
710
- animation: ${wr} 600ms ease-out;
710
+ animation: ${Dr} 600ms ease-out;
711
711
  }
712
712
  `;
713
- const Cr = w.div`
713
+ const Sr = w.div`
714
714
  & > div > div {
715
715
  border-radius: 8px;
716
716
  box-sizing: border-box;
717
717
  }
718
- `, Dr = w.div`
718
+ `, Er = w.div`
719
719
  & > div {
720
720
  width: 100%;
721
721
  height: 100%;
@@ -735,32 +735,32 @@ const Cr = w.div`
735
735
  border-radius: 8px;
736
736
  }
737
737
  }
738
- `, Sr = (e) => {
738
+ `, Nr = (e) => {
739
739
  const { index: n, handleOpenModal: t } = e;
740
740
  return /* @__PURE__ */ a(
741
- We,
741
+ Xe,
742
742
  {
743
743
  id: `loading-card-${n}`,
744
744
  handleDelete: () => {
745
745
  },
746
746
  handleView: () => t ? t() : null,
747
747
  controls: !1,
748
- children: /* @__PURE__ */ a(Rn, { loading: !0 })
748
+ children: /* @__PURE__ */ a(Fn, { loading: !0 })
749
749
  },
750
750
  `loading-card-${n}`
751
751
  );
752
- }, Er = (e) => e.value, Nr = (e) => e.value, kr = (e) => e.value, $r = (e) => ({
752
+ }, kr = (e) => e.value, Ar = (e) => e.value, $r = (e) => e.value, Ir = (e) => ({
753
753
  from: e.from ?? "",
754
754
  to: e.to ?? ""
755
- }), Ar = (e) => e.value, Ir = (e) => e.value, Rr = (e) => e.value, Fr = {
756
- [$.LIST_OF_VALUES]: Nr,
757
- [$.LIST_OF_VALUES_MULTI]: kr,
758
- [$.RANGE]: $r,
759
- [$.GREATER_THAN]: Ar,
760
- [$.LESS_THAN]: Ir,
761
- [$.EQUAL]: Rr
755
+ }), Rr = (e) => e.value, Fr = (e) => e.value, Lr = (e) => e.value, Or = {
756
+ [A.LIST_OF_VALUES]: Ar,
757
+ [A.LIST_OF_VALUES_MULTI]: $r,
758
+ [A.RANGE]: Ir,
759
+ [A.GREATER_THAN]: Rr,
760
+ [A.LESS_THAN]: Fr,
761
+ [A.EQUAL]: Lr
762
762
  }, He = (e) => {
763
- const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Fr[e == null ? void 0 : e.howToSetTheDecision] || Er;
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
765
  }, _n = w.div`
766
766
  & > div {
@@ -789,7 +789,7 @@ const Cr = w.div`
789
789
  background-color: #ebecf0;
790
790
  border-radius: 8px;
791
791
  }
792
- `, Lr = (e) => {
792
+ `, Pr = (e) => {
793
793
  const {
794
794
  conditionsAlignment: n,
795
795
  decision: t,
@@ -803,7 +803,7 @@ const Cr = w.div`
803
803
  } = e;
804
804
  return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
805
805
  /* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
806
- Ae,
806
+ $e,
807
807
  {
808
808
  element: o,
809
809
  valueData: He(
@@ -822,7 +822,7 @@ const Cr = w.div`
822
822
  height: "203px",
823
823
  children: [
824
824
  p.length > 0 && /* @__PURE__ */ a(
825
- A,
825
+ $,
826
826
  {
827
827
  type: "label",
828
828
  size: "large",
@@ -833,7 +833,7 @@ const Cr = w.div`
833
833
  }
834
834
  ),
835
835
  p.length > 0 && p.map((u) => /* @__PURE__ */ a(_n, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
836
- Ae,
836
+ $e,
837
837
  {
838
838
  element: { ...u, value: u.value },
839
839
  valueData: He(
@@ -843,7 +843,7 @@ const Cr = w.div`
843
843
  ) }) }, u.conditionName)),
844
844
  p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
845
845
  d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
846
- Ae,
846
+ $e,
847
847
  {
848
848
  element: r.element,
849
849
  valueData: r.valueData,
@@ -886,16 +886,16 @@ const Cr = w.div`
886
886
  }
887
887
  ) })
888
888
  ] });
889
- }, Or = (e) => Array.isArray(e) ? e[0] : e ?? null, Pr = (e) => {
889
+ }, Mr = (e) => Array.isArray(e) ? e[0] : e ?? null, zr = (e) => {
890
890
  var n;
891
- return ((n = Or(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : n.conditionsThatEstablishesTheDecision) ?? [];
892
- }, Mr = (e) => {
891
+ return ((n = Mr(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : n.conditionsThatEstablishesTheDecision) ?? [];
892
+ }, Vr = (e) => {
893
893
  const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), i = !!(n != null && n.validUntil), s = o && i ? {
894
894
  element: {
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: j.DATE
899
899
  },
900
900
  valueData: He({
901
901
  labelName: r == null ? void 0 : r.terms,
@@ -904,29 +904,29 @@ const Cr = w.div`
904
904
  to: String(n.validUntil)
905
905
  },
906
906
  howToSetTheDecision: ee.RANGE,
907
- decisionDataType: U.DATE
907
+ decisionDataType: j.DATE
908
908
  })
909
909
  } : o && !i ? {
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: j.DATE
915
915
  },
916
916
  valueData: He({
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: j.DATE
921
921
  })
922
922
  } : null, d = n ? {
923
923
  labelName: n.labelName || "",
924
924
  decisionDataType: n.decisionDataType || "alphabetical",
925
925
  value: He(n),
926
926
  howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
927
- } : null, l = Pr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
927
+ } : null, l = zr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
928
928
  return /* @__PURE__ */ a(
929
- Lr,
929
+ Pr,
930
930
  {
931
931
  conditionsAlignment: c,
932
932
  decision: n,
@@ -939,7 +939,7 @@ const Cr = w.div`
939
939
  visibleConditions: l
940
940
  }
941
941
  );
942
- }, zr = w.div`
942
+ }, jr = w.div`
943
943
  border-radius: 8px;
944
944
  border: 1px solid
945
945
  ${({ theme: e }) => {
@@ -974,9 +974,9 @@ w.div`
974
974
  border-radius: 8px;
975
975
  }
976
976
  `;
977
- const Vr = (e) => {
977
+ const Ur = (e) => {
978
978
  const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
979
- return /* @__PURE__ */ a(zr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
979
+ return /* @__PURE__ */ a(jr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
980
980
  n,
981
981
  t && /* @__PURE__ */ m(O, { children: [
982
982
  /* @__PURE__ */ a(B, {}),
@@ -986,7 +986,7 @@ const Vr = (e) => {
986
986
  cursorHover: !0,
987
987
  appearance: "danger",
988
988
  size: "24px",
989
- icon: /* @__PURE__ */ a(an, {}),
989
+ icon: /* @__PURE__ */ a(ln, {}),
990
990
  onClick: () => {
991
991
  r(o);
992
992
  }
@@ -994,19 +994,19 @@ const Vr = (e) => {
994
994
  ) })
995
995
  ] })
996
996
  ] }) });
997
- }, Ur = (e) => {
997
+ }, _r = (e) => {
998
998
  const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
999
- return n ? /* @__PURE__ */ a(Xe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
1000
- /* @__PURE__ */ a(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
999
+ return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
1000
+ /* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
1001
1001
  /* @__PURE__ */ a(
1002
- Vr,
1002
+ Ur,
1003
1003
  {
1004
1004
  id: n.decisionId,
1005
1005
  handleDelete: () => o ? o(n.decisionId) : null,
1006
1006
  handleView: () => r ? r(n) : null,
1007
1007
  controls: t,
1008
1008
  children: /* @__PURE__ */ a(
1009
- Mr,
1009
+ Vr,
1010
1010
  {
1011
1011
  decision: n,
1012
1012
  textValues: i
@@ -1015,21 +1015,21 @@ const Vr = (e) => {
1015
1015
  }
1016
1016
  )
1017
1017
  ] }) }, n.decisionId) : null;
1018
- }, _r = (e) => {
1018
+ }, Hr = (e) => {
1019
1019
  const {
1020
1020
  customTitleContentAddCard: n,
1021
1021
  index: t,
1022
1022
  handleOpenModal: r,
1023
1023
  shouldRenderEmptyMessage: o
1024
1024
  } = e, i = n || "Agregar decisión";
1025
- return /* @__PURE__ */ a(Xe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
1026
- /* @__PURE__ */ a(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
1025
+ return /* @__PURE__ */ a(Qe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
1026
+ /* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
1027
1027
  /* @__PURE__ */ a(
1028
- ct,
1028
+ pt,
1029
1029
  {
1030
1030
  onClick: () => r ? r() : null,
1031
1031
  children: /* @__PURE__ */ a(
1032
- We,
1032
+ Xe,
1033
1033
  {
1034
1034
  id: `add-decision-${t}`,
1035
1035
  handleDelete: () => {
@@ -1037,30 +1037,30 @@ const Vr = (e) => {
1037
1037
  handleView: () => r ? r() : null,
1038
1038
  controls: !1,
1039
1039
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
1040
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ge, {}), size: "35px" }),
1041
- /* @__PURE__ */ a(A, { appearance: "gray", type: "body", size: "large", children: i })
1040
+ /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
1041
+ /* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
1042
1042
  ] })
1043
1043
  }
1044
1044
  )
1045
1045
  }
1046
1046
  )
1047
1047
  ] }) }, `add-decision-${t}`);
1048
- }, Hr = {
1049
- loading: Sr,
1050
- decision: Ur,
1051
- add: _r
1052
- }, wn = (e) => {
1053
- const { type: n } = e, t = Hr[n];
1048
+ }, qr = {
1049
+ loading: Nr,
1050
+ decision: _r,
1051
+ add: Hr
1052
+ }, Cn = (e) => {
1053
+ const { type: n } = e, t = qr[n];
1054
1054
  return t ? t(e) : null;
1055
- }, jr = (e) => ({
1055
+ }, Br = (e) => ({
1056
1056
  schema: le().required("Requerido").test(
1057
1057
  "non-empty",
1058
1058
  "El valor no puede estar vacío",
1059
1059
  (n) => n != null && n.trim() !== ""
1060
1060
  ),
1061
1061
  value: e
1062
- }), qr = (e) => ({
1063
- schema: Pe().test(
1062
+ }), Gr = (e) => ({
1063
+ schema: Me().test(
1064
1064
  "isArrayOrString",
1065
1065
  "Debe ser un array de strings/numbers o un solo string",
1066
1066
  (n) => Array.isArray(n) ? n.every(
@@ -1068,8 +1068,8 @@ const Vr = (e) => {
1068
1068
  ) : typeof n == "string"
1069
1069
  ),
1070
1070
  value: e
1071
- }), Br = (e) => ({
1072
- schema: Pe().test(
1071
+ }), Yr = (e) => ({
1072
+ schema: Me().test(
1073
1073
  "isArrayOrString",
1074
1074
  "Debe ser un array de strings/numbers o un solo string ",
1075
1075
  (n) => Array.isArray(n) ? n.every(
@@ -1077,7 +1077,7 @@ const Vr = (e) => {
1077
1077
  ) : typeof n == "string"
1078
1078
  ),
1079
1079
  value: e
1080
- }), Gr = (e) => {
1080
+ }), Wr = (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({
@@ -1093,27 +1093,27 @@ const Vr = (e) => {
1093
1093
  }),
1094
1094
  value: { from: n, to: t }
1095
1095
  };
1096
- }, fn = (e, n) => n === U.PERCENTAGE ? {
1096
+ }, mn = (e, n) => n === j.PERCENTAGE ? {
1097
1097
  schema: se().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
1100
  schema: le().required("Requerido"),
1101
1101
  value: e
1102
- }, Yr = {
1103
- [$.LIST_OF_VALUES]: qr,
1104
- [$.LIST_OF_VALUES_MULTI]: Br,
1105
- [$.RANGE]: Gr,
1106
- [$.GREATER_THAN]: fn,
1107
- [$.LESS_THAN]: fn,
1108
- [$.EQUAL]: fn
1109
- }, Wr = (e) => Yr[e] || jr;
1110
- var Fn = /* @__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))(Fn || {});
1111
- const en = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Xr = (e, n) => {
1102
+ }, Xr = {
1103
+ [A.LIST_OF_VALUES]: Gr,
1104
+ [A.LIST_OF_VALUES_MULTI]: Yr,
1105
+ [A.RANGE]: Wr,
1106
+ [A.GREATER_THAN]: mn,
1107
+ [A.LESS_THAN]: mn,
1108
+ [A.EQUAL]: mn
1109
+ }, Qr = (e) => Xr[e] || Br;
1110
+ var Ln = /* @__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))(Ln || {});
1111
+ const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
1112
1112
  var d;
1113
- const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => en(l)).map(([l, p]) => ({ conditionName: l, value: p }));
1113
+ const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => nn(l)).map(([l, p]) => ({ conditionName: l, value: p }));
1114
1114
  let r = [];
1115
1115
  const o = (d = e == null ? void 0 : e.conditionGroups) == null ? void 0 : d.conditionsThatEstablishesTheDecision;
1116
- Array.isArray(o) ? r = o.filter((l) => en(l == null ? void 0 : l.value)).map((l) => ({ conditionName: l == null ? void 0 : l.conditionName, value: l == null ? void 0 : l.value })) : o && typeof o == "object" && (r = Object.entries(o).filter(([, l]) => en(l)).map(([l, p]) => ({ conditionName: l, value: p })));
1116
+ Array.isArray(o) ? r = o.filter((l) => nn(l == null ? void 0 : l.value)).map((l) => ({ conditionName: l == null ? void 0 : l.conditionName, value: l == null ? void 0 : l.value })) : o && typeof o == "object" && (r = Object.entries(o).filter(([, l]) => nn(l)).map(([l, p]) => ({ conditionName: l, value: p })));
1117
1117
  const i = t.length ? t : r, s = new Map(
1118
1118
  (n ?? []).map((l) => [l == null ? void 0 : l.conditionName, l])
1119
1119
  );
@@ -1127,15 +1127,15 @@ const en = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Ar
1127
1127
  };
1128
1128
  });
1129
1129
  };
1130
- function Qr({
1130
+ function Kr({
1131
1131
  decision: e,
1132
1132
  onSubmitEvent: n,
1133
1133
  textValues: t
1134
1134
  }) {
1135
1135
  var c, g;
1136
- const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (en(f.value) && (h[f.conditionName] = f.value), h), {}), i = Object.keys(o).length > 0, s = {
1136
+ const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (nn(f.value) && (h[f.conditionName] = f.value), h), {}), i = Object.keys(o).length > 0, s = {
1137
1137
  ruleName: e.ruleName || "",
1138
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
1138
+ decisionDataType: e.decisionDataType || j.ALPHABETICAL,
1139
1139
  howToSetTheDecision: e.howToSetTheDecision || "",
1140
1140
  value: e.value ?? "",
1141
1141
  effectiveFrom: e.effectiveFrom || "",
@@ -1152,7 +1152,7 @@ function Qr({
1152
1152
  let d;
1153
1153
  const l = {
1154
1154
  ruleName: le().required("El nombre de la regla es requerido"),
1155
- value: qe(() => Wr(
1155
+ value: Be(() => Qr(
1156
1156
  d.values.howToSetTheDecision
1157
1157
  )(
1158
1158
  d.values.value,
@@ -1172,13 +1172,13 @@ function Qr({
1172
1172
  ) : f.notRequired()
1173
1173
  ));
1174
1174
  const p = ne(l);
1175
- return d = An({
1175
+ return d = In({
1176
1176
  initialValues: s,
1177
1177
  validationSchema: p,
1178
1178
  validateOnBlur: !0,
1179
1179
  onSubmit: (h) => {
1180
1180
  var D;
1181
- const f = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] : Xr(h, r), y = {
1181
+ const f = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] : Zr(h, r), y = {
1182
1182
  ...e,
1183
1183
  ruleName: h.ruleName,
1184
1184
  decisionDataType: h.decisionDataType,
@@ -1201,7 +1201,7 @@ function Qr({
1201
1201
  void 0
1202
1202
  );
1203
1203
  else if (d.values.conditionsThatEstablishesTheDecision[f.conditionName] === void 0) {
1204
- const y = f.howToSetTheCondition === Fn.LIST_OF_VALUES_MULTI ? [] : "";
1204
+ const y = f.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI ? [] : "";
1205
1205
  d.setFieldValue(
1206
1206
  `conditionsThatEstablishesTheDecision.${f.conditionName}`,
1207
1207
  y
@@ -1210,7 +1210,7 @@ function Qr({
1210
1210
  });
1211
1211
  } };
1212
1212
  }
1213
- const Zr = w.div`
1213
+ const Jr = w.div`
1214
1214
  & > div {
1215
1215
  border-radius: 8px;
1216
1216
  border: 1px solid
@@ -1219,7 +1219,7 @@ const Zr = 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
- `, Kr = w.div`
1222
+ `, eo = w.div`
1223
1223
  width: 100%;
1224
1224
  height: 100%;
1225
1225
  overflow-y: auto;
@@ -1236,7 +1236,7 @@ const Zr = w.div`
1236
1236
  background-color: #ebecf0;
1237
1237
  border-radius: 8px;
1238
1238
  }
1239
- `, Jr = (e) => {
1239
+ `, no = (e) => {
1240
1240
  const {
1241
1241
  checked: n,
1242
1242
  children: t,
@@ -1248,7 +1248,7 @@ const Zr = w.div`
1248
1248
  } = e, [l, p] = z(n);
1249
1249
  return /* @__PURE__ */ m(O, { children: [
1250
1250
  /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
1251
- dn,
1251
+ cn,
1252
1252
  {
1253
1253
  checked: l,
1254
1254
  id: o,
@@ -1258,12 +1258,12 @@ const Zr = w.div`
1258
1258
  },
1259
1259
  size: "small",
1260
1260
  value: d,
1261
- children: /* @__PURE__ */ a(A, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
1261
+ children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
1262
1262
  }
1263
1263
  ) }),
1264
1264
  l && /* @__PURE__ */ a(O, { children: t })
1265
1265
  ] });
1266
- }, eo = (e) => {
1266
+ }, to = (e) => {
1267
1267
  const {
1268
1268
  onHandleStartChange: n,
1269
1269
  onHandleEndChange: t,
@@ -1288,7 +1288,7 @@ const Zr = w.div`
1288
1288
  return /* @__PURE__ */ m(O, { children: [
1289
1289
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1290
1290
  /* @__PURE__ */ a(
1291
- A,
1291
+ $,
1292
1292
  {
1293
1293
  appearance: "gray",
1294
1294
  margin: "10px 0",
@@ -1306,7 +1306,7 @@ const Zr = w.div`
1306
1306
  wrap: "wrap",
1307
1307
  gap: "4px",
1308
1308
  children: /* @__PURE__ */ a(
1309
- Nn,
1309
+ kn,
1310
1310
  {
1311
1311
  label: "Cerrada",
1312
1312
  onChange: N,
@@ -1354,7 +1354,7 @@ const Zr = w.div`
1354
1354
  }
1355
1355
  )
1356
1356
  ] });
1357
- }, no = (e) => {
1357
+ }, ro = (e) => {
1358
1358
  const {
1359
1359
  formik: n,
1360
1360
  textValues: t,
@@ -1368,13 +1368,13 @@ const Zr = w.div`
1368
1368
  termEndStatus: u
1369
1369
  } = e;
1370
1370
  return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
1371
- nn({
1371
+ rn({
1372
1372
  condition: i,
1373
1373
  formik: n,
1374
1374
  isDecision: !0
1375
1375
  }),
1376
1376
  /* @__PURE__ */ a(B, { dashed: !0 }),
1377
- /* @__PURE__ */ a(Zr, { children: /* @__PURE__ */ a(Kr, { children: /* @__PURE__ */ m(
1377
+ /* @__PURE__ */ a(Jr, { children: /* @__PURE__ */ a(eo, { children: /* @__PURE__ */ m(
1378
1378
  v,
1379
1379
  {
1380
1380
  direction: "column",
@@ -1389,15 +1389,15 @@ const Zr = w.div`
1389
1389
  alignItems: "center",
1390
1390
  gap: "64px",
1391
1391
  children: [
1392
- /* @__PURE__ */ a(A, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
1392
+ /* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
1393
1393
  /* @__PURE__ */ a(
1394
- dn,
1394
+ cn,
1395
1395
  {
1396
1396
  id: "toggleNone",
1397
1397
  onChange: () => s(!n.values.toggleNone),
1398
1398
  checked: n.values.toggleNone,
1399
1399
  size: "small",
1400
- children: /* @__PURE__ */ a(A, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
1400
+ children: /* @__PURE__ */ a($, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
1401
1401
  }
1402
1402
  )
1403
1403
  ]
@@ -1406,7 +1406,7 @@ const Zr = w.div`
1406
1406
  /* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => {
1407
1407
  var g;
1408
1408
  return /* @__PURE__ */ a(
1409
- Jr,
1409
+ no,
1410
1410
  {
1411
1411
  id: `toggle-${c.conditionName}`,
1412
1412
  name: `toggle.${c.conditionName}`,
@@ -1414,9 +1414,9 @@ const Zr = w.div`
1414
1414
  checked: !n.values.toggleNone && ((g = n.values.conditionsThatEstablishesTheDecision) == null ? void 0 : g[c.conditionName]) !== void 0,
1415
1415
  handleToggleChange: (h) => d(
1416
1416
  c.conditionName,
1417
- c.howToSetTheCondition === Fn.LIST_OF_VALUES_MULTI
1417
+ c.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI
1418
1418
  )(h.target.checked),
1419
- children: nn({ condition: c, formik: n })
1419
+ children: rn({ condition: c, formik: n })
1420
1420
  },
1421
1421
  c.conditionName
1422
1422
  );
@@ -1427,7 +1427,7 @@ const Zr = w.div`
1427
1427
  t.terms && /* @__PURE__ */ m(O, { children: [
1428
1428
  /* @__PURE__ */ a(B, { dashed: !0 }),
1429
1429
  /* @__PURE__ */ a(
1430
- eo,
1430
+ to,
1431
1431
  {
1432
1432
  labelStart: t.termStart,
1433
1433
  labelEnd: t.termEnd,
@@ -1447,15 +1447,15 @@ const Zr = w.div`
1447
1447
  )
1448
1448
  ] }),
1449
1449
  /* @__PURE__ */ a(B, {}),
1450
- l && /* @__PURE__ */ a(A, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
1450
+ l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
1451
1451
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
1452
1452
  /* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
1453
1453
  /* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
1454
1454
  ] })
1455
1455
  ] }) });
1456
- }, to = (e) => {
1456
+ }, oo = (e) => {
1457
1457
  var h, f;
1458
- const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Qr({
1458
+ const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Kr({
1459
1459
  decision: n,
1460
1460
  onSubmitEvent: t,
1461
1461
  textValues: r
@@ -1469,7 +1469,7 @@ const Zr = w.div`
1469
1469
  (x) => !x.hidden
1470
1470
  )) || [], p = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, u = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
1471
1471
  return /* @__PURE__ */ a(
1472
- no,
1472
+ ro,
1473
1473
  {
1474
1474
  formik: i,
1475
1475
  onCancel: o,
@@ -1501,7 +1501,7 @@ const Zr = w.div`
1501
1501
  termEndStatus: c
1502
1502
  }
1503
1503
  );
1504
- }, ro = (e) => {
1504
+ }, ao = (e) => {
1505
1505
  const {
1506
1506
  controls: n,
1507
1507
  customTitleContentAddCard: t,
@@ -1511,7 +1511,7 @@ const Zr = w.div`
1511
1511
  handleDelete: s,
1512
1512
  textValues: d
1513
1513
  } = e, l = o ? Array.from({ length: 3 }).map(
1514
- (u, c) => wn({
1514
+ (u, c) => Cn({
1515
1515
  type: "loading",
1516
1516
  index: c,
1517
1517
  controls: n,
@@ -1522,7 +1522,7 @@ const Zr = w.div`
1522
1522
  textValues: d
1523
1523
  })
1524
1524
  ) : r == null ? void 0 : r.map(
1525
- (u) => wn({
1525
+ (u) => Cn({
1526
1526
  type: "decision",
1527
1527
  decision: u,
1528
1528
  controls: n,
@@ -1534,7 +1534,7 @@ const Zr = w.div`
1534
1534
  })
1535
1535
  ), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
1536
1536
  return { renderedCards: l, shouldRenderAddCard: p };
1537
- }, pl = (e) => {
1537
+ }, fl = (e) => {
1538
1538
  const {
1539
1539
  controls: n = !0,
1540
1540
  customTitleContentAddCard: t,
@@ -1550,7 +1550,7 @@ const Zr = w.div`
1550
1550
  handleSubmitForm: g,
1551
1551
  handleDelete: h,
1552
1552
  terms: f = !0
1553
- } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ro({
1553
+ } = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ao({
1554
1554
  controls: n,
1555
1555
  customTitleContentAddCard: t,
1556
1556
  decisions: o,
@@ -1560,7 +1560,7 @@ const Zr = w.div`
1560
1560
  textValues: i
1561
1561
  }), S = (o == null ? void 0 : o.length) === 0 && !p;
1562
1562
  return /* @__PURE__ */ m(O, { children: [
1563
- /* @__PURE__ */ a(Cr, { children: /* @__PURE__ */ a(Dr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
1563
+ /* @__PURE__ */ a(Sr, { children: /* @__PURE__ */ a(Er, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
1564
1564
  v,
1565
1565
  {
1566
1566
  direction: "column",
@@ -1570,10 +1570,10 @@ const Zr = w.div`
1570
1570
  justifyContent: "center",
1571
1571
  alignItems: "center",
1572
1572
  children: [
1573
- /* @__PURE__ */ a(A, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
1573
+ /* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
1574
1574
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
1575
1575
  /* @__PURE__ */ m(
1576
- A,
1576
+ $,
1577
1577
  {
1578
1578
  as: "span",
1579
1579
  type: "label",
@@ -1592,7 +1592,7 @@ const Zr = w.div`
1592
1592
  /* @__PURE__ */ a(
1593
1593
  q,
1594
1594
  {
1595
- iconBefore: /* @__PURE__ */ a(Ge, {}),
1595
+ iconBefore: /* @__PURE__ */ a(Ye, {}),
1596
1596
  onClick: () => u ? u() : null,
1597
1597
  children: t || "Agregar decisión"
1598
1598
  }
@@ -1600,7 +1600,7 @@ const Zr = w.div`
1600
1600
  ]
1601
1601
  }
1602
1602
  ) : /* @__PURE__ */ m(
1603
- Ye,
1603
+ We,
1604
1604
  {
1605
1605
  templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
1606
1606
  autoFlow: "row dense",
@@ -1613,7 +1613,7 @@ const Zr = w.div`
1613
1613
  height: x ? "auto" : "484px",
1614
1614
  children: [
1615
1615
  D,
1616
- T && wn({
1616
+ T && Cn({
1617
1617
  type: "add",
1618
1618
  index: o == null ? void 0 : o.length,
1619
1619
  controls: n,
@@ -1630,13 +1630,13 @@ const Zr = w.div`
1630
1630
  }
1631
1631
  ) }) }) }),
1632
1632
  d && /* @__PURE__ */ a(
1633
- Tr,
1633
+ Cr,
1634
1634
  {
1635
1635
  portalId: "modal-portal",
1636
1636
  onCloseModal: c,
1637
1637
  title: l ? "Editar Decisión" : "Nueva decisión",
1638
1638
  children: /* @__PURE__ */ a(
1639
- to,
1639
+ oo,
1640
1640
  {
1641
1641
  decision: l || s,
1642
1642
  onSubmitEvent: g,
@@ -1648,20 +1648,20 @@ const Zr = w.div`
1648
1648
  }
1649
1649
  )
1650
1650
  ] });
1651
- }, ut = (e) => {
1651
+ }, gt = (e) => {
1652
1652
  const { children: n } = e;
1653
- return /* @__PURE__ */ a(Ht, { width: "100%", children: n });
1654
- }, oo = (e) => e.value, ao = (e) => e.value, io = (e) => e.value, lo = (e) => ({
1653
+ return /* @__PURE__ */ a(qt, { width: "100%", children: n });
1654
+ }, io = (e) => e.value, lo = (e) => e.value, so = (e) => e.value, co = (e) => ({
1655
1655
  from: e.from ?? "",
1656
1656
  to: e.to ?? ""
1657
- }), so = (e) => e.value, co = (e) => e.value, uo = (e) => e.value, po = {
1658
- [$.LIST_OF_VALUES]: ao,
1659
- [$.LIST_OF_VALUES_MULTI]: io,
1660
- [$.RANGE]: lo,
1661
- [$.GREATER_THAN]: so,
1662
- [$.LESS_THAN]: co,
1663
- [$.EQUAL]: uo
1664
- }, je = (e) => {
1657
+ }), uo = (e) => e.value, po = (e) => e.value, go = (e) => e.value, ho = {
1658
+ [A.LIST_OF_VALUES]: lo,
1659
+ [A.LIST_OF_VALUES_MULTI]: so,
1660
+ [A.RANGE]: co,
1661
+ [A.GREATER_THAN]: uo,
1662
+ [A.LESS_THAN]: po,
1663
+ [A.EQUAL]: go
1664
+ }, qe = (e) => {
1665
1665
  const n = e == null ? void 0 : e.value;
1666
1666
  if (typeof n == "string" && n.includes(" a ")) {
1667
1667
  const t = [
@@ -1678,8 +1678,8 @@ const Zr = w.div`
1678
1678
  }
1679
1679
  return n;
1680
1680
  }
1681
- return typeof n == "object" && n !== null && !Array.isArray(n) ? (po[e == null ? void 0 : e.howToSetTheDecision] || oo)(n) : n || void 0;
1682
- }, go = w.div`
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`
1683
1683
  display: flex;
1684
1684
  justify-content: ${({ $justifyContent: e }) => e};
1685
1685
  align-items: ${({ $alignItems: e }) => e};
@@ -1723,7 +1723,7 @@ const Zr = w.div`
1723
1723
  scroll: D = !1
1724
1724
  } = e;
1725
1725
  return /* @__PURE__ */ a(
1726
- go,
1726
+ fo,
1727
1727
  {
1728
1728
  ref: n,
1729
1729
  direction: o,
@@ -1776,18 +1776,18 @@ w.div`
1776
1776
  border-radius: 8px;
1777
1777
  }
1778
1778
  `;
1779
- const ho = w.div`
1779
+ const mo = w.div`
1780
1780
  cursor: pointer;
1781
- `, fo = w.div`
1781
+ `, bo = w.div`
1782
1782
  & > div > div > div > p {
1783
1783
  text-wrap-mode: nowrap;
1784
1784
  }
1785
- `, mo = w.div`
1785
+ `, vo = w.div`
1786
1786
  & > div {
1787
1787
  justify-content: auto;
1788
1788
  gap: 8px;
1789
1789
  }
1790
- `, bo = (e) => {
1790
+ `, yo = (e) => {
1791
1791
  const {
1792
1792
  controls: n,
1793
1793
  conditionsAlignment: t,
@@ -1811,14 +1811,14 @@ const ho = w.div`
1811
1811
  hasMultipleGroups: N
1812
1812
  } = e;
1813
1813
  return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
1814
- /* @__PURE__ */ a(ho, { onClick: p, children: /* @__PURE__ */ m(
1814
+ /* @__PURE__ */ a(mo, { onClick: p, children: /* @__PURE__ */ m(
1815
1815
  v,
1816
1816
  {
1817
1817
  alignItems: "start",
1818
1818
  justifyContent: "space-between",
1819
1819
  children: [
1820
1820
  /* @__PURE__ */ m(v, { gap: "12px", children: [
1821
- /* @__PURE__ */ a(fo, { children: /* @__PURE__ */ a(
1821
+ /* @__PURE__ */ a(bo, { children: /* @__PURE__ */ a(
1822
1822
  De,
1823
1823
  {
1824
1824
  id: "tag",
@@ -1827,11 +1827,11 @@ const ho = w.div`
1827
1827
  displayIcon: !1
1828
1828
  }
1829
1829
  ) }),
1830
- /* @__PURE__ */ a(mo, { children: /* @__PURE__ */ a(
1831
- Ze,
1830
+ /* @__PURE__ */ a(vo, { children: /* @__PURE__ */ a(
1831
+ Ke,
1832
1832
  {
1833
1833
  element: o,
1834
- valueData: je(
1834
+ valueData: qe(
1835
1835
  o
1836
1836
  ),
1837
1837
  type: "decision"
@@ -1844,7 +1844,7 @@ const ho = w.div`
1844
1844
  M,
1845
1845
  {
1846
1846
  appearance: "primary",
1847
- icon: /* @__PURE__ */ a(It, {}),
1847
+ icon: /* @__PURE__ */ a(Ft, {}),
1848
1848
  size: "24px",
1849
1849
  cursorHover: !0,
1850
1850
  onClick: (C) => {
@@ -1856,7 +1856,7 @@ const ho = w.div`
1856
1856
  M,
1857
1857
  {
1858
1858
  appearance: "danger",
1859
- icon: /* @__PURE__ */ a(an, {}),
1859
+ icon: /* @__PURE__ */ a(ln, {}),
1860
1860
  size: "24px",
1861
1861
  cursorHover: !0,
1862
1862
  onClick: (C) => {
@@ -1869,7 +1869,7 @@ const ho = w.div`
1869
1869
  M,
1870
1870
  {
1871
1871
  appearance: "dark",
1872
- icon: l ? /* @__PURE__ */ a(Rt, {}) : /* @__PURE__ */ a(xn, {}),
1872
+ icon: l ? /* @__PURE__ */ a(Lt, {}) : /* @__PURE__ */ a(Tn, {}),
1873
1873
  size: "24px",
1874
1874
  cursorHover: !0
1875
1875
  }
@@ -1881,8 +1881,8 @@ const ho = w.div`
1881
1881
  ) }),
1882
1882
  l && /* @__PURE__ */ m(O, { children: [
1883
1883
  /* @__PURE__ */ a(B, { dashed: !0 }),
1884
- N ? /* @__PURE__ */ a(it, { tabs: y, selectedTab: D, onChange: T }) : /* @__PURE__ */ a(
1885
- A,
1884
+ N ? /* @__PURE__ */ a(st, { tabs: y, selectedTab: D, onChange: T }) : /* @__PURE__ */ a(
1885
+ $,
1886
1886
  {
1887
1887
  type: "label",
1888
1888
  size: "large",
@@ -1908,10 +1908,10 @@ const ho = w.div`
1908
1908
  borderRadius: "8px",
1909
1909
  background: !0,
1910
1910
  children: /* @__PURE__ */ a(
1911
- Ze,
1911
+ Ke,
1912
1912
  {
1913
1913
  element: { ...C, value: C.value },
1914
- valueData: je(
1914
+ valueData: qe(
1915
1915
  C
1916
1916
  )
1917
1917
  }
@@ -1927,7 +1927,7 @@ const ho = w.div`
1927
1927
  borderRadius: "8px",
1928
1928
  background: !0,
1929
1929
  children: /* @__PURE__ */ a(
1930
- Ze,
1930
+ Ke,
1931
1931
  {
1932
1932
  element: g.element,
1933
1933
  valueData: g.valueData
@@ -1944,7 +1944,7 @@ const ho = w.div`
1944
1944
  borderRadius: "8px",
1945
1945
  background: !0,
1946
1946
  children: /* @__PURE__ */ a(
1947
- Ze,
1947
+ Ke,
1948
1948
  {
1949
1949
  element: h.element,
1950
1950
  valueData: h.valueData
@@ -1964,12 +1964,39 @@ const ho = w.div`
1964
1964
  ] }),
1965
1965
  /* @__PURE__ */ m(v, { alignItems: "center", gap: "8px", children: [
1966
1966
  /* @__PURE__ */ a(J, { animated: !0, width: "50px" }),
1967
- /* @__PURE__ */ a(jt, { animated: !0 })
1967
+ /* @__PURE__ */ a(Bt, { animated: !0 })
1968
1968
  ] })
1969
1969
  ] });
1970
- }, tn = (e) => e.conditionsThatEstablishesTheDecision ?? {}, pt = (e, n) => Object.fromEntries(
1970
+ }, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray), tn = (e) => {
1971
+ const n = /* @__PURE__ */ new Set(), t = [];
1972
+ for (const r of e) {
1973
+ const o = String((r == null ? void 0 : r.conditionName) ?? "");
1974
+ n.has(o) || (n.add(o), t.push(r));
1975
+ }
1976
+ return t;
1977
+ }, Oe = (e) => {
1978
+ if (!e) return {};
1979
+ if (Array.isArray(e.conditionGroups)) {
1980
+ const n = e.conditionGroups.map((t) => [
1981
+ t.ConditionGroupId,
1982
+ tn(
1983
+ Array.isArray(t.conditionsThatEstablishesTheDecision) ? t.conditionsThatEstablishesTheDecision : []
1984
+ )
1985
+ ]);
1986
+ return Object.fromEntries(n);
1987
+ }
1988
+ if (qn(e.conditionsThatEstablishesTheDecision)) {
1989
+ const n = e.conditionsThatEstablishesTheDecision;
1990
+ return Object.fromEntries(
1991
+ Object.entries(n).map(([t, r]) => [t, tn(r)])
1992
+ );
1993
+ }
1994
+ return qn(e) ? Object.fromEntries(
1995
+ Object.entries(e).map(([n, t]) => [n, tn(t)])
1996
+ ) : {};
1997
+ }, ht = (e, n) => Object.fromEntries(
1971
1998
  Object.entries(e).map(([t, r]) => [t, r.filter(n)])
1972
- ), jn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, gt = (e) => {
1999
+ ), Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
1973
2000
  var be;
1974
2001
  const {
1975
2002
  decision: n,
@@ -1986,33 +2013,33 @@ const ho = w.div`
1986
2013
  labelName: r == null ? void 0 : r.effectiveFrom,
1987
2014
  value: String(n.effectiveFrom),
1988
2015
  howToSetTheDecision: ee.EQUAL,
1989
- decisionDataType: U.DATE
2016
+ decisionDataType: j.DATE
1990
2017
  },
1991
- valueData: je({
2018
+ valueData: qe({
1992
2019
  labelName: r == null ? void 0 : r.effectiveFrom,
1993
2020
  value: String(n.effectiveFrom),
1994
2021
  howToSetTheDecision: ee.EQUAL,
1995
- decisionDataType: U.DATE
2022
+ decisionDataType: j.DATE
1996
2023
  })
1997
2024
  } : null, h = c ? {
1998
2025
  element: {
1999
2026
  labelName: r == null ? void 0 : r.validUntil,
2000
2027
  value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
2001
2028
  howToSetTheDecision: ee.EQUAL,
2002
- decisionDataType: U.DATE
2029
+ decisionDataType: j.DATE
2003
2030
  },
2004
- valueData: je({
2031
+ valueData: qe({
2005
2032
  labelName: r == null ? void 0 : r.validUntil,
2006
2033
  value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
2007
2034
  howToSetTheDecision: ee.EQUAL,
2008
- decisionDataType: U.DATE
2035
+ decisionDataType: j.DATE
2009
2036
  })
2010
2037
  } : null, f = n ? {
2011
2038
  labelName: n.labelName || "",
2012
- decisionDataType: n.decisionDataType || U.ALPHABETICAL,
2013
- value: je(n),
2039
+ decisionDataType: n.decisionDataType || j.ALPHABETICAL,
2040
+ value: qe(n),
2014
2041
  howToSetTheDecision: n.howToSetTheDecision || ee.EQUAL
2015
- } : null, x = n ? tn(n) : {}, y = pt(x, (P) => !P.hidden), D = Object.keys(y), T = [
2042
+ } : null, x = n ? Oe(n) : {}, y = ht(x, (P) => !P.hidden), D = Object.keys(y), T = [
2016
2043
  ...D.filter((P) => P === "group-primary"),
2017
2044
  ...D.filter((P) => P !== "group-primary")
2018
2045
  ], S = {};
@@ -2021,14 +2048,14 @@ const ho = w.div`
2021
2048
  const de = P === "group-primary" ? "mainCondition" : `alternateCondition-${N++}`;
2022
2049
  return S[de] = P, {
2023
2050
  id: de,
2024
- label: P === "group-primary" ? jn(P, 0) : jn(P, Number(de.split("-").at(-1))),
2051
+ label: P === "group-primary" ? Bn(P, 0) : Bn(P, Number(de.split("-").at(-1))),
2025
2052
  isDisabled: !1
2026
2053
  };
2027
2054
  }), [I, F] = V.useState(
2028
2055
  ((be = C[0]) == null ? void 0 : be.id) ?? "mainCondition"
2029
- ), k = (P) => F(P), H = S[I] ?? "group-primary", ae = y[H] ?? [], he = T.length > 1, fe = Array.from({ length: 5 }), pe = !!(!t && n && r && f), ie = ae.length < 2 ? "start" : "space-between", me = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2056
+ ), k = (P) => F(P), _ = S[I] ?? "group-primary", ae = y[_] ?? [], he = T.length > 1, fe = Array.from({ length: 5 }), pe = !!(!t && n && r && f), ie = ae.length < 2 ? "start" : "space-between", me = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
2030
2057
  return /* @__PURE__ */ a(
2031
- bo,
2058
+ yo,
2032
2059
  {
2033
2060
  conditionsAlignment: ie,
2034
2061
  controls: p,
@@ -2053,7 +2080,7 @@ const ho = w.div`
2053
2080
  hasMultipleGroups: he
2054
2081
  }
2055
2082
  );
2056
- }, vo = kn`
2083
+ }, xo = An`
2057
2084
  from {
2058
2085
  opacity: 0;
2059
2086
  transform: translateY(20px);
@@ -2087,7 +2114,7 @@ w.div`
2087
2114
  }};
2088
2115
  }
2089
2116
  `;
2090
- const yo = w.div`
2117
+ const To = w.div`
2091
2118
  & > div {
2092
2119
  box-shadow: 0px 2px 3px 0px
2093
2120
  ${({ theme: e }) => {
@@ -2096,18 +2123,18 @@ const yo = w.div`
2096
2123
  }};
2097
2124
  cursor: pointer;
2098
2125
  }
2099
- `, xo = w.div`
2126
+ `, wo = w.div`
2100
2127
  width: 100%;
2101
2128
  height: 100%;
2102
2129
  & > div {
2103
- animation: ${vo} 600ms ease-out;
2130
+ animation: ${xo} 600ms ease-out;
2104
2131
  }
2105
- `, To = w.div`
2132
+ `, Co = w.div`
2106
2133
  & > div > div {
2107
2134
  border-radius: 8px;
2108
2135
  box-sizing: border-box;
2109
2136
  }
2110
- `, wo = w.div`
2137
+ `, Do = w.div`
2111
2138
  & > div {
2112
2139
  width: 100%;
2113
2140
  height: 100%;
@@ -2127,21 +2154,21 @@ const yo = w.div`
2127
2154
  border-radius: 8px;
2128
2155
  }
2129
2156
  }
2130
- `, Co = (e) => {
2157
+ `, So = (e) => {
2131
2158
  const { index: n, handleOpenModal: t } = e;
2132
2159
  return /* @__PURE__ */ a(
2133
- ut,
2160
+ gt,
2134
2161
  {
2135
2162
  id: `loading-card-${n}`,
2136
2163
  handleDelete: () => {
2137
2164
  },
2138
2165
  handleView: () => t ? t() : null,
2139
2166
  controls: !1,
2140
- children: /* @__PURE__ */ a(gt, { loading: !0 })
2167
+ children: /* @__PURE__ */ a(ft, { loading: !0 })
2141
2168
  },
2142
2169
  `loading-card-${n}`
2143
2170
  );
2144
- }, Do = (e) => {
2171
+ }, Eo = (e) => {
2145
2172
  const {
2146
2173
  decision: n,
2147
2174
  controls: t,
@@ -2152,14 +2179,14 @@ const yo = w.div`
2152
2179
  isOpen: d,
2153
2180
  onToggle: l
2154
2181
  } = e;
2155
- return n ? /* @__PURE__ */ a(Xe, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
2156
- ut,
2182
+ return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
2183
+ gt,
2157
2184
  {
2158
2185
  id: n.decisionId,
2159
2186
  handleDelete: () => o ? o(n.decisionId) : null,
2160
2187
  handleView: () => r ? r(n) : null,
2161
2188
  children: /* @__PURE__ */ a(
2162
- gt,
2189
+ ft,
2163
2190
  {
2164
2191
  controls: t,
2165
2192
  decision: n,
@@ -2173,15 +2200,15 @@ const yo = w.div`
2173
2200
  )
2174
2201
  }
2175
2202
  ) }) }, n.decisionId) : null;
2176
- }, So = (e) => {
2203
+ }, No = (e) => {
2177
2204
  const {
2178
2205
  customTitleContentAddCard: n,
2179
2206
  index: t,
2180
2207
  handleOpenModal: r,
2181
2208
  shouldRenderEmptyMessage: o
2182
2209
  } = e;
2183
- return /* @__PURE__ */ a(xo, { children: o ? null : /* @__PURE__ */ a(
2184
- yo,
2210
+ return /* @__PURE__ */ a(wo, { children: o ? null : /* @__PURE__ */ a(
2211
+ To,
2185
2212
  {
2186
2213
  onClick: () => r ? r() : null,
2187
2214
  children: /* @__PURE__ */ a(
@@ -2200,12 +2227,12 @@ const yo = w.div`
2200
2227
  alignItems: "center",
2201
2228
  padding: "16px",
2202
2229
  children: [
2203
- /* @__PURE__ */ a(A, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
2230
+ /* @__PURE__ */ a($, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
2204
2231
  /* @__PURE__ */ a(
2205
2232
  M,
2206
2233
  {
2207
2234
  appearance: "gray",
2208
- icon: /* @__PURE__ */ a(Ge, {}),
2235
+ icon: /* @__PURE__ */ a(Ye, {}),
2209
2236
  size: "24px",
2210
2237
  cursorHover: !0
2211
2238
  }
@@ -2217,14 +2244,14 @@ const yo = w.div`
2217
2244
  )
2218
2245
  }
2219
2246
  ) }, `add-decision-${t}`);
2220
- }, Eo = {
2221
- loading: Co,
2222
- decision: Do,
2223
- add: So
2224
- }, Cn = (e) => {
2225
- const { type: n } = e, t = Eo[n];
2247
+ }, ko = {
2248
+ loading: So,
2249
+ decision: Eo,
2250
+ add: No
2251
+ }, Dn = (e) => {
2252
+ const { type: n } = e, t = ko[n];
2226
2253
  return t ? t(e) : null;
2227
- }, No = (e) => {
2254
+ }, Ao = (e) => {
2228
2255
  const {
2229
2256
  controls: n,
2230
2257
  customTitleContentAddCard: t,
@@ -2236,7 +2263,7 @@ const yo = w.div`
2236
2263
  isOpenFor: l,
2237
2264
  toggleAt: p
2238
2265
  } = e, u = o ? Array.from({ length: 3 }).map(
2239
- (g, h) => Cn({
2266
+ (g, h) => Dn({
2240
2267
  type: "loading",
2241
2268
  index: h,
2242
2269
  controls: n,
@@ -2247,7 +2274,7 @@ const yo = w.div`
2247
2274
  textValues: d
2248
2275
  })
2249
2276
  ) : r == null ? void 0 : r.map(
2250
- (g, h) => Cn({
2277
+ (g, h) => Dn({
2251
2278
  type: "decision",
2252
2279
  decision: g,
2253
2280
  controls: n,
@@ -2262,13 +2289,13 @@ const yo = w.div`
2262
2289
  })
2263
2290
  ), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
2264
2291
  return { renderedCards: u, shouldRenderAddCard: c };
2265
- }, ko = w.div`
2292
+ }, $o = w.div`
2266
2293
  position: relative;
2267
2294
  & > div {
2268
2295
  padding: 24px 16px;
2269
2296
  place-items: unset;
2270
2297
  }
2271
- `, $o = w.div`
2298
+ `, Io = w.div`
2272
2299
  background-color: ${({ theme: e }) => {
2273
2300
  var n, t;
2274
2301
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
@@ -2300,20 +2327,20 @@ const yo = w.div`
2300
2327
  background-color: #ebecf0;
2301
2328
  border-radius: 8px;
2302
2329
  }
2303
- `, Ao = (e) => {
2330
+ `, Ro = (e) => {
2304
2331
  const { children: n, description: t, portalId: r, onCloseModal: o, title: i } = e, s = document.getElementById(r);
2305
2332
  if (!s)
2306
2333
  throw new Error(
2307
2334
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
2308
2335
  );
2309
2336
  const d = te("(max-width: 400px)");
2310
- return cn(
2311
- /* @__PURE__ */ a(ko, { smallScreen: d, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a($o, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2337
+ return un(
2338
+ /* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ a(Io, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2312
2339
  /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
2313
2340
  /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
2314
2341
  /* @__PURE__ */ m(v, { direction: "column", gap: "8px", children: [
2315
2342
  /* @__PURE__ */ a(
2316
- A,
2343
+ $,
2317
2344
  {
2318
2345
  type: "title",
2319
2346
  size: "medium",
@@ -2322,9 +2349,9 @@ const yo = w.div`
2322
2349
  children: i
2323
2350
  }
2324
2351
  ),
2325
- /* @__PURE__ */ a(A, { size: "medium", appearance: "gray", children: t })
2352
+ /* @__PURE__ */ a($, { size: "medium", appearance: "gray", children: t })
2326
2353
  ] }),
2327
- /* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: o })
2354
+ /* @__PURE__ */ a(sn, { size: "24px", cursor: "pointer", onClick: o })
2328
2355
  ] }),
2329
2356
  /* @__PURE__ */ a(B, { dashed: !0 })
2330
2357
  ] }),
@@ -2332,15 +2359,15 @@ const yo = w.div`
2332
2359
  ] }) }) }) }),
2333
2360
  s
2334
2361
  );
2335
- }, Io = (e) => ({
2362
+ }, Fo = (e) => ({
2336
2363
  schema: le().required("Requerido").test(
2337
2364
  "non-empty",
2338
2365
  "El valor no puede estar vacío",
2339
2366
  (n) => n != null && n.trim() !== ""
2340
2367
  ),
2341
2368
  value: e
2342
- }), Ro = (e) => ({
2343
- schema: Pe().test(
2369
+ }), Lo = (e) => ({
2370
+ schema: Me().test(
2344
2371
  "isArrayOrString",
2345
2372
  "Por favor selecciona una opcion",
2346
2373
  (n) => Array.isArray(n) ? n.every(
@@ -2348,8 +2375,8 @@ const yo = w.div`
2348
2375
  ) : typeof n == "string"
2349
2376
  ),
2350
2377
  value: e
2351
- }), Fo = (e) => ({
2352
- schema: Pe().test(
2378
+ }), Oo = (e) => ({
2379
+ schema: Me().test(
2353
2380
  "isArrayOrString",
2354
2381
  "Por favor selecciona al menos una opcion",
2355
2382
  (n) => Array.isArray(n) ? n.every(
@@ -2357,7 +2384,7 @@ const yo = w.div`
2357
2384
  ) : typeof n == "string"
2358
2385
  ),
2359
2386
  value: e
2360
- }), Lo = (e) => {
2387
+ }), Po = (e) => {
2361
2388
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
2362
2389
  return {
2363
2390
  schema: ne({
@@ -2373,10 +2400,10 @@ const yo = w.div`
2373
2400
  }),
2374
2401
  value: { from: n, to: t }
2375
2402
  };
2376
- }, mn = (e, n) => {
2403
+ }, bn = (e, n) => {
2377
2404
  if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
2378
2405
  const t = e;
2379
- return n === U.PERCENTAGE ? {
2406
+ return n === j.PERCENTAGE ? {
2380
2407
  schema: ne({
2381
2408
  from: se().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"),
2382
2409
  to: se().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")
@@ -2390,36 +2417,35 @@ const yo = w.div`
2390
2417
  value: t
2391
2418
  };
2392
2419
  }
2393
- return n === U.PERCENTAGE ? {
2420
+ return n === j.PERCENTAGE ? {
2394
2421
  schema: se().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"),
2395
2422
  value: e
2396
2423
  } : {
2397
2424
  schema: le().required("Requerido"),
2398
2425
  value: e
2399
2426
  };
2400
- }, Oo = {
2401
- [$.LIST_OF_VALUES]: Ro,
2402
- [$.LIST_OF_VALUES_MULTI]: Fo,
2403
- [$.RANGE]: Lo,
2404
- [$.GREATER_THAN]: mn,
2405
- [$.LESS_THAN]: mn,
2406
- [$.EQUAL]: mn
2407
- }, qn = (e) => Oo[e] || Io;
2427
+ }, Mo = {
2428
+ [A.LIST_OF_VALUES]: Lo,
2429
+ [A.LIST_OF_VALUES_MULTI]: Oo,
2430
+ [A.RANGE]: Po,
2431
+ [A.GREATER_THAN]: bn,
2432
+ [A.LESS_THAN]: bn,
2433
+ [A.EQUAL]: bn
2434
+ }, Gn = (e) => Mo[e] || Fo;
2408
2435
  var ge = /* @__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))(ge || {});
2409
- function Po({
2436
+ function zo({
2410
2437
  decision: e,
2411
2438
  onSubmitEvent: n,
2412
2439
  textValues: t
2413
2440
  }) {
2414
- const r = tn(e) || {}, o = () => Object.values(r).flat(), i = {
2441
+ const r = Oe(e) || {}, o = () => Object.values(r).flat(), i = {
2415
2442
  ruleName: e.ruleName || "",
2416
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
2443
+ decisionDataType: e.decisionDataType || j.ALPHABETICAL,
2417
2444
  howToSetTheDecision: e.howToSetTheDecision || "",
2418
2445
  value: e.value || "",
2419
2446
  effectiveFrom: e.effectiveFrom || "",
2420
2447
  validUntil: e.validUntil || "",
2421
2448
  toggleNone: !0,
2422
- // form stores condition values in a flat dictionary by conditionName
2423
2449
  conditionsThatEstablishesTheDecision: {},
2424
2450
  checkClosed: !1,
2425
2451
  terms: !0
@@ -2427,19 +2453,19 @@ function Po({
2427
2453
  let s;
2428
2454
  const d = {
2429
2455
  ruleName: le().required("El nombre de la decision es requerido"),
2430
- value: qe(() => qn(
2456
+ value: Be(() => Gn(
2431
2457
  s.values.howToSetTheDecision
2432
2458
  )(
2433
2459
  s.values.value,
2434
2460
  s.values.decisionDataType
2435
2461
  ).schema),
2436
- conditionsThatEstablishesTheDecision: qe((u, { parent: c }) => {
2462
+ conditionsThatEstablishesTheDecision: Be((u, { parent: c }) => {
2437
2463
  if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
2438
2464
  const f = o().reduce(
2439
2465
  (x, y) => {
2440
2466
  var T;
2441
2467
  if (((T = s.values.conditionsThatEstablishesTheDecision) == null ? void 0 : T[y.conditionName]) !== void 0) {
2442
- const S = qn(
2468
+ const S = Gn(
2443
2469
  y.howToSetTheCondition
2444
2470
  );
2445
2471
  x[y.conditionName] = S(
@@ -2474,7 +2500,7 @@ function Po({
2474
2500
  ) : c.notRequired()
2475
2501
  ));
2476
2502
  const l = ne(d);
2477
- return s = An({
2503
+ return s = In({
2478
2504
  initialValues: i,
2479
2505
  validationSchema: l,
2480
2506
  validateOnBlur: !0,
@@ -2551,7 +2577,7 @@ w.div`
2551
2577
  border-radius: 8px;
2552
2578
  }
2553
2579
  `;
2554
- const Mo = w.div`
2580
+ const Vo = w.div`
2555
2581
  display: flex;
2556
2582
  width: -webkit-fill-available;
2557
2583
  & > div {
@@ -2560,7 +2586,7 @@ const Mo = w.div`
2560
2586
  gap: 16px;
2561
2587
  width: -webkit-fill-available;
2562
2588
  }
2563
- `, zo = (e) => {
2589
+ `, jo = (e) => {
2564
2590
  const {
2565
2591
  onHandleStartChange: n,
2566
2592
  onHandleEndChange: t,
@@ -2584,9 +2610,9 @@ const Mo = w.div`
2584
2610
  }, F = te("(max-width: 400px)");
2585
2611
  return /* @__PURE__ */ m(v, { direction: "column", width: "100%", gap: "20px", children: [
2586
2612
  /* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
2587
- /* @__PURE__ */ a(A, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
2613
+ /* @__PURE__ */ a($, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
2588
2614
  /* @__PURE__ */ a(
2589
- Nn,
2615
+ kn,
2590
2616
  {
2591
2617
  label: "Cerrada",
2592
2618
  onChange: N,
@@ -2634,7 +2660,7 @@ const Mo = w.div`
2634
2660
  }
2635
2661
  )
2636
2662
  ] });
2637
- }, Vo = (e) => {
2663
+ }, Uo = (e) => {
2638
2664
  const {
2639
2665
  activeTab: n,
2640
2666
  conditionsErrorText: t,
@@ -2657,14 +2683,14 @@ const Mo = w.div`
2657
2683
  } = e;
2658
2684
  return /* @__PURE__ */ m(O, { children: [
2659
2685
  /* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", width: "100%", children: [
2660
- /* @__PURE__ */ a(Ue, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: zn({
2686
+ /* @__PURE__ */ a(Ue, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
2661
2687
  condition: i,
2662
2688
  formik: o,
2663
2689
  isDecision: !0
2664
2690
  }) }) }),
2665
2691
  /* @__PURE__ */ a(Ue, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
2666
2692
  /* @__PURE__ */ a(
2667
- it,
2693
+ st,
2668
2694
  {
2669
2695
  onChange: l,
2670
2696
  tabs: u,
@@ -2675,7 +2701,7 @@ const Mo = w.div`
2675
2701
  /* @__PURE__ */ a(
2676
2702
  M,
2677
2703
  {
2678
- icon: /* @__PURE__ */ a(Ft, {}),
2704
+ icon: /* @__PURE__ */ a(Ot, {}),
2679
2705
  appearance: "help",
2680
2706
  onClick: y,
2681
2707
  cursorHover: !0
@@ -2685,7 +2711,7 @@ const Mo = w.div`
2685
2711
  q,
2686
2712
  {
2687
2713
  type: "button",
2688
- iconBefore: /* @__PURE__ */ a(Lt, {}),
2714
+ iconBefore: /* @__PURE__ */ a(Pt, {}),
2689
2715
  variant: "none",
2690
2716
  appearance: "gray",
2691
2717
  onClick: y,
@@ -2700,8 +2726,8 @@ const Mo = w.div`
2700
2726
  gap: "16px",
2701
2727
  alignItems: "center",
2702
2728
  children: [
2703
- /* @__PURE__ */ a(Mo, { children: /* @__PURE__ */ a(
2704
- zn,
2729
+ /* @__PURE__ */ a(Vo, { children: /* @__PURE__ */ a(
2730
+ Vn,
2705
2731
  {
2706
2732
  condition: S,
2707
2733
  formik: o
@@ -2710,7 +2736,7 @@ const Mo = w.div`
2710
2736
  /* @__PURE__ */ a(
2711
2737
  M,
2712
2738
  {
2713
- icon: /* @__PURE__ */ a(an, {}),
2739
+ icon: /* @__PURE__ */ a(ln, {}),
2714
2740
  appearance: "danger",
2715
2741
  cursorHover: !0,
2716
2742
  onClick: () => d(S.conditionName)
@@ -2720,10 +2746,10 @@ const Mo = w.div`
2720
2746
  },
2721
2747
  S.conditionName
2722
2748
  )) }),
2723
- p && /* @__PURE__ */ a(A, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
2749
+ p && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
2724
2750
  ] }) }),
2725
2751
  /* @__PURE__ */ a(Ue, { legend: "Vigencia", spacing: "wide", children: h.terms && /* @__PURE__ */ a(
2726
- zo,
2752
+ jo,
2727
2753
  {
2728
2754
  labelStart: h.termStart,
2729
2755
  labelEnd: h.termEnd,
@@ -2747,13 +2773,13 @@ const Mo = w.div`
2747
2773
  ] })
2748
2774
  ] }) }),
2749
2775
  x && f && /* @__PURE__ */ a(
2750
- dt,
2776
+ ut,
2751
2777
  {
2752
2778
  portalId: f,
2753
2779
  title: "Redefinir la condición",
2754
2780
  onCloseModal: D,
2755
2781
  children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
2756
- /* @__PURE__ */ a(A, { 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 ." }),
2782
+ /* @__PURE__ */ a($, { 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 ." }),
2757
2783
  /* @__PURE__ */ m(v, { justifyContent: "end", gap: "12px", children: [
2758
2784
  /* @__PURE__ */ a(
2759
2785
  q,
@@ -2772,18 +2798,18 @@ const Mo = w.div`
2772
2798
  }
2773
2799
  )
2774
2800
  ] });
2775
- }, Uo = (e) => {
2776
- const { label: n, howToSet: t, isFirst: r = !1 } = e, o = jo(n), i = Ho(o), s = r ? "Que" : "Y que", d = i ? o : `${qo(o)} ${o}`, l = Wo(t);
2801
+ }, _o = (e) => {
2802
+ const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Bo(n), i = qo(o), s = r ? "Que" : "Y que", d = i ? o : `${Go(o)} ${o}`, l = Qo(t);
2777
2803
  return `${s} ${d} ${l}`;
2778
- }, _o = /^(el|la|los|las)\s/i;
2779
- function Ho(e) {
2780
- return _o.test(e);
2804
+ }, Ho = /^(el|la|los|las)\s/i;
2805
+ function qo(e) {
2806
+ return Ho.test(e);
2781
2807
  }
2782
- function jo(e) {
2808
+ function Bo(e) {
2783
2809
  return e.replace(/\s+/g, " ").trim();
2784
2810
  }
2785
- function qo(e) {
2786
- const n = Bo(e).toLowerCase(), t = /\b(s|es)\b/.test(Go(e).toLowerCase()) && !n.endsWith("és");
2811
+ function Go(e) {
2812
+ const n = Yo(e).toLowerCase(), t = /\b(s|es)\b/.test(Wo(e).toLowerCase()) && !n.endsWith("és");
2787
2813
  return ({
2788
2814
  mano: "f",
2789
2815
  día: "m",
@@ -2795,36 +2821,36 @@ function qo(e) {
2795
2821
  antigüedad: "f",
2796
2822
  antiguedad: "f",
2797
2823
  puntaje: "m"
2798
- }[n] ?? Yo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
2824
+ }[n] ?? Xo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
2799
2825
  }
2800
- function Bo(e) {
2826
+ function Yo(e) {
2801
2827
  return (e.toLowerCase().split(
2802
2828
  /\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
2803
2829
  )[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
2804
2830
  }
2805
- function Go(e) {
2831
+ function Wo(e) {
2806
2832
  const n = e.trim().split(/\s+/);
2807
2833
  return n[n.length - 1] || "";
2808
2834
  }
2809
- function Yo(e) {
2835
+ function Xo(e) {
2810
2836
  return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
2811
2837
  }
2812
- function Wo(e) {
2838
+ function Qo(e) {
2813
2839
  switch (e) {
2814
- case $.EQUAL:
2815
- case $.GREATER_THAN:
2816
- case $.LESS_THAN:
2840
+ case A.EQUAL:
2841
+ case A.GREATER_THAN:
2842
+ case A.LESS_THAN:
2817
2843
  return "sea";
2818
- case $.RANGE:
2844
+ case A.RANGE:
2819
2845
  return "esté entre";
2820
- case $.LIST_OF_VALUES:
2821
- case $.LIST_OF_VALUES_MULTI:
2846
+ case A.LIST_OF_VALUES:
2847
+ case A.LIST_OF_VALUES_MULTI:
2822
2848
  return "esté en";
2823
2849
  default:
2824
2850
  return "sea";
2825
2851
  }
2826
2852
  }
2827
- const Xo = (e) => {
2853
+ const Zo = (e) => {
2828
2854
  if (typeof e == "string") {
2829
2855
  const n = e.toLowerCase();
2830
2856
  if (n.includes("equal")) return ge.EQUAL;
@@ -2836,8 +2862,8 @@ const Xo = (e) => {
2836
2862
  return ge.LIST_OF_VALUES;
2837
2863
  }
2838
2864
  return e ?? ge.EQUAL;
2839
- }, Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Qo = (e) => {
2840
- var ze;
2865
+ }, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Ko = (e) => {
2866
+ var Ve;
2841
2867
  const {
2842
2868
  decision: n,
2843
2869
  onSubmitEvent: t,
@@ -2846,11 +2872,11 @@ const Xo = (e) => {
2846
2872
  onRemoveCondition: i,
2847
2873
  onRestoreConditions: s,
2848
2874
  fullTemplate: d
2849
- } = e, { formik: l, handleToggleNoneChange: p } = Po({
2875
+ } = e, { formik: l, handleToggleNoneChange: p } = zo({
2850
2876
  decision: n,
2851
2877
  onSubmitEvent: t,
2852
2878
  textValues: r
2853
- }), c = tn(d ?? n), g = tn(n), h = pt(
2879
+ }), c = Oe(d ?? n), g = Oe(n), h = ht(
2854
2880
  g,
2855
2881
  (R) => !R.hidden
2856
2882
  ), f = Object.keys(h), x = [
@@ -2859,35 +2885,35 @@ const Xo = (e) => {
2859
2885
  ], y = {};
2860
2886
  let D = 1;
2861
2887
  const T = x.map((R) => {
2862
- const j = R === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
2863
- return y[j] = R, {
2864
- id: j,
2865
- label: R === "group-primary" ? Bn(R, 0) : Bn(R, Number(j.split("-").at(-1))),
2888
+ const H = R === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
2889
+ return y[H] = R, {
2890
+ id: H,
2891
+ label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(H.split("-").at(-1))),
2866
2892
  isDisabled: !1
2867
2893
  };
2868
2894
  }), [S, N] = V.useState(
2869
- ((ze = T[0]) == null ? void 0 : ze.id) ?? "mainCondition"
2895
+ ((Ve = T[0]) == null ? void 0 : Ve.id) ?? "mainCondition"
2870
2896
  ), C = (R) => N(R), I = y[S] ?? "group-primary", F = V.useMemo(() => {
2871
2897
  const R = [
2872
2898
  ...Object.keys(h).filter((Z) => Z === "group-primary"),
2873
2899
  ...Object.keys(h).filter((Z) => Z !== "group-primary")
2874
2900
  ];
2875
- let j = !1;
2901
+ let H = !1;
2876
2902
  const Q = R.map((Z) => {
2877
- const Nt = (h[Z] ?? []).map((Qe, kt) => {
2878
- const Pn = !j && Z === "group-primary" && kt === 0;
2879
- Pn && (j = !0);
2880
- const $t = Xo(Qe.howToSetTheCondition ?? Qe.valueUse), At = Uo({
2881
- label: Qe.labelName || "",
2882
- howToSet: $t,
2883
- isFirst: Pn
2903
+ const At = (h[Z] ?? []).map((Ze, $t) => {
2904
+ const Mn = !H && Z === "group-primary" && $t === 0;
2905
+ Mn && (H = !0);
2906
+ const It = Zo(Ze.howToSetTheCondition ?? Ze.valueUse), Rt = _o({
2907
+ label: Ze.labelName || "",
2908
+ howToSet: It,
2909
+ isFirst: Mn
2884
2910
  });
2885
- return { ...Qe, labelName: At };
2911
+ return { ...Ze, labelName: Rt };
2886
2912
  });
2887
- return [Z, Nt];
2913
+ return [Z, At];
2888
2914
  });
2889
2915
  return Object.fromEntries(Q);
2890
- }, [h]), k = F[I] ?? [], H = F["group-primary"] ?? [], ae = {
2916
+ }, [h]), k = F[I] ?? [], _ = F["group-primary"] ?? [], ae = {
2891
2917
  decisionDataType: n.decisionDataType,
2892
2918
  howToSetTheCondition: n.howToSetTheDecision,
2893
2919
  labelName: n.labelName,
@@ -2897,22 +2923,22 @@ const Xo = (e) => {
2897
2923
  const R = l.errors.conditionsThatEstablishesTheDecision;
2898
2924
  if (!R) return;
2899
2925
  if (typeof R == "string") return R;
2900
- const j = (Q) => {
2926
+ const H = (Q) => {
2901
2927
  if (Q) {
2902
2928
  if (typeof Q == "string") return Q;
2903
2929
  if (Array.isArray(Q))
2904
2930
  for (const Z of Q) {
2905
- const ye = j(Z);
2931
+ const ye = H(Z);
2906
2932
  if (ye) return ye;
2907
2933
  }
2908
2934
  else if (typeof Q == "object")
2909
2935
  for (const Z of Object.values(Q)) {
2910
- const ye = j(Z);
2936
+ const ye = H(Z);
2911
2937
  if (ye) return ye;
2912
2938
  }
2913
2939
  }
2914
2940
  };
2915
- return j(R);
2941
+ return H(R);
2916
2942
  }, [l.errors.conditionsThatEstablishesTheDecision]), be = l.submitCount > 0 && !!me, P = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", de = (R) => {
2917
2943
  const Q = Object.values(c).flat().find((ye) => ye.conditionName === R), Z = P(Q);
2918
2944
  l.setFieldValue(
@@ -2924,13 +2950,13 @@ const Xo = (e) => {
2924
2950
  !1
2925
2951
  );
2926
2952
  }, ke = () => {
2927
- (c[I] ?? []).forEach((j) => {
2928
- const Q = `conditionsThatEstablishesTheDecision.${j.conditionName}`;
2929
- l.setFieldValue(Q, P(j)), l.setFieldTouched(Q, !1, !1);
2953
+ (c[I] ?? []).forEach((H) => {
2954
+ const Q = `conditionsThatEstablishesTheDecision.${H.conditionName}`;
2955
+ l.setFieldValue(Q, P(H)), l.setFieldTouched(Q, !1, !1);
2930
2956
  });
2931
- }, [$e, ve] = V.useState(!1);
2957
+ }, [Ae, ve] = V.useState(!1);
2932
2958
  return /* @__PURE__ */ a(
2933
- Vo,
2959
+ Uo,
2934
2960
  {
2935
2961
  activeTab: S,
2936
2962
  conditionsErrorText: me,
@@ -2949,23 +2975,23 @@ const Xo = (e) => {
2949
2975
  termEndStatus: ie,
2950
2976
  termStartStatus: pe,
2951
2977
  textValues: r,
2952
- visibleConditions: H,
2978
+ visibleConditions: _,
2953
2979
  visibleConditionsByGroup: F,
2954
2980
  handleToggleNoneChange: p,
2955
2981
  portalId: "redefine-confirm-portal",
2956
- showRedefineConfirm: $e,
2982
+ showRedefineConfirm: Ae,
2957
2983
  onOpenRedefineConfirm: () => ve(!0),
2958
2984
  onCloseRedefineConfirm: () => ve(!1),
2959
2985
  onConfirmRedefine: () => {
2960
2986
  ke();
2961
2987
  const R = (c[I] ?? []).map(
2962
- (j) => j.conditionName
2988
+ (H) => H.conditionName
2963
2989
  );
2964
2990
  s == null || s(R), ve(!1);
2965
2991
  }
2966
2992
  }
2967
2993
  );
2968
- }, gl = (e) => {
2994
+ }, ml = (e) => {
2969
2995
  const {
2970
2996
  controls: n = !0,
2971
2997
  customTitleContentAddCard: t,
@@ -2984,7 +3010,7 @@ const Xo = (e) => {
2984
3010
  onRemoveCondition: x,
2985
3011
  onRestoreConditions: y,
2986
3012
  baseDecisionTemplate: D
2987
- } = e, [T, S] = z(null), N = te("(max-width: 681px)"), { renderedCards: C, shouldRenderAddCard: I } = No({
3013
+ } = e, [T, S] = z(null), N = te("(max-width: 681px)"), { renderedCards: C, shouldRenderAddCard: I } = Ao({
2988
3014
  controls: n,
2989
3015
  customTitleContentAddCard: t,
2990
3016
  decisions: o,
@@ -2993,10 +3019,10 @@ const Xo = (e) => {
2993
3019
  handleDelete: h,
2994
3020
  textValues: i,
2995
3021
  isOpenFor: (k) => T === k,
2996
- toggleAt: (k) => S((H) => H === k ? null : k)
3022
+ toggleAt: (k) => S((_) => _ === k ? null : k)
2997
3023
  }), F = (o == null ? void 0 : o.length) === 0 && !p;
2998
3024
  return /* @__PURE__ */ m(O, { children: [
2999
- /* @__PURE__ */ a(To, { children: /* @__PURE__ */ a(wo, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(Ue, { legend: "Decisiones", children: /* @__PURE__ */ m(
3025
+ /* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(Ue, { legend: "Decisiones", children: /* @__PURE__ */ m(
3000
3026
  v,
3001
3027
  {
3002
3028
  direction: "column",
@@ -3009,12 +3035,12 @@ const Xo = (e) => {
3009
3035
  M,
3010
3036
  {
3011
3037
  appearance: "help",
3012
- icon: /* @__PURE__ */ a(Ot, {}),
3038
+ icon: /* @__PURE__ */ a(Mt, {}),
3013
3039
  size: "40px"
3014
3040
  }
3015
3041
  ),
3016
3042
  /* @__PURE__ */ a(
3017
- A,
3043
+ $,
3018
3044
  {
3019
3045
  type: "title",
3020
3046
  size: "medium",
@@ -3023,14 +3049,14 @@ const Xo = (e) => {
3023
3049
  children: "Sin decisiones"
3024
3050
  }
3025
3051
  ),
3026
- /* @__PURE__ */ a(A, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
3052
+ /* @__PURE__ */ a($, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
3027
3053
  "Aun no tienes decisiones definidas, para empezar haz clic en",
3028
3054
  t || ' "Agregar decisión"'
3029
3055
  ] }) })
3030
3056
  ]
3031
3057
  }
3032
3058
  ) }) : /* @__PURE__ */ m(
3033
- Ye,
3059
+ We,
3034
3060
  {
3035
3061
  templateColumns: "1fr",
3036
3062
  autoFlow: "row dense",
@@ -3043,7 +3069,7 @@ const Xo = (e) => {
3043
3069
  height: N ? "auto" : "484px",
3044
3070
  children: [
3045
3071
  C,
3046
- I && Cn({
3072
+ I && Dn({
3047
3073
  type: "add",
3048
3074
  index: o == null ? void 0 : o.length,
3049
3075
  controls: n,
@@ -3060,14 +3086,14 @@ const Xo = (e) => {
3060
3086
  }
3061
3087
  ) }) }) }),
3062
3088
  d && /* @__PURE__ */ a(
3063
- Ao,
3089
+ Ro,
3064
3090
  {
3065
3091
  portalId: "modal-portal",
3066
3092
  onCloseModal: c,
3067
3093
  title: l ? "Editar Decisión" : "Configurar Decisión",
3068
3094
  description: "Diligencia los campos para configurar tu decisión.",
3069
3095
  children: /* @__PURE__ */ a(
3070
- Qo,
3096
+ Ko,
3071
3097
  {
3072
3098
  decision: l || s,
3073
3099
  fullTemplate: D ?? s,
@@ -3082,16 +3108,16 @@ const Xo = (e) => {
3082
3108
  }
3083
3109
  )
3084
3110
  ] });
3085
- }, Zo = {
3111
+ }, Jo = {
3086
3112
  border: {
3087
3113
  color: E.palette.neutral.N40
3088
3114
  }
3089
- }, Ko = w.div`
3115
+ }, ea = w.div`
3090
3116
  border-width: 1px;
3091
3117
  border-style: solid;
3092
3118
  border-color: ${({ theme: e }) => {
3093
3119
  var n, t;
3094
- return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Zo.border.color;
3120
+ return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Jo.border.color;
3095
3121
  }};
3096
3122
  border-radius: ${({ $borderRadius: e }) => e};
3097
3123
  margin: ${({ $margin: e }) => e};
@@ -3100,7 +3126,7 @@ const Xo = (e) => {
3100
3126
  height: ${({ $height: e }) => e};
3101
3127
  box-sizing: border-box;
3102
3128
  `;
3103
- function Jo(e) {
3129
+ function na(e) {
3104
3130
  const {
3105
3131
  children: n,
3106
3132
  padding: t = "16px",
@@ -3110,7 +3136,7 @@ function Jo(e) {
3110
3136
  height: s
3111
3137
  } = e;
3112
3138
  return /* @__PURE__ */ a(
3113
- Ko,
3139
+ ea,
3114
3140
  {
3115
3141
  $padding: t,
3116
3142
  $margin: r,
@@ -3121,7 +3147,7 @@ function Jo(e) {
3121
3147
  }
3122
3148
  );
3123
3149
  }
3124
- const ea = (e, n) => {
3150
+ const ta = (e, n) => {
3125
3151
  const [t, r] = z([]), [o, i] = z([]), [s, d] = z(!1), l = Ie(null);
3126
3152
  return Ee(() => {
3127
3153
  if (!e.current || !l.current) return;
@@ -3148,21 +3174,21 @@ w.div`
3148
3174
  width: 100%;
3149
3175
  }
3150
3176
  `;
3151
- const na = w.div`
3177
+ const ra = w.div`
3152
3178
  position: absolute;
3153
3179
  top: calc(100% + 4px);
3154
3180
  right: 0;
3155
3181
  z-index: 1000;
3156
3182
  width: 170px;
3157
- `, ta = w.div`
3183
+ `, oa = w.div`
3158
3184
  position: absolute;
3159
3185
  visibility: hidden;
3160
3186
  pointer-events: none;
3161
3187
  height: 0;
3162
3188
  overflow: hidden;
3163
- `, ra = w.div`
3189
+ `, aa = w.div`
3164
3190
  cursor: pointer;
3165
- `, Dn = {
3191
+ `, Sn = {
3166
3192
  border: {
3167
3193
  color: {
3168
3194
  regular: E.palette.neutral.N40,
@@ -3198,7 +3224,7 @@ const na = w.div`
3198
3224
  hover: E.palette.neutral.N30
3199
3225
  }
3200
3226
  }
3201
- }, oa = w.li`
3227
+ }, ia = w.li`
3202
3228
  display: flex;
3203
3229
  align-items: center;
3204
3230
  align-self: stretch;
@@ -3213,14 +3239,14 @@ const na = w.div`
3213
3239
  &:hover {
3214
3240
  background-color: ${({ theme: e }) => {
3215
3241
  var n, t, r;
3216
- return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) || Dn.background.color.regular;
3242
+ return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) || Sn.background.color.regular;
3217
3243
  }};
3218
3244
  }
3219
- `, aa = (e) => {
3245
+ `, la = (e) => {
3220
3246
  var g, h, f, x, y, D;
3221
- const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = z(!1), d = () => s(!0), l = () => s(!1), p = In($n), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Dn.option.appearance.hover, c = ((D = (y = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : y.appearance) == null ? void 0 : D.regular) ?? Dn.option.appearance.regular;
3247
+ const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = z(!1), d = () => s(!0), l = () => s(!1), p = Rn($n), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Sn.option.appearance.hover, c = ((D = (y = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : y.appearance) == null ? void 0 : D.regular) ?? Sn.option.appearance.regular;
3222
3248
  return /* @__PURE__ */ a(
3223
- oa,
3249
+ ia,
3224
3250
  {
3225
3251
  id: n,
3226
3252
  onMouseEnter: d,
@@ -3229,7 +3255,7 @@ const na = w.div`
3229
3255
  T.stopPropagation();
3230
3256
  },
3231
3257
  children: /* @__PURE__ */ m(
3232
- Ye,
3258
+ We,
3233
3259
  {
3234
3260
  alignItems: "center",
3235
3261
  gap: "8px",
@@ -3245,7 +3271,7 @@ const na = w.div`
3245
3271
  }
3246
3272
  ),
3247
3273
  /* @__PURE__ */ a(
3248
- A,
3274
+ $,
3249
3275
  {
3250
3276
  textAlign: "start",
3251
3277
  size: "medium",
@@ -3256,7 +3282,7 @@ const na = w.div`
3256
3282
  /* @__PURE__ */ a(
3257
3283
  M,
3258
3284
  {
3259
- icon: /* @__PURE__ */ a(Pt, {}),
3285
+ icon: /* @__PURE__ */ a(zt, {}),
3260
3286
  size: "small",
3261
3287
  onClick: (T) => {
3262
3288
  T.stopPropagation(), o == null || o();
@@ -3270,7 +3296,7 @@ const na = w.div`
3270
3296
  )
3271
3297
  }
3272
3298
  );
3273
- }, hl = (e) => {
3299
+ }, bl = (e) => {
3274
3300
  const {
3275
3301
  appliedFilters: n = [],
3276
3302
  onClear: t,
@@ -3283,14 +3309,14 @@ const na = w.div`
3283
3309
  hidden: c,
3284
3310
  showOverflowIndicator: g,
3285
3311
  measurementRef: h
3286
- } = ea(d, n), [f, x] = z(!1), y = (C) => {
3312
+ } = ta(d, n), [f, x] = z(!1), y = (C) => {
3287
3313
  C.stopPropagation(), x((I) => !I);
3288
3314
  };
3289
3315
  Ee(() => {
3290
3316
  const C = (I) => {
3291
- var H, ae;
3317
+ var _, ae;
3292
3318
  const F = I.target;
3293
- !((H = l.current) != null && H.contains(F)) && !((ae = p.current) != null && ae.contains(F)) && x(!1);
3319
+ !((_ = l.current) != null && _.contains(F)) && !((ae = p.current) != null && ae.contains(F)) && x(!1);
3294
3320
  };
3295
3321
  return f && window.addEventListener("mousedown", C), () => window.removeEventListener("mousedown", C);
3296
3322
  }, [f]);
@@ -3303,8 +3329,8 @@ const na = w.div`
3303
3329
  var I, F;
3304
3330
  (F = (I = c.find((k) => k.label === C)) == null ? void 0 : I.onClose) == null || F.call(I), x(!1);
3305
3331
  };
3306
- return /* @__PURE__ */ m(Jo, { borderRadius: "8px", width: "100%", children: [
3307
- /* @__PURE__ */ a(ta, { ref: h, children: n.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
3332
+ return /* @__PURE__ */ m(na, { borderRadius: "8px", width: "100%", children: [
3333
+ /* @__PURE__ */ a(oa, { ref: h, children: n.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
3308
3334
  De,
3309
3335
  {
3310
3336
  appearance: "primary",
@@ -3315,7 +3341,7 @@ const na = w.div`
3315
3341
  onClose: C.onClose
3316
3342
  }
3317
3343
  ) }, C.label)) }),
3318
- /* @__PURE__ */ m(Ye, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3344
+ /* @__PURE__ */ m(We, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
3319
3345
  /* @__PURE__ */ a(
3320
3346
  oe,
3321
3347
  {
@@ -3328,7 +3354,7 @@ const na = w.div`
3328
3354
  alignItems: "center",
3329
3355
  padding: "0px 8px",
3330
3356
  border: !0,
3331
- children: D ? /* @__PURE__ */ a(A, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(O, { children: [
3357
+ children: D ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(O, { children: [
3332
3358
  u.map((C) => /* @__PURE__ */ a(
3333
3359
  De,
3334
3360
  {
@@ -3348,20 +3374,20 @@ const na = w.div`
3348
3374
  ref: p,
3349
3375
  style: { position: "relative", display: "inline-block" },
3350
3376
  children: [
3351
- /* @__PURE__ */ a(ra, { onClick: y, children: /* @__PURE__ */ a(
3377
+ /* @__PURE__ */ a(aa, { onClick: y, children: /* @__PURE__ */ a(
3352
3378
  De,
3353
3379
  {
3354
3380
  appearance: "primary",
3355
3381
  label: `+${c.length}`
3356
3382
  }
3357
3383
  ) }),
3358
- T && /* @__PURE__ */ a(na, { ref: l, children: /* @__PURE__ */ a(
3359
- qt,
3384
+ T && /* @__PURE__ */ a(ra, { ref: l, children: /* @__PURE__ */ a(
3385
+ Gt,
3360
3386
  {
3361
3387
  options: S,
3362
3388
  onOptionClick: N,
3363
3389
  children: c.map((C) => /* @__PURE__ */ a(
3364
- aa,
3390
+ la,
3365
3391
  {
3366
3392
  id: C.label,
3367
3393
  label: C.label,
@@ -3386,7 +3412,7 @@ const na = w.div`
3386
3412
  {
3387
3413
  cursorHover: !0,
3388
3414
  disabled: D,
3389
- iconBefore: /* @__PURE__ */ a(ot, {}),
3415
+ iconBefore: /* @__PURE__ */ a(it, {}),
3390
3416
  onClick: t,
3391
3417
  variant: "outlined",
3392
3418
  children: i
@@ -3396,7 +3422,7 @@ const na = w.div`
3396
3422
  q,
3397
3423
  {
3398
3424
  cursorHover: !0,
3399
- iconBefore: /* @__PURE__ */ a(at, {}),
3425
+ iconBefore: /* @__PURE__ */ a(lt, {}),
3400
3426
  onClick: r,
3401
3427
  variant: "outlined",
3402
3428
  children: s
@@ -3404,7 +3430,7 @@ const na = w.div`
3404
3430
  )
3405
3431
  ] })
3406
3432
  ] });
3407
- }, ia = w.div`
3433
+ }, sa = w.div`
3408
3434
  display: flex;
3409
3435
  flex-direction: column;
3410
3436
  background-color: ${({ theme: e }) => {
@@ -3417,7 +3443,7 @@ const na = w.div`
3417
3443
  padding: 24px;
3418
3444
  gap: 24px;
3419
3445
  box-sizing: border-box;
3420
- `, fl = (e) => {
3446
+ `, vl = (e) => {
3421
3447
  const {
3422
3448
  actionButtonLabel: n,
3423
3449
  cancelButtonLabel: t,
@@ -3432,18 +3458,18 @@ const na = w.div`
3432
3458
  throw new Error(
3433
3459
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
3434
3460
  );
3435
- return cn(
3436
- /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ m(ia, { $smallScreen: p, children: [
3461
+ return un(
3462
+ /* @__PURE__ */ a(dn, { children: /* @__PURE__ */ m(sa, { $smallScreen: p, children: [
3437
3463
  /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3438
3464
  /* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
3439
- /* @__PURE__ */ a(A, { appearance: "dark", size: "small", type: "headline", children: l }),
3465
+ /* @__PURE__ */ a($, { appearance: "dark", size: "small", type: "headline", children: l }),
3440
3466
  /* @__PURE__ */ m(v, { alignItems: "center", children: [
3441
- /* @__PURE__ */ a(A, { children: "Cerrar" }),
3467
+ /* @__PURE__ */ a($, { children: "Cerrar" }),
3442
3468
  /* @__PURE__ */ a(
3443
3469
  M,
3444
3470
  {
3445
3471
  appearance: "dark",
3446
- icon: /* @__PURE__ */ a(ln, {}),
3472
+ icon: /* @__PURE__ */ a(sn, {}),
3447
3473
  onClick: s,
3448
3474
  cursorHover: !0
3449
3475
  }
@@ -3459,7 +3485,7 @@ const na = w.div`
3459
3485
  {
3460
3486
  appearance: "gray",
3461
3487
  onClick: s,
3462
- iconBefore: /* @__PURE__ */ a(ot, {}),
3488
+ iconBefore: /* @__PURE__ */ a(it, {}),
3463
3489
  spacing: "wide",
3464
3490
  variant: "outlined",
3465
3491
  children: t
@@ -3480,12 +3506,12 @@ const na = w.div`
3480
3506
  ] }) }),
3481
3507
  u
3482
3508
  );
3483
- }, ml = (e) => {
3509
+ }, yl = (e) => {
3484
3510
  const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = te("(max-width: 768px)"), s = !n || n.length === 0;
3485
3511
  return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
3486
3512
  i && /* @__PURE__ */ m(O, { children: [
3487
3513
  /* @__PURE__ */ m(v, { gap: "6px", width: "100%", alignItems: "center", children: [
3488
- /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(at, {}) }),
3514
+ /* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(lt, {}) }),
3489
3515
  /* @__PURE__ */ a(
3490
3516
  oe,
3491
3517
  {
@@ -3498,7 +3524,7 @@ const na = w.div`
3498
3524
  border: !0,
3499
3525
  width: "100%",
3500
3526
  height: "36px",
3501
- children: s ? /* @__PURE__ */ a(A, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ a(
3527
+ children: s ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ a(
3502
3528
  De,
3503
3529
  {
3504
3530
  appearance: "primary",
@@ -3518,7 +3544,7 @@ const na = w.div`
3518
3544
  t.map((d) => /* @__PURE__ */ m(v, { gap: "6px", alignItems: "center", children: [
3519
3545
  /* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(M, { appearance: "primary", icon: d.icon }) }),
3520
3546
  /* @__PURE__ */ a(
3521
- Bt,
3547
+ Yt,
3522
3548
  {
3523
3549
  disabled: d.disabled,
3524
3550
  invalid: d.invalid,
@@ -3536,12 +3562,12 @@ const na = w.div`
3536
3562
  )
3537
3563
  ] }, d.name))
3538
3564
  ] });
3539
- }, la = (e) => {
3565
+ }, da = (e) => {
3540
3566
  const n = [];
3541
3567
  return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
3542
- }, bl = (e) => {
3568
+ }, xl = (e) => {
3543
3569
  var s;
3544
- const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? la(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
3570
+ const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? da(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
3545
3571
  var c;
3546
3572
  const p = d == null ? void 0 : d.value;
3547
3573
  return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
@@ -3557,7 +3583,7 @@ const na = w.div`
3557
3583
  value: o(n.value),
3558
3584
  conditionsThatEstablishesTheDecision: i
3559
3585
  };
3560
- }, vl = (e) => {
3586
+ }, Tl = (e) => {
3561
3587
  if (typeof e != "string") return e;
3562
3588
  const n = e.split(";").map((r) => r.trim()), t = {};
3563
3589
  for (const r of n)
@@ -3569,7 +3595,7 @@ const na = w.div`
3569
3595
  isNaN(o) || (t.to = o);
3570
3596
  }
3571
3597
  return t.from !== void 0 || t.to !== void 0 ? t : e;
3572
- }, yl = (e) => {
3598
+ }, wl = (e) => {
3573
3599
  const { dataDecision: n, originalDecision: t } = e, r = {
3574
3600
  conditionName: n.ruleName || "",
3575
3601
  labelName: n.labelName || "",
@@ -3585,7 +3611,7 @@ const na = w.div`
3585
3611
  (o) => o.hidden ? { ...r } : o
3586
3612
  )
3587
3613
  };
3588
- }, xl = (e) => {
3614
+ }, Cl = (e) => {
3589
3615
  const { decisions: n } = e;
3590
3616
  return n == null ? void 0 : n.map((t) => {
3591
3617
  var o;
@@ -3604,15 +3630,15 @@ const na = w.div`
3604
3630
  )
3605
3631
  } : t;
3606
3632
  });
3607
- }, sa = (e) => ({
3633
+ }, ca = (e) => ({
3608
3634
  schema: le().required("Requerido").test(
3609
3635
  "non-empty",
3610
3636
  "El valor no puede estar vacío",
3611
3637
  (n) => n != null && n.trim() !== ""
3612
3638
  ),
3613
3639
  value: e
3614
- }), da = (e) => ({
3615
- schema: Pe().test(
3640
+ }), ua = (e) => ({
3641
+ schema: Me().test(
3616
3642
  "isArrayOrString",
3617
3643
  "Debe ser un array de strings/numbers o un solo string",
3618
3644
  (n) => Array.isArray(n) ? n.every(
@@ -3620,8 +3646,8 @@ const na = w.div`
3620
3646
  ) : typeof n == "string"
3621
3647
  ),
3622
3648
  value: e
3623
- }), ca = (e) => ({
3624
- schema: Pe().test(
3649
+ }), pa = (e) => ({
3650
+ schema: Me().test(
3625
3651
  "isArrayOrString",
3626
3652
  "Debe ser un array de strings/numbers o un solo string ",
3627
3653
  (n) => Array.isArray(n) ? n.every(
@@ -3629,7 +3655,7 @@ const na = w.div`
3629
3655
  ) : typeof n == "string"
3630
3656
  ),
3631
3657
  value: e
3632
- }), ua = (e) => {
3658
+ }), ga = (e) => {
3633
3659
  const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
3634
3660
  return {
3635
3661
  schema: ne({
@@ -3645,28 +3671,28 @@ const na = w.div`
3645
3671
  }),
3646
3672
  value: { from: n, to: t }
3647
3673
  };
3648
- }, bn = (e, n) => n === U.PERCENTAGE ? {
3674
+ }, vn = (e, n) => n === j.PERCENTAGE ? {
3649
3675
  schema: se().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"),
3650
3676
  value: e
3651
3677
  } : {
3652
3678
  schema: le().required("Requerido"),
3653
3679
  value: e
3654
- }, pa = {
3655
- [$.LIST_OF_VALUES]: da,
3656
- [$.LIST_OF_VALUES_MULTI]: ca,
3657
- [$.RANGE]: ua,
3658
- [$.GREATER_THAN]: bn,
3659
- [$.LESS_THAN]: bn,
3660
- [$.EQUAL]: bn
3661
- }, Gn = (e) => pa[e] || sa;
3662
- function ga({
3680
+ }, ha = {
3681
+ [A.LIST_OF_VALUES]: ua,
3682
+ [A.LIST_OF_VALUES_MULTI]: pa,
3683
+ [A.RANGE]: ga,
3684
+ [A.GREATER_THAN]: vn,
3685
+ [A.LESS_THAN]: vn,
3686
+ [A.EQUAL]: vn
3687
+ }, Wn = (e) => ha[e] || ca;
3688
+ function fa({
3663
3689
  decision: e,
3664
3690
  onSubmitEvent: n,
3665
3691
  textValues: t
3666
3692
  }) {
3667
3693
  const r = {
3668
3694
  ruleName: e.ruleName || "",
3669
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
3695
+ decisionDataType: e.decisionDataType || j.ALPHABETICAL,
3670
3696
  howToSetTheDecision: e.howToSetTheDecision || "",
3671
3697
  value: e.value || "",
3672
3698
  effectiveFrom: e.effectiveFrom || "",
@@ -3679,7 +3705,7 @@ function ga({
3679
3705
  let o;
3680
3706
  const i = {
3681
3707
  ruleName: le().required("El nombre de la regla es requerido"),
3682
- value: qe(() => Gn(
3708
+ value: Be(() => Wn(
3683
3709
  o.values.howToSetTheDecision
3684
3710
  )(
3685
3711
  o.values.value,
@@ -3722,13 +3748,13 @@ function ga({
3722
3748
  // },
3723
3749
  // );
3724
3750
  // }),
3725
- conditionsThatEstablishesTheDecision: qe((l, { parent: p }) => {
3751
+ conditionsThatEstablishesTheDecision: Be((l, { parent: p }) => {
3726
3752
  var g;
3727
3753
  if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return ne().shape({});
3728
3754
  const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
3729
3755
  (h, f) => {
3730
3756
  if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
3731
- const y = Gn(
3757
+ const y = Wn(
3732
3758
  f.howToSetTheCondition
3733
3759
  );
3734
3760
  h[f.conditionName] = y(
@@ -3757,7 +3783,7 @@ function ga({
3757
3783
  ) : p.notRequired()
3758
3784
  ));
3759
3785
  const s = ne(i);
3760
- return o = An({
3786
+ return o = In({
3761
3787
  initialValues: r,
3762
3788
  validationSchema: s,
3763
3789
  validateOnBlur: !0,
@@ -3790,7 +3816,7 @@ function ga({
3790
3816
  void 0
3791
3817
  );
3792
3818
  else {
3793
- const c = u.howToSetTheCondition === $.LIST_OF_VALUES_MULTI ? [] : "";
3819
+ const c = u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
3794
3820
  o.setFieldValue(
3795
3821
  `conditionsThatEstablishesTheDecision.${u.conditionName}`,
3796
3822
  c
@@ -3799,7 +3825,7 @@ function ga({
3799
3825
  });
3800
3826
  } };
3801
3827
  }
3802
- const ha = w.div`
3828
+ const ma = w.div`
3803
3829
  & > div {
3804
3830
  border-radius: 8px;
3805
3831
  border: 1px solid
@@ -3808,7 +3834,7 @@ const ha = w.div`
3808
3834
  return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
3809
3835
  }};
3810
3836
  }
3811
- `, fa = w.div`
3837
+ `, ba = w.div`
3812
3838
  width: 100%;
3813
3839
  height: 100%;
3814
3840
  overflow-y: auto;
@@ -3825,7 +3851,7 @@ const ha = w.div`
3825
3851
  background-color: #ebecf0;
3826
3852
  border-radius: 8px;
3827
3853
  }
3828
- `, ma = (e) => {
3854
+ `, va = (e) => {
3829
3855
  const {
3830
3856
  checked: n,
3831
3857
  children: t,
@@ -3841,7 +3867,7 @@ const ha = w.div`
3841
3867
  p(n);
3842
3868
  }, [n]), /* @__PURE__ */ m(O, { children: [
3843
3869
  /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
3844
- dn,
3870
+ cn,
3845
3871
  {
3846
3872
  checked: l,
3847
3873
  id: o,
@@ -3849,12 +3875,12 @@ const ha = w.div`
3849
3875
  onChange: u,
3850
3876
  size: "small",
3851
3877
  value: d,
3852
- children: /* @__PURE__ */ a(A, { size: "medium", type: "label", weight: "bold", children: i })
3878
+ children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", children: i })
3853
3879
  }
3854
3880
  ) }),
3855
3881
  l && /* @__PURE__ */ a(O, { children: t })
3856
3882
  ] });
3857
- }, ba = (e) => {
3883
+ }, ya = (e) => {
3858
3884
  const {
3859
3885
  onHandleStartChange: n,
3860
3886
  onHandleEndChange: t,
@@ -3879,7 +3905,7 @@ const ha = w.div`
3879
3905
  return /* @__PURE__ */ m(O, { children: [
3880
3906
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
3881
3907
  /* @__PURE__ */ a(
3882
- A,
3908
+ $,
3883
3909
  {
3884
3910
  appearance: "gray",
3885
3911
  margin: "10px 0",
@@ -3897,7 +3923,7 @@ const ha = w.div`
3897
3923
  wrap: "wrap",
3898
3924
  gap: "4px",
3899
3925
  children: /* @__PURE__ */ a(
3900
- Nn,
3926
+ kn,
3901
3927
  {
3902
3928
  label: "Cerrada",
3903
3929
  onChange: N,
@@ -3945,7 +3971,7 @@ const ha = w.div`
3945
3971
  }
3946
3972
  )
3947
3973
  ] });
3948
- }, va = (e) => {
3974
+ }, xa = (e) => {
3949
3975
  const {
3950
3976
  formik: n,
3951
3977
  textValues: t,
@@ -3959,13 +3985,13 @@ const ha = w.div`
3959
3985
  termEndStatus: u
3960
3986
  } = e;
3961
3987
  return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
3962
- nn({
3988
+ rn({
3963
3989
  condition: i,
3964
3990
  formik: n,
3965
3991
  isDecision: !0
3966
3992
  }),
3967
3993
  /* @__PURE__ */ a(B, { dashed: !0 }),
3968
- /* @__PURE__ */ a(ha, { children: /* @__PURE__ */ a(fa, { children: /* @__PURE__ */ m(
3994
+ /* @__PURE__ */ a(ma, { children: /* @__PURE__ */ a(ba, { children: /* @__PURE__ */ m(
3969
3995
  v,
3970
3996
  {
3971
3997
  direction: "column",
@@ -3980,22 +4006,22 @@ const ha = w.div`
3980
4006
  alignItems: "center",
3981
4007
  gap: "64px",
3982
4008
  children: [
3983
- /* @__PURE__ */ a(A, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
4009
+ /* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
3984
4010
  /* @__PURE__ */ a(
3985
- dn,
4011
+ cn,
3986
4012
  {
3987
4013
  id: "toggleNone",
3988
4014
  onChange: () => s(!n.values.toggleNone),
3989
4015
  checked: n.values.toggleNone,
3990
4016
  size: "small",
3991
- children: /* @__PURE__ */ a(A, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
4017
+ children: /* @__PURE__ */ a($, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
3992
4018
  }
3993
4019
  )
3994
4020
  ]
3995
4021
  }
3996
4022
  ),
3997
4023
  /* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ a(
3998
- ma,
4024
+ va,
3999
4025
  {
4000
4026
  id: `toggle-${c.conditionName}`,
4001
4027
  name: `toggle.${c.conditionName}`,
@@ -4003,9 +4029,9 @@ const ha = w.div`
4003
4029
  checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
4004
4030
  handleToggleChange: (g) => d(
4005
4031
  c.conditionName,
4006
- c.howToSetTheCondition === $.LIST_OF_VALUES_MULTI
4032
+ c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
4007
4033
  )(g.target.checked),
4008
- children: nn({ condition: c, formik: n })
4034
+ children: rn({ condition: c, formik: n })
4009
4035
  },
4010
4036
  c.conditionName
4011
4037
  )) })
@@ -4015,7 +4041,7 @@ const ha = w.div`
4015
4041
  t.terms && /* @__PURE__ */ m(O, { children: [
4016
4042
  /* @__PURE__ */ a(B, { dashed: !0 }),
4017
4043
  /* @__PURE__ */ a(
4018
- ba,
4044
+ ya,
4019
4045
  {
4020
4046
  labelStart: t.termStart,
4021
4047
  labelEnd: t.termEnd,
@@ -4035,15 +4061,15 @@ const ha = w.div`
4035
4061
  )
4036
4062
  ] }),
4037
4063
  /* @__PURE__ */ a(B, {}),
4038
- l && /* @__PURE__ */ a(A, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
4064
+ l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
4039
4065
  /* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
4040
4066
  /* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
4041
4067
  /* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
4042
4068
  ] })
4043
4069
  ] }) });
4044
- }, ya = (e) => {
4070
+ }, Ta = (e) => {
4045
4071
  var h;
4046
- const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = ga({
4072
+ const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = fa({
4047
4073
  decision: n,
4048
4074
  onSubmitEvent: t,
4049
4075
  textValues: r
@@ -4057,7 +4083,7 @@ const ha = w.div`
4057
4083
  (f) => !f.hidden
4058
4084
  )) || [], p = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, u = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
4059
4085
  return /* @__PURE__ */ a(
4060
- va,
4086
+ xa,
4061
4087
  {
4062
4088
  formik: i,
4063
4089
  onCancel: o,
@@ -4089,7 +4115,7 @@ const ha = w.div`
4089
4115
  termEndStatus: c
4090
4116
  }
4091
4117
  );
4092
- }, Tl = (e) => {
4118
+ }, Dl = (e) => {
4093
4119
  var o;
4094
4120
  const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
4095
4121
  (i) => i.switchPlaces
@@ -4105,7 +4131,7 @@ const ha = w.div`
4105
4131
  (i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
4106
4132
  )
4107
4133
  } : t;
4108
- }, wl = (e) => {
4134
+ }, Sl = (e) => {
4109
4135
  const { decisions: n } = e;
4110
4136
  return n == null ? void 0 : n.map((t) => {
4111
4137
  var o;
@@ -4141,7 +4167,7 @@ const ha = w.div`
4141
4167
  color: E.palette.neutral.N0
4142
4168
  }
4143
4169
  }
4144
- }, xa = w.div`
4170
+ }, wa = w.div`
4145
4171
  & > div {
4146
4172
  border: 1px solid
4147
4173
  ${({ theme: e, $active: n }) => {
@@ -4157,27 +4183,27 @@ const ha = w.div`
4157
4183
  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) || xe.item.background.hover;
4158
4184
  }};
4159
4185
  }
4160
- `, Yn = w.div`
4186
+ `, Xn = w.div`
4161
4187
  display: flex;
4162
4188
  align-items: center;
4163
4189
  gap: 12px;
4164
4190
  width: 100%;
4165
4191
  outline: none;
4166
4192
  cursor: pointer;
4167
- `, Ta = w.div`
4193
+ `, Ca = w.div`
4168
4194
  display: flex;
4169
4195
  align-items: center;
4170
4196
  outline: none;
4171
4197
  cursor: pointer;
4172
- `, wa = w(st)`
4198
+ `, Da = w(ct)`
4173
4199
  display: flex;
4174
4200
  align-items: center;
4175
4201
  text-decoration: none;
4176
- `, Ca = w(st)`
4202
+ `, Sa = w(ct)`
4177
4203
  display: block;
4178
4204
  text-decoration: none;
4179
4205
  color: inherit;
4180
- `, Da = w.div`
4206
+ `, Ea = w.div`
4181
4207
  & > div {
4182
4208
  border-bottom: 1px solid
4183
4209
  ${({ theme: e, $active: n }) => {
@@ -4186,7 +4212,7 @@ const ha = w.div`
4186
4212
  }};
4187
4213
  border-radius: 8px 8px 0 0;
4188
4214
  }
4189
- `, ht = w.div`
4215
+ `, mt = w.div`
4190
4216
  display: block;
4191
4217
  text-decoration: none;
4192
4218
  background-color: ${({ theme: e, $active: n }) => {
@@ -4204,14 +4230,14 @@ const ha = w.div`
4204
4230
  return ((i = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || xe.item.background.hover;
4205
4231
  }};
4206
4232
  }
4207
- `, Sa = w.div`
4233
+ `, Na = w.div`
4208
4234
  display: flex;
4209
4235
  flex-direction: column;
4210
4236
 
4211
- & > a:last-child ${ht} {
4237
+ & > a:last-child ${mt} {
4212
4238
  border-radius: 0 0 8px 8px;
4213
4239
  }
4214
- `, Ea = (e) => {
4240
+ `, ka = (e) => {
4215
4241
  const { isOpen: n, links: t, onClick: r, title: o, activeId: i, headerPath: s, headerActive: d } = e, l = (f) => {
4216
4242
  (f.key === "Enter" || f.key === " ") && (f.preventDefault(), r());
4217
4243
  }, p = (f) => {
@@ -4219,16 +4245,16 @@ const ha = w.div`
4219
4245
  }, u = (f) => {
4220
4246
  (f.key === "Enter" || f.key === " ") && (f.preventDefault(), f.stopPropagation(), r());
4221
4247
  }, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", h = V.useId();
4222
- return /* @__PURE__ */ a(xa, { $active: n, children: /* @__PURE__ */ m(oe, { border: !0, borderRadius: "8px", width: "100%", children: [
4248
+ return /* @__PURE__ */ a(wa, { $active: n, children: /* @__PURE__ */ m(oe, { border: !0, borderRadius: "8px", width: "100%", children: [
4223
4249
  /* @__PURE__ */ a(
4224
- Da,
4250
+ Ea,
4225
4251
  {
4226
4252
  $active: n && t.length > 0,
4227
4253
  "aria-controls": h,
4228
4254
  "aria-expanded": n,
4229
4255
  onClick: p,
4230
4256
  onKeyDown: u,
4231
- children: s ? /* @__PURE__ */ a(wa, { to: s, children: /* @__PURE__ */ m(
4257
+ children: s ? /* @__PURE__ */ a(Da, { to: s, children: /* @__PURE__ */ m(
4232
4258
  oe,
4233
4259
  {
4234
4260
  alignItems: "center",
@@ -4242,11 +4268,11 @@ const ha = w.div`
4242
4268
  {
4243
4269
  appearance: c,
4244
4270
  cursorHover: !0,
4245
- icon: n && t.length > 0 ? /* @__PURE__ */ a(xn, {}) : /* @__PURE__ */ a(Mn, {})
4271
+ icon: n && t.length > 0 ? /* @__PURE__ */ a(Tn, {}) : /* @__PURE__ */ a(zn, {})
4246
4272
  }
4247
4273
  ),
4248
- /* @__PURE__ */ a(Yn, { children: /* @__PURE__ */ a(
4249
- A,
4274
+ /* @__PURE__ */ a(Xn, { children: /* @__PURE__ */ a(
4275
+ $,
4250
4276
  {
4251
4277
  appearance: c,
4252
4278
  cursorHover: !0,
@@ -4272,18 +4298,18 @@ const ha = w.div`
4272
4298
  {
4273
4299
  appearance: c,
4274
4300
  cursorHover: !0,
4275
- icon: n && t.length > 0 ? /* @__PURE__ */ a(xn, {}) : /* @__PURE__ */ a(Mn, {})
4301
+ icon: n && t.length > 0 ? /* @__PURE__ */ a(Tn, {}) : /* @__PURE__ */ a(zn, {})
4276
4302
  }
4277
4303
  ),
4278
- /* @__PURE__ */ a(Yn, { children: /* @__PURE__ */ a(
4279
- Ta,
4304
+ /* @__PURE__ */ a(Xn, { children: /* @__PURE__ */ a(
4305
+ Ca,
4280
4306
  {
4281
4307
  "aria-controls": h,
4282
4308
  "aria-expanded": n,
4283
4309
  onClick: r,
4284
4310
  onKeyDown: l,
4285
4311
  children: /* @__PURE__ */ a(
4286
- A,
4312
+ $,
4287
4313
  {
4288
4314
  appearance: c,
4289
4315
  cursorHover: !0,
@@ -4301,9 +4327,9 @@ const ha = w.div`
4301
4327
  )
4302
4328
  }
4303
4329
  ),
4304
- n && t.length > 0 && /* @__PURE__ */ a(Sa, { id: h, children: t.map((f) => {
4330
+ n && t.length > 0 && /* @__PURE__ */ a(Na, { id: h, children: t.map((f) => {
4305
4331
  const x = f.id === i;
4306
- return /* @__PURE__ */ a(Ca, { to: f.path, children: /* @__PURE__ */ a(ht, { $active: x, children: /* @__PURE__ */ m(
4332
+ return /* @__PURE__ */ a(Sa, { to: f.path, children: /* @__PURE__ */ a(mt, { $active: x, children: /* @__PURE__ */ m(
4307
4333
  v,
4308
4334
  {
4309
4335
  alignItems: "center",
@@ -4311,9 +4337,9 @@ const ha = w.div`
4311
4337
  gap: "8px",
4312
4338
  padding: x ? "8px 4px" : "8px 32px",
4313
4339
  children: [
4314
- x && /* @__PURE__ */ a(M, { appearance: "primary", icon: /* @__PURE__ */ a(Mt, {}) }),
4340
+ x && /* @__PURE__ */ a(M, { appearance: "primary", icon: /* @__PURE__ */ a(Vt, {}) }),
4315
4341
  /* @__PURE__ */ a(
4316
- A,
4342
+ $,
4317
4343
  {
4318
4344
  appearance: x ? "primary" : "dark",
4319
4345
  size: "small",
@@ -4327,7 +4353,7 @@ const ha = w.div`
4327
4353
  ) }) }, f.id);
4328
4354
  }) })
4329
4355
  ] }) });
4330
- }, Na = w.div`
4356
+ }, Aa = w.div`
4331
4357
  & > div {
4332
4358
  background: ${({ $background: e, theme: n }) => {
4333
4359
  var t, r, o, i;
@@ -4335,13 +4361,13 @@ const ha = w.div`
4335
4361
  }};
4336
4362
  }
4337
4363
  height: 90vh;
4338
- `, ka = (e, n) => {
4364
+ `, $a = (e, n) => {
4339
4365
  var t;
4340
4366
  for (const r of n)
4341
4367
  if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
4342
4368
  return null;
4343
- }, Cl = (e) => {
4344
- const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Qt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
4369
+ }, El = (e) => {
4370
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
4345
4371
  (u) => {
4346
4372
  var c;
4347
4373
  return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
@@ -4357,14 +4383,14 @@ const ha = w.div`
4357
4383
  s(null);
4358
4384
  return;
4359
4385
  }
4360
- const c = ka(o.pathname, r);
4386
+ const c = $a(o.pathname, r);
4361
4387
  if (c) {
4362
4388
  s(c);
4363
4389
  return;
4364
4390
  }
4365
4391
  t && s(t);
4366
- }, [n, t, r, o.pathname]), /* @__PURE__ */ a(Na, { $background: !0, children: /* @__PURE__ */ a(v, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ a(
4367
- Ea,
4392
+ }, [n, t, r, o.pathname]), /* @__PURE__ */ a(Aa, { $background: !0, children: /* @__PURE__ */ a(v, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ a(
4393
+ ka,
4368
4394
  {
4369
4395
  activeId: l(u.links),
4370
4396
  headerPath: u.path,
@@ -4383,7 +4409,7 @@ function Y(e) {
4383
4409
  function Ce(e) {
4384
4410
  e.stopPropagation();
4385
4411
  }
4386
- function ft() {
4412
+ function bt() {
4387
4413
  const e = /* @__PURE__ */ new Map();
4388
4414
  return [function(r, o) {
4389
4415
  e.get(r) && e.get(r).forEach((i) => {
@@ -4394,53 +4420,53 @@ function ft() {
4394
4420
  i.push(o), e.set(r, i);
4395
4421
  }];
4396
4422
  }
4397
- var [mt, bt] = ft();
4398
- function $a(e, n) {
4423
+ var [vt, yt] = bt();
4424
+ function Ia(e, n) {
4399
4425
  return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
4400
4426
  }
4401
- function Be(e, n, t = !0, r = ["__key"]) {
4427
+ function Ge(e, n, t = !0, r = ["__key"]) {
4402
4428
  if (e === n) return !0;
4403
4429
  if (typeof n == "object" && typeof e == "object" && e !== null && n !== null) {
4404
4430
  if (e instanceof Map || e instanceof Set) return !1;
4405
4431
  if (e instanceof Date && n instanceof Date)
4406
4432
  return e.getTime() === n.getTime();
4407
4433
  if (e instanceof RegExp && n instanceof RegExp)
4408
- return $a(e, n);
4434
+ return Ia(e, n);
4409
4435
  if (e === null || n === null) return !1;
4410
4436
  const o = e, i = n;
4411
4437
  if (Object.keys(o).length !== Object.keys(i).length) return !1;
4412
4438
  for (const s of r)
4413
4439
  if ((s in o || s in i) && o[s] !== i[s]) return !1;
4414
4440
  for (const s in o)
4415
- if (!(s in i) || o[s] !== i[s] && !t || t && !Be(o[s], i[s], t, r)) return !1;
4441
+ if (!(s in i) || o[s] !== i[s] && !t || t && !Ge(o[s], i[s], t, r)) return !1;
4416
4442
  return !0;
4417
4443
  }
4418
4444
  return !1;
4419
4445
  }
4420
- function vt(e) {
4446
+ function xt(e) {
4421
4447
  return e.split(" ").filter((n) => n);
4422
4448
  }
4423
- function Me(e) {
4449
+ function ze(e) {
4424
4450
  return { x: e.clientX, y: e.clientY };
4425
4451
  }
4426
4452
  Array();
4427
- var Ln = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap();
4428
- function yt() {
4429
- if (!Ln) return !1;
4453
+ var On = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap();
4454
+ function Tt() {
4455
+ if (!On) return !1;
4430
4456
  if ("userAgentData" in navigator)
4431
4457
  return navigator.userAgentData.mobile === !0;
4432
4458
  const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
4433
4459
  return n || t;
4434
4460
  }
4435
- var Aa = {
4461
+ var Ra = {
4436
4462
  affectedNodes: [],
4437
4463
  coordinates: {
4438
4464
  x: 0,
4439
4465
  y: 0
4440
4466
  },
4441
4467
  currentTargetValue: void 0,
4442
- on: bt,
4443
- emit: mt,
4468
+ on: yt,
4469
+ emit: vt,
4444
4470
  originalZIndex: void 0,
4445
4471
  pointerSelection: !1,
4446
4472
  preventEnter: !1,
@@ -4466,16 +4492,16 @@ var Aa = {
4466
4492
  scrollDebounceTimeout: void 0,
4467
4493
  frameIdX: void 0,
4468
4494
  frameIdY: void 0
4469
- }, b = Aa, we = !1, Wn, vn;
4470
- function Ia() {
4495
+ }, b = Ra, we = !1, Qn, yn;
4496
+ function Fa() {
4471
4497
  b.scrollDebounceTimeout && clearTimeout(b.scrollDebounceTimeout), b.longPressTimeout && clearTimeout(b.longPressTimeout), b.frameIdX !== void 0 && cancelAnimationFrame(b.frameIdX), b.frameIdY !== void 0 && cancelAnimationFrame(b.frameIdY), b = { ...{
4472
4498
  affectedNodes: [],
4473
4499
  coordinates: {
4474
4500
  x: 0,
4475
4501
  y: 0
4476
4502
  },
4477
- on: bt,
4478
- emit: mt,
4503
+ on: yt,
4504
+ emit: vt,
4479
4505
  currentTargetValue: void 0,
4480
4506
  originalZIndex: void 0,
4481
4507
  pointerId: void 0,
@@ -4508,38 +4534,38 @@ function Ia() {
4508
4534
  frameIdY: void 0
4509
4535
  } };
4510
4536
  }
4511
- function xt(e) {
4537
+ function wt(e) {
4512
4538
  return Object.assign(b, e), e.initialParent.data.emit("dragStarted", b), we = !1, b.emit("dragStarted", b), b;
4513
4539
  }
4514
- function Ra() {
4540
+ function La() {
4515
4541
  b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
4516
4542
  }
4517
- function Fa() {
4543
+ function Oa() {
4518
4544
  if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !re(b)) return;
4519
4545
  const e = b.currentParent.data.config;
4520
4546
  re(b) && e.handleEnd(b);
4521
4547
  }
4522
- function La(e) {
4548
+ function Pa(e) {
4523
4549
  e.key === "Escape" && (b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
4524
4550
  }
4525
- function Oa(e) {
4551
+ function Ma(e) {
4526
4552
  if (!W(b)) return;
4527
4553
  we = !0;
4528
4554
  const n = b.initialParent.data.config.handleEnd;
4529
4555
  n(b);
4530
4556
  }
4531
- function Pa(e) {
4557
+ function za(e) {
4532
4558
  if (!W(b)) return;
4533
4559
  Y(e);
4534
- const { x: n, y: t } = Me(e);
4535
- W(b) && gn({ x: n, y: t }, e, b);
4560
+ const { x: n, y: t } = ze(e);
4561
+ W(b) && hn({ x: n, y: t }, e, b);
4536
4562
  }
4537
- function Ma(e) {
4563
+ function Va(e) {
4538
4564
  if (!b.pointerDown || !b.pointerDown.validated) return;
4539
4565
  const n = b.pointerDown.parent.data.config;
4540
- if (!(e.pointerType === "mouse" && !yt()))
4566
+ if (!(e.pointerType === "mouse" && !Tt()))
4541
4567
  if (re(b))
4542
- re(b) && Xn(e, b);
4568
+ re(b) && Zn(e, b);
4543
4569
  else {
4544
4570
  if (Y(e), n.longPress && !b.longPress) {
4545
4571
  clearTimeout(b.longPressTimeout), b.longPress = !1;
@@ -4547,7 +4573,7 @@ function Ma(e) {
4547
4573
  }
4548
4574
  const t = n.draggedNodes(b.pointerDown);
4549
4575
  n.dragstartClasses(b.pointerDown.node, t, n, !0);
4550
- const r = b.pointerDown.node.el.getBoundingClientRect(), o = pi(
4576
+ const r = b.pointerDown.node.el.getBoundingClientRect(), o = hi(
4551
4577
  b.pointerDown.node,
4552
4578
  b.pointerDown.parent,
4553
4579
  e,
@@ -4555,24 +4581,24 @@ function Ma(e) {
4555
4581
  t,
4556
4582
  r
4557
4583
  );
4558
- Xn(e, o, !0);
4584
+ Zn(e, o, !0);
4559
4585
  }
4560
4586
  }
4561
- function za({
4587
+ function ja({
4562
4588
  parent: e,
4563
4589
  getValues: n,
4564
4590
  setValues: t,
4565
4591
  config: r = {}
4566
4592
  }) {
4567
4593
  var l, p, u;
4568
- if (!Ln) return;
4569
- Wn || (Wn = rn(document, {
4570
- dragover: Pa,
4571
- pointerdown: Ra,
4572
- pointerup: Fa,
4573
- keydown: La,
4574
- drop: Oa,
4575
- pointermove: Ma,
4594
+ if (!On) return;
4595
+ Qn || (Qn = on(document, {
4596
+ dragover: za,
4597
+ pointerdown: La,
4598
+ pointerup: Oa,
4599
+ keydown: Pa,
4600
+ drop: Ma,
4601
+ pointermove: Va,
4576
4602
  pointercancel: K(r.handlePointercancel),
4577
4603
  touchmove: (c) => {
4578
4604
  W(b) && c.cancelable && Y(c);
@@ -4580,45 +4606,45 @@ function za({
4580
4606
  contextmenu: (c) => {
4581
4607
  re(b) && Y(c);
4582
4608
  }
4583
- })), wt(e);
4584
- const [o, i] = ft(), s = {
4609
+ })), Dt(e);
4610
+ const [o, i] = bt(), s = {
4585
4611
  getValues: n,
4586
4612
  setValues: t,
4587
4613
  config: {
4588
4614
  dragDropEffect: r.dragDropEffect ?? "move",
4589
4615
  dragEffectAllowed: r.dragEffectAllowed ?? "move",
4590
- draggedNodes: Za,
4591
- dragstartClasses: ni,
4592
- handleNodeKeydown: ri,
4593
- handleDragstart: Ja,
4594
- handleNodeDragover: hi,
4595
- handleParentDragover: fi,
4596
- handleNodeDrop: ai,
4597
- handleNodeFocus: ii,
4598
- handleNodeBlur: li,
4599
- handlePointercancel: di,
4600
- handleEnd: ci,
4601
- handleDragend: si,
4602
- handleParentFocus: Ua,
4603
- handleNodePointerup: ui,
4604
- handleNodePointerover: oi,
4605
- handleParentPointerover: mi,
4606
- handleParentScroll: Ka,
4607
- handleNodePointerdown: ei,
4608
- handleNodeDragenter: vi,
4609
- handleNodeDragleave: yi,
4610
- handleParentDrop: Ha,
4616
+ draggedNodes: Ja,
4617
+ dragstartClasses: ri,
4618
+ handleNodeKeydown: ai,
4619
+ handleDragstart: ni,
4620
+ handleNodeDragover: mi,
4621
+ handleParentDragover: bi,
4622
+ handleNodeDrop: li,
4623
+ handleNodeFocus: si,
4624
+ handleNodeBlur: di,
4625
+ handlePointercancel: ui,
4626
+ handleEnd: pi,
4627
+ handleDragend: ci,
4628
+ handleParentFocus: _a,
4629
+ handleNodePointerup: gi,
4630
+ handleNodePointerover: ii,
4631
+ handleParentPointerover: vi,
4632
+ handleParentScroll: ei,
4633
+ handleNodePointerdown: ti,
4634
+ handleNodeDragenter: xi,
4635
+ handleNodeDragleave: Ti,
4636
+ handleParentDrop: qa,
4611
4637
  multiDrag: r.multiDrag ?? !1,
4612
4638
  nativeDrag: r.nativeDrag ?? !0,
4613
- performSort: Va,
4614
- performTransfer: _a,
4639
+ performSort: Ua,
4640
+ performTransfer: Ha,
4615
4641
  root: r.root ?? document,
4616
- setupNode: qa,
4617
- setupNodeRemap: Ct,
4618
- reapplyDragClasses: Ba,
4619
- tearDownNode: Ya,
4620
- tearDownNodeRemap: Ga,
4621
- remapFinished: Xa,
4642
+ setupNode: Ga,
4643
+ setupNodeRemap: St,
4644
+ reapplyDragClasses: Ya,
4645
+ tearDownNode: Xa,
4646
+ tearDownNodeRemap: Wa,
4647
+ remapFinished: Za,
4622
4648
  threshold: {
4623
4649
  horizontal: 0,
4624
4650
  vertical: 0
@@ -4631,7 +4657,7 @@ function za({
4631
4657
  on: i,
4632
4658
  emit: o
4633
4659
  };
4634
- new MutationObserver(Wa).observe(e, { childList: !0 }), G.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4660
+ new MutationObserver(Qa).observe(e, { childList: !0 }), G.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
4635
4661
  var g, h;
4636
4662
  (h = (g = c(e)) == null ? void 0 : g.tearDown) == null || h.call(g);
4637
4663
  }), (p = r.plugins) == null || p.forEach((c) => {
@@ -4640,10 +4666,10 @@ function za({
4640
4666
  }), (u = r.plugins) == null || u.forEach((c) => {
4641
4667
  var g, h;
4642
4668
  (h = (g = c(e)) == null ? void 0 : g.setup) == null || h.call(g);
4643
- }), ja(e, s), un(e, !0);
4669
+ }), Ba(e, s), pn(e, !0);
4644
4670
  }
4645
- function Tt(e, n, t, r, o, i) {
4646
- const { x: s, y: d } = Me(t), l = e.el.getBoundingClientRect();
4671
+ function Ct(e, n, t, r, o, i) {
4672
+ const { x: s, y: d } = ze(t), l = e.el.getBoundingClientRect();
4647
4673
  return {
4648
4674
  affectedNodes: [],
4649
4675
  ascendingDirection: !1,
@@ -4677,16 +4703,16 @@ function Tt(e, n, t, r, o, i) {
4677
4703
  transferred: !1
4678
4704
  };
4679
4705
  }
4680
- function Va({
4706
+ function Ua({
4681
4707
  parent: e,
4682
4708
  draggedNodes: n,
4683
4709
  targetNodes: t
4684
4710
  }) {
4685
- un(e.el);
4686
- const r = n.map((l) => l.data.value), o = Oe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
4687
- ...o.filter((l) => !r.some((p) => Be(l, p)))
4711
+ pn(e.el);
4712
+ const r = n.map((l) => l.data.value), o = Pe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
4713
+ ...o.filter((l) => !r.some((p) => Ge(l, p)))
4688
4714
  ];
4689
- d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), Sn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
4715
+ d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), En(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
4690
4716
  parent: {
4691
4717
  el: e.el,
4692
4718
  data: e.data
@@ -4726,7 +4752,7 @@ function Se(e, n, t) {
4726
4752
  s !== -1 && t.selectedState.nodes.splice(s, 1);
4727
4753
  }
4728
4754
  }
4729
- function Ke(e, n, t, r, o = !1) {
4755
+ function Je(e, n, t, r, o = !1) {
4730
4756
  r.pointerSelection = o;
4731
4757
  for (const i of n)
4732
4758
  i.el.setAttribute("aria-selected", "true"), Re([i.el], e.data.config.selectedClass, !0);
@@ -4735,11 +4761,11 @@ function Ke(e, n, t, r, o = !1) {
4735
4761
  parent: e
4736
4762
  }, Ne(e, t, r);
4737
4763
  }
4738
- function Ua(e, n) {
4764
+ function _a(e, n) {
4739
4765
  const t = e.targetData.parent.data.enabledNodes[0];
4740
4766
  t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ne(e.targetData.parent, t, n) : n.selectedState || Ne(e.targetData.parent, t, n));
4741
4767
  }
4742
- function _a({
4768
+ function Ha({
4743
4769
  currentParent: e,
4744
4770
  targetParent: n,
4745
4771
  initialParent: t,
@@ -4748,14 +4774,14 @@ function _a({
4748
4774
  targetNodes: i,
4749
4775
  state: s
4750
4776
  }) {
4751
- un(t.el);
4777
+ pn(t.el);
4752
4778
  const d = r.map((g) => g.data.value), l = [
4753
- ...Oe(e.el, e.data).filter(
4754
- (g) => !d.some((h) => Be(g, h))
4779
+ ...Pe(e.el, e.data).filter(
4780
+ (g) => !d.some((h) => Ge(g, h))
4755
4781
  )
4756
- ], p = Oe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
4782
+ ], p = Pe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
4757
4783
  let c;
4758
- i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), Sn(e.el, e.data, l), Sn(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
4784
+ i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), En(e.el, e.data, l), En(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
4759
4785
  sourceParent: e,
4760
4786
  targetParent: n,
4761
4787
  initialParent: t,
@@ -4773,18 +4799,18 @@ function _a({
4773
4799
  targetNodes: i || []
4774
4800
  });
4775
4801
  }
4776
- function Oe(e, n) {
4802
+ function Pe(e, n) {
4777
4803
  return [...n.getValues(e)];
4778
4804
  }
4779
- function Sn(e, n, t) {
4805
+ function En(e, n, t) {
4780
4806
  n.setValues(t, e);
4781
4807
  }
4782
- function Ha(e, n) {
4808
+ function qa(e, n) {
4783
4809
  Ce(e.e), we = !0;
4784
4810
  const t = n.initialParent.data.config.handleEnd;
4785
4811
  t(n);
4786
4812
  }
4787
- function wt(e) {
4813
+ function Dt(e) {
4788
4814
  const n = G.get(e);
4789
4815
  n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
4790
4816
  }
@@ -4794,25 +4820,25 @@ function W(e) {
4794
4820
  function re(e) {
4795
4821
  return "synthDragging" in e && !!e.synthDragging;
4796
4822
  }
4797
- function ja(e, n) {
4798
- n.abortControllers.mainParent = rn(e, {
4799
- dragover: Je(n.config.handleParentDragover),
4823
+ function Ba(e, n) {
4824
+ n.abortControllers.mainParent = on(e, {
4825
+ dragover: en(n.config.handleParentDragover),
4800
4826
  handleParentPointerover: n.config.handleParentPointerover,
4801
- scroll: Je(n.config.handleParentScroll),
4802
- drop: Je(n.config.handleParentDrop),
4827
+ scroll: en(n.config.handleParentScroll),
4828
+ drop: en(n.config.handleParentDrop),
4803
4829
  hasNestedParent: (t) => {
4804
4830
  const r = G.get(t.target);
4805
4831
  r && (r.nestedParent = t.detail.parent);
4806
4832
  },
4807
- focus: Je(n.config.handleParentFocus)
4808
- }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = rn(
4833
+ focus: en(n.config.handleParentFocus)
4834
+ }), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = on(
4809
4835
  n.config.externalDragHandle.el,
4810
4836
  {
4811
4837
  pointerdown: (t) => {
4812
4838
  if (!n.config.externalDragHandle || !n.config.externalDragHandle.callback)
4813
4839
  return;
4814
4840
  const r = n.config.externalDragHandle.callback();
4815
- if (!hn(r)) {
4841
+ if (!fn(r)) {
4816
4842
  console.warn(
4817
4843
  "No draggable item found from external drag handle callback"
4818
4844
  );
@@ -4838,10 +4864,10 @@ function ja(e, n) {
4838
4864
  }
4839
4865
  ));
4840
4866
  }
4841
- function qa(e) {
4867
+ function Ga(e) {
4842
4868
  var t;
4843
4869
  const n = e.parent.data.config;
4844
- e.node.data.abortControllers.mainNode = rn(e.node.el, {
4870
+ e.node.data.abortControllers.mainNode = on(e.node.el, {
4845
4871
  keydown: K(n.handleNodeKeydown),
4846
4872
  dragstart: K(n.handleDragstart),
4847
4873
  dragover: K(n.handleNodeDragover),
@@ -4866,39 +4892,39 @@ function qa(e) {
4866
4892
  (i = (o = r(e.parent.el)) == null ? void 0 : o.setupNode) == null || i.call(o, e);
4867
4893
  });
4868
4894
  }
4869
- function Ct(e) {
4895
+ function St(e) {
4870
4896
  var n;
4871
4897
  ue.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4872
4898
  var r, o;
4873
4899
  (o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
4874
4900
  });
4875
4901
  }
4876
- function Ba(e, n) {
4902
+ function Ya(e, n) {
4877
4903
  if (!W(b)) return;
4878
4904
  const t = re(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
4879
4905
  b.draggedNode.el === e && Re([e], t, !0);
4880
4906
  }
4881
- function Ga(e) {
4907
+ function Wa(e) {
4882
4908
  var n;
4883
4909
  (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
4884
4910
  var r, o;
4885
4911
  (o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
4886
4912
  });
4887
4913
  }
4888
- function Ya(e) {
4914
+ function Xa(e) {
4889
4915
  var n, t, r, o, i;
4890
4916
  (n = e.parent.data.config.plugins) == null || n.forEach((s) => {
4891
4917
  var d, l;
4892
4918
  (l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
4893
4919
  }), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((i = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || i.mainNode.abort());
4894
4920
  }
4895
- function Wa(e) {
4921
+ function Qa(e) {
4896
4922
  if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
4897
4923
  return;
4898
4924
  const n = e[0].target;
4899
- !(n instanceof HTMLElement) || !G.get(n) || un(n);
4925
+ !(n instanceof HTMLElement) || !G.get(n) || pn(n);
4900
4926
  }
4901
- function un(e, n) {
4927
+ function pn(e, n) {
4902
4928
  var d;
4903
4929
  const t = G.get(e);
4904
4930
  if (!t) return;
@@ -4906,7 +4932,7 @@ function un(e, n) {
4906
4932
  const r = [], o = t.config;
4907
4933
  for (let l = 0; l < e.children.length; l++) {
4908
4934
  const p = e.children[l];
4909
- if (!hn(p) || p.id === "dnd-dragged-node-clone") continue;
4935
+ if (!fn(p) || p.id === "dnd-dragged-node-clone") continue;
4910
4936
  const u = ue.get(p);
4911
4937
  (n || !u) && o.tearDownNode({
4912
4938
  parent: {
@@ -4939,7 +4965,7 @@ function un(e, n) {
4939
4965
  index: l
4940
4966
  }
4941
4967
  );
4942
- if (!W(b) && b.activeState && Be(b.activeState.node.data.value, c.value) && Ne(
4968
+ if (!W(b) && b.activeState && Ge(b.activeState.node.data.value, c.value) && Ne(
4943
4969
  {
4944
4970
  data: t,
4945
4971
  el: e
@@ -4949,7 +4975,7 @@ function un(e, n) {
4949
4975
  data: c
4950
4976
  },
4951
4977
  b
4952
- ), W(b) && Be(b.draggedNode.data.value, c.value)) {
4978
+ ), W(b) && Ge(b.draggedNode.data.value, c.value)) {
4953
4979
  b.draggedNode.data = c, b.draggedNode.el = p;
4954
4980
  const g = b.draggedNodes.find(
4955
4981
  (h) => h.data.value === c.value
@@ -4968,7 +4994,7 @@ function un(e, n) {
4968
4994
  el: p,
4969
4995
  data: c
4970
4996
  }
4971
- }), Ct({
4997
+ }), St({
4972
4998
  parent: {
4973
4999
  el: e,
4974
5000
  data: t
@@ -4984,13 +5010,13 @@ function un(e, n) {
4984
5010
  (u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
4985
5011
  });
4986
5012
  }
4987
- function Xa() {
5013
+ function Za() {
4988
5014
  b.remapJustFinished = !0, "draggedNode" in b && (b.affectedNodes = []);
4989
5015
  }
4990
- function Qa(e) {
5016
+ function Ka(e) {
4991
5017
  return !!e.targetData.parent.data.config.nativeDrag;
4992
5018
  }
4993
- function Za(e) {
5019
+ function Ja(e) {
4994
5020
  var n;
4995
5021
  if (e.parent.data.config.multiDrag) {
4996
5022
  if (b.selectedState)
@@ -5003,14 +5029,14 @@ function Za(e) {
5003
5029
  } else return [e.node];
5004
5030
  return [];
5005
5031
  }
5006
- function Ka(e) {
5007
- W(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0, vn && clearTimeout(vn), vn = setTimeout(() => {
5032
+ function ei(e) {
5033
+ W(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0, yn && clearTimeout(yn), yn = setTimeout(() => {
5008
5034
  b.preventEnter = !1, b.emit("scrollEnded", b);
5009
5035
  }, 100)));
5010
5036
  }
5011
- function Ja(e, n) {
5037
+ function ni(e, n) {
5012
5038
  const t = e.targetData.parent.data.config;
5013
- if (!t.nativeDrag || !Qa(e) || !Dt({
5039
+ if (!t.nativeDrag || !Ka(e) || !Et({
5014
5040
  x: e.e.clientX,
5015
5041
  y: e.e.clientY,
5016
5042
  node: e.targetData.node,
@@ -5024,11 +5050,11 @@ function Ja(e, n) {
5024
5050
  node: e.targetData.node
5025
5051
  });
5026
5052
  r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
5027
- const o = ti(e, r);
5053
+ const o = oi(e, r);
5028
5054
  if (t.onDragstart) {
5029
5055
  const i = {
5030
5056
  parent: e.targetData.parent,
5031
- values: Oe(
5057
+ values: Pe(
5032
5058
  e.targetData.parent.el,
5033
5059
  e.targetData.parent.data
5034
5060
  ),
@@ -5040,20 +5066,20 @@ function Ja(e, n) {
5040
5066
  t.onDragstart(i);
5041
5067
  }
5042
5068
  }
5043
- function ei(e, n) {
5069
+ function ti(e, n) {
5044
5070
  var d, l;
5045
5071
  if (Ce(e.e), n.pointerDown = {
5046
5072
  parent: e.targetData.parent,
5047
5073
  node: e.targetData.node,
5048
5074
  validated: !1
5049
- }, !Dt({
5075
+ }, !Et({
5050
5076
  x: e.e.clientX,
5051
5077
  y: e.e.clientY,
5052
5078
  node: e.targetData.node,
5053
5079
  config: e.targetData.parent.data.config
5054
5080
  }))
5055
5081
  return;
5056
- n.pointerDown.validated = !0, gi(e, n, e.targetData.node);
5082
+ n.pointerDown.validated = !0, fi(e, n, e.targetData.node);
5057
5083
  const t = e.targetData.parent.data;
5058
5084
  let r = [e.targetData.node];
5059
5085
  const o = e.e.ctrlKey || e.e.metaKey, i = e.e.shiftKey, s = e.targetData.node;
@@ -5062,7 +5088,7 @@ function ei(e, n) {
5062
5088
  (u) => u.el === s.el
5063
5089
  ) === -1 ? r = [...n.selectedState.nodes, s] : r = n.selectedState.nodes.filter(
5064
5090
  (u) => u.el !== s.el
5065
- ) : r = [s], Ke(
5091
+ ) : r = [s], Je(
5066
5092
  e.targetData.parent,
5067
5093
  r,
5068
5094
  e.targetData.node,
@@ -5091,7 +5117,7 @@ function ei(e, n) {
5091
5117
  else
5092
5118
  for (let u = 0; u <= s.data.index; u++)
5093
5119
  r.push(p[u]);
5094
- Ke(
5120
+ Je(
5095
5121
  e.targetData.parent,
5096
5122
  r,
5097
5123
  e.targetData.node,
@@ -5102,13 +5128,13 @@ function ei(e, n) {
5102
5128
  }
5103
5129
  (l = (d = n.selectedState) == null ? void 0 : d.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
5104
5130
  (u) => u.el === e.targetData.node.el
5105
- ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Se(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && yt() ? r.push(...n.selectedState.nodes) : Se(n.selectedState.nodes, e.targetData.parent, n), Ke(
5131
+ ) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Se(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && Tt() ? r.push(...n.selectedState.nodes) : Se(n.selectedState.nodes, e.targetData.parent, n), Je(
5106
5132
  e.targetData.parent,
5107
5133
  r,
5108
5134
  e.targetData.node,
5109
5135
  n,
5110
5136
  !0
5111
- )) : Ke(
5137
+ )) : Je(
5112
5138
  e.targetData.parent,
5113
5139
  [e.targetData.node],
5114
5140
  e.targetData.node,
@@ -5116,7 +5142,7 @@ function ei(e, n) {
5116
5142
  !0
5117
5143
  );
5118
5144
  }
5119
- function ni(e, n, t, r = !1) {
5145
+ function ri(e, n, t, r = !1) {
5120
5146
  Re(
5121
5147
  n.map((o) => o.el),
5122
5148
  r ? t.synthDraggingClass : t.draggingClass
@@ -5136,10 +5162,10 @@ function ni(e, n, t, r = !1) {
5136
5162
  );
5137
5163
  });
5138
5164
  }
5139
- function ti(e, n) {
5165
+ function oi(e, n) {
5140
5166
  Ce(e.e);
5141
- const t = xt(
5142
- Tt(
5167
+ const t = wt(
5168
+ Ct(
5143
5169
  e.targetData.node,
5144
5170
  e.targetData.parent,
5145
5171
  e.e,
@@ -5191,7 +5217,7 @@ function ti(e, n) {
5191
5217
  }
5192
5218
  return t;
5193
5219
  }
5194
- function Dt({
5220
+ function Et({
5195
5221
  x: e,
5196
5222
  y: n,
5197
5223
  node: t,
@@ -5207,22 +5233,22 @@ function Dt({
5207
5233
  if (i === s || s.contains(i)) return !0;
5208
5234
  return !1;
5209
5235
  }
5210
- function ri(e) {
5236
+ function ai(e) {
5211
5237
  }
5212
- function oi(e) {
5213
- e.detail.targetData.parent.el === e.detail.state.currentParent.el ? Et(e.detail, e.detail.state) : pn(e.detail, e.detail.state);
5238
+ function ii(e) {
5239
+ e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : gn(e.detail, e.detail.state);
5214
5240
  }
5215
- function ai(e, n) {
5241
+ function li(e, n) {
5216
5242
  const t = e.targetData.parent.data.config;
5217
5243
  t.nativeDrag && (Ce(e.e), we = !0, t.handleEnd(n));
5218
5244
  }
5219
- function ii(e) {
5245
+ function si(e) {
5220
5246
  e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !1);
5221
5247
  }
5222
- function li(e) {
5248
+ function di(e) {
5223
5249
  e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !0);
5224
5250
  }
5225
- function si(e, n) {
5251
+ function ci(e, n) {
5226
5252
  const t = e.targetData.parent.data.config;
5227
5253
  if (t.nativeDrag) {
5228
5254
  if (Y(e.e), Ce(e.e), we) {
@@ -5232,7 +5258,7 @@ function si(e, n) {
5232
5258
  t.handleEnd(n);
5233
5259
  }
5234
5260
  }
5235
- function di(e, n) {
5261
+ function ui(e, n) {
5236
5262
  var r;
5237
5263
  if (!re(n)) return;
5238
5264
  if (Y(e.e), we) {
@@ -5242,32 +5268,32 @@ function di(e, n) {
5242
5268
  const t = (r = G.get(n.initialParent.el)) == null ? void 0 : r.config;
5243
5269
  t != null && t.onDragend && t.onDragend({
5244
5270
  parent: n.currentParent,
5245
- values: Oe(n.currentParent.el, n.currentParent.data),
5271
+ values: Pe(n.currentParent.el, n.currentParent.data),
5246
5272
  draggedNode: n.draggedNode,
5247
5273
  draggedNodes: n.draggedNodes,
5248
5274
  state: n
5249
5275
  }), t == null || t.handleEnd(n);
5250
5276
  }
5251
- function ci(e) {
5277
+ function pi(e) {
5252
5278
  var u, c, g, h, f;
5253
5279
  e.draggedNode && (e.draggedNode.el.draggable = !0);
5254
5280
  const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = re(e), o = (u = G.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
5255
- re(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), En(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5281
+ re(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Nn(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
5256
5282
  Te(n, i), Te(n, s), Te(n, d);
5257
5283
  }), Se(e.draggedNodes, e.currentParent, e), Ne(e.currentParent, void 0, e);
5258
5284
  const p = { ...e };
5259
5285
  (f = o == null ? void 0 : o.onDragend) == null || f.call(o, {
5260
5286
  parent: p.currentParent,
5261
- values: Oe(
5287
+ values: Pe(
5262
5288
  p.currentParent.el,
5263
5289
  p.currentParent.data
5264
5290
  ),
5265
5291
  draggedNode: p.draggedNode,
5266
5292
  draggedNodes: p.draggedNodes,
5267
5293
  state: p
5268
- }), e.emit("dragEnded", p), Ia();
5294
+ }), e.emit("dragEnded", p), Fa();
5269
5295
  }
5270
- function ui(e, n) {
5296
+ function gi(e, n) {
5271
5297
  Ce(e.e), !n.pointerSelection && n.selectedState && Se(n.selectedState.nodes, e.targetData.parent, n);
5272
5298
  const t = e.targetData.parent.data.config;
5273
5299
  n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, Te(
@@ -5275,7 +5301,7 @@ function ui(e, n) {
5275
5301
  t.longPressClass
5276
5302
  ), W(n) && t.handleEnd(n);
5277
5303
  }
5278
- function pi(e, n, t, r, o, i) {
5304
+ function hi(e, n, t, r, o, i) {
5279
5305
  var f, x;
5280
5306
  const s = n.data.config;
5281
5307
  let d, l;
@@ -5346,8 +5372,8 @@ function pi(e, n, t, r, o, i) {
5346
5372
  rootScrollWidth: (f = document.scrollingElement) == null ? void 0 : f.scrollWidth,
5347
5373
  rootScrollHeight: (x = document.scrollingElement) == null ? void 0 : x.scrollHeight
5348
5374
  };
5349
- return xt({
5350
- ...Tt(
5375
+ return wt({
5376
+ ...Ct(
5351
5377
  e,
5352
5378
  n,
5353
5379
  t,
@@ -5358,16 +5384,16 @@ function pi(e, n, t, r, o, i) {
5358
5384
  ...g
5359
5385
  });
5360
5386
  }
5361
- function gi(e, n, t) {
5387
+ function fi(e, n, t) {
5362
5388
  const r = e.targetData.parent.data.config;
5363
5389
  n.longPressTimeout = setTimeout(() => {
5364
5390
  n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Re([t.el], r.longPressClass), Y(e.e));
5365
5391
  }, r.longPressDuration || 1e3);
5366
5392
  }
5367
- function En(e, n = !0, t = !0) {
5393
+ function Nn(e, n = !0, t = !0) {
5368
5394
  n && (e.frameIdX !== void 0 && (cancelAnimationFrame(e.frameIdX), e.frameIdX = void 0), e.lastScrollDirectionX = void 0), t && (e.frameIdY !== void 0 && (cancelAnimationFrame(e.frameIdY), e.frameIdY = void 0), e.lastScrollDirectionY = void 0), !e.frameIdX && !e.frameIdY && (e.preventEnter = !1);
5369
5395
  }
5370
- function St(e, n = !1) {
5396
+ function Nt(e, n = !1) {
5371
5397
  var u;
5372
5398
  const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, i = e.startTop ?? 0, s = window.scrollX ?? 0, d = window.scrollY ?? 0, l = t - o + s, p = r - i + d;
5373
5399
  e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", Te(
@@ -5375,12 +5401,12 @@ function St(e, n = !1) {
5375
5401
  (u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
5376
5402
  ));
5377
5403
  }
5378
- function Xn(e, n, t = !1) {
5379
- const r = Me(e);
5380
- n.coordinates.x = r.x, n.coordinates.y = r.y, St(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
5381
- re(n) && gn(n.coordinates, e, n);
5404
+ function Zn(e, n, t = !1) {
5405
+ const r = ze(e);
5406
+ n.coordinates.x = r.x, n.coordinates.y = r.y, Nt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
5407
+ re(n) && hn(n.coordinates, e, n);
5382
5408
  }, 16);
5383
- const o = Ci(r);
5409
+ const o = Si(r);
5384
5410
  if (!o) {
5385
5411
  document.dispatchEvent(
5386
5412
  new CustomEvent("handleRootPointerover", {
@@ -5407,22 +5433,22 @@ function Xn(e, n, t = !1) {
5407
5433
  })
5408
5434
  );
5409
5435
  }
5410
- function hi(e, n) {
5436
+ function mi(e, n) {
5411
5437
  var i;
5412
5438
  if (!e.targetData.parent.data.config.nativeDrag) return;
5413
- const { x: r, y: o } = Me(e.e);
5414
- n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && gn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? Et(e, n) : pn(e, n);
5439
+ const { x: r, y: o } = ze(e.e);
5440
+ n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && hn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? kt(e, n) : gn(e, n);
5415
5441
  }
5416
- function fi(e, n) {
5442
+ function bi(e, n) {
5417
5443
  if (!e.targetData.parent.data.config.nativeDrag) return;
5418
5444
  Y(e.e), Ce(e.e);
5419
- const { x: r, y: o } = Me(e.e);
5420
- W(n) && gn({ x: r, y: o }, e.e, n), pn(e, n);
5445
+ const { x: r, y: o } = ze(e.e);
5446
+ W(n) && hn({ x: r, y: o }, e.e, n), gn(e, n);
5421
5447
  }
5422
- function mi(e) {
5423
- e.detail.targetData.parent.el !== e.detail.state.currentParent.el && pn(e.detail, e.detail.state);
5448
+ function vi(e) {
5449
+ e.detail.targetData.parent.el !== e.detail.state.currentParent.el && gn(e.detail, e.detail.state);
5424
5450
  }
5425
- function bi({
5451
+ function yi({
5426
5452
  currentParent: e,
5427
5453
  targetParent: n,
5428
5454
  initialParent: t,
@@ -5440,13 +5466,13 @@ function bi({
5440
5466
  o
5441
5467
  ) : !(!i.group || i.group !== s.group);
5442
5468
  }
5443
- function vi(e, n) {
5469
+ function xi(e, n) {
5444
5470
  Y(e.e);
5445
5471
  }
5446
- function yi(e, n) {
5472
+ function Ti(e, n) {
5447
5473
  Y(e.e);
5448
5474
  }
5449
- function xi(e, n, t, r) {
5475
+ function wi(e, n, t, r) {
5450
5476
  var u;
5451
5477
  if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
5452
5478
  return !1;
@@ -5480,9 +5506,9 @@ function xi(e, n, t, r) {
5480
5506
  }
5481
5507
  return !1;
5482
5508
  }
5483
- function Et(e, n) {
5484
- const { x: t, y: r } = Me(e.e);
5485
- if (!xi(e, n, t, r))
5509
+ function kt(e, n) {
5510
+ const { x: t, y: r } = ze(e.e);
5511
+ if (!wi(e, n, t, r))
5486
5512
  return;
5487
5513
  const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
5488
5514
  n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
@@ -5522,8 +5548,8 @@ function K(e) {
5522
5548
  );
5523
5549
  };
5524
5550
  }
5525
- function pn(e, n) {
5526
- Y(e.e), bi({
5551
+ function gn(e, n) {
5552
+ Y(e.e), yi({
5527
5553
  currentParent: n.currentParent,
5528
5554
  targetParent: e.targetData.parent,
5529
5555
  initialParent: n.initialParent,
@@ -5539,7 +5565,7 @@ function pn(e, n) {
5539
5565
  targetNodes: "node" in e.targetData ? [e.targetData.node] : []
5540
5566
  }), n.currentParent = e.targetData.parent, n.transferred = !0);
5541
5567
  }
5542
- function Je(e) {
5568
+ function en(e) {
5543
5569
  function n(t) {
5544
5570
  const r = G.get(t);
5545
5571
  if (r)
@@ -5567,13 +5593,13 @@ function Re(e, n, t = !1) {
5567
5593
  ue.set(o, i);
5568
5594
  }
5569
5595
  for (const o of e) {
5570
- const i = ue.get(o), s = Ti(o, n, i, t);
5596
+ const i = ue.get(o), s = Ci(o, n, i, t);
5571
5597
  s && r(o, s);
5572
5598
  }
5573
5599
  }
5574
- function Ti(e, n, t, r = !1) {
5600
+ function Ci(e, n, t, r = !1) {
5575
5601
  if (!n) return;
5576
- const o = vt(n);
5602
+ const o = xt(n);
5577
5603
  if (!o.length) return;
5578
5604
  if (!t) {
5579
5605
  e.classList.add(...o);
@@ -5590,10 +5616,10 @@ function Ti(e, n, t, r = !1) {
5590
5616
  }
5591
5617
  function Te(e, n) {
5592
5618
  if (!n) return;
5593
- const t = vt(n);
5619
+ const t = xt(n);
5594
5620
  if (t.length)
5595
5621
  for (const r of e) {
5596
- if (!hn(r)) {
5622
+ if (!fn(r)) {
5597
5623
  r.classList.remove(...t);
5598
5624
  continue;
5599
5625
  }
@@ -5603,7 +5629,7 @@ function Te(e, n) {
5603
5629
  o.privateClasses.includes(i) || r.classList.remove(i);
5604
5630
  }
5605
5631
  }
5606
- function Qn(e, n, t, r, o) {
5632
+ function Kn(e, n, t, r, o) {
5607
5633
  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, h = s ? r.left : r.top, f = s ? t.overflowX : t.overflowY;
5608
5634
  if (d) {
5609
5635
  const x = e[l], y = e[p], D = x > 0, T = x + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
@@ -5627,7 +5653,7 @@ function Qn(e, n, t, r, o) {
5627
5653
  }
5628
5654
  return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
5629
5655
  }
5630
- function wi(e, n, t, r) {
5656
+ function Di(e, n, t, r) {
5631
5657
  if (!W(t) || !t.draggedNode)
5632
5658
  return;
5633
5659
  t.preventEnter = !0;
@@ -5643,30 +5669,30 @@ function wi(e, n, t, r) {
5643
5669
  t[l] = void 0, t[d] = void 0;
5644
5670
  return;
5645
5671
  }
5646
- e[u] += s * i, re(t) && St(t), t[l] = requestAnimationFrame(p);
5672
+ e[u] += s * i, re(t) && Nt(t), t[l] = requestAnimationFrame(p);
5647
5673
  };
5648
5674
  t[l] = requestAnimationFrame(p);
5649
5675
  }
5650
- function Zn(e, n, t) {
5676
+ function Jn(e, n, t) {
5651
5677
  const r = e.getBoundingClientRect();
5652
5678
  return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
5653
5679
  }
5654
- function gn(e, n, t) {
5680
+ function hn(e, n, t) {
5655
5681
  if (!W(t) || !t.draggedNode)
5656
5682
  return;
5657
- En(t);
5683
+ Nn(t);
5658
5684
  const { x: r, y: o } = e;
5659
5685
  let i = !1;
5660
5686
  const s = (l, p, u) => {
5661
- wi(u, n, t, { axis: l, direction: p }), i = !0;
5687
+ Di(u, n, t, { axis: l, direction: p }), i = !0;
5662
5688
  }, d = (l) => {
5663
- const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Qn(l, n, p, u, {
5689
+ const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
5664
5690
  axis: "x",
5665
5691
  state: t
5666
- }), g = Qn(l, n, p, u, { axis: "y" });
5692
+ }), g = Kn(l, n, p, u, { axis: "y" });
5667
5693
  (c.left || c.right) && (t.lastScrollContainerX = l, s("x", c.right ? "positive" : "negative", l)), (g.up || g.down) && (t.lastScrollContainerY = l, s("y", g.down ? "positive" : "negative", l));
5668
5694
  };
5669
- if (t.lastScrollContainerX && Zn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !i && t.lastScrollContainerY && Zn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !i) {
5695
+ if (t.lastScrollContainerX && Jn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !i && t.lastScrollContainerY && Jn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !i) {
5670
5696
  let l = document.elementFromPoint(r, o);
5671
5697
  for (; l && !(i && t.lastScrollContainerX && t.lastScrollContainerY); )
5672
5698
  l instanceof HTMLElement && d(l), l = l.parentElement;
@@ -5675,11 +5701,11 @@ function gn(e, n, t) {
5675
5701
  const l = document.scrollingElement;
5676
5702
  l instanceof HTMLElement && d(l);
5677
5703
  }
5678
- i || En(t);
5704
+ i || Nn(t);
5679
5705
  }
5680
- function Ci(e) {
5706
+ function Si(e) {
5681
5707
  let n = document.elementFromPoint(e.x, e.y);
5682
- if (!hn(n)) return;
5708
+ if (!fn(n)) return;
5683
5709
  let t, r = !0;
5684
5710
  for (; n && r; ) {
5685
5711
  if (ue.has(n) || G.has(n)) {
@@ -5712,10 +5738,10 @@ function Ci(e) {
5712
5738
  } : void 0;
5713
5739
  }
5714
5740
  }
5715
- function hn(e) {
5741
+ function fn(e) {
5716
5742
  return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
5717
5743
  }
5718
- function rn(e, n) {
5744
+ function on(e, n) {
5719
5745
  const t = new AbortController();
5720
5746
  for (const r in n) {
5721
5747
  const o = n[r];
@@ -5727,48 +5753,48 @@ function rn(e, n) {
5727
5753
  }
5728
5754
  return t;
5729
5755
  }
5730
- function Di(e) {
5756
+ function Ei(e) {
5731
5757
  if (e instanceof HTMLElement) return e;
5732
5758
  if ("current" in e && e.current instanceof HTMLElement)
5733
5759
  return e.current;
5734
5760
  console.warn("Invalid parent element", e);
5735
5761
  }
5736
- function Si(e, n) {
5737
- const t = Di(e);
5762
+ function Ni(e, n) {
5763
+ const t = Ei(e);
5738
5764
  t && n(t);
5739
5765
  }
5740
- var on = /* @__PURE__ */ new WeakMap();
5741
- function Ei(e) {
5742
- const n = on.get(e);
5766
+ var an = /* @__PURE__ */ new WeakMap();
5767
+ function ki(e) {
5768
+ const n = an.get(e);
5743
5769
  return n ? n[0] : (console.warn("No values found for parent element"), []);
5744
5770
  }
5745
- function Ni(e, n) {
5746
- const t = on.get(n);
5747
- t && t[1](e), on.set(n, [e, t[1]]);
5771
+ function Ai(e, n) {
5772
+ const t = an.get(n);
5773
+ t && t[1](e), an.set(n, [e, t[1]]);
5748
5774
  }
5749
- function ki(e, n) {
5775
+ function $i(e, n) {
5750
5776
  return (t) => {
5751
- on.set(t, n), za({ parent: t, getValues: Ei, setValues: Ni, config: e });
5777
+ an.set(t, n), ja({ parent: t, getValues: ki, setValues: Ai, config: e });
5752
5778
  };
5753
5779
  }
5754
- function Kn(e) {
5755
- Ln && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
5780
+ function et(e) {
5781
+ On && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
5756
5782
  const { parent: t, state: r, ...o } = n;
5757
- Si(t, ki(o, r));
5783
+ Ni(t, $i(o, r));
5758
5784
  }));
5759
5785
  }
5760
- function $i(e, n = {}) {
5786
+ function Ii(e, n = {}) {
5761
5787
  const t = Ie(null), [r, o] = z(e);
5762
5788
  function i(s = {}) {
5763
- Kn({ parent: t, state: [r, o], ...s });
5789
+ et({ parent: t, state: [r, o], ...s });
5764
5790
  }
5765
5791
  return Ee(() => {
5766
- Kn({ parent: t, state: [r, o], ...n });
5792
+ et({ parent: t, state: [r, o], ...n });
5767
5793
  }, [r]), Ee(() => () => {
5768
- t.current && wt(t.current);
5794
+ t.current && Dt(t.current);
5769
5795
  }, []), [t, r, o, i];
5770
5796
  }
5771
- const Jn = {
5797
+ const nt = {
5772
5798
  border: {
5773
5799
  selected: {
5774
5800
  color: E.palette.blue.B400
@@ -5777,7 +5803,7 @@ const Jn = {
5777
5803
  color: E.palette.neutral.N40
5778
5804
  }
5779
5805
  }
5780
- }, Ai = w.ul`
5806
+ }, Ri = w.ul`
5781
5807
  list-style: none;
5782
5808
  padding: 0;
5783
5809
  margin: 0;
@@ -5786,15 +5812,15 @@ const Jn = {
5786
5812
  gap: 12px;
5787
5813
  width: 100%;
5788
5814
  justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
5789
- `, Ii = w.li`
5815
+ `, Fi = w.li`
5790
5816
  & > div {
5791
5817
  border: 1px solid
5792
5818
  ${({ theme: e, $active: n }) => {
5793
5819
  var t, r, o, i;
5794
- return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : r.color) || Jn.border.selected.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.clear) == null ? void 0 : i.color) || Jn.border.clear.color;
5820
+ return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : r.color) || nt.border.selected.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.clear) == null ? void 0 : i.color) || nt.border.clear.color;
5795
5821
  }};
5796
5822
  }
5797
- `, yn = "dnd:draggingLabel", et = (e) => {
5823
+ `, xn = "dnd:draggingLabel", tt = (e) => {
5798
5824
  const {
5799
5825
  emptyMessage: n,
5800
5826
  id: t,
@@ -5804,7 +5830,7 @@ const Jn = {
5804
5830
  highlightFirst: s,
5805
5831
  onMove: d,
5806
5832
  locked: l = !1
5807
- } = e, p = V.useRef(null), u = l ? [p, i] : $i(i, { group: r }), [c, g] = u, [h, f] = V.useState(
5833
+ } = e, p = V.useRef(null), u = l ? [p, i] : Ii(i, { group: r }), [c, g] = u, [h, f] = V.useState(
5808
5834
  null
5809
5835
  ), x = V.useRef(i);
5810
5836
  V.useEffect(() => {
@@ -5813,11 +5839,11 @@ const Jn = {
5813
5839
  const I = C.detail ?? null;
5814
5840
  f(I);
5815
5841
  };
5816
- return window.addEventListener(yn, N), () => window.removeEventListener(yn, N);
5842
+ return window.addEventListener(xn, N), () => window.removeEventListener(xn, N);
5817
5843
  }, [l]);
5818
5844
  const y = V.useCallback((N) => {
5819
5845
  l || window.dispatchEvent(
5820
- new CustomEvent(yn, { detail: N })
5846
+ new CustomEvent(xn, { detail: N })
5821
5847
  );
5822
5848
  }, [l]), D = (N) => {
5823
5849
  var k;
@@ -5854,7 +5880,7 @@ const Jn = {
5854
5880
  height: "-webkit-fill-available",
5855
5881
  spacing: "wide",
5856
5882
  children: /* @__PURE__ */ a(
5857
- Ai,
5883
+ Ri,
5858
5884
  {
5859
5885
  ref: c,
5860
5886
  onPointerDownCapture: l ? void 0 : D,
@@ -5872,19 +5898,19 @@ const Jn = {
5872
5898
  width: "100%",
5873
5899
  alignItems: "center",
5874
5900
  justifyContent: "center",
5875
- children: /* @__PURE__ */ a(A, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
5901
+ children: /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
5876
5902
  }
5877
5903
  ) : g.map((N, C) => {
5878
5904
  const I = !l && h === N;
5879
5905
  return /* @__PURE__ */ a(
5880
- Ii,
5906
+ Fi,
5881
5907
  {
5882
5908
  className: `dnd-item${I ? " is-dragging" : ""}`,
5883
5909
  "data-label": N,
5884
5910
  "data-first": !!(s && C === 0) || void 0,
5885
5911
  $active: I,
5886
5912
  children: /* @__PURE__ */ a(oe, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
5887
- A,
5913
+ $,
5888
5914
  {
5889
5915
  type: "title",
5890
5916
  appearance: I ? "primary" : "dark",
@@ -5902,7 +5928,7 @@ const Jn = {
5902
5928
  )
5903
5929
  }
5904
5930
  );
5905
- }, Dl = (e) => {
5931
+ }, Nl = (e) => {
5906
5932
  const { group: n = "clients", left: t, right: r, onMove: o, locked: i = !1 } = e, s = (d) => {
5907
5933
  i || o == null || o(d);
5908
5934
  };
@@ -5915,7 +5941,7 @@ const Jn = {
5915
5941
  gap: "40px",
5916
5942
  children: [
5917
5943
  /* @__PURE__ */ a(
5918
- et,
5944
+ tt,
5919
5945
  {
5920
5946
  group: n,
5921
5947
  highlightFirst: t.highlightFirst,
@@ -5928,7 +5954,7 @@ const Jn = {
5928
5954
  }
5929
5955
  ),
5930
5956
  /* @__PURE__ */ a(
5931
- et,
5957
+ tt,
5932
5958
  {
5933
5959
  group: n,
5934
5960
  highlightFirst: r.highlightFirst,
@@ -5943,7 +5969,7 @@ const Jn = {
5943
5969
  ]
5944
5970
  }
5945
5971
  );
5946
- }, Ri = w.div`
5972
+ }, Li = w.div`
5947
5973
  & > button {
5948
5974
  height: 66px;
5949
5975
  min-width: 66px;
@@ -5961,7 +5987,7 @@ const Jn = {
5961
5987
  }
5962
5988
  }
5963
5989
  }
5964
- `, Sl = (e) => /* @__PURE__ */ a(Ri, { children: /* @__PURE__ */ a(q, { ...e }) }), Fi = w.div`
5990
+ `, kl = (e) => /* @__PURE__ */ a(Li, { children: /* @__PURE__ */ a(q, { ...e }) }), Oi = w.div`
5965
5991
  display: flex;
5966
5992
  justify-content: space-between;
5967
5993
  align-items: center;
@@ -5990,14 +6016,14 @@ const Jn = {
5990
6016
  }
5991
6017
  }
5992
6018
  }
5993
- `, El = (e) => {
6019
+ `, Al = (e) => {
5994
6020
  const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: i } = e;
5995
- return /* @__PURE__ */ m(Fi, { children: [
6021
+ return /* @__PURE__ */ m(Oi, { children: [
5996
6022
  /* @__PURE__ */ a(
5997
6023
  q,
5998
6024
  {
5999
6025
  ...e,
6000
- iconBefore: /* @__PURE__ */ a(zt, {}),
6026
+ iconBefore: /* @__PURE__ */ a(jt, {}),
6001
6027
  variant: "none",
6002
6028
  onClick: n,
6003
6029
  children: i.back,
@@ -6008,7 +6034,7 @@ const Jn = {
6008
6034
  q,
6009
6035
  {
6010
6036
  ...e,
6011
- iconBefore: /* @__PURE__ */ a(Vt, {}),
6037
+ iconBefore: /* @__PURE__ */ a(Ut, {}),
6012
6038
  variant: "none",
6013
6039
  onClick: t,
6014
6040
  children: i.next,
@@ -6054,7 +6080,7 @@ const Jn = {
6054
6080
  hover: E.palette.neutral.N30
6055
6081
  }
6056
6082
  }
6057
- }, Li = w.ul`
6083
+ }, Pi = w.ul`
6058
6084
  display: flex;
6059
6085
  flex-direction: column;
6060
6086
  padding: 4px 0px;
@@ -6105,7 +6131,7 @@ const Jn = {
6105
6131
  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) || ce.option.background.hover;
6106
6132
  }};
6107
6133
  }
6108
- `, Oi = (e) => {
6134
+ `, Mi = (e) => {
6109
6135
  const { children: n, onOptionClick: t, options: r, maxItems: o } = e, i = (s) => {
6110
6136
  try {
6111
6137
  if (s.target.closest('input[type="checkbox"]'))
@@ -6122,7 +6148,7 @@ const Jn = {
6122
6148
  }
6123
6149
  };
6124
6150
  return /* @__PURE__ */ a(
6125
- Li,
6151
+ Pi,
6126
6152
  {
6127
6153
  $maxItems: o,
6128
6154
  $totalOptions: r == null ? void 0 : r.length,
@@ -6130,17 +6156,17 @@ const Jn = {
6130
6156
  children: n
6131
6157
  }
6132
6158
  );
6133
- }, Pi = w.div`
6159
+ }, zi = w.div`
6134
6160
  cursor: ${({ $disabled: e }) => e && "not-allowed"};
6135
6161
  width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
6136
6162
  position: relative;
6137
- `, Mi = w.div`
6163
+ `, Vi = w.div`
6138
6164
  display: flex;
6139
6165
  align-items: center;
6140
6166
  margin-bottom: 4px;
6141
6167
  gap: 4px;
6142
6168
  pointer-events: ${({ $disabled: e }) => e && "none"};
6143
- `, zi = w.div`
6169
+ `, ji = w.div`
6144
6170
  display: grid;
6145
6171
  height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
6146
6172
  padding: 8px 16px;
@@ -6164,7 +6190,7 @@ const Jn = {
6164
6190
  const o = ((s = (i = r == null ? void 0 : r.input) == null ? void 0 : i.border) == null ? void 0 : s.color) || ce.border.color;
6165
6191
  return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
6166
6192
  }};
6167
- `, Vi = w.input`
6193
+ `, Ui = w.input`
6168
6194
  display: ${({ $inputWithData: e }) => e ? "none" : "block"};
6169
6195
  outline: none;
6170
6196
  padding: 0;
@@ -6222,31 +6248,31 @@ const Jn = {
6222
6248
  &:-webkit-autofill {
6223
6249
  -webkit-background-clip: text;
6224
6250
  }
6225
- `, Ui = w.div`
6251
+ `, _i = w.div`
6226
6252
  display: flex;
6227
6253
  justify-content: flex-end;
6228
6254
  transition: ease;
6229
6255
  transition-duration: 500ms;
6230
6256
  transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
6231
- `, _i = (e) => e === "compact" ? "medium" : "large";
6232
- function nt(e, n) {
6257
+ `, Hi = (e) => e === "compact" ? "medium" : "large";
6258
+ function rt(e, n) {
6233
6259
  const t = e.find((r) => r.value === n);
6234
6260
  return t ? t.label : n;
6235
6261
  }
6236
- const Hi = (e) => {
6262
+ const qi = (e) => {
6237
6263
  var o, i;
6238
- const { message: n } = e, t = In($n), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || ce.message.appearance;
6264
+ const { message: n } = e, t = Rn($n), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || ce.message.appearance;
6239
6265
  return /* @__PURE__ */ m(v, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
6240
6266
  /* @__PURE__ */ a(
6241
6267
  M,
6242
6268
  {
6243
6269
  appearance: r,
6244
- icon: /* @__PURE__ */ a(_t, {}),
6270
+ icon: /* @__PURE__ */ a(Ht, {}),
6245
6271
  size: "14px"
6246
6272
  }
6247
6273
  ),
6248
6274
  /* @__PURE__ */ a(
6249
- A,
6275
+ $,
6250
6276
  {
6251
6277
  type: "body",
6252
6278
  size: "small",
@@ -6256,8 +6282,8 @@ const Hi = (e) => {
6256
6282
  }
6257
6283
  )
6258
6284
  ] });
6259
- }, ji = Wt((e, n) => {
6260
- var $e, ve;
6285
+ }, Bi = Qt((e, n) => {
6286
+ var Ae, ve;
6261
6287
  const {
6262
6288
  displayList: t,
6263
6289
  disabled: r,
@@ -6282,55 +6308,55 @@ const Hi = (e) => {
6282
6308
  onKeyUp: I,
6283
6309
  onBlur: F,
6284
6310
  onChange: k,
6285
- onClick: H,
6311
+ onClick: _,
6286
6312
  onFocus: ae,
6287
6313
  onOptionClick: he,
6288
6314
  onCheckboxChange: fe,
6289
6315
  handleClear: pe
6290
- } = e, ie = In($n), me = ((ve = ($e = ie == null ? void 0 : ie.input) == null ? void 0 : $e.required) == null ? void 0 : ve.appearance) || ce.required.appearance, be = f && !r, P = D || y === "" ? "" : nt(g, y), de = lt(
6291
- () => g.filter((_) => S.includes(_.id)),
6316
+ } = e, ie = Rn($n), me = ((ve = (Ae = ie == null ? void 0 : ie.input) == null ? void 0 : Ae.required) == null ? void 0 : ve.appearance) || ce.required.appearance, be = f && !r, P = D || y === "" ? "" : rt(g, y), de = dt(
6317
+ () => g.filter((U) => S.includes(U.id)),
6292
6318
  [g, S]
6293
- ), ke = (_, L) => {
6294
- _.stopPropagation(), fe({
6319
+ ), ke = (U, L) => {
6320
+ U.stopPropagation(), fe({
6295
6321
  target: { checked: !1, value: L }
6296
6322
  });
6297
6323
  };
6298
- return /* @__PURE__ */ m(Pi, { $fullwidth: i, $disabled: r, ref: n, children: [
6324
+ return /* @__PURE__ */ m(zi, { $fullwidth: i, $disabled: r, ref: n, children: [
6299
6325
  l && /* @__PURE__ */ m(
6300
- Mi,
6326
+ Vi,
6301
6327
  {
6302
6328
  $alignItems: "center",
6303
6329
  $disabled: r,
6304
6330
  $wrap: "wrap",
6305
6331
  children: [
6306
6332
  /* @__PURE__ */ a(
6307
- Gt,
6333
+ Wt,
6308
6334
  {
6309
6335
  htmlFor: s,
6310
6336
  focused: o,
6311
6337
  invalid: d,
6312
6338
  margin: "0px 0px 0px 16px",
6313
- size: _i(x),
6339
+ size: Hi(x),
6314
6340
  disabled: r,
6315
6341
  children: l
6316
6342
  }
6317
6343
  ),
6318
- be && /* @__PURE__ */ a(A, { appearance: me, size: "small", type: "body", children: "(Requerido)" })
6344
+ be && /* @__PURE__ */ a($, { appearance: me, size: "small", type: "body", children: "(Requerido)" })
6319
6345
  ]
6320
6346
  }
6321
6347
  ),
6322
6348
  /* @__PURE__ */ m(
6323
- zi,
6349
+ ji,
6324
6350
  {
6325
6351
  $disabled: r,
6326
6352
  $focused: o,
6327
6353
  $invalid: d,
6328
- onClick: N ? void 0 : H,
6354
+ onClick: N ? void 0 : _,
6329
6355
  $value: y,
6330
6356
  $size: x,
6331
6357
  children: [
6332
6358
  /* @__PURE__ */ a(
6333
- Vi,
6359
+ Ui,
6334
6360
  {
6335
6361
  $inputWithData: !!y,
6336
6362
  autoComplete: "off",
@@ -6346,8 +6372,8 @@ const Hi = (e) => {
6346
6372
  readOnly: !N,
6347
6373
  onFocus: ae,
6348
6374
  onBlur: F,
6349
- onChange: (_) => k(c, _.target.value),
6350
- onClick: N ? H : void 0,
6375
+ onChange: (U) => k(c, U.target.value),
6376
+ onClick: N ? _ : void 0,
6351
6377
  onKeyUp: I
6352
6378
  }
6353
6379
  ),
@@ -6359,33 +6385,33 @@ const Hi = (e) => {
6359
6385
  alignItems: "center",
6360
6386
  justifyContent: "space-between",
6361
6387
  children: [
6362
- /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: C && !r && (D ? de.map((_) => /* @__PURE__ */ a(
6388
+ /* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: C && !r && (D ? de.map((U) => /* @__PURE__ */ a(
6363
6389
  De,
6364
6390
  {
6365
6391
  appearance: "gray",
6366
- label: _.label,
6392
+ label: U.label,
6367
6393
  removable: !0,
6368
6394
  displayIcon: !1,
6369
- onClose: (L) => ke(L, _.id)
6395
+ onClose: (L) => ke(L, U.id)
6370
6396
  },
6371
- _.id
6397
+ U.id
6372
6398
  )) : (y ?? "") !== "" && /* @__PURE__ */ a(
6373
6399
  De,
6374
6400
  {
6375
6401
  appearance: "gray",
6376
- label: nt(g, y),
6402
+ label: rt(g, y),
6377
6403
  removable: !0,
6378
6404
  displayIcon: !1,
6379
- onClose: (_) => {
6380
- _.stopPropagation(), pe();
6405
+ onClose: (U) => {
6406
+ U.stopPropagation(), pe();
6381
6407
  }
6382
6408
  }
6383
6409
  )) }),
6384
- T && /* @__PURE__ */ a(Ui, { $displayList: t, children: /* @__PURE__ */ a(
6410
+ T && /* @__PURE__ */ a(_i, { $displayList: t, children: /* @__PURE__ */ a(
6385
6411
  M,
6386
6412
  {
6387
6413
  appearance: "dark",
6388
- icon: /* @__PURE__ */ a(Ut, {}),
6414
+ icon: /* @__PURE__ */ a(_t, {}),
6389
6415
  spacing: "narrow",
6390
6416
  disabled: r
6391
6417
  }
@@ -6396,28 +6422,28 @@ const Hi = (e) => {
6396
6422
  ]
6397
6423
  }
6398
6424
  ),
6399
- d && /* @__PURE__ */ a(Hi, { message: u }),
6425
+ d && /* @__PURE__ */ a(qi, { message: u }),
6400
6426
  t && !r && /* @__PURE__ */ a(
6401
- Oi,
6427
+ Mi,
6402
6428
  {
6403
6429
  maxItems: p,
6404
6430
  onOptionClick: he,
6405
6431
  options: g,
6406
- children: g.map((_) => /* @__PURE__ */ a(
6407
- Yt,
6432
+ children: g.map((U) => /* @__PURE__ */ a(
6433
+ Xt,
6408
6434
  {
6409
- id: _.id,
6410
- label: _.label,
6411
- checked: S.includes(_.id),
6435
+ id: U.id,
6436
+ label: U.label,
6437
+ checked: S.includes(U.id),
6412
6438
  onCheckboxChange: fe,
6413
6439
  picker: D
6414
6440
  },
6415
- _.id
6441
+ U.id
6416
6442
  ))
6417
6443
  }
6418
6444
  )
6419
6445
  ] });
6420
- }), qi = (e) => {
6446
+ }), Gi = (e) => {
6421
6447
  const {
6422
6448
  disabled: n = !1,
6423
6449
  fullwidth: t = !1,
@@ -6442,7 +6468,7 @@ const Hi = (e) => {
6442
6468
  showChevron: C = !0,
6443
6469
  editable: I = !1,
6444
6470
  clearable: F = !0
6445
- } = e, [k, H] = z(!1), [ae, he] = z(!1), [fe, pe] = z([]), ie = Ie(null);
6471
+ } = e, [k, _] = z(!1), [ae, he] = z(!1), [fe, pe] = z([]), ie = Ie(null);
6446
6472
  Ee(() => {
6447
6473
  if (N) {
6448
6474
  const L = T ? T.split(",").map((X) => X.trim()) : [];
@@ -6450,11 +6476,11 @@ const Hi = (e) => {
6450
6476
  }
6451
6477
  }, [T, N]);
6452
6478
  function me() {
6453
- u(l, ""), pe([]), H(!1);
6479
+ u(l, ""), pe([]), _(!1);
6454
6480
  }
6455
6481
  function be(L) {
6456
6482
  if (!n) {
6457
- H(!k);
6483
+ _(!k);
6458
6484
  try {
6459
6485
  c && c(L);
6460
6486
  } catch (X) {
@@ -6462,8 +6488,8 @@ const Hi = (e) => {
6462
6488
  }
6463
6489
  }
6464
6490
  }
6465
- const P = Xt((L) => {
6466
- ie.current && L.target && !ie.current.contains(L.target) && H(!1);
6491
+ const P = Zt((L) => {
6492
+ ie.current && L.target && !ie.current.contains(L.target) && _(!1);
6467
6493
  }, []);
6468
6494
  function de(L) {
6469
6495
  try {
@@ -6473,15 +6499,15 @@ const Hi = (e) => {
6473
6499
  }
6474
6500
  }
6475
6501
  function ke(L) {
6476
- H(!1);
6502
+ _(!1);
6477
6503
  try {
6478
6504
  u && u(l, L);
6479
6505
  } catch (X) {
6480
6506
  console.error(`Error when changing value using callback. ${X}`);
6481
6507
  }
6482
6508
  }
6483
- function $e(L) {
6484
- L.key === "Escape" && H(!1), H(!k);
6509
+ function Ae(L) {
6510
+ L.key === "Escape" && _(!1), _(!k);
6485
6511
  try {
6486
6512
  h && h(L);
6487
6513
  } catch (X) {
@@ -6489,18 +6515,18 @@ const Hi = (e) => {
6489
6515
  }
6490
6516
  }
6491
6517
  function ve(L) {
6492
- const { value: X, checked: On } = L.target;
6493
- pe((ze) => {
6494
- const R = On ? [...ze, X] : ze.filter((j) => j !== X);
6518
+ const { value: X, checked: Pn } = L.target;
6519
+ pe((Ve) => {
6520
+ const R = Pn ? [...Ve, X] : Ve.filter((H) => H !== X);
6495
6521
  return u(l, R.join(",")), R;
6496
6522
  });
6497
6523
  }
6498
6524
  Ee(() => (document.addEventListener("click", P), () => {
6499
6525
  document.removeEventListener("click", P);
6500
6526
  }), [P]);
6501
- const _ = lt(() => F || N ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, N]);
6527
+ const U = dt(() => F || N ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, N]);
6502
6528
  return /* @__PURE__ */ a(
6503
- ji,
6529
+ Bi,
6504
6530
  {
6505
6531
  ref: ie,
6506
6532
  disabled: n,
@@ -6513,7 +6539,7 @@ const Hi = (e) => {
6513
6539
  maxItems: s,
6514
6540
  message: d,
6515
6541
  name: l,
6516
- options: _,
6542
+ options: U,
6517
6543
  placeholder: x,
6518
6544
  required: y,
6519
6545
  size: D,
@@ -6529,11 +6555,11 @@ const Hi = (e) => {
6529
6555
  onClick: be,
6530
6556
  onFocus: de,
6531
6557
  onOptionClick: ke,
6532
- onKeyUp: $e,
6558
+ onKeyUp: Ae,
6533
6559
  onCheckboxChange: ve
6534
6560
  }
6535
6561
  );
6536
- }, Nl = (e) => {
6562
+ }, $l = (e) => {
6537
6563
  const {
6538
6564
  disabled: n = !1,
6539
6565
  fullwidth: t = !1,
@@ -6551,7 +6577,7 @@ const Hi = (e) => {
6551
6577
  values: f
6552
6578
  } = e;
6553
6579
  return /* @__PURE__ */ a(
6554
- qi,
6580
+ Gi,
6555
6581
  {
6556
6582
  disabled: n,
6557
6583
  fullwidth: t,
@@ -6570,22 +6596,31 @@ const Hi = (e) => {
6570
6596
  picker: !0
6571
6597
  }
6572
6598
  );
6573
- }, kl = (e) => Object.values(e).flat(), $l = (e, n) => Object.fromEntries(
6574
- Object.entries(e).map(([t, r]) => [
6575
- t,
6576
- r.map((o, i, s) => n(o, i, s, t))
6577
- ])
6578
- ), Ve = /* @__PURE__ */ new Map(), Bi = (e, n) => Ve.get(`${n}:${e}`), Gi = (e, n, t) => {
6599
+ }, Il = (e) => Object.values(e).flat(), Rl = (e, n) => {
6600
+ const t = Oe(e);
6601
+ return Object.fromEntries(
6602
+ Object.entries(t).map(([r, o]) => [r, o.map(n)])
6603
+ );
6604
+ }, Yi = (e) => Object.entries(e).map(([n, t]) => ({
6605
+ ConditionGroupId: n,
6606
+ conditionsThatEstablishesTheDecision: tn(t)
6607
+ })), Fl = (e) => {
6608
+ const n = Oe(e), t = {
6609
+ ...e,
6610
+ conditionGroups: Yi(n)
6611
+ };
6612
+ return delete t.conditionsThatEstablishesTheDecision, t;
6613
+ }, je = /* @__PURE__ */ new Map(), Wi = (e, n) => je.get(`${n}:${e}`), Xi = (e, n, t) => {
6579
6614
  const r = `${n}:${e}`;
6580
- if (Ve.set(r, t), Ve.size > 1e3) {
6581
- const o = Ve.keys().next().value;
6582
- o !== void 0 && Ve.delete(o);
6583
- }
6584
- }, tt = /* @__PURE__ */ new Map(), Yi = 1e3, Wi = (e) => {
6585
- const n = Date.now(), t = tt.get(e) || 0;
6586
- return n - t < Yi ? !0 : (tt.set(e, n), !1);
6587
- }, Xi = (e) => {
6588
- const n = Kt(e);
6615
+ if (je.set(r, t), je.size > 1e3) {
6616
+ const o = je.keys().next().value;
6617
+ o !== void 0 && je.delete(o);
6618
+ }
6619
+ }, ot = /* @__PURE__ */ new Map(), Qi = 1e3, Zi = (e) => {
6620
+ const n = Date.now(), t = ot.get(e) || 0;
6621
+ return n - t < Qi ? !0 : (ot.set(e, n), !1);
6622
+ }, Ki = (e) => {
6623
+ const n = er(e);
6589
6624
  return {
6590
6625
  spa: "es",
6591
6626
  eng: "en",
@@ -6594,14 +6629,14 @@ const Hi = (e) => {
6594
6629
  ita: "it",
6595
6630
  por: "pt"
6596
6631
  }[n] || "en";
6597
- }, Qi = async (e, n, { url: t, apiKey: r }) => {
6598
- const o = `${n}:${e}`, i = Bi(e, n);
6632
+ }, Ji = async (e, n, { url: t, apiKey: r }) => {
6633
+ const o = `${n}:${e}`, i = Wi(e, n);
6599
6634
  if (i) return i;
6600
- if (Wi(o))
6635
+ if (Zi(o))
6601
6636
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
6602
- const s = Xi(e);
6637
+ const s = Ki(e);
6603
6638
  try {
6604
- const { data: d } = await Zt.post(
6639
+ const { data: d } = await Jt.post(
6605
6640
  t,
6606
6641
  {
6607
6642
  q: e,
@@ -6615,25 +6650,25 @@ const Hi = (e) => {
6615
6650
  }
6616
6651
  }
6617
6652
  ), l = (d == null ? void 0 : d.translatedText) || e;
6618
- return Gi(e, n, l), l;
6653
+ return Xi(e, n, l), l;
6619
6654
  } catch (d) {
6620
6655
  return console.warn(`[Translation] Failed for: "${e}"`, d), e;
6621
6656
  }
6622
- }, Zi = (e) => typeof e == "string" && e.trim().length > 0, rt = async (e, n, t) => {
6657
+ }, el = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
6623
6658
  const r = await Promise.all(
6624
6659
  Object.entries(e).map(async ([o, i]) => {
6625
- if (Zi(i)) {
6626
- const s = await Qi(i, n, t);
6660
+ if (el(i)) {
6661
+ const s = await Ji(i, n, t);
6627
6662
  return [o, s];
6628
6663
  } else if (Array.isArray(i)) {
6629
6664
  const s = await Promise.all(
6630
6665
  i.map(
6631
- async (d) => typeof d == "object" && d !== null ? await rt(d, n, t) : d
6666
+ async (d) => typeof d == "object" && d !== null ? await at(d, n, t) : d
6632
6667
  )
6633
6668
  );
6634
6669
  return [o, s];
6635
6670
  } else if (typeof i == "object" && i !== null) {
6636
- const s = await rt(i, n, t);
6671
+ const s = await at(i, n, t);
6637
6672
  return [o, s];
6638
6673
  } else
6639
6674
  return [o, i];
@@ -6642,38 +6677,40 @@ const Hi = (e) => {
6642
6677
  return Object.fromEntries(r);
6643
6678
  };
6644
6679
  export {
6645
- El as BackAndNextButton,
6646
- We as BusinessRuleCard,
6647
- ut as BusinessRuleCardNew,
6648
- Rn as BusinessRuleView,
6649
- gt as BusinessRuleViewNew,
6650
- ul as BusinessRules,
6651
- gl as BusinessRulesNew,
6652
- pl as BusinessRulesWithGroup,
6653
- Nl as Checkpicker,
6654
- Dl as DragAndDropBoxes,
6655
- et as DraggableList,
6656
- Ea as DropdownMenu,
6657
- Cl as DropdownMenuContainer,
6680
+ Al as BackAndNextButton,
6681
+ Xe as BusinessRuleCard,
6682
+ gt as BusinessRuleCardNew,
6683
+ Fn as BusinessRuleView,
6684
+ ft as BusinessRuleViewNew,
6685
+ hl as BusinessRules,
6686
+ ml as BusinessRulesNew,
6687
+ fl as BusinessRulesWithGroup,
6688
+ $l as Checkpicker,
6689
+ Nl as DragAndDropBoxes,
6690
+ tt as DraggableList,
6691
+ ka as DropdownMenu,
6692
+ El as DropdownMenuContainer,
6658
6693
  ge as EValueHowToSetUp,
6659
- hl as Filter,
6660
- fl as FilterModal,
6661
- ml as FormFilter,
6662
- dt as ModalRules,
6663
- ya as RulesForm,
6664
- Sl as SendButton,
6665
- Uo as buildEsConditionSentence,
6666
- la as convertRangeToString,
6667
- pt as filterByGroup,
6668
- kl as flatFromGroups,
6669
- bl as formatDecisionForBackend,
6670
- tn as getConditionsByGroup,
6671
- $l as mapByGroup,
6672
- vl as parseRangeFromString,
6673
- yl as revertSortedDataSampleSwitchPlaces,
6674
- xl as revertSortedDataSwitchPlaces,
6675
- Tl as sortDisplayDataSampleSwitchPlaces,
6676
- wl as sortDisplayDataSwitchPlaces,
6677
- rt as translateObject,
6678
- Qi as translateText
6694
+ bl as Filter,
6695
+ vl as FilterModal,
6696
+ yl as FormFilter,
6697
+ ut as ModalRules,
6698
+ Ta as RulesForm,
6699
+ kl as SendButton,
6700
+ _o as buildEsConditionSentence,
6701
+ da as convertRangeToString,
6702
+ ht as filterByGroup,
6703
+ Il as flatFromGroups,
6704
+ xl as formatDecisionForBackend,
6705
+ Oe as getConditionsByGroupNew,
6706
+ Yi as groupsRecordToArrayNew,
6707
+ Rl as mapByGroupNew,
6708
+ Fl as normalizeDecisionToNewShape,
6709
+ Tl as parseRangeFromString,
6710
+ wl as revertSortedDataSampleSwitchPlaces,
6711
+ Cl as revertSortedDataSwitchPlaces,
6712
+ Dl as sortDisplayDataSampleSwitchPlaces,
6713
+ Sl as sortDisplayDataSwitchPlaces,
6714
+ at as translateObject,
6715
+ Ji as translateText
6679
6716
  };