@isettingkit/business-rules 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.d.ts +30 -0
- package/dist/index.es.js +2008 -1171
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MdOutlineDelete as
|
|
3
|
-
import { inube as
|
|
4
|
-
import
|
|
5
|
-
import { ValueDataType as
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import Pe from "
|
|
12
|
-
import
|
|
13
|
-
|
|
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`
|
|
14
15
|
border-radius: 8px;
|
|
15
16
|
border: 1px solid
|
|
16
17
|
${({ theme: e }) => {
|
|
17
|
-
var
|
|
18
|
-
return ((
|
|
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;
|
|
19
20
|
}};
|
|
20
21
|
box-sizing: border-box;
|
|
21
22
|
display: flex;
|
|
@@ -26,7 +27,7 @@ const Qe = x.div`
|
|
|
26
27
|
height: 100%;
|
|
27
28
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
28
29
|
`;
|
|
29
|
-
|
|
30
|
+
N.div`
|
|
30
31
|
width: 100%;
|
|
31
32
|
height: 100%;
|
|
32
33
|
overflow-y: auto;
|
|
@@ -45,51 +46,51 @@ x.div`
|
|
|
45
46
|
border-radius: 8px;
|
|
46
47
|
}
|
|
47
48
|
`;
|
|
48
|
-
const
|
|
49
|
-
const { children:
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
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,
|
|
56
57
|
{
|
|
57
58
|
cursorHover: !0,
|
|
58
59
|
appearance: "danger",
|
|
59
60
|
size: "24px",
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
+
icon: /* @__PURE__ */ i(Je, {}),
|
|
61
62
|
onClick: () => {
|
|
62
|
-
a
|
|
63
|
+
r(a);
|
|
63
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
70
|
from: e.from ?? "",
|
|
70
71
|
to: e.to ?? ""
|
|
71
|
-
}),
|
|
72
|
-
var
|
|
73
|
-
const
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
},
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
-
},
|
|
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`
|
|
84
85
|
& > div {
|
|
85
86
|
border-radius: 8px;
|
|
86
87
|
border: 1px solid
|
|
87
88
|
${({ theme: e }) => {
|
|
88
|
-
var
|
|
89
|
-
return ((
|
|
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;
|
|
90
91
|
}};
|
|
91
92
|
}
|
|
92
|
-
`,
|
|
93
|
+
`, je = N.div`
|
|
93
94
|
width: 100%;
|
|
94
95
|
height: 100%;
|
|
95
96
|
overflow-y: auto;
|
|
@@ -107,40 +108,40 @@ const nn = {
|
|
|
107
108
|
background-color: #ebecf0;
|
|
108
109
|
border-radius: 8px;
|
|
109
110
|
}
|
|
110
|
-
`,
|
|
111
|
+
`, Kt = (e) => {
|
|
111
112
|
const {
|
|
112
|
-
conditionsAlignment:
|
|
113
|
-
decision:
|
|
114
|
-
decisionDateElement:
|
|
115
|
-
decisionMapper:
|
|
116
|
-
loading:
|
|
117
|
-
skeleton:
|
|
113
|
+
conditionsAlignment: t,
|
|
114
|
+
decision: n,
|
|
115
|
+
decisionDateElement: r,
|
|
116
|
+
decisionMapper: a,
|
|
117
|
+
loading: o,
|
|
118
|
+
skeleton: c,
|
|
118
119
|
terms: l,
|
|
119
120
|
textValues: s,
|
|
120
|
-
visibleConditions:
|
|
121
|
+
visibleConditions: d
|
|
121
122
|
} = e;
|
|
122
|
-
return
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
123
|
+
return o ? /* @__PURE__ */ g(b, { direction: "column", gap: "12px", children: [
|
|
124
|
+
/* @__PURE__ */ i(b, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
125
|
+
be,
|
|
125
126
|
{
|
|
126
|
-
element:
|
|
127
|
-
valueData:
|
|
128
|
-
|
|
127
|
+
element: a,
|
|
128
|
+
valueData: Z(
|
|
129
|
+
a
|
|
129
130
|
),
|
|
130
131
|
type: "decision"
|
|
131
132
|
}
|
|
132
|
-
) },
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
|
|
133
|
+
) }, n.ruleName),
|
|
134
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
135
|
+
/* @__PURE__ */ i(je, { children: /* @__PURE__ */ g(
|
|
136
|
+
b,
|
|
136
137
|
{
|
|
137
138
|
direction: "column",
|
|
138
139
|
gap: "12px",
|
|
139
|
-
justifyContent:
|
|
140
|
+
justifyContent: t,
|
|
140
141
|
height: "203px",
|
|
141
142
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
|
|
143
|
+
/* @__PURE__ */ i(
|
|
144
|
+
k,
|
|
144
145
|
{
|
|
145
146
|
type: "label",
|
|
146
147
|
size: "large",
|
|
@@ -150,22 +151,22 @@ const nn = {
|
|
|
150
151
|
children: s.factsThatConditionIt
|
|
151
152
|
}
|
|
152
153
|
),
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
d.map((p) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ i(b, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
|
+
be,
|
|
155
156
|
{
|
|
156
|
-
element: { ...
|
|
157
|
-
valueData:
|
|
158
|
-
|
|
157
|
+
element: { ...p, value: p.value },
|
|
158
|
+
valueData: Z(
|
|
159
|
+
p
|
|
159
160
|
)
|
|
160
161
|
}
|
|
161
|
-
) }) },
|
|
162
|
-
l && /* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
) }) }, p.conditionName)),
|
|
163
|
+
l && /* @__PURE__ */ g(O, { children: [
|
|
164
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
165
|
+
r && /* @__PURE__ */ i(
|
|
166
|
+
be,
|
|
166
167
|
{
|
|
167
|
-
element:
|
|
168
|
-
valueData:
|
|
168
|
+
element: r.element,
|
|
169
|
+
valueData: r.valueData,
|
|
169
170
|
type: "decision"
|
|
170
171
|
},
|
|
171
172
|
s.terms
|
|
@@ -174,100 +175,100 @@ const nn = {
|
|
|
174
175
|
]
|
|
175
176
|
}
|
|
176
177
|
) })
|
|
177
|
-
] }) : /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
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" })
|
|
181
182
|
] }, "loading"),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
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" })
|
|
185
186
|
] }),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
|
|
187
|
+
/* @__PURE__ */ i(je, { children: /* @__PURE__ */ i(
|
|
188
|
+
b,
|
|
188
189
|
{
|
|
189
190
|
direction: "column",
|
|
190
191
|
gap: "12px",
|
|
191
192
|
justifyContent: "space-between",
|
|
192
193
|
height: "203px",
|
|
193
|
-
children:
|
|
194
|
-
|
|
194
|
+
children: c.map((p, u) => /* @__PURE__ */ i(Be, { children: /* @__PURE__ */ g(
|
|
195
|
+
b,
|
|
195
196
|
{
|
|
196
197
|
direction: "column",
|
|
197
198
|
gap: "12px",
|
|
198
199
|
alignItems: "start",
|
|
199
200
|
padding: "8px",
|
|
200
201
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "180px" }),
|
|
203
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "85px" })
|
|
203
204
|
]
|
|
204
205
|
}
|
|
205
|
-
) }, `condition-${
|
|
206
|
+
) }, `condition-${u}`))
|
|
206
207
|
}
|
|
207
208
|
) })
|
|
208
209
|
] });
|
|
209
|
-
},
|
|
210
|
-
var
|
|
211
|
-
const { decision:
|
|
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 ? {
|
|
212
213
|
element: {
|
|
213
|
-
labelName:
|
|
214
|
-
value: String(
|
|
215
|
-
howToSetTheDecision:
|
|
216
|
-
decisionDataType:
|
|
214
|
+
labelName: r == null ? void 0 : r.terms,
|
|
215
|
+
value: String(t.effectiveFrom),
|
|
216
|
+
howToSetTheDecision: z.RANGE,
|
|
217
|
+
decisionDataType: U.DATE
|
|
217
218
|
},
|
|
218
|
-
valueData:
|
|
219
|
-
labelName:
|
|
219
|
+
valueData: Z({
|
|
220
|
+
labelName: r == null ? void 0 : r.terms,
|
|
220
221
|
value: {
|
|
221
|
-
from: String(
|
|
222
|
-
to: String(
|
|
222
|
+
from: String(t.effectiveFrom),
|
|
223
|
+
to: String(t.validUntil)
|
|
223
224
|
},
|
|
224
|
-
howToSetTheDecision:
|
|
225
|
-
decisionDataType:
|
|
225
|
+
howToSetTheDecision: z.RANGE,
|
|
226
|
+
decisionDataType: U.DATE
|
|
226
227
|
})
|
|
227
|
-
} :
|
|
228
|
+
} : a && !o ? {
|
|
228
229
|
element: {
|
|
229
|
-
labelName:
|
|
230
|
-
value: String(
|
|
231
|
-
howToSetTheDecision:
|
|
232
|
-
decisionDataType:
|
|
230
|
+
labelName: r == null ? void 0 : r.terms,
|
|
231
|
+
value: String(t.effectiveFrom),
|
|
232
|
+
howToSetTheDecision: z.EQUAL,
|
|
233
|
+
decisionDataType: U.DATE
|
|
233
234
|
},
|
|
234
|
-
valueData:
|
|
235
|
-
labelName:
|
|
236
|
-
value: String(
|
|
237
|
-
howToSetTheDecision:
|
|
238
|
-
decisionDataType:
|
|
235
|
+
valueData: Z({
|
|
236
|
+
labelName: r == null ? void 0 : r.terms,
|
|
237
|
+
value: String(t.effectiveFrom),
|
|
238
|
+
howToSetTheDecision: z.EQUAL,
|
|
239
|
+
decisionDataType: U.DATE
|
|
239
240
|
})
|
|
240
|
-
} : null, l =
|
|
241
|
-
labelName:
|
|
242
|
-
decisionDataType:
|
|
243
|
-
value:
|
|
244
|
-
howToSetTheDecision:
|
|
245
|
-
} : null, s = ((
|
|
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(
|
|
246
247
|
(m) => !m.hidden
|
|
247
|
-
)) || [],
|
|
248
|
-
return /* @__PURE__ */
|
|
249
|
-
|
|
248
|
+
)) || [], d = Array.from({ length: 5 }), p = !!(!n && t && r && l), u = s.length < 2 ? "start" : "space-between";
|
|
249
|
+
return /* @__PURE__ */ i(
|
|
250
|
+
Kt,
|
|
250
251
|
{
|
|
251
|
-
conditionsAlignment:
|
|
252
|
-
decision:
|
|
253
|
-
decisionDateElement:
|
|
252
|
+
conditionsAlignment: u,
|
|
253
|
+
decision: t,
|
|
254
|
+
decisionDateElement: c,
|
|
254
255
|
decisionMapper: l,
|
|
255
|
-
loading:
|
|
256
|
-
skeleton:
|
|
257
|
-
terms: !!(
|
|
258
|
-
textValues:
|
|
256
|
+
loading: p,
|
|
257
|
+
skeleton: d,
|
|
258
|
+
terms: !!(r != null && r.terms),
|
|
259
|
+
textValues: r,
|
|
259
260
|
visibleConditions: s
|
|
260
261
|
}
|
|
261
262
|
);
|
|
262
|
-
},
|
|
263
|
+
}, Qt = N.div`
|
|
263
264
|
position: relative;
|
|
264
265
|
& > div {
|
|
265
266
|
padding: 24px 16px;
|
|
266
267
|
}
|
|
267
|
-
`,
|
|
268
|
+
`, Jt = N.div`
|
|
268
269
|
background-color: ${({ theme: e }) => {
|
|
269
|
-
var
|
|
270
|
-
return ((
|
|
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;
|
|
271
272
|
}};
|
|
272
273
|
max-width: 450px;
|
|
273
274
|
max-height: 90vh;
|
|
@@ -295,24 +296,24 @@ const nn = {
|
|
|
295
296
|
background-color: #ebecf0;
|
|
296
297
|
border-radius: 8px;
|
|
297
298
|
}
|
|
298
|
-
`,
|
|
299
|
-
const { children:
|
|
300
|
-
if (!
|
|
299
|
+
`, lt = (e) => {
|
|
300
|
+
const { children: t, portalId: n, onCloseModal: r, title: a } = e, o = document.getElementById(n);
|
|
301
|
+
if (!o)
|
|
301
302
|
throw new Error(
|
|
302
303
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
303
304
|
);
|
|
304
|
-
const
|
|
305
|
-
return
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
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 })
|
|
310
311
|
] }) }),
|
|
311
|
-
|
|
312
|
+
t
|
|
312
313
|
] }) }) }) }),
|
|
313
|
-
|
|
314
|
+
o
|
|
314
315
|
);
|
|
315
|
-
},
|
|
316
|
+
}, Yt = rt`
|
|
316
317
|
from {
|
|
317
318
|
opacity: 0;
|
|
318
319
|
transform: translateY(20px);
|
|
@@ -322,12 +323,12 @@ const nn = {
|
|
|
322
323
|
transform: translateY(0);
|
|
323
324
|
}
|
|
324
325
|
`;
|
|
325
|
-
|
|
326
|
+
N.div`
|
|
326
327
|
border-radius: 8px;
|
|
327
328
|
border: 1px solid
|
|
328
329
|
${({ theme: e }) => {
|
|
329
|
-
var
|
|
330
|
-
return ((
|
|
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;
|
|
331
332
|
}};
|
|
332
333
|
box-sizing: border-box;
|
|
333
334
|
display: flex;
|
|
@@ -336,37 +337,37 @@ x.div`
|
|
|
336
337
|
height: 100%;
|
|
337
338
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
338
339
|
`;
|
|
339
|
-
|
|
340
|
+
N.div`
|
|
340
341
|
& > div {
|
|
341
342
|
border-radius: 8px;
|
|
342
343
|
border: 1px solid
|
|
343
344
|
${({ theme: e }) => {
|
|
344
|
-
var
|
|
345
|
-
return ((
|
|
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;
|
|
346
347
|
}};
|
|
347
348
|
}
|
|
348
349
|
`;
|
|
349
|
-
const
|
|
350
|
+
const st = N.div`
|
|
350
351
|
& > div {
|
|
351
352
|
box-shadow: 0px 2px 3px 0px
|
|
352
353
|
${({ theme: e }) => {
|
|
353
|
-
var
|
|
354
|
-
return ((
|
|
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;
|
|
355
356
|
}};
|
|
356
357
|
cursor: pointer;
|
|
357
358
|
}
|
|
358
|
-
`,
|
|
359
|
+
`, ge = N.div`
|
|
359
360
|
width: 100%;
|
|
360
361
|
height: 100%;
|
|
361
362
|
& > div {
|
|
362
|
-
animation: ${
|
|
363
|
+
animation: ${Yt} 600ms ease-out;
|
|
363
364
|
}
|
|
364
|
-
`,
|
|
365
|
+
`, Xt = N.div`
|
|
365
366
|
& > div > div {
|
|
366
367
|
border-radius: 8px;
|
|
367
368
|
box-sizing: border-box;
|
|
368
369
|
}
|
|
369
|
-
`,
|
|
370
|
+
`, Zt = N.div`
|
|
370
371
|
& > div {
|
|
371
372
|
width: 100%;
|
|
372
373
|
height: 100%;
|
|
@@ -386,145 +387,145 @@ const Ae = x.div`
|
|
|
386
387
|
border-radius: 8px;
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
|
-
`,
|
|
390
|
-
const { index:
|
|
391
|
-
return /* @__PURE__ */
|
|
392
|
-
|
|
390
|
+
`, en = (e) => {
|
|
391
|
+
const { index: t, handleOpenModal: n } = e;
|
|
392
|
+
return /* @__PURE__ */ i(
|
|
393
|
+
Ae,
|
|
393
394
|
{
|
|
394
|
-
id: `loading-card-${
|
|
395
|
+
id: `loading-card-${t}`,
|
|
395
396
|
handleDelete: () => {
|
|
396
397
|
},
|
|
397
|
-
handleView: () =>
|
|
398
|
+
handleView: () => n ? n() : null,
|
|
398
399
|
controls: !1,
|
|
399
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ i(ot, { loading: !0 })
|
|
400
401
|
},
|
|
401
|
-
`loading-card-${
|
|
402
|
+
`loading-card-${t}`
|
|
402
403
|
);
|
|
403
|
-
},
|
|
404
|
-
const { decision:
|
|
405
|
-
return
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
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,
|
|
409
410
|
{
|
|
410
|
-
id:
|
|
411
|
-
handleDelete: () =>
|
|
412
|
-
handleView: () =>
|
|
413
|
-
controls:
|
|
414
|
-
children: /* @__PURE__ */
|
|
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
416
|
}
|
|
416
417
|
)
|
|
417
|
-
] }) },
|
|
418
|
-
},
|
|
418
|
+
] }) }, t.decisionId) : null;
|
|
419
|
+
}, nn = (e) => {
|
|
419
420
|
const {
|
|
420
|
-
customTitleContentAddCard:
|
|
421
|
-
index:
|
|
422
|
-
handleOpenModal:
|
|
423
|
-
shouldRenderEmptyMessage:
|
|
424
|
-
} = e,
|
|
425
|
-
return /* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
|
|
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,
|
|
429
430
|
{
|
|
430
|
-
onClick: () =>
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
|
|
431
|
+
onClick: () => r ? r() : null,
|
|
432
|
+
children: /* @__PURE__ */ i(
|
|
433
|
+
Ae,
|
|
433
434
|
{
|
|
434
|
-
id: `add-decision-${
|
|
435
|
+
id: `add-decision-${n}`,
|
|
435
436
|
handleDelete: () => {
|
|
436
437
|
},
|
|
437
|
-
handleView: () =>
|
|
438
|
+
handleView: () => r ? r() : null,
|
|
438
439
|
controls: !1,
|
|
439
|
-
children: /* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
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 })
|
|
442
443
|
] })
|
|
443
444
|
}
|
|
444
445
|
)
|
|
445
446
|
}
|
|
446
447
|
)
|
|
447
|
-
] }) }, `add-decision-${
|
|
448
|
-
},
|
|
449
|
-
loading:
|
|
450
|
-
decision:
|
|
451
|
-
add:
|
|
452
|
-
},
|
|
453
|
-
const { type:
|
|
454
|
-
return
|
|
455
|
-
},
|
|
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) => {
|
|
456
457
|
const {
|
|
457
|
-
controls:
|
|
458
|
-
customTitleContentAddCard:
|
|
459
|
-
decisions:
|
|
460
|
-
loading:
|
|
461
|
-
handleOpenModal:
|
|
462
|
-
handleDelete:
|
|
458
|
+
controls: t,
|
|
459
|
+
customTitleContentAddCard: n,
|
|
460
|
+
decisions: r,
|
|
461
|
+
loading: a,
|
|
462
|
+
handleOpenModal: o,
|
|
463
|
+
handleDelete: c,
|
|
463
464
|
textValues: l
|
|
464
|
-
} = e, s =
|
|
465
|
-
(
|
|
465
|
+
} = e, s = a ? Array.from({ length: 3 }).map(
|
|
466
|
+
(p, u) => Te({
|
|
466
467
|
type: "loading",
|
|
467
|
-
index:
|
|
468
|
-
controls:
|
|
469
|
-
customTitleContentAddCard:
|
|
470
|
-
loading:
|
|
471
|
-
handleOpenModal:
|
|
472
|
-
handleDelete:
|
|
468
|
+
index: u,
|
|
469
|
+
controls: t,
|
|
470
|
+
customTitleContentAddCard: n,
|
|
471
|
+
loading: a,
|
|
472
|
+
handleOpenModal: o,
|
|
473
|
+
handleDelete: c,
|
|
473
474
|
textValues: l
|
|
474
475
|
})
|
|
475
|
-
) :
|
|
476
|
-
(
|
|
476
|
+
) : r == null ? void 0 : r.map(
|
|
477
|
+
(p) => Te({
|
|
477
478
|
type: "decision",
|
|
478
|
-
decision:
|
|
479
|
-
controls:
|
|
480
|
-
customTitleContentAddCard:
|
|
481
|
-
loading:
|
|
482
|
-
handleOpenModal:
|
|
483
|
-
handleDelete:
|
|
479
|
+
decision: p,
|
|
480
|
+
controls: t,
|
|
481
|
+
customTitleContentAddCard: n,
|
|
482
|
+
loading: a,
|
|
483
|
+
handleOpenModal: o,
|
|
484
|
+
handleDelete: c,
|
|
484
485
|
textValues: l
|
|
485
486
|
})
|
|
486
|
-
),
|
|
487
|
-
return { renderedCards: s, shouldRenderAddCard:
|
|
488
|
-
},
|
|
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) => {
|
|
489
490
|
const {
|
|
490
|
-
controls:
|
|
491
|
-
customTitleContentAddCard:
|
|
492
|
-
customMessageEmptyDecisions:
|
|
493
|
-
decisions:
|
|
494
|
-
textValues:
|
|
495
|
-
decisionTemplate:
|
|
491
|
+
controls: t = !0,
|
|
492
|
+
customTitleContentAddCard: n,
|
|
493
|
+
customMessageEmptyDecisions: r,
|
|
494
|
+
decisions: a,
|
|
495
|
+
textValues: o,
|
|
496
|
+
decisionTemplate: c,
|
|
496
497
|
isModalOpen: l,
|
|
497
498
|
selectedDecision: s,
|
|
498
|
-
loading:
|
|
499
|
-
handleOpenModal:
|
|
500
|
-
handleCloseModal:
|
|
501
|
-
handleSubmitForm:
|
|
499
|
+
loading: d,
|
|
500
|
+
handleOpenModal: p,
|
|
501
|
+
handleCloseModal: u,
|
|
502
|
+
handleSubmitForm: h,
|
|
502
503
|
handleDelete: m,
|
|
503
504
|
terms: f = !0
|
|
504
|
-
} = e,
|
|
505
|
-
controls:
|
|
506
|
-
customTitleContentAddCard:
|
|
507
|
-
decisions:
|
|
508
|
-
loading:
|
|
509
|
-
handleOpenModal:
|
|
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,
|
|
510
|
+
handleOpenModal: p,
|
|
510
511
|
handleDelete: m,
|
|
511
|
-
textValues:
|
|
512
|
-
}),
|
|
513
|
-
return /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
|
|
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,
|
|
516
517
|
{
|
|
517
518
|
direction: "column",
|
|
518
519
|
gap: "28px",
|
|
519
520
|
width: "100%",
|
|
520
|
-
height:
|
|
521
|
+
height: w ? "auto" : "435px",
|
|
521
522
|
justifyContent: "center",
|
|
522
523
|
alignItems: "center",
|
|
523
524
|
children: [
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
|
|
525
526
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
527
|
+
/* @__PURE__ */ g(
|
|
528
|
+
k,
|
|
528
529
|
{
|
|
529
530
|
as: "span",
|
|
530
531
|
type: "label",
|
|
@@ -533,27 +534,27 @@ const Ae = x.div`
|
|
|
533
534
|
weight: "bold",
|
|
534
535
|
children: [
|
|
535
536
|
"“",
|
|
536
|
-
|
|
537
|
+
n || "+ Agregar decisión",
|
|
537
538
|
"”"
|
|
538
539
|
]
|
|
539
540
|
}
|
|
540
541
|
),
|
|
541
542
|
"para empezar."
|
|
542
543
|
] }) }),
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
|
|
544
|
+
/* @__PURE__ */ i(
|
|
545
|
+
P,
|
|
545
546
|
{
|
|
546
|
-
iconBefore: /* @__PURE__ */
|
|
547
|
-
onClick: () =>
|
|
548
|
-
children:
|
|
547
|
+
iconBefore: /* @__PURE__ */ i(pe, {}),
|
|
548
|
+
onClick: () => p ? p() : null,
|
|
549
|
+
children: n || "Agregar decisión"
|
|
549
550
|
}
|
|
550
551
|
)
|
|
551
552
|
]
|
|
552
553
|
}
|
|
553
|
-
) : /* @__PURE__ */
|
|
554
|
-
|
|
554
|
+
) : /* @__PURE__ */ g(
|
|
555
|
+
he,
|
|
555
556
|
{
|
|
556
|
-
templateColumns:
|
|
557
|
+
templateColumns: D ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
557
558
|
autoFlow: "row dense",
|
|
558
559
|
gap: "24px",
|
|
559
560
|
alignItems: "start",
|
|
@@ -561,77 +562,77 @@ const Ae = x.div`
|
|
|
561
562
|
autoRows: "1fr",
|
|
562
563
|
justifyItems: "center",
|
|
563
564
|
padding: "6px",
|
|
564
|
-
height:
|
|
565
|
+
height: w ? "auto" : "484px",
|
|
565
566
|
children: [
|
|
566
|
-
|
|
567
|
-
|
|
567
|
+
E,
|
|
568
|
+
x && Te({
|
|
568
569
|
type: "add",
|
|
569
|
-
index:
|
|
570
|
-
controls:
|
|
571
|
-
customTitleContentAddCard:
|
|
572
|
-
customMessageEmptyDecisions:
|
|
573
|
-
loading:
|
|
574
|
-
handleOpenModal:
|
|
570
|
+
index: a == null ? void 0 : a.length,
|
|
571
|
+
controls: t,
|
|
572
|
+
customTitleContentAddCard: n,
|
|
573
|
+
customMessageEmptyDecisions: r,
|
|
574
|
+
loading: d,
|
|
575
|
+
handleOpenModal: p,
|
|
575
576
|
handleDelete: m,
|
|
576
|
-
textValues:
|
|
577
|
-
shouldRenderEmptyMessage:
|
|
577
|
+
textValues: o,
|
|
578
|
+
shouldRenderEmptyMessage: S,
|
|
578
579
|
terms: f
|
|
579
580
|
})
|
|
580
581
|
]
|
|
581
582
|
}
|
|
582
583
|
) }) }) }),
|
|
583
|
-
l && /* @__PURE__ */
|
|
584
|
-
|
|
584
|
+
l && /* @__PURE__ */ i(
|
|
585
|
+
lt,
|
|
585
586
|
{
|
|
586
587
|
portalId: "modal-portal",
|
|
587
|
-
onCloseModal:
|
|
588
|
+
onCloseModal: u,
|
|
588
589
|
title: s ? "Editar Decisión" : "Nueva decisión",
|
|
589
|
-
children: /* @__PURE__ */
|
|
590
|
-
|
|
590
|
+
children: /* @__PURE__ */ i(
|
|
591
|
+
ut,
|
|
591
592
|
{
|
|
592
|
-
decision: s ||
|
|
593
|
-
onSubmitEvent:
|
|
594
|
-
textValues:
|
|
595
|
-
onCancel: () =>
|
|
593
|
+
decision: s || c,
|
|
594
|
+
onSubmitEvent: h,
|
|
595
|
+
textValues: o,
|
|
596
|
+
onCancel: () => u ? u() : () => {
|
|
596
597
|
}
|
|
597
598
|
}
|
|
598
599
|
)
|
|
599
600
|
}
|
|
600
601
|
)
|
|
601
602
|
] });
|
|
602
|
-
},
|
|
603
|
-
const { children:
|
|
604
|
-
return /* @__PURE__ */
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
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,
|
|
608
609
|
{
|
|
609
610
|
cursorHover: !0,
|
|
610
611
|
appearance: "danger",
|
|
611
612
|
spacing: "compact",
|
|
612
613
|
variant: "outlined",
|
|
613
|
-
iconBefore: /* @__PURE__ */
|
|
614
|
+
iconBefore: /* @__PURE__ */ i(Je, {}),
|
|
614
615
|
onClick: () => {
|
|
615
|
-
a
|
|
616
|
+
r(a);
|
|
616
617
|
},
|
|
617
618
|
children: "Eliminar"
|
|
618
619
|
}
|
|
619
620
|
) }) })
|
|
620
621
|
] });
|
|
621
|
-
},
|
|
622
|
+
}, on = (e) => e.value, ln = (e) => e.value, sn = (e) => e.value, cn = (e) => ({
|
|
622
623
|
from: e.from ?? "",
|
|
623
624
|
to: e.to ?? ""
|
|
624
|
-
}),
|
|
625
|
-
[
|
|
626
|
-
[
|
|
627
|
-
[
|
|
628
|
-
[
|
|
629
|
-
[
|
|
630
|
-
[
|
|
631
|
-
},
|
|
632
|
-
const
|
|
633
|
-
return
|
|
634
|
-
},
|
|
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`
|
|
635
636
|
display: flex;
|
|
636
637
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
637
638
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -643,103 +644,103 @@ const Ae = x.div`
|
|
|
643
644
|
gap: ${({ $gap: e }) => e};
|
|
644
645
|
margin: ${({ $margin: e }) => e};
|
|
645
646
|
padding: ${({ $padding: e }) => e};
|
|
646
|
-
background: ${({ $background: e, theme:
|
|
647
|
-
var
|
|
648
|
-
return 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}`;
|
|
649
650
|
}};
|
|
650
|
-
border: ${({ $border: e, theme:
|
|
651
|
-
var
|
|
652
|
-
return e ? `1px solid ${((
|
|
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";
|
|
653
654
|
}};
|
|
654
655
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
655
656
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
656
657
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
657
|
-
`,
|
|
658
|
-
(e,
|
|
658
|
+
`, _ = oe.forwardRef(
|
|
659
|
+
(e, t) => {
|
|
659
660
|
const {
|
|
660
|
-
children:
|
|
661
|
-
wrap:
|
|
662
|
-
direction:
|
|
663
|
-
justifyContent:
|
|
664
|
-
alignItems:
|
|
661
|
+
children: n,
|
|
662
|
+
wrap: r,
|
|
663
|
+
direction: a = "column",
|
|
664
|
+
justifyContent: o,
|
|
665
|
+
alignItems: c,
|
|
665
666
|
alignContent: l,
|
|
666
667
|
height: s,
|
|
667
|
-
width:
|
|
668
|
-
gap:
|
|
669
|
-
background:
|
|
670
|
-
borderRadius:
|
|
668
|
+
width: d,
|
|
669
|
+
gap: p,
|
|
670
|
+
background: u,
|
|
671
|
+
borderRadius: h,
|
|
671
672
|
border: m,
|
|
672
673
|
margin: f = "0px",
|
|
673
|
-
padding:
|
|
674
|
-
boxSizing:
|
|
675
|
-
scroll:
|
|
674
|
+
padding: w = "0px",
|
|
675
|
+
boxSizing: D,
|
|
676
|
+
scroll: E = !1
|
|
676
677
|
} = e;
|
|
677
|
-
return /* @__PURE__ */
|
|
678
|
-
|
|
678
|
+
return /* @__PURE__ */ i(
|
|
679
|
+
gn,
|
|
679
680
|
{
|
|
680
|
-
ref:
|
|
681
|
-
direction:
|
|
682
|
-
$justifyContent:
|
|
683
|
-
$alignItems:
|
|
681
|
+
ref: t,
|
|
682
|
+
direction: a,
|
|
683
|
+
$justifyContent: o,
|
|
684
|
+
$alignItems: c,
|
|
684
685
|
$alignContent: l,
|
|
685
686
|
height: s,
|
|
686
|
-
width:
|
|
687
|
-
wrap:
|
|
688
|
-
$gap:
|
|
689
|
-
$background:
|
|
687
|
+
width: d,
|
|
688
|
+
wrap: r,
|
|
689
|
+
$gap: p,
|
|
690
|
+
$background: u,
|
|
690
691
|
$border: m,
|
|
691
692
|
$margin: f,
|
|
692
|
-
$padding:
|
|
693
|
-
$borderRadius:
|
|
694
|
-
$boxSizing:
|
|
695
|
-
$scroll:
|
|
696
|
-
children:
|
|
693
|
+
$padding: w,
|
|
694
|
+
$borderRadius: h,
|
|
695
|
+
$boxSizing: D,
|
|
696
|
+
$scroll: E,
|
|
697
|
+
children: n
|
|
697
698
|
}
|
|
698
699
|
);
|
|
699
700
|
}
|
|
700
701
|
);
|
|
701
|
-
|
|
702
|
-
const
|
|
702
|
+
_.displayName = "BorderStack";
|
|
703
|
+
const fn = (e) => {
|
|
703
704
|
const {
|
|
704
|
-
conditionsAlignment:
|
|
705
|
-
decision:
|
|
706
|
-
decisionMapper:
|
|
707
|
-
loading:
|
|
708
|
-
textValues:
|
|
709
|
-
visibleConditions:
|
|
705
|
+
conditionsAlignment: t,
|
|
706
|
+
decision: n,
|
|
707
|
+
decisionMapper: r,
|
|
708
|
+
loading: a,
|
|
709
|
+
textValues: o,
|
|
710
|
+
visibleConditions: c,
|
|
710
711
|
tagLabel: l,
|
|
711
712
|
isOpen: s,
|
|
712
|
-
onToggle:
|
|
713
|
-
hasEffectiveFrom:
|
|
714
|
-
hasValidUntil:
|
|
715
|
-
effectiveFromRenderer:
|
|
713
|
+
onToggle: d,
|
|
714
|
+
hasEffectiveFrom: p,
|
|
715
|
+
hasValidUntil: u,
|
|
716
|
+
effectiveFromRenderer: h,
|
|
716
717
|
validUntilRenderer: m
|
|
717
718
|
} = e;
|
|
718
|
-
return
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
|
|
719
|
+
return a ? /* @__PURE__ */ g(b, { direction: "column", gap: "16px", children: [
|
|
720
|
+
/* @__PURE__ */ g(
|
|
721
|
+
b,
|
|
721
722
|
{
|
|
722
723
|
alignItems: "start",
|
|
723
724
|
justifyContent: "space-between",
|
|
724
725
|
children: [
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
|
|
726
|
+
/* @__PURE__ */ i(
|
|
727
|
+
ae,
|
|
727
728
|
{
|
|
728
|
-
element:
|
|
729
|
-
valueData:
|
|
730
|
-
|
|
729
|
+
element: r,
|
|
730
|
+
valueData: ee(
|
|
731
|
+
r
|
|
731
732
|
),
|
|
732
733
|
type: "decision"
|
|
733
734
|
}
|
|
734
735
|
),
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
|
|
736
|
+
/* @__PURE__ */ g(b, { gap: "8px", children: [
|
|
737
|
+
/* @__PURE__ */ i(X, { appearance: "gray", label: l, displayIcon: !1 }),
|
|
738
|
+
/* @__PURE__ */ i(
|
|
739
|
+
M,
|
|
739
740
|
{
|
|
740
741
|
appearance: "dark",
|
|
741
|
-
icon: s ? /* @__PURE__ */
|
|
742
|
-
onClick:
|
|
742
|
+
icon: s ? /* @__PURE__ */ i(Et, {}) : /* @__PURE__ */ i(Xe, {}),
|
|
743
|
+
onClick: d,
|
|
743
744
|
size: "24px",
|
|
744
745
|
cursorHover: !0
|
|
745
746
|
}
|
|
@@ -747,13 +748,13 @@ const Cn = (e) => {
|
|
|
747
748
|
] })
|
|
748
749
|
]
|
|
749
750
|
},
|
|
750
|
-
|
|
751
|
+
n.ruleName
|
|
751
752
|
),
|
|
752
|
-
s && /* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
/* @__PURE__ */
|
|
755
|
-
/* @__PURE__ */
|
|
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
758
|
{
|
|
758
759
|
type: "label",
|
|
759
760
|
size: "large",
|
|
@@ -761,28 +762,28 @@ const Cn = (e) => {
|
|
|
761
762
|
weight: "bold",
|
|
762
763
|
textAlign: "start",
|
|
763
764
|
padding: "0 12px",
|
|
764
|
-
children:
|
|
765
|
+
children: o.factsThatConditionIt
|
|
765
766
|
}
|
|
766
767
|
),
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
|
|
768
|
+
/* @__PURE__ */ g(
|
|
769
|
+
b,
|
|
769
770
|
{
|
|
770
771
|
direction: "column",
|
|
771
772
|
gap: "8px",
|
|
772
|
-
justifyContent:
|
|
773
|
+
justifyContent: t,
|
|
773
774
|
children: [
|
|
774
|
-
|
|
775
|
-
|
|
775
|
+
c.map((f) => /* @__PURE__ */ i(
|
|
776
|
+
_,
|
|
776
777
|
{
|
|
777
778
|
direction: "column",
|
|
778
779
|
padding: "6px 12px",
|
|
779
780
|
borderRadius: "8px",
|
|
780
781
|
background: !0,
|
|
781
|
-
children: /* @__PURE__ */
|
|
782
|
-
|
|
782
|
+
children: /* @__PURE__ */ i(
|
|
783
|
+
ae,
|
|
783
784
|
{
|
|
784
785
|
element: { ...f, value: f.value },
|
|
785
|
-
valueData:
|
|
786
|
+
valueData: ee(
|
|
786
787
|
f
|
|
787
788
|
)
|
|
788
789
|
}
|
|
@@ -790,32 +791,32 @@ const Cn = (e) => {
|
|
|
790
791
|
},
|
|
791
792
|
f.conditionName
|
|
792
793
|
)),
|
|
793
|
-
|
|
794
|
-
|
|
794
|
+
p && h && /* @__PURE__ */ i(
|
|
795
|
+
_,
|
|
795
796
|
{
|
|
796
797
|
direction: "column",
|
|
797
798
|
padding: "6px 12px",
|
|
798
799
|
borderRadius: "8px",
|
|
799
800
|
background: !0,
|
|
800
|
-
children: /* @__PURE__ */
|
|
801
|
-
|
|
801
|
+
children: /* @__PURE__ */ i(
|
|
802
|
+
ae,
|
|
802
803
|
{
|
|
803
|
-
element:
|
|
804
|
-
valueData:
|
|
804
|
+
element: h.element,
|
|
805
|
+
valueData: h.valueData
|
|
805
806
|
},
|
|
806
807
|
"effectiveFrom"
|
|
807
808
|
)
|
|
808
809
|
}
|
|
809
810
|
),
|
|
810
|
-
|
|
811
|
-
|
|
811
|
+
u && m && /* @__PURE__ */ i(
|
|
812
|
+
_,
|
|
812
813
|
{
|
|
813
814
|
direction: "column",
|
|
814
815
|
padding: "6px 12px",
|
|
815
816
|
borderRadius: "8px",
|
|
816
817
|
background: !0,
|
|
817
|
-
children: /* @__PURE__ */
|
|
818
|
-
|
|
818
|
+
children: /* @__PURE__ */ i(
|
|
819
|
+
ae,
|
|
819
820
|
{
|
|
820
821
|
element: m.element,
|
|
821
822
|
valueData: m.valueData
|
|
@@ -829,79 +830,79 @@ const Cn = (e) => {
|
|
|
829
830
|
)
|
|
830
831
|
] })
|
|
831
832
|
] })
|
|
832
|
-
] }) : /* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
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" })
|
|
836
837
|
] }),
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ g(b, { alignItems: "center", gap: "8px", children: [
|
|
839
|
+
/* @__PURE__ */ i(j, { animated: !0, width: "50px" }),
|
|
840
|
+
/* @__PURE__ */ i(At, { animated: !0 })
|
|
840
841
|
] })
|
|
841
842
|
] });
|
|
842
|
-
},
|
|
843
|
-
var
|
|
843
|
+
}, dt = (e) => {
|
|
844
|
+
var E;
|
|
844
845
|
const {
|
|
845
|
-
decision:
|
|
846
|
-
loading:
|
|
847
|
-
textValues:
|
|
848
|
-
position:
|
|
849
|
-
isOpen:
|
|
850
|
-
onToggle:
|
|
851
|
-
} = e, l = !!(
|
|
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 ? {
|
|
852
853
|
element: {
|
|
853
|
-
labelName:
|
|
854
|
-
value: String(
|
|
855
|
-
howToSetTheDecision:
|
|
856
|
-
decisionDataType:
|
|
854
|
+
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
855
|
+
value: String(t.effectiveFrom),
|
|
856
|
+
howToSetTheDecision: z.EQUAL,
|
|
857
|
+
decisionDataType: U.DATE
|
|
857
858
|
},
|
|
858
|
-
valueData:
|
|
859
|
-
labelName:
|
|
860
|
-
value: String(
|
|
861
|
-
howToSetTheDecision:
|
|
862
|
-
decisionDataType:
|
|
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
864
|
})
|
|
864
|
-
} : null,
|
|
865
|
+
} : null, p = s ? {
|
|
865
866
|
element: {
|
|
866
|
-
labelName:
|
|
867
|
-
value: String(
|
|
868
|
-
howToSetTheDecision:
|
|
869
|
-
decisionDataType:
|
|
867
|
+
labelName: r == null ? void 0 : r.validUntil,
|
|
868
|
+
value: String(t.validUntil),
|
|
869
|
+
howToSetTheDecision: z.EQUAL,
|
|
870
|
+
decisionDataType: U.DATE
|
|
870
871
|
},
|
|
871
|
-
valueData:
|
|
872
|
-
labelName:
|
|
873
|
-
value: String(
|
|
874
|
-
howToSetTheDecision:
|
|
875
|
-
decisionDataType:
|
|
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
877
|
})
|
|
877
|
-
} : null,
|
|
878
|
-
labelName:
|
|
879
|
-
decisionDataType:
|
|
880
|
-
value:
|
|
881
|
-
howToSetTheDecision:
|
|
882
|
-
} : null,
|
|
883
|
-
(
|
|
884
|
-
)) || [], m = Array.from({ length: 5 }), f = !!(!
|
|
885
|
-
return /* @__PURE__ */
|
|
886
|
-
|
|
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,
|
|
887
888
|
{
|
|
888
|
-
conditionsAlignment:
|
|
889
|
-
decision:
|
|
890
|
-
decisionMapper:
|
|
889
|
+
conditionsAlignment: w,
|
|
890
|
+
decision: t,
|
|
891
|
+
decisionMapper: u,
|
|
891
892
|
loading: f,
|
|
892
893
|
skeleton: m,
|
|
893
|
-
textValues:
|
|
894
|
-
visibleConditions:
|
|
895
|
-
tagLabel:
|
|
896
|
-
isOpen:
|
|
897
|
-
onToggle:
|
|
894
|
+
textValues: r,
|
|
895
|
+
visibleConditions: h,
|
|
896
|
+
tagLabel: D,
|
|
897
|
+
isOpen: o,
|
|
898
|
+
onToggle: c,
|
|
898
899
|
hasEffectiveFrom: l,
|
|
899
900
|
hasValidUntil: s,
|
|
900
|
-
effectiveFromRenderer:
|
|
901
|
-
validUntilRenderer:
|
|
901
|
+
effectiveFromRenderer: d,
|
|
902
|
+
validUntilRenderer: p
|
|
902
903
|
}
|
|
903
904
|
);
|
|
904
|
-
},
|
|
905
|
+
}, mn = rt`
|
|
905
906
|
from {
|
|
906
907
|
opacity: 0;
|
|
907
908
|
transform: translateY(20px);
|
|
@@ -911,12 +912,12 @@ const Cn = (e) => {
|
|
|
911
912
|
transform: translateY(0);
|
|
912
913
|
}
|
|
913
914
|
`;
|
|
914
|
-
|
|
915
|
+
N.div`
|
|
915
916
|
border-radius: 8px;
|
|
916
917
|
border: 1px solid
|
|
917
918
|
${({ theme: e }) => {
|
|
918
|
-
var
|
|
919
|
-
return ((
|
|
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;
|
|
920
921
|
}};
|
|
921
922
|
box-sizing: border-box;
|
|
922
923
|
display: flex;
|
|
@@ -925,21 +926,21 @@ x.div`
|
|
|
925
926
|
height: 100%;
|
|
926
927
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
927
928
|
`;
|
|
928
|
-
|
|
929
|
+
N.div`
|
|
929
930
|
& > div {
|
|
930
931
|
border-radius: 8px;
|
|
931
932
|
border: 1px solid
|
|
932
933
|
${({ theme: e }) => {
|
|
933
|
-
var
|
|
934
|
-
return ((
|
|
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;
|
|
935
936
|
}};
|
|
936
937
|
}
|
|
937
938
|
`;
|
|
938
|
-
|
|
939
|
+
N.div`
|
|
939
940
|
& > div {
|
|
940
941
|
background-color: ${({ theme: e }) => {
|
|
941
|
-
var
|
|
942
|
-
return ((
|
|
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;
|
|
943
944
|
}};
|
|
944
945
|
justify-content: center;
|
|
945
946
|
}
|
|
@@ -949,19 +950,19 @@ x.div`
|
|
|
949
950
|
padding-bottom: 12px;
|
|
950
951
|
cursor: pointer;
|
|
951
952
|
`;
|
|
952
|
-
|
|
953
|
+
N.div`
|
|
953
954
|
width: 100%;
|
|
954
955
|
height: 100%;
|
|
955
956
|
& > div {
|
|
956
|
-
animation: ${
|
|
957
|
+
animation: ${mn} 600ms ease-out;
|
|
957
958
|
}
|
|
958
959
|
`;
|
|
959
|
-
const
|
|
960
|
+
const bn = N.div`
|
|
960
961
|
& > div > div {
|
|
961
962
|
border-radius: 8px;
|
|
962
963
|
box-sizing: border-box;
|
|
963
964
|
}
|
|
964
|
-
`,
|
|
965
|
+
`, vn = N.div`
|
|
965
966
|
& > div {
|
|
966
967
|
width: 100%;
|
|
967
968
|
height: 100%;
|
|
@@ -981,63 +982,63 @@ const Sn = x.div`
|
|
|
981
982
|
border-radius: 8px;
|
|
982
983
|
}
|
|
983
984
|
}
|
|
984
|
-
`,
|
|
985
|
-
const { index:
|
|
986
|
-
return /* @__PURE__ */
|
|
987
|
-
|
|
985
|
+
`, yn = (e) => {
|
|
986
|
+
const { index: t, handleOpenModal: n } = e;
|
|
987
|
+
return /* @__PURE__ */ i(
|
|
988
|
+
ct,
|
|
988
989
|
{
|
|
989
|
-
id: `loading-card-${
|
|
990
|
+
id: `loading-card-${t}`,
|
|
990
991
|
handleDelete: () => {
|
|
991
992
|
},
|
|
992
|
-
handleView: () =>
|
|
993
|
+
handleView: () => n ? n() : null,
|
|
993
994
|
controls: !1,
|
|
994
|
-
children: /* @__PURE__ */
|
|
995
|
+
children: /* @__PURE__ */ i(dt, { loading: !0 })
|
|
995
996
|
},
|
|
996
|
-
`loading-card-${
|
|
997
|
+
`loading-card-${t}`
|
|
997
998
|
);
|
|
998
|
-
},
|
|
999
|
+
}, xn = (e) => {
|
|
999
1000
|
const {
|
|
1000
|
-
decision:
|
|
1001
|
-
controls:
|
|
1002
|
-
handleOpenModal:
|
|
1003
|
-
handleDelete:
|
|
1004
|
-
textValues:
|
|
1005
|
-
index:
|
|
1001
|
+
decision: t,
|
|
1002
|
+
controls: n,
|
|
1003
|
+
handleOpenModal: r,
|
|
1004
|
+
handleDelete: a,
|
|
1005
|
+
textValues: o,
|
|
1006
|
+
index: c,
|
|
1006
1007
|
isOpen: l,
|
|
1007
1008
|
onToggle: s
|
|
1008
1009
|
} = e;
|
|
1009
|
-
return
|
|
1010
|
-
|
|
1010
|
+
return t ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(b, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
1011
|
+
ct,
|
|
1011
1012
|
{
|
|
1012
|
-
id:
|
|
1013
|
-
handleDelete: () =>
|
|
1014
|
-
handleView: () =>
|
|
1015
|
-
controls:
|
|
1016
|
-
children: /* @__PURE__ */
|
|
1017
|
-
|
|
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,
|
|
1018
1019
|
{
|
|
1019
|
-
decision:
|
|
1020
|
-
textValues:
|
|
1021
|
-
position:
|
|
1020
|
+
decision: t,
|
|
1021
|
+
textValues: o,
|
|
1022
|
+
position: c,
|
|
1022
1023
|
isOpen: !!l,
|
|
1023
1024
|
onToggle: () => s == null ? void 0 : s(!l)
|
|
1024
1025
|
}
|
|
1025
1026
|
)
|
|
1026
1027
|
}
|
|
1027
|
-
) }) },
|
|
1028
|
-
},
|
|
1028
|
+
) }) }, t.decisionId) : null;
|
|
1029
|
+
}, wn = (e) => {
|
|
1029
1030
|
const {
|
|
1030
|
-
customTitleContentAddCard:
|
|
1031
|
-
index:
|
|
1032
|
-
handleOpenModal:
|
|
1033
|
-
shouldRenderEmptyMessage:
|
|
1031
|
+
customTitleContentAddCard: t,
|
|
1032
|
+
index: n,
|
|
1033
|
+
handleOpenModal: r,
|
|
1034
|
+
shouldRenderEmptyMessage: a
|
|
1034
1035
|
} = e;
|
|
1035
|
-
return /* @__PURE__ */
|
|
1036
|
-
|
|
1036
|
+
return /* @__PURE__ */ i(ge, { children: a ? null : /* @__PURE__ */ i(
|
|
1037
|
+
st,
|
|
1037
1038
|
{
|
|
1038
|
-
onClick: () =>
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1040
|
-
|
|
1039
|
+
onClick: () => r ? r() : null,
|
|
1040
|
+
children: /* @__PURE__ */ i(
|
|
1041
|
+
_,
|
|
1041
1042
|
{
|
|
1042
1043
|
direction: "column",
|
|
1043
1044
|
gap: "4px",
|
|
@@ -1045,19 +1046,19 @@ const Sn = x.div`
|
|
|
1045
1046
|
height: "100%",
|
|
1046
1047
|
background: !0,
|
|
1047
1048
|
borderRadius: "8px",
|
|
1048
|
-
children: /* @__PURE__ */
|
|
1049
|
-
|
|
1049
|
+
children: /* @__PURE__ */ g(
|
|
1050
|
+
b,
|
|
1050
1051
|
{
|
|
1051
1052
|
justifyContent: "space-between",
|
|
1052
1053
|
alignItems: "center",
|
|
1053
1054
|
padding: "16px",
|
|
1054
1055
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
|
|
1056
|
+
/* @__PURE__ */ i(k, { appearance: "gray", type: "label", size: "large", weight: "bold", children: t || "Agregar decisión" }),
|
|
1057
|
+
/* @__PURE__ */ i(
|
|
1058
|
+
M,
|
|
1058
1059
|
{
|
|
1059
1060
|
appearance: "gray",
|
|
1060
|
-
icon: /* @__PURE__ */
|
|
1061
|
+
icon: /* @__PURE__ */ i(pe, {}),
|
|
1061
1062
|
size: "24px",
|
|
1062
1063
|
cursorHover: !0
|
|
1063
1064
|
}
|
|
@@ -1068,94 +1069,94 @@ const Sn = x.div`
|
|
|
1068
1069
|
}
|
|
1069
1070
|
)
|
|
1070
1071
|
}
|
|
1071
|
-
) }, `add-decision-${
|
|
1072
|
-
},
|
|
1073
|
-
loading:
|
|
1074
|
-
decision:
|
|
1075
|
-
add:
|
|
1076
|
-
},
|
|
1077
|
-
const { type:
|
|
1078
|
-
return
|
|
1079
|
-
},
|
|
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) => {
|
|
1080
1081
|
const {
|
|
1081
|
-
controls:
|
|
1082
|
-
customTitleContentAddCard:
|
|
1083
|
-
decisions:
|
|
1084
|
-
loading:
|
|
1085
|
-
handleOpenModal:
|
|
1086
|
-
handleDelete:
|
|
1082
|
+
controls: t,
|
|
1083
|
+
customTitleContentAddCard: n,
|
|
1084
|
+
decisions: r,
|
|
1085
|
+
loading: a,
|
|
1086
|
+
handleOpenModal: o,
|
|
1087
|
+
handleDelete: c,
|
|
1087
1088
|
textValues: l,
|
|
1088
1089
|
isOpenFor: s,
|
|
1089
|
-
toggleAt:
|
|
1090
|
-
} = e,
|
|
1091
|
-
(
|
|
1090
|
+
toggleAt: d
|
|
1091
|
+
} = e, p = a ? Array.from({ length: 3 }).map(
|
|
1092
|
+
(h, m) => Ce({
|
|
1092
1093
|
type: "loading",
|
|
1093
1094
|
index: m,
|
|
1094
|
-
controls:
|
|
1095
|
-
customTitleContentAddCard:
|
|
1096
|
-
loading:
|
|
1097
|
-
handleOpenModal:
|
|
1098
|
-
handleDelete:
|
|
1095
|
+
controls: t,
|
|
1096
|
+
customTitleContentAddCard: n,
|
|
1097
|
+
loading: a,
|
|
1098
|
+
handleOpenModal: o,
|
|
1099
|
+
handleDelete: c,
|
|
1099
1100
|
textValues: l
|
|
1100
1101
|
})
|
|
1101
|
-
) :
|
|
1102
|
-
(
|
|
1102
|
+
) : r == null ? void 0 : r.map(
|
|
1103
|
+
(h, m) => Ce({
|
|
1103
1104
|
type: "decision",
|
|
1104
|
-
decision:
|
|
1105
|
+
decision: h,
|
|
1105
1106
|
controls: s ? s(m) : !1,
|
|
1106
|
-
customTitleContentAddCard:
|
|
1107
|
-
loading:
|
|
1108
|
-
handleOpenModal:
|
|
1109
|
-
handleDelete:
|
|
1107
|
+
customTitleContentAddCard: n,
|
|
1108
|
+
loading: a,
|
|
1109
|
+
handleOpenModal: o,
|
|
1110
|
+
handleDelete: c,
|
|
1110
1111
|
textValues: l,
|
|
1111
1112
|
index: m,
|
|
1112
1113
|
isOpen: s ? s(m) : !1,
|
|
1113
|
-
onToggle:
|
|
1114
|
+
onToggle: d ? () => d(m) : void 0
|
|
1114
1115
|
})
|
|
1115
|
-
),
|
|
1116
|
-
return { renderedCards:
|
|
1117
|
-
},
|
|
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) => {
|
|
1118
1119
|
const {
|
|
1119
|
-
controls:
|
|
1120
|
-
customTitleContentAddCard:
|
|
1121
|
-
customMessageEmptyDecisions:
|
|
1122
|
-
decisions:
|
|
1123
|
-
textValues:
|
|
1124
|
-
decisionTemplate:
|
|
1120
|
+
controls: t = !0,
|
|
1121
|
+
customTitleContentAddCard: n,
|
|
1122
|
+
customMessageEmptyDecisions: r,
|
|
1123
|
+
decisions: a,
|
|
1124
|
+
textValues: o,
|
|
1125
|
+
decisionTemplate: c,
|
|
1125
1126
|
isModalOpen: l,
|
|
1126
1127
|
selectedDecision: s,
|
|
1127
|
-
loading:
|
|
1128
|
-
handleOpenModal:
|
|
1129
|
-
handleCloseModal:
|
|
1130
|
-
handleSubmitForm:
|
|
1128
|
+
loading: d,
|
|
1129
|
+
handleOpenModal: p,
|
|
1130
|
+
handleCloseModal: u,
|
|
1131
|
+
handleSubmitForm: h,
|
|
1131
1132
|
handleDelete: m,
|
|
1132
1133
|
terms: f = !0
|
|
1133
|
-
} = e, [
|
|
1134
|
-
controls:
|
|
1135
|
-
customTitleContentAddCard:
|
|
1136
|
-
decisions:
|
|
1137
|
-
loading:
|
|
1138
|
-
handleOpenModal:
|
|
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,
|
|
1139
|
+
handleOpenModal: p,
|
|
1139
1140
|
handleDelete: m,
|
|
1140
|
-
textValues:
|
|
1141
|
-
isOpenFor: (
|
|
1142
|
-
toggleAt: (
|
|
1143
|
-
}),
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
|
|
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,
|
|
1147
1148
|
{
|
|
1148
1149
|
direction: "column",
|
|
1149
1150
|
gap: "28px",
|
|
1150
1151
|
width: "100%",
|
|
1151
|
-
height:
|
|
1152
|
+
height: E ? "auto" : "435px",
|
|
1152
1153
|
justifyContent: "center",
|
|
1153
1154
|
alignItems: "center",
|
|
1154
1155
|
children: [
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ i(k, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ g(O, { children: [
|
|
1156
1157
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
|
|
1158
|
+
/* @__PURE__ */ g(
|
|
1159
|
+
k,
|
|
1159
1160
|
{
|
|
1160
1161
|
as: "span",
|
|
1161
1162
|
type: "label",
|
|
@@ -1164,25 +1165,25 @@ const Sn = x.div`
|
|
|
1164
1165
|
weight: "bold",
|
|
1165
1166
|
children: [
|
|
1166
1167
|
"“",
|
|
1167
|
-
|
|
1168
|
+
n || "+ Agregar decisión",
|
|
1168
1169
|
"”"
|
|
1169
1170
|
]
|
|
1170
1171
|
}
|
|
1171
1172
|
),
|
|
1172
1173
|
"para empezar."
|
|
1173
1174
|
] }) }),
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
|
|
1175
|
+
/* @__PURE__ */ i(
|
|
1176
|
+
P,
|
|
1176
1177
|
{
|
|
1177
|
-
iconBefore: /* @__PURE__ */
|
|
1178
|
-
onClick: () =>
|
|
1179
|
-
children:
|
|
1178
|
+
iconBefore: /* @__PURE__ */ i(pe, {}),
|
|
1179
|
+
onClick: () => p ? p() : null,
|
|
1180
|
+
children: n || "Agregar decisión"
|
|
1180
1181
|
}
|
|
1181
1182
|
)
|
|
1182
1183
|
]
|
|
1183
1184
|
}
|
|
1184
|
-
) : /* @__PURE__ */
|
|
1185
|
-
|
|
1185
|
+
) : /* @__PURE__ */ g(
|
|
1186
|
+
he,
|
|
1186
1187
|
{
|
|
1187
1188
|
templateColumns: "1fr",
|
|
1188
1189
|
autoFlow: "row dense",
|
|
@@ -1192,54 +1193,54 @@ const Sn = x.div`
|
|
|
1192
1193
|
autoRows: "auto",
|
|
1193
1194
|
justifyItems: "center",
|
|
1194
1195
|
padding: "6px",
|
|
1195
|
-
height:
|
|
1196
|
+
height: E ? "auto" : "484px",
|
|
1196
1197
|
children: [
|
|
1197
|
-
|
|
1198
|
-
|
|
1198
|
+
x,
|
|
1199
|
+
S && Ce({
|
|
1199
1200
|
type: "add",
|
|
1200
|
-
index:
|
|
1201
|
-
controls:
|
|
1202
|
-
customTitleContentAddCard:
|
|
1203
|
-
customMessageEmptyDecisions:
|
|
1204
|
-
loading:
|
|
1205
|
-
handleOpenModal:
|
|
1201
|
+
index: a == null ? void 0 : a.length,
|
|
1202
|
+
controls: t,
|
|
1203
|
+
customTitleContentAddCard: n,
|
|
1204
|
+
customMessageEmptyDecisions: r,
|
|
1205
|
+
loading: d,
|
|
1206
|
+
handleOpenModal: p,
|
|
1206
1207
|
handleDelete: m,
|
|
1207
|
-
textValues:
|
|
1208
|
-
shouldRenderEmptyMessage:
|
|
1208
|
+
textValues: o,
|
|
1209
|
+
shouldRenderEmptyMessage: T,
|
|
1209
1210
|
terms: f
|
|
1210
1211
|
})
|
|
1211
1212
|
]
|
|
1212
1213
|
}
|
|
1213
1214
|
) }) }) }),
|
|
1214
|
-
l && /* @__PURE__ */
|
|
1215
|
-
|
|
1215
|
+
l && /* @__PURE__ */ i(
|
|
1216
|
+
lt,
|
|
1216
1217
|
{
|
|
1217
1218
|
portalId: "modal-portal",
|
|
1218
|
-
onCloseModal:
|
|
1219
|
+
onCloseModal: u,
|
|
1219
1220
|
title: s ? "Editar Decisión" : "Nueva decisión",
|
|
1220
|
-
children: /* @__PURE__ */
|
|
1221
|
-
|
|
1221
|
+
children: /* @__PURE__ */ i(
|
|
1222
|
+
ut,
|
|
1222
1223
|
{
|
|
1223
|
-
decision: s ||
|
|
1224
|
-
onSubmitEvent:
|
|
1225
|
-
textValues:
|
|
1226
|
-
onCancel: () =>
|
|
1224
|
+
decision: s || c,
|
|
1225
|
+
onSubmitEvent: h,
|
|
1226
|
+
textValues: o,
|
|
1227
|
+
onCancel: () => u ? u() : () => {
|
|
1227
1228
|
}
|
|
1228
1229
|
}
|
|
1229
1230
|
)
|
|
1230
1231
|
}
|
|
1231
1232
|
)
|
|
1232
1233
|
] });
|
|
1233
|
-
},
|
|
1234
|
+
}, Nn = {
|
|
1234
1235
|
border: {
|
|
1235
|
-
color:
|
|
1236
|
+
color: C.palette.neutral.N40
|
|
1236
1237
|
}
|
|
1237
|
-
},
|
|
1238
|
+
}, En = N.div`
|
|
1238
1239
|
border-width: 1px;
|
|
1239
1240
|
border-style: solid;
|
|
1240
1241
|
border-color: ${({ theme: e }) => {
|
|
1241
|
-
var
|
|
1242
|
-
return ((
|
|
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;
|
|
1243
1244
|
}};
|
|
1244
1245
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1245
1246
|
margin: ${({ $margin: e }) => e};
|
|
@@ -1248,92 +1249,92 @@ const Sn = x.div`
|
|
|
1248
1249
|
height: ${({ $height: e }) => e};
|
|
1249
1250
|
box-sizing: border-box;
|
|
1250
1251
|
`;
|
|
1251
|
-
function
|
|
1252
|
+
function Sn(e) {
|
|
1252
1253
|
const {
|
|
1253
|
-
children:
|
|
1254
|
-
padding:
|
|
1255
|
-
margin:
|
|
1256
|
-
borderRadius:
|
|
1257
|
-
width:
|
|
1258
|
-
height:
|
|
1254
|
+
children: t,
|
|
1255
|
+
padding: n = "16px",
|
|
1256
|
+
margin: r,
|
|
1257
|
+
borderRadius: a = "8px",
|
|
1258
|
+
width: o,
|
|
1259
|
+
height: c
|
|
1259
1260
|
} = e;
|
|
1260
|
-
return /* @__PURE__ */
|
|
1261
|
-
|
|
1261
|
+
return /* @__PURE__ */ i(
|
|
1262
|
+
En,
|
|
1262
1263
|
{
|
|
1263
|
-
$padding:
|
|
1264
|
-
$margin:
|
|
1265
|
-
$borderRadius:
|
|
1266
|
-
$width:
|
|
1267
|
-
$height:
|
|
1268
|
-
children:
|
|
1264
|
+
$padding: n,
|
|
1265
|
+
$margin: r,
|
|
1266
|
+
$borderRadius: a,
|
|
1267
|
+
$width: o,
|
|
1268
|
+
$height: c,
|
|
1269
|
+
children: t
|
|
1269
1270
|
}
|
|
1270
1271
|
);
|
|
1271
1272
|
}
|
|
1272
|
-
const
|
|
1273
|
-
const [
|
|
1274
|
-
return
|
|
1273
|
+
const Dn = (e, t) => {
|
|
1274
|
+
const [n, r] = V([]), [a, o] = V([]), [c, l] = V(!1), s = le(null);
|
|
1275
|
+
return ke(() => {
|
|
1275
1276
|
if (!e.current || !s.current) return;
|
|
1276
|
-
const
|
|
1277
|
-
var
|
|
1278
|
-
const m =
|
|
1279
|
-
|
|
1280
|
-
),
|
|
1281
|
-
let
|
|
1282
|
-
const
|
|
1283
|
-
for (let
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1277
|
+
const d = e.current, p = s.current, u = () => {
|
|
1278
|
+
var S;
|
|
1279
|
+
const m = d.clientWidth, f = Array.from(
|
|
1280
|
+
p.querySelectorAll('[data-filter-tag="true"]')
|
|
1281
|
+
), w = 48;
|
|
1282
|
+
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]);
|
|
1286
1287
|
}
|
|
1287
|
-
|
|
1288
|
-
},
|
|
1289
|
-
requestAnimationFrame(
|
|
1288
|
+
r(E), o(x), l(x.length > 0);
|
|
1289
|
+
}, h = new ResizeObserver(() => {
|
|
1290
|
+
requestAnimationFrame(u);
|
|
1290
1291
|
});
|
|
1291
|
-
return
|
|
1292
|
-
}, [
|
|
1292
|
+
return h.observe(d), () => h.disconnect();
|
|
1293
|
+
}, [t, e]), { visible: n, hidden: a, showOverflowIndicator: c, measurementRef: s };
|
|
1293
1294
|
};
|
|
1294
|
-
|
|
1295
|
+
N.div`
|
|
1295
1296
|
& > div {
|
|
1296
1297
|
width: 100%;
|
|
1297
1298
|
}
|
|
1298
1299
|
`;
|
|
1299
|
-
const
|
|
1300
|
+
const kn = N.div`
|
|
1300
1301
|
position: absolute;
|
|
1301
1302
|
top: calc(100% + 4px);
|
|
1302
1303
|
right: 0;
|
|
1303
1304
|
z-index: 1000;
|
|
1304
1305
|
width: 170px;
|
|
1305
|
-
`,
|
|
1306
|
+
`, Rn = N.div`
|
|
1306
1307
|
position: absolute;
|
|
1307
1308
|
visibility: hidden;
|
|
1308
1309
|
pointer-events: none;
|
|
1309
1310
|
height: 0;
|
|
1310
1311
|
overflow: hidden;
|
|
1311
|
-
`,
|
|
1312
|
+
`, An = N.div`
|
|
1312
1313
|
cursor: pointer;
|
|
1313
|
-
`,
|
|
1314
|
+
`, Ne = {
|
|
1314
1315
|
border: {
|
|
1315
1316
|
color: {
|
|
1316
|
-
regular:
|
|
1317
|
-
disabled:
|
|
1318
|
-
focus:
|
|
1319
|
-
invalid:
|
|
1317
|
+
regular: C.palette.neutral.N40,
|
|
1318
|
+
disabled: C.palette.neutral.N40,
|
|
1319
|
+
focus: C.palette.blue.B300,
|
|
1320
|
+
invalid: C.palette.red.R400
|
|
1320
1321
|
}
|
|
1321
1322
|
},
|
|
1322
1323
|
background: {
|
|
1323
1324
|
color: {
|
|
1324
|
-
regular:
|
|
1325
|
-
disabled:
|
|
1325
|
+
regular: C.palette.neutral.N0,
|
|
1326
|
+
disabled: C.palette.neutral.N10
|
|
1326
1327
|
}
|
|
1327
1328
|
},
|
|
1328
1329
|
content: {
|
|
1329
1330
|
color: {
|
|
1330
|
-
regular:
|
|
1331
|
-
disabled:
|
|
1331
|
+
regular: C.palette.neutral.N900,
|
|
1332
|
+
disabled: C.palette.neutral.N70
|
|
1332
1333
|
}
|
|
1333
1334
|
},
|
|
1334
1335
|
placeholder: {
|
|
1335
1336
|
color: {
|
|
1336
|
-
regular:
|
|
1337
|
+
regular: C.palette.neutral.N300
|
|
1337
1338
|
}
|
|
1338
1339
|
},
|
|
1339
1340
|
option: {
|
|
@@ -1342,11 +1343,11 @@ const Ln = x.div`
|
|
|
1342
1343
|
hover: "primary"
|
|
1343
1344
|
},
|
|
1344
1345
|
background: {
|
|
1345
|
-
regular:
|
|
1346
|
-
hover:
|
|
1346
|
+
regular: C.palette.neutral.N0,
|
|
1347
|
+
hover: C.palette.neutral.N30
|
|
1347
1348
|
}
|
|
1348
1349
|
}
|
|
1349
|
-
},
|
|
1350
|
+
}, $n = N.li`
|
|
1350
1351
|
display: flex;
|
|
1351
1352
|
align-items: center;
|
|
1352
1353
|
align-self: stretch;
|
|
@@ -1360,56 +1361,56 @@ const Ln = x.div`
|
|
|
1360
1361
|
|
|
1361
1362
|
&:hover {
|
|
1362
1363
|
background-color: ${({ theme: e }) => {
|
|
1363
|
-
var
|
|
1364
|
-
return ((
|
|
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;
|
|
1365
1366
|
}};
|
|
1366
1367
|
}
|
|
1367
|
-
`,
|
|
1368
|
-
var
|
|
1369
|
-
const { id:
|
|
1370
|
-
return /* @__PURE__ */
|
|
1371
|
-
|
|
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,
|
|
1372
1373
|
{
|
|
1373
|
-
id:
|
|
1374
|
+
id: t,
|
|
1374
1375
|
onMouseEnter: l,
|
|
1375
1376
|
onMouseLeave: s,
|
|
1376
|
-
onClick: (
|
|
1377
|
-
|
|
1377
|
+
onClick: (x) => {
|
|
1378
|
+
x.stopPropagation();
|
|
1378
1379
|
},
|
|
1379
|
-
children: /* @__PURE__ */
|
|
1380
|
-
|
|
1380
|
+
children: /* @__PURE__ */ g(
|
|
1381
|
+
he,
|
|
1381
1382
|
{
|
|
1382
1383
|
alignItems: "center",
|
|
1383
1384
|
gap: "8px",
|
|
1384
1385
|
templateColumns: "auto 1fr auto",
|
|
1385
1386
|
width: "100%",
|
|
1386
1387
|
children: [
|
|
1387
|
-
|
|
1388
|
-
|
|
1388
|
+
r && /* @__PURE__ */ i(
|
|
1389
|
+
M,
|
|
1389
1390
|
{
|
|
1390
|
-
icon:
|
|
1391
|
+
icon: r,
|
|
1391
1392
|
size: "medium",
|
|
1392
|
-
appearance:
|
|
1393
|
+
appearance: o ? p : u
|
|
1393
1394
|
}
|
|
1394
1395
|
),
|
|
1395
|
-
/* @__PURE__ */
|
|
1396
|
-
|
|
1396
|
+
/* @__PURE__ */ i(
|
|
1397
|
+
k,
|
|
1397
1398
|
{
|
|
1398
1399
|
textAlign: "start",
|
|
1399
1400
|
size: "medium",
|
|
1400
|
-
appearance:
|
|
1401
|
-
children:
|
|
1401
|
+
appearance: o ? p : u,
|
|
1402
|
+
children: n
|
|
1402
1403
|
}
|
|
1403
1404
|
),
|
|
1404
|
-
/* @__PURE__ */
|
|
1405
|
-
|
|
1405
|
+
/* @__PURE__ */ i(
|
|
1406
|
+
M,
|
|
1406
1407
|
{
|
|
1407
|
-
icon: /* @__PURE__ */
|
|
1408
|
+
icon: /* @__PURE__ */ i(St, {}),
|
|
1408
1409
|
size: "small",
|
|
1409
|
-
onClick: (
|
|
1410
|
-
|
|
1410
|
+
onClick: (x) => {
|
|
1411
|
+
x.stopPropagation(), a == null || a();
|
|
1411
1412
|
},
|
|
1412
|
-
appearance:
|
|
1413
|
+
appearance: o ? p : u,
|
|
1413
1414
|
cursorHover: !0
|
|
1414
1415
|
}
|
|
1415
1416
|
)
|
|
@@ -1418,54 +1419,54 @@ const Ln = x.div`
|
|
|
1418
1419
|
)
|
|
1419
1420
|
}
|
|
1420
1421
|
);
|
|
1421
|
-
},
|
|
1422
|
+
}, aa = (e) => {
|
|
1422
1423
|
const {
|
|
1423
|
-
appliedFilters:
|
|
1424
|
-
onClear:
|
|
1425
|
-
onClick:
|
|
1426
|
-
noFiltersLabel:
|
|
1427
|
-
titleClearFilter:
|
|
1428
|
-
titleFilter:
|
|
1429
|
-
} = e, l =
|
|
1430
|
-
visible:
|
|
1431
|
-
hidden:
|
|
1432
|
-
showOverflowIndicator:
|
|
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), {
|
|
1431
|
+
visible: p,
|
|
1432
|
+
hidden: u,
|
|
1433
|
+
showOverflowIndicator: h,
|
|
1433
1434
|
measurementRef: m
|
|
1434
|
-
} =
|
|
1435
|
-
|
|
1435
|
+
} = Dn(l, t), [f, w] = V(!1), D = (y) => {
|
|
1436
|
+
y.stopPropagation(), w((R) => !R);
|
|
1436
1437
|
};
|
|
1437
|
-
|
|
1438
|
-
const
|
|
1439
|
-
var
|
|
1440
|
-
const
|
|
1441
|
-
!((
|
|
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);
|
|
1442
1443
|
};
|
|
1443
|
-
return f && window.addEventListener("mousedown",
|
|
1444
|
+
return f && window.addEventListener("mousedown", y), () => window.removeEventListener("mousedown", y);
|
|
1444
1445
|
}, [f]);
|
|
1445
|
-
const
|
|
1446
|
-
id:
|
|
1447
|
-
value:
|
|
1448
|
-
label:
|
|
1449
|
-
icon:
|
|
1450
|
-
})),
|
|
1451
|
-
var
|
|
1452
|
-
(
|
|
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);
|
|
1453
1454
|
};
|
|
1454
|
-
return /* @__PURE__ */
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
|
|
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,
|
|
1457
1458
|
{
|
|
1458
1459
|
appearance: "primary",
|
|
1459
1460
|
displayIcon: !0,
|
|
1460
1461
|
removable: !0,
|
|
1461
|
-
icon:
|
|
1462
|
-
label:
|
|
1463
|
-
onClose:
|
|
1462
|
+
icon: y.icon,
|
|
1463
|
+
label: y.label,
|
|
1464
|
+
onClose: y.onClose
|
|
1464
1465
|
}
|
|
1465
|
-
) },
|
|
1466
|
-
/* @__PURE__ */
|
|
1467
|
-
/* @__PURE__ */
|
|
1468
|
-
|
|
1466
|
+
) }, y.label)) }),
|
|
1467
|
+
/* @__PURE__ */ g(he, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
1468
|
+
/* @__PURE__ */ i(
|
|
1469
|
+
_,
|
|
1469
1470
|
{
|
|
1470
1471
|
ref: l,
|
|
1471
1472
|
background: !0,
|
|
@@ -1476,50 +1477,50 @@ const Ln = x.div`
|
|
|
1476
1477
|
alignItems: "center",
|
|
1477
1478
|
padding: "0px 8px",
|
|
1478
1479
|
border: !0,
|
|
1479
|
-
children:
|
|
1480
|
-
|
|
1481
|
-
|
|
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,
|
|
1482
1483
|
{
|
|
1483
1484
|
"data-filter-tag": "true",
|
|
1484
1485
|
appearance: "primary",
|
|
1485
1486
|
displayIcon: !0,
|
|
1486
1487
|
removable: !0,
|
|
1487
|
-
icon:
|
|
1488
|
-
label:
|
|
1489
|
-
onClose:
|
|
1488
|
+
icon: y.icon,
|
|
1489
|
+
label: y.label,
|
|
1490
|
+
onClose: y.onClose
|
|
1490
1491
|
},
|
|
1491
|
-
|
|
1492
|
+
y.label
|
|
1492
1493
|
)),
|
|
1493
|
-
|
|
1494
|
+
h && /* @__PURE__ */ g(
|
|
1494
1495
|
"div",
|
|
1495
1496
|
{
|
|
1496
|
-
ref:
|
|
1497
|
+
ref: d,
|
|
1497
1498
|
style: { position: "relative", display: "inline-block" },
|
|
1498
1499
|
children: [
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
|
|
1500
|
+
/* @__PURE__ */ i(An, { onClick: D, children: /* @__PURE__ */ i(
|
|
1501
|
+
X,
|
|
1501
1502
|
{
|
|
1502
1503
|
appearance: "primary",
|
|
1503
|
-
label: `+${
|
|
1504
|
+
label: `+${u.length}`
|
|
1504
1505
|
}
|
|
1505
1506
|
) }),
|
|
1506
|
-
|
|
1507
|
-
|
|
1507
|
+
x && /* @__PURE__ */ i(kn, { ref: s, children: /* @__PURE__ */ i(
|
|
1508
|
+
$t,
|
|
1508
1509
|
{
|
|
1509
|
-
options:
|
|
1510
|
-
onOptionClick:
|
|
1511
|
-
children:
|
|
1512
|
-
|
|
1510
|
+
options: S,
|
|
1511
|
+
onOptionClick: T,
|
|
1512
|
+
children: u.map((y) => /* @__PURE__ */ i(
|
|
1513
|
+
On,
|
|
1513
1514
|
{
|
|
1514
|
-
id:
|
|
1515
|
-
label:
|
|
1516
|
-
leadingIcon:
|
|
1515
|
+
id: y.label,
|
|
1516
|
+
label: y.label,
|
|
1517
|
+
leadingIcon: y.icon,
|
|
1517
1518
|
onClose: () => {
|
|
1518
|
-
var
|
|
1519
|
-
(
|
|
1519
|
+
var R;
|
|
1520
|
+
(R = y.onClose) == null || R.call(y), w(!1);
|
|
1520
1521
|
}
|
|
1521
1522
|
},
|
|
1522
|
-
|
|
1523
|
+
y.label
|
|
1523
1524
|
))
|
|
1524
1525
|
}
|
|
1525
1526
|
) })
|
|
@@ -1529,35 +1530,35 @@ const Ln = x.div`
|
|
|
1529
1530
|
] })
|
|
1530
1531
|
}
|
|
1531
1532
|
),
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
|
|
1533
|
+
/* @__PURE__ */ i(
|
|
1534
|
+
P,
|
|
1534
1535
|
{
|
|
1535
1536
|
cursorHover: !0,
|
|
1536
|
-
disabled:
|
|
1537
|
-
iconBefore: /* @__PURE__ */
|
|
1538
|
-
onClick:
|
|
1537
|
+
disabled: E,
|
|
1538
|
+
iconBefore: /* @__PURE__ */ i(Ze, {}),
|
|
1539
|
+
onClick: n,
|
|
1539
1540
|
variant: "outlined",
|
|
1540
|
-
children:
|
|
1541
|
+
children: o
|
|
1541
1542
|
}
|
|
1542
1543
|
),
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
|
|
1544
|
+
/* @__PURE__ */ i(
|
|
1545
|
+
P,
|
|
1545
1546
|
{
|
|
1546
1547
|
cursorHover: !0,
|
|
1547
|
-
iconBefore: /* @__PURE__ */
|
|
1548
|
-
onClick:
|
|
1548
|
+
iconBefore: /* @__PURE__ */ i(et, {}),
|
|
1549
|
+
onClick: r,
|
|
1549
1550
|
variant: "outlined",
|
|
1550
|
-
children:
|
|
1551
|
+
children: c
|
|
1551
1552
|
}
|
|
1552
1553
|
)
|
|
1553
1554
|
] })
|
|
1554
1555
|
] });
|
|
1555
|
-
},
|
|
1556
|
+
}, Fn = N.div`
|
|
1556
1557
|
display: flex;
|
|
1557
1558
|
flex-direction: column;
|
|
1558
1559
|
background-color: ${({ theme: e }) => {
|
|
1559
|
-
var
|
|
1560
|
-
return ((
|
|
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;
|
|
1561
1562
|
}};
|
|
1562
1563
|
width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
|
|
1563
1564
|
height: auto;
|
|
@@ -1565,77 +1566,77 @@ const Ln = x.div`
|
|
|
1565
1566
|
padding: 24px;
|
|
1566
1567
|
gap: 24px;
|
|
1567
1568
|
box-sizing: border-box;
|
|
1568
|
-
`,
|
|
1569
|
+
`, ia = (e) => {
|
|
1569
1570
|
const {
|
|
1570
|
-
actionButtonLabel:
|
|
1571
|
-
cancelButtonLabel:
|
|
1572
|
-
children:
|
|
1573
|
-
loading:
|
|
1574
|
-
onClick:
|
|
1575
|
-
onCloseModal:
|
|
1571
|
+
actionButtonLabel: t,
|
|
1572
|
+
cancelButtonLabel: n,
|
|
1573
|
+
children: r,
|
|
1574
|
+
loading: a,
|
|
1575
|
+
onClick: o,
|
|
1576
|
+
onCloseModal: c,
|
|
1576
1577
|
portalId: l,
|
|
1577
1578
|
title: s
|
|
1578
|
-
} = e,
|
|
1579
|
-
if (!
|
|
1579
|
+
} = e, d = H("(max-width: 768px)"), p = document.getElementById(l);
|
|
1580
|
+
if (!p)
|
|
1580
1581
|
throw new Error(
|
|
1581
1582
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
1582
1583
|
);
|
|
1583
|
-
return
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1591
|
-
|
|
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,
|
|
1592
1593
|
{
|
|
1593
1594
|
appearance: "dark",
|
|
1594
|
-
icon: /* @__PURE__ */
|
|
1595
|
-
onClick:
|
|
1595
|
+
icon: /* @__PURE__ */ i(Ye, {}),
|
|
1596
|
+
onClick: c,
|
|
1596
1597
|
cursorHover: !0
|
|
1597
1598
|
}
|
|
1598
1599
|
)
|
|
1599
1600
|
] })
|
|
1600
1601
|
] }),
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ i(L, {})
|
|
1602
1603
|
] }),
|
|
1603
|
-
|
|
1604
|
-
/* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
|
|
1604
|
+
r,
|
|
1605
|
+
/* @__PURE__ */ g(b, { gap: "20px", justifyContent: "flex-end", children: [
|
|
1606
|
+
/* @__PURE__ */ i(
|
|
1607
|
+
P,
|
|
1607
1608
|
{
|
|
1608
1609
|
appearance: "gray",
|
|
1609
|
-
onClick:
|
|
1610
|
-
iconBefore: /* @__PURE__ */
|
|
1610
|
+
onClick: c,
|
|
1611
|
+
iconBefore: /* @__PURE__ */ i(Ze, {}),
|
|
1611
1612
|
spacing: "wide",
|
|
1612
1613
|
variant: "outlined",
|
|
1613
|
-
children:
|
|
1614
|
+
children: n
|
|
1614
1615
|
}
|
|
1615
1616
|
),
|
|
1616
|
-
/* @__PURE__ */
|
|
1617
|
-
|
|
1617
|
+
/* @__PURE__ */ i(
|
|
1618
|
+
P,
|
|
1618
1619
|
{
|
|
1619
1620
|
appearance: "primary",
|
|
1620
|
-
loading:
|
|
1621
|
-
onClick:
|
|
1621
|
+
loading: a,
|
|
1622
|
+
onClick: o,
|
|
1622
1623
|
spacing: "wide",
|
|
1623
1624
|
variant: "filled",
|
|
1624
|
-
children:
|
|
1625
|
+
children: t
|
|
1625
1626
|
}
|
|
1626
1627
|
)
|
|
1627
1628
|
] })
|
|
1628
1629
|
] }) }),
|
|
1629
|
-
|
|
1630
|
+
p
|
|
1630
1631
|
);
|
|
1631
|
-
},
|
|
1632
|
-
const { appliedFilters:
|
|
1633
|
-
return /* @__PURE__ */
|
|
1634
|
-
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
|
|
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
|
+
_,
|
|
1639
1640
|
{
|
|
1640
1641
|
background: !0,
|
|
1641
1642
|
borderRadius: "8px",
|
|
@@ -1646,8 +1647,8 @@ const Ln = x.div`
|
|
|
1646
1647
|
border: !0,
|
|
1647
1648
|
width: "100%",
|
|
1648
1649
|
height: "36px",
|
|
1649
|
-
children:
|
|
1650
|
-
|
|
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,
|
|
1651
1652
|
{
|
|
1652
1653
|
appearance: "primary",
|
|
1653
1654
|
displayIcon: !0,
|
|
@@ -1661,19 +1662,19 @@ const Ln = x.div`
|
|
|
1661
1662
|
}
|
|
1662
1663
|
)
|
|
1663
1664
|
] }),
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ i(L, { dashed: !0 })
|
|
1665
1666
|
] }),
|
|
1666
|
-
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1669
|
-
|
|
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,
|
|
1670
1671
|
{
|
|
1671
1672
|
disabled: l.disabled,
|
|
1672
1673
|
invalid: l.invalid,
|
|
1673
1674
|
label: l.label,
|
|
1674
1675
|
message: l.message,
|
|
1675
1676
|
name: l.name,
|
|
1676
|
-
onChange:
|
|
1677
|
+
onChange: r,
|
|
1677
1678
|
options: l.options,
|
|
1678
1679
|
placeholder: l.placeholder,
|
|
1679
1680
|
required: l.required,
|
|
@@ -1684,137 +1685,137 @@ const Ln = x.div`
|
|
|
1684
1685
|
)
|
|
1685
1686
|
] }, l.name))
|
|
1686
1687
|
] });
|
|
1687
|
-
},
|
|
1688
|
-
const
|
|
1689
|
-
return e.from !== void 0 && e.from !== null &&
|
|
1690
|
-
},
|
|
1691
|
-
var
|
|
1692
|
-
const { decision:
|
|
1693
|
-
var
|
|
1694
|
-
const
|
|
1695
|
-
return
|
|
1696
|
-
...(
|
|
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],
|
|
1697
1698
|
...l,
|
|
1698
|
-
value:
|
|
1699
|
+
value: a(d)
|
|
1699
1700
|
};
|
|
1700
1701
|
}).filter(Boolean)) ?? [];
|
|
1701
1702
|
return {
|
|
1702
|
-
...
|
|
1703
|
-
...
|
|
1704
|
-
decisionId:
|
|
1705
|
-
value:
|
|
1706
|
-
conditionsThatEstablishesTheDecision:
|
|
1703
|
+
...r,
|
|
1704
|
+
...t,
|
|
1705
|
+
decisionId: n,
|
|
1706
|
+
value: a(t.value),
|
|
1707
|
+
conditionsThatEstablishesTheDecision: o
|
|
1707
1708
|
};
|
|
1708
|
-
},
|
|
1709
|
+
}, sa = (e) => {
|
|
1709
1710
|
if (typeof e != "string") return e;
|
|
1710
|
-
const
|
|
1711
|
-
for (const
|
|
1712
|
-
if (
|
|
1713
|
-
const
|
|
1714
|
-
isNaN(
|
|
1715
|
-
} else if (
|
|
1716
|
-
const
|
|
1717
|
-
isNaN(
|
|
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);
|
|
1718
1719
|
}
|
|
1719
|
-
return
|
|
1720
|
-
},
|
|
1721
|
-
const { dataDecision:
|
|
1722
|
-
conditionName:
|
|
1723
|
-
labelName:
|
|
1724
|
-
conditionDataType:
|
|
1725
|
-
value:
|
|
1726
|
-
howToSetTheCondition:
|
|
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",
|
|
1727
1728
|
switchPlaces: !0,
|
|
1728
1729
|
hidden: !1
|
|
1729
1730
|
};
|
|
1730
1731
|
return {
|
|
1731
|
-
...
|
|
1732
|
-
conditionsThatEstablishesTheDecision:
|
|
1733
|
-
(
|
|
1732
|
+
...n,
|
|
1733
|
+
conditionsThatEstablishesTheDecision: n.conditionsThatEstablishesTheDecision.map(
|
|
1734
|
+
(a) => a.hidden ? { ...r } : a
|
|
1734
1735
|
)
|
|
1735
1736
|
};
|
|
1736
|
-
},
|
|
1737
|
-
const { decisions:
|
|
1738
|
-
return
|
|
1739
|
-
var
|
|
1740
|
-
const
|
|
1741
|
-
(
|
|
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
|
|
1742
1743
|
);
|
|
1743
|
-
return
|
|
1744
|
-
...
|
|
1745
|
-
ruleName:
|
|
1746
|
-
labelName:
|
|
1747
|
-
decisionDataType:
|
|
1748
|
-
value:
|
|
1749
|
-
howToSetTheDecision:
|
|
1750
|
-
conditionsThatEstablishesTheDecision:
|
|
1751
|
-
(
|
|
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
|
|
1752
1753
|
)
|
|
1753
|
-
} :
|
|
1754
|
+
} : n;
|
|
1754
1755
|
});
|
|
1755
|
-
},
|
|
1756
|
-
schema:
|
|
1756
|
+
}, Ln = (e) => ({
|
|
1757
|
+
schema: Re().required("Required").test(
|
|
1757
1758
|
"non-empty",
|
|
1758
1759
|
"Value cannot be empty",
|
|
1759
|
-
(
|
|
1760
|
+
(t) => t != null && t.trim() !== ""
|
|
1760
1761
|
),
|
|
1761
1762
|
value: e
|
|
1762
|
-
}),
|
|
1763
|
-
schema:
|
|
1763
|
+
}), Mn = (e) => ({
|
|
1764
|
+
schema: it().test(
|
|
1764
1765
|
"isArrayOrString",
|
|
1765
1766
|
"Must be an array of strings/numbers or a single string",
|
|
1766
|
-
(
|
|
1767
|
-
(
|
|
1768
|
-
) : typeof
|
|
1767
|
+
(t) => Array.isArray(t) ? t.every(
|
|
1768
|
+
(n) => typeof n == "string" || typeof n == "number"
|
|
1769
|
+
) : typeof t == "string"
|
|
1769
1770
|
),
|
|
1770
1771
|
value: e
|
|
1771
|
-
}),
|
|
1772
|
-
schema:
|
|
1772
|
+
}), Un = (e) => ({
|
|
1773
|
+
schema: it().test(
|
|
1773
1774
|
"isArrayOrString",
|
|
1774
1775
|
"Must be an array of strings/numbers or a single string",
|
|
1775
|
-
(
|
|
1776
|
-
(
|
|
1777
|
-
) : typeof
|
|
1776
|
+
(t) => Array.isArray(t) ? t.every(
|
|
1777
|
+
(n) => typeof n == "string" || typeof n == "number"
|
|
1778
|
+
) : typeof t == "string"
|
|
1778
1779
|
),
|
|
1779
1780
|
value: e
|
|
1780
|
-
}),
|
|
1781
|
-
const
|
|
1781
|
+
}), Vn = (e) => {
|
|
1782
|
+
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
1782
1783
|
return {
|
|
1783
|
-
schema:
|
|
1784
|
-
from:
|
|
1785
|
-
to:
|
|
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(
|
|
1786
1787
|
"is-greater",
|
|
1787
1788
|
"To value must be greater than From value",
|
|
1788
|
-
function(
|
|
1789
|
-
const { from:
|
|
1790
|
-
return
|
|
1789
|
+
function(r) {
|
|
1790
|
+
const { from: a } = this.parent;
|
|
1791
|
+
return r > a;
|
|
1791
1792
|
}
|
|
1792
1793
|
)
|
|
1793
1794
|
}),
|
|
1794
|
-
value: { from:
|
|
1795
|
+
value: { from: t, to: n }
|
|
1795
1796
|
};
|
|
1796
|
-
},
|
|
1797
|
-
schema:
|
|
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"),
|
|
1798
1799
|
value: e
|
|
1799
1800
|
} : {
|
|
1800
|
-
schema:
|
|
1801
|
+
schema: Re().required("Required"),
|
|
1801
1802
|
value: e
|
|
1802
|
-
},
|
|
1803
|
-
[
|
|
1804
|
-
[
|
|
1805
|
-
[
|
|
1806
|
-
[
|
|
1807
|
-
[
|
|
1808
|
-
[
|
|
1809
|
-
},
|
|
1810
|
-
function
|
|
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({
|
|
1811
1812
|
decision: e,
|
|
1812
|
-
onSubmitEvent:
|
|
1813
|
-
textValues:
|
|
1813
|
+
onSubmitEvent: t,
|
|
1814
|
+
textValues: n
|
|
1814
1815
|
}) {
|
|
1815
|
-
const
|
|
1816
|
+
const r = {
|
|
1816
1817
|
ruleName: e.ruleName || "",
|
|
1817
|
-
decisionDataType: e.decisionDataType ||
|
|
1818
|
+
decisionDataType: e.decisionDataType || U.ALPHABETICAL,
|
|
1818
1819
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1819
1820
|
value: e.value || "",
|
|
1820
1821
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1824,25 +1825,25 @@ function Wn({
|
|
|
1824
1825
|
checkClosed: !1,
|
|
1825
1826
|
terms: !0
|
|
1826
1827
|
};
|
|
1827
|
-
let
|
|
1828
|
-
const
|
|
1829
|
-
ruleName:
|
|
1830
|
-
value:
|
|
1831
|
-
|
|
1828
|
+
let a;
|
|
1829
|
+
const o = {
|
|
1830
|
+
ruleName: Re().required("Name is required"),
|
|
1831
|
+
value: _e(() => ze(
|
|
1832
|
+
a.values.howToSetTheDecision
|
|
1832
1833
|
)(
|
|
1833
|
-
|
|
1834
|
-
|
|
1834
|
+
a.values.value,
|
|
1835
|
+
a.values.decisionDataType
|
|
1835
1836
|
).schema),
|
|
1836
|
-
conditionsThatEstablishesTheDecision:
|
|
1837
|
-
var
|
|
1838
|
-
if ((
|
|
1839
|
-
const
|
|
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(
|
|
1840
1841
|
(m, f) => {
|
|
1841
|
-
if (
|
|
1842
|
-
const
|
|
1842
|
+
if (a.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
1843
|
+
const D = ze(
|
|
1843
1844
|
f.howToSetTheCondition
|
|
1844
1845
|
);
|
|
1845
|
-
m[f.conditionName] =
|
|
1846
|
+
m[f.conditionName] = D(
|
|
1846
1847
|
f.value,
|
|
1847
1848
|
f.conditionDataType
|
|
1848
1849
|
).schema;
|
|
@@ -1851,7 +1852,7 @@ function Wn({
|
|
|
1851
1852
|
},
|
|
1852
1853
|
{}
|
|
1853
1854
|
);
|
|
1854
|
-
return
|
|
1855
|
+
return se(u).test(
|
|
1855
1856
|
"at-least-one-condition",
|
|
1856
1857
|
"It must be at least one condition in order for the decision to be validated correctly.",
|
|
1857
1858
|
(m) => m ? Object.values(m).some(
|
|
@@ -1860,27 +1861,27 @@ function Wn({
|
|
|
1860
1861
|
);
|
|
1861
1862
|
})
|
|
1862
1863
|
};
|
|
1863
|
-
|
|
1864
|
+
n.terms && (o.effectiveFrom = Pe().required(
|
|
1864
1865
|
"effective From date is required"
|
|
1865
|
-
),
|
|
1866
|
+
), o.validUntil = Pe().when(
|
|
1866
1867
|
"checkClosed",
|
|
1867
|
-
(s,
|
|
1868
|
+
(s, d, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? d.required("valid Until date is required").test(
|
|
1868
1869
|
"is-after-startDate",
|
|
1869
1870
|
"valid Until date must be greater than or equal to Start date",
|
|
1870
|
-
function(
|
|
1871
|
+
function(h) {
|
|
1871
1872
|
const m = this.parent.effectiveFrom;
|
|
1872
|
-
return !m || !
|
|
1873
|
+
return !m || !h ? !0 : new Date(h) >= new Date(m);
|
|
1873
1874
|
}
|
|
1874
|
-
) :
|
|
1875
|
+
) : d.notRequired()
|
|
1875
1876
|
));
|
|
1876
|
-
const
|
|
1877
|
-
return
|
|
1878
|
-
initialValues:
|
|
1879
|
-
validationSchema:
|
|
1877
|
+
const c = se(o);
|
|
1878
|
+
return a = Mt({
|
|
1879
|
+
initialValues: r,
|
|
1880
|
+
validationSchema: c,
|
|
1880
1881
|
validateOnBlur: !0,
|
|
1881
1882
|
onSubmit: (s) => {
|
|
1882
|
-
var
|
|
1883
|
-
const
|
|
1883
|
+
var p;
|
|
1884
|
+
const d = {
|
|
1884
1885
|
...e,
|
|
1885
1886
|
ruleName: s.ruleName,
|
|
1886
1887
|
decisionDataType: s.decisionDataType,
|
|
@@ -1888,44 +1889,44 @@ function Wn({
|
|
|
1888
1889
|
value: s.value,
|
|
1889
1890
|
effectiveFrom: s.effectiveFrom,
|
|
1890
1891
|
validUntil: s.validUntil,
|
|
1891
|
-
conditionsThatEstablishesTheDecision: (
|
|
1892
|
-
const
|
|
1893
|
-
return
|
|
1894
|
-
}).map((
|
|
1895
|
-
...
|
|
1896
|
-
value: s.conditionsThatEstablishesTheDecision[
|
|
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]
|
|
1897
1898
|
}))
|
|
1898
1899
|
};
|
|
1899
|
-
|
|
1900
|
+
t(d);
|
|
1900
1901
|
}
|
|
1901
|
-
}), { formik:
|
|
1902
|
-
var
|
|
1903
|
-
|
|
1902
|
+
}), { formik: a, handleToggleNoneChange: (s) => {
|
|
1903
|
+
var d;
|
|
1904
|
+
a.setFieldValue("toggleNone", s), (d = e.conditionsThatEstablishesTheDecision) == null || d.forEach((p) => {
|
|
1904
1905
|
if (s)
|
|
1905
|
-
|
|
1906
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1906
|
+
a.setFieldValue(
|
|
1907
|
+
`conditionsThatEstablishesTheDecision.${p.conditionName}`,
|
|
1907
1908
|
void 0
|
|
1908
1909
|
);
|
|
1909
1910
|
else {
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1913
|
-
|
|
1911
|
+
const u = p.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1912
|
+
a.setFieldValue(
|
|
1913
|
+
`conditionsThatEstablishesTheDecision.${p.conditionName}`,
|
|
1914
|
+
u
|
|
1914
1915
|
);
|
|
1915
1916
|
}
|
|
1916
1917
|
});
|
|
1917
1918
|
} };
|
|
1918
1919
|
}
|
|
1919
|
-
const
|
|
1920
|
+
const Bn = N.div`
|
|
1920
1921
|
& > div {
|
|
1921
1922
|
border-radius: 8px;
|
|
1922
1923
|
border: 1px solid
|
|
1923
1924
|
${({ theme: e }) => {
|
|
1924
|
-
var
|
|
1925
|
-
return ((
|
|
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;
|
|
1926
1927
|
}};
|
|
1927
1928
|
}
|
|
1928
|
-
`,
|
|
1929
|
+
`, jn = N.div`
|
|
1929
1930
|
width: 100%;
|
|
1930
1931
|
height: 100%;
|
|
1931
1932
|
overflow-y: auto;
|
|
@@ -1942,61 +1943,61 @@ const Yn = x.div`
|
|
|
1942
1943
|
background-color: #ebecf0;
|
|
1943
1944
|
border-radius: 8px;
|
|
1944
1945
|
}
|
|
1945
|
-
`,
|
|
1946
|
+
`, zn = (e) => {
|
|
1946
1947
|
const {
|
|
1947
|
-
checked:
|
|
1948
|
-
children:
|
|
1949
|
-
handleToggleChange:
|
|
1950
|
-
id:
|
|
1951
|
-
labelToggle:
|
|
1952
|
-
name:
|
|
1948
|
+
checked: t,
|
|
1949
|
+
children: n,
|
|
1950
|
+
handleToggleChange: r,
|
|
1951
|
+
id: a,
|
|
1952
|
+
labelToggle: o,
|
|
1953
|
+
name: c,
|
|
1953
1954
|
valueToggle: l = ""
|
|
1954
|
-
} = e, [s,
|
|
1955
|
-
|
|
1955
|
+
} = e, [s, d] = V(t), p = (u) => {
|
|
1956
|
+
d(u.target.checked), r(u);
|
|
1956
1957
|
};
|
|
1957
|
-
return
|
|
1958
|
-
|
|
1959
|
-
}, [
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
|
|
1958
|
+
return ke(() => {
|
|
1959
|
+
d(t);
|
|
1960
|
+
}, [t]), /* @__PURE__ */ g(O, { children: [
|
|
1961
|
+
/* @__PURE__ */ i(b, { children: /* @__PURE__ */ i(
|
|
1962
|
+
nt,
|
|
1962
1963
|
{
|
|
1963
1964
|
checked: s,
|
|
1964
|
-
id:
|
|
1965
|
-
name:
|
|
1966
|
-
onChange:
|
|
1965
|
+
id: a,
|
|
1966
|
+
name: c,
|
|
1967
|
+
onChange: p,
|
|
1967
1968
|
size: "small",
|
|
1968
1969
|
value: l,
|
|
1969
|
-
children: /* @__PURE__ */
|
|
1970
|
+
children: /* @__PURE__ */ i(k, { size: "medium", type: "label", weight: "bold", children: o })
|
|
1970
1971
|
}
|
|
1971
1972
|
) }),
|
|
1972
|
-
s && /* @__PURE__ */
|
|
1973
|
+
s && /* @__PURE__ */ i(O, { children: n })
|
|
1973
1974
|
] });
|
|
1974
|
-
},
|
|
1975
|
+
}, Hn = (e) => {
|
|
1975
1976
|
const {
|
|
1976
|
-
onHandleStartChange:
|
|
1977
|
-
onHandleEndChange:
|
|
1978
|
-
onCheckClosedChange:
|
|
1979
|
-
labelStart:
|
|
1980
|
-
labelEnd:
|
|
1981
|
-
checkedClosed:
|
|
1977
|
+
onHandleStartChange: t,
|
|
1978
|
+
onHandleEndChange: n,
|
|
1979
|
+
onCheckClosedChange: r,
|
|
1980
|
+
labelStart: a,
|
|
1981
|
+
labelEnd: o,
|
|
1982
|
+
checkedClosed: c = !1,
|
|
1982
1983
|
required: l = !1,
|
|
1983
1984
|
valueStart: s = "",
|
|
1984
|
-
valueEnd:
|
|
1985
|
-
messageStart:
|
|
1986
|
-
messageEnd:
|
|
1987
|
-
statusStart:
|
|
1985
|
+
valueEnd: d = "",
|
|
1986
|
+
messageStart: p = "",
|
|
1987
|
+
messageEnd: u = "",
|
|
1988
|
+
statusStart: h = "pending",
|
|
1988
1989
|
statusEnd: m = "pending"
|
|
1989
|
-
} = e, [f,
|
|
1990
|
-
|
|
1991
|
-
},
|
|
1992
|
-
|
|
1993
|
-
},
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
|
|
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,
|
|
2000
2001
|
{
|
|
2001
2002
|
appearance: "gray",
|
|
2002
2003
|
margin: "10px 0",
|
|
@@ -2006,18 +2007,18 @@ const Yn = x.div`
|
|
|
2006
2007
|
children: "Vigencia"
|
|
2007
2008
|
}
|
|
2008
2009
|
),
|
|
2009
|
-
/* @__PURE__ */
|
|
2010
|
-
|
|
2010
|
+
/* @__PURE__ */ i(
|
|
2011
|
+
b,
|
|
2011
2012
|
{
|
|
2012
2013
|
alignContent: "center",
|
|
2013
2014
|
justifyContent: "center",
|
|
2014
2015
|
wrap: "wrap",
|
|
2015
2016
|
gap: "4px",
|
|
2016
|
-
children: /* @__PURE__ */
|
|
2017
|
-
|
|
2017
|
+
children: /* @__PURE__ */ i(
|
|
2018
|
+
Ft,
|
|
2018
2019
|
{
|
|
2019
2020
|
label: "Cerrada",
|
|
2020
|
-
onChange:
|
|
2021
|
+
onChange: T,
|
|
2021
2022
|
checked: f,
|
|
2022
2023
|
value: ""
|
|
2023
2024
|
}
|
|
@@ -2025,233 +2026,1067 @@ const Yn = x.div`
|
|
|
2025
2026
|
}
|
|
2026
2027
|
)
|
|
2027
2028
|
] }),
|
|
2028
|
-
/* @__PURE__ */
|
|
2029
|
-
|
|
2029
|
+
/* @__PURE__ */ g(
|
|
2030
|
+
b,
|
|
2030
2031
|
{
|
|
2031
|
-
direction:
|
|
2032
|
+
direction: I ? "column" : "row",
|
|
2032
2033
|
justifyContent: "space-between",
|
|
2033
2034
|
gap: "24px",
|
|
2034
2035
|
children: [
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
|
|
2036
|
+
/* @__PURE__ */ i(
|
|
2037
|
+
Ue,
|
|
2037
2038
|
{
|
|
2038
2039
|
id: "dateStart",
|
|
2039
|
-
label:
|
|
2040
|
-
onChange:
|
|
2041
|
-
value:
|
|
2040
|
+
label: a,
|
|
2041
|
+
onChange: y,
|
|
2042
|
+
value: D,
|
|
2042
2043
|
required: l,
|
|
2043
2044
|
size: "compact",
|
|
2044
|
-
status:
|
|
2045
|
-
message:
|
|
2045
|
+
status: h,
|
|
2046
|
+
message: p
|
|
2046
2047
|
}
|
|
2047
2048
|
),
|
|
2048
|
-
f && /* @__PURE__ */
|
|
2049
|
-
|
|
2049
|
+
f && /* @__PURE__ */ i(
|
|
2050
|
+
Ue,
|
|
2050
2051
|
{
|
|
2051
2052
|
id: "dateEnd",
|
|
2052
|
-
label:
|
|
2053
|
-
onChange:
|
|
2054
|
-
value:
|
|
2053
|
+
label: o,
|
|
2054
|
+
onChange: R,
|
|
2055
|
+
value: x,
|
|
2055
2056
|
required: l,
|
|
2056
2057
|
size: "compact",
|
|
2057
2058
|
status: m,
|
|
2058
|
-
message:
|
|
2059
|
+
message: u
|
|
2059
2060
|
}
|
|
2060
2061
|
)
|
|
2061
2062
|
]
|
|
2062
2063
|
}
|
|
2063
2064
|
)
|
|
2064
2065
|
] });
|
|
2065
|
-
},
|
|
2066
|
+
}, qn = (e) => {
|
|
2066
2067
|
const {
|
|
2067
|
-
formik:
|
|
2068
|
-
textValues:
|
|
2069
|
-
onCancel:
|
|
2070
|
-
visibleConditions:
|
|
2071
|
-
normalizedDecision:
|
|
2072
|
-
handleToggleNoneChange:
|
|
2068
|
+
formik: t,
|
|
2069
|
+
textValues: n,
|
|
2070
|
+
onCancel: r,
|
|
2071
|
+
visibleConditions: a,
|
|
2072
|
+
normalizedDecision: o,
|
|
2073
|
+
handleToggleNoneChange: c,
|
|
2073
2074
|
handleConditionToggleChange: l,
|
|
2074
2075
|
showConditionsError: s,
|
|
2075
|
-
termStartStatus:
|
|
2076
|
-
termEndStatus:
|
|
2076
|
+
termStartStatus: d,
|
|
2077
|
+
termEndStatus: p
|
|
2077
2078
|
} = e;
|
|
2078
|
-
return /* @__PURE__ */
|
|
2079
|
-
|
|
2080
|
-
condition:
|
|
2081
|
-
formik:
|
|
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,
|
|
2082
2083
|
isDecision: !0
|
|
2083
2084
|
}),
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
|
|
2085
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
2086
|
+
/* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ g(
|
|
2087
|
+
b,
|
|
2087
2088
|
{
|
|
2088
2089
|
direction: "column",
|
|
2089
2090
|
padding: "6px 12px",
|
|
2090
2091
|
gap: "16px",
|
|
2091
2092
|
height: "272px",
|
|
2092
2093
|
children: [
|
|
2093
|
-
/* @__PURE__ */
|
|
2094
|
-
|
|
2094
|
+
/* @__PURE__ */ g(
|
|
2095
|
+
b,
|
|
2095
2096
|
{
|
|
2096
2097
|
justifyContent: "space-between",
|
|
2097
2098
|
alignItems: "center",
|
|
2098
2099
|
gap: "64px",
|
|
2099
2100
|
children: [
|
|
2100
|
-
/* @__PURE__ */
|
|
2101
|
-
/* @__PURE__ */
|
|
2102
|
-
|
|
2101
|
+
/* @__PURE__ */ i(k, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
2102
|
+
/* @__PURE__ */ i(
|
|
2103
|
+
nt,
|
|
2103
2104
|
{
|
|
2104
2105
|
id: "toggleNone",
|
|
2105
|
-
onChange: () =>
|
|
2106
|
-
checked:
|
|
2106
|
+
onChange: () => c(!t.values.toggleNone),
|
|
2107
|
+
checked: t.values.toggleNone,
|
|
2107
2108
|
size: "small",
|
|
2108
|
-
children: /* @__PURE__ */
|
|
2109
|
+
children: /* @__PURE__ */ i(k, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
|
|
2109
2110
|
}
|
|
2110
2111
|
)
|
|
2111
2112
|
]
|
|
2112
2113
|
}
|
|
2113
2114
|
),
|
|
2114
|
-
/* @__PURE__ */
|
|
2115
|
-
|
|
2115
|
+
/* @__PURE__ */ i(b, { direction: "column", gap: "20px", children: a == null ? void 0 : a.map((u) => /* @__PURE__ */ i(
|
|
2116
|
+
zn,
|
|
2116
2117
|
{
|
|
2117
|
-
id: `toggle-${
|
|
2118
|
-
name: `toggle.${
|
|
2119
|
-
labelToggle:
|
|
2120
|
-
checked: !
|
|
2121
|
-
handleToggleChange: (
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
)(
|
|
2125
|
-
children:
|
|
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 })
|
|
2126
2127
|
},
|
|
2127
|
-
|
|
2128
|
+
u.conditionName
|
|
2128
2129
|
)) })
|
|
2129
2130
|
]
|
|
2130
2131
|
}
|
|
2131
2132
|
) }) }),
|
|
2132
|
-
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
|
|
2133
|
+
n.terms && /* @__PURE__ */ g(O, { children: [
|
|
2134
|
+
/* @__PURE__ */ i(L, { dashed: !0 }),
|
|
2135
|
+
/* @__PURE__ */ i(
|
|
2136
|
+
Hn,
|
|
2136
2137
|
{
|
|
2137
|
-
labelStart:
|
|
2138
|
-
labelEnd:
|
|
2139
|
-
valueStart:
|
|
2140
|
-
valueEnd:
|
|
2141
|
-
messageStart:
|
|
2142
|
-
messageEnd:
|
|
2143
|
-
statusStart:
|
|
2144
|
-
statusEnd:
|
|
2145
|
-
onHandleStartChange: (
|
|
2146
|
-
onHandleEndChange: (
|
|
2147
|
-
onCheckClosedChange: (
|
|
2148
|
-
|
|
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,
|
|
2145
|
+
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", "");
|
|
2149
2150
|
},
|
|
2150
|
-
checkedClosed:
|
|
2151
|
+
checkedClosed: t.values.checkClosed
|
|
2151
2152
|
}
|
|
2152
2153
|
)
|
|
2153
2154
|
] }),
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
s && /* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */
|
|
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 })
|
|
2159
2160
|
] })
|
|
2160
2161
|
] }) });
|
|
2161
|
-
},
|
|
2162
|
+
}, ut = (e) => {
|
|
2162
2163
|
var m;
|
|
2163
|
-
const { decision:
|
|
2164
|
-
decision:
|
|
2165
|
-
onSubmitEvent:
|
|
2166
|
-
textValues:
|
|
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
|
|
2167
2168
|
}), l = {
|
|
2168
|
-
ruleName:
|
|
2169
|
-
labelName:
|
|
2170
|
-
howToSetTheCondition:
|
|
2171
|
-
decisionDataType:
|
|
2172
|
-
listOfPossibleValues:
|
|
2173
|
-
}, s = ((m =
|
|
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(
|
|
2174
2175
|
(f) => !f.hidden
|
|
2175
|
-
)) || [],
|
|
2176
|
-
return /* @__PURE__ */
|
|
2177
|
-
|
|
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,
|
|
2178
2179
|
{
|
|
2179
|
-
formik:
|
|
2180
|
-
onCancel:
|
|
2181
|
-
textValues:
|
|
2182
|
-
decision:
|
|
2180
|
+
formik: o,
|
|
2181
|
+
onCancel: a,
|
|
2182
|
+
textValues: r,
|
|
2183
|
+
decision: t,
|
|
2183
2184
|
visibleConditions: s,
|
|
2184
2185
|
normalizedDecision: l,
|
|
2185
|
-
handleToggleNoneChange:
|
|
2186
|
-
handleConditionToggleChange: (f,
|
|
2187
|
-
if (!
|
|
2188
|
-
|
|
2186
|
+
handleToggleNoneChange: c,
|
|
2187
|
+
handleConditionToggleChange: (f, w) => (D) => {
|
|
2188
|
+
if (!D)
|
|
2189
|
+
o.setFieldValue(
|
|
2189
2190
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
2190
2191
|
void 0
|
|
2191
|
-
),
|
|
2192
|
+
), o.setFieldTouched(
|
|
2192
2193
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
2193
2194
|
!1,
|
|
2194
2195
|
!1
|
|
2195
2196
|
);
|
|
2196
2197
|
else {
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2198
|
+
const E = w ? [] : "";
|
|
2199
|
+
o.setFieldValue(
|
|
2199
2200
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
2200
|
-
|
|
2201
|
+
E
|
|
2201
2202
|
);
|
|
2202
2203
|
}
|
|
2203
2204
|
},
|
|
2204
|
-
showConditionsError:
|
|
2205
|
-
termStartStatus:
|
|
2206
|
-
termEndStatus:
|
|
2205
|
+
showConditionsError: d,
|
|
2206
|
+
termStartStatus: p,
|
|
2207
|
+
termEndStatus: u
|
|
2207
2208
|
}
|
|
2208
2209
|
);
|
|
2209
|
-
},
|
|
2210
|
-
var
|
|
2211
|
-
const { decisionTemplate:
|
|
2212
|
-
(
|
|
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
|
|
2213
2214
|
);
|
|
2214
|
-
return
|
|
2215
|
-
...
|
|
2216
|
-
ruleName:
|
|
2217
|
-
labelName:
|
|
2218
|
-
decisionDataType:
|
|
2219
|
-
value:
|
|
2220
|
-
howToSetTheDecision:
|
|
2221
|
-
conditionsThatEstablishesTheDecision:
|
|
2222
|
-
(
|
|
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
|
|
2223
2224
|
)
|
|
2224
|
-
} :
|
|
2225
|
-
},
|
|
2226
|
-
const { decisions:
|
|
2227
|
-
return
|
|
2228
|
-
var
|
|
2229
|
-
const
|
|
2230
|
-
(
|
|
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
|
|
2231
2232
|
);
|
|
2232
|
-
return
|
|
2233
|
-
...
|
|
2234
|
-
ruleName:
|
|
2235
|
-
labelName:
|
|
2236
|
-
decisionDataType:
|
|
2237
|
-
value:
|
|
2238
|
-
howToSetTheDecision:
|
|
2239
|
-
conditionsThatEstablishesTheDecision:
|
|
2240
|
-
(
|
|
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
|
|
2241
2242
|
)
|
|
2242
|
-
} :
|
|
2243
|
+
} : n;
|
|
2243
2244
|
});
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
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
|
+
}
|
|
2249
2281
|
}
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
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
|
|
2310
|
+
});
|
|
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 = {
|
|
2918
|
+
item: {
|
|
2919
|
+
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
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
border: {
|
|
2927
|
+
expanded: {
|
|
2928
|
+
color: C.palette.blue.B400
|
|
2929
|
+
},
|
|
2930
|
+
contracted: {
|
|
2931
|
+
color: C.palette.neutral.N0
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
}, Fr = N.div`
|
|
2935
|
+
& > div {
|
|
2936
|
+
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;
|
|
2940
|
+
}};
|
|
2941
|
+
}
|
|
2942
|
+
&:hover {
|
|
2943
|
+
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;
|
|
2948
|
+
}};
|
|
2949
|
+
}
|
|
2950
|
+
`, Ir = N.div`
|
|
2951
|
+
display: block;
|
|
2952
|
+
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;
|
|
2956
|
+
}};
|
|
2957
|
+
&:hover {
|
|
2958
|
+
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;
|
|
2963
|
+
}};
|
|
2964
|
+
}
|
|
2965
|
+
`, Lr = N.div`
|
|
2966
|
+
display: flex;
|
|
2967
|
+
align-items: center;
|
|
2968
|
+
gap: 12px;
|
|
2969
|
+
width: 100%;
|
|
2970
|
+
outline: none;
|
|
2971
|
+
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
|
+
_,
|
|
2977
|
+
{
|
|
2978
|
+
alignItems: "center",
|
|
2979
|
+
borderRadius: "8px",
|
|
2980
|
+
direction: "row",
|
|
2981
|
+
gap: "12px",
|
|
2982
|
+
padding: "12px 8px",
|
|
2983
|
+
children: /* @__PURE__ */ g(
|
|
2984
|
+
Lr,
|
|
2985
|
+
{
|
|
2986
|
+
onClick: r,
|
|
2987
|
+
onKeyDown: (l) => {
|
|
2988
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), r());
|
|
2989
|
+
},
|
|
2990
|
+
role: "button",
|
|
2991
|
+
tabIndex: 0,
|
|
2992
|
+
"aria-expanded": t,
|
|
2993
|
+
"aria-controls": "dropdown-links",
|
|
2994
|
+
children: [
|
|
2995
|
+
/* @__PURE__ */ i(
|
|
2996
|
+
M,
|
|
2997
|
+
{
|
|
2998
|
+
appearance: t ? "primary" : "dark",
|
|
2999
|
+
cursorHover: !0,
|
|
3000
|
+
icon: t ? /* @__PURE__ */ i(Xe, {}) : /* @__PURE__ */ i(Dt, {})
|
|
3001
|
+
}
|
|
3002
|
+
),
|
|
3003
|
+
/* @__PURE__ */ i(
|
|
3004
|
+
k,
|
|
3005
|
+
{
|
|
3006
|
+
appearance: t ? "primary" : "dark",
|
|
3007
|
+
cursorHover: !0,
|
|
3008
|
+
size: "small",
|
|
3009
|
+
type: "title",
|
|
3010
|
+
weight: t ? "bold" : "normal",
|
|
3011
|
+
children: a
|
|
3012
|
+
}
|
|
3013
|
+
)
|
|
3014
|
+
]
|
|
3015
|
+
}
|
|
3016
|
+
)
|
|
3017
|
+
}
|
|
3018
|
+
),
|
|
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,
|
|
3025
|
+
{
|
|
3026
|
+
to: l.path,
|
|
3027
|
+
style: { textDecoration: "none" },
|
|
3028
|
+
children: /* @__PURE__ */ i(Ir, { $active: s, children: /* @__PURE__ */ g(
|
|
3029
|
+
b,
|
|
3030
|
+
{
|
|
3031
|
+
alignItems: "center",
|
|
3032
|
+
direction: "row",
|
|
3033
|
+
gap: "8px",
|
|
3034
|
+
padding: s ? "8px 4px" : "8px 32px",
|
|
3035
|
+
children: [
|
|
3036
|
+
s && /* @__PURE__ */ i(M, { appearance: "primary", icon: /* @__PURE__ */ i(kt, {}) }),
|
|
3037
|
+
/* @__PURE__ */ i(
|
|
3038
|
+
k,
|
|
3039
|
+
{
|
|
3040
|
+
appearance: s ? "primary" : "dark",
|
|
3041
|
+
size: "small",
|
|
3042
|
+
type: "title",
|
|
3043
|
+
weight: s ? "bold" : "normal",
|
|
3044
|
+
children: l.label
|
|
3045
|
+
}
|
|
3046
|
+
)
|
|
3047
|
+
]
|
|
3048
|
+
}
|
|
3049
|
+
) })
|
|
3050
|
+
},
|
|
3051
|
+
l.id
|
|
3052
|
+
);
|
|
3053
|
+
}) })
|
|
3054
|
+
] })
|
|
3055
|
+
] }) });
|
|
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;
|
|
3065
|
+
},
|
|
3066
|
+
[c.pathname]
|
|
3067
|
+
);
|
|
3068
|
+
return /* @__PURE__ */ i(O, { children: r.map((s) => /* @__PURE__ */ i(
|
|
3069
|
+
Mr,
|
|
3070
|
+
{
|
|
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
|
|
3076
|
+
},
|
|
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);
|
|
3084
|
+
}
|
|
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);
|
|
2255
3090
|
return {
|
|
2256
3091
|
spa: "es",
|
|
2257
3092
|
eng: "en",
|
|
@@ -2259,21 +3094,21 @@ const Yn = x.div`
|
|
|
2259
3094
|
fra: "fr",
|
|
2260
3095
|
ita: "it",
|
|
2261
3096
|
por: "pt"
|
|
2262
|
-
}[
|
|
2263
|
-
},
|
|
2264
|
-
const
|
|
2265
|
-
if (
|
|
2266
|
-
if (
|
|
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))
|
|
2267
3102
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
2268
|
-
const
|
|
3103
|
+
const c = Br(e);
|
|
2269
3104
|
try {
|
|
2270
|
-
const { data: l } = await
|
|
2271
|
-
|
|
3105
|
+
const { data: l } = await Ut.post(
|
|
3106
|
+
n,
|
|
2272
3107
|
{
|
|
2273
3108
|
q: e,
|
|
2274
|
-
source:
|
|
2275
|
-
target:
|
|
2276
|
-
api_key:
|
|
3109
|
+
source: c,
|
|
3110
|
+
target: t,
|
|
3111
|
+
api_key: r
|
|
2277
3112
|
},
|
|
2278
3113
|
{
|
|
2279
3114
|
headers: {
|
|
@@ -2281,51 +3116,53 @@ const Yn = x.div`
|
|
|
2281
3116
|
}
|
|
2282
3117
|
}
|
|
2283
3118
|
), s = (l == null ? void 0 : l.translatedText) || e;
|
|
2284
|
-
return
|
|
3119
|
+
return Vr(e, t, s), s;
|
|
2285
3120
|
} catch (l) {
|
|
2286
3121
|
return console.warn(`[Translation] Failed for: "${e}"`, l), e;
|
|
2287
3122
|
}
|
|
2288
|
-
},
|
|
2289
|
-
const
|
|
2290
|
-
Object.entries(e).map(async ([
|
|
2291
|
-
if (
|
|
2292
|
-
const
|
|
2293
|
-
return [
|
|
2294
|
-
} else if (Array.isArray(
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
async (l) => typeof l == "object" && l !== null ? await
|
|
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
|
|
2298
3133
|
)
|
|
2299
3134
|
);
|
|
2300
|
-
return [
|
|
2301
|
-
} else if (typeof
|
|
2302
|
-
const
|
|
2303
|
-
return [
|
|
3135
|
+
return [a, c];
|
|
3136
|
+
} else if (typeof o == "object" && o !== null) {
|
|
3137
|
+
const c = await Qe(o, t, n);
|
|
3138
|
+
return [a, c];
|
|
2304
3139
|
} else
|
|
2305
|
-
return [
|
|
3140
|
+
return [a, o];
|
|
2306
3141
|
})
|
|
2307
3142
|
);
|
|
2308
|
-
return Object.fromEntries(
|
|
3143
|
+
return Object.fromEntries(r);
|
|
2309
3144
|
};
|
|
2310
3145
|
export {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
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
|
|
2331
3168
|
};
|