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