@foris/avocado-not-front 4.7.0-beta.0.5 → 4.7.0

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.
@@ -1,64 +1,64 @@
1
- import X from "axios";
2
- import { create as ct } from "zustand";
3
- import it, { useMemo as O, useState as L, useCallback as q, Fragment as k, useEffect as U, useRef as je, cloneElement as lt } from "react";
4
- import { Heading as We, Text as dt, Accordion as _t, ThemeStore as ae, Box as ut, RadioButton as ht, Stepper as ft, ProgressBar as yt, Breadcrumbs as xt, Button as mt, CardAccordion as gt, Card as bt, CardNotification as oe, SkeletonBase as Qe, Checkbox as pt, PreviewerMarkdown as Ye, DataCard as jt, Divider as wt, Drawer as Ct, DropdownButton as Nt, Link as vt, Menu as St, Modal as kt, Pill as be, RoundButton as Et, SelectPagination as Tt, Select as Ot, Switch as At, Table as Oe, Pager as $t, Tabs as Dt, Textarea as qt, TextField as Rt, toast as ne, Tooltip as Lt, Loading as It, Toaster as Bt } from "@foris/avocado-suite";
5
- import { ChatPanel as Gt, PromptCodeEditor as Kt, SummaryCard as Mt } from "@foris/ai-agent";
1
+ import J from "axios";
2
+ import { create as at } from "zustand";
3
+ import rt, { useMemo as A, useState as L, useCallback as R, Fragment as T, useEffect as V, useRef as ge, cloneElement as ot } from "react";
4
+ import { Heading as ze, Text as ct, Accordion as it, ThemeStore as ne, Box as lt, RadioButton as dt, Stepper as _t, ProgressBar as ut, Breadcrumbs as ht, Button as ft, CardAccordion as yt, Card as mt, CardNotification as pe, SkeletonBase as He, Checkbox as xt, PreviewerMarkdown as Xe, DataCard as gt, Divider as pt, Drawer as bt, DropdownButton as jt, Link as wt, Menu as Ct, Modal as Nt, Pill as me, RoundButton as vt, SelectPagination as St, Select as kt, Switch as Et, Table as Tt, Pager as Ot, Tabs as At, Textarea as $t, TextField as qt, toast as ee, Tooltip as Dt, Loading as Rt, Toaster as Lt } from "@foris/avocado-suite";
5
+ import { ChatPanel as It, PromptCodeEditor as Bt, SummaryCard as Kt } from "@foris/ai-agent";
6
6
  import B from "jsonpath";
7
- import { ResponsiveContainer as Ze, Legend as Ut, Tooltip as Vt, XAxis as zt, YAxis as Ht, AreaChart as Xt, CartesianGrid as we, Area as Jt, BarChart as Wt, Bar as Qt, LineChart as Yt, Line as Zt, PieChart as Pt, Pie as Ft, Cell as en } from "recharts";
8
- import tn from "@uiw/react-codemirror";
9
- import { json as Ae } from "@codemirror/lang-json";
10
- import { markdown as nn } from "@codemirror/lang-markdown";
11
- import { sql as sn } from "@codemirror/lang-sql";
12
- import { yaml as an } from "@codemirror/lang-yaml";
13
- import { Icon as $e } from "@foris/avocado-icons";
14
- const N = ct(() => ({})), he = (e, t, s, a) => {
15
- const c = s == null ? void 0 : s.hash, i = a && Object.keys(a).length > 0 ? { ...a } : {};
16
- N.setState((l) => {
7
+ import { ResponsiveContainer as Je, Legend as Gt, Tooltip as Mt, XAxis as Ut, YAxis as Vt, AreaChart as zt, CartesianGrid as be, Area as Ht, BarChart as Xt, Bar as Jt, LineChart as Wt, Line as Qt, PieChart as Yt, Pie as Zt, Cell as Ft } from "recharts";
8
+ import Pt from "@uiw/react-codemirror";
9
+ import { json as ke } from "@codemirror/lang-json";
10
+ import { markdown as en } from "@codemirror/lang-markdown";
11
+ import { sql as tn } from "@codemirror/lang-sql";
12
+ import { yaml as nn } from "@codemirror/lang-yaml";
13
+ import { Icon as Ee } from "@foris/avocado-icons";
14
+ const v = at(() => ({})), de = (e, t, s, r) => {
15
+ const l = s == null ? void 0 : s.hash, i = r && Object.keys(r).length > 0 ? { ...r } : {};
16
+ v.setState((o) => {
17
17
  var n;
18
18
  return {
19
- ...l,
19
+ ...o,
20
20
  [e]: {
21
- ...l[e],
21
+ ...o[e],
22
22
  apiConfig: t,
23
- currentPageId: c,
23
+ currentPageId: l,
24
24
  isLoading: !1,
25
25
  isModalOpen: !0,
26
26
  isDrawerOpen: !1,
27
27
  entries: i,
28
28
  overlay: null,
29
29
  pages: {
30
- ...(n = l[e]) == null ? void 0 : n.pages,
31
- [c]: {
30
+ ...(n = o[e]) == null ? void 0 : n.pages,
31
+ [l]: {
32
32
  page: s
33
33
  }
34
34
  }
35
35
  }
36
36
  };
37
37
  });
38
- }, Pe = (e, t, s) => {
39
- const a = s && Object.keys(s).length > 0 ? { ...e, ...s } : e;
38
+ }, We = (e, t, s) => {
39
+ const r = s && Object.keys(s).length > 0 ? { ...e, ...s } : e;
40
40
  return t.length === 0 ? e : Object.fromEntries(
41
- Object.entries(a).filter(
42
- ([c]) => !t.includes(c)
41
+ Object.entries(r).filter(
42
+ ([l]) => !t.includes(l)
43
43
  )
44
44
  );
45
- }, rn = (e, t, s, a, c) => {
46
- sessionStorage.setItem("sessionId", s), N.setState((i) => {
47
- const l = i[e] ?? {}, n = l.entries ?? {}, d = Pe(
45
+ }, sn = (e, t, s, r, l) => {
46
+ sessionStorage.setItem("sessionId", s), v.setState((i) => {
47
+ const o = i[e] ?? {}, n = o.entries ?? {}, d = We(
48
48
  n,
49
- a,
50
- c
49
+ r,
50
+ l
51
51
  );
52
52
  return {
53
53
  ...i,
54
54
  [e]: {
55
- ...l,
55
+ ...o,
56
56
  currentPageId: t.hash,
57
57
  entries: d,
58
58
  isLoading: !1,
59
59
  overlay: null,
60
60
  pages: {
61
- ...l.pages,
61
+ ...o.pages,
62
62
  [t.hash]: {
63
63
  page: { ...t }
64
64
  }
@@ -66,18 +66,18 @@ const N = ct(() => ({})), he = (e, t, s, a) => {
66
66
  }
67
67
  };
68
68
  });
69
- }, on = (e, t, s, a) => {
70
- N.setState((c) => {
71
- var r;
72
- const i = c[e] ?? {}, l = i.entries ?? {}, n = Pe(
73
- l,
69
+ }, an = (e, t, s, r) => {
70
+ v.setState((l) => {
71
+ var a;
72
+ const i = l[e] ?? {}, o = i.entries ?? {}, n = We(
73
+ o,
74
74
  s,
75
- a
76
- ), d = (r = t.components) == null ? void 0 : r.some(
77
- (_) => _.component === "drawer"
75
+ r
76
+ ), d = (a = t.components) == null ? void 0 : a.some(
77
+ (u) => u.component === "drawer"
78
78
  );
79
79
  return {
80
- ...c,
80
+ ...l,
81
81
  [e]: {
82
82
  ...i,
83
83
  entries: n,
@@ -88,78 +88,78 @@ const N = ct(() => ({})), he = (e, t, s, a) => {
88
88
  }
89
89
  };
90
90
  });
91
- }, Ce = (e) => {
92
- N.setState((t) => ({
91
+ }, je = (e) => {
92
+ v.setState((t) => ({
93
93
  ...t,
94
94
  [e]: {
95
95
  ...t[e],
96
96
  overlay: null
97
97
  }
98
98
  }));
99
- }, cn = (e) => {
99
+ }, rn = (e) => {
100
100
  var s;
101
- return ((s = N.getState()[e]) == null ? void 0 : s.overlay) ?? null;
101
+ return ((s = v.getState()[e]) == null ? void 0 : s.overlay) ?? null;
102
102
  }, $ = (e, t) => {
103
103
  const {
104
104
  content: s,
105
- sessionId: a,
106
- deprecatedStateKeys: c = [],
105
+ sessionId: r,
106
+ deprecatedStateKeys: l = [],
107
107
  sessionState: i
108
108
  } = t;
109
- s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? rn(
109
+ s.type !== "page" && s.type !== "overlay" || (s.type === "page" ? sn(
110
110
  e,
111
111
  s,
112
- a,
113
- c,
112
+ r,
113
+ l,
114
114
  i
115
- ) : on(
115
+ ) : an(
116
116
  e,
117
117
  s,
118
- c,
118
+ l,
119
119
  i
120
120
  ));
121
- }, D = (e, t) => {
122
- N.setState((s) => {
123
- var a;
121
+ }, q = (e, t) => {
122
+ v.setState((s) => {
123
+ var r;
124
124
  return {
125
125
  ...s,
126
126
  [e]: {
127
127
  ...s[e],
128
128
  entries: {
129
- ...(a = s[e]) == null ? void 0 : a.entries,
129
+ ...(r = s[e]) == null ? void 0 : r.entries,
130
130
  ...t
131
131
  // New entries
132
132
  }
133
133
  }
134
134
  };
135
135
  });
136
- }, ln = (e, t) => {
137
- N.setState((s) => {
138
- const a = s[e];
139
- if (!a)
136
+ }, on = (e, t) => {
137
+ v.setState((s) => {
138
+ const r = s[e];
139
+ if (!r)
140
140
  return s;
141
- const c = a.entries ?? {};
142
- if (!(t in c))
141
+ const l = r.entries ?? {};
142
+ if (!(t in l))
143
143
  return s;
144
- const { [t]: i, ...l } = c;
144
+ const { [t]: i, ...o } = l;
145
145
  return {
146
146
  ...s,
147
147
  [e]: {
148
- ...a,
149
- entries: l
148
+ ...r,
149
+ entries: o
150
150
  }
151
151
  };
152
152
  });
153
- }, Y = (e, t) => {
154
- N.setState((s) => ({
153
+ }, Q = (e, t) => {
154
+ v.setState((s) => ({
155
155
  ...s,
156
156
  [e]: {
157
157
  ...s[e],
158
158
  isLoading: t
159
159
  }
160
160
  }));
161
- }, le = (e, t) => {
162
- N.setState((s) => ({
161
+ }, ce = (e, t) => {
162
+ v.setState((s) => ({
163
163
  ...s,
164
164
  [e]: {
165
165
  ...s[e],
@@ -167,67 +167,67 @@ const N = ct(() => ({})), he = (e, t, s, a) => {
167
167
  }
168
168
  }));
169
169
  }, W = (e, t) => {
170
- N.setState((s) => ({
170
+ v.setState((s) => ({
171
171
  ...s,
172
172
  [e]: {
173
173
  ...s[e],
174
174
  isDrawerOpen: t
175
175
  }
176
176
  }));
177
- }, De = (e, t) => {
178
- N.setState((s) => {
179
- const a = s[e];
180
- return a ? {
177
+ }, Te = (e, t) => {
178
+ v.setState((s) => {
179
+ const r = s[e];
180
+ return r ? {
181
181
  ...s,
182
182
  [e]: {
183
- ...a,
183
+ ...r,
184
184
  apiConfig: {
185
- ...a.apiConfig,
185
+ ...r.apiConfig,
186
186
  headers: t
187
187
  }
188
188
  }
189
189
  } : s;
190
190
  });
191
191
  };
192
- let fe = !1, ce = [], qe = !1;
193
- const dn = (e) => e._userFlow || null, Re = (e) => {
194
- ce.forEach(({ resolve: t, reject: s }) => {
192
+ let _e = !1, re = [], Oe = !1;
193
+ const cn = (e) => e._userFlow || null, Ae = (e) => {
194
+ re.forEach(({ resolve: t, reject: s }) => {
195
195
  e ? s(e) : t(void 0);
196
- }), ce = [];
197
- }, _n = async (e) => {
198
- var a, c;
196
+ }), re = [];
197
+ }, ln = async (e) => {
198
+ var r, l;
199
199
  const t = e == null ? void 0 : e.config;
200
- if (((a = e == null ? void 0 : e.response) == null ? void 0 : a.status) === 401 && !t._retry) {
201
- const i = dn(t);
200
+ if (((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) === 401 && !t._retry) {
201
+ const i = cn(t);
202
202
  if (i) {
203
- const n = (c = N.getState()[i]) == null ? void 0 : c.apiConfig;
203
+ const n = (l = v.getState()[i]) == null ? void 0 : l.apiConfig;
204
204
  if (!n)
205
205
  return Promise.reject(e);
206
206
  if (n.onAuthenticationError || typeof n.headers == "function") {
207
- if (fe)
208
- return new Promise((r, _) => {
209
- ce.push({ resolve: r, reject: _ });
210
- }).then(() => X(t)).catch((r) => (console.error("[axiosInterceptors] Queued request failed:", r), Promise.reject(r)));
211
- t._retry = !0, fe = !0;
207
+ if (_e)
208
+ return new Promise((a, u) => {
209
+ re.push({ resolve: a, reject: u });
210
+ }).then(() => J(t)).catch((a) => (console.error("[axiosInterceptors] Queued request failed:", a), Promise.reject(a)));
211
+ t._retry = !0, _e = !0;
212
212
  try {
213
- let r;
213
+ let a;
214
214
  if (n.onAuthenticationError)
215
- r = await n.onAuthenticationError();
215
+ a = await n.onAuthenticationError();
216
216
  else if (typeof n.headers == "function")
217
- r = n.headers();
217
+ a = n.headers();
218
218
  else
219
219
  throw new Error("No refresh handler available");
220
- return n.onAuthenticationError && (typeof n.headers == "string" ? De(i, JSON.stringify(r)) : De(i, r)), t.headers || (t.headers = {}), Object.assign(t.headers, r), Re(null), X(t);
221
- } catch (r) {
220
+ return n.onAuthenticationError && (typeof n.headers == "string" ? Te(i, JSON.stringify(a)) : Te(i, a)), t.headers || (t.headers = {}), Object.assign(t.headers, a), Ae(null), J(t);
221
+ } catch (a) {
222
222
  return console.error(
223
223
  "[axiosInterceptors] Token refresh failed:",
224
- r
224
+ a
225
225
  ), console.error(
226
226
  "[axiosInterceptors] Rejecting queued requests:",
227
- ce.length
228
- ), Re(r), Promise.reject(r);
227
+ re.length
228
+ ), Ae(a), Promise.reject(a);
229
229
  } finally {
230
- fe = !1;
230
+ _e = !1;
231
231
  }
232
232
  } else
233
233
  console.warn(
@@ -240,20 +240,20 @@ const dn = (e) => e._userFlow || null, Re = (e) => {
240
240
  );
241
241
  }
242
242
  return Promise.reject(e);
243
- }, un = () => {
244
- if (qe) {
243
+ }, dn = () => {
244
+ if (Oe) {
245
245
  console.debug(
246
246
  "[axiosInterceptors] Interceptors already initialized, skipping"
247
247
  );
248
248
  return;
249
249
  }
250
- console.debug("[axiosInterceptors] Initializing interceptors..."), X.interceptors.response.use(void 0, _n), console.debug("[axiosInterceptors] Response error interceptor registered"), qe = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
250
+ console.debug("[axiosInterceptors] Initializing interceptors..."), J.interceptors.response.use(void 0, ln), console.debug("[axiosInterceptors] Response error interceptor registered"), Oe = !0, console.debug("[axiosInterceptors] Interceptors initialized successfully");
251
251
  };
252
- un();
253
- function hn(e) {
252
+ dn();
253
+ function _n(e) {
254
254
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
255
255
  }
256
- var ye = { exports: {} }, se = {};
256
+ var ue = { exports: {} }, te = {};
257
257
  /**
258
258
  * @license React
259
259
  * react-jsx-runtime.production.min.js
@@ -263,130 +263,130 @@ var ye = { exports: {} }, se = {};
263
263
  * This source code is licensed under the MIT license found in the
264
264
  * LICENSE file in the root directory of this source tree.
265
265
  */
266
- var Le;
267
- function fn() {
268
- if (Le) return se;
269
- Le = 1;
270
- var e = it, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, c = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
271
- function l(n, d, r) {
272
- var _, h = {}, f = null, u = null;
273
- r !== void 0 && (f = "" + r), d.key !== void 0 && (f = "" + d.key), d.ref !== void 0 && (u = d.ref);
274
- for (_ in d) a.call(d, _) && !i.hasOwnProperty(_) && (h[_] = d[_]);
275
- if (n && n.defaultProps) for (_ in d = n.defaultProps, d) h[_] === void 0 && (h[_] = d[_]);
276
- return { $$typeof: t, type: n, key: f, ref: u, props: h, _owner: c.current };
266
+ var $e;
267
+ function un() {
268
+ if ($e) return te;
269
+ $e = 1;
270
+ var e = rt, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, l = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
271
+ function o(n, d, a) {
272
+ var u, h = {}, _ = null, f = null;
273
+ a !== void 0 && (_ = "" + a), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (f = d.ref);
274
+ for (u in d) r.call(d, u) && !i.hasOwnProperty(u) && (h[u] = d[u]);
275
+ if (n && n.defaultProps) for (u in d = n.defaultProps, d) h[u] === void 0 && (h[u] = d[u]);
276
+ return { $$typeof: t, type: n, key: _, ref: f, props: h, _owner: l.current };
277
277
  }
278
- return se.Fragment = s, se.jsx = l, se.jsxs = l, se;
278
+ return te.Fragment = s, te.jsx = o, te.jsxs = o, te;
279
279
  }
280
- var Ie;
281
- function yn() {
282
- return Ie || (Ie = 1, ye.exports = fn()), ye.exports;
280
+ var qe;
281
+ function hn() {
282
+ return qe || (qe = 1, ue.exports = un()), ue.exports;
283
283
  }
284
- var o = yn();
285
- const xn = (e) => {
284
+ var c = hn();
285
+ const fn = (e) => {
286
286
  if (!(e != null && e.content)) return null;
287
287
  const t = {
288
288
  ...e,
289
289
  children: e.content,
290
290
  type: e.variant
291
291
  };
292
- return /* @__PURE__ */ o.jsx(We, { ...t });
293
- }, mn = (e) => {
292
+ return /* @__PURE__ */ c.jsx(ze, { ...t });
293
+ }, yn = (e) => {
294
294
  if (!e) return null;
295
295
  const t = {
296
296
  ...e,
297
297
  children: e.content
298
298
  };
299
- return /* @__PURE__ */ o.jsx(dt, { ...t });
300
- }, E = (e, t, s, a) => {
301
- var l;
302
- const c = {
303
- accordion: (n) => /* @__PURE__ */ o.jsx(vn, { ...n, userFlow: e, pageId: t }),
304
- aiChatPanel: (n) => /* @__PURE__ */ o.jsx(
305
- Sn,
299
+ return /* @__PURE__ */ c.jsx(ct, { ...t });
300
+ }, O = (e, t, s, r) => {
301
+ var o;
302
+ const l = {
303
+ accordion: (n) => /* @__PURE__ */ c.jsx(Cn, { ...n, userFlow: e, pageId: t }),
304
+ aiChatPanel: (n) => /* @__PURE__ */ c.jsx(
305
+ Nn,
306
306
  {
307
307
  ...n,
308
308
  userFlow: e,
309
309
  pageId: t,
310
- onResolveProps: a == null ? void 0 : a.aiChatPanel
310
+ onResolveProps: r == null ? void 0 : r.aiChatPanel
311
311
  }
312
312
  ),
313
- aiSummaryCard: (n) => /* @__PURE__ */ o.jsx(
314
- $n,
313
+ aiSummaryCard: (n) => /* @__PURE__ */ c.jsx(
314
+ On,
315
315
  {
316
316
  ...n,
317
317
  userFlow: e,
318
318
  pageId: t,
319
- onResolveProps: a == null ? void 0 : a.aiSummaryCard
319
+ onResolveProps: r == null ? void 0 : r.aiSummaryCard
320
320
  }
321
321
  ),
322
- aiPromptCodeEditor: (n) => /* @__PURE__ */ o.jsx(Tn, { ...n, userFlow: e, pageId: t }),
323
- box: (n) => /* @__PURE__ */ o.jsx(Bn, { ...n, userFlow: e, pageId: t }),
324
- breadcrumbs: (n) => /* @__PURE__ */ o.jsx(Yn, { ...n, userFlow: e, pageId: t }),
325
- tooltip: (n) => /* @__PURE__ */ o.jsx(La, { ...n, userFlow: e, pageId: t }),
326
- textarea: (n) => /* @__PURE__ */ o.jsx(Ta, { ...n, userFlow: e, pageId: t }),
327
- card: (n) => /* @__PURE__ */ o.jsx(ns, { ...n, userFlow: e, pageId: t }),
328
- dropdownButton: (n) => /* @__PURE__ */ o.jsx(Ls, { ...n, userFlow: e, pageId: t }),
329
- menu: (n) => /* @__PURE__ */ o.jsx(Ms, { ...n, userFlow: e, pageId: t }),
330
- radioGroup: (n) => /* @__PURE__ */ o.jsx(Jn, { ...n, userFlow: e, pageId: t }),
331
- stepper: (n) => /* @__PURE__ */ o.jsx(Wn, { ...n, userFlow: e, pageId: t }),
332
- progressBar: (n) => /* @__PURE__ */ o.jsx(Qn, { ...n, userFlow: e, pageId: t }),
333
- button: (n) => /* @__PURE__ */ o.jsx(Zn, { ...n, userFlow: e, pageId: t }),
334
- cardAccordion: (n) => /* @__PURE__ */ o.jsx(Fn, { ...n, userFlow: e, pageId: t }),
335
- cardNotification: (n) => /* @__PURE__ */ o.jsx(ss, { ...n }),
336
- chart: (n) => /* @__PURE__ */ o.jsx(gs, { ...n, userFlow: e }),
337
- dataCard: (n) => /* @__PURE__ */ o.jsx(Es, { ...n, userFlow: e, pageId: t }),
338
- checkbox: (n) => /* @__PURE__ */ o.jsx(bs, { ...n, userFlow: e, pageId: t }),
339
- code: (n) => /* @__PURE__ */ o.jsx(Ss, { ...n, userFlow: e, pageId: t }),
340
- divider: (n) => /* @__PURE__ */ o.jsx(As, { ...n }),
341
- drawer: (n) => /* @__PURE__ */ o.jsx(Rs, { ...n, userFlow: e, pageId: t }),
342
- heading: (n) => xn(n),
343
- link: (n) => /* @__PURE__ */ o.jsx(Ks, { ...n, userFlow: e, pageId: t }),
344
- pill: (n) => /* @__PURE__ */ o.jsx(Js, { ...n }),
345
- previewerMarkdown: (n) => /* @__PURE__ */ o.jsx(Ws, { ...n }),
346
- modal: (n) => /* @__PURE__ */ o.jsx(zs, { ...n, userFlow: e, pageId: t }),
347
- roundButton: (n) => /* @__PURE__ */ o.jsx(Qs, { ...n, userFlow: e, pageId: t }),
348
- row: (n) => /* @__PURE__ */ o.jsx(Ps, { ...n, userFlow: e, pageId: t }),
349
- select: (n) => /* @__PURE__ */ o.jsx(oa, { ...n, userFlow: e, pageId: t }),
350
- switch: (n) => /* @__PURE__ */ o.jsx(ma, { ...n, userFlow: e, pageId: t }),
351
- spacing: (n) => /* @__PURE__ */ o.jsx(xa, { ...n, userFlow: e, pageId: t }),
352
- table: (n) => /* @__PURE__ */ o.jsx(Na, { ...n, userFlow: e, pageId: t }),
353
- tabs: (n) => /* @__PURE__ */ o.jsx(Ea, { ...n, userFlow: e, pageId: t }),
354
- text: (n) => mn(n),
355
- textField: (n) => /* @__PURE__ */ o.jsx($a, { ...n, userFlow: e, pageId: t }),
356
- toast: (n) => /* @__PURE__ */ o.jsx(Da, { ...n, userFlow: e, pageId: t })
322
+ aiPromptCodeEditor: (n) => /* @__PURE__ */ c.jsx(kn, { ...n, userFlow: e, pageId: t }),
323
+ box: (n) => /* @__PURE__ */ c.jsx(Ln, { ...n, userFlow: e, pageId: t }),
324
+ breadcrumbs: (n) => /* @__PURE__ */ c.jsx(Wn, { ...n, userFlow: e, pageId: t }),
325
+ tooltip: (n) => /* @__PURE__ */ c.jsx(qa, { ...n, userFlow: e, pageId: t }),
326
+ textarea: (n) => /* @__PURE__ */ c.jsx(Sa, { ...n, userFlow: e, pageId: t }),
327
+ card: (n) => /* @__PURE__ */ c.jsx(es, { ...n, userFlow: e, pageId: t }),
328
+ dropdownButton: (n) => /* @__PURE__ */ c.jsx(Ds, { ...n, userFlow: e, pageId: t }),
329
+ menu: (n) => /* @__PURE__ */ c.jsx(Ks, { ...n, userFlow: e, pageId: t }),
330
+ radioGroup: (n) => /* @__PURE__ */ c.jsx(Hn, { ...n, userFlow: e, pageId: t }),
331
+ stepper: (n) => /* @__PURE__ */ c.jsx(Xn, { ...n, userFlow: e, pageId: t }),
332
+ progressBar: (n) => /* @__PURE__ */ c.jsx(Jn, { ...n, userFlow: e, pageId: t }),
333
+ button: (n) => /* @__PURE__ */ c.jsx(Qn, { ...n, userFlow: e, pageId: t }),
334
+ cardAccordion: (n) => /* @__PURE__ */ c.jsx(Zn, { ...n, userFlow: e, pageId: t }),
335
+ cardNotification: (n) => /* @__PURE__ */ c.jsx(ts, { ...n }),
336
+ chart: (n) => /* @__PURE__ */ c.jsx(ms, { ...n, userFlow: e }),
337
+ dataCard: (n) => /* @__PURE__ */ c.jsx(Ss, { ...n, userFlow: e, pageId: t }),
338
+ checkbox: (n) => /* @__PURE__ */ c.jsx(xs, { ...n, userFlow: e, pageId: t }),
339
+ code: (n) => /* @__PURE__ */ c.jsx(Ns, { ...n, userFlow: e, pageId: t }),
340
+ divider: (n) => /* @__PURE__ */ c.jsx(Ts, { ...n }),
341
+ drawer: (n) => /* @__PURE__ */ c.jsx(qs, { ...n, userFlow: e, pageId: t }),
342
+ heading: (n) => fn(n),
343
+ link: (n) => /* @__PURE__ */ c.jsx(Bs, { ...n, userFlow: e, pageId: t }),
344
+ pill: (n) => /* @__PURE__ */ c.jsx(Hs, { ...n }),
345
+ previewerMarkdown: (n) => /* @__PURE__ */ c.jsx(Xs, { ...n }),
346
+ modal: (n) => /* @__PURE__ */ c.jsx(Us, { ...n, userFlow: e, pageId: t }),
347
+ roundButton: (n) => /* @__PURE__ */ c.jsx(Js, { ...n, userFlow: e, pageId: t }),
348
+ row: (n) => /* @__PURE__ */ c.jsx(Ys, { ...n, userFlow: e, pageId: t }),
349
+ select: (n) => /* @__PURE__ */ c.jsx(aa, { ...n, userFlow: e, pageId: t }),
350
+ switch: (n) => /* @__PURE__ */ c.jsx(ya, { ...n, userFlow: e, pageId: t }),
351
+ spacing: (n) => /* @__PURE__ */ c.jsx(fa, { ...n, userFlow: e, pageId: t }),
352
+ table: (n) => /* @__PURE__ */ c.jsx(ja, { ...n, userFlow: e, pageId: t }),
353
+ tabs: (n) => /* @__PURE__ */ c.jsx(va, { ...n, userFlow: e, pageId: t }),
354
+ text: (n) => yn(n),
355
+ textField: (n) => /* @__PURE__ */ c.jsx(Ta, { ...n, userFlow: e, pageId: t }),
356
+ toast: (n) => /* @__PURE__ */ c.jsx(Oa, { ...n, userFlow: e, pageId: t })
357
357
  };
358
- return (l = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : l.map((n) => {
359
- const d = c[n.component];
358
+ return (o = s == null ? void 0 : s.filter(Boolean)) == null ? void 0 : o.map((n) => {
359
+ const d = l[n.component];
360
360
  return d ? d({ ...n, userFlow: e, pageId: t }) : null;
361
361
  });
362
362
  };
363
- function gn(e) {
363
+ function mn(e) {
364
364
  return !!(e == null || typeof e == "string" && e.trim() === "" || Array.isArray(e) && e.length === 0);
365
365
  }
366
- function Fe(e, t) {
366
+ function Qe(e, t) {
367
367
  if (!(t != null && t.length))
368
368
  return !1;
369
369
  for (const s of t)
370
370
  if (s.when === "empty") {
371
- const a = e == null ? void 0 : e[s.key];
372
- if (gn(a))
371
+ const r = e == null ? void 0 : e[s.key];
372
+ if (mn(r))
373
373
  return !0;
374
374
  }
375
375
  return !1;
376
376
  }
377
377
  function I(e, t) {
378
- const s = N((a) => {
379
- var c;
380
- return (c = a[e]) == null ? void 0 : c.entries;
378
+ const s = v((r) => {
379
+ var l;
380
+ return (l = r[e]) == null ? void 0 : l.entries;
381
381
  });
382
- return O(
382
+ return A(
383
383
  () => ({
384
- disabled: Fe(s, t)
384
+ disabled: Qe(s, t)
385
385
  }),
386
386
  [t, s]
387
387
  );
388
388
  }
389
- const ee = (e) => {
389
+ const P = (e) => {
390
390
  if (!e)
391
391
  return { "content-type": "application/json" };
392
392
  if (typeof e == "function")
@@ -398,153 +398,153 @@ const ee = (e) => {
398
398
  return { "content-type": "application/json", Authorization: e };
399
399
  }
400
400
  return e;
401
- }, re = () => new AbortController(), bn = (e, t = {}, s = {}, a = !1, c) => {
402
- const i = re();
403
- a && i.abort();
404
- const l = ee(t);
401
+ }, se = () => new AbortController(), xn = (e, t = {}, s = {}, r = !1, l) => {
402
+ const i = se();
403
+ r && i.abort();
404
+ const o = P(t);
405
405
  return {
406
- call: X.get(e, {
406
+ call: J.get(e, {
407
407
  headers: {
408
- ...l
408
+ ...o
409
409
  },
410
410
  params: s,
411
411
  signal: i.signal,
412
- _userFlow: c
412
+ _userFlow: l
413
413
  }),
414
414
  controller: i
415
415
  };
416
- }, pe = (e, t = {}, s = {}, a = {}, c = !1, i) => {
417
- const l = re();
418
- c && l.abort();
419
- const n = ee(t);
416
+ }, xe = (e, t = {}, s = {}, r = {}, l = !1, i) => {
417
+ const o = se();
418
+ l && o.abort();
419
+ const n = P(t);
420
420
  return {
421
- call: X.post(e, s, {
421
+ call: J.post(e, s, {
422
422
  headers: {
423
423
  ...n
424
424
  },
425
- params: a,
426
- signal: l.signal,
425
+ params: r,
426
+ signal: o.signal,
427
427
  _userFlow: i
428
428
  }),
429
- controller: l
429
+ controller: o
430
430
  };
431
- }, pn = (e, t = {}, s = {}, a = {}, c = !1, i) => {
432
- const l = re();
433
- c && l.abort();
434
- const n = ee(t);
431
+ }, gn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
432
+ const o = se();
433
+ l && o.abort();
434
+ const n = P(t);
435
435
  return {
436
- call: X.put(e, s, {
436
+ call: J.put(e, s, {
437
437
  headers: {
438
438
  ...n
439
439
  },
440
- params: a,
441
- signal: l.signal,
440
+ params: r,
441
+ signal: o.signal,
442
442
  _userFlow: i
443
443
  }),
444
- controller: l
444
+ controller: o
445
445
  };
446
- }, jn = (e, t = {}, s = {}, a = {}, c = !1, i) => {
447
- const l = re();
448
- c && l.abort();
449
- const n = ee(t);
446
+ }, pn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
447
+ const o = se();
448
+ l && o.abort();
449
+ const n = P(t);
450
450
  return {
451
- call: X.patch(e, s, {
451
+ call: J.patch(e, s, {
452
452
  headers: {
453
453
  ...n
454
454
  },
455
- params: a,
456
- signal: l.signal,
455
+ params: r,
456
+ signal: o.signal,
457
457
  _userFlow: i
458
458
  }),
459
- controller: l
459
+ controller: o
460
460
  };
461
- }, wn = (e, t = {}, s = {}, a = {}, c = !1, i) => {
462
- const l = re();
463
- c && l.abort();
464
- const n = ee(t);
461
+ }, bn = (e, t = {}, s = {}, r = {}, l = !1, i) => {
462
+ const o = se();
463
+ l && o.abort();
464
+ const n = P(t);
465
465
  return {
466
- call: X.delete(e, {
466
+ call: J.delete(e, {
467
467
  headers: {
468
468
  ...n
469
469
  },
470
470
  data: s,
471
- params: a,
472
- signal: l.signal,
471
+ params: r,
472
+ signal: o.signal,
473
473
  _userFlow: i
474
474
  }),
475
- controller: l
475
+ controller: o
476
476
  };
477
- }, et = () => {
477
+ }, Ye = () => {
478
478
  let e;
479
- return { callEndpoint: async (a) => {
480
- a.controller && (e = a.controller);
481
- let c = {};
479
+ return { callEndpoint: async (r) => {
480
+ r.controller && (e = r.controller);
481
+ let l = {};
482
482
  try {
483
- c = await a.call;
483
+ l = await r.call;
484
484
  } catch (i) {
485
485
  throw i;
486
486
  }
487
- return c;
487
+ return l;
488
488
  }, cancelEndpoint: () => {
489
489
  e && e.abort();
490
490
  } };
491
- }, tt = async (e, t, s = "", a = {}, c = {}) => {
491
+ }, Ze = async (e, t, s = "", r = {}, l = {}) => {
492
492
  try {
493
- const { callEndpoint: i } = et(), { api: l, headers: n } = e, d = sessionStorage.getItem("sessionId"), r = new URLSearchParams({ session_name: t });
494
- s && r.append("hash_code", s), d && r.append("sessionId", d);
495
- const _ = `${l}/not-front/next-ui/?${r.toString()}`, h = ee(n), f = pe(
496
- _,
493
+ const { callEndpoint: i } = Ye(), { api: o, headers: n } = e, d = sessionStorage.getItem("sessionId"), a = new URLSearchParams({ session_name: t });
494
+ s && a.append("hash_code", s), d && a.append("sessionId", d);
495
+ const u = `${o}/not-front/next-ui/?${a.toString()}`, h = P(n), _ = xe(
496
+ u,
497
497
  h,
498
- a,
499
- c,
498
+ r,
499
+ l,
500
500
  !1,
501
501
  t
502
502
  );
503
- return await i(f);
503
+ return await i(_);
504
504
  } catch (i) {
505
505
  return console.error(i), Promise.reject(i);
506
506
  }
507
- }, G = () => {
508
- const e = N((n) => n), { callEndpoint: t } = et(), s = async (n, d, r, _, h = !0) => {
509
- var f;
507
+ }, K = () => {
508
+ const e = v((n) => n), { callEndpoint: t } = Ye(), s = async (n, d, a, u, h = !0) => {
509
+ var _;
510
510
  try {
511
- const u = (f = e[n]) == null ? void 0 : f.apiConfig, g = {
512
- state: { ...r },
513
- triggerKey: _
511
+ const f = (_ = e[n]) == null ? void 0 : _.apiConfig, g = {
512
+ state: { ...a },
513
+ triggerKey: u
514
514
  };
515
- return h && Y(n, !0), await tt(
516
- u,
515
+ return h && Q(n, !0), await Ze(
516
+ f,
517
517
  n,
518
518
  d,
519
519
  g
520
520
  );
521
- } catch (u) {
522
- throw h && Y(n, !1), console.error("[getNextUI] Error fetching next UI:", u), u;
521
+ } catch (f) {
522
+ throw h && Q(n, !1), console.error("[getNextUI] Error fetching next UI:", f), f;
523
523
  }
524
- }, a = (n, d) => {
525
- const { method: r, url: _, headers: h, data: f, params: u } = n;
526
- switch (r) {
524
+ }, r = (n, d) => {
525
+ const { method: a, url: u, headers: h, data: _, params: f } = n;
526
+ switch (a) {
527
527
  case "post":
528
- return pe(_, h, f, {}, !1, d);
528
+ return xe(u, h, _, {}, !1, d);
529
529
  case "put":
530
- return pn(_, h, f, {}, !1, d);
530
+ return gn(u, h, _, {}, !1, d);
531
531
  case "patch":
532
- return jn(_, h, f, {}, !1, d);
532
+ return pn(u, h, _, {}, !1, d);
533
533
  case "delete":
534
- return wn(_, h, f, u, !1, d);
534
+ return bn(u, h, _, f, !1, d);
535
535
  case "get":
536
536
  default:
537
- return bn(_, h, u, !1, d);
537
+ return xn(u, h, f, !1, d);
538
538
  }
539
- }, c = (n, d) => {
540
- const { url: r, headers: _ } = n, h = {
539
+ }, l = (n, d) => {
540
+ const { url: a, headers: u } = n, h = {
541
541
  query: n == null ? void 0 : n.query,
542
542
  variables: (n == null ? void 0 : n.variables) || {}
543
543
  };
544
- return pe(
545
- r,
544
+ return xe(
545
+ a,
546
546
  {
547
- ..._,
547
+ ...u,
548
548
  "Content-Type": "application/json"
549
549
  },
550
550
  h,
@@ -552,341 +552,341 @@ const ee = (e) => {
552
552
  !1,
553
553
  d
554
554
  );
555
- }, i = async (n, d, r = !0) => {
556
- var _, h;
555
+ }, i = async (n, d, a = !0) => {
556
+ var u, h;
557
557
  if (!n) {
558
558
  console.warn("[fetchDataSource] Invalid or missing dataSource");
559
559
  return;
560
560
  }
561
- r && Y(d, !0);
561
+ a && Q(d, !0);
562
562
  try {
563
- let f;
563
+ let _;
564
564
  switch (n == null ? void 0 : n.type) {
565
565
  case "rest":
566
- f = a(n, d);
566
+ _ = r(n, d);
567
567
  break;
568
568
  case "graphql":
569
- f = c(n, d);
569
+ _ = l(n, d);
570
570
  break;
571
571
  default:
572
572
  throw new Error("[fetchDataSource] Unsupported data source type");
573
573
  }
574
- return await t(f);
575
- } catch (f) {
576
- const u = f;
577
- return console.error("[fetchDataSource] Error:", u), {
578
- status: ((_ = u == null ? void 0 : u.response) == null ? void 0 : _.status) ?? 0,
579
- data: ((h = u == null ? void 0 : u.response) == null ? void 0 : h.data) ?? {
580
- message: u == null ? void 0 : u.message,
581
- code: u == null ? void 0 : u.code,
582
- config: u == null ? void 0 : u.config
574
+ return await t(_);
575
+ } catch (_) {
576
+ const f = _;
577
+ return console.error("[fetchDataSource] Error:", f), {
578
+ status: ((u = f == null ? void 0 : f.response) == null ? void 0 : u.status) ?? 0,
579
+ data: ((h = f == null ? void 0 : f.response) == null ? void 0 : h.data) ?? {
580
+ message: f == null ? void 0 : f.message,
581
+ code: f == null ? void 0 : f.code,
582
+ config: f == null ? void 0 : f.config
583
583
  }
584
584
  };
585
585
  } finally {
586
- r && Y(d, !1);
586
+ a && Q(d, !1);
587
587
  }
588
588
  };
589
589
  return {
590
590
  getNextUI: s,
591
591
  fetchDataSource: i,
592
- fetchAndGetNextUI: async (n, d, r, _, h) => {
592
+ fetchAndGetNextUI: async (n, d, a, u, h) => {
593
593
  try {
594
- Y(n, !0);
595
- const f = await i(h, n, !1);
596
- return f && await s(
594
+ Q(n, !0);
595
+ const _ = await i(h, n, !1);
596
+ return _ && await s(
597
597
  n,
598
598
  d,
599
- r,
600
- _
599
+ a,
600
+ u
601
601
  );
602
- } catch (f) {
603
- throw Y(n, !1), console.error(
602
+ } catch (_) {
603
+ throw Q(n, !1), console.error(
604
604
  "[fetchAndGetNextUI] Error fetching and navigating:",
605
- f
606
- ), f;
605
+ _
606
+ ), _;
607
607
  }
608
608
  }
609
609
  };
610
- }, Cn = "_accordion_1ri2t_1", Nn = "_accordionBody_1ri2t_8", Be = {
611
- accordion: Cn,
612
- accordionBody: Nn
613
- }, vn = (e) => {
610
+ }, jn = "_accordion_1ri2t_1", wn = "_accordionBody_1ri2t_8", De = {
611
+ accordion: jn,
612
+ accordionBody: wn
613
+ }, Cn = (e) => {
614
614
  const {
615
615
  userFlow: t,
616
616
  pageId: s,
617
- responseKey: a,
618
- dependencies: c,
617
+ responseKey: r,
618
+ dependencies: l,
619
619
  customContent: i,
620
- actionContent: l,
620
+ actionContent: o,
621
621
  components: n,
622
622
  ...d
623
- } = e, { getNextUI: r } = G(), [_, h] = L(
623
+ } = e, { getNextUI: a } = K(), [u, h] = L(
624
624
  d.checkboxChecked || !1
625
- ), { disabled: f } = I(
625
+ ), { disabled: _ } = I(
626
626
  t,
627
- c
628
- ), u = E(t, s, n), g = l ? E(t, s, l) : void 0, m = i ? E(t, s, i) : void 0, y = q(
629
- async (p) => {
630
- var w;
627
+ l
628
+ ), f = O(t, s, n), g = o ? O(t, s, o) : void 0, x = i ? O(t, s, i) : void 0, m = R(
629
+ async (b) => {
630
+ var C;
631
631
  try {
632
- const j = p.target.checked;
632
+ const j = b.target.checked;
633
633
  h(j);
634
- const C = {
635
- ...(w = N.getState()[t]) == null ? void 0 : w.entries,
636
- [a]: j
634
+ const N = {
635
+ ...(C = v.getState()[t]) == null ? void 0 : C.entries,
636
+ [r]: j
637
637
  };
638
- if (D(t, C), d.actionType === "GO_TO_NEXT_UI") {
639
- const v = await r(
638
+ if (q(t, N), d.actionType === "GO_TO_NEXT_UI") {
639
+ const w = await a(
640
640
  t,
641
641
  s,
642
- C,
643
- a
642
+ N,
643
+ r
644
644
  );
645
- v != null && v.data && $(t, v == null ? void 0 : v.data);
645
+ w != null && w.data && $(t, w == null ? void 0 : w.data);
646
646
  }
647
647
  } catch (j) {
648
648
  console.error("Error in accordion checkbox action:", j), alert(JSON.stringify(j));
649
649
  }
650
650
  },
651
- [t, s, a, d.actionType, r]
652
- ), x = d.disabled || f, b = {
651
+ [t, s, r, d.actionType, a]
652
+ ), y = d.disabled || _, p = {
653
653
  ...d,
654
- className: Be.accordion,
655
- disabled: x,
656
- checkboxChecked: _,
657
- onChanceCheckbox: d.hasCheckbox ? y : void 0,
658
- actionContent: g ? /* @__PURE__ */ o.jsx(o.Fragment, { children: g.map((p, w) => /* @__PURE__ */ o.jsx(k, { children: p }, `accordion-action-${w}`)) }) : void 0,
659
- customContent: m ? /* @__PURE__ */ o.jsx(o.Fragment, { children: m.map((p, w) => /* @__PURE__ */ o.jsx(k, { children: p }, `accordion-custom-${w}`)) }) : void 0,
660
- children: u ? /* @__PURE__ */ o.jsx("section", { className: Be.accordionBody, children: u.map((p, w) => /* @__PURE__ */ o.jsx(k, { children: p }, `accordion-child-${w}`)) }) : void 0
654
+ className: De.accordion,
655
+ disabled: y,
656
+ checkboxChecked: u,
657
+ onChanceCheckbox: d.hasCheckbox ? m : void 0,
658
+ actionContent: g ? /* @__PURE__ */ c.jsx(c.Fragment, { children: g.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-action-${C}`)) }) : void 0,
659
+ customContent: x ? /* @__PURE__ */ c.jsx(c.Fragment, { children: x.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-custom-${C}`)) }) : void 0,
660
+ children: f ? /* @__PURE__ */ c.jsx("section", { className: De.accordionBody, children: f.map((b, C) => /* @__PURE__ */ c.jsx(T, { children: b }, `accordion-child-${C}`)) }) : void 0
661
661
  };
662
- return /* @__PURE__ */ o.jsx(_t, { ...b });
663
- }, Sn = (e) => {
664
- const t = ae.useThemeStore((l) => l.theme.mode), s = e.dataSource, a = O(() => ({
662
+ return /* @__PURE__ */ c.jsx(it, { ...p });
663
+ }, Nn = (e) => {
664
+ const t = ne.useThemeStore((o) => o.theme.mode), s = e.dataSource, r = A(() => ({
665
665
  url: e.dataSource.url,
666
666
  method: e.dataSource.method,
667
667
  headers: e.dataSource.headers,
668
668
  params: s == null ? void 0 : s.data
669
- }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, s == null ? void 0 : s.data]), c = e.locale ?? "en", i = O(() => {
670
- var n, d, r, _, h;
671
- const l = {
669
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, s == null ? void 0 : s.data]), l = e.locale ?? "en", i = A(() => {
670
+ var n, d, a, u, h;
671
+ const o = {
672
672
  title: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.title,
673
673
  welcomeTitle: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.welcomeTitle,
674
- welcomeDescription: (r = e == null ? void 0 : e.translations) == null ? void 0 : r.welcomeDescription,
675
- placeholder: (_ = e == null ? void 0 : e.translations) == null ? void 0 : _.placeholder,
674
+ welcomeDescription: (a = e == null ? void 0 : e.translations) == null ? void 0 : a.welcomeDescription,
675
+ placeholder: (u = e == null ? void 0 : e.translations) == null ? void 0 : u.placeholder,
676
676
  disclaimer: (h = e == null ? void 0 : e.translations) == null ? void 0 : h.disclaimer
677
677
  };
678
- return Object.fromEntries(Object.entries(l).filter(([, f]) => !!f));
678
+ return Object.fromEntries(Object.entries(o).filter(([, _]) => !!_));
679
679
  }, [e == null ? void 0 : e.translations]);
680
- return U(() => {
680
+ return V(() => {
681
681
  e.onResolveProps && e.onResolveProps({
682
- dataSource: a,
683
- locale: c,
682
+ dataSource: r,
683
+ locale: l,
684
684
  translations: i,
685
685
  initialSuggestions: e.initialSuggestions,
686
686
  theme: t
687
687
  });
688
688
  }, [
689
689
  e.onResolveProps,
690
- a,
691
- c,
690
+ r,
691
+ l,
692
692
  i,
693
693
  e.initialSuggestions,
694
694
  t
695
- ]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx(
696
- Gt,
695
+ ]), e.onResolveProps ? null : /* @__PURE__ */ c.jsx(
696
+ It,
697
697
  {
698
- dataSource: a,
699
- locale: c,
698
+ dataSource: r,
699
+ locale: l,
700
700
  translations: i,
701
701
  initialSuggestions: e.initialSuggestions,
702
702
  theme: t
703
703
  }
704
704
  );
705
- }, kn = "_promptCodeEditor_1d57s_1", En = {
706
- promptCodeEditor: kn
707
- }, Tn = (e) => {
705
+ }, vn = "_promptCodeEditor_1d57s_1", Sn = {
706
+ promptCodeEditor: vn
707
+ }, kn = (e) => {
708
708
  const {
709
709
  userFlow: t,
710
710
  responseKey: s,
711
- codeBlockValue: a,
712
- language: c,
711
+ codeBlockValue: r,
712
+ language: l,
713
713
  disabled: i,
714
- dependencies: l,
714
+ dependencies: o,
715
715
  dataSource: n,
716
716
  inputLabel: d,
717
- inputPlaceholder: r,
718
- codeBlockLabel: _
719
- } = e, h = ae.useThemeStore((p) => p.theme.mode), [f, u] = L(
720
- a || ""
717
+ inputPlaceholder: a,
718
+ codeBlockLabel: u
719
+ } = e, h = ne.useThemeStore((b) => b.theme.mode), [_, f] = L(
720
+ r || ""
721
721
  ), { disabled: g } = I(
722
722
  t,
723
- l
724
- ), m = i ?? g, y = c ?? "json", x = {
723
+ o
724
+ ), x = i ?? g, m = l ?? "json", y = {
725
725
  url: (n == null ? void 0 : n.url) || "",
726
726
  method: (n == null ? void 0 : n.method) || "post",
727
727
  headers: n == null ? void 0 : n.headers,
728
728
  body: n == null ? void 0 : n.data
729
- }, b = (p) => {
730
- u(p);
731
- const w = {
732
- [s]: p
729
+ }, p = (b) => {
730
+ f(b);
731
+ const C = {
732
+ [s]: b
733
733
  };
734
- D(t, w);
734
+ q(t, C);
735
735
  };
736
- return U(() => {
737
- a !== void 0 && a !== f && u(a);
738
- }, [a]), /* @__PURE__ */ o.jsx("section", { className: En.promptCodeEditor, children: /* @__PURE__ */ o.jsx(
739
- Kt,
736
+ return V(() => {
737
+ r !== void 0 && r !== _ && f(r);
738
+ }, [r]), /* @__PURE__ */ c.jsx("section", { className: Sn.promptCodeEditor, children: /* @__PURE__ */ c.jsx(
739
+ Bt,
740
740
  {
741
741
  themeMode: h,
742
- requestConfig: x,
743
- language: y,
744
- disabled: m,
742
+ requestConfig: y,
743
+ language: m,
744
+ disabled: x,
745
745
  inputLabel: d,
746
- inputPlaceholder: r,
747
- codeBlockLabel: _,
748
- codeBlockValue: f,
749
- onCodeChange: b
746
+ inputPlaceholder: a,
747
+ codeBlockLabel: u,
748
+ codeBlockValue: _,
749
+ onCodeChange: p
750
750
  }
751
751
  ) });
752
- }, On = "_summaryCard_jva4h_1", An = {
753
- summaryCard: On
754
- }, $n = (e) => {
755
- const t = e.dataSource, s = O(() => ({
752
+ }, En = "_summaryCard_jva4h_1", Tn = {
753
+ summaryCard: En
754
+ }, On = (e) => {
755
+ const t = e.dataSource, s = A(() => ({
756
756
  url: e.dataSource.url,
757
757
  method: e.dataSource.method,
758
758
  headers: e.dataSource.headers,
759
759
  body: t == null ? void 0 : t.data
760
- }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), a = e.locale ?? "en", c = O(() => {
761
- var l, n, d;
760
+ }), [e.dataSource.url, e.dataSource.method, e.dataSource.headers, t == null ? void 0 : t.data]), r = e.locale ?? "en", l = A(() => {
761
+ var o, n, d;
762
762
  const i = {
763
- title: (l = e == null ? void 0 : e.translations) == null ? void 0 : l.title,
763
+ title: (o = e == null ? void 0 : e.translations) == null ? void 0 : o.title,
764
764
  loading: (n = e == null ? void 0 : e.translations) == null ? void 0 : n.loading,
765
765
  noData: (d = e == null ? void 0 : e.translations) == null ? void 0 : d.noData
766
766
  };
767
767
  return Object.fromEntries(
768
- Object.entries(i).filter(([, r]) => !!r)
768
+ Object.entries(i).filter(([, a]) => !!a)
769
769
  );
770
770
  }, [e == null ? void 0 : e.translations]);
771
- return U(() => {
771
+ return V(() => {
772
772
  e.onResolveProps && e.onResolveProps({
773
773
  dataSource: s,
774
- locale: a,
775
- translations: c
774
+ locale: r,
775
+ translations: l
776
776
  });
777
- }, [e.onResolveProps, s, a, c]), e.onResolveProps ? null : /* @__PURE__ */ o.jsx("section", { className: An.summaryCard, children: /* @__PURE__ */ o.jsx(
778
- Mt,
777
+ }, [e.onResolveProps, s, r, l]), e.onResolveProps ? null : /* @__PURE__ */ c.jsx("section", { className: Tn.summaryCard, children: /* @__PURE__ */ c.jsx(
778
+ Kt,
779
779
  {
780
780
  dataSource: s,
781
- locale: a,
782
- translations: c
781
+ locale: r,
782
+ translations: l
783
783
  }
784
784
  ) });
785
- }, Dn = "_body_14tsv_1", qn = "_body_content_14tsv_5", Ge = {
786
- body: Dn,
787
- body_content: qn
788
- }, Rn = ({ inputs: e }) => /* @__PURE__ */ o.jsx("section", { className: Ge.body, children: /* @__PURE__ */ o.jsx("div", { className: Ge.body_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx(k, { children: t }, s)) }) }), Ln = "_slotStack_1b4wy_1", In = {
789
- slotStack: Ln
790
- }, Bn = (e) => {
785
+ }, An = "_body_14tsv_1", $n = "_body_content_14tsv_5", Re = {
786
+ body: An,
787
+ body_content: $n
788
+ }, qn = ({ inputs: e }) => /* @__PURE__ */ c.jsx("section", { className: Re.body, children: /* @__PURE__ */ c.jsx("div", { className: Re.body_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx(T, { children: t }, s)) }) }), Dn = "_slotStack_1b4wy_1", Rn = {
789
+ slotStack: Dn
790
+ }, Ln = (e) => {
791
791
  const {
792
792
  userFlow: t,
793
793
  pageId: s,
794
- component: a,
795
- hash: c,
794
+ component: r,
795
+ hash: l,
796
796
  responseKey: i,
797
- content: l
798
- } = e, n = ae.useThemeStore((_) => _.theme.mode) === "dark", d = E(
797
+ content: o
798
+ } = e, n = ne.useThemeStore((u) => u.theme.mode) === "dark", d = O(
799
799
  t,
800
800
  s,
801
- l != null && l.length ? l : null
802
- ), r = d && d.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: In.slotStack, children: d.map((_, h) => /* @__PURE__ */ o.jsx(k, { children: _ }, `box-${c}-${h}`)) }) : null;
803
- return /* @__PURE__ */ o.jsx(ut, { darkMode: n, children: r });
801
+ o != null && o.length ? o : null
802
+ ), a = d && d.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Rn.slotStack, children: d.map((u, h) => /* @__PURE__ */ c.jsx(T, { children: u }, `box-${l}-${h}`)) }) : null;
803
+ return /* @__PURE__ */ c.jsx(lt, { darkMode: n, children: a });
804
804
  };
805
- var xe = { exports: {} };
805
+ var he = { exports: {} };
806
806
  /*!
807
807
  Copyright (c) 2018 Jed Watson.
808
808
  Licensed under the MIT License (MIT), see
809
809
  http://jedwatson.github.io/classnames
810
810
  */
811
- var Ke;
812
- function Gn() {
813
- return Ke || (Ke = 1, (function(e) {
811
+ var Le;
812
+ function In() {
813
+ return Le || (Le = 1, (function(e) {
814
814
  (function() {
815
815
  var t = {}.hasOwnProperty;
816
816
  function s() {
817
- for (var a = [], c = 0; c < arguments.length; c++) {
818
- var i = arguments[c];
817
+ for (var r = [], l = 0; l < arguments.length; l++) {
818
+ var i = arguments[l];
819
819
  if (i) {
820
- var l = typeof i;
821
- if (l === "string" || l === "number")
822
- a.push(i);
820
+ var o = typeof i;
821
+ if (o === "string" || o === "number")
822
+ r.push(i);
823
823
  else if (Array.isArray(i)) {
824
824
  if (i.length) {
825
825
  var n = s.apply(null, i);
826
- n && a.push(n);
826
+ n && r.push(n);
827
827
  }
828
- } else if (l === "object") {
828
+ } else if (o === "object") {
829
829
  if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) {
830
- a.push(i.toString());
830
+ r.push(i.toString());
831
831
  continue;
832
832
  }
833
833
  for (var d in i)
834
- t.call(i, d) && i[d] && a.push(d);
834
+ t.call(i, d) && i[d] && r.push(d);
835
835
  }
836
836
  }
837
837
  }
838
- return a.join(" ");
838
+ return r.join(" ");
839
839
  }
840
840
  e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
841
841
  })();
842
- })(xe)), xe.exports;
842
+ })(he)), he.exports;
843
843
  }
844
- var Kn = Gn();
845
- const F = /* @__PURE__ */ hn(Kn), Mn = "_fieldset_1xrth_1", Un = "_fieldsetColumn_1xrth_8", Vn = "_legend_1xrth_14", zn = "_options_1xrth_20", Hn = "_optionsRow_1xrth_25", Xn = "_optionsColumn_1xrth_36", Z = {
846
- fieldset: Mn,
847
- fieldsetColumn: Un,
848
- legend: Vn,
849
- options: zn,
850
- optionsRow: Hn,
851
- optionsColumn: Xn
852
- }, Jn = (e) => {
844
+ var Bn = In();
845
+ const F = /* @__PURE__ */ _n(Bn), Kn = "_fieldset_1xrth_1", Gn = "_fieldsetColumn_1xrth_8", Mn = "_legend_1xrth_14", Un = "_options_1xrth_20", Vn = "_optionsRow_1xrth_25", zn = "_optionsColumn_1xrth_36", Y = {
846
+ fieldset: Kn,
847
+ fieldsetColumn: Gn,
848
+ legend: Mn,
849
+ options: Un,
850
+ optionsRow: Vn,
851
+ optionsColumn: zn
852
+ }, Hn = (e) => {
853
853
  const {
854
854
  userFlow: t,
855
855
  pageId: s,
856
- responseKey: a,
857
- label: c,
856
+ responseKey: r,
857
+ label: l,
858
858
  value: i,
859
- required: l,
859
+ required: o,
860
860
  actionType: n,
861
861
  dependencies: d,
862
- direction: r,
863
- items: _
864
- } = e, h = r === "column" ? "column" : "row", { getNextUI: f } = G(), { disabled: u } = I(
862
+ direction: a,
863
+ items: u
864
+ } = e, h = a === "column" ? "column" : "row", { getNextUI: _ } = K(), { disabled: f } = I(
865
865
  t,
866
866
  d
867
- ), g = N(
868
- (p) => {
869
- var w, j;
870
- return (j = (w = p[t]) == null ? void 0 : w.entries) == null ? void 0 : j[a];
867
+ ), g = v(
868
+ (b) => {
869
+ var C, j;
870
+ return (j = (C = b[t]) == null ? void 0 : C.entries) == null ? void 0 : j[r];
871
871
  }
872
- ), m = g != null ? String(g) : i ?? "", y = u, x = O(() => c ? l ? `${c} *` : c : null, [c, l]), b = q(
873
- async (p) => {
874
- var w;
875
- if (!y)
872
+ ), x = g != null ? String(g) : i ?? "", m = f, y = A(() => l ? o ? `${l} *` : l : null, [l, o]), p = R(
873
+ async (b) => {
874
+ var C;
875
+ if (!m)
876
876
  try {
877
877
  const j = {
878
- ...(w = N.getState()[t]) == null ? void 0 : w.entries,
879
- [a]: p
878
+ ...(C = v.getState()[t]) == null ? void 0 : C.entries,
879
+ [r]: b
880
880
  };
881
- if (D(t, j), n === "GO_TO_NEXT_UI" || n === "GO_TO_NEXT_UI_WITHOUT_LOADING") {
882
- const T = await f(
881
+ if (q(t, j), n === "GO_TO_NEXT_UI" || n === "GO_TO_NEXT_UI_WITHOUT_LOADING") {
882
+ const k = await _(
883
883
  t,
884
884
  s,
885
885
  j,
886
- a,
886
+ r,
887
887
  n === "GO_TO_NEXT_UI"
888
888
  );
889
- T != null && T.data && $(t, T == null ? void 0 : T.data);
889
+ k != null && k.data && $(t, k == null ? void 0 : k.data);
890
890
  }
891
891
  } catch (j) {
892
892
  alert(JSON.stringify(j));
@@ -894,118 +894,118 @@ const F = /* @__PURE__ */ hn(Kn), Mn = "_fieldset_1xrth_1", Un = "_fieldsetColum
894
894
  },
895
895
  [
896
896
  n,
897
- f,
898
- y,
897
+ _,
898
+ m,
899
899
  s,
900
- a,
900
+ r,
901
901
  t
902
902
  ]
903
903
  );
904
- return /* @__PURE__ */ o.jsxs(
904
+ return /* @__PURE__ */ c.jsxs(
905
905
  "fieldset",
906
906
  {
907
907
  className: F(
908
- Z.fieldset,
909
- h === "column" && Z.fieldsetColumn
908
+ Y.fieldset,
909
+ h === "column" && Y.fieldsetColumn
910
910
  ),
911
911
  children: [
912
- x ? /* @__PURE__ */ o.jsx("legend", { className: Z.legend, children: x }) : null,
913
- /* @__PURE__ */ o.jsx(
912
+ y ? /* @__PURE__ */ c.jsx("legend", { className: Y.legend, children: y }) : null,
913
+ /* @__PURE__ */ c.jsx(
914
914
  "div",
915
915
  {
916
916
  className: F(
917
- Z.options,
918
- h === "column" ? Z.optionsColumn : Z.optionsRow
917
+ Y.options,
918
+ h === "column" ? Y.optionsColumn : Y.optionsRow
919
919
  ),
920
- children: _.map((p) => /* @__PURE__ */ o.jsx(
921
- ht,
920
+ children: u.map((b) => /* @__PURE__ */ c.jsx(
921
+ dt,
922
922
  {
923
- name: a,
924
- value: p.value,
925
- checked: m === p.value,
926
- disabled: y || p.disabled,
927
- labelRight: p.label,
923
+ name: r,
924
+ value: b.value,
925
+ checked: x === b.value,
926
+ disabled: m || b.disabled,
927
+ labelRight: b.label,
928
928
  onChange: () => {
929
- b(p.value);
929
+ p(b.value);
930
930
  }
931
931
  },
932
- p.value
932
+ b.value
933
933
  ))
934
934
  }
935
935
  )
936
936
  ]
937
937
  }
938
938
  );
939
- }, Wn = ({
939
+ }, Xn = ({
940
940
  userFlow: e,
941
941
  pageId: t,
942
942
  component: s,
943
- hash: a,
944
- responseKey: c,
943
+ hash: r,
944
+ responseKey: l,
945
945
  items: i,
946
- itemActive: l,
946
+ itemActive: o,
947
947
  darkMode: n
948
- }) => /* @__PURE__ */ o.jsx(ft, { items: i, itemActive: l, darkMode: n }), Qn = ({
948
+ }) => /* @__PURE__ */ c.jsx(_t, { items: i, itemActive: o, darkMode: n }), Jn = ({
949
949
  userFlow: e,
950
950
  pageId: t,
951
951
  component: s,
952
- hash: a,
953
- responseKey: c,
952
+ hash: r,
953
+ responseKey: l,
954
954
  total: i,
955
- done: l,
955
+ done: o,
956
956
  inProgress: n
957
- }) => /* @__PURE__ */ o.jsx(yt, { total: i, done: l, inProgress: n }), Yn = ({
957
+ }) => /* @__PURE__ */ c.jsx(ut, { total: i, done: o, inProgress: n }), Wn = ({
958
958
  userFlow: e,
959
959
  items: t,
960
960
  responseKey: s
961
961
  }) => {
962
- const { getNextUI: a } = G(), c = q(
963
- async ({ actionType: l, hashCode: n, redirectUrl: d }) => {
964
- var r;
962
+ const { getNextUI: r } = K(), l = R(
963
+ async ({ actionType: o, hashCode: n, redirectUrl: d }) => {
964
+ var a;
965
965
  try {
966
- switch (l) {
966
+ switch (o) {
967
967
  case "GO_TO_NEXT_UI":
968
- const _ = await a(
968
+ const u = await r(
969
969
  e,
970
970
  n,
971
- { ...(r = N.getState()[e]) == null ? void 0 : r.entries },
971
+ { ...(a = v.getState()[e]) == null ? void 0 : a.entries },
972
972
  s
973
973
  );
974
- _ != null && _.data && $(e, _ == null ? void 0 : _.data);
974
+ u != null && u.data && $(e, u == null ? void 0 : u.data);
975
975
  break;
976
976
  case "REDIRECT":
977
977
  d ? window.location.href = d : console.warn("Missing redirectUrl for REDIRECT actionType");
978
978
  break;
979
979
  default:
980
- console.warn(`Unhandled actionType: ${l}`);
980
+ console.warn(`Unhandled actionType: ${o}`);
981
981
  break;
982
982
  }
983
- } catch (_) {
984
- alert(JSON.stringify(_));
983
+ } catch (u) {
984
+ alert(JSON.stringify(u));
985
985
  }
986
986
  },
987
987
  []
988
- ), i = O(() => t == null ? void 0 : t.map((l) => ({
989
- title: l == null ? void 0 : l.title,
990
- component: /* @__PURE__ */ o.jsx("div", { onClick: () => c(l) })
988
+ ), i = A(() => t == null ? void 0 : t.map((o) => ({
989
+ title: o == null ? void 0 : o.title,
990
+ component: /* @__PURE__ */ c.jsx("div", { onClick: () => l(o) })
991
991
  })), []);
992
- return /* @__PURE__ */ o.jsx(xt, { items: i });
992
+ return /* @__PURE__ */ c.jsx(ht, { items: i });
993
993
  };
994
- function Ne(e, t) {
995
- const { getNextUI: s, fetchDataSource: a, fetchAndGetNextUI: c } = G();
996
- return q(
994
+ function we(e, t) {
995
+ const { getNextUI: s, fetchDataSource: r, fetchAndGetNextUI: l } = K();
996
+ return R(
997
997
  async (i) => {
998
- var f, u, g, m;
999
- const { responseKey: l, actionType: n, dataSource: d, redirectUrl: r, dependencies: _ } = i, h = (f = N.getState()[e]) == null ? void 0 : f.entries;
1000
- if (!Fe(h, _))
998
+ var _, f, g, x;
999
+ const { responseKey: o, actionType: n, dataSource: d, redirectUrl: a, dependencies: u } = i, h = (_ = v.getState()[e]) == null ? void 0 : _.entries;
1000
+ if (!Qe(h, u))
1001
1001
  try {
1002
- const y = {
1003
- ...(u = N.getState()[e]) == null ? void 0 : u.entries,
1004
- [l]: { status: 200 }
1002
+ const m = {
1003
+ ...(f = v.getState()[e]) == null ? void 0 : f.entries,
1004
+ [o]: { status: 200 }
1005
1005
  };
1006
- switch (D(e, y), n) {
1006
+ switch (q(e, m), n) {
1007
1007
  case "CLOSE_MODAL":
1008
- le(e, !1);
1008
+ ce(e, !1);
1009
1009
  break;
1010
1010
  case "CLOSE_DRAWER":
1011
1011
  W(e, !1);
@@ -1014,182 +1014,182 @@ function Ne(e, t) {
1014
1014
  W(e, !0);
1015
1015
  break;
1016
1016
  case "GO_TO_NEXT_UI": {
1017
- const x = await s(
1017
+ const y = await s(
1018
1018
  e,
1019
1019
  t,
1020
- y,
1021
- l
1020
+ m,
1021
+ o
1022
1022
  );
1023
- x != null && x.data && $(e, x == null ? void 0 : x.data);
1023
+ y != null && y.data && $(e, y == null ? void 0 : y.data);
1024
1024
  break;
1025
1025
  }
1026
1026
  case "FETCH_AND_GO_TO_NEXT_UI": {
1027
- const x = await c(
1027
+ const y = await l(
1028
1028
  e,
1029
1029
  t,
1030
- y,
1031
- l,
1030
+ m,
1031
+ o,
1032
1032
  d
1033
1033
  );
1034
- x != null && x.data && $(e, x == null ? void 0 : x.data);
1034
+ y != null && y.data && $(e, y == null ? void 0 : y.data);
1035
1035
  break;
1036
1036
  }
1037
1037
  case "GET_DATA_SOURCE": {
1038
- const x = await s(
1038
+ const y = await s(
1039
1039
  e,
1040
1040
  t,
1041
- y,
1042
- l
1043
- ), b = (g = x == null ? void 0 : x.data) == null ? void 0 : g.content;
1044
- if ((b == null ? void 0 : b.type) !== "fetch")
1041
+ m,
1042
+ o
1043
+ ), p = (g = y == null ? void 0 : y.data) == null ? void 0 : g.content;
1044
+ if ((p == null ? void 0 : p.type) !== "fetch")
1045
1045
  break;
1046
- const p = b == null ? void 0 : b.dataSource, w = await a(p, e, !1), j = {
1047
- ...(m = N.getState()[e]) == null ? void 0 : m.entries,
1048
- [l]: {
1049
- status: w == null ? void 0 : w.status,
1050
- content: w == null ? void 0 : w.data
1046
+ const b = p == null ? void 0 : p.dataSource, C = await r(b, e, !1), j = {
1047
+ ...(x = v.getState()[e]) == null ? void 0 : x.entries,
1048
+ [o]: {
1049
+ status: C == null ? void 0 : C.status,
1050
+ content: C == null ? void 0 : C.data
1051
1051
  }
1052
1052
  };
1053
- D(e, j);
1054
- const C = await s(
1053
+ q(e, j);
1054
+ const N = await s(
1055
1055
  e,
1056
1056
  t,
1057
1057
  j,
1058
- l
1058
+ o
1059
1059
  );
1060
- C != null && C.data && $(e, C == null ? void 0 : C.data);
1060
+ N != null && N.data && $(e, N == null ? void 0 : N.data);
1061
1061
  break;
1062
1062
  }
1063
1063
  case "REDIRECT":
1064
- r ? window.location.href = r : console.warn("Missing redirectUrl for REDIRECT actionType");
1064
+ a ? window.location.href = a : console.warn("Missing redirectUrl for REDIRECT actionType");
1065
1065
  break;
1066
1066
  default:
1067
1067
  console.warn(`Unhandled actionType: ${n}`);
1068
1068
  }
1069
- } catch (y) {
1070
- alert(JSON.stringify(y));
1069
+ } catch (m) {
1070
+ alert(JSON.stringify(m));
1071
1071
  }
1072
1072
  },
1073
1073
  [
1074
- c,
1075
- a,
1074
+ l,
1075
+ r,
1076
1076
  s,
1077
1077
  t,
1078
1078
  e
1079
1079
  ]
1080
1080
  );
1081
1081
  }
1082
- const Zn = (e) => {
1082
+ const Qn = (e) => {
1083
1083
  const {
1084
1084
  userFlow: t,
1085
1085
  pageId: s,
1086
- responseKey: a,
1087
- actionType: c,
1086
+ responseKey: r,
1087
+ actionType: l,
1088
1088
  label: i,
1089
- content: l,
1089
+ content: o,
1090
1090
  dataSource: n,
1091
1091
  redirectUrl: d,
1092
- dependencies: r,
1093
- onClick: _,
1092
+ dependencies: a,
1093
+ onClick: u,
1094
1094
  ...h
1095
- } = e, f = Ne(t, s), { disabled: u } = I(
1095
+ } = e, _ = we(t, s), { disabled: f } = I(
1096
1096
  t,
1097
- r
1097
+ a
1098
1098
  ), g = {
1099
1099
  ...h,
1100
- children: l ?? i
1101
- }, m = (g == null ? void 0 : g.disabled) ?? u, y = q(async () => {
1102
- await f({
1103
- responseKey: a,
1104
- actionType: c,
1100
+ children: o ?? i
1101
+ }, x = (g == null ? void 0 : g.disabled) ?? f, m = R(async () => {
1102
+ await _({
1103
+ responseKey: r,
1104
+ actionType: l,
1105
1105
  dataSource: n,
1106
1106
  redirectUrl: d,
1107
- dependencies: r
1107
+ dependencies: a
1108
1108
  });
1109
1109
  }, [
1110
- c,
1110
+ l,
1111
1111
  n,
1112
- r,
1113
- d,
1114
1112
  a,
1115
- f
1113
+ d,
1114
+ r,
1115
+ _
1116
1116
  ]);
1117
- return /* @__PURE__ */ o.jsx(
1118
- mt,
1117
+ return /* @__PURE__ */ c.jsx(
1118
+ ft,
1119
1119
  {
1120
1120
  ...g,
1121
- disabled: m,
1122
- onClick: () => !m && (_ ?? y)()
1121
+ disabled: x,
1122
+ onClick: () => !x && (u ?? m)()
1123
1123
  }
1124
1124
  );
1125
- }, Pn = "_slotStack_12u4t_5", Me = {
1126
- slotStack: Pn
1127
- }, Fn = (e) => {
1125
+ }, Yn = "_slotStack_12u4t_5", Ie = {
1126
+ slotStack: Yn
1127
+ }, Zn = (e) => {
1128
1128
  const {
1129
1129
  userFlow: t,
1130
1130
  pageId: s,
1131
- component: a,
1132
- hash: c,
1131
+ component: r,
1132
+ hash: l,
1133
1133
  responseKey: i,
1134
- dependencies: l,
1134
+ dependencies: o,
1135
1135
  content: n,
1136
1136
  actionContent: d,
1137
- ...r
1138
- } = e, { disabled: _ } = I(
1137
+ ...a
1138
+ } = e, { disabled: u } = I(
1139
1139
  t,
1140
- l
1141
- ), h = E(
1140
+ o
1141
+ ), h = O(
1142
1142
  t,
1143
1143
  s,
1144
1144
  n && n.length > 0 ? n : null
1145
- ), f = E(
1145
+ ), _ = O(
1146
1146
  t,
1147
1147
  s,
1148
1148
  d && d.length > 0 ? d : null
1149
- ), u = h && h.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Me.slotStack, children: h.map((y, x) => /* @__PURE__ */ o.jsx(k, { children: y }, `card-accordion-body-${c}-${x}`)) }) : void 0, g = f && f.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Me.slotStack, children: f.map((y, x) => /* @__PURE__ */ o.jsx(k, { children: y }, `card-accordion-actions-${c}-${x}`)) }) : void 0, m = r.disabled || _;
1150
- return /* @__PURE__ */ o.jsx(
1151
- gt,
1149
+ ), f = h && h.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ie.slotStack, children: h.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `card-accordion-body-${l}-${y}`)) }) : void 0, g = _ && _.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ie.slotStack, children: _.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `card-accordion-actions-${l}-${y}`)) }) : void 0, x = a.disabled || u;
1150
+ return /* @__PURE__ */ c.jsx(
1151
+ yt,
1152
1152
  {
1153
- ...r,
1154
- disabled: m,
1153
+ ...a,
1154
+ disabled: x,
1155
1155
  actionContent: g,
1156
- children: u ?? null
1156
+ children: f ?? null
1157
1157
  }
1158
1158
  );
1159
- }, es = "_slotStack_ivk5b_1", ts = {
1160
- slotStack: es
1161
- }, ns = (e) => {
1159
+ }, Fn = "_slotStack_ivk5b_1", Pn = {
1160
+ slotStack: Fn
1161
+ }, es = (e) => {
1162
1162
  const {
1163
1163
  userFlow: t,
1164
1164
  pageId: s,
1165
- component: a,
1166
- hash: c,
1165
+ component: r,
1166
+ hash: l,
1167
1167
  responseKey: i,
1168
- content: l,
1168
+ content: o,
1169
1169
  colorId: n,
1170
1170
  disabled: d,
1171
- actionType: r,
1172
- dataSource: _,
1171
+ actionType: a,
1172
+ dataSource: u,
1173
1173
  redirectUrl: h,
1174
- dependencies: f
1175
- } = e, { getNextUI: u, fetchDataSource: g, fetchAndGetNextUI: m } = G(), { disabled: y } = I(
1174
+ dependencies: _
1175
+ } = e, { getNextUI: f, fetchDataSource: g, fetchAndGetNextUI: x } = K(), { disabled: m } = I(
1176
1176
  t,
1177
- f
1178
- ), x = d ?? y, b = E(
1177
+ _
1178
+ ), y = d ?? m, p = O(
1179
1179
  t,
1180
1180
  s,
1181
- l && l.length > 0 ? l : null
1182
- ), p = b && b.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: ts.slotStack, children: b.map((j, C) => /* @__PURE__ */ o.jsx(k, { children: j }, `card-body-${c}-${C}`)) }) : null, w = q(async () => {
1183
- var j, C, v;
1184
- if (!(!r || x))
1181
+ o && o.length > 0 ? o : null
1182
+ ), b = p && p.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Pn.slotStack, children: p.map((j, N) => /* @__PURE__ */ c.jsx(T, { children: j }, `card-body-${l}-${N}`)) }) : null, C = R(async () => {
1183
+ var j, N, w;
1184
+ if (!(!a || y))
1185
1185
  try {
1186
- const T = {
1187
- ...(j = N.getState()[t]) == null ? void 0 : j.entries,
1186
+ const k = {
1187
+ ...(j = v.getState()[t]) == null ? void 0 : j.entries,
1188
1188
  [i]: { status: 200 }
1189
1189
  };
1190
- switch (D(t, T), r) {
1190
+ switch (q(t, k), a) {
1191
1191
  case "CLOSE_MODAL":
1192
- le(t, !1);
1192
+ ce(t, !1);
1193
1193
  break;
1194
1194
  case "CLOSE_DRAWER":
1195
1195
  W(t, !1);
@@ -1199,113 +1199,113 @@ const Zn = (e) => {
1199
1199
  break;
1200
1200
  case "GO_TO_NEXT_UI":
1201
1201
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
1202
- const S = await u(
1202
+ const E = await f(
1203
1203
  t,
1204
1204
  s,
1205
- T,
1205
+ k,
1206
1206
  i,
1207
- r === "GO_TO_NEXT_UI"
1207
+ a === "GO_TO_NEXT_UI"
1208
1208
  );
1209
- S != null && S.data && $(t, S == null ? void 0 : S.data);
1209
+ E != null && E.data && $(t, E == null ? void 0 : E.data);
1210
1210
  break;
1211
1211
  }
1212
1212
  case "FETCH_AND_GO_TO_NEXT_UI": {
1213
- const A = await m(
1213
+ const S = await x(
1214
1214
  t,
1215
1215
  s,
1216
- T,
1216
+ k,
1217
1217
  i,
1218
- _
1218
+ u
1219
1219
  );
1220
- A != null && A.data && $(t, A == null ? void 0 : A.data);
1220
+ S != null && S.data && $(t, S == null ? void 0 : S.data);
1221
1221
  break;
1222
1222
  }
1223
1223
  case "GET_DATA_SOURCE": {
1224
- const A = await u(
1224
+ const S = await f(
1225
1225
  t,
1226
1226
  s,
1227
- T,
1227
+ k,
1228
1228
  i
1229
- ), S = (C = A == null ? void 0 : A.data) == null ? void 0 : C.content;
1230
- if ((S == null ? void 0 : S.type) !== "fetch")
1229
+ ), E = (N = S == null ? void 0 : S.data) == null ? void 0 : N.content;
1230
+ if ((E == null ? void 0 : E.type) !== "fetch")
1231
1231
  break;
1232
- const J = S == null ? void 0 : S.dataSource, K = await g(J, t, !1), z = {
1233
- ...(v = N.getState()[t]) == null ? void 0 : v.entries,
1232
+ const G = E == null ? void 0 : E.dataSource, M = await g(G, t, !1), H = {
1233
+ ...(w = v.getState()[t]) == null ? void 0 : w.entries,
1234
1234
  [i]: {
1235
- status: K == null ? void 0 : K.status,
1236
- content: K == null ? void 0 : K.data
1235
+ status: M == null ? void 0 : M.status,
1236
+ content: M == null ? void 0 : M.data
1237
1237
  }
1238
1238
  };
1239
- D(t, z);
1240
- const R = await u(
1239
+ q(t, H);
1240
+ const D = await f(
1241
1241
  t,
1242
1242
  s,
1243
- z,
1243
+ H,
1244
1244
  i
1245
1245
  );
1246
- R != null && R.data && $(t, R == null ? void 0 : R.data);
1246
+ D != null && D.data && $(t, D == null ? void 0 : D.data);
1247
1247
  break;
1248
1248
  }
1249
1249
  case "REDIRECT":
1250
1250
  h && (window.location.href = h);
1251
1251
  break;
1252
1252
  default:
1253
- console.warn(`Unhandled card actionType: ${r}`);
1253
+ console.warn(`Unhandled card actionType: ${a}`);
1254
1254
  }
1255
- } catch (T) {
1256
- alert(JSON.stringify(T));
1255
+ } catch (k) {
1256
+ alert(JSON.stringify(k));
1257
1257
  }
1258
1258
  }, [
1259
- r,
1260
- _,
1259
+ a,
1260
+ u,
1261
+ y,
1261
1262
  x,
1262
- m,
1263
1263
  g,
1264
- u,
1264
+ f,
1265
1265
  s,
1266
1266
  h,
1267
1267
  i,
1268
1268
  t
1269
1269
  ]);
1270
- return /* @__PURE__ */ o.jsx(
1271
- bt,
1270
+ return /* @__PURE__ */ c.jsx(
1271
+ mt,
1272
1272
  {
1273
1273
  colorId: n,
1274
- disabled: x,
1275
- onClick: r && !x ? () => void w() : void 0,
1276
- children: p
1274
+ disabled: y,
1275
+ onClick: a && !y ? () => void C() : void 0,
1276
+ children: b
1277
1277
  }
1278
1278
  );
1279
- }, ss = (e) => {
1280
- const { content: t, description: s, ...a } = e, c = {
1281
- ...a,
1279
+ }, ts = (e) => {
1280
+ const { content: t, description: s, ...r } = e, l = {
1281
+ ...r,
1282
1282
  children: t ?? s
1283
1283
  };
1284
- return /* @__PURE__ */ o.jsx(oe, { ...c });
1285
- }, as = (e, t, s) => {
1286
- const { url: a, paginationKeys: c, params: i } = e, l = [], n = (c == null ? void 0 : c.page) ?? "page";
1287
- if (l.push(`${n}=${t}`), typeof s == "string") {
1288
- const _ = (c == null ? void 0 : c.text) ?? "text";
1289
- l.push(`${_}=${encodeURIComponent(s || "")}`);
1284
+ return /* @__PURE__ */ c.jsx(pe, { ...l });
1285
+ }, ns = (e, t, s) => {
1286
+ const { url: r, paginationKeys: l, params: i } = e, o = [], n = (l == null ? void 0 : l.page) ?? "page";
1287
+ if (o.push(`${n}=${t}`), typeof s == "string") {
1288
+ const u = (l == null ? void 0 : l.text) ?? "text";
1289
+ o.push(`${u}=${encodeURIComponent(s || "")}`);
1290
1290
  }
1291
1291
  if (i && typeof i == "object") {
1292
- const _ = Object.entries(i).map(
1293
- ([h, f]) => `${encodeURIComponent(h)}=${encodeURIComponent(f)}`
1292
+ const u = Object.entries(i).map(
1293
+ ([h, _]) => `${encodeURIComponent(h)}=${encodeURIComponent(_)}`
1294
1294
  );
1295
- l.push(..._);
1295
+ o.push(...u);
1296
1296
  }
1297
- const d = l.join("&");
1298
- return d ? `${a}?${d}` : a;
1299
- }, ve = (e, t, s, a) => {
1300
- const { type: c, url: i, method: l, headers: n } = e;
1301
- if (c === "rest") {
1302
- const d = as(e, t, s), _ = { ...(e == null ? void 0 : e.data) ?? {}, ...a ?? {} };
1297
+ const d = o.join("&");
1298
+ return d ? `${r}?${d}` : r;
1299
+ }, Ce = (e, t, s, r) => {
1300
+ const { type: l, url: i, method: o, headers: n } = e;
1301
+ if (l === "rest") {
1302
+ const d = ns(e, t, s), u = { ...(e == null ? void 0 : e.data) ?? {}, ...r ?? {} };
1303
1303
  return {
1304
1304
  type: "rest",
1305
1305
  url: d,
1306
- method: l,
1306
+ method: o,
1307
1307
  headers: n,
1308
- data: _
1308
+ data: u
1309
1309
  };
1310
1310
  } else
1311
1311
  return {
@@ -1320,221 +1320,221 @@ const Zn = (e) => {
1320
1320
  page: t
1321
1321
  }
1322
1322
  };
1323
- }, me = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, rs = (e, t) => {
1323
+ }, fe = (e) => Array.isArray(e) ? e : typeof e == "object" ? JSON.stringify(e) : e, ss = (e, t) => {
1324
1324
  if (!t || e == null)
1325
1325
  return null;
1326
- const { extractionJsonPath: s, injectionJsonPath: a } = t, c = B.value(e, s);
1327
- if (c == null)
1326
+ const { extractionJsonPath: s, injectionJsonPath: r } = t, l = B.value(e, s);
1327
+ if (l == null)
1328
1328
  return null;
1329
1329
  try {
1330
1330
  const i = {};
1331
- return B.value(i, a, c), i;
1331
+ return B.value(i, r, l), i;
1332
1332
  } catch (i) {
1333
1333
  return console.warn(
1334
1334
  "[buildCursorPayload] invalid injectionJsonPath:",
1335
- a,
1335
+ r,
1336
1336
  i
1337
1337
  ), null;
1338
1338
  }
1339
- }, nt = (e, t, s, a) => {
1340
- const c = B.query(e, t), i = c == null ? void 0 : c.map((r) => {
1341
- var _, h;
1339
+ }, Fe = (e, t, s, r) => {
1340
+ const l = B.query(e, t), i = l == null ? void 0 : l.map((a) => {
1341
+ var u, h;
1342
1342
  if (s) {
1343
- const f = {};
1344
- for (const [u, g] of Object.entries(s))
1343
+ const _ = {};
1344
+ for (const [f, g] of Object.entries(s))
1345
1345
  if (typeof g == "object" && "path" in g) {
1346
- const m = g, y = (_ = B.query(r, m.path)) == null ? void 0 : _[0];
1347
- m.translations && String(y) in m.translations ? f[u] = me(
1348
- m.translations[String(y)]
1349
- ) : f[u] = me(y);
1346
+ const x = g, m = (u = B.query(a, x.path)) == null ? void 0 : u[0];
1347
+ x.translations && String(m) in x.translations ? _[f] = fe(
1348
+ x.translations[String(m)]
1349
+ ) : _[f] = fe(m);
1350
1350
  } else {
1351
- const m = g;
1352
- f[u] = me((h = B.query(r, m)) == null ? void 0 : h[0]);
1351
+ const x = g;
1352
+ _[f] = fe((h = B.query(a, x)) == null ? void 0 : h[0]);
1353
1353
  }
1354
- return f;
1354
+ return _;
1355
1355
  } else
1356
- return r;
1357
- }), l = B.value(e, (a == null ? void 0 : a.size) ?? "$.meta.size") ?? c.length, n = B.value(e, (a == null ? void 0 : a.total) ?? "$.meta.total") ?? 0, d = {
1358
- size: l,
1356
+ return a;
1357
+ }), o = B.value(e, (r == null ? void 0 : r.size) ?? "$.meta.size") ?? l.length, n = B.value(e, (r == null ? void 0 : r.total) ?? "$.meta.total") ?? 0, d = {
1358
+ size: o,
1359
1359
  total: n,
1360
- totalPages: a != null && a.totalPages ? B.value(
1360
+ totalPages: r != null && r.totalPages ? B.value(
1361
1361
  e,
1362
- (a == null ? void 0 : a.totalPages) ?? "$.meta.totalPages"
1363
- ) : l > 0 ? Math.ceil(n / l) : 0
1362
+ (r == null ? void 0 : r.totalPages) ?? "$.meta.totalPages"
1363
+ ) : o > 0 ? Math.ceil(n / o) : 0
1364
1364
  };
1365
1365
  return { items: i, pagination: d };
1366
- }, Se = ({
1366
+ }, Ne = ({
1367
1367
  width: e,
1368
1368
  data: t,
1369
1369
  Chart: s,
1370
- children: a
1371
- }) => e ? /* @__PURE__ */ o.jsx(s, { width: e, height: ie, data: t, children: a }) : /* @__PURE__ */ o.jsx(Ze, { width: "100%", height: ie, children: /* @__PURE__ */ o.jsx(s, { data: t, children: a }) }), de = ({ withPadding: e = !1 }) => {
1372
- const t = (s) => /* @__PURE__ */ o.jsx("span", { style: { color: M.labelColor }, children: s });
1373
- return /* @__PURE__ */ o.jsx(
1374
- Ut,
1370
+ children: r
1371
+ }) => e ? /* @__PURE__ */ c.jsx(s, { width: e, height: oe, data: t, children: r }) : /* @__PURE__ */ c.jsx(Je, { width: "100%", height: oe, children: /* @__PURE__ */ c.jsx(s, { data: t, children: r }) }), ie = ({ withPadding: e = !1 }) => {
1372
+ const t = (s) => /* @__PURE__ */ c.jsx("span", { style: { color: U.labelColor }, children: s });
1373
+ return /* @__PURE__ */ c.jsx(
1374
+ Gt,
1375
1375
  {
1376
1376
  formatter: t,
1377
1377
  wrapperStyle: {
1378
- fontSize: M.fontSize,
1379
- fontFamily: M.fontFamily,
1378
+ fontSize: U.fontSize,
1379
+ fontFamily: U.fontFamily,
1380
1380
  padding: e ? "1rem 0" : "0"
1381
1381
  }
1382
1382
  }
1383
1383
  );
1384
- }, os = ({
1384
+ }, as = ({
1385
1385
  active: e,
1386
1386
  payload: t,
1387
1387
  label: s,
1388
- tooltipKey: a
1388
+ tooltipKey: r
1389
1389
  }) => {
1390
1390
  var i;
1391
1391
  if (!e || !t || !t.length)
1392
1392
  return null;
1393
- const c = {
1394
- backgroundColor: M.tooltipBg,
1395
- borderRadius: M.tooltipBorderRadius,
1396
- color: M.tooltipColor,
1393
+ const l = {
1394
+ backgroundColor: U.tooltipBg,
1395
+ borderRadius: U.tooltipBorderRadius,
1396
+ color: U.tooltipColor,
1397
1397
  padding: "8px 12px",
1398
1398
  border: "1px solid #e5e7eb"
1399
1399
  };
1400
- if (a) {
1401
- const l = (i = t[0]) == null ? void 0 : i.payload;
1402
- if (l && l[a] !== void 0 && l[a] !== null)
1403
- return /* @__PURE__ */ o.jsx("div", { style: c, children: /* @__PURE__ */ o.jsx("p", { style: { margin: 0 }, children: l[a] }) });
1400
+ if (r) {
1401
+ const o = (i = t[0]) == null ? void 0 : i.payload;
1402
+ if (o && o[r] !== void 0 && o[r] !== null)
1403
+ return /* @__PURE__ */ c.jsx("div", { style: l, children: /* @__PURE__ */ c.jsx("p", { style: { margin: 0 }, children: o[r] }) });
1404
1404
  }
1405
- return /* @__PURE__ */ o.jsxs("div", { style: c, children: [
1406
- /* @__PURE__ */ o.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1407
- t.map((l, n) => /* @__PURE__ */ o.jsx("p", { style: { margin: "2px 0", color: l.color }, children: `${l.name}: ${l.value}` }, n))
1405
+ return /* @__PURE__ */ c.jsxs("div", { style: l, children: [
1406
+ /* @__PURE__ */ c.jsx("p", { style: { margin: "0 0 4px 0", fontWeight: "bold" }, children: s }),
1407
+ t.map((o, n) => /* @__PURE__ */ c.jsx("p", { style: { margin: "2px 0", color: o.color }, children: `${o.name}: ${o.value}` }, n))
1408
1408
  ] });
1409
- }, _e = ({ tooltipKey: e } = {}) => /* @__PURE__ */ o.jsx(
1410
- Vt,
1409
+ }, le = ({ tooltipKey: e } = {}) => /* @__PURE__ */ c.jsx(
1410
+ Mt,
1411
1411
  {
1412
- content: /* @__PURE__ */ o.jsx(os, { tooltipKey: e })
1412
+ content: /* @__PURE__ */ c.jsx(as, { tooltipKey: e })
1413
1413
  }
1414
- ), ke = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ o.jsx(
1415
- zt,
1414
+ ), ve = ({ dataKey: e, hide: t = !1 }) => /* @__PURE__ */ c.jsx(
1415
+ Ut,
1416
1416
  {
1417
1417
  dataKey: e,
1418
1418
  hide: t,
1419
1419
  tick: {
1420
- fill: M.labelColor,
1421
- fontSize: M.fontSize
1420
+ fill: U.labelColor,
1421
+ fontSize: U.fontSize
1422
1422
  }
1423
1423
  }
1424
- ), Ee = () => /* @__PURE__ */ o.jsx(
1425
- Ht,
1424
+ ), Se = () => /* @__PURE__ */ c.jsx(
1425
+ Vt,
1426
1426
  {
1427
1427
  tick: {
1428
- fill: M.labelColor,
1429
- fontSize: M.fontSize
1428
+ fill: U.labelColor,
1429
+ fontSize: U.fontSize
1430
1430
  }
1431
1431
  }
1432
- ), cs = (e) => {
1433
- const { data: t, xKey: s, yKeys: a, tooltipKey: c, width: i } = e;
1434
- return /* @__PURE__ */ o.jsxs(Se, { width: i, data: t, Chart: Xt, children: [
1435
- /* @__PURE__ */ o.jsx(we, { strokeDasharray: "3 3" }),
1436
- /* @__PURE__ */ o.jsx(ke, { dataKey: s }),
1437
- /* @__PURE__ */ o.jsx(Ee, {}),
1438
- /* @__PURE__ */ o.jsx(_e, { tooltipKey: c }),
1439
- /* @__PURE__ */ o.jsx(de, {}),
1440
- a.map((l, n) => /* @__PURE__ */ o.jsx(
1441
- Jt,
1432
+ ), rs = (e) => {
1433
+ const { data: t, xKey: s, yKeys: r, tooltipKey: l, width: i } = e;
1434
+ return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: zt, children: [
1435
+ /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1436
+ /* @__PURE__ */ c.jsx(ve, { dataKey: s }),
1437
+ /* @__PURE__ */ c.jsx(Se, {}),
1438
+ /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1439
+ /* @__PURE__ */ c.jsx(ie, {}),
1440
+ r.map((o, n) => /* @__PURE__ */ c.jsx(
1441
+ Ht,
1442
1442
  {
1443
1443
  type: "monotone",
1444
- dataKey: l,
1445
- stroke: V[n % V.length],
1446
- fill: V[n % V.length]
1444
+ dataKey: o,
1445
+ stroke: z[n % z.length],
1446
+ fill: z[n % z.length]
1447
1447
  },
1448
- l
1448
+ o
1449
1449
  ))
1450
1450
  ] });
1451
- }, is = (e) => {
1452
- const { data: t, yKeys: s, xKey: a, tooltipKey: c, width: i } = e;
1453
- return /* @__PURE__ */ o.jsxs(Se, { width: i, data: t, Chart: Wt, children: [
1454
- /* @__PURE__ */ o.jsx(we, { strokeDasharray: "3 3" }),
1455
- /* @__PURE__ */ o.jsx(ke, { dataKey: a }),
1456
- /* @__PURE__ */ o.jsx(Ee, {}),
1457
- /* @__PURE__ */ o.jsx(_e, { tooltipKey: c }),
1458
- /* @__PURE__ */ o.jsx(de, {}),
1459
- s.map((l, n) => /* @__PURE__ */ o.jsx(
1460
- Qt,
1451
+ }, os = (e) => {
1452
+ const { data: t, yKeys: s, xKey: r, tooltipKey: l, width: i } = e;
1453
+ return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: Xt, children: [
1454
+ /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1455
+ /* @__PURE__ */ c.jsx(ve, { dataKey: r }),
1456
+ /* @__PURE__ */ c.jsx(Se, {}),
1457
+ /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1458
+ /* @__PURE__ */ c.jsx(ie, {}),
1459
+ s.map((o, n) => /* @__PURE__ */ c.jsx(
1460
+ Jt,
1461
1461
  {
1462
- dataKey: l,
1463
- fill: V[n % V.length]
1462
+ dataKey: o,
1463
+ fill: z[n % z.length]
1464
1464
  },
1465
- l
1465
+ o
1466
1466
  ))
1467
1467
  ] });
1468
- }, ls = (e) => {
1469
- const { data: t, xKey: s, yKeys: a, tooltipKey: c, width: i } = e;
1470
- return /* @__PURE__ */ o.jsxs(Se, { width: i, data: t, Chart: Yt, children: [
1471
- /* @__PURE__ */ o.jsx(we, { strokeDasharray: "3 3" }),
1472
- /* @__PURE__ */ o.jsx(ke, { dataKey: s }),
1473
- /* @__PURE__ */ o.jsx(Ee, {}),
1474
- /* @__PURE__ */ o.jsx(_e, { tooltipKey: c }),
1475
- /* @__PURE__ */ o.jsx(de, {}),
1476
- a.map((l, n) => /* @__PURE__ */ o.jsx(
1477
- Zt,
1468
+ }, cs = (e) => {
1469
+ const { data: t, xKey: s, yKeys: r, tooltipKey: l, width: i } = e;
1470
+ return /* @__PURE__ */ c.jsxs(Ne, { width: i, data: t, Chart: Wt, children: [
1471
+ /* @__PURE__ */ c.jsx(be, { strokeDasharray: "3 3" }),
1472
+ /* @__PURE__ */ c.jsx(ve, { dataKey: s }),
1473
+ /* @__PURE__ */ c.jsx(Se, {}),
1474
+ /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1475
+ /* @__PURE__ */ c.jsx(ie, {}),
1476
+ r.map((o, n) => /* @__PURE__ */ c.jsx(
1477
+ Qt,
1478
1478
  {
1479
1479
  type: "monotone",
1480
- dataKey: l,
1481
- stroke: V[n % V.length],
1480
+ dataKey: o,
1481
+ stroke: z[n % z.length],
1482
1482
  strokeWidth: 2,
1483
1483
  dot: !1
1484
1484
  },
1485
- l
1485
+ o
1486
1486
  ))
1487
1487
  ] });
1488
- }, ds = (e) => {
1489
- const { data: t, xKey: s, yKeys: a, tooltipKey: c } = e, i = ({
1490
- cx: l,
1488
+ }, is = (e) => {
1489
+ const { data: t, xKey: s, yKeys: r, tooltipKey: l } = e, i = ({
1490
+ cx: o,
1491
1491
  cy: n,
1492
1492
  midAngle: d,
1493
- innerRadius: r,
1494
- outerRadius: _,
1493
+ innerRadius: a,
1494
+ outerRadius: u,
1495
1495
  value: h
1496
1496
  }) => {
1497
- const f = Math.PI / 180, u = 25 + r + (_ - r), g = l + u * Math.cos(-(d ?? 0) * f), m = n + u * Math.sin(-(d ?? 0) * f);
1498
- return /* @__PURE__ */ o.jsx(
1497
+ const _ = Math.PI / 180, f = 25 + a + (u - a), g = o + f * Math.cos(-(d ?? 0) * _), x = n + f * Math.sin(-(d ?? 0) * _);
1498
+ return /* @__PURE__ */ c.jsx(
1499
1499
  "text",
1500
1500
  {
1501
1501
  x: g,
1502
- y: m,
1503
- fill: M.labelColor,
1504
- color: M.labelColor,
1502
+ y: x,
1503
+ fill: U.labelColor,
1504
+ color: U.labelColor,
1505
1505
  textAnchor: "middle",
1506
1506
  dominantBaseline: "central",
1507
1507
  children: h
1508
1508
  }
1509
1509
  );
1510
1510
  };
1511
- return /* @__PURE__ */ o.jsx(Ze, { width: "100%", height: ie, children: /* @__PURE__ */ o.jsxs(Pt, { children: [
1512
- /* @__PURE__ */ o.jsx(_e, { tooltipKey: c }),
1513
- /* @__PURE__ */ o.jsx(de, {}),
1514
- /* @__PURE__ */ o.jsx(
1515
- Ft,
1511
+ return /* @__PURE__ */ c.jsx(Je, { width: "100%", height: oe, children: /* @__PURE__ */ c.jsxs(Yt, { children: [
1512
+ /* @__PURE__ */ c.jsx(le, { tooltipKey: l }),
1513
+ /* @__PURE__ */ c.jsx(ie, {}),
1514
+ /* @__PURE__ */ c.jsx(
1515
+ Zt,
1516
1516
  {
1517
1517
  data: t,
1518
- dataKey: a[0],
1518
+ dataKey: r[0],
1519
1519
  nameKey: s,
1520
1520
  label: i,
1521
1521
  outerRadius: 120,
1522
- children: t.map((l, n) => /* @__PURE__ */ o.jsx(
1523
- en,
1522
+ children: t.map((o, n) => /* @__PURE__ */ c.jsx(
1523
+ Ft,
1524
1524
  {
1525
- fill: V[n % V.length]
1525
+ fill: z[n % z.length]
1526
1526
  },
1527
1527
  `cell-${n}`
1528
1528
  ))
1529
1529
  }
1530
1530
  )
1531
1531
  ] }) });
1532
- }, ie = 400, st = 56, _s = /* @__PURE__ */ new Set(["bar", "line", "area"]), us = {
1533
- area: cs,
1534
- bar: is,
1535
- line: ls,
1536
- pie: ds
1537
- }, V = [
1532
+ }, oe = 400, Pe = 56, ls = /* @__PURE__ */ new Set(["bar", "line", "area"]), ds = {
1533
+ area: rs,
1534
+ bar: os,
1535
+ line: cs,
1536
+ pie: is
1537
+ }, z = [
1538
1538
  "var(--color-primitive-palette-1-50)",
1539
1539
  "var(--color-primitive-palette-2-50)",
1540
1540
  "var(--color-primitive-palette-3-50)",
@@ -1552,7 +1552,7 @@ const Zn = (e) => {
1552
1552
  "var(--color-primitive-palette-15-50)",
1553
1553
  "var(--color-primitive-palette-16-50)",
1554
1554
  "var(--color-primitive-palette-17-50)"
1555
- ], M = {
1555
+ ], U = {
1556
1556
  fontFamily: "Roboto, sans-serif",
1557
1557
  fontSize: 12,
1558
1558
  labelColor: "var(--color-neutral-90)",
@@ -1560,310 +1560,310 @@ const Zn = (e) => {
1560
1560
  tooltipColor: "#000",
1561
1561
  tooltipBorderRadius: "4px"
1562
1562
  };
1563
- function hs(e, t, s = st) {
1563
+ function _s(e, t, s = Pe) {
1564
1564
  return e <= 0 ? 0 : t <= 0 ? e : Math.max(e, t * s);
1565
1565
  }
1566
- const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5hx_29", Ue = {
1567
- chartScrollViewport: fs,
1568
- chartScrollViewport_track: ys
1569
- }, xs = "Scrollable chart area", ms = ({
1566
+ const us = "_chartScrollViewport_sm5hx_1", hs = "_chartScrollViewport_track_sm5hx_29", Be = {
1567
+ chartScrollViewport: us,
1568
+ chartScrollViewport_track: hs
1569
+ }, fs = "Scrollable chart area", ys = ({
1570
1570
  dataLength: e,
1571
1571
  minCategoryWidth: t,
1572
1572
  children: s
1573
1573
  }) => {
1574
- const a = je(null), [c, i] = L(0), l = t ?? st;
1575
- U(() => {
1576
- const _ = a.current;
1577
- if (!_)
1574
+ const r = ge(null), [l, i] = L(0), o = t ?? Pe;
1575
+ V(() => {
1576
+ const u = r.current;
1577
+ if (!u)
1578
1578
  return;
1579
1579
  const h = () => {
1580
- i(_.clientWidth);
1580
+ i(u.clientWidth);
1581
1581
  };
1582
1582
  h();
1583
- const f = new ResizeObserver(h);
1584
- return f.observe(_), () => f.disconnect();
1583
+ const _ = new ResizeObserver(h);
1584
+ return _.observe(u), () => _.disconnect();
1585
1585
  }, []);
1586
- const n = hs(
1587
- c,
1586
+ const n = _s(
1587
+ l,
1588
1588
  e,
1589
- l
1590
- ), d = c > 0 && n > c, r = q(
1591
- (_) => {
1592
- const h = a.current;
1589
+ o
1590
+ ), d = l > 0 && n > l, a = R(
1591
+ (u) => {
1592
+ const h = r.current;
1593
1593
  if (h)
1594
- switch (_.key) {
1594
+ switch (u.key) {
1595
1595
  case "ArrowLeft":
1596
- h.scrollLeft -= l, _.preventDefault();
1596
+ h.scrollLeft -= o, u.preventDefault();
1597
1597
  break;
1598
1598
  case "ArrowRight":
1599
- h.scrollLeft += l, _.preventDefault();
1599
+ h.scrollLeft += o, u.preventDefault();
1600
1600
  break;
1601
1601
  case "Home":
1602
- h.scrollLeft = 0, _.preventDefault();
1602
+ h.scrollLeft = 0, u.preventDefault();
1603
1603
  break;
1604
1604
  case "End":
1605
- h.scrollLeft = h.scrollWidth - h.clientWidth, _.preventDefault();
1605
+ h.scrollLeft = h.scrollWidth - h.clientWidth, u.preventDefault();
1606
1606
  break;
1607
1607
  }
1608
1608
  },
1609
- [l]
1609
+ [o]
1610
1610
  );
1611
- return /* @__PURE__ */ o.jsx(
1611
+ return /* @__PURE__ */ c.jsx(
1612
1612
  "div",
1613
1613
  {
1614
- ref: a,
1615
- className: Ue.chartScrollViewport,
1614
+ ref: r,
1615
+ className: Be.chartScrollViewport,
1616
1616
  role: d ? "region" : void 0,
1617
1617
  tabIndex: d ? 0 : void 0,
1618
- "aria-label": d ? xs : void 0,
1619
- onKeyDown: d ? r : void 0,
1620
- children: /* @__PURE__ */ o.jsx(
1618
+ "aria-label": d ? fs : void 0,
1619
+ onKeyDown: d ? a : void 0,
1620
+ children: /* @__PURE__ */ c.jsx(
1621
1621
  "div",
1622
1622
  {
1623
- className: Ue.chartScrollViewport_track,
1624
- style: { width: n, height: ie },
1625
- children: c > 0 ? s(n) : null
1623
+ className: Be.chartScrollViewport_track,
1624
+ style: { width: n, height: oe },
1625
+ children: l > 0 ? s(n) : null
1626
1626
  }
1627
1627
  )
1628
1628
  }
1629
1629
  );
1630
- }, gs = (e) => {
1631
- const { component: t, userFlow: s, hash: a, responseKey: c, dataSource: i, ...l } = e, n = us[l.type], { fetchDataSource: d } = G(), [r, _] = L(!1), [h, f] = L([]), u = async () => {
1632
- var y, x;
1630
+ }, ms = (e) => {
1631
+ const { component: t, userFlow: s, hash: r, responseKey: l, dataSource: i, ...o } = e, n = ds[o.type], { fetchDataSource: d } = K(), [a, u] = L(!1), [h, _] = L([]), f = async () => {
1632
+ var m, y;
1633
1633
  try {
1634
- _(!0);
1635
- const { jsonPathData: b, mapperData: p } = i, w = ve(
1634
+ u(!0);
1635
+ const { jsonPathData: p, mapperData: b } = i, C = Ce(
1636
1636
  i,
1637
1637
  1
1638
1638
  ), j = await d(
1639
- w,
1639
+ C,
1640
1640
  s,
1641
1641
  !1
1642
- ), C = b ? (y = nt(j == null ? void 0 : j.data, b, p)) == null ? void 0 : y.items : (x = j == null ? void 0 : j.data) == null ? void 0 : x.data;
1643
- f(C), _(!1);
1644
- } catch (b) {
1645
- alert(JSON.stringify(b)), _(!1);
1642
+ ), N = p ? (m = Fe(j == null ? void 0 : j.data, p, b)) == null ? void 0 : m.items : (y = j == null ? void 0 : j.data) == null ? void 0 : y.data;
1643
+ _(N), u(!1);
1644
+ } catch (p) {
1645
+ alert(JSON.stringify(p)), u(!1);
1646
1646
  }
1647
1647
  };
1648
- if (U(() => {
1649
- n && (i ? u() : f(l.data));
1648
+ if (V(() => {
1649
+ n && (i ? f() : _(o.data));
1650
1650
  }, []), !n)
1651
- return /* @__PURE__ */ o.jsx("div", { children: "Not supported chart type" });
1651
+ return /* @__PURE__ */ c.jsx("div", { children: "Not supported chart type" });
1652
1652
  const g = {
1653
- ...l,
1653
+ ...o,
1654
1654
  data: h
1655
1655
  };
1656
- return r ? /* @__PURE__ */ o.jsx(Qe, { height: 400 }) : h.length === 0 ? /* @__PURE__ */ o.jsx(oe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : _s.has(l.type) ? /* @__PURE__ */ o.jsx(
1657
- ms,
1656
+ return a ? /* @__PURE__ */ c.jsx(He, { height: 400 }) : h.length === 0 ? /* @__PURE__ */ c.jsx(pe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : ls.has(o.type) ? /* @__PURE__ */ c.jsx(
1657
+ ys,
1658
1658
  {
1659
1659
  dataLength: h.length,
1660
- minCategoryWidth: l.minCategoryWidth,
1661
- children: (y) => /* @__PURE__ */ o.jsx(n, { ...g, width: y })
1660
+ minCategoryWidth: o.minCategoryWidth,
1661
+ children: (m) => /* @__PURE__ */ c.jsx(n, { ...g, width: m })
1662
1662
  }
1663
- ) : /* @__PURE__ */ o.jsx(n, { ...g });
1664
- }, bs = (e) => {
1663
+ ) : /* @__PURE__ */ c.jsx(n, { ...g });
1664
+ }, xs = (e) => {
1665
1665
  const {
1666
1666
  userFlow: t,
1667
1667
  pageId: s,
1668
- responseKey: a,
1669
- actionType: c,
1668
+ responseKey: r,
1669
+ actionType: l,
1670
1670
  label: i,
1671
- value: l,
1671
+ value: o,
1672
1672
  required: n,
1673
1673
  dependencies: d,
1674
- ...r
1675
- } = e, _ = {
1676
- ...r
1677
- }, { getNextUI: h } = G(), [f, u] = L(l || !1), { disabled: g } = I(
1674
+ ...a
1675
+ } = e, u = {
1676
+ ...a
1677
+ }, { getNextUI: h } = K(), [_, f] = L(o || !1), { disabled: g } = I(
1678
1678
  t,
1679
1679
  d
1680
- ), m = O(() => n && i ? `${i} *` : i ?? "", [i, n]), y = q(async () => {
1681
- var b;
1680
+ ), x = A(() => n && i ? `${i} *` : i ?? "", [i, n]), m = R(async () => {
1681
+ var p;
1682
1682
  try {
1683
- const p = !f;
1684
- u(p);
1685
- const w = {
1686
- ...(b = N.getState()[t]) == null ? void 0 : b.entries,
1687
- [a]: p
1683
+ const b = !_;
1684
+ f(b);
1685
+ const C = {
1686
+ ...(p = v.getState()[t]) == null ? void 0 : p.entries,
1687
+ [r]: b
1688
1688
  };
1689
- switch (D(t, w), c) {
1689
+ switch (q(t, C), l) {
1690
1690
  case "GO_TO_NEXT_UI":
1691
1691
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
1692
- const C = await h(
1692
+ const N = await h(
1693
1693
  t,
1694
1694
  s,
1695
- w,
1696
- a,
1697
- c === "GO_TO_NEXT_UI"
1695
+ C,
1696
+ r,
1697
+ l === "GO_TO_NEXT_UI"
1698
1698
  );
1699
- C != null && C.data && $(t, C == null ? void 0 : C.data);
1699
+ N != null && N.data && $(t, N == null ? void 0 : N.data);
1700
1700
  break;
1701
1701
  }
1702
1702
  default:
1703
1703
  break;
1704
1704
  }
1705
- } catch (p) {
1706
- console.error("Error in checkbox action:", p), alert(JSON.stringify(p));
1705
+ } catch (b) {
1706
+ console.error("Error in checkbox action:", b), alert(JSON.stringify(b));
1707
1707
  }
1708
- }, [t, s, a, c, f]), x = (_ == null ? void 0 : _.disabled) ?? g;
1709
- return /* @__PURE__ */ o.jsx(
1710
- pt,
1708
+ }, [t, s, r, l, _]), y = (u == null ? void 0 : u.disabled) ?? g;
1709
+ return /* @__PURE__ */ c.jsx(
1710
+ xt,
1711
1711
  {
1712
- ..._,
1713
- labelRight: m,
1714
- checked: f,
1715
- disabled: x,
1712
+ ...u,
1713
+ labelRight: x,
1714
+ checked: _,
1715
+ disabled: y,
1716
1716
  onChange: () => {
1717
- !x && y();
1717
+ !y && m();
1718
1718
  }
1719
1719
  }
1720
1720
  );
1721
- }, ps = "_codeEditor_1wi2p_1", js = "_codeEditor_label_1wi2p_4", ws = "_codeEditor_wrapper_1wi2p_13", Cs = "_input_1wi2p_17", Ns = "_preview_1wi2p_18", vs = "_preview_inner_1wi2p_33", P = {
1722
- codeEditor: ps,
1723
- codeEditor_label: js,
1724
- codeEditor_wrapper: ws,
1725
- input: Cs,
1726
- preview: Ns,
1727
- preview_inner: vs
1728
- }, Ss = (e) => {
1721
+ }, gs = "_codeEditor_1wi2p_1", ps = "_codeEditor_label_1wi2p_4", bs = "_codeEditor_wrapper_1wi2p_13", js = "_input_1wi2p_17", ws = "_preview_1wi2p_18", Cs = "_preview_inner_1wi2p_33", Z = {
1722
+ codeEditor: gs,
1723
+ codeEditor_label: ps,
1724
+ codeEditor_wrapper: bs,
1725
+ input: js,
1726
+ preview: ws,
1727
+ preview_inner: Cs
1728
+ }, Ns = (e) => {
1729
1729
  const {
1730
1730
  userFlow: t,
1731
1731
  responseKey: s,
1732
- label: a,
1733
- language: c,
1732
+ label: r,
1733
+ language: l,
1734
1734
  placeholder: i,
1735
- value: l,
1735
+ value: o,
1736
1736
  required: n,
1737
1737
  dependencies: d,
1738
- disabled: r,
1739
- showPreview: _,
1738
+ disabled: a,
1739
+ showPreview: u,
1740
1740
  height: h = "400px"
1741
- } = e, [f, u] = L(l ?? ""), g = ae.useThemeStore((w) => w.theme.mode), { disabled: m } = I(
1741
+ } = e, [_, f] = L(o ?? ""), g = ne.useThemeStore((C) => C.theme.mode), { disabled: x } = I(
1742
1742
  t,
1743
1743
  d
1744
- ), y = r ?? m, x = {
1745
- json: Ae(),
1746
- markdown: nn(),
1747
- sql: sn(),
1748
- yaml: an()
1749
- }, b = O(() => n && a ? `${a} *` : a ?? "", [a, n]), p = (w) => {
1750
- u(w);
1744
+ ), m = a ?? x, y = {
1745
+ json: ke(),
1746
+ markdown: en(),
1747
+ sql: tn(),
1748
+ yaml: nn()
1749
+ }, p = A(() => n && r ? `${r} *` : r ?? "", [r, n]), b = (C) => {
1750
+ f(C);
1751
1751
  const j = {
1752
- [s]: w
1752
+ [s]: C
1753
1753
  };
1754
- D(t, j);
1754
+ q(t, j);
1755
1755
  };
1756
- return /* @__PURE__ */ o.jsxs("div", { className: P.codeEditor, children: [
1757
- b && b !== "" && /* @__PURE__ */ o.jsx("label", { className: P.codeEditor_label, children: b }),
1758
- /* @__PURE__ */ o.jsxs("div", { className: P.codeEditor_wrapper, children: [
1759
- /* @__PURE__ */ o.jsx(
1760
- tn,
1756
+ return /* @__PURE__ */ c.jsxs("div", { className: Z.codeEditor, children: [
1757
+ p && p !== "" && /* @__PURE__ */ c.jsx("label", { className: Z.codeEditor_label, children: p }),
1758
+ /* @__PURE__ */ c.jsxs("div", { className: Z.codeEditor_wrapper, children: [
1759
+ /* @__PURE__ */ c.jsx(
1760
+ Pt,
1761
1761
  {
1762
- className: P.input,
1763
- value: f,
1762
+ className: Z.input,
1763
+ value: _,
1764
1764
  height: h,
1765
1765
  placeholder: i,
1766
- extensions: [x[c] ?? Ae()],
1767
- onChange: (w) => p(w),
1766
+ extensions: [y[l] ?? ke()],
1767
+ onChange: (C) => b(C),
1768
1768
  theme: g,
1769
- editable: !y
1769
+ editable: !m
1770
1770
  }
1771
1771
  ),
1772
- c === "markdown" && _ && /* @__PURE__ */ o.jsx("div", { className: P.preview, style: { height: h }, children: /* @__PURE__ */ o.jsx(Ye, { className: P.preview_inner, children: f }) })
1772
+ l === "markdown" && u && /* @__PURE__ */ c.jsx("div", { className: Z.preview, style: { height: h }, children: /* @__PURE__ */ c.jsx(Xe, { className: Z.preview_inner, children: _ }) })
1773
1773
  ] })
1774
1774
  ] });
1775
- }, ks = "_slotStack_6n2wy_5", Ve = {
1776
- slotStack: ks
1777
- }, Es = (e) => {
1775
+ }, vs = "_slotStack_6n2wy_5", Ke = {
1776
+ slotStack: vs
1777
+ }, Ss = (e) => {
1778
1778
  const {
1779
1779
  userFlow: t,
1780
1780
  pageId: s,
1781
- component: a,
1782
- hash: c,
1781
+ component: r,
1782
+ hash: l,
1783
1783
  responseKey: i,
1784
- content: l,
1784
+ content: o,
1785
1785
  topContent: n,
1786
1786
  icon: d,
1787
- headerStatusColor: r,
1788
- ..._
1789
- } = e, h = r ? `palette_${r}_50` : void 0, f = E(
1787
+ headerStatusColor: a,
1788
+ ...u
1789
+ } = e, h = a ? `palette_${a}_50` : void 0, _ = O(
1790
1790
  t,
1791
1791
  s,
1792
- l && l.length > 0 ? l : null
1793
- ), u = E(
1792
+ o && o.length > 0 ? o : null
1793
+ ), f = O(
1794
1794
  t,
1795
1795
  s,
1796
1796
  n && n.length > 0 ? n : null
1797
- ), g = f && f.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Ve.slotStack, children: f.map((y, x) => /* @__PURE__ */ o.jsx(k, { children: y }, `data-card-body-${c}-${x}`)) }) : void 0, m = u && u.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Ve.slotStack, children: u.map((y, x) => /* @__PURE__ */ o.jsx(k, { children: y }, `data-card-top-${c}-${x}`)) }) : void 0;
1798
- return /* @__PURE__ */ o.jsx(
1799
- jt,
1797
+ ), g = _ && _.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ke.slotStack, children: _.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `data-card-body-${l}-${y}`)) }) : void 0, x = f && f.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ke.slotStack, children: f.map((m, y) => /* @__PURE__ */ c.jsx(T, { children: m }, `data-card-top-${l}-${y}`)) }) : void 0;
1798
+ return /* @__PURE__ */ c.jsx(
1799
+ gt,
1800
1800
  {
1801
- ..._,
1801
+ ...u,
1802
1802
  icon: d,
1803
1803
  headerStatusColor: h,
1804
- topContent: m,
1804
+ topContent: x,
1805
1805
  children: g
1806
1806
  }
1807
1807
  );
1808
- }, Ts = "_dividerNotFront_tze3j_1", Os = {
1809
- dividerNotFront: Ts
1810
- }, As = (e) => /* @__PURE__ */ o.jsx(wt, { ...e, className: Os.dividerNotFront }), $s = "_drawer_13pxo_1", Ds = "_drawerBody_13pxo_5", qs = "_drawerFooter_13pxo_11", ge = {
1811
- drawer: $s,
1812
- drawerBody: Ds,
1813
- drawerFooter: qs
1814
- }, Rs = ({
1808
+ }, ks = "_dividerNotFront_tze3j_1", Es = {
1809
+ dividerNotFront: ks
1810
+ }, Ts = (e) => /* @__PURE__ */ c.jsx(pt, { ...e, className: Es.dividerNotFront }), Os = "_drawer_13pxo_1", As = "_drawerBody_13pxo_5", $s = "_drawerFooter_13pxo_11", ye = {
1811
+ drawer: Os,
1812
+ drawerBody: As,
1813
+ drawerFooter: $s
1814
+ }, qs = ({
1815
1815
  userFlow: e,
1816
1816
  pageId: t,
1817
1817
  responseKey: s,
1818
- header: a,
1819
- body: c,
1818
+ header: r,
1819
+ body: l,
1820
1820
  footer: i,
1821
- ...l
1821
+ ...o
1822
1822
  }) => {
1823
- const n = N((m) => {
1824
- var y;
1825
- return (y = m[e]) == null ? void 0 : y.isDrawerOpen;
1826
- }), d = N((m) => {
1827
- var y;
1828
- return (y = m[e]) == null ? void 0 : y.isLoading;
1829
- }), r = n && !d, _ = {
1830
- ...l,
1831
- isOpen: r,
1823
+ const n = v((x) => {
1824
+ var m;
1825
+ return (m = x[e]) == null ? void 0 : m.isDrawerOpen;
1826
+ }), d = v((x) => {
1827
+ var m;
1828
+ return (m = x[e]) == null ? void 0 : m.isLoading;
1829
+ }), a = n && !d, u = {
1830
+ ...o,
1831
+ isOpen: a,
1832
1832
  children: null
1833
- }, h = q(() => {
1834
- Ce(e), W(e, !1);
1835
- }, [e]), f = Array.isArray(a) ? E(e, t, a) : a ? /* @__PURE__ */ o.jsx(We, { type: "h2", children: a }) : void 0, u = E(e, t, c), g = i ? E(e, t, i) : void 0;
1836
- return /* @__PURE__ */ o.jsx(
1837
- Ct,
1833
+ }, h = R(() => {
1834
+ je(e), W(e, !1);
1835
+ }, [e]), _ = Array.isArray(r) ? O(e, t, r) : r ? /* @__PURE__ */ c.jsx(ze, { type: "h2", children: r }) : void 0, f = O(e, t, l), g = i ? O(e, t, i) : void 0;
1836
+ return /* @__PURE__ */ c.jsx(
1837
+ bt,
1838
1838
  {
1839
- ..._,
1840
- className: ge.drawer,
1841
- isOpen: r,
1839
+ ...u,
1840
+ className: ye.drawer,
1841
+ isOpen: a,
1842
1842
  onClose: h,
1843
1843
  heightGap: 0,
1844
- title: f ? /* @__PURE__ */ o.jsx(o.Fragment, { children: Array.isArray(f) ? f.map((m, y) => /* @__PURE__ */ o.jsx(k, { children: m }, `drawer-header-${y}`)) : f }) : void 0,
1845
- children: /* @__PURE__ */ o.jsx("section", { className: ge.drawerBody, children: u.map((m, y) => /* @__PURE__ */ o.jsx(k, { children: m }, `drawer-body-${y}`)) }),
1846
- footer: g ? /* @__PURE__ */ o.jsx("div", { className: ge.drawerFooter, children: g.map((m, y) => /* @__PURE__ */ o.jsx(k, { children: m }, `drawer-footer-${y}`)) }) : void 0
1844
+ title: _ ? /* @__PURE__ */ c.jsx(c.Fragment, { children: Array.isArray(_) ? _.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-header-${m}`)) : _ }) : void 0,
1845
+ children: /* @__PURE__ */ c.jsx("section", { className: ye.drawerBody, children: f.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-body-${m}`)) }),
1846
+ footer: g ? /* @__PURE__ */ c.jsx("div", { className: ye.drawerFooter, children: g.map((x, m) => /* @__PURE__ */ c.jsx(T, { children: x }, `drawer-footer-${m}`)) }) : void 0
1847
1847
  }
1848
1848
  );
1849
- }, Ls = (e) => {
1849
+ }, Ds = (e) => {
1850
1850
  const {
1851
1851
  userFlow: t,
1852
1852
  pageId: s,
1853
- component: a,
1854
- hash: c,
1853
+ component: r,
1854
+ hash: l,
1855
1855
  responseKey: i,
1856
- content: l,
1856
+ content: o,
1857
1857
  items: n,
1858
1858
  disabled: d,
1859
- variant: r,
1860
- leftIcon: _,
1859
+ variant: a,
1860
+ leftIcon: u,
1861
1861
  rightIcon: h
1862
- } = e, f = Ne(t, s), u = O(
1862
+ } = e, _ = we(t, s), f = A(
1863
1863
  () => n.map((g) => ({
1864
1864
  label: g.content ?? g.label ?? "",
1865
1865
  onClick: () => {
1866
- f({
1866
+ _({
1867
1867
  responseKey: g.responseKey,
1868
1868
  actionType: g.actionType,
1869
1869
  dataSource: g.dataSource,
@@ -1872,26 +1872,26 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
1872
1872
  });
1873
1873
  }
1874
1874
  })),
1875
- [n, f]
1875
+ [n, _]
1876
1876
  );
1877
- return /* @__PURE__ */ o.jsx(
1878
- Nt,
1877
+ return /* @__PURE__ */ c.jsx(
1878
+ jt,
1879
1879
  {
1880
1880
  disabled: d,
1881
- variant: r,
1882
- items: u,
1883
- children: /* @__PURE__ */ o.jsxs(k, { children: [
1884
- _ ? /* @__PURE__ */ o.jsx(
1885
- $e,
1881
+ variant: a,
1882
+ items: f,
1883
+ children: /* @__PURE__ */ c.jsxs(T, { children: [
1884
+ u ? /* @__PURE__ */ c.jsx(
1885
+ Ee,
1886
1886
  {
1887
- name: _,
1887
+ name: u,
1888
1888
  size: "md",
1889
1889
  style: { marginRight: 8, verticalAlign: "middle" }
1890
1890
  }
1891
1891
  ) : null,
1892
- l,
1893
- h ? /* @__PURE__ */ o.jsx(
1894
- $e,
1892
+ o,
1893
+ h ? /* @__PURE__ */ c.jsx(
1894
+ Ee,
1895
1895
  {
1896
1896
  name: h,
1897
1897
  size: "md",
@@ -1901,91 +1901,91 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
1901
1901
  ] })
1902
1902
  }
1903
1903
  );
1904
- }, Is = "_header_g1eri_1", Bs = "_header_content_g1eri_5", ze = {
1905
- header: Is,
1906
- header_content: Bs
1907
- }, Gs = ({ components: e = [] }) => /* @__PURE__ */ o.jsx("section", { className: F(ze.header, "avocado-dark-theme"), children: /* @__PURE__ */ o.jsx("div", { className: ze.header_content, children: e.map((t, s) => /* @__PURE__ */ o.jsx(k, { children: t }, s)) }) }), Ks = (e) => {
1904
+ }, Rs = "_header_g1eri_1", Ls = "_header_content_g1eri_5", Ge = {
1905
+ header: Rs,
1906
+ header_content: Ls
1907
+ }, Is = ({ components: e = [] }) => /* @__PURE__ */ c.jsx("section", { className: F(Ge.header, "avocado-dark-theme"), children: /* @__PURE__ */ c.jsx("div", { className: Ge.header_content, children: e.map((t, s) => /* @__PURE__ */ c.jsx(T, { children: t }, s)) }) }), Bs = (e) => {
1908
1908
  const {
1909
1909
  userFlow: t,
1910
1910
  pageId: s,
1911
- responseKey: a,
1912
- actionType: c,
1911
+ responseKey: r,
1912
+ actionType: l,
1913
1913
  content: i,
1914
- redirectUrl: l,
1914
+ redirectUrl: o,
1915
1915
  target: n,
1916
1916
  dependencies: d,
1917
- component: r,
1918
- hash: _,
1917
+ component: a,
1918
+ hash: u,
1919
1919
  ...h
1920
- } = e, { getNextUI: f } = G(), { disabled: u } = I(
1920
+ } = e, { getNextUI: _ } = K(), { disabled: f } = I(
1921
1921
  t,
1922
1922
  d
1923
- ), g = c && h ? (() => {
1924
- const { href: x, target: b, download: p, ...w } = h;
1925
- return w;
1926
- })() : h, m = q(async () => {
1927
- var x;
1928
- if (c)
1923
+ ), g = l && h ? (() => {
1924
+ const { href: y, target: p, download: b, ...C } = h;
1925
+ return C;
1926
+ })() : h, x = R(async () => {
1927
+ var y;
1928
+ if (l)
1929
1929
  try {
1930
- const b = {
1931
- ...(x = N.getState()[t]) == null ? void 0 : x.entries,
1932
- [a]: { status: 200 }
1930
+ const p = {
1931
+ ...(y = v.getState()[t]) == null ? void 0 : y.entries,
1932
+ [r]: { status: 200 }
1933
1933
  };
1934
- switch (D(t, b), c) {
1934
+ switch (q(t, p), l) {
1935
1935
  case "GO_TO_NEXT_UI": {
1936
- const p = await f(
1936
+ const b = await _(
1937
1937
  t,
1938
1938
  s,
1939
- b,
1940
- a
1939
+ p,
1940
+ r
1941
1941
  );
1942
- p != null && p.data && $(t, p == null ? void 0 : p.data);
1942
+ b != null && b.data && $(t, b == null ? void 0 : b.data);
1943
1943
  break;
1944
1944
  }
1945
1945
  case "REDIRECT":
1946
- if (!l) {
1946
+ if (!o) {
1947
1947
  console.warn("Missing redirectUrl for REDIRECT actionType");
1948
1948
  break;
1949
1949
  }
1950
- n === "_blank" ? window.open(l, "_blank", "noopener,noreferrer") : window.location.assign(l);
1950
+ n === "_blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.assign(o);
1951
1951
  break;
1952
1952
  default:
1953
- console.warn(`Unhandled actionType for link: ${c}`);
1953
+ console.warn(`Unhandled actionType for link: ${l}`);
1954
1954
  break;
1955
1955
  }
1956
- } catch (b) {
1957
- alert(JSON.stringify(b));
1956
+ } catch (p) {
1957
+ alert(JSON.stringify(p));
1958
1958
  }
1959
- }, [c, f, s, l, a, n, t]), y = g.disabled ?? u;
1960
- return /* @__PURE__ */ o.jsx(
1961
- vt,
1959
+ }, [l, _, s, o, r, n, t]), m = g.disabled ?? f;
1960
+ return /* @__PURE__ */ c.jsx(
1961
+ wt,
1962
1962
  {
1963
1963
  ...g,
1964
- disabled: y,
1965
- onClick: c ? m : void 0,
1964
+ disabled: m,
1965
+ onClick: l ? x : void 0,
1966
1966
  children: i
1967
1967
  }
1968
1968
  );
1969
- }, Ms = (e) => {
1969
+ }, Ks = (e) => {
1970
1970
  const {
1971
1971
  userFlow: t,
1972
1972
  pageId: s,
1973
- component: a,
1974
- hash: c,
1973
+ component: r,
1974
+ hash: l,
1975
1975
  responseKey: i,
1976
- items: l,
1976
+ items: o,
1977
1977
  closeOnClick: n,
1978
1978
  disabled: d,
1979
- listOrigin: r,
1980
- size: _,
1979
+ listOrigin: a,
1980
+ size: u,
1981
1981
  variant: h
1982
- } = e, f = Ne(t, s), u = O(
1983
- () => l.map((g) => ({
1982
+ } = e, _ = we(t, s), f = A(
1983
+ () => o.map((g) => ({
1984
1984
  icon: g.leftIcon,
1985
1985
  label: g.content ?? g.label ?? "",
1986
- onClick: (m) => {
1987
- var y;
1988
- (y = m == null ? void 0 : m.preventDefault) == null || y.call(m), f({
1986
+ onClick: (x) => {
1987
+ var m;
1988
+ (m = x == null ? void 0 : x.preventDefault) == null || m.call(x), _({
1989
1989
  responseKey: g.responseKey,
1990
1990
  actionType: g.actionType,
1991
1991
  dataSource: g.dataSource,
@@ -1994,73 +1994,73 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
1994
1994
  });
1995
1995
  }
1996
1996
  })),
1997
- [l, f]
1997
+ [o, _]
1998
1998
  );
1999
- return /* @__PURE__ */ o.jsx(
2000
- St,
1999
+ return /* @__PURE__ */ c.jsx(
2000
+ Ct,
2001
2001
  {
2002
- items: u,
2002
+ items: f,
2003
2003
  closeOnClick: n,
2004
2004
  disabled: d,
2005
- listOrigin: r,
2006
- size: _,
2005
+ listOrigin: a,
2006
+ size: u,
2007
2007
  variant: h
2008
2008
  }
2009
2009
  );
2010
- }, Us = "_modalContent_p06ci_1", Vs = {
2011
- modalContent: Us
2012
- }, zs = ({
2010
+ }, Gs = "_modalContent_p06ci_1", Ms = {
2011
+ modalContent: Gs
2012
+ }, Us = ({
2013
2013
  userFlow: e,
2014
2014
  pageId: t,
2015
2015
  responseKey: s,
2016
- header: a,
2017
- body: c,
2016
+ header: r,
2017
+ body: l,
2018
2018
  footer: i,
2019
- headerStatusColor: l,
2019
+ headerStatusColor: o,
2020
2020
  ...n
2021
2021
  }) => {
2022
- const d = N((x) => {
2023
- var b;
2024
- return (b = x[e]) == null ? void 0 : b.isModalOpen;
2025
- }), r = N((x) => {
2026
- var b;
2027
- return (b = x[e]) == null ? void 0 : b.isLoading;
2028
- }), _ = d && !r, h = {
2022
+ const d = v((y) => {
2023
+ var p;
2024
+ return (p = y[e]) == null ? void 0 : p.isModalOpen;
2025
+ }), a = v((y) => {
2026
+ var p;
2027
+ return (p = y[e]) == null ? void 0 : p.isLoading;
2028
+ }), u = d && !a, h = {
2029
2029
  ...n
2030
- }, f = (h == null ? void 0 : h.headerStatusColor) ?? l, u = q(() => {
2031
- Ce(e), le(e, !1);
2032
- }, [e, s]), g = Array.isArray(a) ? E(e, t, a) : a, m = E(e, t, c), y = E(e, t, i);
2033
- return /* @__PURE__ */ o.jsx(
2034
- kt,
2030
+ }, _ = (h == null ? void 0 : h.headerStatusColor) ?? o, f = R(() => {
2031
+ je(e), ce(e, !1);
2032
+ }, [e, s]), g = Array.isArray(r) ? O(e, t, r) : r, x = O(e, t, l), m = O(e, t, i);
2033
+ return /* @__PURE__ */ c.jsx(
2034
+ Nt,
2035
2035
  {
2036
2036
  ...h,
2037
- headerStatusColor: f,
2038
- header: typeof g == "string" ? g : /* @__PURE__ */ o.jsx(o.Fragment, { children: g.map((x, b) => /* @__PURE__ */ o.jsx(k, { children: x }, `modal-header-${b}`)) }),
2039
- children: /* @__PURE__ */ o.jsx("section", { className: Vs.modalContent, children: m.map((x, b) => /* @__PURE__ */ o.jsx(k, { children: x }, `modal-body-${b}`)) }),
2040
- actions: /* @__PURE__ */ o.jsx(o.Fragment, { children: y.map((x, b) => /* @__PURE__ */ o.jsx(k, { children: x }, `modal-footer-${b}`)) }),
2041
- open: _,
2042
- onClose: u
2037
+ headerStatusColor: _,
2038
+ header: typeof g == "string" ? g : /* @__PURE__ */ c.jsx(c.Fragment, { children: g.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-header-${p}`)) }),
2039
+ children: /* @__PURE__ */ c.jsx("section", { className: Ms.modalContent, children: x.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-body-${p}`)) }),
2040
+ actions: /* @__PURE__ */ c.jsx(c.Fragment, { children: m.map((y, p) => /* @__PURE__ */ c.jsx(T, { children: y }, `modal-footer-${p}`)) }),
2041
+ open: u,
2042
+ onClose: f
2043
2043
  }
2044
2044
  );
2045
- }, Hs = ({ userFlow: e, pageId: t }) => {
2046
- var i, l;
2047
- const s = cn(e);
2045
+ }, Vs = ({ userFlow: e, pageId: t }) => {
2046
+ var i, o;
2047
+ const s = rn(e);
2048
2048
  if (!s)
2049
2049
  return null;
2050
- const a = [
2050
+ const r = [
2051
2051
  ...(s == null ? void 0 : s.components) || [],
2052
2052
  ...((i = s == null ? void 0 : s.header) == null ? void 0 : i.components) || [],
2053
- ...((l = s == null ? void 0 : s.body) == null ? void 0 : l.components) || []
2054
- ], c = E(
2053
+ ...((o = s == null ? void 0 : s.body) == null ? void 0 : o.components) || []
2054
+ ], l = O(
2055
2055
  e,
2056
2056
  t,
2057
- a
2057
+ r
2058
2058
  );
2059
- return /* @__PURE__ */ o.jsx(o.Fragment, { children: c == null ? void 0 : c.map((n, d) => {
2060
- const r = `overlay-${d}-${s == null ? void 0 : s.hash}`;
2061
- return /* @__PURE__ */ o.jsx(k, { children: n }, r);
2059
+ return /* @__PURE__ */ c.jsx(c.Fragment, { children: l == null ? void 0 : l.map((n, d) => {
2060
+ const a = `overlay-${d}-${s == null ? void 0 : s.hash}`;
2061
+ return /* @__PURE__ */ c.jsx(T, { children: n }, a);
2062
2062
  }) });
2063
- }, Xs = {
2063
+ }, zs = {
2064
2064
  success: {
2065
2065
  color: "success-opacity",
2066
2066
  textColor: "success-60",
@@ -2086,64 +2086,64 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
2086
2086
  textColor: "neutral-70",
2087
2087
  iconColor: "neutral-70"
2088
2088
  }
2089
- }, Js = (e) => {
2090
- const { content: t, variant: s = "neutral", ...a } = e, c = Xs[s], i = {
2091
- ...a,
2089
+ }, Hs = (e) => {
2090
+ const { content: t, variant: s = "neutral", ...r } = e, l = zs[s], i = {
2091
+ ...r,
2092
2092
  children: t,
2093
- color: (a == null ? void 0 : a.color) ?? c.color,
2094
- textColor: (a == null ? void 0 : a.textColor) ?? c.textColor,
2095
- iconColor: (a == null ? void 0 : a.iconColor) ?? c.iconColor
2093
+ color: (r == null ? void 0 : r.color) ?? l.color,
2094
+ textColor: (r == null ? void 0 : r.textColor) ?? l.textColor,
2095
+ iconColor: (r == null ? void 0 : r.iconColor) ?? l.iconColor
2096
2096
  };
2097
- return /* @__PURE__ */ o.jsx(be, { ...i });
2098
- }, Ws = (e) => {
2097
+ return /* @__PURE__ */ c.jsx(me, { ...i });
2098
+ }, Xs = (e) => {
2099
2099
  const { content: t } = e;
2100
- return /* @__PURE__ */ o.jsx(Ye, { children: t });
2101
- }, Qs = (e) => {
2100
+ return /* @__PURE__ */ c.jsx(Xe, { children: t });
2101
+ }, Js = (e) => {
2102
2102
  const {
2103
2103
  userFlow: t,
2104
2104
  pageId: s,
2105
- responseKey: a,
2106
- actionType: c,
2105
+ responseKey: r,
2106
+ actionType: l,
2107
2107
  dataSource: i,
2108
- dependencies: l,
2108
+ dependencies: o,
2109
2109
  onClick: n,
2110
2110
  ...d
2111
- } = e, { getNextUI: r, fetchAndGetNextUI: _ } = G(), { disabled: h } = I(
2111
+ } = e, { getNextUI: a, fetchAndGetNextUI: u } = K(), { disabled: h } = I(
2112
2112
  t,
2113
- l
2114
- ), f = {
2113
+ o
2114
+ ), _ = {
2115
2115
  ...d
2116
- }, u = (f == null ? void 0 : f.disabled) ?? h, g = q(async () => {
2117
- var m;
2116
+ }, f = (_ == null ? void 0 : _.disabled) ?? h, g = R(async () => {
2117
+ var x;
2118
2118
  try {
2119
- const y = {
2120
- ...(m = N.getState()[t]) == null ? void 0 : m.entries,
2121
- [a]: { status: 200 }
2119
+ const m = {
2120
+ ...(x = v.getState()[t]) == null ? void 0 : x.entries,
2121
+ [r]: { status: 200 }
2122
2122
  };
2123
- switch (D(t, y), c) {
2123
+ switch (q(t, m), l) {
2124
2124
  case "GO_TO_NEXT_UI": {
2125
- const x = await r(
2125
+ const y = await a(
2126
2126
  t,
2127
2127
  s,
2128
- y,
2129
- a
2128
+ m,
2129
+ r
2130
2130
  );
2131
- x != null && x.data && $(t, x == null ? void 0 : x.data);
2131
+ y != null && y.data && $(t, y == null ? void 0 : y.data);
2132
2132
  break;
2133
2133
  }
2134
2134
  case "FETCH_AND_GO_TO_NEXT_UI": {
2135
- const x = await _(
2135
+ const y = await u(
2136
2136
  t,
2137
2137
  s,
2138
- y,
2139
- a,
2138
+ m,
2139
+ r,
2140
2140
  i
2141
2141
  );
2142
- x != null && x.data && $(t, x == null ? void 0 : x.data);
2142
+ y != null && y.data && $(t, y == null ? void 0 : y.data);
2143
2143
  break;
2144
2144
  }
2145
2145
  case "CLOSE_MODAL":
2146
- le(t, !1);
2146
+ ce(t, !1);
2147
2147
  break;
2148
2148
  case "CLOSE_DRAWER":
2149
2149
  W(t, !1);
@@ -2152,23 +2152,23 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
2152
2152
  W(t, !0);
2153
2153
  break;
2154
2154
  default:
2155
- console.warn(`Unhandled actionType: ${c}`);
2155
+ console.warn(`Unhandled actionType: ${l}`);
2156
2156
  break;
2157
2157
  }
2158
- } catch (y) {
2159
- alert(JSON.stringify(y));
2158
+ } catch (m) {
2159
+ alert(JSON.stringify(m));
2160
2160
  }
2161
- }, [c, i, s, a, t]);
2162
- return /* @__PURE__ */ o.jsx(
2163
- Et,
2161
+ }, [l, i, s, r, t]);
2162
+ return /* @__PURE__ */ c.jsx(
2163
+ vt,
2164
2164
  {
2165
- ...f,
2166
- disabled: u,
2167
- onClick: () => !u && (n ?? g)()
2165
+ ..._,
2166
+ disabled: f,
2167
+ onClick: () => !f && (n ?? g)()
2168
2168
  }
2169
2169
  );
2170
- }, Ys = "_row_1bqj4_1", Zs = "_row_column_1bqj4_65", H = {
2171
- row: Ys,
2170
+ }, Ws = "_row_1bqj4_1", Qs = "_row_column_1bqj4_65", X = {
2171
+ row: Ws,
2172
2172
  "row__gap-none": "_row__gap-none_1bqj4_5",
2173
2173
  "row__gap-xxs": "_row__gap-xxs_1bqj4_8",
2174
2174
  "row__gap-xs": "_row__gap-xs_1bqj4_11",
@@ -2189,7 +2189,7 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
2189
2189
  "row__align-center": "_row__align-center_1bqj4_56",
2190
2190
  "row__align-stretch": "_row__align-stretch_1bqj4_59",
2191
2191
  "row__align-baseline": "_row__align-baseline_1bqj4_62",
2192
- row_column: Zs,
2192
+ row_column: Qs,
2193
2193
  "row_column__gap-none": "_row_column__gap-none_1bqj4_72",
2194
2194
  "row_column__gap-xxs": "_row_column__gap-xxs_1bqj4_75",
2195
2195
  "row_column__gap-xs": "_row_column__gap-xs_1bqj4_78",
@@ -2210,689 +2210,683 @@ const fs = "_chartScrollViewport_sm5hx_1", ys = "_chartScrollViewport_track_sm5h
2210
2210
  "row_column__align-center": "_row_column__align-center_1bqj4_123",
2211
2211
  "row_column__align-stretch": "_row_column__align-stretch_1bqj4_126",
2212
2212
  "row_column__align-baseline": "_row_column__align-baseline_1bqj4_129"
2213
- }, Ps = (e) => {
2213
+ }, Ys = (e) => {
2214
2214
  const {
2215
2215
  userFlow: t,
2216
2216
  pageId: s,
2217
- columnWidth: a,
2218
- columns: c,
2217
+ columnWidth: r,
2218
+ columns: l,
2219
2219
  gap: i = "md",
2220
- justifyContent: l = "start",
2220
+ justifyContent: o = "start",
2221
2221
  alignItems: n = "stretch"
2222
- } = e, d = Array.isArray(c) ? c.map((r, _) => {
2223
- const h = `col_${_}`, f = `col_${_}`;
2224
- if (Array.isArray(r))
2222
+ } = e, d = Array.isArray(l) ? l.map((a, u) => {
2223
+ const h = `col_${u}`, _ = `col_${u}`;
2224
+ if (Array.isArray(a))
2225
2225
  return {
2226
2226
  gap: "md",
2227
2227
  justifyContent: "start",
2228
2228
  alignItems: "start",
2229
- items: r,
2229
+ items: a,
2230
2230
  hash: h,
2231
- responseKey: f
2231
+ responseKey: _
2232
2232
  };
2233
- const u = r;
2233
+ const f = a;
2234
2234
  return {
2235
- gap: (u == null ? void 0 : u.gap) ?? "md",
2236
- justifyContent: (u == null ? void 0 : u.justifyContent) ?? "start",
2237
- alignItems: (u == null ? void 0 : u.alignItems) ?? "start",
2238
- items: (u == null ? void 0 : u.items) ?? [],
2239
- hash: (u == null ? void 0 : u.hash) ?? h,
2240
- responseKey: (u == null ? void 0 : u.responseKey) ?? f
2235
+ gap: (f == null ? void 0 : f.gap) ?? "md",
2236
+ justifyContent: (f == null ? void 0 : f.justifyContent) ?? "start",
2237
+ alignItems: (f == null ? void 0 : f.alignItems) ?? "start",
2238
+ items: (f == null ? void 0 : f.items) ?? [],
2239
+ hash: (f == null ? void 0 : f.hash) ?? h,
2240
+ responseKey: (f == null ? void 0 : f.responseKey) ?? _
2241
2241
  };
2242
2242
  }) : [];
2243
- return d.length === 0 ? null : /* @__PURE__ */ o.jsx(
2243
+ return d.length === 0 ? null : /* @__PURE__ */ c.jsx(
2244
2244
  "div",
2245
2245
  {
2246
2246
  className: F(
2247
- H.row,
2248
- H[`row__gap-${i}`],
2249
- H[`row__justify-${l}`],
2250
- H[`row__align-${n}`]
2247
+ X.row,
2248
+ X[`row__gap-${i}`],
2249
+ X[`row__justify-${o}`],
2250
+ X[`row__align-${n}`]
2251
2251
  ),
2252
- children: d == null ? void 0 : d.map((r, _) => {
2253
- const h = (a == null ? void 0 : a[_]) || `${100 / d.length}%`, f = E(t, s, r.items);
2254
- return !f || f.length === 0 ? null : /* @__PURE__ */ o.jsx(
2252
+ children: d == null ? void 0 : d.map((a, u) => {
2253
+ const h = (r == null ? void 0 : r[u]) || `${100 / d.length}%`, _ = O(t, s, a.items);
2254
+ return !_ || _.length === 0 ? null : /* @__PURE__ */ c.jsx(
2255
2255
  "div",
2256
2256
  {
2257
2257
  className: F(
2258
- H.row_column,
2259
- H[`row_column__gap-${r.gap}`],
2260
- H[`row_column__justify-${r.justifyContent}`],
2261
- H[`row_column__align-${r.alignItems}`]
2258
+ X.row_column,
2259
+ X[`row_column__gap-${a.gap}`],
2260
+ X[`row_column__justify-${a.justifyContent}`],
2261
+ X[`row_column__align-${a.alignItems}`]
2262
2262
  ),
2263
2263
  style: { width: h },
2264
- children: f
2264
+ children: _
2265
2265
  },
2266
- r.hash || _
2266
+ a.hash || u
2267
2267
  );
2268
2268
  })
2269
2269
  }
2270
2270
  );
2271
2271
  };
2272
- function at({
2272
+ function et({
2273
2273
  userFlow: e,
2274
2274
  pageId: t,
2275
2275
  responseKey: s,
2276
- actionType: a,
2277
- getNextUI: c,
2276
+ actionType: r,
2277
+ getNextUI: l,
2278
2278
  isMulti: i = !1,
2279
- debounceMs: l
2279
+ debounceMs: o
2280
2280
  }) {
2281
- const n = je(null);
2282
- U(() => () => {
2281
+ const n = ge(null);
2282
+ V(() => () => {
2283
2283
  n.current !== null && (clearTimeout(n.current), n.current = null);
2284
2284
  }, []);
2285
- const d = q(
2286
- async (_) => {
2287
- var u;
2285
+ const d = R(
2286
+ async (u) => {
2287
+ var f;
2288
2288
  const h = {
2289
- ...(u = N.getState()[e]) == null ? void 0 : u.entries
2289
+ ...(f = v.getState()[e]) == null ? void 0 : f.entries
2290
2290
  };
2291
- if (_ ? (h[s] = _, D(e, h)) : (delete h[s], ln(e, s)), a && (a === "GO_TO_NEXT_UI" || a === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
2291
+ if (u ? (h[s] = u, q(e, h)) : (delete h[s], on(e, s)), r && (r === "GO_TO_NEXT_UI" || r === "GO_TO_NEXT_UI_WITHOUT_LOADING"))
2292
2292
  try {
2293
- const m = await c(
2293
+ const x = await l(
2294
2294
  e,
2295
2295
  t,
2296
2296
  h,
2297
2297
  s,
2298
- a === "GO_TO_NEXT_UI"
2298
+ r === "GO_TO_NEXT_UI"
2299
2299
  );
2300
- m != null && m.data && $(e, m.data);
2300
+ x != null && x.data && $(e, x.data);
2301
2301
  } catch (g) {
2302
2302
  console.error("[useSelectChange] Failed to fetch next UI", g);
2303
2303
  }
2304
2304
  },
2305
- [e, t, s, a, c]
2305
+ [e, t, s, r, l]
2306
2306
  );
2307
- return q(
2308
- (_) => {
2307
+ return R(
2308
+ (u) => {
2309
2309
  if (!i) {
2310
- d(_);
2310
+ d(u);
2311
2311
  return;
2312
2312
  }
2313
- if (l == null) {
2314
- d(_);
2313
+ if (o == null) {
2314
+ d(u);
2315
2315
  return;
2316
2316
  }
2317
2317
  n.current !== null && (clearTimeout(n.current), n.current = null), n.current = setTimeout(() => {
2318
- d(_), n.current = null;
2319
- }, l);
2318
+ d(u), n.current = null;
2319
+ }, o);
2320
2320
  },
2321
- [i, l, d]
2321
+ [i, o, d]
2322
2322
  );
2323
2323
  }
2324
- const Fs = /\{([^}]+)\}/g, ea = (e, t) => {
2324
+ const Zs = /\{([^}]+)\}/g, Fs = (e, t) => {
2325
2325
  var s;
2326
- return t.includes("{") ? t.replace(Fs, (a, c) => {
2327
- var l;
2328
- const i = (l = B.query(e, c.trim())) == null ? void 0 : l[0];
2326
+ return t.includes("{") ? t.replace(Zs, (r, l) => {
2327
+ var o;
2328
+ const i = (o = B.query(e, l.trim())) == null ? void 0 : o[0];
2329
2329
  return i != null ? String(i) : "";
2330
2330
  }) : (s = B.query(e, t)) == null ? void 0 : s[0];
2331
- }, ta = (e, t, s, a) => {
2332
- const c = B.query(e, t);
2333
- return (c == null ? void 0 : c.map((i) => {
2331
+ }, Ps = (e, t, s, r) => {
2332
+ const l = B.query(e, t);
2333
+ return (l == null ? void 0 : l.map((i) => {
2334
2334
  var d;
2335
- const l = ea(i, s), n = a ? (d = B.query(i, a)) == null ? void 0 : d[0] : i;
2336
- return { label: l, value: n };
2335
+ const o = Fs(i, s), n = r ? (d = B.query(i, r)) == null ? void 0 : d[0] : i;
2336
+ return { label: o, value: n };
2337
2337
  })) ?? [];
2338
- }, na = (e, t, s, a = 10) => {
2338
+ }, ea = (e, t, s, r = 10) => {
2339
2339
  var n, d;
2340
- let c, i;
2340
+ let l, i;
2341
2341
  if (s) {
2342
- const r = B.value(e, s.size ?? "$.meta.size") ?? a, _ = B.value(e, s.total ?? "$.meta.total") ?? 0;
2343
- c = r, i = _;
2342
+ const a = B.value(e, s.size ?? "$.meta.size") ?? r, u = B.value(e, s.total ?? "$.meta.total") ?? 0;
2343
+ l = a, i = u;
2344
2344
  } else {
2345
- const r = e == null ? void 0 : e.meta;
2346
- c = (r == null ? void 0 : r.size) ?? ((n = r == null ? void 0 : r.page) == null ? void 0 : n.size) ?? a, i = (r == null ? void 0 : r.total) ?? ((d = r == null ? void 0 : r.page) == null ? void 0 : d.total) ?? 0;
2345
+ const a = e == null ? void 0 : e.meta;
2346
+ l = (a == null ? void 0 : a.size) ?? ((n = a == null ? void 0 : a.page) == null ? void 0 : n.size) ?? r, i = (a == null ? void 0 : a.total) ?? ((d = a == null ? void 0 : a.page) == null ? void 0 : d.total) ?? 0;
2347
2347
  }
2348
- const l = i > 0 ? Math.ceil(i / c) > t : !1;
2348
+ const o = i > 0 ? Math.ceil(i / l) > t : !1;
2349
2349
  return {
2350
- pageSize: c,
2350
+ pageSize: l,
2351
2351
  total: i,
2352
- hasMore: l
2352
+ hasMore: o
2353
2353
  };
2354
- }, sa = "_selectNotFront_ch3v5_1", rt = {
2355
- selectNotFront: sa
2356
- }, aa = ({
2354
+ }, ta = "_selectNotFront_ch3v5_1", tt = {
2355
+ selectNotFront: ta
2356
+ }, na = ({
2357
2357
  userFlow: e,
2358
2358
  pageId: t,
2359
2359
  responseKey: s,
2360
- required: a,
2361
- dataSource: c,
2360
+ required: r,
2361
+ dataSource: l,
2362
2362
  actionType: i,
2363
- dependencies: l,
2363
+ dependencies: o,
2364
2364
  debounceMs: n,
2365
2365
  ...d
2366
2366
  }) => {
2367
- const r = {
2367
+ const a = {
2368
2368
  ...d
2369
- }, { getNextUI: _, fetchDataSource: h } = G(), [f, u] = L((r == null ? void 0 : r.value) ?? ""), { disabled: g } = I(
2369
+ }, { getNextUI: u, fetchDataSource: h } = K(), [_, f] = L((a == null ? void 0 : a.value) ?? ""), { disabled: g } = I(
2370
2370
  e,
2371
- l
2372
- ), m = (r == null ? void 0 : r.disabled) ?? g, y = O(() => a && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, a]), x = O(() => {
2373
- const j = r != null && r.isMulti ? f : [f], C = {};
2374
- return Array.isArray(j) && j.forEach((v) => {
2375
- if (!v) return;
2376
- const T = JSON.stringify(v.value), A = JSON.stringify(v.label);
2377
- C[T] = v, A in C || (C[A] = v);
2378
- }), C;
2379
- }, [f]), b = at({
2371
+ o
2372
+ ), x = (a == null ? void 0 : a.disabled) ?? g, m = A(() => r && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, r]), y = A(() => {
2373
+ const j = a != null && a.isMulti ? _ : [_], N = {};
2374
+ return Array.isArray(j) && j.forEach((w) => {
2375
+ if (!w) return;
2376
+ const k = JSON.stringify(w.value), S = JSON.stringify(w.label);
2377
+ N[k] = w, S in N || (N[S] = w);
2378
+ }), N;
2379
+ }, [_]), p = et({
2380
2380
  userFlow: e,
2381
2381
  pageId: t,
2382
2382
  responseKey: s,
2383
2383
  actionType: i,
2384
- getNextUI: _,
2385
- isMulti: r == null ? void 0 : r.isMulti,
2384
+ getNextUI: u,
2385
+ isMulti: a == null ? void 0 : a.isMulti,
2386
2386
  debounceMs: n
2387
- }), p = (j) => {
2388
- u(j), b(j);
2389
- }, w = async (j, C, { page: v }) => {
2387
+ }), b = (j) => {
2388
+ f(j), p(j);
2389
+ }, C = async (j, N, { page: w }) => {
2390
2390
  const {
2391
- jsonPathLabel: T,
2392
- jsonPathOptions: A,
2393
- jsonPathValue: S,
2394
- jsonPathPagination: J
2395
- } = c, K = ve(
2396
- c,
2397
- v,
2391
+ jsonPathLabel: k,
2392
+ jsonPathOptions: S,
2393
+ jsonPathValue: E,
2394
+ jsonPathPagination: G
2395
+ } = l, M = Ce(
2396
+ l,
2397
+ w,
2398
2398
  j
2399
- ), z = await h(
2400
- K,
2399
+ ), H = await h(
2400
+ M,
2401
2401
  e,
2402
2402
  !1
2403
- ), R = z == null ? void 0 : z.data, te = R ? ta(
2404
- R,
2405
- A,
2406
- T,
2407
- S
2408
- ) : [], { hasMore: ue } = na(
2409
- R,
2410
- v,
2411
- J
2403
+ ), D = H == null ? void 0 : H.data, ae = D ? Ps(
2404
+ D,
2405
+ S,
2406
+ k,
2407
+ E
2408
+ ) : [], { hasMore: st } = ea(
2409
+ D,
2410
+ w,
2411
+ G
2412
2412
  );
2413
2413
  return {
2414
- options: te,
2415
- hasMore: ue,
2414
+ options: ae,
2415
+ hasMore: st,
2416
2416
  additional: {
2417
- page: v + 1
2417
+ page: w + 1
2418
2418
  }
2419
2419
  };
2420
2420
  };
2421
- return /* @__PURE__ */ o.jsx(
2422
- Tt,
2421
+ return /* @__PURE__ */ c.jsx(
2422
+ St,
2423
2423
  {
2424
- ...r,
2425
- className: rt.selectNotFront,
2426
- label: y,
2427
- value: f,
2428
- disabled: m,
2429
- noOptionsMessage: () => /* @__PURE__ */ o.jsx(o.Fragment, { children: "Sin opciones" }),
2430
- onChange: (j) => !m && p(j),
2431
- loadOptions: w,
2424
+ ...a,
2425
+ className: tt.selectNotFront,
2426
+ label: m,
2427
+ value: _,
2428
+ disabled: x,
2429
+ noOptionsMessage: () => /* @__PURE__ */ c.jsx(c.Fragment, { children: "Sin opciones" }),
2430
+ onChange: (j) => !x && b(j),
2431
+ loadOptions: C,
2432
2432
  additional: { page: 1 },
2433
2433
  isOptionDisabled: (j) => {
2434
- const C = JSON.stringify(j == null ? void 0 : j.value), v = JSON.stringify(j == null ? void 0 : j.label);
2435
- return !!(x != null && x[C]) || !!(x != null && x[v]);
2434
+ const N = JSON.stringify(j == null ? void 0 : j.value), w = JSON.stringify(j == null ? void 0 : j.label);
2435
+ return !!(y != null && y[N]) || !!(y != null && y[w]);
2436
2436
  },
2437
2437
  debounceTimeout: 350
2438
2438
  }
2439
2439
  );
2440
- }, ra = ({
2440
+ }, sa = ({
2441
2441
  userFlow: e,
2442
2442
  pageId: t,
2443
2443
  responseKey: s,
2444
- dataSource: a,
2445
- required: c,
2444
+ dataSource: r,
2445
+ required: l,
2446
2446
  actionType: i,
2447
- dependencies: l,
2447
+ dependencies: o,
2448
2448
  debounceMs: n,
2449
2449
  ...d
2450
2450
  }) => {
2451
- const r = {
2451
+ const a = {
2452
2452
  ...d
2453
- }, { getNextUI: _ } = G(), [h, f] = L(r.value || ""), { disabled: u } = I(
2453
+ }, { getNextUI: u } = K(), [h, _] = L(a.value || ""), { disabled: f } = I(
2454
2454
  e,
2455
- l
2456
- ), g = (r == null ? void 0 : r.disabled) ?? u, m = O(() => c && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, c]), y = at({
2455
+ o
2456
+ ), g = (a == null ? void 0 : a.disabled) ?? f, x = A(() => l && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, l]), m = et({
2457
2457
  userFlow: e,
2458
2458
  pageId: t,
2459
2459
  responseKey: s,
2460
2460
  actionType: i,
2461
- getNextUI: _,
2462
- isMulti: r == null ? void 0 : r.isMulti,
2461
+ getNextUI: u,
2462
+ isMulti: a == null ? void 0 : a.isMulti,
2463
2463
  debounceMs: n
2464
- }), x = (b) => {
2465
- f(b), y(b);
2464
+ }), y = (p) => {
2465
+ _(p), m(p);
2466
2466
  };
2467
- return /* @__PURE__ */ o.jsx(
2468
- Ot,
2467
+ return /* @__PURE__ */ c.jsx(
2468
+ kt,
2469
2469
  {
2470
- ...r,
2471
- className: rt.selectNotFront,
2472
- label: m,
2470
+ ...a,
2471
+ className: tt.selectNotFront,
2472
+ label: x,
2473
2473
  value: h,
2474
2474
  disabled: g,
2475
- onChange: (b) => !g && x(b)
2475
+ onChange: (p) => !g && y(p)
2476
2476
  }
2477
2477
  );
2478
- }, oa = (e) => {
2478
+ }, aa = (e) => {
2479
2479
  const { dataSource: t } = e;
2480
- return t ? /* @__PURE__ */ o.jsx(aa, { ...e }) : /* @__PURE__ */ o.jsx(ra, { ...e });
2481
- }, ca = "_spacing_19hqa_1", ia = "_spacing__xxs_19hqa_1", la = "_spacing__xs_19hqa_4", da = "_spacing__sm_19hqa_7", _a = "_spacing__md_19hqa_10", ua = "_spacing__lg_19hqa_13", ha = "_spacing__xl_19hqa_16", fa = "_spacing__xxl_19hqa_19", ya = "_spacing__xxxl_19hqa_22", He = {
2482
- spacing: ca,
2483
- spacing__xxs: ia,
2484
- spacing__xs: la,
2485
- spacing__sm: da,
2486
- spacing__md: _a,
2487
- spacing__lg: ua,
2488
- spacing__xl: ha,
2489
- spacing__xxl: fa,
2490
- spacing__xxxl: ya
2491
- }, xa = (e) => {
2492
- const { size: t } = e, s = F(He.spacing, He[`spacing__${t}`]);
2493
- return /* @__PURE__ */ o.jsx("div", { className: s });
2494
- }, ma = (e) => {
2480
+ return t ? /* @__PURE__ */ c.jsx(na, { ...e }) : /* @__PURE__ */ c.jsx(sa, { ...e });
2481
+ }, ra = "_spacing_19hqa_1", oa = "_spacing__xxs_19hqa_1", ca = "_spacing__xs_19hqa_4", ia = "_spacing__sm_19hqa_7", la = "_spacing__md_19hqa_10", da = "_spacing__lg_19hqa_13", _a = "_spacing__xl_19hqa_16", ua = "_spacing__xxl_19hqa_19", ha = "_spacing__xxxl_19hqa_22", Me = {
2482
+ spacing: ra,
2483
+ spacing__xxs: oa,
2484
+ spacing__xs: ca,
2485
+ spacing__sm: ia,
2486
+ spacing__md: la,
2487
+ spacing__lg: da,
2488
+ spacing__xl: _a,
2489
+ spacing__xxl: ua,
2490
+ spacing__xxxl: ha
2491
+ }, fa = (e) => {
2492
+ const { size: t } = e, s = F(Me.spacing, Me[`spacing__${t}`]);
2493
+ return /* @__PURE__ */ c.jsx("div", { className: s });
2494
+ }, ya = (e) => {
2495
2495
  const {
2496
2496
  userFlow: t,
2497
2497
  pageId: s,
2498
- responseKey: a,
2499
- actionType: c,
2498
+ responseKey: r,
2499
+ actionType: l,
2500
2500
  label: i,
2501
- value: l,
2501
+ value: o,
2502
2502
  required: n,
2503
2503
  dependencies: d,
2504
- ...r
2505
- } = e, _ = {
2506
- ...r
2507
- }, { getNextUI: h } = G(), [f, u] = L(l || !1), { disabled: g } = I(
2504
+ ...a
2505
+ } = e, u = {
2506
+ ...a
2507
+ }, { getNextUI: h } = K(), [_, f] = L(o || !1), { disabled: g } = I(
2508
2508
  t,
2509
2509
  d
2510
- ), m = (_ == null ? void 0 : _.disabled) ?? g, y = O(() => n && i ? `${i} *` : i ?? "", [i, n]), x = q(async () => {
2511
- var b;
2510
+ ), x = (u == null ? void 0 : u.disabled) ?? g, m = A(() => n && i ? `${i} *` : i ?? "", [i, n]), y = R(async () => {
2511
+ var p;
2512
2512
  try {
2513
- const p = !f;
2514
- u(p);
2515
- const w = {
2516
- ...(b = N.getState()[t]) == null ? void 0 : b.entries,
2517
- [a]: p
2513
+ const b = !_;
2514
+ f(b);
2515
+ const C = {
2516
+ ...(p = v.getState()[t]) == null ? void 0 : p.entries,
2517
+ [r]: b
2518
2518
  };
2519
- switch (D(t, w), c) {
2519
+ switch (q(t, C), l) {
2520
2520
  case "GO_TO_NEXT_UI":
2521
2521
  case "GO_TO_NEXT_UI_WITHOUT_LOADING": {
2522
- const C = await h(
2522
+ const N = await h(
2523
2523
  t,
2524
2524
  s,
2525
- w,
2526
- a,
2527
- c === "GO_TO_NEXT_UI"
2525
+ C,
2526
+ r,
2527
+ l === "GO_TO_NEXT_UI"
2528
2528
  );
2529
- C != null && C.data && $(t, C == null ? void 0 : C.data);
2529
+ N != null && N.data && $(t, N == null ? void 0 : N.data);
2530
2530
  break;
2531
2531
  }
2532
2532
  default:
2533
2533
  break;
2534
2534
  }
2535
- } catch (p) {
2536
- console.error("Error in switch action:", p), alert(JSON.stringify(p));
2535
+ } catch (b) {
2536
+ console.error("Error in switch action:", b), alert(JSON.stringify(b));
2537
2537
  }
2538
- }, [t, s, a, c, f]);
2539
- return /* @__PURE__ */ o.jsx(
2540
- At,
2538
+ }, [t, s, r, l, _]);
2539
+ return /* @__PURE__ */ c.jsx(
2540
+ Et,
2541
2541
  {
2542
- ..._,
2543
- label: y,
2544
- checked: f,
2545
- disabled: m,
2546
- onChange: () => !m && x()
2542
+ ...u,
2543
+ label: m,
2544
+ checked: _,
2545
+ disabled: x,
2546
+ onChange: () => !x && y()
2547
2547
  }
2548
2548
  );
2549
- }, ga = "_tableSkeleton_3nr9n_1", ba = "_tableArrayPills_3nr9n_7", ot = {
2550
- tableSkeleton: ga,
2551
- tableArrayPills: ba
2552
- }, pa = ({ values: e }) => {
2553
- const s = e == null ? void 0 : e.slice(0, 4), a = (e == null ? void 0 : e.length) - 4;
2554
- return /* @__PURE__ */ o.jsxs("div", { className: ot.tableArrayPills, children: [
2555
- s.map((c, i) => /* @__PURE__ */ o.jsx(be, { children: String(c) }, i)),
2556
- a > 0 && /* @__PURE__ */ o.jsxs(be, { outlined: !0, children: [
2549
+ }, ma = "_tableSkeleton_3nr9n_1", xa = "_tableArrayPills_3nr9n_7", nt = {
2550
+ tableSkeleton: ma,
2551
+ tableArrayPills: xa
2552
+ }, ga = ({ values: e }) => {
2553
+ const s = e == null ? void 0 : e.slice(0, 4), r = (e == null ? void 0 : e.length) - 4;
2554
+ return /* @__PURE__ */ c.jsxs("div", { className: nt.tableArrayPills, children: [
2555
+ s.map((l, i) => /* @__PURE__ */ c.jsx(me, { children: String(l) }, i)),
2556
+ r > 0 && /* @__PURE__ */ c.jsxs(me, { outlined: !0, children: [
2557
2557
  "+",
2558
- a
2558
+ r
2559
2559
  ] })
2560
2560
  ] });
2561
- }, ja = ({
2561
+ }, pa = ({
2562
2562
  userFlow: e,
2563
2563
  pageId: t,
2564
2564
  tableResponseKey: s,
2565
- component: a,
2566
- rowData: c
2565
+ component: r,
2566
+ rowData: l
2567
2567
  }) => {
2568
- const { getNextUI: i, fetchAndGetNextUI: l, fetchDataSource: n } = G(), d = E(e, t, [
2569
- { ...a }
2570
- ]), r = (d == null ? void 0 : d[0]) || null;
2571
- if (!r) return null;
2568
+ const { getNextUI: i, fetchAndGetNextUI: o, fetchDataSource: n } = K(), d = O(e, t, [
2569
+ { ...r }
2570
+ ]), a = (d == null ? void 0 : d[0]) || null;
2571
+ if (!a) return null;
2572
2572
  const {
2573
- actionType: _,
2573
+ actionType: u,
2574
2574
  responseKey: h,
2575
- dataSource: f
2576
- } = r.props, u = q(async () => {
2577
- var g, m, y;
2575
+ dataSource: _
2576
+ } = a.props, f = R(async () => {
2577
+ var g, x, m;
2578
2578
  try {
2579
- const x = {
2580
- ...(g = N.getState()[e]) == null ? void 0 : g.entries,
2579
+ const y = {
2580
+ ...(g = v.getState()[e]) == null ? void 0 : g.entries,
2581
2581
  [h]: { status: 200 },
2582
- [s]: [{ ...c }]
2582
+ [s]: [{ ...l }]
2583
2583
  };
2584
- switch (D(e, x), _) {
2584
+ switch (q(e, y), u) {
2585
2585
  case "GO_TO_NEXT_UI": {
2586
- const b = await i(
2586
+ const p = await i(
2587
2587
  e,
2588
2588
  t,
2589
- x,
2589
+ y,
2590
2590
  h
2591
2591
  );
2592
- b != null && b.data && $(e, b == null ? void 0 : b.data);
2592
+ p != null && p.data && $(e, p == null ? void 0 : p.data);
2593
2593
  break;
2594
2594
  }
2595
2595
  case "FETCH_AND_GO_TO_NEXT_UI": {
2596
- const b = await l(
2596
+ const p = await o(
2597
2597
  e,
2598
2598
  t,
2599
- x,
2599
+ y,
2600
2600
  h,
2601
- f
2601
+ _
2602
2602
  );
2603
- b != null && b.data && $(e, b == null ? void 0 : b.data);
2603
+ p != null && p.data && $(e, p == null ? void 0 : p.data);
2604
2604
  break;
2605
2605
  }
2606
2606
  case "GET_DATA_SOURCE": {
2607
- const b = await i(
2607
+ const p = await i(
2608
2608
  e,
2609
2609
  t,
2610
- x,
2610
+ y,
2611
2611
  h
2612
- ), p = (m = b == null ? void 0 : b.data) == null ? void 0 : m.content;
2613
- if ((p == null ? void 0 : p.type) !== "fetch") break;
2614
- const w = p == null ? void 0 : p.dataSource, j = await n(
2615
- w,
2612
+ ), b = (x = p == null ? void 0 : p.data) == null ? void 0 : x.content;
2613
+ if ((b == null ? void 0 : b.type) !== "fetch") break;
2614
+ const C = b == null ? void 0 : b.dataSource, j = await n(
2615
+ C,
2616
2616
  e,
2617
2617
  // Avoid to handle loading state until all the requests are done
2618
2618
  !1
2619
- ), C = {
2620
- ...(y = N.getState()[e]) == null ? void 0 : y.entries,
2619
+ ), N = {
2620
+ ...(m = v.getState()[e]) == null ? void 0 : m.entries,
2621
2621
  [h]: {
2622
2622
  status: j == null ? void 0 : j.status,
2623
2623
  content: j == null ? void 0 : j.data
2624
2624
  }
2625
2625
  };
2626
- D(e, C);
2627
- const v = await i(
2626
+ q(e, N);
2627
+ const w = await i(
2628
2628
  e,
2629
2629
  t,
2630
- C,
2630
+ N,
2631
2631
  h
2632
2632
  );
2633
- v != null && v.data && $(e, v == null ? void 0 : v.data);
2633
+ w != null && w.data && $(e, w == null ? void 0 : w.data);
2634
2634
  break;
2635
2635
  }
2636
2636
  default:
2637
- console.warn(`Unhandled actionType: ${_}`);
2637
+ console.warn(`Unhandled actionType: ${u}`);
2638
2638
  break;
2639
2639
  }
2640
- } catch (x) {
2641
- alert(JSON.stringify(x));
2640
+ } catch (y) {
2641
+ alert(JSON.stringify(y));
2642
2642
  }
2643
- }, [_, f, t, h, e]);
2644
- return lt(r, {
2645
- onClick: u
2643
+ }, [u, _, t, h, e]);
2644
+ return ot(a, {
2645
+ onClick: f
2646
2646
  });
2647
- }, wa = () => /* @__PURE__ */ o.jsx("div", { className: ot.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ o.jsx(
2648
- Qe,
2647
+ }, ba = () => /* @__PURE__ */ c.jsx("div", { className: nt.tableSkeleton, children: [...Array(10)].map((e, t) => /* @__PURE__ */ c.jsx(
2648
+ He,
2649
2649
  {
2650
2650
  maxWidth: "100%",
2651
2651
  height: 42,
2652
2652
  radius: 8
2653
2653
  },
2654
2654
  `tableSkeletonBase${t}`
2655
- )) }), Ca = (e, t) => !(t != null && t.length) || !e ? e : e.map((s) => t.some(
2656
- (c) => Array.isArray(s != null && s.accessor ? c[s == null ? void 0 : s.accessor] : void 0)
2657
- ) ? {
2658
- ...s,
2659
- renderCell: (c) => {
2660
- const i = s.accessor ? c[s.accessor] : void 0;
2661
- return Array.isArray(i) ? /* @__PURE__ */ o.jsx(pa, { values: i }) : i ?? "";
2662
- }
2663
- } : s), Na = ({
2655
+ )) }), ja = ({
2664
2656
  userFlow: e,
2665
2657
  pageId: t,
2666
2658
  responseKey: s,
2667
- component: a,
2668
- dataSource: c,
2659
+ component: r,
2660
+ dataSource: l,
2669
2661
  rightActions: i,
2670
- data: l,
2671
- ...n
2662
+ ...o
2672
2663
  }) => {
2673
- var v, T, A;
2674
- const { fetchDataSource: d } = G(), [r, _] = L(!1), [h, f] = L(1), [u, g] = L(null), m = !c && Array.isArray(l), y = je(
2664
+ var C, j, N;
2665
+ const { fetchDataSource: n } = K(), [d, a] = L(!1), [u, h] = L(1), [_, f] = L(null), g = ge(
2675
2666
  /* @__PURE__ */ new Map([[1, null]])
2676
- ), x = O(() => {
2667
+ ), x = A(() => {
2677
2668
  if (i != null && i.length)
2678
- return i.map((S, J) => ({
2679
- renderContent: (K) => /* @__PURE__ */ o.jsx(
2680
- ja,
2669
+ return i.map((w, k) => ({
2670
+ renderContent: (S) => /* @__PURE__ */ c.jsx(
2671
+ pa,
2681
2672
  {
2682
2673
  userFlow: e,
2683
2674
  pageId: t,
2684
2675
  tableResponseKey: s,
2685
- component: S,
2686
- rowData: K
2676
+ component: w,
2677
+ rowData: S
2687
2678
  },
2688
- `tableRowAction${J}`
2679
+ `tableRowAction${k}`
2689
2680
  )
2690
2681
  }));
2691
- }, [i, e, t, s]), b = async (S = 1) => {
2692
- if (!c)
2693
- return;
2682
+ }, [i, e, t]), m = async (w = 1) => {
2694
2683
  const {
2695
- mapperData: J,
2696
- jsonPathData: K,
2697
- jsonPathPagination: z,
2698
- jsonPathCursorPagination: R
2699
- } = c;
2700
- if (R && S !== 1 && !y.current.has(S)) {
2701
- f(1), b(1);
2684
+ mapperData: k,
2685
+ jsonPathData: S,
2686
+ jsonPathPagination: E,
2687
+ jsonPathCursorPagination: G
2688
+ } = l;
2689
+ if (G && w !== 1 && !g.current.has(w)) {
2690
+ h(1), m(1);
2702
2691
  return;
2703
2692
  }
2704
- R && S === 1 && (y.current = /* @__PURE__ */ new Map([[1, null]]));
2693
+ G && w === 1 && (g.current = /* @__PURE__ */ new Map([[1, null]]));
2705
2694
  try {
2706
- _(!0);
2707
- const te = R ? y.current.get(S) ?? null : null, ue = ve(
2708
- c,
2709
- S,
2695
+ a(!0);
2696
+ const M = G ? g.current.get(w) ?? null : null, H = Ce(
2697
+ l,
2698
+ w,
2710
2699
  void 0,
2711
- te
2712
- ), Q = await d(
2713
- ue,
2700
+ M
2701
+ ), D = await n(
2702
+ H,
2714
2703
  e,
2715
2704
  !1
2716
2705
  );
2717
- if (g(
2718
- nt(
2719
- Q == null ? void 0 : Q.data,
2720
- K,
2721
- J,
2722
- z
2706
+ if (f(
2707
+ Fe(
2708
+ D == null ? void 0 : D.data,
2709
+ S,
2710
+ k,
2711
+ E
2723
2712
  )
2724
- ), R) {
2725
- const Te = rs(
2726
- Q == null ? void 0 : Q.data,
2727
- R
2713
+ ), G) {
2714
+ const ae = ss(
2715
+ D == null ? void 0 : D.data,
2716
+ G
2728
2717
  );
2729
- Te && y.current.set(S + 1, Te);
2718
+ ae && g.current.set(w + 1, ae);
2730
2719
  }
2731
- _(!1);
2732
- } catch (te) {
2733
- console.error("[TableNotFront] fetchData:", te), _(!1);
2720
+ a(!1);
2721
+ } catch (M) {
2722
+ console.error("[TableNotFront] fetchData:", M), a(!1);
2734
2723
  }
2735
- }, p = (S) => {
2736
- f(S), b(S);
2724
+ }, y = (w) => {
2725
+ h(w), m(w);
2737
2726
  };
2738
- U(() => {
2739
- m || b();
2727
+ V(() => {
2728
+ m();
2740
2729
  }, []);
2741
- const w = m ? l : u == null ? void 0 : u.items, j = O(
2742
- () => Ca(
2743
- n.columns,
2744
- w
2745
- ),
2746
- [w, n.columns]
2747
- ), C = {
2748
- ...n,
2749
- data: w ?? [],
2750
- columns: j ?? [],
2730
+ const p = A(() => !(_ != null && _.items) || !(o != null && o.columns) ? o == null ? void 0 : o.columns : o.columns.map((w) => {
2731
+ var S;
2732
+ return ((S = _ == null ? void 0 : _.items) == null ? void 0 : S.some(
2733
+ (E) => Array.isArray(w != null && w.accessor ? E[w == null ? void 0 : w.accessor] : void 0)
2734
+ )) ? {
2735
+ ...w,
2736
+ renderCell: (E) => {
2737
+ const G = w.accessor ? E[w.accessor] : void 0;
2738
+ return Array.isArray(G) ? /* @__PURE__ */ c.jsx(ga, { values: G }) : G ?? "";
2739
+ }
2740
+ } : w;
2741
+ }), [_ == null ? void 0 : _.items, o == null ? void 0 : o.columns]), b = {
2742
+ ...o,
2743
+ data: _ == null ? void 0 : _.items,
2744
+ columns: p,
2751
2745
  rightActions: x
2752
2746
  };
2753
- return m ? w && w.length > 0 ? /* @__PURE__ */ o.jsx(Oe, { ...C }) : /* @__PURE__ */ o.jsx(oe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: r ? /* @__PURE__ */ o.jsx(wa, {}) : u && ((v = u == null ? void 0 : u.items) == null ? void 0 : v.length) > 0 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2754
- /* @__PURE__ */ o.jsx(Oe, { ...C }),
2755
- (u == null ? void 0 : u.pagination) && ((T = u == null ? void 0 : u.pagination) == null ? void 0 : T.totalPages) > 1 && /* @__PURE__ */ o.jsx(
2756
- $t,
2747
+ return /* @__PURE__ */ c.jsx(c.Fragment, { children: d ? /* @__PURE__ */ c.jsx(ba, {}) : _ && ((C = _ == null ? void 0 : _.items) == null ? void 0 : C.length) > 0 ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2748
+ /* @__PURE__ */ c.jsx(Tt, { ...b }),
2749
+ (_ == null ? void 0 : _.pagination) && ((j = _ == null ? void 0 : _.pagination) == null ? void 0 : j.totalPages) > 1 && /* @__PURE__ */ c.jsx(
2750
+ Ot,
2757
2751
  {
2758
2752
  classname: { global: "row__end" },
2759
- page: h,
2760
- size: u == null ? void 0 : u.pagination.size,
2761
- total: (A = u == null ? void 0 : u.pagination) == null ? void 0 : A.total,
2762
- onChange: p
2753
+ page: u,
2754
+ size: _ == null ? void 0 : _.pagination.size,
2755
+ total: (N = _ == null ? void 0 : _.pagination) == null ? void 0 : N.total,
2756
+ onChange: y
2763
2757
  }
2764
2758
  )
2765
- ] }) : /* @__PURE__ */ o.jsx(oe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
2766
- }, va = "_tabsPanel_kvslb_1", Sa = {
2767
- tabsPanel: va
2768
- }, ka = ({ userFlow: e, pageId: t, components: s }) => {
2769
- const a = E(e, t, s);
2770
- return a != null && a.length ? /* @__PURE__ */ o.jsx("section", { className: Sa.tabsPanel, children: a.map((c, i) => /* @__PURE__ */ o.jsx(k, { children: c }, `tabs-panel-${i}`)) }) : null;
2771
- }, Ea = ({
2759
+ ] }) : /* @__PURE__ */ c.jsx(pe, { state: "info", title: "Sin registros", children: "No hay datos disponibles para mostrar en este momento" }) });
2760
+ }, wa = "_tabsPanel_kvslb_1", Ca = {
2761
+ tabsPanel: wa
2762
+ }, Na = ({ userFlow: e, pageId: t, components: s }) => {
2763
+ const r = O(e, t, s);
2764
+ return r != null && r.length ? /* @__PURE__ */ c.jsx("section", { className: Ca.tabsPanel, children: r.map((l, i) => /* @__PURE__ */ c.jsx(T, { children: l }, `tabs-panel-${i}`)) }) : null;
2765
+ }, va = ({
2772
2766
  userFlow: e,
2773
2767
  pageId: t,
2774
2768
  hash: s,
2775
- items: a,
2776
- activeIndex: c,
2769
+ items: r,
2770
+ activeIndex: l,
2777
2771
  className: i,
2778
- responseKey: l
2772
+ responseKey: o
2779
2773
  }) => {
2780
- const n = a.map((r, _) => ({
2781
- label: r.label,
2782
- disabled: r.disabled,
2783
- children: /* @__PURE__ */ o.jsx(
2784
- ka,
2774
+ const n = r.map((a, u) => ({
2775
+ label: a.label,
2776
+ disabled: a.disabled,
2777
+ children: /* @__PURE__ */ c.jsx(
2778
+ Na,
2785
2779
  {
2786
2780
  userFlow: e,
2787
2781
  pageId: t,
2788
- components: r.components
2782
+ components: a.components
2789
2783
  },
2790
- `${s}-tab-${_}`
2784
+ `${s}-tab-${u}`
2791
2785
  )
2792
- })), d = (r) => {
2786
+ })), d = (a) => {
2793
2787
  var h;
2794
- const _ = {
2795
- ...(h = N.getState()[e]) == null ? void 0 : h.entries,
2796
- [l]: r
2788
+ const u = {
2789
+ ...(h = v.getState()[e]) == null ? void 0 : h.entries,
2790
+ [o]: a
2797
2791
  };
2798
- D(e, _);
2792
+ q(e, u);
2799
2793
  };
2800
- return /* @__PURE__ */ o.jsx(
2801
- Dt,
2794
+ return /* @__PURE__ */ c.jsx(
2795
+ At,
2802
2796
  {
2803
2797
  className: i,
2804
- activeIndex: c,
2798
+ activeIndex: l,
2805
2799
  items: n,
2806
2800
  onClick: d
2807
2801
  }
2808
2802
  );
2809
- }, Ta = (e) => {
2803
+ }, Sa = (e) => {
2810
2804
  const {
2811
2805
  userFlow: t,
2812
2806
  pageId: s,
2813
- component: a,
2814
- hash: c,
2807
+ component: r,
2808
+ hash: l,
2815
2809
  responseKey: i,
2816
- required: l,
2810
+ required: o,
2817
2811
  dependencies: n,
2818
2812
  ...d
2819
- } = e, r = {
2813
+ } = e, a = {
2820
2814
  ...d
2821
- }, [_, h] = L((r == null ? void 0 : r.value) ?? ""), { disabled: f } = I(
2815
+ }, [u, h] = L((a == null ? void 0 : a.value) ?? ""), { disabled: _ } = I(
2822
2816
  t,
2823
2817
  n
2824
- ), u = (r == null ? void 0 : r.disabled) ?? f, g = O(() => l && (r != null && r.label) ? `${r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, l]), m = (y) => {
2825
- var b;
2826
- const x = (b = y == null ? void 0 : y.target) == null ? void 0 : b.value;
2827
- h(x), D(t, { [i]: x });
2818
+ ), f = (a == null ? void 0 : a.disabled) ?? _, g = A(() => o && (a != null && a.label) ? `${a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, o]), x = (m) => {
2819
+ var p;
2820
+ const y = (p = m == null ? void 0 : m.target) == null ? void 0 : p.value;
2821
+ h(y), q(t, { [i]: y });
2828
2822
  };
2829
- return U(() => {
2830
- h((r == null ? void 0 : r.value) ?? "");
2831
- }, [r == null ? void 0 : r.value]), /* @__PURE__ */ o.jsx(
2832
- qt,
2823
+ return V(() => {
2824
+ h((a == null ? void 0 : a.value) ?? "");
2825
+ }, [a == null ? void 0 : a.value]), /* @__PURE__ */ c.jsx(
2826
+ $t,
2833
2827
  {
2834
- ...r,
2828
+ ...a,
2835
2829
  label: g,
2836
- value: _,
2837
- disabled: u,
2838
- onChange: (y) => !u && m(y)
2830
+ value: u,
2831
+ disabled: f,
2832
+ onChange: (m) => !f && x(m)
2839
2833
  }
2840
2834
  );
2841
- }, Oa = "_textFieldNotFront_1n8fy_1", Aa = {
2842
- textFieldNotFront: Oa
2843
- }, $a = (e) => {
2835
+ }, ka = "_textFieldNotFront_1n8fy_1", Ea = {
2836
+ textFieldNotFront: ka
2837
+ }, Ta = (e) => {
2844
2838
  const {
2845
2839
  userFlow: t,
2846
2840
  pageId: s,
2847
- component: a,
2848
- hash: c,
2841
+ component: r,
2842
+ hash: l,
2849
2843
  responseKey: i,
2850
- required: l,
2844
+ required: o,
2851
2845
  dependencies: n,
2852
2846
  ...d
2853
- } = e, r = {
2847
+ } = e, a = {
2854
2848
  ...d
2855
- }, [_, h] = L((r == null ? void 0 : r.value) ?? ""), { disabled: f } = I(
2849
+ }, [u, h] = L((a == null ? void 0 : a.value) ?? ""), { disabled: _ } = I(
2856
2850
  t,
2857
2851
  n
2858
- ), u = (r == null ? void 0 : r.disabled) ?? f, g = O(() => l && (r != null && r.label) ? `${r == null ? void 0 : r.label} *` : (r == null ? void 0 : r.label) ?? "", [r == null ? void 0 : r.label, l]), m = (y) => {
2859
- var p;
2860
- const x = (p = y == null ? void 0 : y.target) == null ? void 0 : p.value;
2861
- h(x);
2862
- const b = {
2863
- [i]: x
2852
+ ), f = (a == null ? void 0 : a.disabled) ?? _, g = A(() => o && (a != null && a.label) ? `${a == null ? void 0 : a.label} *` : (a == null ? void 0 : a.label) ?? "", [a == null ? void 0 : a.label, o]), x = (m) => {
2853
+ var b;
2854
+ const y = (b = m == null ? void 0 : m.target) == null ? void 0 : b.value;
2855
+ h(y);
2856
+ const p = {
2857
+ [i]: y
2864
2858
  };
2865
- D(t, b);
2859
+ q(t, p);
2866
2860
  };
2867
- return U(() => {
2868
- h((r == null ? void 0 : r.value) ?? "");
2869
- }, [r == null ? void 0 : r.value]), /* @__PURE__ */ o.jsx(
2870
- Rt,
2861
+ return V(() => {
2862
+ h((a == null ? void 0 : a.value) ?? "");
2863
+ }, [a == null ? void 0 : a.value]), /* @__PURE__ */ c.jsx(
2864
+ qt,
2871
2865
  {
2872
- ...r,
2873
- className: Aa.textFieldNotFront,
2866
+ ...a,
2867
+ className: Ea.textFieldNotFront,
2874
2868
  allowClear: !1,
2875
2869
  label: g,
2876
- value: _,
2877
- disabled: u,
2878
- onChange: (y) => !u && m(y)
2870
+ value: u,
2871
+ disabled: f,
2872
+ onChange: (m) => !f && x(m)
2879
2873
  }
2880
2874
  );
2881
- }, Da = ({
2875
+ }, Oa = ({
2882
2876
  userFlow: e,
2883
2877
  pageId: t,
2884
2878
  responseKey: s,
2885
- variant: a,
2886
- content: c,
2879
+ variant: r,
2880
+ content: l,
2887
2881
  actionType: i,
2888
- redirectUrl: l
2882
+ redirectUrl: o
2889
2883
  }) => {
2890
- const n = q(async () => {
2891
- Ce(e);
2884
+ const n = R(async () => {
2885
+ je(e);
2892
2886
  try {
2893
2887
  switch (i) {
2894
2888
  case "AUTOCLOSE_AND_REDIRECT":
2895
- window.location.href = l;
2889
+ window.location.href = o;
2896
2890
  break;
2897
2891
  default:
2898
2892
  console.warn(`Unhandled actionType: ${i}`);
@@ -2901,157 +2895,157 @@ const Fs = /\{([^}]+)\}/g, ea = (e, t) => {
2901
2895
  } catch (d) {
2902
2896
  console.error("Error in toast action:", d), alert(JSON.stringify(d));
2903
2897
  }
2904
- }, [i, t, s, e, l]);
2905
- return U(() => {
2898
+ }, [i, t, s, e, o]);
2899
+ return V(() => {
2906
2900
  ({
2907
- info: ne.info,
2908
- error: ne.error,
2909
- success: ne.success,
2910
- warning: ne.warning
2911
- }[a] || ne.info)(c, {
2901
+ info: ee.info,
2902
+ error: ee.error,
2903
+ success: ee.success,
2904
+ warning: ee.warning
2905
+ }[r] || ee.info)(l, {
2912
2906
  autoClose: i ? !1 : 4e3,
2913
2907
  containerId: e,
2914
2908
  onClose: n
2915
2909
  });
2916
2910
  }, [n, e]), null;
2917
- }, qa = "_tooltipNotFront_106iw_1", Ra = "_tooltipNotFront_content_106iw_5", Xe = {
2918
- tooltipNotFront: qa,
2919
- tooltipNotFront_content: Ra
2920
- }, La = (e) => {
2911
+ }, Aa = "_tooltipNotFront_106iw_1", $a = "_tooltipNotFront_content_106iw_5", Ue = {
2912
+ tooltipNotFront: Aa,
2913
+ tooltipNotFront_content: $a
2914
+ }, qa = (e) => {
2921
2915
  const {
2922
2916
  userFlow: t,
2923
2917
  pageId: s,
2924
- component: a,
2925
- hash: c,
2918
+ component: r,
2919
+ hash: l,
2926
2920
  responseKey: i,
2927
- content: l,
2921
+ content: o,
2928
2922
  label: n,
2929
2923
  placement: d,
2930
- notShowArrow: r,
2931
- visible: _
2932
- } = e, h = E(
2924
+ notShowArrow: a,
2925
+ visible: u
2926
+ } = e, h = O(
2933
2927
  t,
2934
2928
  s,
2935
- l != null && l.length ? l : null
2936
- ), f = h && h.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: Xe.tooltipNotFront_content, children: h.map((u, g) => /* @__PURE__ */ o.jsx(k, { children: u }, `tooltip-${c}-${g}`)) }) : null;
2937
- return /* @__PURE__ */ o.jsx(
2938
- Lt,
2929
+ o != null && o.length ? o : null
2930
+ ), _ = h && h.length > 0 ? /* @__PURE__ */ c.jsx("div", { className: Ue.tooltipNotFront_content, children: h.map((f, g) => /* @__PURE__ */ c.jsx(T, { children: f }, `tooltip-${l}-${g}`)) }) : null;
2931
+ return /* @__PURE__ */ c.jsx(
2932
+ Dt,
2939
2933
  {
2940
- className: Xe.tooltipNotFront,
2934
+ className: Ue.tooltipNotFront,
2941
2935
  label: n,
2942
2936
  placement: d,
2943
- notShowArrow: r,
2944
- visible: _,
2945
- children: f
2937
+ notShowArrow: a,
2938
+ visible: u,
2939
+ children: _
2946
2940
  }
2947
2941
  );
2948
2942
  };
2949
- function Za({
2943
+ function Wa({
2950
2944
  sessionName: e,
2951
2945
  apiConfig: t,
2952
2946
  onResolveComponentProps: s,
2953
- children: a
2947
+ children: r
2954
2948
  }) {
2955
- const c = Ia(
2949
+ const l = Da(
2956
2950
  e,
2957
2951
  t,
2958
2952
  null,
2959
2953
  s
2960
2954
  );
2961
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2962
- c,
2963
- a
2955
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2956
+ l,
2957
+ r
2964
2958
  ] });
2965
2959
  }
2966
- const Je = (e, t, s, a, c) => {
2967
- const i = E(
2960
+ const Ve = (e, t, s, r, l) => {
2961
+ const i = O(
2968
2962
  e,
2969
2963
  t,
2970
- (a == null ? void 0 : a.components) || null,
2971
- c
2964
+ (r == null ? void 0 : r.components) || null,
2965
+ l
2972
2966
  );
2973
2967
  switch (s) {
2974
2968
  case "body":
2975
- return /* @__PURE__ */ o.jsx(
2976
- Rn,
2969
+ return /* @__PURE__ */ c.jsx(
2970
+ qn,
2977
2971
  {
2978
- ...a,
2972
+ ...r,
2979
2973
  inputs: i || []
2980
2974
  },
2981
- JSON.stringify(a == null ? void 0 : a.components)
2975
+ JSON.stringify(r == null ? void 0 : r.components)
2982
2976
  );
2983
2977
  case "header":
2984
- return /* @__PURE__ */ o.jsx(
2985
- Gs,
2978
+ return /* @__PURE__ */ c.jsx(
2979
+ Is,
2986
2980
  {
2987
- ...a,
2981
+ ...r,
2988
2982
  components: i || []
2989
2983
  },
2990
- JSON.stringify(a == null ? void 0 : a.components)
2984
+ JSON.stringify(r == null ? void 0 : r.components)
2991
2985
  );
2992
2986
  default:
2993
2987
  return null;
2994
2988
  }
2995
- }, Ia = (e, t, s, a) => {
2996
- var f, u, g;
2997
- const [c, i] = L(!1), l = N((m) => m), n = (f = l[e]) == null ? void 0 : f.currentPageId;
2998
- U(() => {
2989
+ }, Da = (e, t, s, r) => {
2990
+ var _, f, g;
2991
+ const [l, i] = L(!1), o = v((x) => x), n = (_ = o[e]) == null ? void 0 : _.currentPageId;
2992
+ V(() => {
2999
2993
  if (typeof window > "u") return;
3000
- const m = new URL(window.location.href), y = m.searchParams.get("sessionId");
3001
- y && (sessionStorage.setItem("sessionId", y), m.searchParams.delete("sessionId"), window.history.replaceState({}, "", m.toString()));
2994
+ const x = new URL(window.location.href), m = x.searchParams.get("sessionId");
2995
+ m && (sessionStorage.setItem("sessionId", m), x.searchParams.delete("sessionId"), window.history.replaceState({}, "", x.toString()));
3002
2996
  }, []);
3003
- const d = n ? Je(
2997
+ const d = n ? Ve(
3004
2998
  e,
3005
2999
  n,
3006
3000
  "header",
3007
- ((u = l[e].pages[n].page) == null ? void 0 : u.header) || null,
3008
- a
3009
- ) : null, r = n ? Je(
3001
+ ((f = o[e].pages[n].page) == null ? void 0 : f.header) || null,
3002
+ r
3003
+ ) : null, a = n ? Ve(
3010
3004
  e,
3011
3005
  n,
3012
3006
  "body",
3013
- ((g = l[e].pages[n].page) == null ? void 0 : g.body) || null,
3014
- a
3015
- ) : null, _ = O(() => {
3016
- var m;
3017
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3018
- ((m = l[e]) == null ? void 0 : m.isLoading) && /* @__PURE__ */ o.jsx(It, {}),
3007
+ ((g = o[e].pages[n].page) == null ? void 0 : g.body) || null,
3008
+ r
3009
+ ) : null, u = A(() => {
3010
+ var x;
3011
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3012
+ ((x = o[e]) == null ? void 0 : x.isLoading) && /* @__PURE__ */ c.jsx(Rt, {}),
3019
3013
  d,
3020
- r,
3021
- n && /* @__PURE__ */ o.jsx(Hs, { userFlow: e, pageId: n }),
3022
- l[e] && /* @__PURE__ */ o.jsx(Bt, {})
3014
+ a,
3015
+ n && /* @__PURE__ */ c.jsx(Vs, { userFlow: e, pageId: n }),
3016
+ o[e] && /* @__PURE__ */ c.jsx(Lt, {})
3023
3017
  ] });
3024
- }, [d, r, n, e]), h = async () => {
3018
+ }, [d, a, n, e]), h = async () => {
3025
3019
  try {
3026
- const m = await tt(
3020
+ const x = await Ze(
3027
3021
  t,
3028
3022
  e
3029
- ), y = m == null ? void 0 : m.data, x = y == null ? void 0 : y.content;
3030
- (m == null ? void 0 : m.status) === 200 ? he(e, t, x, y == null ? void 0 : y.sessionState) : i(!0);
3031
- } catch (m) {
3032
- console.error("[not-page]: API call failed", m), i(!0);
3023
+ ), m = x == null ? void 0 : x.data, y = m == null ? void 0 : m.content;
3024
+ (x == null ? void 0 : x.status) === 200 ? de(e, t, y, m == null ? void 0 : m.sessionState) : i(!0);
3025
+ } catch (x) {
3026
+ console.error("[not-page]: API call failed", x), i(!0);
3033
3027
  }
3034
3028
  };
3035
- return U(() => {
3036
- t != null && t.api && !s && e ? h() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? he(e, t, s) : (!(t != null && t.api) && !s || !e) && (i(!0), console.error(
3029
+ return V(() => {
3030
+ t != null && t.api && !s && e ? h() : !(t != null && t.api) && s && e || t != null && t.api && s && e ? de(e, t, s) : (!(t != null && t.api) && !s || !e) && (i(!0), console.error(
3037
3031
  "[not-page]: API call failed",
3038
3032
  "not api config",
3039
3033
  "not userFlow"
3040
3034
  ));
3041
- const m = "avocado-theme-mode-changed", y = (x) => {
3042
- const b = x.detail;
3043
- ae.setThemeMode(b);
3035
+ const x = "avocado-theme-mode-changed", m = (y) => {
3036
+ const p = y.detail;
3037
+ ne.setThemeMode(p);
3044
3038
  };
3045
- return window.addEventListener(m, y), () => {
3046
- window.removeEventListener(m, y);
3039
+ return window.addEventListener(x, m), () => {
3040
+ window.removeEventListener(x, m);
3047
3041
  };
3048
- }, []), c && console.error("[not-page]: No render page"), _;
3042
+ }, []), l && console.error("[not-page]: No render page"), u;
3049
3043
  };
3050
3044
  export {
3051
- gs as Chart,
3052
- Za as NotFrontPage,
3053
- Ps as Row,
3054
- xn as heading,
3055
- mn as text,
3056
- Ia as usePage
3045
+ ms as Chart,
3046
+ Wa as NotFrontPage,
3047
+ Ys as Row,
3048
+ fn as heading,
3049
+ yn as text,
3050
+ Da as usePage
3057
3051
  };