@isettingkit/business-rules 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +1287 -1953
  2. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -1,22 +1,22 @@
1
- import { jsx as i, jsxs as g, Fragment as O } from "react/jsx-runtime";
2
- import { MdOutlineDelete as Je, MdClear as Ye, MdAdd as pe, MdExpandLess as Et, MdExpandMore as Xe, MdClose as St, MdOutlineFilterAltOff as Ze, MdOutlineFilterAlt as et, MdChevronRight as Dt, MdArrowRight as kt } from "react-icons/md";
3
- import { inube as C, Stack as b, Divider as L, Icon as M, Text as k, SkeletonLine as j, useMediaQuery as H, Blanket as tt, Button as P, Grid as he, Box as Rt, Tag as X, SkeletonIcon as At, OptionList as $t, Checkpicker as Ot, Toggle as nt, Checkbox as Ft, Date as Ue } from "@inubekit/inubekit";
4
- import N, { keyframes as rt, ThemeContext as It } from "styled-components";
5
- import { ValueDataType as U, ValueHowToSetUp as z, DecisionConditionRender as Ve } from "@isettingkit/input";
6
- import { DecisionViewConditionRenderer as be, DecisionViewConditionRendererNew as ae } from "@isettingkit/view";
7
- import { createPortal as at } from "react-dom";
8
- import * as v from "react";
9
- import oe, { useState as V, useRef as le, useEffect as ke, useContext as Lt } from "react";
10
- import { useFormik as Mt } from "formik";
11
- import { string as Re, mixed as it, object as se, number as we, lazy as _e, date as Pe } from "yup";
12
- import Ut from "axios";
13
- import { franc as Vt } from "franc-min";
14
- const _t = N.div`
1
+ import { jsx as r, jsxs as h, Fragment as E } from "react/jsx-runtime";
2
+ import { MdOutlineDelete as Te, MdClear as ye, MdAdd as J, MdExpandLess as Me, MdExpandMore as we, MdClose as Le, MdOutlineFilterAltOff as Ce, MdOutlineFilterAlt as De, MdChevronRight as ze, MdArrowRight as Ue } from "react-icons/md";
3
+ import { inube as x, Stack as g, Divider as F, Icon as R, Text as w, SkeletonLine as V, useMediaQuery as H, Blanket as Se, Button as U, Grid as X, Box as Ve, Tag as q, SkeletonIcon as Be, OptionList as He, Checkpicker as je, Toggle as ke, Checkbox as _e, Date as ue } from "@inubekit/inubekit";
4
+ import T, { keyframes as Ne, ThemeContext as qe } from "styled-components";
5
+ import { ValueDataType as O, ValueHowToSetUp as B, DecisionConditionRender as pe } from "@isettingkit/input";
6
+ import { DecisionViewConditionRenderer as Z, DecisionViewConditionRendererNew as Q } from "@isettingkit/view";
7
+ import { createPortal as Ee } from "react-dom";
8
+ import W, { useState as M, useRef as Y, useEffect as oe, useContext as Pe } from "react";
9
+ import { useFormik as Ge } from "formik";
10
+ import { string as ie, mixed as $e, object as K, number as ne, lazy as he, date as ge } from "yup";
11
+ import { Link as Qe, useLocation as We } from "react-router-dom";
12
+ import Ye from "axios";
13
+ import { franc as Ke } from "franc-min";
14
+ const Je = T.div`
15
15
  border-radius: 8px;
16
16
  border: 1px solid
17
17
  ${({ theme: e }) => {
18
- var t, n;
19
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
18
+ var n, t;
19
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
20
20
  }};
21
21
  box-sizing: border-box;
22
22
  display: flex;
@@ -27,7 +27,7 @@ const _t = N.div`
27
27
  height: 100%;
28
28
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
29
29
  `;
30
- N.div`
30
+ T.div`
31
31
  width: 100%;
32
32
  height: 100%;
33
33
  overflow-y: auto;
@@ -46,51 +46,51 @@ N.div`
46
46
  border-radius: 8px;
47
47
  }
48
48
  `;
49
- const Ae = (e) => {
50
- const { children: t, controls: n = !0, handleDelete: r, id: a } = e;
51
- return /* @__PURE__ */ i(_t, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
- t,
53
- n && /* @__PURE__ */ g(O, { children: [
54
- /* @__PURE__ */ i(L, {}),
55
- /* @__PURE__ */ i(b, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
56
- M,
49
+ const le = (e) => {
50
+ const { children: n, controls: t = !0, handleDelete: a, id: o } = e;
51
+ return /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "16px", padding: "12px 16px", children: [
52
+ n,
53
+ t && /* @__PURE__ */ h(E, { children: [
54
+ /* @__PURE__ */ r(F, {}),
55
+ /* @__PURE__ */ r(g, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ r(
56
+ R,
57
57
  {
58
58
  cursorHover: !0,
59
59
  appearance: "danger",
60
60
  size: "24px",
61
- icon: /* @__PURE__ */ i(Je, {}),
61
+ icon: /* @__PURE__ */ r(Te, {}),
62
62
  onClick: () => {
63
- r(a);
63
+ a(o);
64
64
  }
65
65
  }
66
66
  ) })
67
67
  ] })
68
68
  ] }) });
69
- }, Pt = (e) => e.value, Bt = (e) => e.value, jt = (e) => e.value, zt = (e) => ({
69
+ }, Xe = (e) => e.value, Ze = (e) => e.value, en = (e) => e.value, nn = (e) => ({
70
70
  from: e.from ?? "",
71
71
  to: e.to ?? ""
72
- }), Ht = (e) => e.value, qt = (e) => e.value, Wt = (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 Gt = {
75
- [A.LIST_OF_VALUES]: Bt,
76
- [A.LIST_OF_VALUES_MULTI]: jt,
77
- [A.RANGE]: zt,
78
- [A.GREATER_THAN]: Ht,
79
- [A.LESS_THAN]: qt,
80
- [A.EQUAL]: Wt
81
- }, Z = (e) => {
82
- const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = Gt[e == null ? void 0 : e.howToSetTheDecision] || Pt;
83
- return n && r(t) || t || void 0;
84
- }, Be = N.div`
72
+ }), tn = (e) => e.value, an = (e) => e.value, rn = (e) => e.value;
73
+ var S = /* @__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))(S || {});
74
+ const on = {
75
+ [S.LIST_OF_VALUES]: Ze,
76
+ [S.LIST_OF_VALUES_MULTI]: en,
77
+ [S.RANGE]: nn,
78
+ [S.GREATER_THAN]: tn,
79
+ [S.LESS_THAN]: an,
80
+ [S.EQUAL]: rn
81
+ }, P = (e) => {
82
+ const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), a = on[e == null ? void 0 : e.howToSetTheDecision] || Xe;
83
+ return t && a(n) || n || void 0;
84
+ }, be = T.div`
85
85
  & > div {
86
86
  border-radius: 8px;
87
87
  border: 1px solid
88
88
  ${({ theme: e }) => {
89
- var t, n;
90
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
89
+ var n, t;
90
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
91
91
  }};
92
92
  }
93
- `, je = N.div`
93
+ `, me = T.div`
94
94
  width: 100%;
95
95
  height: 100%;
96
96
  overflow-y: auto;
@@ -108,167 +108,167 @@ const Gt = {
108
108
  background-color: #ebecf0;
109
109
  border-radius: 8px;
110
110
  }
111
- `, Kt = (e) => {
111
+ `, ln = (e) => {
112
112
  const {
113
- conditionsAlignment: t,
114
- decision: n,
115
- decisionDateElement: r,
116
- decisionMapper: a,
117
- loading: o,
118
- skeleton: c,
113
+ conditionsAlignment: n,
114
+ decision: t,
115
+ decisionDateElement: a,
116
+ decisionMapper: o,
117
+ loading: i,
118
+ skeleton: u,
119
119
  terms: l,
120
- textValues: s,
121
- visibleConditions: d
120
+ textValues: d,
121
+ visibleConditions: s
122
122
  } = e;
123
- return o ? /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
124
- /* @__PURE__ */ i(b, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
125
- be,
123
+ return i ? /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
124
+ /* @__PURE__ */ r(g, { direction: "column", alignItems: "center", children: /* @__PURE__ */ r(
125
+ Z,
126
126
  {
127
- element: a,
128
- valueData: Z(
129
- a
127
+ element: o,
128
+ valueData: P(
129
+ o
130
130
  ),
131
131
  type: "decision"
132
132
  }
133
- ) }, n.ruleName),
134
- /* @__PURE__ */ i(L, { dashed: !0 }),
135
- /* @__PURE__ */ i(je, { children: /* @__PURE__ */ g(
136
- b,
133
+ ) }, t.ruleName),
134
+ /* @__PURE__ */ r(F, { dashed: !0 }),
135
+ /* @__PURE__ */ r(me, { children: /* @__PURE__ */ h(
136
+ g,
137
137
  {
138
138
  direction: "column",
139
139
  gap: "12px",
140
- justifyContent: t,
140
+ justifyContent: n,
141
141
  height: "203px",
142
142
  children: [
143
- /* @__PURE__ */ i(
144
- k,
143
+ /* @__PURE__ */ r(
144
+ w,
145
145
  {
146
146
  type: "label",
147
147
  size: "large",
148
148
  appearance: "dark",
149
149
  weight: "bold",
150
150
  textAlign: "center",
151
- children: s.factsThatConditionIt
151
+ children: d.factsThatConditionIt
152
152
  }
153
153
  ),
154
- d.map((p) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ i(b, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
155
- be,
154
+ s.map((p) => /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r(g, { direction: "column", padding: "8px", children: /* @__PURE__ */ r(
155
+ Z,
156
156
  {
157
157
  element: { ...p, value: p.value },
158
- valueData: Z(
158
+ valueData: P(
159
159
  p
160
160
  )
161
161
  }
162
162
  ) }) }, p.conditionName)),
163
- l && /* @__PURE__ */ g(O, { children: [
164
- /* @__PURE__ */ i(L, { dashed: !0 }),
165
- r && /* @__PURE__ */ i(
166
- be,
163
+ l && /* @__PURE__ */ h(E, { children: [
164
+ /* @__PURE__ */ r(F, { dashed: !0 }),
165
+ a && /* @__PURE__ */ r(
166
+ Z,
167
167
  {
168
- element: r.element,
169
- valueData: r.valueData,
168
+ element: a.element,
169
+ valueData: a.valueData,
170
170
  type: "decision"
171
171
  },
172
- s.terms
172
+ d.terms
173
173
  )
174
174
  ] })
175
175
  ]
176
176
  }
177
177
  ) })
178
- ] }) : /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
179
- /* @__PURE__ */ g(b, { direction: "column", alignItems: "center", gap: "4px", children: [
180
- /* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
181
- /* @__PURE__ */ i(j, { animated: !0, width: "85px" })
178
+ ] }) : /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
179
+ /* @__PURE__ */ h(g, { direction: "column", alignItems: "center", gap: "4px", children: [
180
+ /* @__PURE__ */ r(V, { animated: !0, width: "180px" }),
181
+ /* @__PURE__ */ r(V, { animated: !0, width: "85px" })
182
182
  ] }, "loading"),
183
- /* @__PURE__ */ g(b, { direction: "column", gap: "12px", alignItems: "center", children: [
184
- /* @__PURE__ */ i(L, { dashed: !0 }),
185
- /* @__PURE__ */ i(j, { animated: !0, width: "150px" })
183
+ /* @__PURE__ */ h(g, { direction: "column", gap: "12px", alignItems: "center", children: [
184
+ /* @__PURE__ */ r(F, { dashed: !0 }),
185
+ /* @__PURE__ */ r(V, { animated: !0, width: "150px" })
186
186
  ] }),
187
- /* @__PURE__ */ i(je, { children: /* @__PURE__ */ i(
188
- b,
187
+ /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(
188
+ g,
189
189
  {
190
190
  direction: "column",
191
191
  gap: "12px",
192
192
  justifyContent: "space-between",
193
193
  height: "203px",
194
- children: c.map((p, u) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ g(
195
- b,
194
+ children: u.map((p, c) => /* @__PURE__ */ r(be, { children: /* @__PURE__ */ h(
195
+ g,
196
196
  {
197
197
  direction: "column",
198
198
  gap: "12px",
199
199
  alignItems: "start",
200
200
  padding: "8px",
201
201
  children: [
202
- /* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
203
- /* @__PURE__ */ i(j, { animated: !0, width: "85px" })
202
+ /* @__PURE__ */ r(V, { animated: !0, width: "180px" }),
203
+ /* @__PURE__ */ r(V, { animated: !0, width: "85px" })
204
204
  ]
205
205
  }
206
- ) }, `condition-${u}`))
206
+ ) }, `condition-${c}`))
207
207
  }
208
208
  ) })
209
209
  ] });
210
- }, ot = (e) => {
211
- var h;
212
- const { decision: t, loading: n = !1, textValues: r } = e, a = !!(t != null && t.effectiveFrom), o = !!(t != null && t.validUntil), c = a && o ? {
210
+ }, Ae = (e) => {
211
+ var m;
212
+ const { decision: n, loading: t = !1, textValues: a } = e, o = !!(n != null && n.effectiveFrom), i = !!(n != null && n.validUntil), u = o && i ? {
213
213
  element: {
214
- labelName: r == null ? void 0 : r.terms,
215
- value: String(t.effectiveFrom),
216
- howToSetTheDecision: z.RANGE,
217
- decisionDataType: U.DATE
214
+ labelName: a == null ? void 0 : a.terms,
215
+ value: String(n.effectiveFrom),
216
+ howToSetTheDecision: B.RANGE,
217
+ decisionDataType: O.DATE
218
218
  },
219
- valueData: Z({
220
- labelName: r == null ? void 0 : r.terms,
219
+ valueData: P({
220
+ labelName: a == null ? void 0 : a.terms,
221
221
  value: {
222
- from: String(t.effectiveFrom),
223
- to: String(t.validUntil)
222
+ from: String(n.effectiveFrom),
223
+ to: String(n.validUntil)
224
224
  },
225
- howToSetTheDecision: z.RANGE,
226
- decisionDataType: U.DATE
225
+ howToSetTheDecision: B.RANGE,
226
+ decisionDataType: O.DATE
227
227
  })
228
- } : a && !o ? {
228
+ } : o && !i ? {
229
229
  element: {
230
- labelName: r == null ? void 0 : r.terms,
231
- value: String(t.effectiveFrom),
232
- howToSetTheDecision: z.EQUAL,
233
- decisionDataType: U.DATE
230
+ labelName: a == null ? void 0 : a.terms,
231
+ value: String(n.effectiveFrom),
232
+ howToSetTheDecision: B.EQUAL,
233
+ decisionDataType: O.DATE
234
234
  },
235
- valueData: Z({
236
- labelName: r == null ? void 0 : r.terms,
237
- value: String(t.effectiveFrom),
238
- howToSetTheDecision: z.EQUAL,
239
- decisionDataType: U.DATE
235
+ valueData: P({
236
+ labelName: a == null ? void 0 : a.terms,
237
+ value: String(n.effectiveFrom),
238
+ howToSetTheDecision: B.EQUAL,
239
+ decisionDataType: O.DATE
240
240
  })
241
- } : null, l = t ? {
242
- labelName: t.labelName || "",
243
- decisionDataType: t.decisionDataType || "alphabetical",
244
- value: Z(t),
245
- howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
246
- } : null, s = ((h = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : h.filter(
247
- (m) => !m.hidden
248
- )) || [], d = Array.from({ length: 5 }), p = !!(!n && t && r && l), u = s.length < 2 ? "start" : "space-between";
249
- return /* @__PURE__ */ i(
250
- Kt,
241
+ } : null, l = n ? {
242
+ labelName: n.labelName || "",
243
+ decisionDataType: n.decisionDataType || "alphabetical",
244
+ value: P(n),
245
+ howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
246
+ } : null, d = ((m = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : m.filter(
247
+ (b) => !b.hidden
248
+ )) || [], s = Array.from({ length: 5 }), p = !!(!t && n && a && l), c = d.length < 2 ? "start" : "space-between";
249
+ return /* @__PURE__ */ r(
250
+ ln,
251
251
  {
252
- conditionsAlignment: u,
253
- decision: t,
254
- decisionDateElement: c,
252
+ conditionsAlignment: c,
253
+ decision: n,
254
+ decisionDateElement: u,
255
255
  decisionMapper: l,
256
256
  loading: p,
257
- skeleton: d,
258
- terms: !!(r != null && r.terms),
259
- textValues: r,
260
- visibleConditions: s
257
+ skeleton: s,
258
+ terms: !!(a != null && a.terms),
259
+ textValues: a,
260
+ visibleConditions: d
261
261
  }
262
262
  );
263
- }, Qt = N.div`
263
+ }, dn = T.div`
264
264
  position: relative;
265
265
  & > div {
266
266
  padding: 24px 16px;
267
267
  }
268
- `, Jt = N.div`
268
+ `, sn = T.div`
269
269
  background-color: ${({ theme: e }) => {
270
- var t, n;
271
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || C.palette.neutral.N0;
270
+ var n, t;
271
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || x.palette.neutral.N0;
272
272
  }};
273
273
  max-width: 450px;
274
274
  max-height: 90vh;
@@ -296,24 +296,24 @@ const Gt = {
296
296
  background-color: #ebecf0;
297
297
  border-radius: 8px;
298
298
  }
299
- `, lt = (e) => {
300
- const { children: t, portalId: n, onCloseModal: r, title: a } = e, o = document.getElementById(n);
301
- if (!o)
299
+ `, Ie = (e) => {
300
+ const { children: n, portalId: t, onCloseModal: a, title: o } = e, i = document.getElementById(t);
301
+ if (!i)
302
302
  throw new Error(
303
303
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
304
304
  );
305
- const c = H("(max-width: 400px)");
306
- return at(
307
- /* @__PURE__ */ i(Qt, { smallScreen: c, children: /* @__PURE__ */ i(tt, { children: /* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "24px", children: [
308
- /* @__PURE__ */ i(b, { direction: "column", gap: "24px", children: /* @__PURE__ */ g(b, { alignItems: "center", justifyContent: "space-between", children: [
309
- /* @__PURE__ */ i(k, { type: "title", size: "large", appearance: "dark", weight: "bold", children: a }),
310
- /* @__PURE__ */ i(Ye, { size: "24px", cursor: "pointer", onClick: r })
305
+ const u = H("(max-width: 400px)");
306
+ return Ee(
307
+ /* @__PURE__ */ r(dn, { smallScreen: u, children: /* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(sn, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "24px", children: [
308
+ /* @__PURE__ */ r(g, { direction: "column", gap: "24px", children: /* @__PURE__ */ h(g, { alignItems: "center", justifyContent: "space-between", children: [
309
+ /* @__PURE__ */ r(w, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
310
+ /* @__PURE__ */ r(ye, { size: "24px", cursor: "pointer", onClick: a })
311
311
  ] }) }),
312
- t
312
+ n
313
313
  ] }) }) }) }),
314
- o
314
+ i
315
315
  );
316
- }, Yt = rt`
316
+ }, cn = Ne`
317
317
  from {
318
318
  opacity: 0;
319
319
  transform: translateY(20px);
@@ -323,12 +323,12 @@ const Gt = {
323
323
  transform: translateY(0);
324
324
  }
325
325
  `;
326
- N.div`
326
+ T.div`
327
327
  border-radius: 8px;
328
328
  border: 1px solid
329
329
  ${({ theme: e }) => {
330
- var t, n;
331
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
330
+ var n, t;
331
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
332
332
  }};
333
333
  box-sizing: border-box;
334
334
  display: flex;
@@ -337,37 +337,41 @@ N.div`
337
337
  height: 100%;
338
338
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
339
339
  `;
340
- N.div`
340
+ T.div`
341
341
  & > div {
342
342
  border-radius: 8px;
343
343
  border: 1px solid
344
344
  ${({ theme: e }) => {
345
- var t, n;
346
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
345
+ var n, t;
346
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
347
347
  }};
348
348
  }
349
349
  `;
350
- const st = N.div`
350
+ const un = T.div`
351
351
  & > div {
352
- box-shadow: 0px 2px 3px 0px
353
- ${({ theme: e }) => {
354
- var t, n;
355
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutralAlpha) == null ? void 0 : n.N700A) || C.palette.neutralAlpha.N30A;
352
+ background-color: ${({ theme: e }) => {
353
+ var n, t;
354
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || x.palette.neutral.N10;
356
355
  }};
357
- cursor: pointer;
356
+ justify-content: center;
358
357
  }
359
- `, ge = N.div`
358
+ min-height: 350px;
359
+ width: 100%;
360
+ height: 100%;
361
+ padding-bottom: 12px;
362
+ cursor: pointer;
363
+ `, de = T.div`
360
364
  width: 100%;
361
365
  height: 100%;
362
366
  & > div {
363
- animation: ${Yt} 600ms ease-out;
367
+ animation: ${cn} 600ms ease-out;
364
368
  }
365
- `, Xt = N.div`
369
+ `, pn = T.div`
366
370
  & > div > div {
367
371
  border-radius: 8px;
368
372
  box-sizing: border-box;
369
373
  }
370
- `, Zt = N.div`
374
+ `, hn = T.div`
371
375
  & > div {
372
376
  width: 100%;
373
377
  height: 100%;
@@ -387,145 +391,145 @@ const st = N.div`
387
391
  border-radius: 8px;
388
392
  }
389
393
  }
390
- `, en = (e) => {
391
- const { index: t, handleOpenModal: n } = e;
392
- return /* @__PURE__ */ i(
393
- Ae,
394
+ `, gn = (e) => {
395
+ const { index: n, handleOpenModal: t } = e;
396
+ return /* @__PURE__ */ r(
397
+ le,
394
398
  {
395
- id: `loading-card-${t}`,
399
+ id: `loading-card-${n}`,
396
400
  handleDelete: () => {
397
401
  },
398
- handleView: () => n ? n() : null,
402
+ handleView: () => t ? t() : null,
399
403
  controls: !1,
400
- children: /* @__PURE__ */ i(ot, { loading: !0 })
404
+ children: /* @__PURE__ */ r(Ae, { loading: !0 })
401
405
  },
402
- `loading-card-${t}`
406
+ `loading-card-${n}`
403
407
  );
404
- }, tn = (e) => {
405
- const { decision: t, controls: n, handleOpenModal: r, handleDelete: a, textValues: o } = e;
406
- return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ g(b, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
407
- /* @__PURE__ */ i(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
408
- /* @__PURE__ */ i(
409
- Ae,
408
+ }, bn = (e) => {
409
+ const { decision: n, controls: t, handleOpenModal: a, handleDelete: o, textValues: i } = e;
410
+ return n ? /* @__PURE__ */ r(de, { children: /* @__PURE__ */ h(g, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
411
+ /* @__PURE__ */ r(w, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
412
+ /* @__PURE__ */ r(
413
+ le,
410
414
  {
411
- id: t.decisionId,
412
- handleDelete: () => a ? a(t.decisionId) : null,
413
- handleView: () => r ? r(t) : null,
414
- controls: n,
415
- children: /* @__PURE__ */ i(ot, { decision: t, textValues: o })
415
+ id: n.decisionId,
416
+ handleDelete: () => o ? o(n.decisionId) : null,
417
+ handleView: () => a ? a(n) : null,
418
+ controls: t,
419
+ children: /* @__PURE__ */ r(Ae, { decision: n, textValues: i })
416
420
  }
417
421
  )
418
- ] }) }, t.decisionId) : null;
419
- }, nn = (e) => {
422
+ ] }) }, n.decisionId) : null;
423
+ }, mn = (e) => {
420
424
  const {
421
- customTitleContentAddCard: t,
422
- index: n,
423
- handleOpenModal: r,
424
- shouldRenderEmptyMessage: a
425
- } = e, o = t || "Agregar decisión";
426
- return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ g(b, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
427
- /* @__PURE__ */ i(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
428
- /* @__PURE__ */ i(
429
- st,
425
+ customTitleContentAddCard: n,
426
+ index: t,
427
+ handleOpenModal: a,
428
+ shouldRenderEmptyMessage: o
429
+ } = e, i = n || "Agregar decisión";
430
+ return /* @__PURE__ */ r(de, { children: o ? null : /* @__PURE__ */ h(g, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
431
+ /* @__PURE__ */ r(w, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
432
+ /* @__PURE__ */ r(
433
+ un,
430
434
  {
431
- onClick: () => r ? r() : null,
432
- children: /* @__PURE__ */ i(
433
- Ae,
435
+ onClick: () => a ? a() : null,
436
+ children: /* @__PURE__ */ r(
437
+ le,
434
438
  {
435
- id: `add-decision-${n}`,
439
+ id: `add-decision-${t}`,
436
440
  handleDelete: () => {
437
441
  },
438
- handleView: () => r ? r() : null,
442
+ handleView: () => a ? a() : null,
439
443
  controls: !1,
440
- children: /* @__PURE__ */ g(b, { direction: "column", gap: "12px", alignItems: "center", children: [
441
- /* @__PURE__ */ i(M, { appearance: "gray", icon: /* @__PURE__ */ i(pe, {}), size: "35px" }),
442
- /* @__PURE__ */ i(k, { appearance: "gray", type: "body", size: "large", children: o })
444
+ children: /* @__PURE__ */ h(g, { direction: "column", gap: "12px", alignItems: "center", children: [
445
+ /* @__PURE__ */ r(R, { appearance: "gray", icon: /* @__PURE__ */ r(J, {}), size: "35px" }),
446
+ /* @__PURE__ */ r(w, { appearance: "gray", type: "body", size: "large", children: i })
443
447
  ] })
444
448
  }
445
449
  )
446
450
  }
447
451
  )
448
- ] }) }, `add-decision-${n}`);
449
- }, rn = {
450
- loading: en,
451
- decision: tn,
452
- add: nn
453
- }, Te = (e) => {
454
- const { type: t } = e, n = rn[t];
455
- return n ? n(e) : null;
456
- }, an = (e) => {
452
+ ] }) }, `add-decision-${t}`);
453
+ }, fn = {
454
+ loading: gn,
455
+ decision: bn,
456
+ add: mn
457
+ }, te = (e) => {
458
+ const { type: n } = e, t = fn[n];
459
+ return t ? t(e) : null;
460
+ }, vn = (e) => {
457
461
  const {
458
- controls: t,
459
- customTitleContentAddCard: n,
460
- decisions: r,
461
- loading: a,
462
- handleOpenModal: o,
463
- handleDelete: c,
462
+ controls: n,
463
+ customTitleContentAddCard: t,
464
+ decisions: a,
465
+ loading: o,
466
+ handleOpenModal: i,
467
+ handleDelete: u,
464
468
  textValues: l
465
- } = e, s = a ? Array.from({ length: 3 }).map(
466
- (p, u) => Te({
469
+ } = e, d = o ? Array.from({ length: 3 }).map(
470
+ (p, c) => te({
467
471
  type: "loading",
468
- index: u,
469
- controls: t,
470
- customTitleContentAddCard: n,
471
- loading: a,
472
- handleOpenModal: o,
473
- handleDelete: c,
472
+ index: c,
473
+ controls: n,
474
+ customTitleContentAddCard: t,
475
+ loading: o,
476
+ handleOpenModal: i,
477
+ handleDelete: u,
474
478
  textValues: l
475
479
  })
476
- ) : r == null ? void 0 : r.map(
477
- (p) => Te({
480
+ ) : a == null ? void 0 : a.map(
481
+ (p) => te({
478
482
  type: "decision",
479
483
  decision: p,
480
- controls: t,
481
- customTitleContentAddCard: n,
482
- loading: a,
483
- handleOpenModal: o,
484
- handleDelete: c,
484
+ controls: n,
485
+ customTitleContentAddCard: t,
486
+ loading: o,
487
+ handleOpenModal: i,
488
+ handleDelete: u,
485
489
  textValues: l
486
490
  })
487
- ), d = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !a && t;
488
- return { renderedCards: s, shouldRenderAddCard: d };
489
- }, na = (e) => {
491
+ ), s = ((a == null ? void 0 : a.length) === 0 || a.length < Math.floor(window.innerWidth / 300)) && !o && n;
492
+ return { renderedCards: d, shouldRenderAddCard: s };
493
+ }, Ft = (e) => {
490
494
  const {
491
- controls: t = !0,
492
- customTitleContentAddCard: n,
493
- customMessageEmptyDecisions: r,
494
- decisions: a,
495
- textValues: o,
496
- decisionTemplate: c,
495
+ controls: n = !0,
496
+ customTitleContentAddCard: t,
497
+ customMessageEmptyDecisions: a,
498
+ decisions: o,
499
+ textValues: i,
500
+ decisionTemplate: u,
497
501
  isModalOpen: l,
498
- selectedDecision: s,
499
- loading: d,
502
+ selectedDecision: d,
503
+ loading: s,
500
504
  handleOpenModal: p,
501
- handleCloseModal: u,
502
- handleSubmitForm: h,
503
- handleDelete: m,
505
+ handleCloseModal: c,
506
+ handleSubmitForm: m,
507
+ handleDelete: b,
504
508
  terms: f = !0
505
- } = e, w = H("(max-width: 681px)"), D = H("(max-width: 400px)"), { renderedCards: E, shouldRenderAddCard: x } = an({
506
- controls: t,
507
- customTitleContentAddCard: n,
508
- decisions: a,
509
- loading: d,
509
+ } = e, y = H("(max-width: 681px)"), D = H("(max-width: 400px)"), { renderedCards: C, shouldRenderAddCard: N } = vn({
510
+ controls: n,
511
+ customTitleContentAddCard: t,
512
+ decisions: o,
513
+ loading: s,
510
514
  handleOpenModal: p,
511
- handleDelete: m,
512
- textValues: o
513
- }), S = (a == null ? void 0 : a.length) === 0 && !d;
514
- return /* @__PURE__ */ g(O, { children: [
515
- /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ g(
516
- b,
515
+ handleDelete: b,
516
+ textValues: i
517
+ }), A = (o == null ? void 0 : o.length) === 0 && !s;
518
+ return /* @__PURE__ */ h(E, { children: [
519
+ /* @__PURE__ */ r(pn, { children: /* @__PURE__ */ r(hn, { children: /* @__PURE__ */ r(g, { direction: "column", gap: "16px", padding: "6px", children: A ? /* @__PURE__ */ h(
520
+ g,
517
521
  {
518
522
  direction: "column",
519
523
  gap: "28px",
520
524
  width: "100%",
521
- height: w ? "auto" : "435px",
525
+ height: y ? "auto" : "435px",
522
526
  justifyContent: "center",
523
527
  alignItems: "center",
524
528
  children: [
525
- /* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
529
+ /* @__PURE__ */ r(w, { as: "span", type: "label", size: "large", appearance: "gray", children: a || /* @__PURE__ */ h(E, { children: [
526
530
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
527
- /* @__PURE__ */ g(
528
- k,
531
+ /* @__PURE__ */ h(
532
+ w,
529
533
  {
530
534
  as: "span",
531
535
  type: "label",
@@ -534,25 +538,25 @@ const st = N.div`
534
538
  weight: "bold",
535
539
  children: [
536
540
  "“",
537
- n || "+ Agregar decisión",
541
+ t || "+ Agregar decisión",
538
542
  "”"
539
543
  ]
540
544
  }
541
545
  ),
542
546
  "para empezar."
543
547
  ] }) }),
544
- /* @__PURE__ */ i(
545
- P,
548
+ /* @__PURE__ */ r(
549
+ U,
546
550
  {
547
- iconBefore: /* @__PURE__ */ i(pe, {}),
551
+ iconBefore: /* @__PURE__ */ r(J, {}),
548
552
  onClick: () => p ? p() : null,
549
- children: n || "Agregar decisión"
553
+ children: t || "Agregar decisión"
550
554
  }
551
555
  )
552
556
  ]
553
557
  }
554
- ) : /* @__PURE__ */ g(
555
- he,
558
+ ) : /* @__PURE__ */ h(
559
+ X,
556
560
  {
557
561
  templateColumns: D ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
558
562
  autoFlow: "row dense",
@@ -562,77 +566,77 @@ const st = N.div`
562
566
  autoRows: "1fr",
563
567
  justifyItems: "center",
564
568
  padding: "6px",
565
- height: w ? "auto" : "484px",
569
+ height: y ? "auto" : "484px",
566
570
  children: [
567
- E,
568
- x && Te({
571
+ C,
572
+ N && te({
569
573
  type: "add",
570
- index: a == null ? void 0 : a.length,
571
- controls: t,
572
- customTitleContentAddCard: n,
573
- customMessageEmptyDecisions: r,
574
- loading: d,
574
+ index: o == null ? void 0 : o.length,
575
+ controls: n,
576
+ customTitleContentAddCard: t,
577
+ customMessageEmptyDecisions: a,
578
+ loading: s,
575
579
  handleOpenModal: p,
576
- handleDelete: m,
577
- textValues: o,
578
- shouldRenderEmptyMessage: S,
580
+ handleDelete: b,
581
+ textValues: i,
582
+ shouldRenderEmptyMessage: A,
579
583
  terms: f
580
584
  })
581
585
  ]
582
586
  }
583
587
  ) }) }) }),
584
- l && /* @__PURE__ */ i(
585
- lt,
588
+ l && /* @__PURE__ */ r(
589
+ Ie,
586
590
  {
587
591
  portalId: "modal-portal",
588
- onCloseModal: u,
589
- title: s ? "Editar Decisión" : "Nueva decisión",
590
- children: /* @__PURE__ */ i(
591
- ut,
592
+ onCloseModal: c,
593
+ title: d ? "Editar Decisión" : "Nueva decisión",
594
+ children: /* @__PURE__ */ r(
595
+ Oe,
592
596
  {
593
- decision: s || c,
594
- onSubmitEvent: h,
595
- textValues: o,
596
- onCancel: () => u ? u() : () => {
597
+ decision: d || u,
598
+ onSubmitEvent: m,
599
+ textValues: i,
600
+ onCancel: () => c ? c() : () => {
597
601
  }
598
602
  }
599
603
  )
600
604
  }
601
605
  )
602
606
  ] });
603
- }, ct = (e) => {
604
- const { children: t, controls: n = !0, handleDelete: r, id: a } = e;
605
- return /* @__PURE__ */ g(Rt, { width: "100%", children: [
606
- t,
607
- n && /* @__PURE__ */ i(O, { children: /* @__PURE__ */ i(b, { gap: "16px", justifyContent: "end", margin: "16px 0 0 0", children: /* @__PURE__ */ i(
608
- P,
607
+ }, Fe = (e) => {
608
+ const { children: n, controls: t = !0, handleDelete: a, id: o } = e;
609
+ return /* @__PURE__ */ h(Ve, { width: "100%", children: [
610
+ n,
611
+ t && /* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(g, { gap: "16px", justifyContent: "end", margin: "16px 0 0 0", children: /* @__PURE__ */ r(
612
+ U,
609
613
  {
610
614
  cursorHover: !0,
611
615
  appearance: "danger",
612
616
  spacing: "compact",
613
617
  variant: "outlined",
614
- iconBefore: /* @__PURE__ */ i(Je, {}),
618
+ iconBefore: /* @__PURE__ */ r(Te, {}),
615
619
  onClick: () => {
616
- r(a);
620
+ a(o);
617
621
  },
618
622
  children: "Eliminar"
619
623
  }
620
624
  ) }) })
621
625
  ] });
622
- }, on = (e) => e.value, ln = (e) => e.value, sn = (e) => e.value, cn = (e) => ({
626
+ }, xn = (e) => e.value, Tn = (e) => e.value, yn = (e) => e.value, wn = (e) => ({
623
627
  from: e.from ?? "",
624
628
  to: e.to ?? ""
625
- }), dn = (e) => e.value, un = (e) => e.value, pn = (e) => e.value, hn = {
626
- [A.LIST_OF_VALUES]: ln,
627
- [A.LIST_OF_VALUES_MULTI]: sn,
628
- [A.RANGE]: cn,
629
- [A.GREATER_THAN]: dn,
630
- [A.LESS_THAN]: un,
631
- [A.EQUAL]: pn
632
- }, ee = (e) => {
633
- const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = hn[e == null ? void 0 : e.howToSetTheDecision] || on;
634
- return n && r(t) || t || void 0;
635
- }, gn = N.div`
629
+ }), Cn = (e) => e.value, Dn = (e) => e.value, Sn = (e) => e.value, kn = {
630
+ [S.LIST_OF_VALUES]: Tn,
631
+ [S.LIST_OF_VALUES_MULTI]: yn,
632
+ [S.RANGE]: wn,
633
+ [S.GREATER_THAN]: Cn,
634
+ [S.LESS_THAN]: Dn,
635
+ [S.EQUAL]: Sn
636
+ }, G = (e) => {
637
+ const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), a = kn[e == null ? void 0 : e.howToSetTheDecision] || xn;
638
+ return t && a(n) || n || void 0;
639
+ }, Nn = T.div`
636
640
  display: flex;
637
641
  justify-content: ${({ $justifyContent: e }) => e};
638
642
  align-items: ${({ $alignItems: e }) => e};
@@ -644,103 +648,103 @@ const st = N.div`
644
648
  gap: ${({ $gap: e }) => e};
645
649
  margin: ${({ $margin: e }) => e};
646
650
  padding: ${({ $padding: e }) => e};
647
- background: ${({ $background: e, theme: t }) => {
648
- var n, r, a, o;
649
- return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N10) || C.palette.neutral.N10}` : `${((o = (a = t == null ? void 0 : t.palette) == null ? void 0 : a.neutral) == null ? void 0 : o.N0) || C.palette.neutral.N0}`;
651
+ background: ${({ $background: e, theme: n }) => {
652
+ var t, a, o, i;
653
+ return e ? `${((a = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N10) || x.palette.neutral.N10}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || x.palette.neutral.N0}`;
650
654
  }};
651
- border: ${({ $border: e, theme: t }) => {
652
- var n, r;
653
- return e ? `1px solid ${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N40) || C.palette.neutral.N40}` : "none";
655
+ border: ${({ $border: e, theme: n }) => {
656
+ var t, a;
657
+ return e ? `1px solid ${((a = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N40) || x.palette.neutral.N40}` : "none";
654
658
  }};
655
659
  border-radius: ${({ $borderRadius: e }) => e};
656
660
  box-sizing: ${({ $boxSizing: e }) => e};
657
661
  overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
658
- `, _ = oe.forwardRef(
659
- (e, t) => {
662
+ `, z = W.forwardRef(
663
+ (e, n) => {
660
664
  const {
661
- children: n,
662
- wrap: r,
663
- direction: a = "column",
664
- justifyContent: o,
665
- alignItems: c,
665
+ children: t,
666
+ wrap: a,
667
+ direction: o = "column",
668
+ justifyContent: i,
669
+ alignItems: u,
666
670
  alignContent: l,
667
- height: s,
668
- width: d,
671
+ height: d,
672
+ width: s,
669
673
  gap: p,
670
- background: u,
671
- borderRadius: h,
672
- border: m,
674
+ background: c,
675
+ borderRadius: m,
676
+ border: b,
673
677
  margin: f = "0px",
674
- padding: w = "0px",
678
+ padding: y = "0px",
675
679
  boxSizing: D,
676
- scroll: E = !1
680
+ scroll: C = !1
677
681
  } = e;
678
- return /* @__PURE__ */ i(
679
- gn,
682
+ return /* @__PURE__ */ r(
683
+ Nn,
680
684
  {
681
- ref: t,
682
- direction: a,
683
- $justifyContent: o,
684
- $alignItems: c,
685
+ ref: n,
686
+ direction: o,
687
+ $justifyContent: i,
688
+ $alignItems: u,
685
689
  $alignContent: l,
686
- height: s,
687
- width: d,
688
- wrap: r,
690
+ height: d,
691
+ width: s,
692
+ wrap: a,
689
693
  $gap: p,
690
- $background: u,
691
- $border: m,
694
+ $background: c,
695
+ $border: b,
692
696
  $margin: f,
693
- $padding: w,
694
- $borderRadius: h,
697
+ $padding: y,
698
+ $borderRadius: m,
695
699
  $boxSizing: D,
696
- $scroll: E,
697
- children: n
700
+ $scroll: C,
701
+ children: t
698
702
  }
699
703
  );
700
704
  }
701
705
  );
702
- _.displayName = "BorderStack";
703
- const fn = (e) => {
706
+ z.displayName = "BorderStack";
707
+ const En = (e) => {
704
708
  const {
705
- conditionsAlignment: t,
706
- decision: n,
707
- decisionMapper: r,
708
- loading: a,
709
- textValues: o,
710
- visibleConditions: c,
709
+ conditionsAlignment: n,
710
+ decision: t,
711
+ decisionMapper: a,
712
+ loading: o,
713
+ textValues: i,
714
+ visibleConditions: u,
711
715
  tagLabel: l,
712
- isOpen: s,
713
- onToggle: d,
716
+ isOpen: d,
717
+ onToggle: s,
714
718
  hasEffectiveFrom: p,
715
- hasValidUntil: u,
716
- effectiveFromRenderer: h,
717
- validUntilRenderer: m
719
+ hasValidUntil: c,
720
+ effectiveFromRenderer: m,
721
+ validUntilRenderer: b
718
722
  } = e;
719
- return a ? /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
720
- /* @__PURE__ */ g(
721
- b,
723
+ return o ? /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
724
+ /* @__PURE__ */ h(
725
+ g,
722
726
  {
723
727
  alignItems: "start",
724
728
  justifyContent: "space-between",
725
729
  children: [
726
- /* @__PURE__ */ i(
727
- ae,
730
+ /* @__PURE__ */ r(
731
+ Q,
728
732
  {
729
- element: r,
730
- valueData: ee(
731
- r
733
+ element: a,
734
+ valueData: G(
735
+ a
732
736
  ),
733
737
  type: "decision"
734
738
  }
735
739
  ),
736
- /* @__PURE__ */ g(b, { gap: "8px", children: [
737
- /* @__PURE__ */ i(X, { appearance: "gray", label: l, displayIcon: !1 }),
738
- /* @__PURE__ */ i(
739
- M,
740
+ /* @__PURE__ */ h(g, { gap: "8px", children: [
741
+ /* @__PURE__ */ r(q, { appearance: "gray", label: l, displayIcon: !1 }),
742
+ /* @__PURE__ */ r(
743
+ R,
740
744
  {
741
745
  appearance: "dark",
742
- icon: s ? /* @__PURE__ */ i(Et, {}) : /* @__PURE__ */ i(Xe, {}),
743
- onClick: d,
746
+ icon: d ? /* @__PURE__ */ r(Me, {}) : /* @__PURE__ */ r(we, {}),
747
+ onClick: s,
744
748
  size: "24px",
745
749
  cursorHover: !0
746
750
  }
@@ -748,13 +752,13 @@ const fn = (e) => {
748
752
  ] })
749
753
  ]
750
754
  },
751
- n.ruleName
755
+ t.ruleName
752
756
  ),
753
- s && /* @__PURE__ */ g(O, { children: [
754
- /* @__PURE__ */ i(L, { dashed: !0 }),
755
- /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
756
- /* @__PURE__ */ i(
757
- k,
757
+ d && /* @__PURE__ */ h(E, { children: [
758
+ /* @__PURE__ */ r(F, { dashed: !0 }),
759
+ /* @__PURE__ */ h(g, { direction: "column", gap: "12px", children: [
760
+ /* @__PURE__ */ r(
761
+ w,
758
762
  {
759
763
  type: "label",
760
764
  size: "large",
@@ -762,28 +766,28 @@ const fn = (e) => {
762
766
  weight: "bold",
763
767
  textAlign: "start",
764
768
  padding: "0 12px",
765
- children: o.factsThatConditionIt
769
+ children: i.factsThatConditionIt
766
770
  }
767
771
  ),
768
- /* @__PURE__ */ g(
769
- b,
772
+ /* @__PURE__ */ h(
773
+ g,
770
774
  {
771
775
  direction: "column",
772
776
  gap: "8px",
773
- justifyContent: t,
777
+ justifyContent: n,
774
778
  children: [
775
- c.map((f) => /* @__PURE__ */ i(
776
- _,
779
+ u.map((f) => /* @__PURE__ */ r(
780
+ z,
777
781
  {
778
782
  direction: "column",
779
783
  padding: "6px 12px",
780
784
  borderRadius: "8px",
781
785
  background: !0,
782
- children: /* @__PURE__ */ i(
783
- ae,
786
+ children: /* @__PURE__ */ r(
787
+ Q,
784
788
  {
785
789
  element: { ...f, value: f.value },
786
- valueData: ee(
790
+ valueData: G(
787
791
  f
788
792
  )
789
793
  }
@@ -791,35 +795,35 @@ const fn = (e) => {
791
795
  },
792
796
  f.conditionName
793
797
  )),
794
- p && h && /* @__PURE__ */ i(
795
- _,
798
+ p && m && /* @__PURE__ */ r(
799
+ z,
796
800
  {
797
801
  direction: "column",
798
802
  padding: "6px 12px",
799
803
  borderRadius: "8px",
800
804
  background: !0,
801
- children: /* @__PURE__ */ i(
802
- ae,
805
+ children: /* @__PURE__ */ r(
806
+ Q,
803
807
  {
804
- element: h.element,
805
- valueData: h.valueData
808
+ element: m.element,
809
+ valueData: m.valueData
806
810
  },
807
811
  "effectiveFrom"
808
812
  )
809
813
  }
810
814
  ),
811
- u && m && /* @__PURE__ */ i(
812
- _,
815
+ c && b && /* @__PURE__ */ r(
816
+ z,
813
817
  {
814
818
  direction: "column",
815
819
  padding: "6px 12px",
816
820
  borderRadius: "8px",
817
821
  background: !0,
818
- children: /* @__PURE__ */ i(
819
- ae,
822
+ children: /* @__PURE__ */ r(
823
+ Q,
820
824
  {
821
- element: m.element,
822
- valueData: m.valueData
825
+ element: b.element,
826
+ valueData: b.valueData
823
827
  },
824
828
  "validUntil"
825
829
  )
@@ -830,79 +834,79 @@ const fn = (e) => {
830
834
  )
831
835
  ] })
832
836
  ] })
833
- ] }) : /* @__PURE__ */ g(b, { justifyContent: "space-between", children: [
834
- /* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
835
- /* @__PURE__ */ i(j, { animated: !0, width: "150px" }),
836
- /* @__PURE__ */ i(j, { animated: !0, width: "70px" })
837
+ ] }) : /* @__PURE__ */ h(g, { justifyContent: "space-between", children: [
838
+ /* @__PURE__ */ h(g, { alignItems: "center", gap: "8px", children: [
839
+ /* @__PURE__ */ r(V, { animated: !0, width: "150px" }),
840
+ /* @__PURE__ */ r(V, { animated: !0, width: "70px" })
837
841
  ] }),
838
- /* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
839
- /* @__PURE__ */ i(j, { animated: !0, width: "50px" }),
840
- /* @__PURE__ */ i(At, { animated: !0 })
842
+ /* @__PURE__ */ h(g, { alignItems: "center", gap: "8px", children: [
843
+ /* @__PURE__ */ r(V, { animated: !0, width: "50px" }),
844
+ /* @__PURE__ */ r(Be, { animated: !0 })
841
845
  ] })
842
846
  ] });
843
- }, dt = (e) => {
844
- var E;
847
+ }, Re = (e) => {
848
+ var C;
845
849
  const {
846
- decision: t,
847
- loading: n = !1,
848
- textValues: r,
849
- position: a,
850
- isOpen: o = !1,
851
- onToggle: c
852
- } = e, l = !!(t != null && t.effectiveFrom), s = !!(t != null && t.validUntil), d = l ? {
850
+ decision: n,
851
+ loading: t = !1,
852
+ textValues: a,
853
+ position: o,
854
+ isOpen: i = !1,
855
+ onToggle: u
856
+ } = e, l = !!(n != null && n.effectiveFrom), d = !!(n != null && n.validUntil), s = l ? {
853
857
  element: {
854
- labelName: r == null ? void 0 : r.effectiveFrom,
855
- value: String(t.effectiveFrom),
856
- howToSetTheDecision: z.EQUAL,
857
- decisionDataType: U.DATE
858
+ labelName: a == null ? void 0 : a.effectiveFrom,
859
+ value: String(n.effectiveFrom),
860
+ howToSetTheDecision: B.EQUAL,
861
+ decisionDataType: O.DATE
858
862
  },
859
- valueData: ee({
860
- labelName: r == null ? void 0 : r.effectiveFrom,
861
- value: String(t.effectiveFrom),
862
- howToSetTheDecision: z.EQUAL,
863
- decisionDataType: U.DATE
863
+ valueData: G({
864
+ labelName: a == null ? void 0 : a.effectiveFrom,
865
+ value: String(n.effectiveFrom),
866
+ howToSetTheDecision: B.EQUAL,
867
+ decisionDataType: O.DATE
864
868
  })
865
- } : null, p = s ? {
869
+ } : null, p = d ? {
866
870
  element: {
867
- labelName: r == null ? void 0 : r.validUntil,
868
- value: String(t.validUntil),
869
- howToSetTheDecision: z.EQUAL,
870
- decisionDataType: U.DATE
871
+ labelName: a == null ? void 0 : a.validUntil,
872
+ value: String(n.validUntil),
873
+ howToSetTheDecision: B.EQUAL,
874
+ decisionDataType: O.DATE
871
875
  },
872
- valueData: ee({
873
- labelName: r == null ? void 0 : r.validUntil,
874
- value: String(t.validUntil),
875
- howToSetTheDecision: z.EQUAL,
876
- decisionDataType: U.DATE
876
+ valueData: G({
877
+ labelName: a == null ? void 0 : a.validUntil,
878
+ value: String(n.validUntil),
879
+ howToSetTheDecision: B.EQUAL,
880
+ decisionDataType: O.DATE
877
881
  })
878
- } : null, u = t ? {
879
- labelName: t.labelName || "",
880
- decisionDataType: t.decisionDataType || "alphabetical",
881
- value: ee(t),
882
- howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
883
- } : null, h = ((E = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : E.filter(
884
- (x) => !x.hidden
885
- )) || [], m = Array.from({ length: 5 }), f = !!(!n && t && r && u), w = h.length < 2 ? "start" : "space-between", D = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
886
- return /* @__PURE__ */ i(
887
- fn,
882
+ } : null, c = n ? {
883
+ labelName: n.labelName || "",
884
+ decisionDataType: n.decisionDataType || "alphabetical",
885
+ value: G(n),
886
+ howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
887
+ } : null, m = ((C = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : C.filter(
888
+ (N) => !N.hidden
889
+ )) || [], b = Array.from({ length: 5 }), f = !!(!t && n && a && c), y = m.length < 2 ? "start" : "space-between", D = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
890
+ return /* @__PURE__ */ r(
891
+ En,
888
892
  {
889
- conditionsAlignment: w,
890
- decision: t,
891
- decisionMapper: u,
893
+ conditionsAlignment: y,
894
+ decision: n,
895
+ decisionMapper: c,
892
896
  loading: f,
893
- skeleton: m,
894
- textValues: r,
895
- visibleConditions: h,
897
+ skeleton: b,
898
+ textValues: a,
899
+ visibleConditions: m,
896
900
  tagLabel: D,
897
- isOpen: o,
898
- onToggle: c,
901
+ isOpen: i,
902
+ onToggle: u,
899
903
  hasEffectiveFrom: l,
900
- hasValidUntil: s,
901
- effectiveFromRenderer: d,
904
+ hasValidUntil: d,
905
+ effectiveFromRenderer: s,
902
906
  validUntilRenderer: p
903
907
  }
904
908
  );
905
- }, mn = rt`
909
+ }, $n = Ne`
906
910
  from {
907
911
  opacity: 0;
908
912
  transform: translateY(20px);
@@ -912,12 +916,12 @@ const fn = (e) => {
912
916
  transform: translateY(0);
913
917
  }
914
918
  `;
915
- N.div`
919
+ T.div`
916
920
  border-radius: 8px;
917
921
  border: 1px solid
918
922
  ${({ theme: e }) => {
919
- var t, n;
920
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
923
+ var n, t;
924
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
921
925
  }};
922
926
  box-sizing: border-box;
923
927
  display: flex;
@@ -926,43 +930,37 @@ N.div`
926
930
  height: 100%;
927
931
  box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
928
932
  `;
929
- N.div`
933
+ T.div`
930
934
  & > div {
931
935
  border-radius: 8px;
932
936
  border: 1px solid
933
937
  ${({ theme: e }) => {
934
- var t, n;
935
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
938
+ var n, t;
939
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
936
940
  }};
937
941
  }
938
942
  `;
939
- N.div`
943
+ const An = T.div`
940
944
  & > div {
941
- background-color: ${({ theme: e }) => {
942
- var t, n;
943
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) || C.palette.neutral.N10;
945
+ box-shadow: 0px 2px 3px 0px
946
+ ${({ theme: e }) => {
947
+ var n, t;
948
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N30A) || x.palette.neutralAlpha.N30A;
944
949
  }};
945
- justify-content: center;
950
+ cursor: pointer;
946
951
  }
947
- min-height: 350px;
948
- width: 100%;
949
- height: 100%;
950
- padding-bottom: 12px;
951
- cursor: pointer;
952
- `;
953
- N.div`
952
+ `, In = T.div`
954
953
  width: 100%;
955
954
  height: 100%;
956
955
  & > div {
957
- animation: ${mn} 600ms ease-out;
956
+ animation: ${$n} 600ms ease-out;
958
957
  }
959
- `;
960
- const bn = N.div`
958
+ `, Fn = T.div`
961
959
  & > div > div {
962
960
  border-radius: 8px;
963
961
  box-sizing: border-box;
964
962
  }
965
- `, vn = N.div`
963
+ `, Rn = T.div`
966
964
  & > div {
967
965
  width: 100%;
968
966
  height: 100%;
@@ -982,63 +980,63 @@ const bn = N.div`
982
980
  border-radius: 8px;
983
981
  }
984
982
  }
985
- `, yn = (e) => {
986
- const { index: t, handleOpenModal: n } = e;
987
- return /* @__PURE__ */ i(
988
- ct,
983
+ `, On = (e) => {
984
+ const { index: n, handleOpenModal: t } = e;
985
+ return /* @__PURE__ */ r(
986
+ Fe,
989
987
  {
990
- id: `loading-card-${t}`,
988
+ id: `loading-card-${n}`,
991
989
  handleDelete: () => {
992
990
  },
993
- handleView: () => n ? n() : null,
991
+ handleView: () => t ? t() : null,
994
992
  controls: !1,
995
- children: /* @__PURE__ */ i(dt, { loading: !0 })
993
+ children: /* @__PURE__ */ r(Re, { loading: !0 })
996
994
  },
997
- `loading-card-${t}`
995
+ `loading-card-${n}`
998
996
  );
999
- }, xn = (e) => {
997
+ }, Mn = (e) => {
1000
998
  const {
1001
- decision: t,
1002
- controls: n,
1003
- handleOpenModal: r,
1004
- handleDelete: a,
1005
- textValues: o,
1006
- index: c,
999
+ decision: n,
1000
+ controls: t,
1001
+ handleOpenModal: a,
1002
+ handleDelete: o,
1003
+ textValues: i,
1004
+ index: u,
1007
1005
  isOpen: l,
1008
- onToggle: s
1006
+ onToggle: d
1009
1007
  } = e;
1010
- return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
1011
- ct,
1008
+ return n ? /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(g, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ r(
1009
+ Fe,
1012
1010
  {
1013
- id: t.decisionId,
1014
- handleDelete: () => a ? a(t.decisionId) : null,
1015
- handleView: () => r ? r(t) : null,
1016
- controls: n,
1017
- children: /* @__PURE__ */ i(
1018
- dt,
1011
+ id: n.decisionId,
1012
+ handleDelete: () => o ? o(n.decisionId) : null,
1013
+ handleView: () => a ? a(n) : null,
1014
+ controls: t,
1015
+ children: /* @__PURE__ */ r(
1016
+ Re,
1019
1017
  {
1020
- decision: t,
1021
- textValues: o,
1022
- position: c,
1018
+ decision: n,
1019
+ textValues: i,
1020
+ position: u,
1023
1021
  isOpen: !!l,
1024
- onToggle: () => s == null ? void 0 : s(!l)
1022
+ onToggle: () => d == null ? void 0 : d(!l)
1025
1023
  }
1026
1024
  )
1027
1025
  }
1028
- ) }) }, t.decisionId) : null;
1029
- }, wn = (e) => {
1026
+ ) }) }, n.decisionId) : null;
1027
+ }, Ln = (e) => {
1030
1028
  const {
1031
- customTitleContentAddCard: t,
1032
- index: n,
1033
- handleOpenModal: r,
1034
- shouldRenderEmptyMessage: a
1029
+ customTitleContentAddCard: n,
1030
+ index: t,
1031
+ handleOpenModal: a,
1032
+ shouldRenderEmptyMessage: o
1035
1033
  } = e;
1036
- return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ i(
1037
- st,
1034
+ return /* @__PURE__ */ r(In, { children: o ? null : /* @__PURE__ */ r(
1035
+ An,
1038
1036
  {
1039
- onClick: () => r ? r() : null,
1040
- children: /* @__PURE__ */ i(
1041
- _,
1037
+ onClick: () => a ? a() : null,
1038
+ children: /* @__PURE__ */ r(
1039
+ z,
1042
1040
  {
1043
1041
  direction: "column",
1044
1042
  gap: "4px",
@@ -1046,19 +1044,19 @@ const bn = N.div`
1046
1044
  height: "100%",
1047
1045
  background: !0,
1048
1046
  borderRadius: "8px",
1049
- children: /* @__PURE__ */ g(
1050
- b,
1047
+ children: /* @__PURE__ */ h(
1048
+ g,
1051
1049
  {
1052
1050
  justifyContent: "space-between",
1053
1051
  alignItems: "center",
1054
1052
  padding: "16px",
1055
1053
  children: [
1056
- /* @__PURE__ */ i(k, { appearance: "gray", type: "label", size: "large", weight: "bold", children: t || "Agregar decisión" }),
1057
- /* @__PURE__ */ i(
1058
- M,
1054
+ /* @__PURE__ */ r(w, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
1055
+ /* @__PURE__ */ r(
1056
+ R,
1059
1057
  {
1060
1058
  appearance: "gray",
1061
- icon: /* @__PURE__ */ i(pe, {}),
1059
+ icon: /* @__PURE__ */ r(J, {}),
1062
1060
  size: "24px",
1063
1061
  cursorHover: !0
1064
1062
  }
@@ -1069,94 +1067,94 @@ const bn = N.div`
1069
1067
  }
1070
1068
  )
1071
1069
  }
1072
- ) }, `add-decision-${n}`);
1073
- }, Tn = {
1074
- loading: yn,
1075
- decision: xn,
1076
- add: wn
1077
- }, Ce = (e) => {
1078
- const { type: t } = e, n = Tn[t];
1079
- return n ? n(e) : null;
1080
- }, Cn = (e) => {
1070
+ ) }, `add-decision-${t}`);
1071
+ }, zn = {
1072
+ loading: On,
1073
+ decision: Mn,
1074
+ add: Ln
1075
+ }, ae = (e) => {
1076
+ const { type: n } = e, t = zn[n];
1077
+ return t ? t(e) : null;
1078
+ }, Un = (e) => {
1081
1079
  const {
1082
- controls: t,
1083
- customTitleContentAddCard: n,
1084
- decisions: r,
1085
- loading: a,
1086
- handleOpenModal: o,
1087
- handleDelete: c,
1080
+ controls: n,
1081
+ customTitleContentAddCard: t,
1082
+ decisions: a,
1083
+ loading: o,
1084
+ handleOpenModal: i,
1085
+ handleDelete: u,
1088
1086
  textValues: l,
1089
- isOpenFor: s,
1090
- toggleAt: d
1091
- } = e, p = a ? Array.from({ length: 3 }).map(
1092
- (h, m) => Ce({
1087
+ isOpenFor: d,
1088
+ toggleAt: s
1089
+ } = e, p = o ? Array.from({ length: 3 }).map(
1090
+ (m, b) => ae({
1093
1091
  type: "loading",
1094
- index: m,
1095
- controls: t,
1096
- customTitleContentAddCard: n,
1097
- loading: a,
1098
- handleOpenModal: o,
1099
- handleDelete: c,
1092
+ index: b,
1093
+ controls: n,
1094
+ customTitleContentAddCard: t,
1095
+ loading: o,
1096
+ handleOpenModal: i,
1097
+ handleDelete: u,
1100
1098
  textValues: l
1101
1099
  })
1102
- ) : r == null ? void 0 : r.map(
1103
- (h, m) => Ce({
1100
+ ) : a == null ? void 0 : a.map(
1101
+ (m, b) => ae({
1104
1102
  type: "decision",
1105
- decision: h,
1106
- controls: s ? s(m) : !1,
1107
- customTitleContentAddCard: n,
1108
- loading: a,
1109
- handleOpenModal: o,
1110
- handleDelete: c,
1103
+ decision: m,
1104
+ controls: d ? d(b) : !1,
1105
+ customTitleContentAddCard: t,
1106
+ loading: o,
1107
+ handleOpenModal: i,
1108
+ handleDelete: u,
1111
1109
  textValues: l,
1112
- index: m,
1113
- isOpen: s ? s(m) : !1,
1114
- onToggle: d ? () => d(m) : void 0
1110
+ index: b,
1111
+ isOpen: d ? d(b) : !1,
1112
+ onToggle: s ? () => s(b) : void 0
1115
1113
  })
1116
- ), u = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !a && t;
1117
- return { renderedCards: p, shouldRenderAddCard: u };
1118
- }, ra = (e) => {
1114
+ ), c = ((a == null ? void 0 : a.length) === 0 || a.length < Math.floor(window.innerWidth / 300)) && !o && n;
1115
+ return { renderedCards: p, shouldRenderAddCard: c };
1116
+ }, Rt = (e) => {
1119
1117
  const {
1120
- controls: t = !0,
1121
- customTitleContentAddCard: n,
1122
- customMessageEmptyDecisions: r,
1123
- decisions: a,
1124
- textValues: o,
1125
- decisionTemplate: c,
1118
+ controls: n = !0,
1119
+ customTitleContentAddCard: t,
1120
+ customMessageEmptyDecisions: a,
1121
+ decisions: o,
1122
+ textValues: i,
1123
+ decisionTemplate: u,
1126
1124
  isModalOpen: l,
1127
- selectedDecision: s,
1128
- loading: d,
1125
+ selectedDecision: d,
1126
+ loading: s,
1129
1127
  handleOpenModal: p,
1130
- handleCloseModal: u,
1131
- handleSubmitForm: h,
1132
- handleDelete: m,
1128
+ handleCloseModal: c,
1129
+ handleSubmitForm: m,
1130
+ handleDelete: b,
1133
1131
  terms: f = !0
1134
- } = e, [w, D] = V(null), E = H("(max-width: 681px)"), { renderedCards: x, shouldRenderAddCard: S } = Cn({
1135
- controls: t,
1136
- customTitleContentAddCard: n,
1137
- decisions: a,
1138
- loading: d,
1132
+ } = e, [y, D] = M(null), C = H("(max-width: 681px)"), { renderedCards: N, shouldRenderAddCard: A } = Un({
1133
+ controls: n,
1134
+ customTitleContentAddCard: t,
1135
+ decisions: o,
1136
+ loading: s,
1139
1137
  handleOpenModal: p,
1140
- handleDelete: m,
1141
- textValues: o,
1142
- isOpenFor: (R) => w === R,
1143
- toggleAt: (R) => D((I) => I === R ? null : R)
1144
- }), T = (a == null ? void 0 : a.length) === 0 && !d;
1145
- return /* @__PURE__ */ g(O, { children: [
1146
- /* @__PURE__ */ i(bn, { children: /* @__PURE__ */ i(vn, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "16px", padding: "6px", children: T ? /* @__PURE__ */ g(
1147
- b,
1138
+ handleDelete: b,
1139
+ textValues: i,
1140
+ isOpenFor: (k) => y === k,
1141
+ toggleAt: (k) => D((L) => L === k ? null : k)
1142
+ }), $ = (o == null ? void 0 : o.length) === 0 && !s;
1143
+ return /* @__PURE__ */ h(E, { children: [
1144
+ /* @__PURE__ */ r(Fn, { children: /* @__PURE__ */ r(Rn, { children: /* @__PURE__ */ r(g, { direction: "column", gap: "16px", padding: "6px", children: $ ? /* @__PURE__ */ h(
1145
+ g,
1148
1146
  {
1149
1147
  direction: "column",
1150
1148
  gap: "28px",
1151
1149
  width: "100%",
1152
- height: E ? "auto" : "435px",
1150
+ height: C ? "auto" : "435px",
1153
1151
  justifyContent: "center",
1154
1152
  alignItems: "center",
1155
1153
  children: [
1156
- /* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
1154
+ /* @__PURE__ */ r(w, { as: "span", type: "label", size: "large", appearance: "gray", children: a || /* @__PURE__ */ h(E, { children: [
1157
1155
  "Aún NO tienes definidas tasas de interés efectivas . Presiona",
1158
- /* @__PURE__ */ g(
1159
- k,
1156
+ /* @__PURE__ */ h(
1157
+ w,
1160
1158
  {
1161
1159
  as: "span",
1162
1160
  type: "label",
@@ -1165,25 +1163,25 @@ const bn = N.div`
1165
1163
  weight: "bold",
1166
1164
  children: [
1167
1165
  "“",
1168
- n || "+ Agregar decisión",
1166
+ t || "+ Agregar decisión",
1169
1167
  "”"
1170
1168
  ]
1171
1169
  }
1172
1170
  ),
1173
1171
  "para empezar."
1174
1172
  ] }) }),
1175
- /* @__PURE__ */ i(
1176
- P,
1173
+ /* @__PURE__ */ r(
1174
+ U,
1177
1175
  {
1178
- iconBefore: /* @__PURE__ */ i(pe, {}),
1176
+ iconBefore: /* @__PURE__ */ r(J, {}),
1179
1177
  onClick: () => p ? p() : null,
1180
- children: n || "Agregar decisión"
1178
+ children: t || "Agregar decisión"
1181
1179
  }
1182
1180
  )
1183
1181
  ]
1184
1182
  }
1185
- ) : /* @__PURE__ */ g(
1186
- he,
1183
+ ) : /* @__PURE__ */ h(
1184
+ X,
1187
1185
  {
1188
1186
  templateColumns: "1fr",
1189
1187
  autoFlow: "row dense",
@@ -1193,54 +1191,54 @@ const bn = N.div`
1193
1191
  autoRows: "auto",
1194
1192
  justifyItems: "center",
1195
1193
  padding: "6px",
1196
- height: E ? "auto" : "484px",
1194
+ height: C ? "auto" : "484px",
1197
1195
  children: [
1198
- x,
1199
- S && Ce({
1196
+ N,
1197
+ A && ae({
1200
1198
  type: "add",
1201
- index: a == null ? void 0 : a.length,
1202
- controls: t,
1203
- customTitleContentAddCard: n,
1204
- customMessageEmptyDecisions: r,
1205
- loading: d,
1199
+ index: o == null ? void 0 : o.length,
1200
+ controls: n,
1201
+ customTitleContentAddCard: t,
1202
+ customMessageEmptyDecisions: a,
1203
+ loading: s,
1206
1204
  handleOpenModal: p,
1207
- handleDelete: m,
1208
- textValues: o,
1209
- shouldRenderEmptyMessage: T,
1205
+ handleDelete: b,
1206
+ textValues: i,
1207
+ shouldRenderEmptyMessage: $,
1210
1208
  terms: f
1211
1209
  })
1212
1210
  ]
1213
1211
  }
1214
1212
  ) }) }) }),
1215
- l && /* @__PURE__ */ i(
1216
- lt,
1213
+ l && /* @__PURE__ */ r(
1214
+ Ie,
1217
1215
  {
1218
1216
  portalId: "modal-portal",
1219
- onCloseModal: u,
1220
- title: s ? "Editar Decisión" : "Nueva decisión",
1221
- children: /* @__PURE__ */ i(
1222
- ut,
1217
+ onCloseModal: c,
1218
+ title: d ? "Editar Decisión" : "Nueva decisión",
1219
+ children: /* @__PURE__ */ r(
1220
+ Oe,
1223
1221
  {
1224
- decision: s || c,
1225
- onSubmitEvent: h,
1226
- textValues: o,
1227
- onCancel: () => u ? u() : () => {
1222
+ decision: d || u,
1223
+ onSubmitEvent: m,
1224
+ textValues: i,
1225
+ onCancel: () => c ? c() : () => {
1228
1226
  }
1229
1227
  }
1230
1228
  )
1231
1229
  }
1232
1230
  )
1233
1231
  ] });
1234
- }, Nn = {
1232
+ }, Vn = {
1235
1233
  border: {
1236
- color: C.palette.neutral.N40
1234
+ color: x.palette.neutral.N40
1237
1235
  }
1238
- }, En = N.div`
1236
+ }, Bn = T.div`
1239
1237
  border-width: 1px;
1240
1238
  border-style: solid;
1241
1239
  border-color: ${({ theme: e }) => {
1242
- var t, n;
1243
- return ((n = (t = e == null ? void 0 : e.box) == null ? void 0 : t.border) == null ? void 0 : n.color) || Nn.border.color;
1240
+ var n, t;
1241
+ return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Vn.border.color;
1244
1242
  }};
1245
1243
  border-radius: ${({ $borderRadius: e }) => e};
1246
1244
  margin: ${({ $margin: e }) => e};
@@ -1249,92 +1247,92 @@ const bn = N.div`
1249
1247
  height: ${({ $height: e }) => e};
1250
1248
  box-sizing: border-box;
1251
1249
  `;
1252
- function Sn(e) {
1250
+ function Hn(e) {
1253
1251
  const {
1254
- children: t,
1255
- padding: n = "16px",
1256
- margin: r,
1257
- borderRadius: a = "8px",
1258
- width: o,
1259
- height: c
1252
+ children: n,
1253
+ padding: t = "16px",
1254
+ margin: a,
1255
+ borderRadius: o = "8px",
1256
+ width: i,
1257
+ height: u
1260
1258
  } = e;
1261
- return /* @__PURE__ */ i(
1262
- En,
1259
+ return /* @__PURE__ */ r(
1260
+ Bn,
1263
1261
  {
1264
- $padding: n,
1265
- $margin: r,
1266
- $borderRadius: a,
1267
- $width: o,
1268
- $height: c,
1269
- children: t
1262
+ $padding: t,
1263
+ $margin: a,
1264
+ $borderRadius: o,
1265
+ $width: i,
1266
+ $height: u,
1267
+ children: n
1270
1268
  }
1271
1269
  );
1272
1270
  }
1273
- const Dn = (e, t) => {
1274
- const [n, r] = V([]), [a, o] = V([]), [c, l] = V(!1), s = le(null);
1275
- return ke(() => {
1276
- if (!e.current || !s.current) return;
1277
- const d = e.current, p = s.current, u = () => {
1278
- var S;
1279
- const m = d.clientWidth, f = Array.from(
1271
+ const jn = (e, n) => {
1272
+ const [t, a] = M([]), [o, i] = M([]), [u, l] = M(!1), d = Y(null);
1273
+ return oe(() => {
1274
+ if (!e.current || !d.current) return;
1275
+ const s = e.current, p = d.current, c = () => {
1276
+ var A;
1277
+ const b = s.clientWidth, f = Array.from(
1280
1278
  p.querySelectorAll('[data-filter-tag="true"]')
1281
- ), w = 48;
1279
+ ), y = 48;
1282
1280
  let D = 0;
1283
- const E = [], x = [];
1284
- for (let T = 0; T < t.length; T++) {
1285
- const y = ((S = f[T]) == null ? void 0 : S.offsetWidth) ?? 0;
1286
- D + y + w <= m ? (E.push(t[T]), D += y) : x.push(t[T]);
1281
+ const C = [], N = [];
1282
+ for (let $ = 0; $ < n.length; $++) {
1283
+ const v = ((A = f[$]) == null ? void 0 : A.offsetWidth) ?? 0;
1284
+ D + v + y <= b ? (C.push(n[$]), D += v) : N.push(n[$]);
1287
1285
  }
1288
- r(E), o(x), l(x.length > 0);
1289
- }, h = new ResizeObserver(() => {
1290
- requestAnimationFrame(u);
1286
+ a(C), i(N), l(N.length > 0);
1287
+ }, m = new ResizeObserver(() => {
1288
+ requestAnimationFrame(c);
1291
1289
  });
1292
- return h.observe(d), () => h.disconnect();
1293
- }, [t, e]), { visible: n, hidden: a, showOverflowIndicator: c, measurementRef: s };
1290
+ return m.observe(s), () => m.disconnect();
1291
+ }, [n, e]), { visible: t, hidden: o, showOverflowIndicator: u, measurementRef: d };
1294
1292
  };
1295
- N.div`
1293
+ T.div`
1296
1294
  & > div {
1297
1295
  width: 100%;
1298
1296
  }
1299
1297
  `;
1300
- const kn = N.div`
1298
+ const _n = T.div`
1301
1299
  position: absolute;
1302
1300
  top: calc(100% + 4px);
1303
1301
  right: 0;
1304
1302
  z-index: 1000;
1305
1303
  width: 170px;
1306
- `, Rn = N.div`
1304
+ `, qn = T.div`
1307
1305
  position: absolute;
1308
1306
  visibility: hidden;
1309
1307
  pointer-events: none;
1310
1308
  height: 0;
1311
1309
  overflow: hidden;
1312
- `, An = N.div`
1310
+ `, Pn = T.div`
1313
1311
  cursor: pointer;
1314
- `, Ne = {
1312
+ `, re = {
1315
1313
  border: {
1316
1314
  color: {
1317
- regular: C.palette.neutral.N40,
1318
- disabled: C.palette.neutral.N40,
1319
- focus: C.palette.blue.B300,
1320
- invalid: C.palette.red.R400
1315
+ regular: x.palette.neutral.N40,
1316
+ disabled: x.palette.neutral.N40,
1317
+ focus: x.palette.blue.B300,
1318
+ invalid: x.palette.red.R400
1321
1319
  }
1322
1320
  },
1323
1321
  background: {
1324
1322
  color: {
1325
- regular: C.palette.neutral.N0,
1326
- disabled: C.palette.neutral.N10
1323
+ regular: x.palette.neutral.N0,
1324
+ disabled: x.palette.neutral.N10
1327
1325
  }
1328
1326
  },
1329
1327
  content: {
1330
1328
  color: {
1331
- regular: C.palette.neutral.N900,
1332
- disabled: C.palette.neutral.N70
1329
+ regular: x.palette.neutral.N900,
1330
+ disabled: x.palette.neutral.N70
1333
1331
  }
1334
1332
  },
1335
1333
  placeholder: {
1336
1334
  color: {
1337
- regular: C.palette.neutral.N300
1335
+ regular: x.palette.neutral.N300
1338
1336
  }
1339
1337
  },
1340
1338
  option: {
@@ -1343,11 +1341,11 @@ const kn = N.div`
1343
1341
  hover: "primary"
1344
1342
  },
1345
1343
  background: {
1346
- regular: C.palette.neutral.N0,
1347
- hover: C.palette.neutral.N30
1344
+ regular: x.palette.neutral.N0,
1345
+ hover: x.palette.neutral.N30
1348
1346
  }
1349
1347
  }
1350
- }, $n = N.li`
1348
+ }, Gn = T.li`
1351
1349
  display: flex;
1352
1350
  align-items: center;
1353
1351
  align-self: stretch;
@@ -1361,56 +1359,56 @@ const kn = N.div`
1361
1359
 
1362
1360
  &:hover {
1363
1361
  background-color: ${({ theme: e }) => {
1364
- var t, n, r;
1365
- return ((r = (n = (t = e == null ? void 0 : e.input) == null ? void 0 : t.background) == null ? void 0 : n.color) == null ? void 0 : r.regular) || Ne.background.color.regular;
1362
+ var n, t, a;
1363
+ return ((a = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : a.regular) || re.background.color.regular;
1366
1364
  }};
1367
1365
  }
1368
- `, On = (e) => {
1369
- var h, m, f, w, D, E;
1370
- const { id: t, label: n, leadingIcon: r, onClose: a } = e, [o, c] = V(!1), l = () => c(!0), s = () => c(!1), d = Lt(It), p = ((f = (m = (h = d == null ? void 0 : d.input) == null ? void 0 : h.option) == null ? void 0 : m.appearance) == null ? void 0 : f.hover) ?? Ne.option.appearance.hover, u = ((E = (D = (w = d == null ? void 0 : d.input) == null ? void 0 : w.option) == null ? void 0 : D.appearance) == null ? void 0 : E.regular) ?? Ne.option.appearance.regular;
1371
- return /* @__PURE__ */ i(
1372
- $n,
1366
+ `, Qn = (e) => {
1367
+ var m, b, f, y, D, C;
1368
+ const { id: n, label: t, leadingIcon: a, onClose: o } = e, [i, u] = M(!1), l = () => u(!0), d = () => u(!1), s = Pe(qe), p = ((f = (b = (m = s == null ? void 0 : s.input) == null ? void 0 : m.option) == null ? void 0 : b.appearance) == null ? void 0 : f.hover) ?? re.option.appearance.hover, c = ((C = (D = (y = s == null ? void 0 : s.input) == null ? void 0 : y.option) == null ? void 0 : D.appearance) == null ? void 0 : C.regular) ?? re.option.appearance.regular;
1369
+ return /* @__PURE__ */ r(
1370
+ Gn,
1373
1371
  {
1374
- id: t,
1372
+ id: n,
1375
1373
  onMouseEnter: l,
1376
- onMouseLeave: s,
1377
- onClick: (x) => {
1378
- x.stopPropagation();
1374
+ onMouseLeave: d,
1375
+ onClick: (N) => {
1376
+ N.stopPropagation();
1379
1377
  },
1380
- children: /* @__PURE__ */ g(
1381
- he,
1378
+ children: /* @__PURE__ */ h(
1379
+ X,
1382
1380
  {
1383
1381
  alignItems: "center",
1384
1382
  gap: "8px",
1385
1383
  templateColumns: "auto 1fr auto",
1386
1384
  width: "100%",
1387
1385
  children: [
1388
- r && /* @__PURE__ */ i(
1389
- M,
1386
+ a && /* @__PURE__ */ r(
1387
+ R,
1390
1388
  {
1391
- icon: r,
1389
+ icon: a,
1392
1390
  size: "medium",
1393
- appearance: o ? p : u
1391
+ appearance: i ? p : c
1394
1392
  }
1395
1393
  ),
1396
- /* @__PURE__ */ i(
1397
- k,
1394
+ /* @__PURE__ */ r(
1395
+ w,
1398
1396
  {
1399
1397
  textAlign: "start",
1400
1398
  size: "medium",
1401
- appearance: o ? p : u,
1402
- children: n
1399
+ appearance: i ? p : c,
1400
+ children: t
1403
1401
  }
1404
1402
  ),
1405
- /* @__PURE__ */ i(
1406
- M,
1403
+ /* @__PURE__ */ r(
1404
+ R,
1407
1405
  {
1408
- icon: /* @__PURE__ */ i(St, {}),
1406
+ icon: /* @__PURE__ */ r(Le, {}),
1409
1407
  size: "small",
1410
- onClick: (x) => {
1411
- x.stopPropagation(), a == null || a();
1408
+ onClick: (N) => {
1409
+ N.stopPropagation(), o == null || o();
1412
1410
  },
1413
- appearance: o ? p : u,
1411
+ appearance: i ? p : c,
1414
1412
  cursorHover: !0
1415
1413
  }
1416
1414
  )
@@ -1419,54 +1417,54 @@ const kn = N.div`
1419
1417
  )
1420
1418
  }
1421
1419
  );
1422
- }, aa = (e) => {
1420
+ }, Ot = (e) => {
1423
1421
  const {
1424
- appliedFilters: t = [],
1425
- onClear: n,
1426
- onClick: r,
1427
- noFiltersLabel: a,
1428
- titleClearFilter: o,
1429
- titleFilter: c
1430
- } = e, l = le(null), s = le(null), d = le(null), {
1422
+ appliedFilters: n = [],
1423
+ onClear: t,
1424
+ onClick: a,
1425
+ noFiltersLabel: o,
1426
+ titleClearFilter: i,
1427
+ titleFilter: u
1428
+ } = e, l = Y(null), d = Y(null), s = Y(null), {
1431
1429
  visible: p,
1432
- hidden: u,
1433
- showOverflowIndicator: h,
1434
- measurementRef: m
1435
- } = Dn(l, t), [f, w] = V(!1), D = (y) => {
1436
- y.stopPropagation(), w((R) => !R);
1430
+ hidden: c,
1431
+ showOverflowIndicator: m,
1432
+ measurementRef: b
1433
+ } = jn(l, n), [f, y] = M(!1), D = (v) => {
1434
+ v.stopPropagation(), y((k) => !k);
1437
1435
  };
1438
- ke(() => {
1439
- const y = (R) => {
1440
- var re, q;
1441
- const I = R.target;
1442
- !((re = s.current) != null && re.contains(I)) && !((q = d.current) != null && q.contains(I)) && w(!1);
1436
+ oe(() => {
1437
+ const v = (k) => {
1438
+ var se, ce;
1439
+ const L = k.target;
1440
+ !((se = d.current) != null && se.contains(L)) && !((ce = s.current) != null && ce.contains(L)) && y(!1);
1443
1441
  };
1444
- return f && window.addEventListener("mousedown", y), () => window.removeEventListener("mousedown", y);
1442
+ return f && window.addEventListener("mousedown", v), () => window.removeEventListener("mousedown", v);
1445
1443
  }, [f]);
1446
- const E = t.length === 0, x = f && u.length > 0, S = u.map((y) => ({
1447
- id: y.label,
1448
- value: y.label,
1449
- label: y.label,
1450
- icon: y.icon
1451
- })), T = (y) => {
1452
- var R, I;
1453
- (I = (R = u.find((F) => F.label === y)) == null ? void 0 : R.onClose) == null || I.call(R), w(!1);
1444
+ const C = n.length === 0, N = f && c.length > 0, A = c.map((v) => ({
1445
+ id: v.label,
1446
+ value: v.label,
1447
+ label: v.label,
1448
+ icon: v.icon
1449
+ })), $ = (v) => {
1450
+ var k, L;
1451
+ (L = (k = c.find((I) => I.label === v)) == null ? void 0 : k.onClose) == null || L.call(k), y(!1);
1454
1452
  };
1455
- return /* @__PURE__ */ g(Sn, { borderRadius: "8px", width: "100%", children: [
1456
- /* @__PURE__ */ i(Rn, { ref: m, children: t.map((y) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
1457
- X,
1453
+ return /* @__PURE__ */ h(Hn, { borderRadius: "8px", width: "100%", children: [
1454
+ /* @__PURE__ */ r(qn, { ref: b, children: n.map((v) => /* @__PURE__ */ r("div", { "data-filter-tag": "true", children: /* @__PURE__ */ r(
1455
+ q,
1458
1456
  {
1459
1457
  appearance: "primary",
1460
1458
  displayIcon: !0,
1461
1459
  removable: !0,
1462
- icon: y.icon,
1463
- label: y.label,
1464
- onClose: y.onClose
1460
+ icon: v.icon,
1461
+ label: v.label,
1462
+ onClose: v.onClose
1465
1463
  }
1466
- ) }, y.label)) }),
1467
- /* @__PURE__ */ g(he, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
1468
- /* @__PURE__ */ i(
1469
- _,
1464
+ ) }, v.label)) }),
1465
+ /* @__PURE__ */ h(X, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
1466
+ /* @__PURE__ */ r(
1467
+ z,
1470
1468
  {
1471
1469
  ref: l,
1472
1470
  background: !0,
@@ -1477,50 +1475,50 @@ const kn = N.div`
1477
1475
  alignItems: "center",
1478
1476
  padding: "0px 8px",
1479
1477
  border: !0,
1480
- children: E ? /* @__PURE__ */ i(k, { size: "small", type: "label", appearance: "gray", children: a }) : /* @__PURE__ */ g(O, { children: [
1481
- p.map((y) => /* @__PURE__ */ i(
1482
- X,
1478
+ children: C ? /* @__PURE__ */ r(w, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ h(E, { children: [
1479
+ p.map((v) => /* @__PURE__ */ r(
1480
+ q,
1483
1481
  {
1484
1482
  "data-filter-tag": "true",
1485
1483
  appearance: "primary",
1486
1484
  displayIcon: !0,
1487
1485
  removable: !0,
1488
- icon: y.icon,
1489
- label: y.label,
1490
- onClose: y.onClose
1486
+ icon: v.icon,
1487
+ label: v.label,
1488
+ onClose: v.onClose
1491
1489
  },
1492
- y.label
1490
+ v.label
1493
1491
  )),
1494
- h && /* @__PURE__ */ g(
1492
+ m && /* @__PURE__ */ h(
1495
1493
  "div",
1496
1494
  {
1497
- ref: d,
1495
+ ref: s,
1498
1496
  style: { position: "relative", display: "inline-block" },
1499
1497
  children: [
1500
- /* @__PURE__ */ i(An, { onClick: D, children: /* @__PURE__ */ i(
1501
- X,
1498
+ /* @__PURE__ */ r(Pn, { onClick: D, children: /* @__PURE__ */ r(
1499
+ q,
1502
1500
  {
1503
1501
  appearance: "primary",
1504
- label: `+${u.length}`
1502
+ label: `+${c.length}`
1505
1503
  }
1506
1504
  ) }),
1507
- x && /* @__PURE__ */ i(kn, { ref: s, children: /* @__PURE__ */ i(
1508
- $t,
1505
+ N && /* @__PURE__ */ r(_n, { ref: d, children: /* @__PURE__ */ r(
1506
+ He,
1509
1507
  {
1510
- options: S,
1511
- onOptionClick: T,
1512
- children: u.map((y) => /* @__PURE__ */ i(
1513
- On,
1508
+ options: A,
1509
+ onOptionClick: $,
1510
+ children: c.map((v) => /* @__PURE__ */ r(
1511
+ Qn,
1514
1512
  {
1515
- id: y.label,
1516
- label: y.label,
1517
- leadingIcon: y.icon,
1513
+ id: v.label,
1514
+ label: v.label,
1515
+ leadingIcon: v.icon,
1518
1516
  onClose: () => {
1519
- var R;
1520
- (R = y.onClose) == null || R.call(y), w(!1);
1517
+ var k;
1518
+ (k = v.onClose) == null || k.call(v), y(!1);
1521
1519
  }
1522
1520
  },
1523
- y.label
1521
+ v.label
1524
1522
  ))
1525
1523
  }
1526
1524
  ) })
@@ -1530,35 +1528,35 @@ const kn = N.div`
1530
1528
  ] })
1531
1529
  }
1532
1530
  ),
1533
- /* @__PURE__ */ i(
1534
- P,
1531
+ /* @__PURE__ */ r(
1532
+ U,
1535
1533
  {
1536
1534
  cursorHover: !0,
1537
- disabled: E,
1538
- iconBefore: /* @__PURE__ */ i(Ze, {}),
1539
- onClick: n,
1535
+ disabled: C,
1536
+ iconBefore: /* @__PURE__ */ r(Ce, {}),
1537
+ onClick: t,
1540
1538
  variant: "outlined",
1541
- children: o
1539
+ children: i
1542
1540
  }
1543
1541
  ),
1544
- /* @__PURE__ */ i(
1545
- P,
1542
+ /* @__PURE__ */ r(
1543
+ U,
1546
1544
  {
1547
1545
  cursorHover: !0,
1548
- iconBefore: /* @__PURE__ */ i(et, {}),
1549
- onClick: r,
1546
+ iconBefore: /* @__PURE__ */ r(De, {}),
1547
+ onClick: a,
1550
1548
  variant: "outlined",
1551
- children: c
1549
+ children: u
1552
1550
  }
1553
1551
  )
1554
1552
  ] })
1555
1553
  ] });
1556
- }, Fn = N.div`
1554
+ }, Wn = T.div`
1557
1555
  display: flex;
1558
1556
  flex-direction: column;
1559
1557
  background-color: ${({ theme: e }) => {
1560
- var t, n;
1561
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || C.palette.neutral.N0;
1558
+ var n, t;
1559
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || x.palette.neutral.N0;
1562
1560
  }};
1563
1561
  width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
1564
1562
  height: auto;
@@ -1566,77 +1564,77 @@ const kn = N.div`
1566
1564
  padding: 24px;
1567
1565
  gap: 24px;
1568
1566
  box-sizing: border-box;
1569
- `, ia = (e) => {
1567
+ `, Mt = (e) => {
1570
1568
  const {
1571
- actionButtonLabel: t,
1572
- cancelButtonLabel: n,
1573
- children: r,
1574
- loading: a,
1575
- onClick: o,
1576
- onCloseModal: c,
1569
+ actionButtonLabel: n,
1570
+ cancelButtonLabel: t,
1571
+ children: a,
1572
+ loading: o,
1573
+ onClick: i,
1574
+ onCloseModal: u,
1577
1575
  portalId: l,
1578
- title: s
1579
- } = e, d = H("(max-width: 768px)"), p = document.getElementById(l);
1576
+ title: d
1577
+ } = e, s = H("(max-width: 768px)"), p = document.getElementById(l);
1580
1578
  if (!p)
1581
1579
  throw new Error(
1582
1580
  "The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
1583
1581
  );
1584
- return at(
1585
- /* @__PURE__ */ i(tt, { children: /* @__PURE__ */ g(Fn, { $smallScreen: d, children: [
1586
- /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
1587
- /* @__PURE__ */ g(b, { alignContent: "center", justifyContent: "space-between", children: [
1588
- /* @__PURE__ */ i(k, { appearance: "dark", size: "small", type: "headline", children: s }),
1589
- /* @__PURE__ */ g(b, { alignItems: "center", children: [
1590
- /* @__PURE__ */ i(k, { children: "Cerrar" }),
1591
- /* @__PURE__ */ i(
1592
- M,
1582
+ return Ee(
1583
+ /* @__PURE__ */ r(Se, { children: /* @__PURE__ */ h(Wn, { $smallScreen: s, children: [
1584
+ /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
1585
+ /* @__PURE__ */ h(g, { alignContent: "center", justifyContent: "space-between", children: [
1586
+ /* @__PURE__ */ r(w, { appearance: "dark", size: "small", type: "headline", children: d }),
1587
+ /* @__PURE__ */ h(g, { alignItems: "center", children: [
1588
+ /* @__PURE__ */ r(w, { children: "Cerrar" }),
1589
+ /* @__PURE__ */ r(
1590
+ R,
1593
1591
  {
1594
1592
  appearance: "dark",
1595
- icon: /* @__PURE__ */ i(Ye, {}),
1596
- onClick: c,
1593
+ icon: /* @__PURE__ */ r(ye, {}),
1594
+ onClick: u,
1597
1595
  cursorHover: !0
1598
1596
  }
1599
1597
  )
1600
1598
  ] })
1601
1599
  ] }),
1602
- /* @__PURE__ */ i(L, {})
1600
+ /* @__PURE__ */ r(F, {})
1603
1601
  ] }),
1604
- r,
1605
- /* @__PURE__ */ g(b, { gap: "20px", justifyContent: "flex-end", children: [
1606
- /* @__PURE__ */ i(
1607
- P,
1602
+ a,
1603
+ /* @__PURE__ */ h(g, { gap: "20px", justifyContent: "flex-end", children: [
1604
+ /* @__PURE__ */ r(
1605
+ U,
1608
1606
  {
1609
1607
  appearance: "gray",
1610
- onClick: c,
1611
- iconBefore: /* @__PURE__ */ i(Ze, {}),
1608
+ onClick: u,
1609
+ iconBefore: /* @__PURE__ */ r(Ce, {}),
1612
1610
  spacing: "wide",
1613
1611
  variant: "outlined",
1614
- children: n
1612
+ children: t
1615
1613
  }
1616
1614
  ),
1617
- /* @__PURE__ */ i(
1618
- P,
1615
+ /* @__PURE__ */ r(
1616
+ U,
1619
1617
  {
1620
1618
  appearance: "primary",
1621
- loading: a,
1622
- onClick: o,
1619
+ loading: o,
1620
+ onClick: i,
1623
1621
  spacing: "wide",
1624
1622
  variant: "filled",
1625
- children: t
1623
+ children: n
1626
1624
  }
1627
1625
  )
1628
1626
  ] })
1629
1627
  ] }) }),
1630
1628
  p
1631
1629
  );
1632
- }, oa = (e) => {
1633
- const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: a } = e, o = H("(max-width: 768px)"), c = !t || t.length === 0;
1634
- return /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
1635
- o && /* @__PURE__ */ g(O, { children: [
1636
- /* @__PURE__ */ g(b, { gap: "6px", width: "100%", alignItems: "center", children: [
1637
- /* @__PURE__ */ i(M, { appearance: "gray", icon: /* @__PURE__ */ i(et, {}) }),
1638
- /* @__PURE__ */ i(
1639
- _,
1630
+ }, Lt = (e) => {
1631
+ const { appliedFilters: n, fields: t, onChange: a, noFiltersLabel: o } = e, i = H("(max-width: 768px)"), u = !n || n.length === 0;
1632
+ return /* @__PURE__ */ h(g, { direction: "column", gap: "16px", children: [
1633
+ i && /* @__PURE__ */ h(E, { children: [
1634
+ /* @__PURE__ */ h(g, { gap: "6px", width: "100%", alignItems: "center", children: [
1635
+ /* @__PURE__ */ r(R, { appearance: "gray", icon: /* @__PURE__ */ r(De, {}) }),
1636
+ /* @__PURE__ */ r(
1637
+ z,
1640
1638
  {
1641
1639
  background: !0,
1642
1640
  borderRadius: "8px",
@@ -1647,8 +1645,8 @@ const kn = N.div`
1647
1645
  border: !0,
1648
1646
  width: "100%",
1649
1647
  height: "36px",
1650
- children: c ? /* @__PURE__ */ i(k, { size: "small", type: "label", appearance: "gray", children: a }) : t == null ? void 0 : t.map((l) => /* @__PURE__ */ i(
1651
- X,
1648
+ children: u ? /* @__PURE__ */ r(w, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((l) => /* @__PURE__ */ r(
1649
+ q,
1652
1650
  {
1653
1651
  appearance: "primary",
1654
1652
  displayIcon: !0,
@@ -1662,19 +1660,19 @@ const kn = N.div`
1662
1660
  }
1663
1661
  )
1664
1662
  ] }),
1665
- /* @__PURE__ */ i(L, { dashed: !0 })
1663
+ /* @__PURE__ */ r(F, { dashed: !0 })
1666
1664
  ] }),
1667
- n.map((l) => /* @__PURE__ */ g(b, { gap: "6px", alignItems: "center", children: [
1668
- /* @__PURE__ */ i(b, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(M, { appearance: "primary", icon: l.icon }) }),
1669
- /* @__PURE__ */ i(
1670
- Ot,
1665
+ t.map((l) => /* @__PURE__ */ h(g, { gap: "6px", alignItems: "center", children: [
1666
+ /* @__PURE__ */ r(g, { padding: "22px 0 0 0", children: /* @__PURE__ */ r(R, { appearance: "primary", icon: l.icon }) }),
1667
+ /* @__PURE__ */ r(
1668
+ je,
1671
1669
  {
1672
1670
  disabled: l.disabled,
1673
1671
  invalid: l.invalid,
1674
1672
  label: l.label,
1675
1673
  message: l.message,
1676
1674
  name: l.name,
1677
- onChange: r,
1675
+ onChange: a,
1678
1676
  options: l.options,
1679
1677
  placeholder: l.placeholder,
1680
1678
  required: l.required,
@@ -1685,137 +1683,137 @@ const kn = N.div`
1685
1683
  )
1686
1684
  ] }, l.name))
1687
1685
  ] });
1688
- }, In = (e) => {
1689
- const t = [];
1690
- return e.from !== void 0 && e.from !== null && t.push(`>${e.from}`), e.to !== void 0 && e.to !== null && t.push(`<${e.to}`), t.join(";");
1691
- }, la = (e) => {
1692
- var c;
1693
- const { decision: t, fallbackId: n, template: r } = e, a = (l) => typeof l == "object" && l !== null && "from" in l && "to" in l ? In(l) : l, o = ((c = t.conditionsThatEstablishesTheDecision) == null ? void 0 : c.map((l, s) => {
1694
- var u;
1695
- const d = l == null ? void 0 : l.value;
1696
- return d == null || typeof d == "string" && d.trim() === "" || Array.isArray(d) && d.length === 0 ? null : {
1697
- ...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
1686
+ }, Yn = (e) => {
1687
+ const n = [];
1688
+ 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(";");
1689
+ }, zt = (e) => {
1690
+ var u;
1691
+ const { decision: n, fallbackId: t, template: a } = e, o = (l) => typeof l == "object" && l !== null && "from" in l && "to" in l ? Yn(l) : l, i = ((u = n.conditionsThatEstablishesTheDecision) == null ? void 0 : u.map((l, d) => {
1692
+ var c;
1693
+ const s = l == null ? void 0 : l.value;
1694
+ return s == null || typeof s == "string" && s.trim() === "" || Array.isArray(s) && s.length === 0 ? null : {
1695
+ ...(c = a.conditionsThatEstablishesTheDecision) == null ? void 0 : c[d],
1698
1696
  ...l,
1699
- value: a(d)
1697
+ value: o(s)
1700
1698
  };
1701
1699
  }).filter(Boolean)) ?? [];
1702
1700
  return {
1703
- ...r,
1704
- ...t,
1705
- decisionId: n,
1706
- value: a(t.value),
1707
- conditionsThatEstablishesTheDecision: o
1701
+ ...a,
1702
+ ...n,
1703
+ decisionId: t,
1704
+ value: o(n.value),
1705
+ conditionsThatEstablishesTheDecision: i
1708
1706
  };
1709
- }, sa = (e) => {
1707
+ }, Ut = (e) => {
1710
1708
  if (typeof e != "string") return e;
1711
- const t = e.split(";").map((r) => r.trim()), n = {};
1712
- for (const r of t)
1713
- if (r.startsWith(">")) {
1714
- const a = parseFloat(r.slice(1));
1715
- isNaN(a) || (n.from = a);
1716
- } else if (r.startsWith("<")) {
1717
- const a = parseFloat(r.slice(1));
1718
- isNaN(a) || (n.to = a);
1709
+ const n = e.split(";").map((a) => a.trim()), t = {};
1710
+ for (const a of n)
1711
+ if (a.startsWith(">")) {
1712
+ const o = parseFloat(a.slice(1));
1713
+ isNaN(o) || (t.from = o);
1714
+ } else if (a.startsWith("<")) {
1715
+ const o = parseFloat(a.slice(1));
1716
+ isNaN(o) || (t.to = o);
1719
1717
  }
1720
- return n.from !== void 0 || n.to !== void 0 ? n : e;
1721
- }, ca = (e) => {
1722
- const { dataDecision: t, originalDecision: n } = e, r = {
1723
- conditionName: t.ruleName || "",
1724
- labelName: t.labelName || "",
1725
- conditionDataType: t.decisionDataType || "alphabetical",
1726
- value: t.value || "",
1727
- howToSetTheCondition: t.howToSetTheDecision || "EqualTo",
1718
+ return t.from !== void 0 || t.to !== void 0 ? t : e;
1719
+ }, Vt = (e) => {
1720
+ const { dataDecision: n, originalDecision: t } = e, a = {
1721
+ conditionName: n.ruleName || "",
1722
+ labelName: n.labelName || "",
1723
+ conditionDataType: n.decisionDataType || "alphabetical",
1724
+ value: n.value || "",
1725
+ howToSetTheCondition: n.howToSetTheDecision || "EqualTo",
1728
1726
  switchPlaces: !0,
1729
1727
  hidden: !1
1730
1728
  };
1731
1729
  return {
1732
- ...n,
1733
- conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1734
- (a) => a.hidden ? { ...r } : a
1730
+ ...t,
1731
+ conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
1732
+ (o) => o.hidden ? { ...a } : o
1735
1733
  )
1736
1734
  };
1737
- }, da = (e) => {
1738
- const { decisions: t } = e;
1739
- return t == null ? void 0 : t.map((n) => {
1740
- var a;
1741
- const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
1742
- (o) => o.hidden
1735
+ }, Bt = (e) => {
1736
+ const { decisions: n } = e;
1737
+ return n == null ? void 0 : n.map((t) => {
1738
+ var o;
1739
+ const a = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
1740
+ (i) => i.hidden
1743
1741
  );
1744
- return r ? {
1745
- ...n,
1746
- ruleName: n.ruleName,
1747
- labelName: n.labelName,
1748
- decisionDataType: n.decisionDataType,
1749
- value: n.value,
1750
- howToSetTheDecision: n.howToSetTheDecision,
1751
- conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
1752
- (o) => o.hidden ? { ...r, hidden: !1 } : o
1742
+ return a ? {
1743
+ ...t,
1744
+ ruleName: t.ruleName,
1745
+ labelName: t.labelName,
1746
+ decisionDataType: t.decisionDataType,
1747
+ value: t.value,
1748
+ howToSetTheDecision: t.howToSetTheDecision,
1749
+ conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
1750
+ (i) => i.hidden ? { ...a, hidden: !1 } : i
1753
1751
  )
1754
- } : n;
1752
+ } : t;
1755
1753
  });
1756
- }, Ln = (e) => ({
1757
- schema: Re().required("Required").test(
1754
+ }, Kn = (e) => ({
1755
+ schema: ie().required("Required").test(
1758
1756
  "non-empty",
1759
1757
  "Value cannot be empty",
1760
- (t) => t != null && t.trim() !== ""
1758
+ (n) => n != null && n.trim() !== ""
1761
1759
  ),
1762
1760
  value: e
1763
- }), Mn = (e) => ({
1764
- schema: it().test(
1761
+ }), Jn = (e) => ({
1762
+ schema: $e().test(
1765
1763
  "isArrayOrString",
1766
1764
  "Must be an array of strings/numbers or a single string",
1767
- (t) => Array.isArray(t) ? t.every(
1768
- (n) => typeof n == "string" || typeof n == "number"
1769
- ) : typeof t == "string"
1765
+ (n) => Array.isArray(n) ? n.every(
1766
+ (t) => typeof t == "string" || typeof t == "number"
1767
+ ) : typeof n == "string"
1770
1768
  ),
1771
1769
  value: e
1772
- }), Un = (e) => ({
1773
- schema: it().test(
1770
+ }), Xn = (e) => ({
1771
+ schema: $e().test(
1774
1772
  "isArrayOrString",
1775
1773
  "Must be an array of strings/numbers or a single string",
1776
- (t) => Array.isArray(t) ? t.every(
1777
- (n) => typeof n == "string" || typeof n == "number"
1778
- ) : typeof t == "string"
1774
+ (n) => Array.isArray(n) ? n.every(
1775
+ (t) => typeof t == "string" || typeof t == "number"
1776
+ ) : typeof n == "string"
1779
1777
  ),
1780
1778
  value: e
1781
- }), Vn = (e) => {
1782
- const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
1779
+ }), Zn = (e) => {
1780
+ const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
1783
1781
  return {
1784
- schema: se({
1785
- from: we().required("Range From is required").max(n, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
1786
- to: we().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
1782
+ schema: K({
1783
+ from: ne().required("Range From is required").max(t, "'Range From' cannot be greater than 'Range To'").min(0, "'Range From' cannot be less than 0"),
1784
+ to: ne().min(0, "To value must be greater than or equal to 0").required("To value is required").test(
1787
1785
  "is-greater",
1788
1786
  "To value must be greater than From value",
1789
- function(r) {
1790
- const { from: a } = this.parent;
1791
- return r > a;
1787
+ function(a) {
1788
+ const { from: o } = this.parent;
1789
+ return a > o;
1792
1790
  }
1793
1791
  )
1794
1792
  }),
1795
- value: { from: t, to: n }
1793
+ value: { from: n, to: t }
1796
1794
  };
1797
- }, ve = (e, t) => t === U.PERCENTAGE ? {
1798
- schema: we().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
1795
+ }, ee = (e, n) => n === O.PERCENTAGE ? {
1796
+ schema: ne().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
1799
1797
  value: e
1800
1798
  } : {
1801
- schema: Re().required("Required"),
1799
+ schema: ie().required("Required"),
1802
1800
  value: e
1803
- }, _n = {
1804
- [A.LIST_OF_VALUES]: Mn,
1805
- [A.LIST_OF_VALUES_MULTI]: Un,
1806
- [A.RANGE]: Vn,
1807
- [A.GREATER_THAN]: ve,
1808
- [A.LESS_THAN]: ve,
1809
- [A.EQUAL]: ve
1810
- }, ze = (e) => _n[e] || Ln;
1811
- function Pn({
1801
+ }, et = {
1802
+ [S.LIST_OF_VALUES]: Jn,
1803
+ [S.LIST_OF_VALUES_MULTI]: Xn,
1804
+ [S.RANGE]: Zn,
1805
+ [S.GREATER_THAN]: ee,
1806
+ [S.LESS_THAN]: ee,
1807
+ [S.EQUAL]: ee
1808
+ }, fe = (e) => et[e] || Kn;
1809
+ function nt({
1812
1810
  decision: e,
1813
- onSubmitEvent: t,
1814
- textValues: n
1811
+ onSubmitEvent: n,
1812
+ textValues: t
1815
1813
  }) {
1816
- const r = {
1814
+ const a = {
1817
1815
  ruleName: e.ruleName || "",
1818
- decisionDataType: e.decisionDataType || U.ALPHABETICAL,
1816
+ decisionDataType: e.decisionDataType || O.ALPHABETICAL,
1819
1817
  howToSetTheDecision: e.howToSetTheDecision || "",
1820
1818
  value: e.value || "",
1821
1819
  effectiveFrom: e.effectiveFrom || "",
@@ -1825,108 +1823,108 @@ function Pn({
1825
1823
  checkClosed: !1,
1826
1824
  terms: !0
1827
1825
  };
1828
- let a;
1829
- const o = {
1830
- ruleName: Re().required("Name is required"),
1831
- value: _e(() => ze(
1832
- a.values.howToSetTheDecision
1826
+ let o;
1827
+ const i = {
1828
+ ruleName: ie().required("Name is required"),
1829
+ value: he(() => fe(
1830
+ o.values.howToSetTheDecision
1833
1831
  )(
1834
- a.values.value,
1835
- a.values.decisionDataType
1832
+ o.values.value,
1833
+ o.values.decisionDataType
1836
1834
  ).schema),
1837
- conditionsThatEstablishesTheDecision: _e((s, { parent: d }) => {
1838
- var h;
1839
- if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return se().shape({});
1840
- const u = (h = e.conditionsThatEstablishesTheDecision) == null ? void 0 : h.reduce(
1841
- (m, f) => {
1842
- if (a.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
1843
- const D = ze(
1835
+ conditionsThatEstablishesTheDecision: he((d, { parent: s }) => {
1836
+ var m;
1837
+ if ((s == null ? void 0 : s.toggleNone) && Object.keys(s.conditionsThatEstablishesTheDecision || {}).length > 0) return K().shape({});
1838
+ const c = (m = e.conditionsThatEstablishesTheDecision) == null ? void 0 : m.reduce(
1839
+ (b, f) => {
1840
+ if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
1841
+ const D = fe(
1844
1842
  f.howToSetTheCondition
1845
1843
  );
1846
- m[f.conditionName] = D(
1844
+ b[f.conditionName] = D(
1847
1845
  f.value,
1848
1846
  f.conditionDataType
1849
1847
  ).schema;
1850
1848
  }
1851
- return m;
1849
+ return b;
1852
1850
  },
1853
1851
  {}
1854
1852
  );
1855
- return se(u).test(
1853
+ return K(c).test(
1856
1854
  "at-least-one-condition",
1857
1855
  "It must be at least one condition in order for the decision to be validated correctly.",
1858
- (m) => m ? Object.values(m).some(
1856
+ (b) => b ? Object.values(b).some(
1859
1857
  (f) => f != null && f !== ""
1860
1858
  ) : !1
1861
1859
  );
1862
1860
  })
1863
1861
  };
1864
- n.terms && (o.effectiveFrom = Pe().required(
1862
+ t.terms && (i.effectiveFrom = ge().required(
1865
1863
  "effective From date is required"
1866
- ), o.validUntil = Pe().when(
1864
+ ), i.validUntil = ge().when(
1867
1865
  "checkClosed",
1868
- (s, d, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? d.required("valid Until date is required").test(
1866
+ (d, s, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? s.required("valid Until date is required").test(
1869
1867
  "is-after-startDate",
1870
1868
  "valid Until date must be greater than or equal to Start date",
1871
- function(h) {
1872
- const m = this.parent.effectiveFrom;
1873
- return !m || !h ? !0 : new Date(h) >= new Date(m);
1869
+ function(m) {
1870
+ const b = this.parent.effectiveFrom;
1871
+ return !b || !m ? !0 : new Date(m) >= new Date(b);
1874
1872
  }
1875
- ) : d.notRequired()
1873
+ ) : s.notRequired()
1876
1874
  ));
1877
- const c = se(o);
1878
- return a = Mt({
1879
- initialValues: r,
1880
- validationSchema: c,
1875
+ const u = K(i);
1876
+ return o = Ge({
1877
+ initialValues: a,
1878
+ validationSchema: u,
1881
1879
  validateOnBlur: !0,
1882
- onSubmit: (s) => {
1880
+ onSubmit: (d) => {
1883
1881
  var p;
1884
- const d = {
1882
+ const s = {
1885
1883
  ...e,
1886
- ruleName: s.ruleName,
1887
- decisionDataType: s.decisionDataType,
1888
- howToSetTheDecision: s.howToSetTheDecision,
1889
- value: s.value,
1890
- effectiveFrom: s.effectiveFrom,
1891
- validUntil: s.validUntil,
1892
- conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((u) => {
1893
- const h = s.conditionsThatEstablishesTheDecision[u.conditionName];
1894
- return h != null && h !== "";
1895
- }).map((u) => ({
1896
- ...u,
1897
- value: s.conditionsThatEstablishesTheDecision[u.conditionName]
1884
+ ruleName: d.ruleName,
1885
+ decisionDataType: d.decisionDataType,
1886
+ howToSetTheDecision: d.howToSetTheDecision,
1887
+ value: d.value,
1888
+ effectiveFrom: d.effectiveFrom,
1889
+ validUntil: d.validUntil,
1890
+ conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((c) => {
1891
+ const m = d.conditionsThatEstablishesTheDecision[c.conditionName];
1892
+ return m != null && m !== "";
1893
+ }).map((c) => ({
1894
+ ...c,
1895
+ value: d.conditionsThatEstablishesTheDecision[c.conditionName]
1898
1896
  }))
1899
1897
  };
1900
- t(d);
1898
+ n(s);
1901
1899
  }
1902
- }), { formik: a, handleToggleNoneChange: (s) => {
1903
- var d;
1904
- a.setFieldValue("toggleNone", s), (d = e.conditionsThatEstablishesTheDecision) == null || d.forEach((p) => {
1905
- if (s)
1906
- a.setFieldValue(
1900
+ }), { formik: o, handleToggleNoneChange: (d) => {
1901
+ var s;
1902
+ o.setFieldValue("toggleNone", d), (s = e.conditionsThatEstablishesTheDecision) == null || s.forEach((p) => {
1903
+ if (d)
1904
+ o.setFieldValue(
1907
1905
  `conditionsThatEstablishesTheDecision.${p.conditionName}`,
1908
1906
  void 0
1909
1907
  );
1910
1908
  else {
1911
- const u = p.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
1912
- a.setFieldValue(
1909
+ const c = p.howToSetTheCondition === S.LIST_OF_VALUES_MULTI ? [] : "";
1910
+ o.setFieldValue(
1913
1911
  `conditionsThatEstablishesTheDecision.${p.conditionName}`,
1914
- u
1912
+ c
1915
1913
  );
1916
1914
  }
1917
1915
  });
1918
1916
  } };
1919
1917
  }
1920
- const Bn = N.div`
1918
+ const tt = T.div`
1921
1919
  & > div {
1922
1920
  border-radius: 8px;
1923
1921
  border: 1px solid
1924
1922
  ${({ theme: e }) => {
1925
- var t, n;
1926
- return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || C.palette.neutral.N30;
1923
+ var n, t;
1924
+ return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || x.palette.neutral.N30;
1927
1925
  }};
1928
1926
  }
1929
- `, jn = N.div`
1927
+ `, at = T.div`
1930
1928
  width: 100%;
1931
1929
  height: 100%;
1932
1930
  overflow-y: auto;
@@ -1943,61 +1941,61 @@ const Bn = N.div`
1943
1941
  background-color: #ebecf0;
1944
1942
  border-radius: 8px;
1945
1943
  }
1946
- `, zn = (e) => {
1944
+ `, rt = (e) => {
1947
1945
  const {
1948
- checked: t,
1949
- children: n,
1950
- handleToggleChange: r,
1951
- id: a,
1952
- labelToggle: o,
1953
- name: c,
1946
+ checked: n,
1947
+ children: t,
1948
+ handleToggleChange: a,
1949
+ id: o,
1950
+ labelToggle: i,
1951
+ name: u,
1954
1952
  valueToggle: l = ""
1955
- } = e, [s, d] = V(t), p = (u) => {
1956
- d(u.target.checked), r(u);
1953
+ } = e, [d, s] = M(n), p = (c) => {
1954
+ s(c.target.checked), a(c);
1957
1955
  };
1958
- return ke(() => {
1959
- d(t);
1960
- }, [t]), /* @__PURE__ */ g(O, { children: [
1961
- /* @__PURE__ */ i(b, { children: /* @__PURE__ */ i(
1962
- nt,
1956
+ return oe(() => {
1957
+ s(n);
1958
+ }, [n]), /* @__PURE__ */ h(E, { children: [
1959
+ /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(
1960
+ ke,
1963
1961
  {
1964
- checked: s,
1965
- id: a,
1966
- name: c,
1962
+ checked: d,
1963
+ id: o,
1964
+ name: u,
1967
1965
  onChange: p,
1968
1966
  size: "small",
1969
1967
  value: l,
1970
- children: /* @__PURE__ */ i(k, { size: "medium", type: "label", weight: "bold", children: o })
1968
+ children: /* @__PURE__ */ r(w, { size: "medium", type: "label", weight: "bold", children: i })
1971
1969
  }
1972
1970
  ) }),
1973
- s && /* @__PURE__ */ i(O, { children: n })
1971
+ d && /* @__PURE__ */ r(E, { children: t })
1974
1972
  ] });
1975
- }, Hn = (e) => {
1973
+ }, ot = (e) => {
1976
1974
  const {
1977
- onHandleStartChange: t,
1978
- onHandleEndChange: n,
1979
- onCheckClosedChange: r,
1980
- labelStart: a,
1981
- labelEnd: o,
1982
- checkedClosed: c = !1,
1975
+ onHandleStartChange: n,
1976
+ onHandleEndChange: t,
1977
+ onCheckClosedChange: a,
1978
+ labelStart: o,
1979
+ labelEnd: i,
1980
+ checkedClosed: u = !1,
1983
1981
  required: l = !1,
1984
- valueStart: s = "",
1985
- valueEnd: d = "",
1982
+ valueStart: d = "",
1983
+ valueEnd: s = "",
1986
1984
  messageStart: p = "",
1987
- messageEnd: u = "",
1988
- statusStart: h = "pending",
1989
- statusEnd: m = "pending"
1990
- } = e, [f, w] = V(c), [D, E] = V(s), [x, S] = V(d), T = ({ target: F }) => {
1991
- w(F.checked), r && r(F.checked);
1992
- }, y = (F) => {
1993
- E(F.target.value), t(F);
1994
- }, R = (F) => {
1995
- S(F.target.value), n(F);
1996
- }, I = H("(max-width: 400px)");
1997
- return /* @__PURE__ */ g(O, { children: [
1998
- /* @__PURE__ */ g(b, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1999
- /* @__PURE__ */ i(
2000
- k,
1985
+ messageEnd: c = "",
1986
+ statusStart: m = "pending",
1987
+ statusEnd: b = "pending"
1988
+ } = e, [f, y] = M(u), [D, C] = M(d), [N, A] = M(s), $ = ({ target: I }) => {
1989
+ y(I.checked), a && a(I.checked);
1990
+ }, v = (I) => {
1991
+ C(I.target.value), n(I);
1992
+ }, k = (I) => {
1993
+ A(I.target.value), t(I);
1994
+ }, L = H("(max-width: 400px)");
1995
+ return /* @__PURE__ */ h(E, { children: [
1996
+ /* @__PURE__ */ h(g, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
1997
+ /* @__PURE__ */ r(
1998
+ w,
2001
1999
  {
2002
2000
  appearance: "gray",
2003
2001
  margin: "10px 0",
@@ -2007,18 +2005,18 @@ const Bn = N.div`
2007
2005
  children: "Vigencia"
2008
2006
  }
2009
2007
  ),
2010
- /* @__PURE__ */ i(
2011
- b,
2008
+ /* @__PURE__ */ r(
2009
+ g,
2012
2010
  {
2013
2011
  alignContent: "center",
2014
2012
  justifyContent: "center",
2015
2013
  wrap: "wrap",
2016
2014
  gap: "4px",
2017
- children: /* @__PURE__ */ i(
2018
- Ft,
2015
+ children: /* @__PURE__ */ r(
2016
+ _e,
2019
2017
  {
2020
2018
  label: "Cerrada",
2021
- onChange: T,
2019
+ onChange: $,
2022
2020
  checked: f,
2023
2021
  value: ""
2024
2022
  }
@@ -2026,989 +2024,317 @@ const Bn = N.div`
2026
2024
  }
2027
2025
  )
2028
2026
  ] }),
2029
- /* @__PURE__ */ g(
2030
- b,
2027
+ /* @__PURE__ */ h(
2028
+ g,
2031
2029
  {
2032
- direction: I ? "column" : "row",
2030
+ direction: L ? "column" : "row",
2033
2031
  justifyContent: "space-between",
2034
2032
  gap: "24px",
2035
2033
  children: [
2036
- /* @__PURE__ */ i(
2037
- Ue,
2034
+ /* @__PURE__ */ r(
2035
+ ue,
2038
2036
  {
2039
2037
  id: "dateStart",
2040
- label: a,
2041
- onChange: y,
2038
+ label: o,
2039
+ onChange: v,
2042
2040
  value: D,
2043
2041
  required: l,
2044
2042
  size: "compact",
2045
- status: h,
2043
+ status: m,
2046
2044
  message: p
2047
2045
  }
2048
2046
  ),
2049
- f && /* @__PURE__ */ i(
2050
- Ue,
2047
+ f && /* @__PURE__ */ r(
2048
+ ue,
2051
2049
  {
2052
2050
  id: "dateEnd",
2053
- label: o,
2054
- onChange: R,
2055
- value: x,
2051
+ label: i,
2052
+ onChange: k,
2053
+ value: N,
2056
2054
  required: l,
2057
2055
  size: "compact",
2058
- status: m,
2059
- message: u
2056
+ status: b,
2057
+ message: c
2060
2058
  }
2061
2059
  )
2062
2060
  ]
2063
2061
  }
2064
2062
  )
2065
2063
  ] });
2066
- }, qn = (e) => {
2064
+ }, it = (e) => {
2067
2065
  const {
2068
- formik: t,
2069
- textValues: n,
2070
- onCancel: r,
2071
- visibleConditions: a,
2072
- normalizedDecision: o,
2073
- handleToggleNoneChange: c,
2066
+ formik: n,
2067
+ textValues: t,
2068
+ onCancel: a,
2069
+ visibleConditions: o,
2070
+ normalizedDecision: i,
2071
+ handleToggleNoneChange: u,
2074
2072
  handleConditionToggleChange: l,
2075
- showConditionsError: s,
2076
- termStartStatus: d,
2073
+ showConditionsError: d,
2074
+ termStartStatus: s,
2077
2075
  termEndStatus: p
2078
2076
  } = e;
2079
- return /* @__PURE__ */ i("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ g(b, { direction: "column", gap: "24px", children: [
2080
- Ve({
2081
- condition: o,
2082
- formik: t,
2077
+ return /* @__PURE__ */ r("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ h(g, { direction: "column", gap: "24px", children: [
2078
+ pe({
2079
+ condition: i,
2080
+ formik: n,
2083
2081
  isDecision: !0
2084
2082
  }),
2085
- /* @__PURE__ */ i(L, { dashed: !0 }),
2086
- /* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ g(
2087
- b,
2083
+ /* @__PURE__ */ r(F, { dashed: !0 }),
2084
+ /* @__PURE__ */ r(tt, { children: /* @__PURE__ */ r(at, { children: /* @__PURE__ */ h(
2085
+ g,
2088
2086
  {
2089
2087
  direction: "column",
2090
2088
  padding: "6px 12px",
2091
2089
  gap: "16px",
2092
2090
  height: "272px",
2093
2091
  children: [
2094
- /* @__PURE__ */ g(
2095
- b,
2092
+ /* @__PURE__ */ h(
2093
+ g,
2096
2094
  {
2097
2095
  justifyContent: "space-between",
2098
2096
  alignItems: "center",
2099
2097
  gap: "64px",
2100
2098
  children: [
2101
- /* @__PURE__ */ i(k, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
2102
- /* @__PURE__ */ i(
2103
- nt,
2099
+ /* @__PURE__ */ r(w, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
2100
+ /* @__PURE__ */ r(
2101
+ ke,
2104
2102
  {
2105
2103
  id: "toggleNone",
2106
- onChange: () => c(!t.values.toggleNone),
2107
- checked: t.values.toggleNone,
2104
+ onChange: () => u(!n.values.toggleNone),
2105
+ checked: n.values.toggleNone,
2108
2106
  size: "small",
2109
- children: /* @__PURE__ */ i(k, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
2107
+ children: /* @__PURE__ */ r(w, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
2110
2108
  }
2111
2109
  )
2112
2110
  ]
2113
2111
  }
2114
2112
  ),
2115
- /* @__PURE__ */ i(b, { direction: "column", gap: "20px", children: a == null ? void 0 : a.map((u) => /* @__PURE__ */ i(
2116
- zn,
2113
+ /* @__PURE__ */ r(g, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ r(
2114
+ rt,
2117
2115
  {
2118
- id: `toggle-${u.conditionName}`,
2119
- name: `toggle.${u.conditionName}`,
2120
- labelToggle: u.labelName,
2121
- checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
2122
- handleToggleChange: (h) => l(
2123
- u.conditionName,
2124
- u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
2125
- )(h.target.checked),
2126
- children: Ve({ condition: u, formik: t })
2116
+ id: `toggle-${c.conditionName}`,
2117
+ name: `toggle.${c.conditionName}`,
2118
+ labelToggle: c.labelName,
2119
+ checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
2120
+ handleToggleChange: (m) => l(
2121
+ c.conditionName,
2122
+ c.howToSetTheCondition === S.LIST_OF_VALUES_MULTI
2123
+ )(m.target.checked),
2124
+ children: pe({ condition: c, formik: n })
2127
2125
  },
2128
- u.conditionName
2126
+ c.conditionName
2129
2127
  )) })
2130
2128
  ]
2131
2129
  }
2132
2130
  ) }) }),
2133
- n.terms && /* @__PURE__ */ g(O, { children: [
2134
- /* @__PURE__ */ i(L, { dashed: !0 }),
2135
- /* @__PURE__ */ i(
2136
- Hn,
2131
+ t.terms && /* @__PURE__ */ h(E, { children: [
2132
+ /* @__PURE__ */ r(F, { dashed: !0 }),
2133
+ /* @__PURE__ */ r(
2134
+ ot,
2137
2135
  {
2138
- labelStart: n.termStart,
2139
- labelEnd: n.termEnd,
2140
- valueStart: t.values.effectiveFrom,
2141
- valueEnd: t.values.validUntil,
2142
- messageStart: t.errors.effectiveFrom,
2143
- messageEnd: t.errors.validUntil,
2144
- statusStart: d,
2136
+ labelStart: t.termStart,
2137
+ labelEnd: t.termEnd,
2138
+ valueStart: n.values.effectiveFrom,
2139
+ valueEnd: n.values.validUntil,
2140
+ messageStart: n.errors.effectiveFrom,
2141
+ messageEnd: n.errors.validUntil,
2142
+ statusStart: s,
2145
2143
  statusEnd: p,
2146
- onHandleStartChange: (u) => t.setFieldValue("effectiveFrom", u.target.value),
2147
- onHandleEndChange: (u) => t.setFieldValue("validUntil", u.target.value),
2148
- onCheckClosedChange: (u) => {
2149
- t.setFieldValue("checkClosed", u), u && t.setFieldValue("validUntil", "");
2144
+ onHandleStartChange: (c) => n.setFieldValue("effectiveFrom", c.target.value),
2145
+ onHandleEndChange: (c) => n.setFieldValue("validUntil", c.target.value),
2146
+ onCheckClosedChange: (c) => {
2147
+ n.setFieldValue("checkClosed", c), c && n.setFieldValue("validUntil", "");
2150
2148
  },
2151
- checkedClosed: t.values.checkClosed
2149
+ checkedClosed: n.values.checkClosed
2152
2150
  }
2153
2151
  )
2154
2152
  ] }),
2155
- /* @__PURE__ */ i(L, {}),
2156
- s && /* @__PURE__ */ i(k, { type: "label", size: "medium", appearance: "danger", children: String(t.errors.conditionsThatEstablishesTheDecision) }),
2157
- /* @__PURE__ */ g(b, { direction: "row", justifyContent: "end", gap: "16px", children: [
2158
- /* @__PURE__ */ i(P, { appearance: "gray", onClick: r, children: n.cancel }),
2159
- /* @__PURE__ */ i(P, { type: "submit", children: n.confirm })
2153
+ /* @__PURE__ */ r(F, {}),
2154
+ d && /* @__PURE__ */ r(w, { type: "label", size: "medium", appearance: "danger", children: String(n.errors.conditionsThatEstablishesTheDecision) }),
2155
+ /* @__PURE__ */ h(g, { direction: "row", justifyContent: "end", gap: "16px", children: [
2156
+ /* @__PURE__ */ r(U, { appearance: "gray", onClick: a, children: t.cancel }),
2157
+ /* @__PURE__ */ r(U, { type: "submit", children: t.confirm })
2160
2158
  ] })
2161
2159
  ] }) });
2162
- }, ut = (e) => {
2163
- var m;
2164
- const { decision: t, onSubmitEvent: n, textValues: r, onCancel: a } = e, { formik: o, handleToggleNoneChange: c } = Pn({
2165
- decision: t,
2166
- onSubmitEvent: n,
2167
- textValues: r
2160
+ }, Oe = (e) => {
2161
+ var b;
2162
+ const { decision: n, onSubmitEvent: t, textValues: a, onCancel: o } = e, { formik: i, handleToggleNoneChange: u } = nt({
2163
+ decision: n,
2164
+ onSubmitEvent: t,
2165
+ textValues: a
2168
2166
  }), l = {
2169
- ruleName: t.ruleName,
2170
- labelName: t.labelName,
2171
- howToSetTheCondition: t.howToSetTheDecision,
2172
- decisionDataType: t.decisionDataType,
2173
- listOfPossibleValues: t.listOfPossibleValues
2174
- }, s = ((m = t.conditionsThatEstablishesTheDecision) == null ? void 0 : m.filter(
2167
+ ruleName: n.ruleName,
2168
+ labelName: n.labelName,
2169
+ howToSetTheCondition: n.howToSetTheDecision,
2170
+ decisionDataType: n.decisionDataType,
2171
+ listOfPossibleValues: n.listOfPossibleValues
2172
+ }, d = ((b = n.conditionsThatEstablishesTheDecision) == null ? void 0 : b.filter(
2175
2173
  (f) => !f.hidden
2176
- )) || [], d = !!o.errors.conditionsThatEstablishesTheDecision && o.submitCount > 0, p = o.touched.effectiveFrom ? o.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = o.touched.validUntil ? o.errors.validUntil ? "invalid" : "valid" : void 0;
2177
- return /* @__PURE__ */ i(
2178
- qn,
2174
+ )) || [], s = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, p = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
2175
+ return /* @__PURE__ */ r(
2176
+ it,
2179
2177
  {
2180
- formik: o,
2181
- onCancel: a,
2182
- textValues: r,
2183
- decision: t,
2184
- visibleConditions: s,
2178
+ formik: i,
2179
+ onCancel: o,
2180
+ textValues: a,
2181
+ decision: n,
2182
+ visibleConditions: d,
2185
2183
  normalizedDecision: l,
2186
- handleToggleNoneChange: c,
2187
- handleConditionToggleChange: (f, w) => (D) => {
2184
+ handleToggleNoneChange: u,
2185
+ handleConditionToggleChange: (f, y) => (D) => {
2188
2186
  if (!D)
2189
- o.setFieldValue(
2187
+ i.setFieldValue(
2190
2188
  `conditionsThatEstablishesTheDecision.${f}`,
2191
2189
  void 0
2192
- ), o.setFieldTouched(
2190
+ ), i.setFieldTouched(
2193
2191
  `conditionsThatEstablishesTheDecision.${f}`,
2194
2192
  !1,
2195
2193
  !1
2196
2194
  );
2197
2195
  else {
2198
- const E = w ? [] : "";
2199
- o.setFieldValue(
2196
+ const C = y ? [] : "";
2197
+ i.setFieldValue(
2200
2198
  `conditionsThatEstablishesTheDecision.${f}`,
2201
- E
2199
+ C
2202
2200
  );
2203
2201
  }
2204
2202
  },
2205
- showConditionsError: d,
2203
+ showConditionsError: s,
2206
2204
  termStartStatus: p,
2207
- termEndStatus: u
2205
+ termEndStatus: c
2208
2206
  }
2209
2207
  );
2210
- }, ua = (e) => {
2211
- var a;
2212
- const { decisionTemplate: t } = e, n = { ...t }, r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
2213
- (o) => o.switchPlaces
2208
+ }, Ht = (e) => {
2209
+ var o;
2210
+ const { decisionTemplate: n } = e, t = { ...n }, a = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
2211
+ (i) => i.switchPlaces
2214
2212
  );
2215
- return r ? {
2216
- ...n,
2217
- ruleName: r.conditionName,
2218
- labelName: r.labelName,
2219
- decisionDataType: r.conditionDataType,
2220
- value: r.value,
2221
- howToSetTheDecision: r.howToSetTheCondition,
2222
- conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
2223
- (o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
2213
+ return a ? {
2214
+ ...t,
2215
+ ruleName: a.conditionName,
2216
+ labelName: a.labelName,
2217
+ decisionDataType: a.conditionDataType,
2218
+ value: a.value,
2219
+ howToSetTheDecision: a.howToSetTheCondition,
2220
+ conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
2221
+ (i) => i.conditionName === a.conditionName ? { ...i, hidden: !0 } : i
2224
2222
  )
2225
- } : n;
2226
- }, pa = (e) => {
2227
- const { decisions: t } = e;
2228
- return t == null ? void 0 : t.map((n) => {
2229
- var a;
2230
- const r = (a = n.conditionsThatEstablishesTheDecision) == null ? void 0 : a.find(
2231
- (o) => o.switchPlaces
2223
+ } : t;
2224
+ }, jt = (e) => {
2225
+ const { decisions: n } = e;
2226
+ return n == null ? void 0 : n.map((t) => {
2227
+ var o;
2228
+ const a = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
2229
+ (i) => i.switchPlaces
2232
2230
  );
2233
- return r ? {
2234
- ...n,
2235
- ruleName: r.conditionName,
2236
- labelName: r.labelName,
2237
- decisionDataType: r.conditionDataType,
2238
- value: r.value,
2239
- howToSetTheDecision: r.howToSetTheCondition,
2240
- conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
2241
- (o) => o.conditionName === r.conditionName ? { ...o, hidden: !0 } : o
2231
+ return a ? {
2232
+ ...t,
2233
+ ruleName: a.conditionName,
2234
+ labelName: a.labelName,
2235
+ decisionDataType: a.conditionDataType,
2236
+ value: a.value,
2237
+ howToSetTheDecision: a.howToSetTheCondition,
2238
+ conditionsThatEstablishesTheDecision: t.conditionsThatEstablishesTheDecision.map(
2239
+ (i) => i.conditionName === a.conditionName ? { ...i, hidden: !0 } : i
2242
2240
  )
2243
- } : n;
2244
- });
2245
- };
2246
- /**
2247
- * @remix-run/router v1.23.0
2248
- *
2249
- * Copyright (c) Remix Software Inc.
2250
- *
2251
- * This source code is licensed under the MIT license found in the
2252
- * LICENSE.md file in the root directory of this source tree.
2253
- *
2254
- * @license MIT
2255
- */
2256
- function Ee() {
2257
- return Ee = Object.assign ? Object.assign.bind() : function(e) {
2258
- for (var t = 1; t < arguments.length; t++) {
2259
- var n = arguments[t];
2260
- for (var r in n)
2261
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2262
- }
2263
- return e;
2264
- }, Ee.apply(this, arguments);
2265
- }
2266
- var He;
2267
- (function(e) {
2268
- e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
2269
- })(He || (He = {}));
2270
- function $(e, t) {
2271
- if (e === !1 || e === null || typeof e > "u")
2272
- throw new Error(t);
2273
- }
2274
- function te(e, t) {
2275
- if (!e) {
2276
- typeof console < "u" && console.warn(t);
2277
- try {
2278
- throw new Error(t);
2279
- } catch {
2280
- }
2281
- }
2282
- }
2283
- function Se(e) {
2284
- let {
2285
- pathname: t = "/",
2286
- search: n = "",
2287
- hash: r = ""
2288
- } = e;
2289
- return n && n !== "?" && (t += n.charAt(0) === "?" ? n : "?" + n), r && r !== "#" && (t += r.charAt(0) === "#" ? r : "#" + r), t;
2290
- }
2291
- function pt(e) {
2292
- let t = {};
2293
- if (e) {
2294
- let n = e.indexOf("#");
2295
- n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
2296
- let r = e.indexOf("?");
2297
- r >= 0 && (t.search = e.substr(r), e = e.substr(0, r)), e && (t.pathname = e);
2298
- }
2299
- return t;
2300
- }
2301
- var qe;
2302
- (function(e) {
2303
- e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
2304
- })(qe || (qe = {}));
2305
- function We(e, t) {
2306
- typeof e == "string" && (e = {
2307
- path: e,
2308
- caseSensitive: !1,
2309
- end: !0
2241
+ } : t;
2310
2242
  });
2311
- let [n, r] = Wn(e.path, e.caseSensitive, e.end), a = t.match(n);
2312
- if (!a) return null;
2313
- let o = a[0], c = o.replace(/(.)\/+$/, "$1"), l = a.slice(1);
2314
- return {
2315
- params: r.reduce((d, p, u) => {
2316
- let {
2317
- paramName: h,
2318
- isOptional: m
2319
- } = p;
2320
- if (h === "*") {
2321
- let w = l[u] || "";
2322
- c = o.slice(0, o.length - w.length).replace(/(.)\/+$/, "$1");
2323
- }
2324
- const f = l[u];
2325
- return m && !f ? d[h] = void 0 : d[h] = (f || "").replace(/%2F/g, "/"), d;
2326
- }, {}),
2327
- pathname: o,
2328
- pathnameBase: c,
2329
- pattern: e
2330
- };
2331
- }
2332
- function Wn(e, t, n) {
2333
- t === void 0 && (t = !1), n === void 0 && (n = !0), te(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
2334
- let r = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (c, l, s) => (r.push({
2335
- paramName: l,
2336
- isOptional: s != null
2337
- }), s ? "/?([^\\/]+)?" : "/([^\\/]+)"));
2338
- return e.endsWith("*") ? (r.push({
2339
- paramName: "*"
2340
- }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), r];
2341
- }
2342
- function G(e, t) {
2343
- if (t === "/") return e;
2344
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
2345
- return null;
2346
- let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
2347
- return r && r !== "/" ? null : e.slice(n) || "/";
2348
- }
2349
- function Gn(e, t) {
2350
- t === void 0 && (t = "/");
2351
- let {
2352
- pathname: n,
2353
- search: r = "",
2354
- hash: a = ""
2355
- } = typeof e == "string" ? pt(e) : e;
2356
- return {
2357
- pathname: n ? n.startsWith("/") ? n : Kn(n, t) : t,
2358
- search: Jn(r),
2359
- hash: Yn(a)
2360
- };
2361
- }
2362
- function Kn(e, t) {
2363
- let n = t.replace(/\/+$/, "").split("/");
2364
- return e.split("/").forEach((a) => {
2365
- a === ".." ? n.length > 1 && n.pop() : a !== "." && n.push(a);
2366
- }), n.length > 1 ? n.join("/") : "/";
2367
- }
2368
- function ye(e, t, n, r) {
2369
- return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(r) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
2370
- }
2371
- function Qn(e) {
2372
- return e.filter((t, n) => n === 0 || t.route.path && t.route.path.length > 0);
2373
- }
2374
- function ht(e, t) {
2375
- let n = Qn(e);
2376
- return t ? n.map((r, a) => a === n.length - 1 ? r.pathname : r.pathnameBase) : n.map((r) => r.pathnameBase);
2377
- }
2378
- function gt(e, t, n, r) {
2379
- r === void 0 && (r = !1);
2380
- let a;
2381
- typeof e == "string" ? a = pt(e) : (a = Ee({}, e), $(!a.pathname || !a.pathname.includes("?"), ye("?", "pathname", "search", a)), $(!a.pathname || !a.pathname.includes("#"), ye("#", "pathname", "hash", a)), $(!a.search || !a.search.includes("#"), ye("#", "search", "hash", a)));
2382
- let o = e === "" || a.pathname === "", c = o ? "/" : a.pathname, l;
2383
- if (c == null)
2384
- l = n;
2385
- else {
2386
- let u = t.length - 1;
2387
- if (!r && c.startsWith("..")) {
2388
- let h = c.split("/");
2389
- for (; h[0] === ".."; )
2390
- h.shift(), u -= 1;
2391
- a.pathname = h.join("/");
2392
- }
2393
- l = u >= 0 ? t[u] : "/";
2394
- }
2395
- let s = Gn(a, l), d = c && c !== "/" && c.endsWith("/"), p = (o || c === ".") && n.endsWith("/");
2396
- return !s.pathname.endsWith("/") && (d || p) && (s.pathname += "/"), s;
2397
- }
2398
- const $e = (e) => e.join("/").replace(/\/\/+/g, "/"), Jn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Yn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ft = ["post", "put", "patch", "delete"];
2399
- new Set(ft);
2400
- const Xn = ["get", ...ft];
2401
- new Set(Xn);
2402
- /**
2403
- * React Router v6.30.1
2404
- *
2405
- * Copyright (c) Remix Software Inc.
2406
- *
2407
- * This source code is licensed under the MIT license found in the
2408
- * LICENSE.md file in the root directory of this source tree.
2409
- *
2410
- * @license MIT
2411
- */
2412
- function De() {
2413
- return De = Object.assign ? Object.assign.bind() : function(e) {
2414
- for (var t = 1; t < arguments.length; t++) {
2415
- var n = arguments[t];
2416
- for (var r in n)
2417
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2418
- }
2419
- return e;
2420
- }, De.apply(this, arguments);
2421
- }
2422
- const fe = /* @__PURE__ */ v.createContext(null);
2423
- process.env.NODE_ENV !== "production" && (fe.displayName = "DataRouter");
2424
- const mt = /* @__PURE__ */ v.createContext(null);
2425
- process.env.NODE_ENV !== "production" && (mt.displayName = "DataRouterState");
2426
- const Zn = /* @__PURE__ */ v.createContext(null);
2427
- process.env.NODE_ENV !== "production" && (Zn.displayName = "Await");
2428
- const B = /* @__PURE__ */ v.createContext(null);
2429
- process.env.NODE_ENV !== "production" && (B.displayName = "Navigation");
2430
- const Oe = /* @__PURE__ */ v.createContext(null);
2431
- process.env.NODE_ENV !== "production" && (Oe.displayName = "Location");
2432
- const Q = /* @__PURE__ */ v.createContext({
2433
- outlet: null,
2434
- matches: [],
2435
- isDataRoute: !1
2436
- });
2437
- process.env.NODE_ENV !== "production" && (Q.displayName = "Route");
2438
- const er = /* @__PURE__ */ v.createContext(null);
2439
- process.env.NODE_ENV !== "production" && (er.displayName = "RouteError");
2440
- function tr(e, t) {
2441
- let {
2442
- relative: n
2443
- } = t === void 0 ? {} : t;
2444
- Fe() || (process.env.NODE_ENV !== "production" ? $(
2445
- !1,
2446
- // TODO: This error is probably because they somehow have 2 versions of the
2447
- // router loaded. We can help them understand how to avoid that.
2448
- "useHref() may be used only in the context of a <Router> component."
2449
- ) : $(!1));
2450
- let {
2451
- basename: r,
2452
- navigator: a
2453
- } = v.useContext(B), {
2454
- hash: o,
2455
- pathname: c,
2456
- search: l
2457
- } = ne(e, {
2458
- relative: n
2459
- }), s = c;
2460
- return r !== "/" && (s = c === "/" ? r : $e([r, c])), a.createHref({
2461
- pathname: s,
2462
- search: l,
2463
- hash: o
2464
- });
2465
- }
2466
- function Fe() {
2467
- return v.useContext(Oe) != null;
2468
- }
2469
- function J() {
2470
- return Fe() || (process.env.NODE_ENV !== "production" ? $(
2471
- !1,
2472
- // TODO: This error is probably because they somehow have 2 versions of the
2473
- // router loaded. We can help them understand how to avoid that.
2474
- "useLocation() may be used only in the context of a <Router> component."
2475
- ) : $(!1)), v.useContext(Oe).location;
2476
- }
2477
- const bt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
2478
- function vt(e) {
2479
- v.useContext(B).static || v.useLayoutEffect(e);
2480
- }
2481
- function nr() {
2482
- let {
2483
- isDataRoute: e
2484
- } = v.useContext(Q);
2485
- return e ? lr() : rr();
2486
- }
2487
- function rr() {
2488
- Fe() || (process.env.NODE_ENV !== "production" ? $(
2489
- !1,
2490
- // TODO: This error is probably because they somehow have 2 versions of the
2491
- // router loaded. We can help them understand how to avoid that.
2492
- "useNavigate() may be used only in the context of a <Router> component."
2493
- ) : $(!1));
2494
- let e = v.useContext(fe), {
2495
- basename: t,
2496
- future: n,
2497
- navigator: r
2498
- } = v.useContext(B), {
2499
- matches: a
2500
- } = v.useContext(Q), {
2501
- pathname: o
2502
- } = J(), c = JSON.stringify(ht(a, n.v7_relativeSplatPath)), l = v.useRef(!1);
2503
- return vt(() => {
2504
- l.current = !0;
2505
- }), v.useCallback(function(d, p) {
2506
- if (p === void 0 && (p = {}), process.env.NODE_ENV !== "production" && te(l.current, bt), !l.current) return;
2507
- if (typeof d == "number") {
2508
- r.go(d);
2509
- return;
2510
- }
2511
- let u = gt(d, JSON.parse(c), o, p.relative === "path");
2512
- e == null && t !== "/" && (u.pathname = u.pathname === "/" ? t : $e([t, u.pathname])), (p.replace ? r.replace : r.push)(u, p.state, p);
2513
- }, [t, r, c, o, e]);
2514
- }
2515
- function ne(e, t) {
2516
- let {
2517
- relative: n
2518
- } = t === void 0 ? {} : t, {
2519
- future: r
2520
- } = v.useContext(B), {
2521
- matches: a
2522
- } = v.useContext(Q), {
2523
- pathname: o
2524
- } = J(), c = JSON.stringify(ht(a, r.v7_relativeSplatPath));
2525
- return v.useMemo(() => gt(e, JSON.parse(c), o, n === "path"), [e, c, o, n]);
2526
- }
2527
- var yt = /* @__PURE__ */ function(e) {
2528
- return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
2529
- }(yt || {}), Ie = /* @__PURE__ */ function(e) {
2530
- return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
2531
- }(Ie || {});
2532
- function xt(e) {
2533
- return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
2534
- }
2535
- function ar(e) {
2536
- let t = v.useContext(fe);
2537
- return t || (process.env.NODE_ENV !== "production" ? $(!1, xt(e)) : $(!1)), t;
2538
- }
2539
- function ir(e) {
2540
- let t = v.useContext(Q);
2541
- return t || (process.env.NODE_ENV !== "production" ? $(!1, xt(e)) : $(!1)), t;
2542
- }
2543
- function wt(e) {
2544
- let t = ir(e), n = t.matches[t.matches.length - 1];
2545
- return n.route.id || (process.env.NODE_ENV !== "production" ? $(!1, e + ' can only be used on routes that contain a unique "id"') : $(!1)), n.route.id;
2546
- }
2547
- function or() {
2548
- return wt(Ie.UseRouteId);
2549
- }
2550
- function lr() {
2551
- let {
2552
- router: e
2553
- } = ar(yt.UseNavigateStable), t = wt(Ie.UseNavigateStable), n = v.useRef(!1);
2554
- return vt(() => {
2555
- n.current = !0;
2556
- }), v.useCallback(function(a, o) {
2557
- o === void 0 && (o = {}), process.env.NODE_ENV !== "production" && te(n.current, bt), n.current && (typeof a == "number" ? e.navigate(a) : e.navigate(a, De({
2558
- fromRouteId: t
2559
- }, o)));
2560
- }, [e, t]);
2561
- }
2562
- new Promise(() => {
2563
- });
2564
- /**
2565
- * React Router DOM v6.30.1
2566
- *
2567
- * Copyright (c) Remix Software Inc.
2568
- *
2569
- * This source code is licensed under the MIT license found in the
2570
- * LICENSE.md file in the root directory of this source tree.
2571
- *
2572
- * @license MIT
2573
- */
2574
- function K() {
2575
- return K = Object.assign ? Object.assign.bind() : function(e) {
2576
- for (var t = 1; t < arguments.length; t++) {
2577
- var n = arguments[t];
2578
- for (var r in n)
2579
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2580
- }
2581
- return e;
2582
- }, K.apply(this, arguments);
2583
- }
2584
- function Le(e, t) {
2585
- if (e == null) return {};
2586
- var n = {}, r = Object.keys(e), a, o;
2587
- for (o = 0; o < r.length; o++)
2588
- a = r[o], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
2589
- return n;
2590
- }
2591
- const ce = "get", de = "application/x-www-form-urlencoded";
2592
- function me(e) {
2593
- return e != null && typeof e.tagName == "string";
2594
- }
2595
- function sr(e) {
2596
- return me(e) && e.tagName.toLowerCase() === "button";
2597
- }
2598
- function cr(e) {
2599
- return me(e) && e.tagName.toLowerCase() === "form";
2600
- }
2601
- function dr(e) {
2602
- return me(e) && e.tagName.toLowerCase() === "input";
2603
- }
2604
- function ur(e) {
2605
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2606
- }
2607
- function pr(e, t) {
2608
- return e.button === 0 && // Ignore everything but left clicks
2609
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
2610
- !ur(e);
2611
- }
2612
- let ie = null;
2613
- function hr() {
2614
- if (ie === null)
2615
- try {
2616
- new FormData(
2617
- document.createElement("form"),
2618
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
2619
- 0
2620
- ), ie = !1;
2621
- } catch {
2622
- ie = !0;
2623
- }
2624
- return ie;
2625
- }
2626
- const gr = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
2627
- function xe(e) {
2628
- return e != null && !gr.has(e) ? (process.env.NODE_ENV !== "production" && te(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + de + '"')), null) : e;
2629
- }
2630
- function fr(e, t) {
2631
- let n, r, a, o, c;
2632
- if (cr(e)) {
2633
- let l = e.getAttribute("action");
2634
- r = l ? G(l, t) : null, n = e.getAttribute("method") || ce, a = xe(e.getAttribute("enctype")) || de, o = new FormData(e);
2635
- } else if (sr(e) || dr(e) && (e.type === "submit" || e.type === "image")) {
2636
- let l = e.form;
2637
- if (l == null)
2638
- throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
2639
- let s = e.getAttribute("formaction") || l.getAttribute("action");
2640
- if (r = s ? G(s, t) : null, n = e.getAttribute("formmethod") || l.getAttribute("method") || ce, a = xe(e.getAttribute("formenctype")) || xe(l.getAttribute("enctype")) || de, o = new FormData(l, e), !hr()) {
2641
- let {
2642
- name: d,
2643
- type: p,
2644
- value: u
2645
- } = e;
2646
- if (p === "image") {
2647
- let h = d ? d + "." : "";
2648
- o.append(h + "x", "0"), o.append(h + "y", "0");
2649
- } else d && o.append(d, u);
2650
- }
2651
- } else {
2652
- if (me(e))
2653
- throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
2654
- n = ce, r = null, a = de, c = e;
2655
- }
2656
- return o && a === "text/plain" && (c = o, o = void 0), {
2657
- action: r,
2658
- method: n.toLowerCase(),
2659
- encType: a,
2660
- formData: o,
2661
- body: c
2662
- };
2663
- }
2664
- const mr = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], br = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], vr = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], yr = "6";
2665
- try {
2666
- window.__reactRouterVersion = yr;
2667
- } catch {
2668
- }
2669
- const Tt = /* @__PURE__ */ v.createContext({
2670
- isTransitioning: !1
2671
- });
2672
- process.env.NODE_ENV !== "production" && (Tt.displayName = "ViewTransition");
2673
- const xr = /* @__PURE__ */ v.createContext(/* @__PURE__ */ new Map());
2674
- process.env.NODE_ENV !== "production" && (xr.displayName = "Fetchers");
2675
- process.env.NODE_ENV;
2676
- const wr = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Tr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Me = /* @__PURE__ */ v.forwardRef(function(t, n) {
2677
- let {
2678
- onClick: r,
2679
- relative: a,
2680
- reloadDocument: o,
2681
- replace: c,
2682
- state: l,
2683
- target: s,
2684
- to: d,
2685
- preventScrollReset: p,
2686
- viewTransition: u
2687
- } = t, h = Le(t, mr), {
2688
- basename: m
2689
- } = v.useContext(B), f, w = !1;
2690
- if (typeof d == "string" && Tr.test(d) && (f = d, wr))
2691
- try {
2692
- let S = new URL(window.location.href), T = d.startsWith("//") ? new URL(S.protocol + d) : new URL(d), y = G(T.pathname, m);
2693
- T.origin === S.origin && y != null ? d = y + T.search + T.hash : w = !0;
2694
- } catch {
2695
- process.env.NODE_ENV !== "production" && te(!1, '<Link to="' + d + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
2696
- }
2697
- let D = tr(d, {
2698
- relative: a
2699
- }), E = Sr(d, {
2700
- replace: c,
2701
- state: l,
2702
- target: s,
2703
- preventScrollReset: p,
2704
- relative: a,
2705
- viewTransition: u
2706
- });
2707
- function x(S) {
2708
- r && r(S), S.defaultPrevented || E(S);
2709
- }
2710
- return (
2711
- // eslint-disable-next-line jsx-a11y/anchor-has-content
2712
- /* @__PURE__ */ v.createElement("a", K({}, h, {
2713
- href: f || D,
2714
- onClick: w || o ? r : x,
2715
- ref: n,
2716
- target: s
2717
- }))
2718
- );
2719
- });
2720
- process.env.NODE_ENV !== "production" && (Me.displayName = "Link");
2721
- const Cr = /* @__PURE__ */ v.forwardRef(function(t, n) {
2722
- let {
2723
- "aria-current": r = "page",
2724
- caseSensitive: a = !1,
2725
- className: o = "",
2726
- end: c = !1,
2727
- style: l,
2728
- to: s,
2729
- viewTransition: d,
2730
- children: p
2731
- } = t, u = Le(t, br), h = ne(s, {
2732
- relative: u.relative
2733
- }), m = J(), f = v.useContext(mt), {
2734
- navigator: w,
2735
- basename: D
2736
- } = v.useContext(B), E = f != null && // Conditional usage is OK here because the usage of a data router is static
2737
- // eslint-disable-next-line react-hooks/rules-of-hooks
2738
- Or(h) && d === !0, x = w.encodeLocation ? w.encodeLocation(h).pathname : h.pathname, S = m.pathname, T = f && f.navigation && f.navigation.location ? f.navigation.location.pathname : null;
2739
- a || (S = S.toLowerCase(), T = T ? T.toLowerCase() : null, x = x.toLowerCase()), T && D && (T = G(T, D) || T);
2740
- const y = x !== "/" && x.endsWith("/") ? x.length - 1 : x.length;
2741
- let R = S === x || !c && S.startsWith(x) && S.charAt(y) === "/", I = T != null && (T === x || !c && T.startsWith(x) && T.charAt(x.length) === "/"), F = {
2742
- isActive: R,
2743
- isPending: I,
2744
- isTransitioning: E
2745
- }, re = R ? r : void 0, q;
2746
- typeof o == "function" ? q = o(F) : q = [o, R ? "active" : null, I ? "pending" : null, E ? "transitioning" : null].filter(Boolean).join(" ");
2747
- let Nt = typeof l == "function" ? l(F) : l;
2748
- return /* @__PURE__ */ v.createElement(Me, K({}, u, {
2749
- "aria-current": re,
2750
- className: q,
2751
- ref: n,
2752
- style: Nt,
2753
- to: s,
2754
- viewTransition: d
2755
- }), typeof p == "function" ? p(F) : p);
2756
- });
2757
- process.env.NODE_ENV !== "production" && (Cr.displayName = "NavLink");
2758
- const Nr = /* @__PURE__ */ v.forwardRef((e, t) => {
2759
- let {
2760
- fetcherKey: n,
2761
- navigate: r,
2762
- reloadDocument: a,
2763
- replace: o,
2764
- state: c,
2765
- method: l = ce,
2766
- action: s,
2767
- onSubmit: d,
2768
- relative: p,
2769
- preventScrollReset: u,
2770
- viewTransition: h
2771
- } = e, m = Le(e, vr), f = Ar(), w = $r(s, {
2772
- relative: p
2773
- }), D = l.toLowerCase() === "get" ? "get" : "post", E = (x) => {
2774
- if (d && d(x), x.defaultPrevented) return;
2775
- x.preventDefault();
2776
- let S = x.nativeEvent.submitter, T = (S == null ? void 0 : S.getAttribute("formmethod")) || l;
2777
- f(S || x.currentTarget, {
2778
- fetcherKey: n,
2779
- method: T,
2780
- navigate: r,
2781
- replace: o,
2782
- state: c,
2783
- relative: p,
2784
- preventScrollReset: u,
2785
- viewTransition: h
2786
- });
2787
- };
2788
- return /* @__PURE__ */ v.createElement("form", K({
2789
- ref: t,
2790
- method: D,
2791
- action: w,
2792
- onSubmit: a ? d : E
2793
- }, m));
2794
- });
2795
- process.env.NODE_ENV !== "production" && (Nr.displayName = "Form");
2796
- process.env.NODE_ENV;
2797
- var ue;
2798
- (function(e) {
2799
- e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
2800
- })(ue || (ue = {}));
2801
- var Ge;
2802
- (function(e) {
2803
- e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
2804
- })(Ge || (Ge = {}));
2805
- function Er(e) {
2806
- return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
2807
- }
2808
- function Ct(e) {
2809
- let t = v.useContext(fe);
2810
- return t || (process.env.NODE_ENV !== "production" ? $(!1, Er(e)) : $(!1)), t;
2811
- }
2812
- function Sr(e, t) {
2813
- let {
2814
- target: n,
2815
- replace: r,
2816
- state: a,
2817
- preventScrollReset: o,
2818
- relative: c,
2819
- viewTransition: l
2820
- } = t === void 0 ? {} : t, s = nr(), d = J(), p = ne(e, {
2821
- relative: c
2822
- });
2823
- return v.useCallback((u) => {
2824
- if (pr(u, n)) {
2825
- u.preventDefault();
2826
- let h = r !== void 0 ? r : Se(d) === Se(p);
2827
- s(e, {
2828
- replace: h,
2829
- state: a,
2830
- preventScrollReset: o,
2831
- relative: c,
2832
- viewTransition: l
2833
- });
2834
- }
2835
- }, [d, s, p, r, a, n, e, o, c, l]);
2836
- }
2837
- function Dr() {
2838
- if (typeof document > "u")
2839
- throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
2840
- }
2841
- let kr = 0, Rr = () => "__" + String(++kr) + "__";
2842
- function Ar() {
2843
- let {
2844
- router: e
2845
- } = Ct(ue.UseSubmit), {
2846
- basename: t
2847
- } = v.useContext(B), n = or();
2848
- return v.useCallback(function(r, a) {
2849
- a === void 0 && (a = {}), Dr();
2850
- let {
2851
- action: o,
2852
- method: c,
2853
- encType: l,
2854
- formData: s,
2855
- body: d
2856
- } = fr(r, t);
2857
- if (a.navigate === !1) {
2858
- let p = a.fetcherKey || Rr();
2859
- e.fetch(p, n, a.action || o, {
2860
- preventScrollReset: a.preventScrollReset,
2861
- formData: s,
2862
- body: d,
2863
- formMethod: a.method || c,
2864
- formEncType: a.encType || l,
2865
- flushSync: a.flushSync
2866
- });
2867
- } else
2868
- e.navigate(a.action || o, {
2869
- preventScrollReset: a.preventScrollReset,
2870
- formData: s,
2871
- body: d,
2872
- formMethod: a.method || c,
2873
- formEncType: a.encType || l,
2874
- replace: a.replace,
2875
- state: a.state,
2876
- fromRouteId: n,
2877
- flushSync: a.flushSync,
2878
- viewTransition: a.viewTransition
2879
- });
2880
- }, [e, t, n]);
2881
- }
2882
- function $r(e, t) {
2883
- let {
2884
- relative: n
2885
- } = t === void 0 ? {} : t, {
2886
- basename: r
2887
- } = v.useContext(B), a = v.useContext(Q);
2888
- a || (process.env.NODE_ENV !== "production" ? $(!1, "useFormAction must be used inside a RouteContext") : $(!1));
2889
- let [o] = a.matches.slice(-1), c = K({}, ne(e || ".", {
2890
- relative: n
2891
- })), l = J();
2892
- if (e == null) {
2893
- c.search = l.search;
2894
- let s = new URLSearchParams(c.search), d = s.getAll("index");
2895
- if (d.some((u) => u === "")) {
2896
- s.delete("index"), d.filter((h) => h).forEach((h) => s.append("index", h));
2897
- let u = s.toString();
2898
- c.search = u ? "?" + u : "";
2899
- }
2900
- }
2901
- return (!e || e === ".") && o.route.index && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (c.pathname = c.pathname === "/" ? r : $e([r, c.pathname])), Se(c);
2902
- }
2903
- function Or(e, t) {
2904
- t === void 0 && (t = {});
2905
- let n = v.useContext(Tt);
2906
- n == null && (process.env.NODE_ENV !== "production" ? $(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : $(!1));
2907
- let {
2908
- basename: r
2909
- } = Ct(ue.useViewTransitionState), a = ne(e, {
2910
- relative: t.relative
2911
- });
2912
- if (!n.isTransitioning)
2913
- return !1;
2914
- let o = G(n.currentLocation.pathname, r) || n.currentLocation.pathname, c = G(n.nextLocation.pathname, r) || n.nextLocation.pathname;
2915
- return We(a.pathname, c) != null || We(a.pathname, o) != null;
2916
- }
2917
- const W = {
2243
+ }, j = {
2918
2244
  item: {
2919
2245
  background: {
2920
- active: C.palette.blue.B50,
2921
- inactive: C.palette.neutral.N0,
2922
- hover: C.palette.neutral.N20,
2923
- disabled: C.palette.neutral.N20
2246
+ active: x.palette.blue.B50,
2247
+ inactive: x.palette.neutral.N0,
2248
+ hover: x.palette.neutral.N20,
2249
+ disabled: x.palette.neutral.N20
2924
2250
  }
2925
2251
  },
2926
2252
  border: {
2927
2253
  expanded: {
2928
- color: C.palette.blue.B400
2254
+ color: x.palette.blue.B400
2929
2255
  },
2930
2256
  contracted: {
2931
- color: C.palette.neutral.N0
2257
+ color: x.palette.neutral.N0
2932
2258
  }
2933
2259
  }
2934
- }, Fr = N.div`
2260
+ }, lt = T.div`
2935
2261
  & > div {
2936
2262
  border: 1px solid
2937
- ${({ theme: e, $active: t }) => {
2938
- var n, r, a, o;
2939
- return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) || W.border.expanded.color : ((o = (a = e == null ? void 0 : e.border) == null ? void 0 : a.contracted) == null ? void 0 : o.color) || W.border.contracted.color;
2263
+ ${({ theme: e, $active: n }) => {
2264
+ var t, a, o, i;
2265
+ return n ? ((a = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : a.color) || j.border.expanded.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : i.color) || j.border.contracted.color;
2940
2266
  }};
2941
2267
  }
2942
2268
  &:hover {
2943
2269
  cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
2944
- background-color: ${({ theme: e, $disabled: t }) => {
2945
- var n, r, a;
2946
- if (!t)
2947
- return ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.hover) || W.item.background.hover;
2270
+ background-color: ${({ theme: e, $disabled: n }) => {
2271
+ var t, a, o;
2272
+ if (!n)
2273
+ return ((o = (a = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : a.background) == null ? void 0 : o.hover) || j.item.background.hover;
2948
2274
  }};
2949
2275
  }
2950
- `, Ir = N.div`
2276
+ `, dt = T.div`
2951
2277
  display: block;
2952
2278
  text-decoration: none;
2953
- background-color: ${({ theme: e, $active: t }) => {
2954
- var n, r, a, o, c, l;
2955
- return t ? ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.active) || W.item.background.active : ((l = (c = (o = e == null ? void 0 : e.menu) == null ? void 0 : o.item) == null ? void 0 : c.background) == null ? void 0 : l.inactive) || W.item.background.inactive;
2279
+ background-color: ${({ theme: e, $active: n }) => {
2280
+ var t, a, o, i, u, l;
2281
+ return n ? ((o = (a = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : a.background) == null ? void 0 : o.active) || j.item.background.active : ((l = (u = (i = e == null ? void 0 : e.menu) == null ? void 0 : i.item) == null ? void 0 : u.background) == null ? void 0 : l.inactive) || j.item.background.inactive;
2956
2282
  }};
2957
2283
  &:hover {
2958
2284
  cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
2959
- background-color: ${({ $active: e, theme: t, $disabled: n }) => {
2960
- var r, a, o;
2961
- if (!n && !e)
2962
- return ((o = (a = (r = t == null ? void 0 : t.menu) == null ? void 0 : r.item) == null ? void 0 : a.background) == null ? void 0 : o.hover) || W.item.background.hover;
2285
+ background-color: ${({ $active: e, theme: n, $disabled: t }) => {
2286
+ var a, o, i;
2287
+ if (!t && !e)
2288
+ return ((i = (o = (a = n == null ? void 0 : n.menu) == null ? void 0 : a.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || j.item.background.hover;
2963
2289
  }};
2964
2290
  }
2965
- `, Lr = N.div`
2291
+ `, st = T.div`
2966
2292
  display: flex;
2967
2293
  align-items: center;
2968
2294
  gap: 12px;
2969
2295
  width: 100%;
2970
2296
  outline: none;
2971
2297
  cursor: pointer;
2972
- `, Mr = (e) => {
2973
- const { isOpen: t, links: n, onClick: r, title: a, activeId: o } = e;
2974
- return /* @__PURE__ */ i(Fr, { $active: t, children: /* @__PURE__ */ g(_, { border: !0, borderRadius: "8px", width: "100%", children: [
2975
- /* @__PURE__ */ i(
2976
- _,
2298
+ `, ct = (e) => {
2299
+ const { isOpen: n, links: t, onClick: a, title: o, activeId: i } = e;
2300
+ return /* @__PURE__ */ r(lt, { $active: n, children: /* @__PURE__ */ h(z, { border: !0, borderRadius: "8px", width: "100%", children: [
2301
+ /* @__PURE__ */ r(
2302
+ z,
2977
2303
  {
2978
2304
  alignItems: "center",
2979
2305
  borderRadius: "8px",
2980
2306
  direction: "row",
2981
2307
  gap: "12px",
2982
2308
  padding: "12px 8px",
2983
- children: /* @__PURE__ */ g(
2984
- Lr,
2309
+ children: /* @__PURE__ */ h(
2310
+ st,
2985
2311
  {
2986
- onClick: r,
2312
+ onClick: a,
2987
2313
  onKeyDown: (l) => {
2988
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), r());
2314
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), a());
2989
2315
  },
2990
2316
  role: "button",
2991
2317
  tabIndex: 0,
2992
- "aria-expanded": t,
2318
+ "aria-expanded": n,
2993
2319
  "aria-controls": "dropdown-links",
2994
2320
  children: [
2995
- /* @__PURE__ */ i(
2996
- M,
2321
+ /* @__PURE__ */ r(
2322
+ R,
2997
2323
  {
2998
- appearance: t ? "primary" : "dark",
2324
+ appearance: n ? "primary" : "dark",
2999
2325
  cursorHover: !0,
3000
- icon: t ? /* @__PURE__ */ i(Xe, {}) : /* @__PURE__ */ i(Dt, {})
2326
+ icon: n ? /* @__PURE__ */ r(we, {}) : /* @__PURE__ */ r(ze, {})
3001
2327
  }
3002
2328
  ),
3003
- /* @__PURE__ */ i(
3004
- k,
2329
+ /* @__PURE__ */ r(
2330
+ w,
3005
2331
  {
3006
- appearance: t ? "primary" : "dark",
2332
+ appearance: n ? "primary" : "dark",
3007
2333
  cursorHover: !0,
3008
2334
  size: "small",
3009
2335
  type: "title",
3010
- weight: t ? "bold" : "normal",
3011
- children: a
2336
+ weight: n ? "bold" : "normal",
2337
+ children: o
3012
2338
  }
3013
2339
  )
3014
2340
  ]
@@ -3016,31 +2342,31 @@ const W = {
3016
2342
  )
3017
2343
  }
3018
2344
  ),
3019
- t && /* @__PURE__ */ g(O, { children: [
3020
- /* @__PURE__ */ i(L, {}),
3021
- /* @__PURE__ */ i(b, { direction: "column", children: n.map((l) => {
3022
- const s = l.id === o;
3023
- return /* @__PURE__ */ i(
3024
- Me,
2345
+ n && /* @__PURE__ */ h(E, { children: [
2346
+ /* @__PURE__ */ r(F, {}),
2347
+ /* @__PURE__ */ r(g, { direction: "column", children: t.map((l) => {
2348
+ const d = l.id === i;
2349
+ return /* @__PURE__ */ r(
2350
+ Qe,
3025
2351
  {
3026
2352
  to: l.path,
3027
2353
  style: { textDecoration: "none" },
3028
- children: /* @__PURE__ */ i(Ir, { $active: s, children: /* @__PURE__ */ g(
3029
- b,
2354
+ children: /* @__PURE__ */ r(dt, { $active: d, children: /* @__PURE__ */ h(
2355
+ g,
3030
2356
  {
3031
2357
  alignItems: "center",
3032
2358
  direction: "row",
3033
2359
  gap: "8px",
3034
- padding: s ? "8px 4px" : "8px 32px",
2360
+ padding: d ? "8px 4px" : "8px 32px",
3035
2361
  children: [
3036
- s && /* @__PURE__ */ i(M, { appearance: "primary", icon: /* @__PURE__ */ i(kt, {}) }),
3037
- /* @__PURE__ */ i(
3038
- k,
2362
+ d && /* @__PURE__ */ r(R, { appearance: "primary", icon: /* @__PURE__ */ r(Ue, {}) }),
2363
+ /* @__PURE__ */ r(
2364
+ w,
3039
2365
  {
3040
- appearance: s ? "primary" : "dark",
2366
+ appearance: d ? "primary" : "dark",
3041
2367
  size: "small",
3042
2368
  type: "title",
3043
- weight: s ? "bold" : "normal",
2369
+ weight: d ? "bold" : "normal",
3044
2370
  children: l.label
3045
2371
  }
3046
2372
  )
@@ -3053,40 +2379,48 @@ const W = {
3053
2379
  }) })
3054
2380
  ] })
3055
2381
  ] }) });
3056
- }, ha = (e) => {
3057
- const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: r } = e, [a, o] = oe.useState(n), c = J();
3058
- oe.useEffect(() => {
3059
- t && o(null);
3060
- }, [t, c.pathname]);
3061
- const l = oe.useCallback(
3062
- (s) => {
3063
- var d;
3064
- return (d = s.find((p) => p.path === c.pathname)) == null ? void 0 : d.id;
2382
+ }, ut = T.div`
2383
+ & > div {
2384
+ background: ${({ $background: e, theme: n }) => {
2385
+ var t, a, o, i;
2386
+ return e ? `${((a = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : a.N20) || x.palette.neutral.N20}` : `${((i = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || x.palette.neutral.N0}`;
2387
+ }};
2388
+ }
2389
+ height: 90vh;
2390
+ `, _t = (e) => {
2391
+ const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: a } = e, [o, i] = W.useState(t), u = We();
2392
+ W.useEffect(() => {
2393
+ n && i(null);
2394
+ }, [n, u.pathname]);
2395
+ const l = W.useCallback(
2396
+ (d) => {
2397
+ var s;
2398
+ return (s = d.find((p) => p.path === u.pathname)) == null ? void 0 : s.id;
3065
2399
  },
3066
- [c.pathname]
2400
+ [u.pathname]
3067
2401
  );
3068
- return /* @__PURE__ */ i(O, { children: r.map((s) => /* @__PURE__ */ i(
3069
- Mr,
2402
+ return /* @__PURE__ */ r(ut, { $background: !0, children: /* @__PURE__ */ r(g, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: a.map((d) => /* @__PURE__ */ r(
2403
+ ct,
3070
2404
  {
3071
- activeId: l(s.links),
3072
- isOpen: a === s.id,
3073
- links: s.links,
3074
- onClick: () => o((d) => d === s.id ? null : s.id),
3075
- title: s.title
2405
+ activeId: l(d.links),
2406
+ isOpen: o === d.id,
2407
+ links: d.links,
2408
+ onClick: () => i((s) => s === d.id ? null : d.id),
2409
+ title: d.title
3076
2410
  },
3077
- s.id
3078
- )) });
3079
- }, Y = /* @__PURE__ */ new Map(), Ur = (e, t) => Y.get(`${t}:${e}`), Vr = (e, t, n) => {
3080
- const r = `${t}:${e}`;
3081
- if (Y.set(r, n), Y.size > 1e3) {
3082
- const a = Y.keys().next().value;
3083
- a !== void 0 && Y.delete(a);
2411
+ d.id
2412
+ )) }) });
2413
+ }, _ = /* @__PURE__ */ new Map(), pt = (e, n) => _.get(`${n}:${e}`), ht = (e, n, t) => {
2414
+ const a = `${n}:${e}`;
2415
+ if (_.set(a, t), _.size > 1e3) {
2416
+ const o = _.keys().next().value;
2417
+ o !== void 0 && _.delete(o);
3084
2418
  }
3085
- }, Ke = /* @__PURE__ */ new Map(), _r = 1e3, Pr = (e) => {
3086
- const t = Date.now(), n = Ke.get(e) || 0;
3087
- return t - n < _r ? !0 : (Ke.set(e, t), !1);
3088
- }, Br = (e) => {
3089
- const t = Vt(e);
2419
+ }, ve = /* @__PURE__ */ new Map(), gt = 1e3, bt = (e) => {
2420
+ const n = Date.now(), t = ve.get(e) || 0;
2421
+ return n - t < gt ? !0 : (ve.set(e, n), !1);
2422
+ }, mt = (e) => {
2423
+ const n = Ke(e);
3090
2424
  return {
3091
2425
  spa: "es",
3092
2426
  eng: "en",
@@ -3094,75 +2428,75 @@ const W = {
3094
2428
  fra: "fr",
3095
2429
  ita: "it",
3096
2430
  por: "pt"
3097
- }[t] || "en";
3098
- }, jr = async (e, t, { url: n, apiKey: r }) => {
3099
- const a = `${t}:${e}`, o = Ur(e, t);
3100
- if (o) return o;
3101
- if (Pr(a))
2431
+ }[n] || "en";
2432
+ }, ft = async (e, n, { url: t, apiKey: a }) => {
2433
+ const o = `${n}:${e}`, i = pt(e, n);
2434
+ if (i) return i;
2435
+ if (bt(o))
3102
2436
  return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
3103
- const c = Br(e);
2437
+ const u = mt(e);
3104
2438
  try {
3105
- const { data: l } = await Ut.post(
3106
- n,
2439
+ const { data: l } = await Ye.post(
2440
+ t,
3107
2441
  {
3108
2442
  q: e,
3109
- source: c,
3110
- target: t,
3111
- api_key: r
2443
+ source: u,
2444
+ target: n,
2445
+ api_key: a
3112
2446
  },
3113
2447
  {
3114
2448
  headers: {
3115
2449
  "Content-Type": "application/json"
3116
2450
  }
3117
2451
  }
3118
- ), s = (l == null ? void 0 : l.translatedText) || e;
3119
- return Vr(e, t, s), s;
2452
+ ), d = (l == null ? void 0 : l.translatedText) || e;
2453
+ return ht(e, n, d), d;
3120
2454
  } catch (l) {
3121
2455
  return console.warn(`[Translation] Failed for: "${e}"`, l), e;
3122
2456
  }
3123
- }, zr = (e) => typeof e == "string" && e.trim().length > 0, Qe = async (e, t, n) => {
3124
- const r = await Promise.all(
3125
- Object.entries(e).map(async ([a, o]) => {
3126
- if (zr(o)) {
3127
- const c = await jr(o, t, n);
3128
- return [a, c];
3129
- } else if (Array.isArray(o)) {
3130
- const c = await Promise.all(
3131
- o.map(
3132
- async (l) => typeof l == "object" && l !== null ? await Qe(l, t, n) : l
2457
+ }, vt = (e) => typeof e == "string" && e.trim().length > 0, xe = async (e, n, t) => {
2458
+ const a = await Promise.all(
2459
+ Object.entries(e).map(async ([o, i]) => {
2460
+ if (vt(i)) {
2461
+ const u = await ft(i, n, t);
2462
+ return [o, u];
2463
+ } else if (Array.isArray(i)) {
2464
+ const u = await Promise.all(
2465
+ i.map(
2466
+ async (l) => typeof l == "object" && l !== null ? await xe(l, n, t) : l
3133
2467
  )
3134
2468
  );
3135
- return [a, c];
3136
- } else if (typeof o == "object" && o !== null) {
3137
- const c = await Qe(o, t, n);
3138
- return [a, c];
2469
+ return [o, u];
2470
+ } else if (typeof i == "object" && i !== null) {
2471
+ const u = await xe(i, n, t);
2472
+ return [o, u];
3139
2473
  } else
3140
- return [a, o];
2474
+ return [o, i];
3141
2475
  })
3142
2476
  );
3143
- return Object.fromEntries(r);
2477
+ return Object.fromEntries(a);
3144
2478
  };
3145
2479
  export {
3146
- Ae as BusinessRuleCard,
3147
- ct as BusinessRuleCardNew,
3148
- ot as BusinessRuleView,
3149
- dt as BusinessRuleViewNew,
3150
- na as BusinessRules,
3151
- ra as BusinessRulesNew,
3152
- Mr as DropdownMenu,
3153
- ha as DropdownMenuContainer,
3154
- aa as Filter,
3155
- ia as FilterModal,
3156
- oa as FormFilter,
3157
- lt as ModalRules,
3158
- ut as RulesForm,
3159
- In as convertRangeToString,
3160
- la as formatDecisionForBackend,
3161
- sa as parseRangeFromString,
3162
- ca as revertSortedDataSampleSwitchPlaces,
3163
- da as revertSortedDataSwitchPlaces,
3164
- ua as sortDisplayDataSampleSwitchPlaces,
3165
- pa as sortDisplayDataSwitchPlaces,
3166
- Qe as translateObject,
3167
- jr as translateText
2480
+ le as BusinessRuleCard,
2481
+ Fe as BusinessRuleCardNew,
2482
+ Ae as BusinessRuleView,
2483
+ Re as BusinessRuleViewNew,
2484
+ Ft as BusinessRules,
2485
+ Rt as BusinessRulesNew,
2486
+ ct as DropdownMenu,
2487
+ _t as DropdownMenuContainer,
2488
+ Ot as Filter,
2489
+ Mt as FilterModal,
2490
+ Lt as FormFilter,
2491
+ Ie as ModalRules,
2492
+ Oe as RulesForm,
2493
+ Yn as convertRangeToString,
2494
+ zt as formatDecisionForBackend,
2495
+ Ut as parseRangeFromString,
2496
+ Vt as revertSortedDataSampleSwitchPlaces,
2497
+ Bt as revertSortedDataSwitchPlaces,
2498
+ Ht as sortDisplayDataSampleSwitchPlaces,
2499
+ jt as sortDisplayDataSwitchPlaces,
2500
+ xe as translateObject,
2501
+ ft as translateText
3168
2502
  };