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