@magemetrics/ai 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/ai.js +1014 -1009
- package/dist/react/index.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/dist/web-component/{browser-CH_bPnDK.js → browser-DSh6QxsE.js} +1 -1
- package/dist/web-component/{web-component-B-Q_tXDP.js → web-component-Do6GLPMb.js} +23824 -24217
- package/dist/web-component/web-component.es.d.ts +1 -0
- package/dist/web-component/web-component.es.js +1 -1
- package/package.json +21 -21
package/dist/react/ai.js
CHANGED
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ut = (e, t, r) =>
|
|
1
|
+
var Co = Object.defineProperty;
|
|
2
|
+
var So = (e, t, r) => t in e ? Co(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var ut = (e, t, r) => So(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { jsx as n, jsxs as g, Fragment as ke } from "react/jsx-runtime";
|
|
5
|
-
import { atom as fe, useSetAtom as Ne, useAtomValue as
|
|
6
|
-
import { atomWithLocation as
|
|
5
|
+
import { atom as fe, useSetAtom as Ne, useAtomValue as Re } from "jotai";
|
|
6
|
+
import { atomWithLocation as Do } from "jotai-location";
|
|
7
7
|
import { z as o } from "zod";
|
|
8
|
-
import { createClient as
|
|
8
|
+
import { createClient as No } from "@supabase/supabase-js";
|
|
9
9
|
import * as Nt from "react";
|
|
10
|
-
import Q, { createContext as jt, useContext as Je, useState as
|
|
11
|
-
import
|
|
12
|
-
import { useQuery as G, useMutation as Ke, useInfiniteQuery as Ro, keepPreviousData as
|
|
10
|
+
import Q, { createContext as jt, useContext as Je, useState as A, useRef as te, useEffect as H, useMemo as ce, memo as me, forwardRef as jo, useLayoutEffect as Mo, useCallback as ye, Fragment as zo } from "react";
|
|
11
|
+
import Fo from "openapi-fetch";
|
|
12
|
+
import { useQuery as G, useMutation as Ke, useInfiniteQuery as Ro, keepPreviousData as Io, queryOptions as Mt, useQueryClient as fr, QueryClient as Ao, QueryCache as To, QueryClientProvider as Eo } from "@tanstack/react-query";
|
|
13
13
|
import Ce from "dayjs";
|
|
14
14
|
import { Slot as Te } from "@radix-ui/react-slot";
|
|
15
15
|
import { cva as Ee } from "class-variance-authority";
|
|
16
|
-
import { clsx as
|
|
17
|
-
import { twMerge as
|
|
16
|
+
import { clsx as Yo } from "clsx";
|
|
17
|
+
import { twMerge as Lo } from "tailwind-merge";
|
|
18
18
|
import * as E from "@radix-ui/react-dialog";
|
|
19
19
|
import { VisuallyHidden as Se } from "@radix-ui/react-visually-hidden";
|
|
20
20
|
import { motion as ne, AnimatePresence as De } from "framer-motion";
|
|
21
21
|
import * as ft from "@radix-ui/react-popover";
|
|
22
22
|
import { Drawer as xe } from "vaul";
|
|
23
|
-
import { useChat as
|
|
24
|
-
import
|
|
23
|
+
import { useChat as Po } from "@ai-sdk/react";
|
|
24
|
+
import $o from "react-markdown";
|
|
25
25
|
import * as He from "@radix-ui/react-hover-card";
|
|
26
26
|
import * as Me from "@radix-ui/react-tooltip";
|
|
27
|
-
import * as
|
|
28
|
-
import { flexRender as pr, createColumnHelper as
|
|
29
|
-
import { notUndefined as
|
|
30
|
-
import { Handle as
|
|
31
|
-
import
|
|
27
|
+
import * as Ht from "@radix-ui/react-collapsible";
|
|
28
|
+
import { flexRender as pr, createColumnHelper as Oo, useReactTable as Ho, getCoreRowModel as Vo } from "@tanstack/react-table";
|
|
29
|
+
import { notUndefined as Vt, useVirtualizer as qo } from "@tanstack/react-virtual";
|
|
30
|
+
import { Handle as qt, Position as Ut, useNodesState as Uo, useEdgesState as Zo, useReactFlow as Wo, ReactFlow as Bo, MarkerType as Ko, ReactFlowProvider as Go } from "@xyflow/react";
|
|
31
|
+
import Zt from "@dagrejs/dagre";
|
|
32
32
|
import * as ge from "@radix-ui/react-scroll-area";
|
|
33
|
-
import
|
|
34
|
-
import { ResponsiveContainer as et, BarChart as
|
|
33
|
+
import Qo from "html2canvas";
|
|
34
|
+
import { ResponsiveContainer as et, BarChart as Xo, CartesianGrid as zt, Tooltip as tt, XAxis as Ft, YAxis as Rt, Bar as Jo, LabelList as en, AreaChart as tn, Area as rn, PieChart as on, Pie as nn, Cell as an, ScatterChart as sn, Scatter as ln } from "recharts";
|
|
35
35
|
import "@kurkle/color";
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
function
|
|
39
|
-
const r = `atom${++
|
|
36
|
+
const cn = {};
|
|
37
|
+
let mn = 0;
|
|
38
|
+
function Wt(e, t) {
|
|
39
|
+
const r = `atom${++mn}`, a = {
|
|
40
40
|
toString() {
|
|
41
|
-
return (
|
|
41
|
+
return (cn ? "production" : void 0) !== "production" && this.debugLabel ? r + ":" + this.debugLabel : r;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return typeof e == "function" ? a.read = e : (a.init = e, a.read =
|
|
44
|
+
return typeof e == "function" ? a.read = e : (a.init = e, a.read = dn, a.write = un), t && (a.write = t), a;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function dn(e) {
|
|
47
47
|
return e(this);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function un(e, t, r) {
|
|
50
50
|
return t(
|
|
51
51
|
this,
|
|
52
52
|
typeof r == "function" ? r(e(this)) : r
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
(
|
|
57
|
-
),
|
|
58
|
-
function
|
|
55
|
+
const It = {}, kt = Symbol(
|
|
56
|
+
(It ? "production" : void 0) !== "production" ? "RESET" : ""
|
|
57
|
+
), fn = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
58
|
+
function pn(e = () => {
|
|
59
59
|
try {
|
|
60
60
|
return window.localStorage;
|
|
61
61
|
} catch (r) {
|
|
62
|
-
(
|
|
62
|
+
(It ? "production" : void 0) !== "production" && typeof window < "u" && console.warn(r);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
}, t) {
|
|
66
66
|
var r;
|
|
67
67
|
let a, i;
|
|
68
68
|
const s = {
|
|
69
|
-
getItem: (
|
|
70
|
-
var p,
|
|
71
|
-
const h = (
|
|
72
|
-
if (
|
|
69
|
+
getItem: (c, u) => {
|
|
70
|
+
var p, w;
|
|
71
|
+
const h = (x) => {
|
|
72
|
+
if (x = x || "", a !== x) {
|
|
73
73
|
try {
|
|
74
|
-
i = JSON.parse(
|
|
74
|
+
i = JSON.parse(x, t == null ? void 0 : t.reviver);
|
|
75
75
|
} catch {
|
|
76
76
|
return u;
|
|
77
77
|
}
|
|
78
|
-
a =
|
|
78
|
+
a = x;
|
|
79
79
|
}
|
|
80
80
|
return i;
|
|
81
|
-
},
|
|
82
|
-
return
|
|
81
|
+
}, y = (w = (p = e()) == null ? void 0 : p.getItem(c)) != null ? w : null;
|
|
82
|
+
return fn(y) ? y.then(h) : h(y);
|
|
83
83
|
},
|
|
84
|
-
setItem: (
|
|
84
|
+
setItem: (c, u) => {
|
|
85
85
|
var p;
|
|
86
86
|
return (p = e()) == null ? void 0 : p.setItem(
|
|
87
|
-
|
|
87
|
+
c,
|
|
88
88
|
JSON.stringify(u, void 0)
|
|
89
89
|
);
|
|
90
90
|
},
|
|
91
|
-
removeItem: (
|
|
91
|
+
removeItem: (c) => {
|
|
92
92
|
var u;
|
|
93
|
-
return (u = e()) == null ? void 0 : u.removeItem(
|
|
93
|
+
return (u = e()) == null ? void 0 : u.removeItem(c);
|
|
94
94
|
}
|
|
95
|
-
}, l = (
|
|
96
|
-
let
|
|
95
|
+
}, l = (c) => (u, p, w) => c(u, (h) => {
|
|
96
|
+
let y;
|
|
97
97
|
try {
|
|
98
|
-
|
|
98
|
+
y = JSON.parse(h || "");
|
|
99
99
|
} catch {
|
|
100
|
-
|
|
100
|
+
y = w;
|
|
101
101
|
}
|
|
102
|
-
p(
|
|
102
|
+
p(y);
|
|
103
103
|
});
|
|
104
|
-
let
|
|
104
|
+
let m;
|
|
105
105
|
try {
|
|
106
|
-
|
|
106
|
+
m = (r = e()) == null ? void 0 : r.subscribe;
|
|
107
107
|
} catch {
|
|
108
108
|
}
|
|
109
|
-
return !
|
|
109
|
+
return !m && typeof window < "u" && typeof window.addEventListener == "function" && window.Storage && (m = (c, u) => {
|
|
110
110
|
if (!(e() instanceof window.Storage))
|
|
111
111
|
return () => {
|
|
112
112
|
};
|
|
113
|
-
const p = (
|
|
114
|
-
|
|
113
|
+
const p = (w) => {
|
|
114
|
+
w.storageArea === e() && w.key === c && u(w.newValue);
|
|
115
115
|
};
|
|
116
116
|
return window.addEventListener("storage", p), () => {
|
|
117
117
|
window.removeEventListener("storage", p);
|
|
118
118
|
};
|
|
119
|
-
}),
|
|
119
|
+
}), m && (s.subscribe = l(m)), s;
|
|
120
120
|
}
|
|
121
|
-
const
|
|
122
|
-
function
|
|
123
|
-
const i =
|
|
121
|
+
const hn = pn();
|
|
122
|
+
function gn(e, t, r = hn, a) {
|
|
123
|
+
const i = Wt(
|
|
124
124
|
t
|
|
125
125
|
);
|
|
126
|
-
return (
|
|
126
|
+
return (It ? "production" : void 0) !== "production" && (i.debugPrivate = !0), i.onMount = (l) => {
|
|
127
127
|
l(r.getItem(e, t));
|
|
128
|
-
let
|
|
129
|
-
return r.subscribe && (
|
|
130
|
-
},
|
|
128
|
+
let m;
|
|
129
|
+
return r.subscribe && (m = r.subscribe(e, l, t)), m;
|
|
130
|
+
}, Wt(
|
|
131
131
|
(l) => l(i),
|
|
132
|
-
(l,
|
|
133
|
-
const u = typeof
|
|
134
|
-
return u === kt ? (
|
|
132
|
+
(l, m, c) => {
|
|
133
|
+
const u = typeof c == "function" ? c(l(i)) : c;
|
|
134
|
+
return u === kt ? (m(i, t), r.removeItem(e)) : u instanceof Promise ? u.then((p) => (m(i, p), r.setItem(e, p))) : (m(i, u), r.setItem(e, u));
|
|
135
135
|
}
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const bn = o.enum(["conversation"]).optional(), yn = o.enum(["chat", "insights"]).optional(), vn = o.enum(["current", "all"]).optional(), wn = o.object({
|
|
139
139
|
"mm-flow-id": o.string().optional().nullable(),
|
|
140
|
-
"mm-modal":
|
|
140
|
+
"mm-modal": bn.nullable(),
|
|
141
141
|
// Coerce attempts to convert the string from URL param to number
|
|
142
142
|
"mm-version-id": o.coerce.number().optional().nullable(),
|
|
143
|
-
"mm-chat":
|
|
143
|
+
"mm-chat": yn.optional().nullable(),
|
|
144
144
|
// Preprocess handles JSON string -> array parsing before validation
|
|
145
145
|
"mm-accordion": o.preprocess((e) => {
|
|
146
146
|
if (typeof e == "string")
|
|
@@ -151,8 +151,8 @@ const vn = o.enum(["conversation"]).optional(), wn = o.enum(["chat", "insights"]
|
|
|
151
151
|
}
|
|
152
152
|
return e;
|
|
153
153
|
}, o.array(o.string()).optional()).nullable(),
|
|
154
|
-
"mm-report-mode":
|
|
155
|
-
}),
|
|
154
|
+
"mm-report-mode": vn.nullable()
|
|
155
|
+
}), xn = (e) => {
|
|
156
156
|
if (e != null)
|
|
157
157
|
return typeof e == "string" ? e : JSON.stringify(e);
|
|
158
158
|
}, le = {
|
|
@@ -162,25 +162,25 @@ const vn = o.enum(["conversation"]).optional(), wn = o.enum(["chat", "insights"]
|
|
|
162
162
|
"mm-accordion": void 0,
|
|
163
163
|
"mm-report-mode": void 0,
|
|
164
164
|
"mm-chat": void 0
|
|
165
|
-
},
|
|
166
|
-
subscribe:
|
|
165
|
+
}, Bt = Object.keys(le), Ct = fe("none"), _n = (e) => (window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e)), pt = Do({
|
|
166
|
+
subscribe: _n,
|
|
167
167
|
replace: !1
|
|
168
168
|
}), ht = fe(
|
|
169
169
|
(e) => {
|
|
170
170
|
const t = e(pt).searchParams, r = {};
|
|
171
171
|
if (t)
|
|
172
|
-
for (const i of
|
|
172
|
+
for (const i of Bt)
|
|
173
173
|
r[i] = t.get(i);
|
|
174
|
-
const a =
|
|
174
|
+
const a = wn.safeParse(r);
|
|
175
175
|
return a.success ? { ...le, ...a.data } : (console.error("Failed to parse URL state:", a.error.flatten()), le);
|
|
176
176
|
},
|
|
177
177
|
(e, t, r) => {
|
|
178
178
|
const a = e(pt).searchParams ?? new URLSearchParams(), i = new URLSearchParams();
|
|
179
179
|
let s = !1;
|
|
180
|
-
for (const l of
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
const p =
|
|
180
|
+
for (const l of Bt) {
|
|
181
|
+
const m = r[l], c = le[l];
|
|
182
|
+
if (m !== void 0 && m !== c) {
|
|
183
|
+
const p = xn(m);
|
|
184
184
|
p !== void 0 && i.set(l, p);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -191,21 +191,21 @@ const vn = o.enum(["conversation"]).optional(), wn = o.enum(["chat", "insights"]
|
|
|
191
191
|
}));
|
|
192
192
|
}
|
|
193
193
|
), Ye = (e, t) => {
|
|
194
|
-
const r =
|
|
194
|
+
const r = gn(e, t), a = fe(t), i = fe(
|
|
195
195
|
// Read the specific property from the central URL state object
|
|
196
196
|
(l) => {
|
|
197
|
-
const
|
|
198
|
-
return
|
|
197
|
+
const c = l(ht)[e];
|
|
198
|
+
return c !== void 0 ? c : t;
|
|
199
199
|
},
|
|
200
200
|
// Write the update to the central URL state object
|
|
201
|
-
(l,
|
|
202
|
-
const u =
|
|
201
|
+
(l, m, c) => {
|
|
202
|
+
const u = c === kt ? t : c, p = l(ht);
|
|
203
203
|
if (p[e] !== u) {
|
|
204
|
-
const
|
|
204
|
+
const w = {
|
|
205
205
|
...p,
|
|
206
206
|
[e]: u
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
m(ht, w);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
);
|
|
@@ -221,17 +221,17 @@ const vn = o.enum(["conversation"]).optional(), wn = o.enum(["chat", "insights"]
|
|
|
221
221
|
return l(a);
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
|
-
(l,
|
|
224
|
+
(l, m, c) => {
|
|
225
225
|
switch (l(Ct)) {
|
|
226
226
|
case "localStorage":
|
|
227
|
-
|
|
227
|
+
m(r, c);
|
|
228
228
|
break;
|
|
229
229
|
case "queryParam":
|
|
230
|
-
|
|
230
|
+
m(i, c);
|
|
231
231
|
break;
|
|
232
232
|
case "none":
|
|
233
233
|
default:
|
|
234
|
-
|
|
234
|
+
c != kt && m(a, c);
|
|
235
235
|
break;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -242,7 +242,7 @@ const vn = o.enum(["conversation"]).optional(), wn = o.enum(["chat", "insights"]
|
|
|
242
242
|
), Ge = Ye(
|
|
243
243
|
"mm-modal",
|
|
244
244
|
le["mm-modal"]
|
|
245
|
-
),
|
|
245
|
+
), Ie = Ye(
|
|
246
246
|
"mm-version-id",
|
|
247
247
|
le["mm-version-id"]
|
|
248
248
|
);
|
|
@@ -258,18 +258,18 @@ const ve = fe(
|
|
|
258
258
|
(e) => e(St),
|
|
259
259
|
// Setter - with side effects
|
|
260
260
|
(e, t, r) => {
|
|
261
|
-
t(St, r), r ? t(Ge, "conversation") : (t(Ge, void 0), t(
|
|
261
|
+
t(St, r), r ? t(Ge, "conversation") : (t(Ge, void 0), t(Ie, void 0));
|
|
262
262
|
}
|
|
263
263
|
), Fe = fe(
|
|
264
264
|
(e) => e(Ge),
|
|
265
265
|
// Setter - with side effects
|
|
266
266
|
(e, t, r) => {
|
|
267
|
-
t(Ge, r), r || t(St, void 0), t(
|
|
267
|
+
t(Ge, r), r || t(St, void 0), t(Ie, void 0);
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
270
|
let P;
|
|
271
|
-
const
|
|
272
|
-
|
|
271
|
+
const kn = "", Cn = (e, t) => {
|
|
272
|
+
kn !== e && (P = Fo({ baseUrl: e }), P.use(Sn), P.use(Nn()), P.use(Dn(t)));
|
|
273
273
|
};
|
|
274
274
|
class hr extends Error {
|
|
275
275
|
constructor(r, a, i) {
|
|
@@ -279,7 +279,7 @@ class hr extends Error {
|
|
|
279
279
|
this.name = "ApiError", this.response = a, this.extra = i;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const Sn = {
|
|
283
283
|
async onResponse({ response: e, request: t }) {
|
|
284
284
|
var r;
|
|
285
285
|
if (e.status >= 400) {
|
|
@@ -297,11 +297,11 @@ const Nn = {
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, Dn = (e) => ({
|
|
301
301
|
async onRequest({ request: t }) {
|
|
302
302
|
return t.headers.set("X-Client-Version", e), t;
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
304
|
+
}), Nn = () => ({
|
|
305
305
|
async onRequest({ request: e }) {
|
|
306
306
|
if (!$)
|
|
307
307
|
return e;
|
|
@@ -312,7 +312,7 @@ const Nn = {
|
|
|
312
312
|
return r && e.headers.set("sp-access-token", r), a && e.headers.set("sp-refresh-token", a), e;
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
|
-
function
|
|
315
|
+
function jn(e, t) {
|
|
316
316
|
var r = {};
|
|
317
317
|
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
|
318
318
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -320,7 +320,7 @@ function zn(e, t) {
|
|
|
320
320
|
t.indexOf(a[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[i]) && (r[a[i]] = e[a[i]]);
|
|
321
321
|
return r;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Mn(e, t) {
|
|
324
324
|
var r;
|
|
325
325
|
return ((r = e == null ? void 0 : e._def) === null || r === void 0 ? void 0 : r.typeName) === t;
|
|
326
326
|
}
|
|
@@ -331,35 +331,35 @@ function ze(e, t) {
|
|
|
331
331
|
return i._def.openapi = this._def.openapi, i;
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function zn(e) {
|
|
335
335
|
if (typeof e.ZodType.prototype.openapi < "u")
|
|
336
336
|
return;
|
|
337
337
|
e.ZodType.prototype.openapi = function(i, s) {
|
|
338
|
-
var l,
|
|
339
|
-
const h = typeof i == "string" ? s : i,
|
|
340
|
-
param: Object.assign(Object.assign({}, (
|
|
341
|
-
} : void 0),
|
|
342
|
-
if (
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
var N, L,
|
|
346
|
-
const D =
|
|
338
|
+
var l, m, c, u, p, w;
|
|
339
|
+
const h = typeof i == "string" ? s : i, y = h ?? {}, { param: x } = y, f = jn(y, ["param"]), d = Object.assign(Object.assign({}, (l = this._def.openapi) === null || l === void 0 ? void 0 : l._internal), typeof i == "string" ? { refId: i } : void 0), b = Object.assign(Object.assign(Object.assign({}, (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata), f), !((u = (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata) === null || u === void 0) && u.param || x ? {
|
|
340
|
+
param: Object.assign(Object.assign({}, (w = (p = this._def.openapi) === null || p === void 0 ? void 0 : p.metadata) === null || w === void 0 ? void 0 : w.param), x)
|
|
341
|
+
} : void 0), _ = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(d).length > 0 ? { _internal: d } : void 0), Object.keys(b).length > 0 ? { metadata: b } : void 0) }));
|
|
342
|
+
if (Mn(this, "ZodObject")) {
|
|
343
|
+
const v = this.extend;
|
|
344
|
+
_.extend = function(...S) {
|
|
345
|
+
var N, L, R, j, z, T;
|
|
346
|
+
const D = v.apply(this, S);
|
|
347
347
|
return D._def.openapi = {
|
|
348
348
|
_internal: {
|
|
349
|
-
extendedFrom: !((L = (N = this._def.openapi) === null || N === void 0 ? void 0 : N._internal) === null || L === void 0) && L.refId ? { refId: (j = (
|
|
349
|
+
extendedFrom: !((L = (N = this._def.openapi) === null || N === void 0 ? void 0 : N._internal) === null || L === void 0) && L.refId ? { refId: (j = (R = this._def.openapi) === null || R === void 0 ? void 0 : R._internal) === null || j === void 0 ? void 0 : j.refId, schema: this } : (z = this._def.openapi) === null || z === void 0 ? void 0 : z._internal.extendedFrom
|
|
350
350
|
},
|
|
351
351
|
metadata: (T = D._def.openapi) === null || T === void 0 ? void 0 : T.metadata
|
|
352
352
|
}, D;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
return
|
|
355
|
+
return _;
|
|
356
356
|
}, ze(e, "optional"), ze(e, "nullable"), ze(e, "default"), ze(e, "transform"), ze(e, "refine");
|
|
357
357
|
const t = e.ZodObject.prototype.deepPartial;
|
|
358
358
|
e.ZodObject.prototype.deepPartial = function() {
|
|
359
359
|
const i = this._def.shape(), s = t.apply(this), l = s._def.shape();
|
|
360
|
-
return Object.entries(l).forEach(([
|
|
360
|
+
return Object.entries(l).forEach(([m, c]) => {
|
|
361
361
|
var u, p;
|
|
362
|
-
|
|
362
|
+
c._def.openapi = (p = (u = i[m]) === null || u === void 0 ? void 0 : u._def) === null || p === void 0 ? void 0 : p.openapi;
|
|
363
363
|
}), s._def.openapi = void 0, s;
|
|
364
364
|
};
|
|
365
365
|
const r = e.ZodObject.prototype.pick;
|
|
@@ -383,13 +383,13 @@ var Y = (e) => {
|
|
|
383
383
|
};
|
|
384
384
|
return Object.defineProperty(t, "getRoutingPath", { enumerable: !1 });
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
zn(o);
|
|
387
387
|
const gr = o.object({
|
|
388
388
|
apiKey: o.string()
|
|
389
389
|
}), br = o.object({
|
|
390
390
|
apiUrl: o.string(),
|
|
391
391
|
anonKey: o.string()
|
|
392
|
-
}),
|
|
392
|
+
}), Fn = Y({
|
|
393
393
|
method: "get",
|
|
394
394
|
path: "/api/v1/auth/apiInformation",
|
|
395
395
|
operationId: "getApiInformation",
|
|
@@ -464,10 +464,10 @@ Y({
|
|
|
464
464
|
const Rn = o.object({
|
|
465
465
|
apiKey: o.string(),
|
|
466
466
|
externalJWT: o.string()
|
|
467
|
-
}),
|
|
467
|
+
}), In = o.object({
|
|
468
468
|
accessToken: o.string(),
|
|
469
469
|
refreshToken: o.string()
|
|
470
|
-
}),
|
|
470
|
+
}), An = Y({
|
|
471
471
|
method: "post",
|
|
472
472
|
path: "/api/v1/auth/exchangeExternalToken",
|
|
473
473
|
operationId: "exchangeExternalToken",
|
|
@@ -485,7 +485,7 @@ const Rn = o.object({
|
|
|
485
485
|
200: {
|
|
486
486
|
content: {
|
|
487
487
|
"application/json": {
|
|
488
|
-
schema:
|
|
488
|
+
schema: In
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
491
|
description: "Retrieve a JWT for an external user"
|
|
@@ -509,10 +509,10 @@ const Rn = o.object({
|
|
|
509
509
|
description: "Unable to retrieve a JWT for an external user"
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
}),
|
|
512
|
+
}), Tn = (e) => G({
|
|
513
513
|
queryKey: ["apiInformation", { apiKey: e }],
|
|
514
514
|
queryFn: async () => {
|
|
515
|
-
const { data: t } = await P.GET(
|
|
515
|
+
const { data: t } = await P.GET(Fn.path, {
|
|
516
516
|
params: {
|
|
517
517
|
query: {
|
|
518
518
|
apiKey: e
|
|
@@ -527,13 +527,13 @@ const Rn = o.object({
|
|
|
527
527
|
refetchOnWindowFocus: !1,
|
|
528
528
|
refetchOnReconnect: !1,
|
|
529
529
|
refetchOnMount: !1
|
|
530
|
-
}),
|
|
530
|
+
}), En = () => Ke({
|
|
531
531
|
mutationKey: ["exchange-token"],
|
|
532
532
|
mutationFn: async ({
|
|
533
533
|
apiKey: e,
|
|
534
534
|
externalJWT: t
|
|
535
535
|
}) => {
|
|
536
|
-
const { data: r } = await P.POST(
|
|
536
|
+
const { data: r } = await P.POST(An.path, {
|
|
537
537
|
body: {
|
|
538
538
|
apiKey: e,
|
|
539
539
|
externalJWT: t
|
|
@@ -545,44 +545,44 @@ const Rn = o.object({
|
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
let $;
|
|
548
|
-
const
|
|
549
|
-
$ || ($ =
|
|
548
|
+
const Yn = (e, t) => {
|
|
549
|
+
$ || ($ = No(t, e, {
|
|
550
550
|
auth: {
|
|
551
551
|
storageKey: "mm-ai-sp-token"
|
|
552
552
|
}
|
|
553
553
|
}));
|
|
554
|
-
},
|
|
554
|
+
}, At = jt({
|
|
555
555
|
user: {
|
|
556
556
|
data: void 0,
|
|
557
557
|
session: void 0,
|
|
558
558
|
loading: !0
|
|
559
559
|
},
|
|
560
560
|
apiUrl: ""
|
|
561
|
-
}),
|
|
561
|
+
}), Ln = ({
|
|
562
562
|
children: e,
|
|
563
563
|
apiKey: t,
|
|
564
564
|
externalJwt: r,
|
|
565
565
|
apiUrl: a
|
|
566
566
|
}) => {
|
|
567
|
-
const [i, s] =
|
|
567
|
+
const [i, s] = A({
|
|
568
568
|
data: void 0,
|
|
569
569
|
session: void 0,
|
|
570
570
|
loading: !0
|
|
571
|
-
}), l = te(Symbol("initial")), { data:
|
|
571
|
+
}), l = te(Symbol("initial")), { data: m } = Tn(t), { mutateAsync: c, isPending: u } = En();
|
|
572
572
|
H(() => {
|
|
573
|
-
|
|
573
|
+
Cn(a, "0.0.40");
|
|
574
574
|
}, [a]), H(() => {
|
|
575
575
|
if (console.debug("Main Supabase auth effect re-running."), console.debug(
|
|
576
|
-
`Effect dependencies: apiInformation=${!!
|
|
577
|
-
), !
|
|
576
|
+
`Effect dependencies: apiInformation=${!!m}, externalJwt='${r}', isExchangingTokens=${u}, processedJwtRef='${String(l.current)}'`
|
|
577
|
+
), !m) {
|
|
578
578
|
console.debug("Main effect: apiInformation not ready.");
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
|
-
console.debug("Main effect: apiInformation ready."), $ || (
|
|
581
|
+
console.debug("Main effect: apiInformation ready."), $ || (Yn(m.anonKey, m.apiUrl), console.debug(
|
|
582
582
|
"Main effect: Global Supabase client initialization triggered."
|
|
583
583
|
));
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
584
|
+
const w = $;
|
|
585
|
+
if (!w) {
|
|
586
586
|
console.error(
|
|
587
587
|
"Main effect: Global Supabase client is unexpectedly not available."
|
|
588
588
|
), s({ data: void 0, session: void 0, loading: !1 });
|
|
@@ -590,16 +590,16 @@ const Pn = (e, t) => {
|
|
|
590
590
|
}
|
|
591
591
|
const {
|
|
592
592
|
data: { subscription: h }
|
|
593
|
-
} =
|
|
593
|
+
} = w.auth.onAuthStateChange((f, d) => {
|
|
594
594
|
console.debug("Supabase auth state change listener:", f), s({
|
|
595
595
|
data: (d == null ? void 0 : d.user) ?? void 0,
|
|
596
596
|
session: d ?? void 0,
|
|
597
597
|
loading: !1
|
|
598
598
|
});
|
|
599
|
-
}),
|
|
599
|
+
}), y = async () => {
|
|
600
600
|
console.debug("Initiating performAuthCheckFlow for JWT:", r), s((f) => f.loading ? f : { ...f, loading: !0 });
|
|
601
601
|
try {
|
|
602
|
-
const { data: f, error: d } = await
|
|
602
|
+
const { data: f, error: d } = await w.auth.getSession();
|
|
603
603
|
if (console.debug("getSession result:", f.session, "Error:", d), d) {
|
|
604
604
|
console.error("Error getting session:", d), s({ data: void 0, session: void 0, loading: !1 }), l.current = r;
|
|
605
605
|
return;
|
|
@@ -609,20 +609,20 @@ const Pn = (e, t) => {
|
|
|
609
609
|
), l.current = r) : r ? (console.debug(
|
|
610
610
|
"Auth flow: No session found, exchanging token for JWT:",
|
|
611
611
|
r
|
|
612
|
-
), await
|
|
612
|
+
), await c(
|
|
613
613
|
{ apiKey: t, externalJWT: r },
|
|
614
614
|
// Use the externalJWT from the current effect closure
|
|
615
615
|
{
|
|
616
|
-
onSuccess: async ({ accessToken:
|
|
616
|
+
onSuccess: async ({ accessToken: b, refreshToken: _ }) => {
|
|
617
617
|
console.debug(
|
|
618
618
|
"Token exchange successful, setting session on global client."
|
|
619
|
-
), await
|
|
620
|
-
access_token:
|
|
621
|
-
refresh_token:
|
|
619
|
+
), await w.auth.setSession({
|
|
620
|
+
access_token: b,
|
|
621
|
+
refresh_token: _
|
|
622
622
|
}), console.debug("globalSupabase.auth.setSession completed."), l.current = r;
|
|
623
623
|
},
|
|
624
|
-
onError: (
|
|
625
|
-
console.error("Token exchange failed:",
|
|
624
|
+
onError: (b) => {
|
|
625
|
+
console.error("Token exchange failed:", b), s({
|
|
626
626
|
data: void 0,
|
|
627
627
|
session: void 0,
|
|
628
628
|
loading: !1
|
|
@@ -640,18 +640,18 @@ const Pn = (e, t) => {
|
|
|
640
640
|
return l.current !== r && // JWT changed or initial state
|
|
641
641
|
!u && (console.debug(
|
|
642
642
|
`Triggering performAuthCheckFlow for JWT: '${r}' (Previous handled: '${String(l.current)}')`
|
|
643
|
-
), l.current = r,
|
|
643
|
+
), l.current = r, y().catch(
|
|
644
644
|
(f) => console.error("Error executing performAuthCheckFlow:", f)
|
|
645
645
|
)), () => {
|
|
646
646
|
h.unsubscribe();
|
|
647
647
|
};
|
|
648
|
-
}, [
|
|
648
|
+
}, [m, t, r, c, u]);
|
|
649
649
|
const p = {
|
|
650
650
|
user: i,
|
|
651
651
|
apiUrl: a
|
|
652
652
|
};
|
|
653
|
-
return /* @__PURE__ */ n(
|
|
654
|
-
},
|
|
653
|
+
return /* @__PURE__ */ n(At.Provider, { value: p, children: e });
|
|
654
|
+
}, Pn = () => Je(At).user, $n = () => ({ apiUrl: Je(At).apiUrl }), se = () => !Pn().loading, Tt = async (e) => {
|
|
655
655
|
if (!e)
|
|
656
656
|
throw new Error("Supabase client is not initialized");
|
|
657
657
|
const t = await e.auth.getSession();
|
|
@@ -664,10 +664,10 @@ const Pn = (e, t) => {
|
|
|
664
664
|
"sp-refresh-token": a
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
|
-
},
|
|
667
|
+
}, On = o.object({
|
|
668
668
|
"sp-access-token": o.string(),
|
|
669
669
|
"sp-refresh-token": o.string().optional()
|
|
670
|
-
}), O =
|
|
670
|
+
}), O = On, yr = [
|
|
671
671
|
{ label: "Helpful", value: "helpful" },
|
|
672
672
|
{ label: "Partially helpful", value: "partially helpful" },
|
|
673
673
|
{ label: "Not helpful", value: "not helpful" },
|
|
@@ -679,7 +679,7 @@ const Pn = (e, t) => {
|
|
|
679
679
|
yr.map((e) => e.value)
|
|
680
680
|
),
|
|
681
681
|
id: o.number()
|
|
682
|
-
}),
|
|
682
|
+
}), Hn = o.object({
|
|
683
683
|
id: o.string(),
|
|
684
684
|
type: o.enum([
|
|
685
685
|
"entity",
|
|
@@ -690,7 +690,7 @@ const Pn = (e, t) => {
|
|
|
690
690
|
"result"
|
|
691
691
|
]),
|
|
692
692
|
explanation: o.string()
|
|
693
|
-
}),
|
|
693
|
+
}), Vn = o.object({
|
|
694
694
|
source: o.string(),
|
|
695
695
|
target: o.string()
|
|
696
696
|
});
|
|
@@ -698,13 +698,13 @@ o.object({
|
|
|
698
698
|
score: o.number(),
|
|
699
699
|
reason: o.string()
|
|
700
700
|
});
|
|
701
|
-
const
|
|
701
|
+
const qn = o.record(
|
|
702
702
|
o.string(),
|
|
703
703
|
o.object({
|
|
704
|
-
nodes: o.array(
|
|
705
|
-
edges: o.array(
|
|
704
|
+
nodes: o.array(Hn),
|
|
705
|
+
edges: o.array(Vn)
|
|
706
706
|
})
|
|
707
|
-
),
|
|
707
|
+
), Un = o.object({
|
|
708
708
|
created_at: o.string(),
|
|
709
709
|
error: o.string().nullable(),
|
|
710
710
|
flow_id: o.string(),
|
|
@@ -720,14 +720,14 @@ const Zn = o.record(
|
|
|
720
720
|
id: o.string(),
|
|
721
721
|
request: o.string(),
|
|
722
722
|
user_id: o.string().nullable(),
|
|
723
|
-
flow_steps: o.array(
|
|
723
|
+
flow_steps: o.array(Un)
|
|
724
724
|
});
|
|
725
725
|
o.object({
|
|
726
726
|
table: o.string(),
|
|
727
727
|
schema: o.string(),
|
|
728
728
|
database: o.string()
|
|
729
729
|
});
|
|
730
|
-
const
|
|
730
|
+
const Zn = o.object({
|
|
731
731
|
created_at: o.string(),
|
|
732
732
|
flow_id: o.string(),
|
|
733
733
|
id: o.number(),
|
|
@@ -749,14 +749,14 @@ const Bn = o.object({
|
|
|
749
749
|
}).passthrough()
|
|
750
750
|
)
|
|
751
751
|
}).passthrough()
|
|
752
|
-
}), xr =
|
|
752
|
+
}), xr = Zn.omit({
|
|
753
753
|
sql: !0,
|
|
754
754
|
table: !0,
|
|
755
755
|
created_at: !0,
|
|
756
756
|
data_sample: !0,
|
|
757
757
|
is_sample: !0,
|
|
758
758
|
schema: !0
|
|
759
|
-
}),
|
|
759
|
+
}), Wn = o.object({}).passthrough().array().openapi("FlowData"), Bn = o.object({
|
|
760
760
|
name: o.string(),
|
|
761
761
|
data_type: o.string()
|
|
762
762
|
}).array();
|
|
@@ -764,13 +764,13 @@ o.object({
|
|
|
764
764
|
render_type: o.string().nullish(),
|
|
765
765
|
unit: o.string().nullish()
|
|
766
766
|
});
|
|
767
|
-
const
|
|
767
|
+
const Kn = Bn.element.merge(
|
|
768
768
|
o.object({
|
|
769
769
|
dataType: o.string(),
|
|
770
770
|
renderType: o.string().optional(),
|
|
771
771
|
unit: o.string().optional()
|
|
772
772
|
})
|
|
773
|
-
).array().openapi("FlowColumns"),
|
|
773
|
+
).array().openapi("FlowColumns"), Gn = o.object({
|
|
774
774
|
goal: o.string(),
|
|
775
775
|
user_friendly_goal: o.string().optional(),
|
|
776
776
|
search_terms: o.string().array(),
|
|
@@ -778,8 +778,8 @@ const Qn = Gn.element.merge(
|
|
|
778
778
|
columns: o.object({ column_name: o.string(), explanation: o.string() }).array(),
|
|
779
779
|
table_name: o.string()
|
|
780
780
|
}).array()
|
|
781
|
-
}),
|
|
782
|
-
columns_lineage:
|
|
781
|
+
}), Qn = o.object({
|
|
782
|
+
columns_lineage: qn,
|
|
783
783
|
confidence_score: o.number(),
|
|
784
784
|
confidence_score_reason: o.string(),
|
|
785
785
|
id: o.number(),
|
|
@@ -796,10 +796,10 @@ o.object({
|
|
|
796
796
|
is_sample: o.boolean(),
|
|
797
797
|
data_summary: o.record(o.unknown())
|
|
798
798
|
});
|
|
799
|
-
const
|
|
799
|
+
const Xn = Qn.omit({
|
|
800
800
|
id: !0,
|
|
801
801
|
created_at: !0
|
|
802
|
-
}),
|
|
802
|
+
}), Jn = o.object({
|
|
803
803
|
id: o.number(),
|
|
804
804
|
flow_data_id: o.number(),
|
|
805
805
|
created_at: o.string(),
|
|
@@ -808,11 +808,11 @@ const ea = Jn.omit({
|
|
|
808
808
|
report_summary: o.string(),
|
|
809
809
|
answer: o.string().nullable(),
|
|
810
810
|
answer_sql: o.string().nullable()
|
|
811
|
-
}),
|
|
811
|
+
}), ea = Jn.omit({
|
|
812
812
|
answer_sql: !0
|
|
813
813
|
}), _r = {
|
|
814
814
|
analyzeRequest: "analyze_request"
|
|
815
|
-
},
|
|
815
|
+
}, ta = o.object({
|
|
816
816
|
title: o.string(),
|
|
817
817
|
value: o.string(),
|
|
818
818
|
subtitle_sentiment: o.enum(["positive", "negative", "neutral"]),
|
|
@@ -823,46 +823,46 @@ const ea = Jn.omit({
|
|
|
823
823
|
created_at: o.string(),
|
|
824
824
|
flow_data_id: o.number().nullable(),
|
|
825
825
|
id: o.number()
|
|
826
|
-
}), kr =
|
|
826
|
+
}), kr = ta.omit({
|
|
827
827
|
sql: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function Et(e) {
|
|
830
830
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
831
831
|
}
|
|
832
|
-
var Ze = { exports: {} },
|
|
833
|
-
function
|
|
834
|
-
return
|
|
832
|
+
var Ze = { exports: {} }, ra = Ze.exports, Kt;
|
|
833
|
+
function oa() {
|
|
834
|
+
return Kt || (Kt = 1, function(e, t) {
|
|
835
835
|
(function(r, a) {
|
|
836
836
|
e.exports = a();
|
|
837
|
-
})(
|
|
838
|
-
var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, a = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d/, s = /\d\d/, l = /\d\d?/,
|
|
837
|
+
})(ra, function() {
|
|
838
|
+
var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, a = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d/, s = /\d\d/, l = /\d\d?/, m = /\d*[^-_:/,()\s\d]+/, c = {}, u = function(d) {
|
|
839
839
|
return (d = +d) + (d > 68 ? 1900 : 2e3);
|
|
840
840
|
}, p = function(d) {
|
|
841
|
-
return function(
|
|
842
|
-
this[d] = +
|
|
841
|
+
return function(b) {
|
|
842
|
+
this[d] = +b;
|
|
843
843
|
};
|
|
844
|
-
},
|
|
845
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
846
|
-
if (!
|
|
847
|
-
var
|
|
848
|
-
return
|
|
844
|
+
}, w = [/[+-]\d\d:?(\d\d)?|Z/, function(d) {
|
|
845
|
+
(this.zone || (this.zone = {})).offset = function(b) {
|
|
846
|
+
if (!b || b === "Z") return 0;
|
|
847
|
+
var _ = b.match(/([+-]|\d\d)/g), v = 60 * _[1] + (+_[2] || 0);
|
|
848
|
+
return v === 0 ? 0 : _[0] === "+" ? -v : v;
|
|
849
849
|
}(d);
|
|
850
850
|
}], h = function(d) {
|
|
851
|
-
var
|
|
852
|
-
return
|
|
853
|
-
},
|
|
854
|
-
var
|
|
855
|
-
if (
|
|
856
|
-
for (var
|
|
857
|
-
|
|
851
|
+
var b = c[d];
|
|
852
|
+
return b && (b.indexOf ? b : b.s.concat(b.f));
|
|
853
|
+
}, y = function(d, b) {
|
|
854
|
+
var _, v = c.meridiem;
|
|
855
|
+
if (v) {
|
|
856
|
+
for (var S = 1; S <= 24; S += 1) if (d.indexOf(v(S, 0, b)) > -1) {
|
|
857
|
+
_ = S > 12;
|
|
858
858
|
break;
|
|
859
859
|
}
|
|
860
|
-
} else
|
|
861
|
-
return
|
|
862
|
-
},
|
|
863
|
-
this.afternoon =
|
|
864
|
-
}], a: [
|
|
865
|
-
this.afternoon =
|
|
860
|
+
} else _ = d === (b ? "pm" : "PM");
|
|
861
|
+
return _;
|
|
862
|
+
}, x = { A: [m, function(d) {
|
|
863
|
+
this.afternoon = y(d, !1);
|
|
864
|
+
}], a: [m, function(d) {
|
|
865
|
+
this.afternoon = y(d, !0);
|
|
866
866
|
}], Q: [i, function(d) {
|
|
867
867
|
this.month = 3 * (d - 1) + 1;
|
|
868
868
|
}], S: [i, function(d) {
|
|
@@ -871,40 +871,40 @@ function aa() {
|
|
|
871
871
|
this.milliseconds = 10 * +d;
|
|
872
872
|
}], SSS: [/\d{3}/, function(d) {
|
|
873
873
|
this.milliseconds = +d;
|
|
874
|
-
}], s: [l, p("seconds")], ss: [l, p("seconds")], m: [l, p("minutes")], mm: [l, p("minutes")], H: [l, p("hours")], h: [l, p("hours")], HH: [l, p("hours")], hh: [l, p("hours")], D: [l, p("day")], DD: [s, p("day")], Do: [
|
|
875
|
-
var
|
|
876
|
-
if (this.day =
|
|
877
|
-
}], w: [l, p("week")], ww: [s, p("week")], M: [l, p("month")], MM: [s, p("month")], MMM: [
|
|
878
|
-
var
|
|
879
|
-
return
|
|
874
|
+
}], s: [l, p("seconds")], ss: [l, p("seconds")], m: [l, p("minutes")], mm: [l, p("minutes")], H: [l, p("hours")], h: [l, p("hours")], HH: [l, p("hours")], hh: [l, p("hours")], D: [l, p("day")], DD: [s, p("day")], Do: [m, function(d) {
|
|
875
|
+
var b = c.ordinal, _ = d.match(/\d+/);
|
|
876
|
+
if (this.day = _[0], b) for (var v = 1; v <= 31; v += 1) b(v).replace(/\[|\]/g, "") === d && (this.day = v);
|
|
877
|
+
}], w: [l, p("week")], ww: [s, p("week")], M: [l, p("month")], MM: [s, p("month")], MMM: [m, function(d) {
|
|
878
|
+
var b = h("months"), _ = (h("monthsShort") || b.map(function(v) {
|
|
879
|
+
return v.slice(0, 3);
|
|
880
880
|
})).indexOf(d) + 1;
|
|
881
|
-
if (
|
|
882
|
-
this.month =
|
|
883
|
-
}], MMMM: [
|
|
884
|
-
var
|
|
885
|
-
if (
|
|
886
|
-
this.month =
|
|
881
|
+
if (_ < 1) throw new Error();
|
|
882
|
+
this.month = _ % 12 || _;
|
|
883
|
+
}], MMMM: [m, function(d) {
|
|
884
|
+
var b = h("months").indexOf(d) + 1;
|
|
885
|
+
if (b < 1) throw new Error();
|
|
886
|
+
this.month = b % 12 || b;
|
|
887
887
|
}], Y: [/[+-]?\d+/, p("year")], YY: [s, function(d) {
|
|
888
888
|
this.year = u(d);
|
|
889
|
-
}], YYYY: [/\d{4}/, p("year")], Z:
|
|
889
|
+
}], YYYY: [/\d{4}/, p("year")], Z: w, ZZ: w };
|
|
890
890
|
function f(d) {
|
|
891
|
-
var
|
|
892
|
-
|
|
893
|
-
for (var
|
|
894
|
-
var V =
|
|
895
|
-
return D ||
|
|
891
|
+
var b, _;
|
|
892
|
+
b = d, _ = c && c.formats;
|
|
893
|
+
for (var v = (d = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(T, D, I) {
|
|
894
|
+
var V = I && I.toUpperCase();
|
|
895
|
+
return D || _[I] || r[I] || _[V].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(ae, re, ie) {
|
|
896
896
|
return re || ie.slice(1);
|
|
897
897
|
});
|
|
898
|
-
})).match(a),
|
|
899
|
-
var L =
|
|
900
|
-
|
|
898
|
+
})).match(a), S = v.length, N = 0; N < S; N += 1) {
|
|
899
|
+
var L = v[N], R = x[L], j = R && R[0], z = R && R[1];
|
|
900
|
+
v[N] = z ? { regex: j, parser: z } : L.replace(/^\[|\]$/g, "");
|
|
901
901
|
}
|
|
902
902
|
return function(T) {
|
|
903
|
-
for (var D = {},
|
|
904
|
-
var
|
|
905
|
-
if (typeof
|
|
903
|
+
for (var D = {}, I = 0, V = 0; I < S; I += 1) {
|
|
904
|
+
var ae = v[I];
|
|
905
|
+
if (typeof ae == "string") V += ae.length;
|
|
906
906
|
else {
|
|
907
|
-
var re =
|
|
907
|
+
var re = ae.regex, ie = ae.parser, q = T.slice(V), J = re.exec(q)[0];
|
|
908
908
|
ie.call(D, J), T = T.replace(J, "");
|
|
909
909
|
}
|
|
910
910
|
}
|
|
@@ -917,189 +917,189 @@ function aa() {
|
|
|
917
917
|
}(D), D;
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
return function(d,
|
|
921
|
-
|
|
922
|
-
var
|
|
923
|
-
|
|
924
|
-
var L = N.date,
|
|
925
|
-
this.$u =
|
|
920
|
+
return function(d, b, _) {
|
|
921
|
+
_.p.customParseFormat = !0, d && d.parseTwoDigitYear && (u = d.parseTwoDigitYear);
|
|
922
|
+
var v = b.prototype, S = v.parse;
|
|
923
|
+
v.parse = function(N) {
|
|
924
|
+
var L = N.date, R = N.utc, j = N.args;
|
|
925
|
+
this.$u = R;
|
|
926
926
|
var z = j[1];
|
|
927
927
|
if (typeof z == "string") {
|
|
928
|
-
var T = j[2] === !0, D = j[3] === !0,
|
|
929
|
-
D && (V = j[2]),
|
|
928
|
+
var T = j[2] === !0, D = j[3] === !0, I = T || D, V = j[2];
|
|
929
|
+
D && (V = j[2]), c = this.$locale(), !T && V && (c = _.Ls[V]), this.$d = function(q, J, oe, je) {
|
|
930
930
|
try {
|
|
931
931
|
if (["x", "X"].indexOf(J) > -1) return new Date((J === "X" ? 1e3 : 1) * q);
|
|
932
|
-
var W = f(J)(q), nt = W.year, Pe = W.month,
|
|
932
|
+
var W = f(J)(q), nt = W.year, Pe = W.month, vo = W.day, wo = W.hours, xo = W.minutes, _o = W.seconds, ko = W.milliseconds, $t = W.zone, Ot = W.week, at = /* @__PURE__ */ new Date(), st = vo || (nt || Pe ? 1 : at.getDate()), it = nt || at.getFullYear(), $e = 0;
|
|
933
933
|
nt && !Pe || ($e = Pe > 0 ? Pe - 1 : at.getMonth());
|
|
934
|
-
var Oe, lt =
|
|
935
|
-
return
|
|
934
|
+
var Oe, lt = wo || 0, ct = xo || 0, mt = _o || 0, dt = ko || 0;
|
|
935
|
+
return $t ? new Date(Date.UTC(it, $e, st, lt, ct, mt, dt + 60 * $t.offset * 1e3)) : oe ? new Date(Date.UTC(it, $e, st, lt, ct, mt, dt)) : (Oe = new Date(it, $e, st, lt, ct, mt, dt), Ot && (Oe = je(Oe).week(Ot).toDate()), Oe);
|
|
936
936
|
} catch {
|
|
937
937
|
return /* @__PURE__ */ new Date("");
|
|
938
938
|
}
|
|
939
|
-
}(L, z,
|
|
940
|
-
} else if (z instanceof Array) for (var
|
|
939
|
+
}(L, z, R, _), this.init(), V && V !== !0 && (this.$L = this.locale(V).$L), I && L != this.format(z) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
940
|
+
} else if (z instanceof Array) for (var ae = z.length, re = 1; re <= ae; re += 1) {
|
|
941
941
|
j[1] = z[re - 1];
|
|
942
|
-
var ie =
|
|
942
|
+
var ie = _.apply(this, j);
|
|
943
943
|
if (ie.isValid()) {
|
|
944
944
|
this.$d = ie.$d, this.$L = ie.$L, this.init();
|
|
945
945
|
break;
|
|
946
946
|
}
|
|
947
|
-
re ===
|
|
947
|
+
re === ae && (this.$d = /* @__PURE__ */ new Date(""));
|
|
948
948
|
}
|
|
949
|
-
else
|
|
949
|
+
else S.call(this, N);
|
|
950
950
|
};
|
|
951
951
|
};
|
|
952
952
|
});
|
|
953
953
|
}(Ze)), Ze.exports;
|
|
954
954
|
}
|
|
955
|
-
var
|
|
956
|
-
const
|
|
957
|
-
var We = { exports: {} },
|
|
958
|
-
function
|
|
959
|
-
return
|
|
955
|
+
var na = oa();
|
|
956
|
+
const aa = /* @__PURE__ */ Et(na);
|
|
957
|
+
var We = { exports: {} }, sa = We.exports, Gt;
|
|
958
|
+
function ia() {
|
|
959
|
+
return Gt || (Gt = 1, function(e, t) {
|
|
960
960
|
(function(r, a) {
|
|
961
961
|
e.exports = a();
|
|
962
|
-
})(
|
|
962
|
+
})(sa, function() {
|
|
963
963
|
var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
964
964
|
return function(i, s, l) {
|
|
965
|
-
var
|
|
966
|
-
|
|
967
|
-
var f = new Date(h), d = function(
|
|
968
|
-
|
|
969
|
-
var
|
|
970
|
-
return N || (N = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone:
|
|
971
|
-
}(
|
|
965
|
+
var m, c = function(h, y, x) {
|
|
966
|
+
x === void 0 && (x = {});
|
|
967
|
+
var f = new Date(h), d = function(b, _) {
|
|
968
|
+
_ === void 0 && (_ = {});
|
|
969
|
+
var v = _.timeZoneName || "short", S = b + "|" + v, N = a[S];
|
|
970
|
+
return N || (N = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: v }), a[S] = N), N;
|
|
971
|
+
}(y, x);
|
|
972
972
|
return d.formatToParts(f);
|
|
973
|
-
}, u = function(h,
|
|
974
|
-
for (var
|
|
975
|
-
var
|
|
976
|
-
|
|
973
|
+
}, u = function(h, y) {
|
|
974
|
+
for (var x = c(h, y), f = [], d = 0; d < x.length; d += 1) {
|
|
975
|
+
var b = x[d], _ = b.type, v = b.value, S = r[_];
|
|
976
|
+
S >= 0 && (f[S] = parseInt(v, 10));
|
|
977
977
|
}
|
|
978
|
-
var N = f[3], L = N === 24 ? 0 : N,
|
|
979
|
-
return (l.utc(
|
|
978
|
+
var N = f[3], L = N === 24 ? 0 : N, R = f[0] + "-" + f[1] + "-" + f[2] + " " + L + ":" + f[4] + ":" + f[5] + ":000", j = +h;
|
|
979
|
+
return (l.utc(R).valueOf() - (j -= j % 1e3)) / 6e4;
|
|
980
980
|
}, p = s.prototype;
|
|
981
|
-
p.tz = function(h,
|
|
982
|
-
h === void 0 && (h =
|
|
983
|
-
var
|
|
984
|
-
if (!Number(
|
|
985
|
-
else if (
|
|
986
|
-
var
|
|
987
|
-
|
|
981
|
+
p.tz = function(h, y) {
|
|
982
|
+
h === void 0 && (h = m);
|
|
983
|
+
var x, f = this.utcOffset(), d = this.toDate(), b = d.toLocaleString("en-US", { timeZone: h }), _ = Math.round((d - new Date(b)) / 1e3 / 60), v = 15 * -Math.round(d.getTimezoneOffset() / 15) - _;
|
|
984
|
+
if (!Number(v)) x = this.utcOffset(0, y);
|
|
985
|
+
else if (x = l(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(v, !0), y) {
|
|
986
|
+
var S = x.utcOffset();
|
|
987
|
+
x = x.add(f - S, "minute");
|
|
988
988
|
}
|
|
989
|
-
return
|
|
989
|
+
return x.$x.$timezone = h, x;
|
|
990
990
|
}, p.offsetName = function(h) {
|
|
991
|
-
var
|
|
991
|
+
var y = this.$x.$timezone || l.tz.guess(), x = c(this.valueOf(), y, { timeZoneName: h }).find(function(f) {
|
|
992
992
|
return f.type.toLowerCase() === "timezonename";
|
|
993
993
|
});
|
|
994
|
-
return
|
|
994
|
+
return x && x.value;
|
|
995
995
|
};
|
|
996
|
-
var
|
|
997
|
-
p.startOf = function(h,
|
|
998
|
-
if (!this.$x || !this.$x.$timezone) return
|
|
999
|
-
var
|
|
1000
|
-
return
|
|
1001
|
-
}, l.tz = function(h,
|
|
1002
|
-
var f =
|
|
996
|
+
var w = p.startOf;
|
|
997
|
+
p.startOf = function(h, y) {
|
|
998
|
+
if (!this.$x || !this.$x.$timezone) return w.call(this, h, y);
|
|
999
|
+
var x = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1000
|
+
return w.call(x, h, y).tz(this.$x.$timezone, !0);
|
|
1001
|
+
}, l.tz = function(h, y, x) {
|
|
1002
|
+
var f = x && y, d = x || y || m, b = u(+l(), d);
|
|
1003
1003
|
if (typeof h != "string") return l(h).tz(d);
|
|
1004
|
-
var
|
|
1005
|
-
var z = L - 60 *
|
|
1006
|
-
if (
|
|
1007
|
-
var D = u(z -= 60 * (T -
|
|
1004
|
+
var _ = function(L, R, j) {
|
|
1005
|
+
var z = L - 60 * R * 1e3, T = u(z, j);
|
|
1006
|
+
if (R === T) return [z, R];
|
|
1007
|
+
var D = u(z -= 60 * (T - R) * 1e3, j);
|
|
1008
1008
|
return T === D ? [z, T] : [L - 60 * Math.min(T, D) * 1e3, Math.max(T, D)];
|
|
1009
|
-
}(l.utc(h, f).valueOf(),
|
|
1009
|
+
}(l.utc(h, f).valueOf(), b, d), v = _[0], S = _[1], N = l(v).utcOffset(S);
|
|
1010
1010
|
return N.$x.$timezone = d, N;
|
|
1011
1011
|
}, l.tz.guess = function() {
|
|
1012
1012
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1013
1013
|
}, l.tz.setDefault = function(h) {
|
|
1014
|
-
|
|
1014
|
+
m = h;
|
|
1015
1015
|
};
|
|
1016
1016
|
};
|
|
1017
1017
|
});
|
|
1018
1018
|
}(We)), We.exports;
|
|
1019
1019
|
}
|
|
1020
|
-
var
|
|
1021
|
-
const
|
|
1022
|
-
var Be = { exports: {} },
|
|
1023
|
-
function
|
|
1024
|
-
return
|
|
1020
|
+
var la = ia();
|
|
1021
|
+
const ca = /* @__PURE__ */ Et(la);
|
|
1022
|
+
var Be = { exports: {} }, ma = Be.exports, Qt;
|
|
1023
|
+
function da() {
|
|
1024
|
+
return Qt || (Qt = 1, function(e, t) {
|
|
1025
1025
|
(function(r, a) {
|
|
1026
1026
|
e.exports = a();
|
|
1027
|
-
})(
|
|
1027
|
+
})(ma, function() {
|
|
1028
1028
|
var r = "minute", a = /[+-]\d\d(?::?\d\d)?/g, i = /([+-]|\d\d)/g;
|
|
1029
|
-
return function(s, l,
|
|
1030
|
-
var
|
|
1031
|
-
|
|
1029
|
+
return function(s, l, m) {
|
|
1030
|
+
var c = l.prototype;
|
|
1031
|
+
m.utc = function(f) {
|
|
1032
1032
|
var d = { date: f, utc: !0, args: arguments };
|
|
1033
1033
|
return new l(d);
|
|
1034
|
-
},
|
|
1035
|
-
var d =
|
|
1034
|
+
}, c.utc = function(f) {
|
|
1035
|
+
var d = m(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1036
1036
|
return f ? d.add(this.utcOffset(), r) : d;
|
|
1037
|
-
},
|
|
1038
|
-
return
|
|
1037
|
+
}, c.local = function() {
|
|
1038
|
+
return m(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1039
1039
|
};
|
|
1040
|
-
var u =
|
|
1041
|
-
|
|
1040
|
+
var u = c.parse;
|
|
1041
|
+
c.parse = function(f) {
|
|
1042
1042
|
f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), u.call(this, f);
|
|
1043
1043
|
};
|
|
1044
|
-
var p =
|
|
1045
|
-
|
|
1044
|
+
var p = c.init;
|
|
1045
|
+
c.init = function() {
|
|
1046
1046
|
if (this.$u) {
|
|
1047
1047
|
var f = this.$d;
|
|
1048
1048
|
this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
|
|
1049
1049
|
} else p.call(this);
|
|
1050
1050
|
};
|
|
1051
|
-
var
|
|
1052
|
-
|
|
1053
|
-
var
|
|
1054
|
-
if (
|
|
1051
|
+
var w = c.utcOffset;
|
|
1052
|
+
c.utcOffset = function(f, d) {
|
|
1053
|
+
var b = this.$utils().u;
|
|
1054
|
+
if (b(f)) return this.$u ? 0 : b(this.$offset) ? w.call(this) : this.$offset;
|
|
1055
1055
|
if (typeof f == "string" && (f = function(N) {
|
|
1056
1056
|
N === void 0 && (N = "");
|
|
1057
1057
|
var L = N.match(a);
|
|
1058
1058
|
if (!L) return null;
|
|
1059
|
-
var
|
|
1059
|
+
var R = ("" + L[0]).match(i) || ["-", 0, 0], j = R[0], z = 60 * +R[1] + +R[2];
|
|
1060
1060
|
return z === 0 ? 0 : j === "+" ? z : -z;
|
|
1061
1061
|
}(f), f === null)) return this;
|
|
1062
|
-
var
|
|
1063
|
-
if (d) return
|
|
1062
|
+
var _ = Math.abs(f) <= 16 ? 60 * f : f, v = this;
|
|
1063
|
+
if (d) return v.$offset = _, v.$u = f === 0, v;
|
|
1064
1064
|
if (f !== 0) {
|
|
1065
|
-
var
|
|
1066
|
-
(
|
|
1067
|
-
} else
|
|
1068
|
-
return
|
|
1065
|
+
var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1066
|
+
(v = this.local().add(_ + S, r)).$offset = _, v.$x.$localOffset = S;
|
|
1067
|
+
} else v = this.utc();
|
|
1068
|
+
return v;
|
|
1069
1069
|
};
|
|
1070
|
-
var h =
|
|
1071
|
-
|
|
1070
|
+
var h = c.format;
|
|
1071
|
+
c.format = function(f) {
|
|
1072
1072
|
var d = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1073
1073
|
return h.call(this, d);
|
|
1074
|
-
},
|
|
1074
|
+
}, c.valueOf = function() {
|
|
1075
1075
|
var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1076
1076
|
return this.$d.valueOf() - 6e4 * f;
|
|
1077
|
-
},
|
|
1077
|
+
}, c.isUTC = function() {
|
|
1078
1078
|
return !!this.$u;
|
|
1079
|
-
},
|
|
1079
|
+
}, c.toISOString = function() {
|
|
1080
1080
|
return this.toDate().toISOString();
|
|
1081
|
-
},
|
|
1081
|
+
}, c.toString = function() {
|
|
1082
1082
|
return this.toDate().toUTCString();
|
|
1083
1083
|
};
|
|
1084
|
-
var
|
|
1085
|
-
|
|
1086
|
-
return f === "s" && this.$offset ?
|
|
1084
|
+
var y = c.toDate;
|
|
1085
|
+
c.toDate = function(f) {
|
|
1086
|
+
return f === "s" && this.$offset ? m(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
|
|
1087
1087
|
};
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1090
|
-
if (f && this.$u === f.$u) return
|
|
1091
|
-
var
|
|
1092
|
-
return
|
|
1088
|
+
var x = c.diff;
|
|
1089
|
+
c.diff = function(f, d, b) {
|
|
1090
|
+
if (f && this.$u === f.$u) return x.call(this, f, d, b);
|
|
1091
|
+
var _ = this.local(), v = m(f).local();
|
|
1092
|
+
return x.call(_, v, d, b);
|
|
1093
1093
|
};
|
|
1094
1094
|
};
|
|
1095
1095
|
});
|
|
1096
1096
|
}(Be)), Be.exports;
|
|
1097
1097
|
}
|
|
1098
|
-
var
|
|
1099
|
-
const
|
|
1100
|
-
Ce.extend(
|
|
1101
|
-
Ce.extend(
|
|
1102
|
-
Ce.extend(
|
|
1098
|
+
var ua = da();
|
|
1099
|
+
const fa = /* @__PURE__ */ Et(ua);
|
|
1100
|
+
Ce.extend(aa);
|
|
1101
|
+
Ce.extend(fa);
|
|
1102
|
+
Ce.extend(ca);
|
|
1103
1103
|
const Cr = (e, t = {}) => {
|
|
1104
1104
|
const {
|
|
1105
1105
|
minPrecision: r = 0,
|
|
@@ -1112,29 +1112,29 @@ const Cr = (e, t = {}) => {
|
|
|
1112
1112
|
if (e === 0)
|
|
1113
1113
|
return "0";
|
|
1114
1114
|
const l = Math.abs(e);
|
|
1115
|
-
let
|
|
1115
|
+
let m;
|
|
1116
1116
|
if (l >= 1e3)
|
|
1117
|
-
|
|
1117
|
+
m = 0;
|
|
1118
1118
|
else if (l >= 100)
|
|
1119
|
-
|
|
1119
|
+
m = 1;
|
|
1120
1120
|
else if (l >= 10)
|
|
1121
|
-
|
|
1121
|
+
m = 2;
|
|
1122
1122
|
else if (l >= 1)
|
|
1123
|
-
|
|
1123
|
+
m = 3;
|
|
1124
1124
|
else if (l >= 0.1)
|
|
1125
|
-
|
|
1125
|
+
m = 4;
|
|
1126
1126
|
else if (l >= 0.01)
|
|
1127
|
-
|
|
1128
|
-
else if (
|
|
1127
|
+
m = 5;
|
|
1128
|
+
else if (m = a, l > 0) {
|
|
1129
1129
|
const u = Math.floor(Math.log10(l));
|
|
1130
|
-
u < 0 && (
|
|
1130
|
+
u < 0 && (m = Math.min(Math.abs(u) + 2, a));
|
|
1131
1131
|
}
|
|
1132
|
-
return
|
|
1133
|
-
minimumFractionDigits: i ? 0 :
|
|
1134
|
-
maximumFractionDigits:
|
|
1132
|
+
return m = Math.max(m, r), new Intl.NumberFormat(void 0, {
|
|
1133
|
+
minimumFractionDigits: i ? 0 : m,
|
|
1134
|
+
maximumFractionDigits: m,
|
|
1135
1135
|
useGrouping: s
|
|
1136
1136
|
}).format(e);
|
|
1137
|
-
},
|
|
1137
|
+
}, Xt = (e) => typeof e == "object" && !!e && "display" in e && "sortValue" in e, Sr = 1900, Dr = 2200, gt = (e, t) => ({ format: e, type: "zonedatetime", zone: t }), B = (e) => ({ format: e, type: "datetime" }), be = (e) => ({ format: e, type: "date" }), pa = [
|
|
1138
1138
|
// ISO 8601 formats
|
|
1139
1139
|
gt("YYYY-MM-DDTHH:mm:ss.SSSZ", "UTC"),
|
|
1140
1140
|
gt("YYYY-MM-DDTHH:mm:ssZ", "UTC"),
|
|
@@ -1162,14 +1162,14 @@ const Cr = (e, t = {}) => {
|
|
|
1162
1162
|
B("MM-DD-YYYY HH:mm"),
|
|
1163
1163
|
B("MM/DD/YYYY HH:mm:ss"),
|
|
1164
1164
|
B("MM/DD/YYYY HH:mm")
|
|
1165
|
-
],
|
|
1165
|
+
], Jt = (e) => {
|
|
1166
1166
|
if (typeof e != "string") return { isValid: !1 };
|
|
1167
1167
|
const t = e.replace(/[-/.:\s]/g, "");
|
|
1168
1168
|
if (/^\d+$/.test(t)) {
|
|
1169
1169
|
if (t.length < 6) return { isValid: !1 };
|
|
1170
1170
|
if (e.length === t.length) return { isValid: !1 };
|
|
1171
1171
|
}
|
|
1172
|
-
for (const r of
|
|
1172
|
+
for (const r of pa) {
|
|
1173
1173
|
let a;
|
|
1174
1174
|
try {
|
|
1175
1175
|
r.type === "zonedatetime" ? a = Ce.tz(e, r.format, r.zone) : a = Ce(e, r.format, !0);
|
|
@@ -1203,7 +1203,7 @@ const Cr = (e, t = {}) => {
|
|
|
1203
1203
|
} catch {
|
|
1204
1204
|
}
|
|
1205
1205
|
if (r && typeof r == "object" && Object.keys(r).length === 1 && "value" in r) {
|
|
1206
|
-
const i = r.value, s =
|
|
1206
|
+
const i = r.value, s = Jt(i);
|
|
1207
1207
|
return s.isValid ? {
|
|
1208
1208
|
display: s.isDateTime ? s.parsedDate.format("YYYY-MM-DD HH:mm:ss") : s.parsedDate.format("YYYY-MM-DD"),
|
|
1209
1209
|
sortValue: s.parsedDate.valueOf()
|
|
@@ -1212,7 +1212,7 @@ const Cr = (e, t = {}) => {
|
|
|
1212
1212
|
sortValue: i
|
|
1213
1213
|
};
|
|
1214
1214
|
}
|
|
1215
|
-
const a =
|
|
1215
|
+
const a = Jt(r);
|
|
1216
1216
|
if (a.isValid)
|
|
1217
1217
|
return {
|
|
1218
1218
|
display: a.isDateTime ? a.parsedDate.format("YYYY-MM-DD HH:mm:ss") : a.parsedDate.format("YYYY-MM-DD"),
|
|
@@ -1245,7 +1245,7 @@ const Cr = (e, t = {}) => {
|
|
|
1245
1245
|
yAxisDataKey: o.string().optional(),
|
|
1246
1246
|
dimensionDataKey: o.string().optional(),
|
|
1247
1247
|
valueColumns: o.array(o.string()).optional()
|
|
1248
|
-
},
|
|
1248
|
+
}, ha = o.discriminatedUnion("type", [
|
|
1249
1249
|
// Bar chart
|
|
1250
1250
|
o.object({
|
|
1251
1251
|
type: o.literal("bar"),
|
|
@@ -1271,13 +1271,13 @@ const Cr = (e, t = {}) => {
|
|
|
1271
1271
|
nameKey: o.string(),
|
|
1272
1272
|
dataKey: o.string()
|
|
1273
1273
|
})
|
|
1274
|
-
]),
|
|
1274
|
+
]), ga = o.object({
|
|
1275
1275
|
id: o.number(),
|
|
1276
1276
|
flow_data_id: o.number(),
|
|
1277
1277
|
created_at: o.string(),
|
|
1278
|
-
configuration:
|
|
1278
|
+
configuration: ha,
|
|
1279
1279
|
sql: o.string()
|
|
1280
|
-
}),
|
|
1280
|
+
}), ba = o.array(
|
|
1281
1281
|
o.record(
|
|
1282
1282
|
o.string(),
|
|
1283
1283
|
// any key
|
|
@@ -1288,22 +1288,22 @@ const Cr = (e, t = {}) => {
|
|
|
1288
1288
|
])
|
|
1289
1289
|
// value types
|
|
1290
1290
|
)
|
|
1291
|
-
).openapi("VisualizationData"), rt =
|
|
1291
|
+
).openapi("VisualizationData"), rt = ga.omit({
|
|
1292
1292
|
sql: !0
|
|
1293
1293
|
}), Nr = o.object({
|
|
1294
1294
|
wasSampled: o.boolean(),
|
|
1295
1295
|
originalCount: o.number(),
|
|
1296
1296
|
sampledCount: o.number()
|
|
1297
|
-
}).optional(),
|
|
1298
|
-
data:
|
|
1297
|
+
}).optional(), ya = rt.extend({
|
|
1298
|
+
data: ba,
|
|
1299
1299
|
_metadata: Nr
|
|
1300
|
-
}),
|
|
1300
|
+
}), va = o.object({ name: o.coerce.string(), value: o.coerce.number() }).or(
|
|
1301
1301
|
o.object({
|
|
1302
1302
|
x: o.coerce.number(),
|
|
1303
1303
|
y: o.coerce.number()
|
|
1304
1304
|
})
|
|
1305
|
-
).array().openapi("OldVisualizationData"),
|
|
1306
|
-
data:
|
|
1305
|
+
).array().openapi("OldVisualizationData"), wa = rt.extend({
|
|
1306
|
+
data: va,
|
|
1307
1307
|
_metadata: Nr
|
|
1308
1308
|
}), qe = {
|
|
1309
1309
|
PENDING: "pending",
|
|
@@ -1314,7 +1314,7 @@ const Cr = (e, t = {}) => {
|
|
|
1314
1314
|
KEY_FINDINGS: "key_findings",
|
|
1315
1315
|
VISUALIZATION: "visualization",
|
|
1316
1316
|
SYNTHESIS: "synthesis"
|
|
1317
|
-
},
|
|
1317
|
+
}, er = o.object({
|
|
1318
1318
|
id: o.number(),
|
|
1319
1319
|
flow_data_id: o.number(),
|
|
1320
1320
|
type: o.enum([
|
|
@@ -1336,7 +1336,7 @@ const Cr = (e, t = {}) => {
|
|
|
1336
1336
|
required: !1
|
|
1337
1337
|
},
|
|
1338
1338
|
type: "integer"
|
|
1339
|
-
}),
|
|
1339
|
+
}), xa = o.string().transform((e) => e ? e.split(",").map((t) => {
|
|
1340
1340
|
const [r, a = "ASC"] = t.split(":");
|
|
1341
1341
|
return {
|
|
1342
1342
|
column: r,
|
|
@@ -1355,12 +1355,12 @@ const Cr = (e, t = {}) => {
|
|
|
1355
1355
|
example: "name:asc,date:desc"
|
|
1356
1356
|
},
|
|
1357
1357
|
type: "string"
|
|
1358
|
-
}),
|
|
1358
|
+
}), _a = o.string().pipe(o.coerce.number()).optional().openapi({
|
|
1359
1359
|
param: {
|
|
1360
1360
|
required: !1
|
|
1361
1361
|
},
|
|
1362
1362
|
type: "number"
|
|
1363
|
-
}),
|
|
1363
|
+
}), ka = o.string().transform((e) => e ? e.split(",").map((t) => {
|
|
1364
1364
|
const [r, a = ""] = t.split(":").map(decodeURIComponent);
|
|
1365
1365
|
return { column: r, value: a };
|
|
1366
1366
|
}) : []).pipe(
|
|
@@ -1376,7 +1376,7 @@ const Cr = (e, t = {}) => {
|
|
|
1376
1376
|
example: "status:active,name:John%20Doe"
|
|
1377
1377
|
},
|
|
1378
1378
|
type: "string"
|
|
1379
|
-
}), de = o.object({ flowId: o.string().uuid() }).openapi("FlowId", { type: "string" }), ue = o.object({ flowDataId: o.string().pipe(o.coerce.number()) }).openapi("FlowDataId", { type: "integer" }),
|
|
1379
|
+
}), de = o.object({ flowId: o.string().uuid() }).openapi("FlowId", { type: "string" }), ue = o.object({ flowDataId: o.string().pipe(o.coerce.number()) }).openapi("FlowDataId", { type: "integer" }), Ca = Y({
|
|
1380
1380
|
method: "get",
|
|
1381
1381
|
path: "/api/v1/flows/{flowId}/columns",
|
|
1382
1382
|
operationId: "retrieveFlowColumns",
|
|
@@ -1390,7 +1390,7 @@ const Cr = (e, t = {}) => {
|
|
|
1390
1390
|
description: "A list containing the columns of the flow",
|
|
1391
1391
|
content: {
|
|
1392
1392
|
"application/json": {
|
|
1393
|
-
schema:
|
|
1393
|
+
schema: Kn
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
},
|
|
@@ -1413,7 +1413,7 @@ const Cr = (e, t = {}) => {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
}),
|
|
1416
|
+
}), Sa = Y({
|
|
1417
1417
|
method: "get",
|
|
1418
1418
|
path: "/api/v1/flows/{flowId}/data-reports",
|
|
1419
1419
|
operationId: "retrieveFlowDataReports",
|
|
@@ -1449,7 +1449,7 @@ const Cr = (e, t = {}) => {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
|
-
}),
|
|
1452
|
+
}), Da = Y({
|
|
1453
1453
|
method: "get",
|
|
1454
1454
|
path: "/api/v1/flows/{flowId}/insights",
|
|
1455
1455
|
operationId: "retrieveInsights",
|
|
@@ -1497,7 +1497,7 @@ const Cr = (e, t = {}) => {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
}),
|
|
1500
|
+
}), Na = Y({
|
|
1501
1501
|
method: "get",
|
|
1502
1502
|
path: "/api/v1/flows/{flowId}/data",
|
|
1503
1503
|
operationId: "retrieveFlowData",
|
|
@@ -1506,9 +1506,9 @@ const Cr = (e, t = {}) => {
|
|
|
1506
1506
|
params: de,
|
|
1507
1507
|
query: o.object({
|
|
1508
1508
|
limit: jr,
|
|
1509
|
-
order:
|
|
1510
|
-
cursor:
|
|
1511
|
-
filter:
|
|
1509
|
+
order: xa,
|
|
1510
|
+
cursor: _a,
|
|
1511
|
+
filter: ka,
|
|
1512
1512
|
flowDataId: ue.shape.flowDataId.openapi({
|
|
1513
1513
|
type: "integer",
|
|
1514
1514
|
param: { required: !0 }
|
|
@@ -1520,7 +1520,7 @@ const Cr = (e, t = {}) => {
|
|
|
1520
1520
|
description: "The content of the flow",
|
|
1521
1521
|
content: {
|
|
1522
1522
|
"application/json": {
|
|
1523
|
-
schema:
|
|
1523
|
+
schema: Wn
|
|
1524
1524
|
}
|
|
1525
1525
|
}
|
|
1526
1526
|
},
|
|
@@ -1543,7 +1543,7 @@ const Cr = (e, t = {}) => {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
}),
|
|
1546
|
+
}), ja = Y({
|
|
1547
1547
|
method: "get",
|
|
1548
1548
|
path: "/api/v1/flows/{flowId}/count",
|
|
1549
1549
|
operationId: "retrieveFlowDataCount",
|
|
@@ -1589,7 +1589,7 @@ const Cr = (e, t = {}) => {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
}),
|
|
1592
|
+
}), Ma = Y({
|
|
1593
1593
|
method: "get",
|
|
1594
1594
|
path: "/api/v1/flows/{flowId}",
|
|
1595
1595
|
operationId: "retrieveFlow",
|
|
@@ -1625,7 +1625,7 @@ const Cr = (e, t = {}) => {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
|
-
}),
|
|
1628
|
+
}), za = Y({
|
|
1629
1629
|
method: "get",
|
|
1630
1630
|
path: "/api/v1/recent-flows",
|
|
1631
1631
|
operationId: "retrieveRecentFlows",
|
|
@@ -1701,7 +1701,7 @@ Y({
|
|
|
1701
1701
|
params: ue,
|
|
1702
1702
|
headers: O,
|
|
1703
1703
|
query: o.object({
|
|
1704
|
-
type:
|
|
1704
|
+
type: er.shape.type.optional()
|
|
1705
1705
|
})
|
|
1706
1706
|
},
|
|
1707
1707
|
responses: {
|
|
@@ -1709,7 +1709,7 @@ Y({
|
|
|
1709
1709
|
description: "A list of workflow jobs",
|
|
1710
1710
|
content: {
|
|
1711
1711
|
"application/json": {
|
|
1712
|
-
schema:
|
|
1712
|
+
schema: er.array()
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
1715
|
},
|
|
@@ -1751,7 +1751,7 @@ Y({
|
|
|
1751
1751
|
description: "The synthesis of the flow data",
|
|
1752
1752
|
content: {
|
|
1753
1753
|
"application/json": {
|
|
1754
|
-
schema:
|
|
1754
|
+
schema: ea
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
},
|
|
@@ -1765,7 +1765,7 @@ Y({
|
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
|
-
const
|
|
1768
|
+
const Fa = Y({
|
|
1769
1769
|
method: "get",
|
|
1770
1770
|
path: "/api/v1/flow-data/{flowDataId}/feedback",
|
|
1771
1771
|
operationId: "retrieveFeedback",
|
|
@@ -1835,7 +1835,7 @@ const Aa = Y({
|
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
}),
|
|
1838
|
+
}), Ia = Y({
|
|
1839
1839
|
method: "delete",
|
|
1840
1840
|
path: "/api/v1/flow-data/{flowDataId}/feedback",
|
|
1841
1841
|
operationId: "deleteFeedback",
|
|
@@ -1866,7 +1866,7 @@ const Aa = Y({
|
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
}),
|
|
1869
|
+
}), Aa = Y({
|
|
1870
1870
|
method: "get",
|
|
1871
1871
|
path: "/api/v1/flow-data/{flowDataId}/explainability",
|
|
1872
1872
|
operationId: "retrieveFlowDataExplainability",
|
|
@@ -1879,7 +1879,7 @@ const Aa = Y({
|
|
|
1879
1879
|
description: "The explainability of the flow data",
|
|
1880
1880
|
content: {
|
|
1881
1881
|
"application/json": {
|
|
1882
|
-
schema:
|
|
1882
|
+
schema: Xn
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
},
|
|
@@ -1902,7 +1902,7 @@ const Aa = Y({
|
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
}),
|
|
1905
|
+
}), Ta = o.discriminatedUnion("status", [
|
|
1906
1906
|
o.object({
|
|
1907
1907
|
status: o.literal("error"),
|
|
1908
1908
|
error: o.string()
|
|
@@ -1911,7 +1911,7 @@ const Aa = Y({
|
|
|
1911
1911
|
status: o.literal("success"),
|
|
1912
1912
|
flowId: o.string()
|
|
1913
1913
|
})
|
|
1914
|
-
]),
|
|
1914
|
+
]), Ea = Y({
|
|
1915
1915
|
method: "post",
|
|
1916
1916
|
path: "/api/v1/end2end",
|
|
1917
1917
|
operationId: "runEnd2EndFlow",
|
|
@@ -1934,12 +1934,12 @@ const Aa = Y({
|
|
|
1934
1934
|
description: "Run the end2end flow",
|
|
1935
1935
|
content: {
|
|
1936
1936
|
"application/json": {
|
|
1937
|
-
schema:
|
|
1937
|
+
schema: Ta
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
|
-
}),
|
|
1942
|
+
}), Ya = ({
|
|
1943
1943
|
cursor: e,
|
|
1944
1944
|
filters: t,
|
|
1945
1945
|
sorting: r,
|
|
@@ -1949,13 +1949,13 @@ const Aa = Y({
|
|
|
1949
1949
|
a !== void 0 && (i.limit = a), e !== void 0 && (i.cursor = e);
|
|
1950
1950
|
const s = r == null ? void 0 : r.map((l) => `${l.id}:${l.desc ? "DESC" : "ASC"}`).join(",");
|
|
1951
1951
|
if (s && (i.order = s), t) {
|
|
1952
|
-
const l = Object.entries(t).flatMap(([
|
|
1952
|
+
const l = Object.entries(t).flatMap(([m, c]) => typeof c == "string" || typeof c == "boolean" || typeof c == "number" ? `${m}:${encodeURIComponent(c)}` : []).join(",");
|
|
1953
1953
|
l.length > 0 && (i.filter = l);
|
|
1954
1954
|
}
|
|
1955
1955
|
return i;
|
|
1956
|
-
},
|
|
1956
|
+
}, La = (e) => Ke({
|
|
1957
1957
|
mutationFn: async (t) => {
|
|
1958
|
-
const { data: r } = await P.POST(
|
|
1958
|
+
const { data: r } = await P.POST(Ea.path, {
|
|
1959
1959
|
body: {
|
|
1960
1960
|
userQuery: t
|
|
1961
1961
|
}
|
|
@@ -1965,11 +1965,11 @@ const Aa = Y({
|
|
|
1965
1965
|
return r;
|
|
1966
1966
|
},
|
|
1967
1967
|
...e
|
|
1968
|
-
}),
|
|
1968
|
+
}), Pa = (e, t) => G({
|
|
1969
1969
|
queryKey: ["flowColumns", { flowId: e, flowDataId: t }],
|
|
1970
1970
|
staleTime: 1 / 0,
|
|
1971
1971
|
queryFn: async () => {
|
|
1972
|
-
const { data: r, error: a } = await P.GET(
|
|
1972
|
+
const { data: r, error: a } = await P.GET(Ca.path, {
|
|
1973
1973
|
params: {
|
|
1974
1974
|
path: {
|
|
1975
1975
|
flowId: e
|
|
@@ -1983,11 +1983,11 @@ const Aa = Y({
|
|
|
1983
1983
|
throw new Error(`Failed to fetch results columns for flow ${e}`);
|
|
1984
1984
|
return r;
|
|
1985
1985
|
}
|
|
1986
|
-
}),
|
|
1986
|
+
}), $a = (e, t) => G({
|
|
1987
1987
|
queryKey: ["flowDataCount", { flowId: e, flowDataId: t }],
|
|
1988
1988
|
staleTime: 1 / 0,
|
|
1989
1989
|
queryFn: async () => {
|
|
1990
|
-
const { data: r, error: a } = await P.GET(
|
|
1990
|
+
const { data: r, error: a } = await P.GET(ja.path, {
|
|
1991
1991
|
params: {
|
|
1992
1992
|
path: { flowId: e },
|
|
1993
1993
|
query: {
|
|
@@ -2001,15 +2001,15 @@ const Aa = Y({
|
|
|
2001
2001
|
), new Error(`Failed to fetch data count for flow ${e}`);
|
|
2002
2002
|
return r;
|
|
2003
2003
|
}
|
|
2004
|
-
}),
|
|
2004
|
+
}), Oa = async (e, {
|
|
2005
2005
|
limit: t,
|
|
2006
2006
|
sorting: r,
|
|
2007
2007
|
filters: a,
|
|
2008
2008
|
cursor: i
|
|
2009
2009
|
}, s) => {
|
|
2010
|
-
const l =
|
|
2010
|
+
const l = Ya({ limit: t, sorting: r, filters: a, cursor: i }), m = await Tt($), { data: c, error: u } = await P.GET(Na.path, {
|
|
2011
2011
|
params: {
|
|
2012
|
-
...
|
|
2012
|
+
...m,
|
|
2013
2013
|
path: { flowId: e },
|
|
2014
2014
|
query: {
|
|
2015
2015
|
flowDataId: s,
|
|
@@ -2022,12 +2022,12 @@ const Aa = Y({
|
|
|
2022
2022
|
});
|
|
2023
2023
|
if (u)
|
|
2024
2024
|
throw console.error(`Failed to fetch data for flow ${e}: ${u.error}`), new Error(`Failed to fetch data for flow ${e}`);
|
|
2025
|
-
return
|
|
2026
|
-
},
|
|
2025
|
+
return c;
|
|
2026
|
+
}, Ha = (e, { pageSize: t = 20 }, r) => Ro({
|
|
2027
2027
|
queryKey: ["infinite-flowData", { flowId: e }, { pageSize: t, flowDataId: r }],
|
|
2028
2028
|
queryFn: async ({ pageParam: a = 0 }) => {
|
|
2029
2029
|
const i = a * t;
|
|
2030
|
-
return
|
|
2030
|
+
return Oa(
|
|
2031
2031
|
e,
|
|
2032
2032
|
{
|
|
2033
2033
|
limit: t,
|
|
@@ -2041,12 +2041,12 @@ const Aa = Y({
|
|
|
2041
2041
|
initialPageParam: 0,
|
|
2042
2042
|
getNextPageParam: (a, i) => a.length < t ? null : i.length,
|
|
2043
2043
|
refetchOnWindowFocus: !1,
|
|
2044
|
-
placeholderData:
|
|
2045
|
-
}),
|
|
2044
|
+
placeholderData: Io
|
|
2045
|
+
}), Va = (e) => Mt({
|
|
2046
2046
|
queryKey: ["recentFlows", { limit: e }],
|
|
2047
2047
|
queryFn: async () => {
|
|
2048
2048
|
if (!$) return [];
|
|
2049
|
-
const { data: t, error: r } = await P.GET(
|
|
2049
|
+
const { data: t, error: r } = await P.GET(za.path, {
|
|
2050
2050
|
params: {
|
|
2051
2051
|
query: {
|
|
2052
2052
|
limit: e
|
|
@@ -2057,65 +2057,17 @@ const Aa = Y({
|
|
|
2057
2057
|
throw new Error(r.error);
|
|
2058
2058
|
return t;
|
|
2059
2059
|
}
|
|
2060
|
-
}),
|
|
2061
|
-
const t =
|
|
2060
|
+
}), qa = (e) => {
|
|
2061
|
+
const t = se();
|
|
2062
2062
|
return G({
|
|
2063
|
-
...
|
|
2063
|
+
...Va(e),
|
|
2064
2064
|
enabled: t
|
|
2065
2065
|
});
|
|
2066
|
-
}
|
|
2067
|
-
starter: o.string(),
|
|
2068
|
-
explanation: o.string(),
|
|
2069
|
-
type: o.string()
|
|
2070
|
-
}).describe("Starter recommendations").openapi("StarterRecommendation"), Wa = Y({
|
|
2071
|
-
method: "get",
|
|
2072
|
-
path: "/api/v1/recommendations",
|
|
2073
|
-
operationId: "getStarterRecommendations",
|
|
2074
|
-
request: {
|
|
2075
|
-
headers: O,
|
|
2076
|
-
query: o.object({
|
|
2077
|
-
count: o.string().pipe(o.coerce.number()).optional().openapi({ type: "number" })
|
|
2078
|
-
})
|
|
2079
|
-
},
|
|
2080
|
-
responses: {
|
|
2081
|
-
200: {
|
|
2082
|
-
content: {
|
|
2083
|
-
"application/json": {
|
|
2084
|
-
schema: o.object({
|
|
2085
|
-
recommendations: Za.array()
|
|
2086
|
-
})
|
|
2087
|
-
}
|
|
2088
|
-
},
|
|
2089
|
-
description: "Get starter recommendations"
|
|
2090
|
-
},
|
|
2091
|
-
500: {
|
|
2092
|
-
description: "Something wrong happened",
|
|
2093
|
-
content: {
|
|
2094
|
-
"application/json": {
|
|
2095
|
-
schema: o.object({
|
|
2096
|
-
error: o.string()
|
|
2097
|
-
})
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
}), zr = () => Mt({
|
|
2103
|
-
queryKey: ["recommendations"],
|
|
2104
|
-
queryFn: async ({ signal: e }) => {
|
|
2105
|
-
const { data: t, error: r } = await P.GET(Wa.path, {
|
|
2106
|
-
params: { query: { count: 9 } },
|
|
2107
|
-
signal: e
|
|
2108
|
-
});
|
|
2109
|
-
if (r)
|
|
2110
|
-
throw new Error(r.error);
|
|
2111
|
-
return t.recommendations;
|
|
2112
|
-
},
|
|
2113
|
-
staleTime: 60 * 1e3
|
|
2114
|
-
}), Ba = () => G(zr());
|
|
2066
|
+
};
|
|
2115
2067
|
function k(...e) {
|
|
2116
|
-
return
|
|
2068
|
+
return Lo(Yo(e));
|
|
2117
2069
|
}
|
|
2118
|
-
const
|
|
2070
|
+
const Ua = Ee(
|
|
2119
2071
|
"mm:inline-flex mm:items-center mm:justify-center mm:whitespace-nowrap mm:rounded-md mm:text-sm mm:font-medium mm:transition-all mm:disabled:pointer-events-none mm:disabled:opacity-50 mm:shrink-0 mm:outline-none mm:font-sans mm:border-card mm:text-card",
|
|
2120
2072
|
{
|
|
2121
2073
|
variants: {
|
|
@@ -2147,7 +2099,7 @@ const Ka = Ee(
|
|
|
2147
2099
|
{
|
|
2148
2100
|
ref: s,
|
|
2149
2101
|
"data-slot": "button",
|
|
2150
|
-
className: k(
|
|
2102
|
+
className: k(Ua({ variant: t, size: r, className: e })),
|
|
2151
2103
|
...i
|
|
2152
2104
|
}
|
|
2153
2105
|
)
|
|
@@ -2188,7 +2140,7 @@ const Ka = Ee(
|
|
|
2188
2140
|
children: t
|
|
2189
2141
|
}
|
|
2190
2142
|
)
|
|
2191
|
-
),
|
|
2143
|
+
), Za = Ee("mm:bg-background", {
|
|
2192
2144
|
variants: {
|
|
2193
2145
|
variant: {
|
|
2194
2146
|
default: "mm:border mm:border-muted",
|
|
@@ -2210,13 +2162,13 @@ const Ka = Ee(
|
|
|
2210
2162
|
a ? Te : "div",
|
|
2211
2163
|
{
|
|
2212
2164
|
ref: s,
|
|
2213
|
-
className: k(
|
|
2165
|
+
className: k(Za({ variant: t, size: r }), e),
|
|
2214
2166
|
...i
|
|
2215
2167
|
}
|
|
2216
2168
|
)
|
|
2217
2169
|
);
|
|
2218
2170
|
X.displayName = "Paper";
|
|
2219
|
-
const
|
|
2171
|
+
const Wa = Ee("", {
|
|
2220
2172
|
variants: {
|
|
2221
2173
|
ff: {
|
|
2222
2174
|
sans: "mm:font-sans",
|
|
@@ -2227,16 +2179,16 @@ const Qa = Ee("", {
|
|
|
2227
2179
|
defaultVariants: {
|
|
2228
2180
|
ff: "sans"
|
|
2229
2181
|
}
|
|
2230
|
-
}),
|
|
2182
|
+
}), C = Nt.forwardRef(
|
|
2231
2183
|
({ className: e, ff: t, asChild: r = !1, as: a = "p", ...i }, s) => /* @__PURE__ */ n(
|
|
2232
2184
|
r ? Te : a,
|
|
2233
2185
|
{
|
|
2234
2186
|
ref: s,
|
|
2235
|
-
className: k(
|
|
2187
|
+
className: k(Wa({ ff: t }), e),
|
|
2236
2188
|
...i
|
|
2237
2189
|
}
|
|
2238
2190
|
)
|
|
2239
|
-
),
|
|
2191
|
+
), tr = {
|
|
2240
2192
|
visible: {
|
|
2241
2193
|
opacity: 1,
|
|
2242
2194
|
transition: {
|
|
@@ -2255,38 +2207,38 @@ const Qa = Ee("", {
|
|
|
2255
2207
|
ease: "easeIn"
|
|
2256
2208
|
}
|
|
2257
2209
|
}
|
|
2258
|
-
},
|
|
2210
|
+
}, Ba = ["mousedown", "touchstart"], Ka = (e, t, r) => {
|
|
2259
2211
|
const a = te(null);
|
|
2260
2212
|
return H(() => {
|
|
2261
|
-
const i = new AbortController(), s = (
|
|
2213
|
+
const i = new AbortController(), s = (c) => {
|
|
2262
2214
|
var h;
|
|
2263
|
-
const { target: u } =
|
|
2215
|
+
const { target: u } = c ?? {}, p = (h = a.current) == null ? void 0 : h.getRootNode(), w = p instanceof ShadowRoot;
|
|
2264
2216
|
if (Array.isArray(r)) {
|
|
2265
|
-
const
|
|
2266
|
-
r.every((d) => d ? !
|
|
2217
|
+
const y = (u == null ? void 0 : u.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(u) && u.tagName !== "HTML", x = c.composedPath();
|
|
2218
|
+
r.every((d) => d ? !x.includes(d) : !0) && !y && e();
|
|
2267
2219
|
} else if (a.current)
|
|
2268
|
-
if (
|
|
2269
|
-
const
|
|
2270
|
-
(!
|
|
2220
|
+
if (w) {
|
|
2221
|
+
const y = c.composedPath(), x = y.includes(p), f = y.includes(a.current);
|
|
2222
|
+
(!x || x && !f) && e();
|
|
2271
2223
|
} else a.current.contains(u) || e();
|
|
2272
2224
|
}, l = { capture: !0, passive: !0, signal: i.signal };
|
|
2273
|
-
return
|
|
2274
|
-
(
|
|
2225
|
+
return Ba.forEach(
|
|
2226
|
+
(c) => document.addEventListener(c, s, l)
|
|
2275
2227
|
), () => {
|
|
2276
2228
|
i.abort();
|
|
2277
2229
|
};
|
|
2278
2230
|
}, [a, e, r, t]), a;
|
|
2279
2231
|
};
|
|
2280
|
-
var
|
|
2232
|
+
var Mr = {
|
|
2281
2233
|
color: void 0,
|
|
2282
2234
|
size: void 0,
|
|
2283
2235
|
className: void 0,
|
|
2284
2236
|
style: void 0,
|
|
2285
2237
|
attr: void 0
|
|
2286
|
-
},
|
|
2287
|
-
function
|
|
2238
|
+
}, rr = Q.createContext && /* @__PURE__ */ Q.createContext(Mr), Ga = ["attr", "size", "title"];
|
|
2239
|
+
function Qa(e, t) {
|
|
2288
2240
|
if (e == null) return {};
|
|
2289
|
-
var r =
|
|
2241
|
+
var r = Xa(e, t), a, i;
|
|
2290
2242
|
if (Object.getOwnPropertySymbols) {
|
|
2291
2243
|
var s = Object.getOwnPropertySymbols(e);
|
|
2292
2244
|
for (i = 0; i < s.length; i++)
|
|
@@ -2294,7 +2246,7 @@ function ts(e, t) {
|
|
|
2294
2246
|
}
|
|
2295
2247
|
return r;
|
|
2296
2248
|
}
|
|
2297
|
-
function
|
|
2249
|
+
function Xa(e, t) {
|
|
2298
2250
|
if (e == null) return {};
|
|
2299
2251
|
var r = {};
|
|
2300
2252
|
for (var a in e)
|
|
@@ -2314,7 +2266,7 @@ function Qe() {
|
|
|
2314
2266
|
return e;
|
|
2315
2267
|
}, Qe.apply(this, arguments);
|
|
2316
2268
|
}
|
|
2317
|
-
function
|
|
2269
|
+
function or(e, t) {
|
|
2318
2270
|
var r = Object.keys(e);
|
|
2319
2271
|
if (Object.getOwnPropertySymbols) {
|
|
2320
2272
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -2327,22 +2279,22 @@ function nr(e, t) {
|
|
|
2327
2279
|
function Xe(e) {
|
|
2328
2280
|
for (var t = 1; t < arguments.length; t++) {
|
|
2329
2281
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
2330
|
-
t % 2 ?
|
|
2331
|
-
|
|
2332
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
2282
|
+
t % 2 ? or(Object(r), !0).forEach(function(a) {
|
|
2283
|
+
Ja(e, a, r[a]);
|
|
2284
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : or(Object(r)).forEach(function(a) {
|
|
2333
2285
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(r, a));
|
|
2334
2286
|
});
|
|
2335
2287
|
}
|
|
2336
2288
|
return e;
|
|
2337
2289
|
}
|
|
2338
|
-
function
|
|
2339
|
-
return t =
|
|
2290
|
+
function Ja(e, t, r) {
|
|
2291
|
+
return t = es(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
2340
2292
|
}
|
|
2341
|
-
function
|
|
2342
|
-
var t =
|
|
2293
|
+
function es(e) {
|
|
2294
|
+
var t = ts(e, "string");
|
|
2343
2295
|
return typeof t == "symbol" ? t : t + "";
|
|
2344
2296
|
}
|
|
2345
|
-
function
|
|
2297
|
+
function ts(e, t) {
|
|
2346
2298
|
if (typeof e != "object" || !e) return e;
|
|
2347
2299
|
var r = e[Symbol.toPrimitive];
|
|
2348
2300
|
if (r !== void 0) {
|
|
@@ -2352,83 +2304,83 @@ function as(e, t) {
|
|
|
2352
2304
|
}
|
|
2353
2305
|
return (t === "string" ? String : Number)(e);
|
|
2354
2306
|
}
|
|
2355
|
-
function
|
|
2307
|
+
function zr(e) {
|
|
2356
2308
|
return e && e.map((t, r) => /* @__PURE__ */ Q.createElement(t.tag, Xe({
|
|
2357
2309
|
key: r
|
|
2358
|
-
}, t.attr),
|
|
2310
|
+
}, t.attr), zr(t.child)));
|
|
2359
2311
|
}
|
|
2360
2312
|
function Z(e) {
|
|
2361
|
-
return (t) => /* @__PURE__ */ Q.createElement(
|
|
2313
|
+
return (t) => /* @__PURE__ */ Q.createElement(rs, Qe({
|
|
2362
2314
|
attr: Xe({}, e.attr)
|
|
2363
|
-
}, t),
|
|
2315
|
+
}, t), zr(e.child));
|
|
2364
2316
|
}
|
|
2365
|
-
function
|
|
2317
|
+
function rs(e) {
|
|
2366
2318
|
var t = (r) => {
|
|
2367
2319
|
var {
|
|
2368
2320
|
attr: a,
|
|
2369
2321
|
size: i,
|
|
2370
2322
|
title: s
|
|
2371
|
-
} = e, l =
|
|
2372
|
-
return r.className && (
|
|
2323
|
+
} = e, l = Qa(e, Ga), m = i || r.size || "1em", c;
|
|
2324
|
+
return r.className && (c = r.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ Q.createElement("svg", Qe({
|
|
2373
2325
|
stroke: "currentColor",
|
|
2374
2326
|
fill: "currentColor",
|
|
2375
2327
|
strokeWidth: "0"
|
|
2376
2328
|
}, r.attr, a, l, {
|
|
2377
|
-
className:
|
|
2329
|
+
className: c,
|
|
2378
2330
|
style: Xe(Xe({
|
|
2379
2331
|
color: e.color || r.color
|
|
2380
2332
|
}, r.style), e.style),
|
|
2381
|
-
height:
|
|
2382
|
-
width:
|
|
2333
|
+
height: m,
|
|
2334
|
+
width: m,
|
|
2383
2335
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2384
2336
|
}), s && /* @__PURE__ */ Q.createElement("title", null, s), e.children);
|
|
2385
2337
|
};
|
|
2386
|
-
return
|
|
2338
|
+
return rr !== void 0 ? /* @__PURE__ */ Q.createElement(rr.Consumer, null, (r) => t(r)) : t(Mr);
|
|
2387
2339
|
}
|
|
2388
|
-
function
|
|
2340
|
+
function os(e) {
|
|
2389
2341
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" }, child: [] }] })(e);
|
|
2390
2342
|
}
|
|
2391
|
-
function
|
|
2343
|
+
function Fr(e) {
|
|
2392
2344
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 15h7v7h2v-9H2v2zM15 2h-2v9h9V9h-7V2z" }, child: [] }] })(e);
|
|
2393
2345
|
}
|
|
2394
2346
|
function Rr(e) {
|
|
2395
2347
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5 12H3v9h9v-2H5zm7-7h7v7h2V3h-9z" }, child: [] }] })(e);
|
|
2396
2348
|
}
|
|
2397
|
-
function
|
|
2349
|
+
function Ir(e) {
|
|
2398
2350
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z" }, child: [] }, { tag: "path", attr: { d: "M11 11h2v6h-2zm0-4h2v2h-2z" }, child: [] }] })(e);
|
|
2399
2351
|
}
|
|
2400
|
-
function
|
|
2352
|
+
function ns(e) {
|
|
2401
2353
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z" }, child: [] }, { tag: "path", attr: { d: "M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z" }, child: [] }] })(e);
|
|
2402
2354
|
}
|
|
2403
|
-
function
|
|
2355
|
+
function as(e) {
|
|
2404
2356
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm4 5h12v2H8zm5 5h7v2h-7z" }, child: [] }] })(e);
|
|
2405
2357
|
}
|
|
2406
|
-
function
|
|
2358
|
+
function Ar(e) {
|
|
2407
2359
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m11.293 17.293 1.414 1.414L19.414 12l-6.707-6.707-1.414 1.414L15.586 11H6v2h9.586z" }, child: [] }] })(e);
|
|
2408
2360
|
}
|
|
2409
|
-
function
|
|
2361
|
+
function Tr(e) {
|
|
2410
2362
|
return Z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z" }, child: [] }] })(e);
|
|
2411
2363
|
}
|
|
2412
|
-
function
|
|
2364
|
+
function Er(e) {
|
|
2413
2365
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }, child: [] }, { tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168A8,8,0,0,1,176,128Z" }, child: [] }] })(e);
|
|
2414
2366
|
}
|
|
2415
|
-
function
|
|
2367
|
+
function Yr(e) {
|
|
2416
2368
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }, child: [] }, { tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm45.66-93.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32Z" }, child: [] }] })(e);
|
|
2417
2369
|
}
|
|
2418
|
-
function
|
|
2370
|
+
function ss(e) {
|
|
2419
2371
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }, child: [] }, { tag: "path", attr: { d: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }, child: [] }] })(e);
|
|
2420
2372
|
}
|
|
2421
|
-
function
|
|
2373
|
+
function is(e) {
|
|
2422
2374
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }, child: [] }, { tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }, child: [] }] })(e);
|
|
2423
2375
|
}
|
|
2424
|
-
function
|
|
2376
|
+
function ls(e) {
|
|
2425
2377
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z" }, child: [] }] })(e);
|
|
2426
2378
|
}
|
|
2427
|
-
function
|
|
2379
|
+
function Lr(e) {
|
|
2428
2380
|
return Z({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }, child: [] }] })(e);
|
|
2429
2381
|
}
|
|
2430
|
-
const
|
|
2431
|
-
const { data: e, status: t } =
|
|
2382
|
+
const cs = () => {
|
|
2383
|
+
const { data: e, status: t } = qa(6), [r, a] = A(!1), i = Ne(ve), s = r ? "#DADADA" : "var(--mm-color-background)";
|
|
2432
2384
|
if (!(t !== "success" || e.length == 0))
|
|
2433
2385
|
return /* @__PURE__ */ g(ft.Root, { onOpenChange: a, children: [
|
|
2434
2386
|
/* @__PURE__ */ n(ft.Trigger, { asChild: !0, children: /* @__PURE__ */ g(
|
|
@@ -2445,9 +2397,9 @@ const fs = () => {
|
|
|
2445
2397
|
},
|
|
2446
2398
|
className: "mm:gap-0.5 mm:items-center mm:py-1.5 mm:px-2 mm:cursor-pointer mm:select-none mm:rounded-sm mm:rounded-t-none",
|
|
2447
2399
|
children: [
|
|
2448
|
-
/* @__PURE__ */ n(
|
|
2400
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-foreground", children: "Your recent chats" }),
|
|
2449
2401
|
/* @__PURE__ */ n(
|
|
2450
|
-
|
|
2402
|
+
os,
|
|
2451
2403
|
{
|
|
2452
2404
|
size: 18,
|
|
2453
2405
|
color: "#E0E3E4",
|
|
@@ -2469,11 +2421,11 @@ const fs = () => {
|
|
|
2469
2421
|
"a",
|
|
2470
2422
|
{
|
|
2471
2423
|
className: "mm:grid mm:gap-2 mm:grid-cols-[auto_1fr] mm:items-center mm:cursor-pointer mm:text-sm mm:hover:underline mm:py-1 mm:font-sans mm:font-normal",
|
|
2472
|
-
onClick: (
|
|
2473
|
-
|
|
2424
|
+
onClick: (m) => {
|
|
2425
|
+
m.preventDefault(), i(l.id);
|
|
2474
2426
|
},
|
|
2475
2427
|
children: [
|
|
2476
|
-
/* @__PURE__ */ n(
|
|
2428
|
+
/* @__PURE__ */ n(ls, { size: 14 }),
|
|
2477
2429
|
/* @__PURE__ */ n("span", { className: "mm:max-w-full mm:truncate mm:font-serif", children: l.request })
|
|
2478
2430
|
]
|
|
2479
2431
|
},
|
|
@@ -2482,7 +2434,7 @@ const fs = () => {
|
|
|
2482
2434
|
}
|
|
2483
2435
|
) })
|
|
2484
2436
|
] });
|
|
2485
|
-
},
|
|
2437
|
+
}, Pr = ({ children: e, className: t, ...r }) => /* @__PURE__ */ n(
|
|
2486
2438
|
"div",
|
|
2487
2439
|
{
|
|
2488
2440
|
...r,
|
|
@@ -2494,12 +2446,12 @@ const fs = () => {
|
|
|
2494
2446
|
),
|
|
2495
2447
|
children: e
|
|
2496
2448
|
}
|
|
2497
|
-
),
|
|
2449
|
+
), ms = ({
|
|
2498
2450
|
startFlow: e,
|
|
2499
2451
|
starter: t,
|
|
2500
2452
|
explanation: r
|
|
2501
2453
|
}) => /* @__PURE__ */ n(
|
|
2502
|
-
|
|
2454
|
+
Pr,
|
|
2503
2455
|
{
|
|
2504
2456
|
onClick: () => {
|
|
2505
2457
|
e(`${t}.
|
|
@@ -2507,35 +2459,84 @@ const fs = () => {
|
|
|
2507
2459
|
${r}`);
|
|
2508
2460
|
},
|
|
2509
2461
|
children: /* @__PURE__ */ g(F, { className: "mm:gap-2 mm:overflow-hidden mm:md:h-50", children: [
|
|
2510
|
-
/* @__PURE__ */ n(F, { className: "mm:gap-2", children: /* @__PURE__ */ n(
|
|
2511
|
-
/* @__PURE__ */ n(
|
|
2462
|
+
/* @__PURE__ */ n(F, { className: "mm:gap-2", children: /* @__PURE__ */ n(C, { className: "mm:text-base mm:font-semibold mm:font-sans", as: "h3", children: t }) }),
|
|
2463
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-foreground/60 mm:font-serif", children: r })
|
|
2512
2464
|
] })
|
|
2513
2465
|
}
|
|
2514
|
-
), vt = () => /* @__PURE__ */ n(
|
|
2466
|
+
), vt = () => /* @__PURE__ */ n(Pr, { children: /* @__PURE__ */ g(F, { className: "mm:gap-2", children: [
|
|
2515
2467
|
/* @__PURE__ */ n("div", { className: "mm:w-[15%] mm:h-4 mm:animate-pulse mm:bg-muted mm:rounded-lg" }),
|
|
2516
2468
|
/* @__PURE__ */ n("div", { className: "mm:w-[75%] mm:h-4 mm:animate-pulse mm:bg-muted mm:rounded-lg" }),
|
|
2517
2469
|
/* @__PURE__ */ n("div", { className: "mm:w-[75%] mm:h-20 mm:animate-pulse mm:bg-muted mm:rounded-lg" })
|
|
2518
|
-
] }) }),
|
|
2519
|
-
|
|
2470
|
+
] }) }), ds = o.object({
|
|
2471
|
+
starter: o.string(),
|
|
2472
|
+
explanation: o.string(),
|
|
2473
|
+
type: o.string()
|
|
2474
|
+
}).describe("Starter recommendations").openapi("StarterRecommendation"), us = Y({
|
|
2475
|
+
method: "get",
|
|
2476
|
+
path: "/api/v1/recommendations",
|
|
2477
|
+
operationId: "getStarterRecommendations",
|
|
2478
|
+
request: {
|
|
2479
|
+
headers: O,
|
|
2480
|
+
query: o.object({
|
|
2481
|
+
count: o.string().pipe(o.coerce.number()).optional().openapi({ type: "number" })
|
|
2482
|
+
})
|
|
2483
|
+
},
|
|
2484
|
+
responses: {
|
|
2485
|
+
200: {
|
|
2486
|
+
content: {
|
|
2487
|
+
"application/json": {
|
|
2488
|
+
schema: o.object({
|
|
2489
|
+
recommendations: ds.array()
|
|
2490
|
+
})
|
|
2491
|
+
}
|
|
2492
|
+
},
|
|
2493
|
+
description: "Get starter recommendations"
|
|
2494
|
+
},
|
|
2495
|
+
500: {
|
|
2496
|
+
description: "Something wrong happened",
|
|
2497
|
+
content: {
|
|
2498
|
+
"application/json": {
|
|
2499
|
+
schema: o.object({
|
|
2500
|
+
error: o.string()
|
|
2501
|
+
})
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
}), fs = () => Mt({
|
|
2507
|
+
queryKey: ["recommendations"],
|
|
2508
|
+
queryFn: async ({ signal: e }) => {
|
|
2509
|
+
const { data: t, error: r } = await P.GET(us.path, {
|
|
2510
|
+
params: { query: { count: 9 } },
|
|
2511
|
+
signal: e
|
|
2512
|
+
});
|
|
2513
|
+
if (r)
|
|
2514
|
+
throw new Error(r.error);
|
|
2515
|
+
return t.recommendations;
|
|
2516
|
+
},
|
|
2517
|
+
staleTime: 60 * 1e3
|
|
2518
|
+
}), ps = () => G(fs()), hs = ({
|
|
2519
|
+
label: e,
|
|
2520
|
+
startFlow: t
|
|
2520
2521
|
}) => {
|
|
2521
|
-
const { data:
|
|
2522
|
+
const { data: r, status: a } = ps(), i = ce(() => r == null ? void 0 : r.slice(0, 3), [r]);
|
|
2522
2523
|
return /* @__PURE__ */ g("div", { className: "mm:flex mm:flex-col mm:gap-4 mm:flex-1", children: [
|
|
2523
|
-
/* @__PURE__ */ n(
|
|
2524
|
+
/* @__PURE__ */ n(C, { as: "h2", className: "mm:uppercase mm:font-semibold mm:text-base", children: e }),
|
|
2524
2525
|
/* @__PURE__ */ n(
|
|
2525
2526
|
"div",
|
|
2526
2527
|
{
|
|
2527
2528
|
className: k(
|
|
2528
2529
|
"mm:flex mm:flex-col mm:md:flex-row mm:items-stretch mm:flex-nowrap mm:gap-1.5"
|
|
2529
2530
|
),
|
|
2530
|
-
children:
|
|
2531
|
-
|
|
2531
|
+
children: a === "success" ? i == null ? void 0 : i.map((s) => /* @__PURE__ */ n(
|
|
2532
|
+
ms,
|
|
2532
2533
|
{
|
|
2533
|
-
startFlow:
|
|
2534
|
-
starter:
|
|
2535
|
-
explanation:
|
|
2536
|
-
type:
|
|
2534
|
+
startFlow: t,
|
|
2535
|
+
starter: s.starter,
|
|
2536
|
+
explanation: s.explanation,
|
|
2537
|
+
type: s.type
|
|
2537
2538
|
},
|
|
2538
|
-
|
|
2539
|
+
s.starter
|
|
2539
2540
|
)) : /* @__PURE__ */ g(ke, { children: [
|
|
2540
2541
|
/* @__PURE__ */ n(vt, {}),
|
|
2541
2542
|
/* @__PURE__ */ n(vt, {}),
|
|
@@ -2563,40 +2564,37 @@ ${r}`);
|
|
|
2563
2564
|
duration: 0.2,
|
|
2564
2565
|
ease: "easeInOut"
|
|
2565
2566
|
},
|
|
2566
|
-
className: "mm:absolute mm:w-screen mm:h-screen mm:inset-0",
|
|
2567
|
+
className: "mm:absolute mm:w-screen mm:h-screen mm:inset-0 mm-conversation-modal",
|
|
2567
2568
|
children: e
|
|
2568
2569
|
}
|
|
2569
2570
|
) })
|
|
2570
|
-
] }),
|
|
2571
|
+
] }), nr = ({
|
|
2571
2572
|
label: e,
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2573
|
+
recommendationsLabel: t,
|
|
2574
|
+
showRecentChats: r,
|
|
2575
|
+
showRecommendations: a,
|
|
2576
|
+
showBackdrop: i,
|
|
2577
|
+
onClose: s
|
|
2576
2578
|
}) => {
|
|
2577
|
-
const [
|
|
2578
|
-
onSuccess: (
|
|
2579
|
-
v
|
|
2579
|
+
const [l, m] = A(""), [c, u] = A(!1), p = te(null), w = Ne(ve), { mutate: h } = La({
|
|
2580
|
+
onSuccess: (v) => {
|
|
2581
|
+
w(v.flowId);
|
|
2580
2582
|
}
|
|
2581
|
-
}),
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
}, d = ce(
|
|
2590
|
-
() => s.length > 30 || /[\r\n]/.test(s) ? s.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : s,
|
|
2591
|
-
[s]
|
|
2592
|
-
), y = c && r, x = c && t, _ = c && a;
|
|
2583
|
+
}), y = Ka(() => {
|
|
2584
|
+
u(!1), s == null || s();
|
|
2585
|
+
}), x = (v) => {
|
|
2586
|
+
h(v.trim());
|
|
2587
|
+
}, f = ce(
|
|
2588
|
+
() => l.length > 30 || /[\r\n]/.test(l) ? l.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : l,
|
|
2589
|
+
[l]
|
|
2590
|
+
), d = c && a, b = c && r, _ = c && i;
|
|
2593
2591
|
return H(() => {
|
|
2594
2592
|
p.current && (p.current.style.height = "auto", c ? p.current.style.height = `${p.current.scrollHeight}px` : p.current.style.height = "2.25rem");
|
|
2595
|
-
}, [
|
|
2593
|
+
}, [l, c]), /* @__PURE__ */ g(ke, { children: [
|
|
2596
2594
|
_ && /* @__PURE__ */ n(
|
|
2597
2595
|
ne.div,
|
|
2598
2596
|
{
|
|
2599
|
-
variants:
|
|
2597
|
+
variants: tr,
|
|
2600
2598
|
initial: "hidden",
|
|
2601
2599
|
animate: "visible",
|
|
2602
2600
|
exit: "hidden",
|
|
@@ -2610,15 +2608,15 @@ ${r}`);
|
|
|
2610
2608
|
initial: "hidden",
|
|
2611
2609
|
animate: "visible",
|
|
2612
2610
|
exit: "hidden",
|
|
2613
|
-
variants:
|
|
2611
|
+
variants: tr,
|
|
2614
2612
|
className: "mm:flex-1 mm:z-10 mm:w-full",
|
|
2615
2613
|
children: /* @__PURE__ */ g(
|
|
2616
2614
|
"div",
|
|
2617
2615
|
{
|
|
2618
2616
|
className: "mm:flex mm:flex-col mm:pb-4 mm:flex-1 mm:gap-3",
|
|
2619
|
-
ref:
|
|
2617
|
+
ref: y,
|
|
2620
2618
|
children: [
|
|
2621
|
-
|
|
2619
|
+
d && /* @__PURE__ */ n(X, { asChild: !0, children: /* @__PURE__ */ n(
|
|
2622
2620
|
ne.div,
|
|
2623
2621
|
{
|
|
2624
2622
|
initial: { opacity: 0 },
|
|
@@ -2630,7 +2628,13 @@ ${r}`);
|
|
|
2630
2628
|
},
|
|
2631
2629
|
style: { overflow: "hidden", originY: 1 },
|
|
2632
2630
|
className: "mm:border-none",
|
|
2633
|
-
children: /* @__PURE__ */ n(
|
|
2631
|
+
children: /* @__PURE__ */ n(
|
|
2632
|
+
hs,
|
|
2633
|
+
{
|
|
2634
|
+
label: t,
|
|
2635
|
+
startFlow: x
|
|
2636
|
+
}
|
|
2637
|
+
)
|
|
2634
2638
|
}
|
|
2635
2639
|
) }),
|
|
2636
2640
|
/* @__PURE__ */ n(X, { className: "mm:relative mm:z-1", children: /* @__PURE__ */ g(
|
|
@@ -2641,7 +2645,7 @@ ${r}`);
|
|
|
2641
2645
|
children: [
|
|
2642
2646
|
/* @__PURE__ */ g(M, { className: "mm:justify-between mm:items-center", children: [
|
|
2643
2647
|
/* @__PURE__ */ n(
|
|
2644
|
-
|
|
2648
|
+
C,
|
|
2645
2649
|
{
|
|
2646
2650
|
as: "h2",
|
|
2647
2651
|
className: "mm:text-foreground mm:font-semibold mm:text-lg mm:w-fit mm:text-nowrap",
|
|
@@ -2649,13 +2653,13 @@ ${r}`);
|
|
|
2649
2653
|
children: e
|
|
2650
2654
|
}
|
|
2651
2655
|
),
|
|
2652
|
-
|
|
2656
|
+
b && /* @__PURE__ */ n(cs, {})
|
|
2653
2657
|
] }),
|
|
2654
2658
|
/* @__PURE__ */ n(
|
|
2655
2659
|
"form",
|
|
2656
2660
|
{
|
|
2657
|
-
onSubmit: (
|
|
2658
|
-
|
|
2661
|
+
onSubmit: (v) => {
|
|
2662
|
+
v.preventDefault(), l.length > 0 && x(l);
|
|
2659
2663
|
},
|
|
2660
2664
|
className: k(
|
|
2661
2665
|
"mm:p-[1px] mm:rounded-[4px] mm:w-full",
|
|
@@ -2671,15 +2675,15 @@ ${r}`);
|
|
|
2671
2675
|
!c && "mm:overflow-hidden"
|
|
2672
2676
|
),
|
|
2673
2677
|
ref: p,
|
|
2674
|
-
onChange: (
|
|
2675
|
-
|
|
2678
|
+
onChange: (v) => {
|
|
2679
|
+
m(v.target.value);
|
|
2676
2680
|
},
|
|
2677
|
-
value: c ?
|
|
2681
|
+
value: c ? l : f,
|
|
2678
2682
|
onFocus: () => {
|
|
2679
|
-
|
|
2683
|
+
u(!0);
|
|
2680
2684
|
},
|
|
2681
|
-
onKeyDown: (
|
|
2682
|
-
|
|
2685
|
+
onKeyDown: (v) => {
|
|
2686
|
+
v.key === "Enter" && !v.shiftKey && (v.preventDefault(), x(l));
|
|
2683
2687
|
}
|
|
2684
2688
|
}
|
|
2685
2689
|
),
|
|
@@ -2690,11 +2694,11 @@ ${r}`);
|
|
|
2690
2694
|
type: "submit",
|
|
2691
2695
|
className: k(!c && "mm:self-center"),
|
|
2692
2696
|
children: /* @__PURE__ */ n(
|
|
2693
|
-
|
|
2697
|
+
Ar,
|
|
2694
2698
|
{
|
|
2695
2699
|
size: 18,
|
|
2696
2700
|
className: k(
|
|
2697
|
-
|
|
2701
|
+
l.length > 0 && "mm:fill-secondary"
|
|
2698
2702
|
)
|
|
2699
2703
|
}
|
|
2700
2704
|
)
|
|
@@ -2713,18 +2717,18 @@ ${r}`);
|
|
|
2713
2717
|
"request-form"
|
|
2714
2718
|
)
|
|
2715
2719
|
] });
|
|
2716
|
-
}, bs = ({ onClose: e, ...t }) => e != null ? /* @__PURE__ */ n(gs, { onClose: e, children: /* @__PURE__ */ n(pe, { className: "mm:h-full mm:items-end mm:sm:w-150 mm:w-full mm:mx-auto", children: /* @__PURE__ */ n(
|
|
2720
|
+
}, bs = ({ onClose: e, ...t }) => e != null ? /* @__PURE__ */ n(gs, { onClose: e, children: /* @__PURE__ */ n(pe, { className: "mm:h-full mm:items-end mm:sm:w-150 mm:w-full mm:mx-auto", children: /* @__PURE__ */ n(nr, { ...t, onClose: e }) }) }, "start-modal") : /* @__PURE__ */ n(nr, { ...t, onClose: e }, "start-modal"), $r = jt({
|
|
2717
2721
|
setFullWidthRef: () => {
|
|
2718
2722
|
},
|
|
2719
2723
|
fullWidthRef: null,
|
|
2720
2724
|
messagesRef: { current: null }
|
|
2721
|
-
}), Le = () => Je(
|
|
2722
|
-
const [t, r] =
|
|
2725
|
+
}), Le = () => Je($r), ys = ({ children: e }) => {
|
|
2726
|
+
const [t, r] = A(null), a = te(null), i = {
|
|
2723
2727
|
fullWidthRef: t,
|
|
2724
2728
|
setFullWidthRef: r,
|
|
2725
2729
|
messagesRef: a
|
|
2726
2730
|
};
|
|
2727
|
-
return /* @__PURE__ */ n(
|
|
2731
|
+
return /* @__PURE__ */ n($r.Provider, { value: i, children: e });
|
|
2728
2732
|
}, K = Q.forwardRef(({ children: e, isFullWidth: t = !1, className: r, ...a }, i) => /* @__PURE__ */ n(
|
|
2729
2733
|
F,
|
|
2730
2734
|
{
|
|
@@ -2753,7 +2757,7 @@ ${r}`);
|
|
|
2753
2757
|
},
|
|
2754
2758
|
children: /* @__PURE__ */ n(F, { className: "mm:gap-1", children: e })
|
|
2755
2759
|
}
|
|
2756
|
-
) }),
|
|
2760
|
+
) }), Or = fe(
|
|
2757
2761
|
(e) => {
|
|
2758
2762
|
const t = e(ve), r = e(Fe);
|
|
2759
2763
|
return !!t && r === "conversation";
|
|
@@ -2762,7 +2766,7 @@ ${r}`);
|
|
|
2762
2766
|
const a = e(ve);
|
|
2763
2767
|
r && !a || (r ? t(Fe, "conversation") : e(Fe) === "conversation" && t(Fe, void 0));
|
|
2764
2768
|
}
|
|
2765
|
-
),
|
|
2769
|
+
), Hr = o.object({
|
|
2766
2770
|
status: o.literal("success"),
|
|
2767
2771
|
public: o.object({
|
|
2768
2772
|
flowDataId: o.number(),
|
|
@@ -2772,18 +2776,18 @@ ${r}`);
|
|
|
2772
2776
|
sql: o.string(),
|
|
2773
2777
|
dataReportSummary: o.string()
|
|
2774
2778
|
})
|
|
2775
|
-
}),
|
|
2779
|
+
}), Vr = o.object({
|
|
2776
2780
|
status: o.literal("error"),
|
|
2777
2781
|
message: o.string()
|
|
2778
|
-
}),
|
|
2782
|
+
}), qr = o.object({
|
|
2779
2783
|
tool: o.literal("generateDataReport").default("generateDataReport"),
|
|
2780
|
-
result: o.discriminatedUnion("status", [
|
|
2781
|
-
}),
|
|
2784
|
+
result: o.discriminatedUnion("status", [Hr, Vr]).optional()
|
|
2785
|
+
}), Ur = qr.extend({
|
|
2782
2786
|
result: o.discriminatedUnion("status", [
|
|
2783
|
-
|
|
2784
|
-
|
|
2787
|
+
Hr.omit({ private: !0 }),
|
|
2788
|
+
Vr
|
|
2785
2789
|
]).optional()
|
|
2786
|
-
}),
|
|
2790
|
+
}), Zr = o.object({
|
|
2787
2791
|
status: o.literal("success"),
|
|
2788
2792
|
public: o.object({
|
|
2789
2793
|
flowDataId: o.number(),
|
|
@@ -2793,18 +2797,18 @@ ${r}`);
|
|
|
2793
2797
|
sql: o.string().optional(),
|
|
2794
2798
|
dataReportSummary: o.string().optional()
|
|
2795
2799
|
})
|
|
2796
|
-
}),
|
|
2800
|
+
}), Wr = o.object({
|
|
2797
2801
|
status: o.literal("error"),
|
|
2798
2802
|
message: o.string()
|
|
2799
|
-
}),
|
|
2803
|
+
}), Br = o.object({
|
|
2800
2804
|
tool: o.literal("generateVisualization").default("generateVisualization"),
|
|
2801
|
-
result: o.discriminatedUnion("status", [
|
|
2802
|
-
}),
|
|
2805
|
+
result: o.discriminatedUnion("status", [Zr, Wr]).optional()
|
|
2806
|
+
}), Kr = Br.extend({
|
|
2803
2807
|
result: o.discriminatedUnion("status", [
|
|
2804
|
-
|
|
2805
|
-
|
|
2808
|
+
Zr.omit({ private: !0 }),
|
|
2809
|
+
Wr
|
|
2806
2810
|
]).optional()
|
|
2807
|
-
}),
|
|
2811
|
+
}), Gr = o.object({
|
|
2808
2812
|
status: o.literal("success"),
|
|
2809
2813
|
public: o.object({}),
|
|
2810
2814
|
private: o.object({
|
|
@@ -2819,18 +2823,18 @@ ${r}`);
|
|
|
2819
2823
|
sample_values: o.array(o.any()).nullable()
|
|
2820
2824
|
}).array()
|
|
2821
2825
|
})
|
|
2822
|
-
}),
|
|
2826
|
+
}), Qr = o.object({
|
|
2823
2827
|
status: o.literal("error"),
|
|
2824
2828
|
message: o.string()
|
|
2825
|
-
}),
|
|
2829
|
+
}), Xr = o.object({
|
|
2826
2830
|
tool: o.literal("getAvailableColumnsForTable").default("getAvailableColumnsForTable"),
|
|
2827
|
-
result: o.discriminatedUnion("status", [
|
|
2828
|
-
}), ws =
|
|
2831
|
+
result: o.discriminatedUnion("status", [Gr, Qr]).optional()
|
|
2832
|
+
}), ws = Xr.extend({
|
|
2829
2833
|
result: o.discriminatedUnion("status", [
|
|
2830
|
-
|
|
2831
|
-
|
|
2834
|
+
Gr.omit({ private: !0 }),
|
|
2835
|
+
Qr
|
|
2832
2836
|
]).optional()
|
|
2833
|
-
}),
|
|
2837
|
+
}), Jr = o.object({
|
|
2834
2838
|
status: o.literal("success"),
|
|
2835
2839
|
public: o.object({}),
|
|
2836
2840
|
private: o.object({
|
|
@@ -2842,16 +2846,16 @@ ${r}`);
|
|
|
2842
2846
|
})
|
|
2843
2847
|
)
|
|
2844
2848
|
})
|
|
2845
|
-
}),
|
|
2849
|
+
}), eo = o.object({
|
|
2846
2850
|
status: o.literal("error"),
|
|
2847
2851
|
message: o.string()
|
|
2848
|
-
}),
|
|
2852
|
+
}), to = o.object({
|
|
2849
2853
|
tool: o.literal("getAvailableTables").default("getAvailableTables"),
|
|
2850
|
-
result: o.discriminatedUnion("status", [
|
|
2851
|
-
}), xs =
|
|
2854
|
+
result: o.discriminatedUnion("status", [Jr, eo]).optional()
|
|
2855
|
+
}), xs = to.extend({
|
|
2852
2856
|
result: o.discriminatedUnion("status", [
|
|
2853
|
-
|
|
2854
|
-
|
|
2857
|
+
Jr.omit({ private: !0 }),
|
|
2858
|
+
eo
|
|
2855
2859
|
]).optional()
|
|
2856
2860
|
}), Dt = o.object({
|
|
2857
2861
|
tool: o.literal("think").default("think"),
|
|
@@ -2864,7 +2868,7 @@ ${r}`);
|
|
|
2864
2868
|
}).optional()
|
|
2865
2869
|
}), _s = Dt.extend({
|
|
2866
2870
|
result: Dt.shape.result.unwrap().omit({ private: !0 }).optional()
|
|
2867
|
-
}),
|
|
2871
|
+
}), ro = o.object({
|
|
2868
2872
|
status: o.literal("success"),
|
|
2869
2873
|
public: o.object({}),
|
|
2870
2874
|
private: o.object({
|
|
@@ -2884,80 +2888,80 @@ ${r}`);
|
|
|
2884
2888
|
matched_values: o.string().array()
|
|
2885
2889
|
}).array()
|
|
2886
2890
|
})
|
|
2887
|
-
}),
|
|
2891
|
+
}), oo = o.object({
|
|
2888
2892
|
status: o.literal("error"),
|
|
2889
2893
|
message: o.string()
|
|
2890
|
-
}),
|
|
2894
|
+
}), no = o.object({
|
|
2891
2895
|
tool: o.literal("valueBasedColumnSearch").default("valueBasedColumnSearch"),
|
|
2892
|
-
result: o.discriminatedUnion("status", [
|
|
2893
|
-
}), ks =
|
|
2896
|
+
result: o.discriminatedUnion("status", [ro, oo]).optional()
|
|
2897
|
+
}), ks = no.extend({
|
|
2894
2898
|
result: o.discriminatedUnion("status", [
|
|
2895
|
-
|
|
2896
|
-
|
|
2899
|
+
ro.omit({ private: !0 }),
|
|
2900
|
+
oo
|
|
2897
2901
|
]).optional()
|
|
2898
2902
|
});
|
|
2899
2903
|
o.discriminatedUnion("tool", [
|
|
2900
2904
|
Dt,
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2905
|
+
to,
|
|
2906
|
+
Xr,
|
|
2907
|
+
no,
|
|
2908
|
+
qr,
|
|
2909
|
+
Br
|
|
2906
2910
|
]);
|
|
2907
|
-
const
|
|
2911
|
+
const ao = o.discriminatedUnion("tool", [
|
|
2908
2912
|
_s,
|
|
2909
2913
|
xs,
|
|
2910
2914
|
ws,
|
|
2911
2915
|
ks,
|
|
2912
|
-
|
|
2913
|
-
|
|
2916
|
+
Ur,
|
|
2917
|
+
Kr
|
|
2914
2918
|
]), Cs = async (e, t) => {
|
|
2915
|
-
const r = await
|
|
2919
|
+
const r = await Tt($), a = await fetch(`${t}/api/v1/chat/${e}/messages`, {
|
|
2916
2920
|
headers: r.header
|
|
2917
2921
|
});
|
|
2918
2922
|
if (!a.ok)
|
|
2919
2923
|
throw new Error("Failed to fetch chat messages");
|
|
2920
2924
|
return (await a.json()).messages;
|
|
2921
|
-
},
|
|
2922
|
-
const r =
|
|
2925
|
+
}, so = (e, t) => {
|
|
2926
|
+
const r = se(), { apiUrl: a } = $n(), i = Ne(Ie), [s, l] = A(null), { data: m, isLoading: c } = G({
|
|
2923
2927
|
queryKey: ["chatMessages", e, a],
|
|
2924
2928
|
queryFn: () => Cs(e, a),
|
|
2925
2929
|
refetchIntervalInBackground: !1,
|
|
2926
2930
|
refetchInterval: ({ state: h }) => {
|
|
2927
|
-
var
|
|
2928
|
-
return ((
|
|
2931
|
+
var y;
|
|
2932
|
+
return ((y = h.data) == null ? void 0 : y.length) === 0 ? 1e3 : !1;
|
|
2929
2933
|
},
|
|
2930
2934
|
enabled: !!e && !!a && r
|
|
2931
2935
|
}), u = ce(
|
|
2932
|
-
() =>
|
|
2936
|
+
() => m == null ? void 0 : m.map((h) => ({
|
|
2933
2937
|
...h,
|
|
2934
2938
|
createdAt: new Date(h.createdAt)
|
|
2935
2939
|
})),
|
|
2936
|
-
[
|
|
2937
|
-
), p =
|
|
2940
|
+
[m]
|
|
2941
|
+
), p = fr();
|
|
2938
2942
|
return {
|
|
2939
|
-
chat:
|
|
2943
|
+
chat: Po({
|
|
2940
2944
|
id: `chat-${e}`,
|
|
2941
2945
|
// Use a consistent ID to share state
|
|
2942
2946
|
api: `${a}/api/v1/chat/${e}`,
|
|
2943
2947
|
initialMessages: u,
|
|
2944
2948
|
sendExtraMessageFields: !0,
|
|
2945
2949
|
// send id and createdAt for each message
|
|
2946
|
-
onFinish: (h, { finishReason:
|
|
2947
|
-
var
|
|
2950
|
+
onFinish: (h, { finishReason: y }) => {
|
|
2951
|
+
var x;
|
|
2948
2952
|
if (p.invalidateQueries({
|
|
2949
2953
|
queryKey: ["insights", { flowId: e }],
|
|
2950
2954
|
exact: !1
|
|
2951
2955
|
}), p.invalidateQueries({
|
|
2952
2956
|
queryKey: ["chat-timeline", { flowId: e }]
|
|
2953
|
-
}),
|
|
2957
|
+
}), y === "stop" && h.parts && h.parts.length > 0) {
|
|
2954
2958
|
for (const f of h.parts)
|
|
2955
2959
|
if (f.type === "tool-invocation" && f.toolInvocation.state === "result" && f.toolInvocation.toolName === "generateDataReport")
|
|
2956
2960
|
try {
|
|
2957
|
-
const d =
|
|
2961
|
+
const d = ao.safeParse(
|
|
2958
2962
|
f.toolInvocation.result
|
|
2959
2963
|
);
|
|
2960
|
-
if (d.success && l("Generating report..."), d.success && d.data.tool === "generateDataReport" && ((
|
|
2964
|
+
if (d.success && l("Generating report..."), d.success && d.data.tool === "generateDataReport" && ((x = d.data.result) == null ? void 0 : x.status) === "success") {
|
|
2961
2965
|
i(d.data.result.public.flowDataId);
|
|
2962
2966
|
break;
|
|
2963
2967
|
}
|
|
@@ -2968,13 +2972,13 @@ const io = o.discriminatedUnion("tool", [
|
|
|
2968
2972
|
},
|
|
2969
2973
|
experimental_prepareRequestBody({
|
|
2970
2974
|
messages: h,
|
|
2971
|
-
requestBody:
|
|
2975
|
+
requestBody: y
|
|
2972
2976
|
}) {
|
|
2973
|
-
return
|
|
2977
|
+
return y != null && y.flowDataId || console.error(
|
|
2974
2978
|
"Flow data ID not passed to `experimental_prepareRequestBody`"
|
|
2975
2979
|
), {
|
|
2976
2980
|
message: h.at(-1),
|
|
2977
|
-
flowDataId:
|
|
2981
|
+
flowDataId: y == null ? void 0 : y.flowDataId
|
|
2978
2982
|
};
|
|
2979
2983
|
},
|
|
2980
2984
|
onError: (h) => {
|
|
@@ -2982,13 +2986,13 @@ const io = o.discriminatedUnion("tool", [
|
|
|
2982
2986
|
},
|
|
2983
2987
|
...t
|
|
2984
2988
|
}),
|
|
2985
|
-
apiMessages:
|
|
2986
|
-
isLoadingMessages:
|
|
2989
|
+
apiMessages: m,
|
|
2990
|
+
isLoadingMessages: c,
|
|
2987
2991
|
currentActivity: s
|
|
2988
2992
|
};
|
|
2989
2993
|
};
|
|
2990
|
-
function
|
|
2991
|
-
const { chat: r, isLoadingMessages: a, currentActivity: i } =
|
|
2994
|
+
function io(e, t) {
|
|
2995
|
+
const { chat: r, isLoadingMessages: a, currentActivity: i } = so(
|
|
2992
2996
|
e,
|
|
2993
2997
|
t
|
|
2994
2998
|
);
|
|
@@ -3000,19 +3004,19 @@ function co(e, t) {
|
|
|
3000
3004
|
};
|
|
3001
3005
|
}
|
|
3002
3006
|
function Ss(e, t) {
|
|
3003
|
-
const { chat: r } =
|
|
3007
|
+
const { chat: r } = so(e, t), { input: a, handleSubmit: i } = r;
|
|
3004
3008
|
return {
|
|
3005
3009
|
input: a,
|
|
3006
|
-
handleSubmit: async (l,
|
|
3007
|
-
const
|
|
3008
|
-
...(await
|
|
3010
|
+
handleSubmit: async (l, m) => {
|
|
3011
|
+
const c = {
|
|
3012
|
+
...(await Tt($)).header,
|
|
3009
3013
|
...t == null ? void 0 : t.headers,
|
|
3010
|
-
...
|
|
3014
|
+
...m == null ? void 0 : m.headers
|
|
3011
3015
|
};
|
|
3012
|
-
|
|
3013
|
-
...
|
|
3014
|
-
headers:
|
|
3015
|
-
}, i(l,
|
|
3016
|
+
m = {
|
|
3017
|
+
...m,
|
|
3018
|
+
headers: c
|
|
3019
|
+
}, i(l, m);
|
|
3016
3020
|
},
|
|
3017
3021
|
handleInputChange: r.handleInputChange,
|
|
3018
3022
|
status: r.status,
|
|
@@ -3023,7 +3027,7 @@ const Ds = (e) => Mt({
|
|
|
3023
3027
|
queryKey: ["flows", { flowId: e }],
|
|
3024
3028
|
queryFn: async () => {
|
|
3025
3029
|
if (!e || !$) return null;
|
|
3026
|
-
const { data: t, error: r } = await P.GET(
|
|
3030
|
+
const { data: t, error: r } = await P.GET(Ma.path, {
|
|
3027
3031
|
params: {
|
|
3028
3032
|
path: { flowId: e }
|
|
3029
3033
|
}
|
|
@@ -3033,18 +3037,18 @@ const Ds = (e) => Mt({
|
|
|
3033
3037
|
return t;
|
|
3034
3038
|
}
|
|
3035
3039
|
}), Ns = Object.values(_r), js = (e, t) => {
|
|
3036
|
-
const r =
|
|
3040
|
+
const r = se(), { select: a, ...i } = t || {};
|
|
3037
3041
|
return G({
|
|
3038
3042
|
...Ds(e),
|
|
3039
3043
|
enabled: !!e && r,
|
|
3040
3044
|
refetchIntervalInBackground: !1,
|
|
3041
3045
|
refetchInterval: (s) => {
|
|
3042
|
-
var
|
|
3043
|
-
if (!((
|
|
3046
|
+
var w;
|
|
3047
|
+
if (!((w = s.state.data) != null && w.flow_steps.length))
|
|
3044
3048
|
return 1e3;
|
|
3045
|
-
const
|
|
3046
|
-
if (
|
|
3047
|
-
const u =
|
|
3049
|
+
const m = s.state.data.flow_steps;
|
|
3050
|
+
if (m.some((h) => h.status === "failed")) return;
|
|
3051
|
+
const u = m.filter((h) => h.status === "completed").map((h) => h.name);
|
|
3048
3052
|
if (!Ns.every((h) => u.includes(h)))
|
|
3049
3053
|
return 1e3;
|
|
3050
3054
|
},
|
|
@@ -3080,7 +3084,7 @@ const Ds = (e) => Mt({
|
|
|
3080
3084
|
...a
|
|
3081
3085
|
}
|
|
3082
3086
|
), zs = () => {
|
|
3083
|
-
const [e, t] =
|
|
3087
|
+
const [e, t] = A("");
|
|
3084
3088
|
return H(() => {
|
|
3085
3089
|
const r = setInterval(() => {
|
|
3086
3090
|
t((a) => a === "" ? "." : a === "." ? ".." : a === ".." ? "..." : "");
|
|
@@ -3097,7 +3101,7 @@ const Ds = (e) => Mt({
|
|
|
3097
3101
|
// No delayChildren needed here unless you want an initial pause
|
|
3098
3102
|
}
|
|
3099
3103
|
}
|
|
3100
|
-
},
|
|
3104
|
+
}, Rs = {
|
|
3101
3105
|
hidden: {},
|
|
3102
3106
|
// Base state, children will inherit this
|
|
3103
3107
|
visible: {
|
|
@@ -3106,7 +3110,7 @@ const Ds = (e) => Mt({
|
|
|
3106
3110
|
// Delay between each character animation starting
|
|
3107
3111
|
}
|
|
3108
3112
|
}
|
|
3109
|
-
},
|
|
3113
|
+
}, Is = {
|
|
3110
3114
|
// Children inherit 'hidden' from parents by default
|
|
3111
3115
|
hidden: {
|
|
3112
3116
|
opacity: 0,
|
|
@@ -3122,15 +3126,15 @@ const Ds = (e) => Mt({
|
|
|
3122
3126
|
ease: "easeOut"
|
|
3123
3127
|
}
|
|
3124
3128
|
}
|
|
3125
|
-
},
|
|
3129
|
+
}, As = ({ token: e }) => /* @__PURE__ */ n(
|
|
3126
3130
|
ne.span,
|
|
3127
3131
|
{
|
|
3128
|
-
variants:
|
|
3132
|
+
variants: Rs,
|
|
3129
3133
|
style: { display: "inline-block", whiteSpace: "pre" },
|
|
3130
3134
|
children: Array.from(e).map((t, r) => /* @__PURE__ */ n(
|
|
3131
3135
|
ne.span,
|
|
3132
3136
|
{
|
|
3133
|
-
variants:
|
|
3137
|
+
variants: Is,
|
|
3134
3138
|
style: { display: "inline-block" },
|
|
3135
3139
|
children: t
|
|
3136
3140
|
},
|
|
@@ -3138,7 +3142,7 @@ const Ds = (e) => Mt({
|
|
|
3138
3142
|
))
|
|
3139
3143
|
}
|
|
3140
3144
|
), Ts = ({ text: e, onAnimationComplete: t, needUserConfirmation: r }) => {
|
|
3141
|
-
const [a, i] =
|
|
3145
|
+
const [a, i] = A(!1), s = e.split(/(\s+)/).filter(Boolean);
|
|
3142
3146
|
return /* @__PURE__ */ g(F, { className: "mm:items-start", children: [
|
|
3143
3147
|
/* @__PURE__ */ g("p", { "data-slot": "text", className: "mm:font-sans", children: [
|
|
3144
3148
|
/* @__PURE__ */ n(
|
|
@@ -3150,7 +3154,7 @@ const Ds = (e) => Mt({
|
|
|
3150
3154
|
onAnimationComplete: () => {
|
|
3151
3155
|
i(!0), r || setTimeout(t, 2e3);
|
|
3152
3156
|
},
|
|
3153
|
-
children: s.map((l,
|
|
3157
|
+
children: s.map((l, m) => /* @__PURE__ */ n(As, { token: l }, m))
|
|
3154
3158
|
}
|
|
3155
3159
|
),
|
|
3156
3160
|
a && !r && /* @__PURE__ */ n(zs, {})
|
|
@@ -3203,7 +3207,7 @@ const Ds = (e) => Mt({
|
|
|
3203
3207
|
}
|
|
3204
3208
|
}
|
|
3205
3209
|
}), Ys = () => {
|
|
3206
|
-
const e =
|
|
3210
|
+
const e = se();
|
|
3207
3211
|
return G({
|
|
3208
3212
|
queryKey: ["latestDataRefresh"],
|
|
3209
3213
|
queryFn: async () => {
|
|
@@ -3212,13 +3216,13 @@ const Ds = (e) => Mt({
|
|
|
3212
3216
|
},
|
|
3213
3217
|
enabled: e
|
|
3214
3218
|
});
|
|
3215
|
-
},
|
|
3216
|
-
const e =
|
|
3219
|
+
}, lo = () => {
|
|
3220
|
+
const e = se(), t = Re(ve), r = Re(Ie), { data: a } = G({
|
|
3217
3221
|
queryKey: ["flow-data-id", t, r],
|
|
3218
3222
|
queryFn: async () => {
|
|
3219
3223
|
if (!t || !$) return null;
|
|
3220
3224
|
if (r) return r;
|
|
3221
|
-
const { data: i, error: s } = await P.GET(
|
|
3225
|
+
const { data: i, error: s } = await P.GET(Sa.path, {
|
|
3222
3226
|
params: {
|
|
3223
3227
|
path: { flowId: t }
|
|
3224
3228
|
}
|
|
@@ -3238,10 +3242,10 @@ const Ds = (e) => Mt({
|
|
|
3238
3242
|
flowDataId: a ?? null
|
|
3239
3243
|
};
|
|
3240
3244
|
}, Ls = ({ flowId: e }) => {
|
|
3241
|
-
const { flowDataId: t } =
|
|
3245
|
+
const { flowDataId: t } = lo(), [r, a] = A(!1), { input: i, status: s, handleInputChange: l, handleSubmit: m } = Ss(e), c = te(null);
|
|
3242
3246
|
H(() => {
|
|
3243
3247
|
requestAnimationFrame(() => {
|
|
3244
|
-
|
|
3248
|
+
c.current && (c.current.style.height = "auto", r && (c.current.style.height = `${c.current.scrollHeight}px`));
|
|
3245
3249
|
});
|
|
3246
3250
|
}, [i, r]);
|
|
3247
3251
|
const u = i.length > 30 || /[\r\n]/.test(i) ? i.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : i, p = (h) => {
|
|
@@ -3249,10 +3253,10 @@ const Ds = (e) => Mt({
|
|
|
3249
3253
|
console.error(`no flow id data available, current flow is ${e}`);
|
|
3250
3254
|
return;
|
|
3251
3255
|
}
|
|
3252
|
-
|
|
3256
|
+
m(h, {
|
|
3253
3257
|
body: { flowDataId: t }
|
|
3254
3258
|
});
|
|
3255
|
-
},
|
|
3259
|
+
}, w = s === "submitted" || s === "streaming";
|
|
3256
3260
|
return /* @__PURE__ */ n(
|
|
3257
3261
|
"form",
|
|
3258
3262
|
{
|
|
@@ -3269,8 +3273,8 @@ const Ds = (e) => Mt({
|
|
|
3269
3273
|
className: k(
|
|
3270
3274
|
"mm:leading-6 mm:w-full mm:resize-none mm:border-none mm:box-border mm:rounded-[7px] mm:outline-none mm:px-2 mm:py-1.5 mm:max-h-[500px] mm:font-serif"
|
|
3271
3275
|
),
|
|
3272
|
-
disabled:
|
|
3273
|
-
ref:
|
|
3276
|
+
disabled: w,
|
|
3277
|
+
ref: c,
|
|
3274
3278
|
onChange: l,
|
|
3275
3279
|
value: r ? i : u,
|
|
3276
3280
|
onFocus: () => a(!0),
|
|
@@ -3280,7 +3284,7 @@ const Ds = (e) => Mt({
|
|
|
3280
3284
|
}
|
|
3281
3285
|
}
|
|
3282
3286
|
),
|
|
3283
|
-
/* @__PURE__ */ n(U, { variant: "icon", type: "submit", disabled:
|
|
3287
|
+
/* @__PURE__ */ n(U, { variant: "icon", type: "submit", disabled: w, children: w ? /* @__PURE__ */ n(he, { size: "xs" }) : /* @__PURE__ */ n(Ar, { size: 18 }) })
|
|
3284
3288
|
] })
|
|
3285
3289
|
}
|
|
3286
3290
|
);
|
|
@@ -3298,7 +3302,7 @@ const Ds = (e) => Mt({
|
|
|
3298
3302
|
variant: "dark"
|
|
3299
3303
|
}
|
|
3300
3304
|
}
|
|
3301
|
-
),
|
|
3305
|
+
), Ae = ({
|
|
3302
3306
|
className: e,
|
|
3303
3307
|
variant: t,
|
|
3304
3308
|
asChild: r = !1,
|
|
@@ -3310,16 +3314,16 @@ const Ds = (e) => Mt({
|
|
|
3310
3314
|
className: k(Ps({ variant: t }), e),
|
|
3311
3315
|
...a
|
|
3312
3316
|
}
|
|
3313
|
-
),
|
|
3317
|
+
), co = ({ children: e }) => {
|
|
3314
3318
|
const t = e.replace(new RegExp("(?<!\\n)\\n(?!\\n)", "g"), `
|
|
3315
3319
|
|
|
3316
3320
|
`);
|
|
3317
3321
|
return /* @__PURE__ */ n(
|
|
3318
|
-
|
|
3322
|
+
$o,
|
|
3319
3323
|
{
|
|
3320
3324
|
components: {
|
|
3321
3325
|
p: ({ node: r, className: a, ...i }) => /* @__PURE__ */ n(
|
|
3322
|
-
|
|
3326
|
+
C,
|
|
3323
3327
|
{
|
|
3324
3328
|
className: k(
|
|
3325
3329
|
a,
|
|
@@ -3329,7 +3333,7 @@ const Ds = (e) => Mt({
|
|
|
3329
3333
|
}
|
|
3330
3334
|
),
|
|
3331
3335
|
span: ({ node: r, ref: a, className: i, ...s }) => /* @__PURE__ */ n(
|
|
3332
|
-
|
|
3336
|
+
C,
|
|
3333
3337
|
{
|
|
3334
3338
|
as: "span",
|
|
3335
3339
|
className: k(i, "mm:font-normal"),
|
|
@@ -3347,7 +3351,7 @@ const Ds = (e) => Mt({
|
|
|
3347
3351
|
ul: ({ node: r, ...a }) => /* @__PURE__ */ n("ul", { className: "mm:ps-8 mm:mb-3 mm:list-outside", ...a }),
|
|
3348
3352
|
li: ({ node: r, ...a }) => /* @__PURE__ */ n("li", { className: "mm:group is-list mm:font-sans mm:mb-1", ...a }),
|
|
3349
3353
|
h1: ({ node: r, ...a }) => /* @__PURE__ */ n(
|
|
3350
|
-
|
|
3354
|
+
C,
|
|
3351
3355
|
{
|
|
3352
3356
|
as: "h1",
|
|
3353
3357
|
className: "mm:font-bold mm:text-2xl mm:mb-2",
|
|
@@ -3355,21 +3359,21 @@ const Ds = (e) => Mt({
|
|
|
3355
3359
|
}
|
|
3356
3360
|
),
|
|
3357
3361
|
h2: ({ node: r, ...a }) => /* @__PURE__ */ n(
|
|
3358
|
-
|
|
3362
|
+
C,
|
|
3359
3363
|
{
|
|
3360
3364
|
as: "h2",
|
|
3361
3365
|
className: "mm:font-bold mm:text-xl mm:mb-2",
|
|
3362
3366
|
...a
|
|
3363
3367
|
}
|
|
3364
3368
|
),
|
|
3365
|
-
h3: ({ node: r, ...a }) => /* @__PURE__ */ n(
|
|
3366
|
-
h4: ({ node: r, ...a }) => /* @__PURE__ */ n(
|
|
3367
|
-
h5: ({ node: r, ...a }) => /* @__PURE__ */ n(
|
|
3369
|
+
h3: ({ node: r, ...a }) => /* @__PURE__ */ n(C, { as: "h3", className: "mm:font-bold mm:mb-2", ...a }),
|
|
3370
|
+
h4: ({ node: r, ...a }) => /* @__PURE__ */ n(C, { as: "h4", className: "mm:font-bold mm:mb-2", ...a }),
|
|
3371
|
+
h5: ({ node: r, ...a }) => /* @__PURE__ */ n(C, { as: "h5", className: "mm:font-bold mm:mb-2", ...a })
|
|
3368
3372
|
},
|
|
3369
3373
|
children: t
|
|
3370
3374
|
}
|
|
3371
3375
|
);
|
|
3372
|
-
},
|
|
3376
|
+
}, mo = ({ children: e, role: t }) => /* @__PURE__ */ n(
|
|
3373
3377
|
X,
|
|
3374
3378
|
{
|
|
3375
3379
|
className: k(
|
|
@@ -3377,20 +3381,20 @@ const Ds = (e) => Mt({
|
|
|
3377
3381
|
t === "user" ? "mm:self-end mm:w-full mm:max-w-[600px] mm:min-w-[150px]" : "mm:self-stretch"
|
|
3378
3382
|
),
|
|
3379
3383
|
children: /* @__PURE__ */ g(F, { className: "mm:gap-0", children: [
|
|
3380
|
-
/* @__PURE__ */ n(
|
|
3384
|
+
/* @__PURE__ */ n(Ae, { variant: "light", className: "mm:mb-3 mm:mt-0", children: t === "user" ? "YOU" : "ASSISTANT" }),
|
|
3381
3385
|
e
|
|
3382
3386
|
] })
|
|
3383
3387
|
}
|
|
3384
|
-
),
|
|
3385
|
-
({ content: e, role: t }) => /* @__PURE__ */ n(
|
|
3386
|
-
),
|
|
3387
|
-
const t =
|
|
3388
|
+
), uo = me(
|
|
3389
|
+
({ content: e, role: t }) => /* @__PURE__ */ n(mo, { role: t, children: /* @__PURE__ */ n(co, { children: e }) })
|
|
3390
|
+
), fo = (e) => {
|
|
3391
|
+
const t = se();
|
|
3388
3392
|
return G({
|
|
3389
3393
|
queryKey: ["explainability", e],
|
|
3390
3394
|
queryFn: async () => {
|
|
3391
3395
|
if (!e || !$) return null;
|
|
3392
3396
|
try {
|
|
3393
|
-
return (await P.GET(
|
|
3397
|
+
return (await P.GET(Aa.path, {
|
|
3394
3398
|
params: {
|
|
3395
3399
|
path: {
|
|
3396
3400
|
flowDataId: e.toString()
|
|
@@ -3410,9 +3414,9 @@ const Ds = (e) => Mt({
|
|
|
3410
3414
|
});
|
|
3411
3415
|
}, $s = (e, t) => {
|
|
3412
3416
|
var i, s, l;
|
|
3413
|
-
const r =
|
|
3417
|
+
const r = se(), a = G({
|
|
3414
3418
|
queryKey: ["insights", { flowId: e, flowDataId: t }],
|
|
3415
|
-
queryFn: async () => !e || !$ ? null : (await P.GET(
|
|
3419
|
+
queryFn: async () => !e || !$ ? null : (await P.GET(Da.path, {
|
|
3416
3420
|
params: {
|
|
3417
3421
|
path: {
|
|
3418
3422
|
flowId: e
|
|
@@ -3461,13 +3465,13 @@ const Ds = (e) => Mt({
|
|
|
3461
3465
|
},
|
|
3462
3466
|
s
|
|
3463
3467
|
)
|
|
3464
|
-
) }), Vs = ".react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}", go = jt(null), Lt = () => {
|
|
3465
|
-
const e = Je(
|
|
3468
|
+
) }), Vs = ".react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}", po = jt(null), Yt = () => {
|
|
3469
|
+
const e = Je(po);
|
|
3466
3470
|
if (!e)
|
|
3467
3471
|
throw new Error("useRootRef must be used within a RootRefProvider");
|
|
3468
3472
|
return e;
|
|
3469
|
-
}, qs = new
|
|
3470
|
-
queryCache: new
|
|
3473
|
+
}, qs = new Ao({
|
|
3474
|
+
queryCache: new To({
|
|
3471
3475
|
onError: (e, t) => {
|
|
3472
3476
|
t.state.fetchFailureCount > 3 && console.error(e);
|
|
3473
3477
|
}
|
|
@@ -3479,9 +3483,9 @@ const Ds = (e) => Mt({
|
|
|
3479
3483
|
children: a,
|
|
3480
3484
|
display: i = "block"
|
|
3481
3485
|
}) => {
|
|
3482
|
-
const s = te(null), [l,
|
|
3486
|
+
const s = te(null), [l, m] = A(!1);
|
|
3483
3487
|
return H(() => {
|
|
3484
|
-
s.current &&
|
|
3488
|
+
s.current && m(!0);
|
|
3485
3489
|
}, []), /* @__PURE__ */ g(
|
|
3486
3490
|
"div",
|
|
3487
3491
|
{
|
|
@@ -3491,8 +3495,8 @@ const Ds = (e) => Mt({
|
|
|
3491
3495
|
style: { display: i },
|
|
3492
3496
|
children: [
|
|
3493
3497
|
/* @__PURE__ */ n("style", { children: Vs }),
|
|
3494
|
-
/* @__PURE__ */ n(
|
|
3495
|
-
|
|
3498
|
+
/* @__PURE__ */ n(po.Provider, { value: s.current, children: l && s.current ? /* @__PURE__ */ n(Eo, { client: qs, children: /* @__PURE__ */ n(
|
|
3499
|
+
Ln,
|
|
3496
3500
|
{
|
|
3497
3501
|
apiKey: e,
|
|
3498
3502
|
externalJwt: t,
|
|
@@ -3504,7 +3508,7 @@ const Ds = (e) => Mt({
|
|
|
3504
3508
|
}
|
|
3505
3509
|
);
|
|
3506
3510
|
}, Zs = () => {
|
|
3507
|
-
const [e, t] =
|
|
3511
|
+
const [e, t] = A(!0);
|
|
3508
3512
|
return H(() => {
|
|
3509
3513
|
try {
|
|
3510
3514
|
t(matchMedia("(hover: hover)").matches);
|
|
@@ -3512,13 +3516,13 @@ const Ds = (e) => Mt({
|
|
|
3512
3516
|
t(!0);
|
|
3513
3517
|
}
|
|
3514
3518
|
}, []), e;
|
|
3515
|
-
},
|
|
3519
|
+
}, Lt = ({
|
|
3516
3520
|
children: e,
|
|
3517
3521
|
label: t,
|
|
3518
3522
|
className: r,
|
|
3519
3523
|
...a
|
|
3520
3524
|
}) => {
|
|
3521
|
-
const i =
|
|
3525
|
+
const i = Yt(), s = Zs(), [l, m] = A(!1);
|
|
3522
3526
|
return s ? /* @__PURE__ */ g(He.Root, { openDelay: 0, closeDelay: 0, children: [
|
|
3523
3527
|
/* @__PURE__ */ n(He.Trigger, { asChild: !0, children: e }),
|
|
3524
3528
|
/* @__PURE__ */ n(He.Portal, { container: i, children: /* @__PURE__ */ n(He.Content, { asChild: !0, side: "top", children: /* @__PURE__ */ n(
|
|
@@ -3530,13 +3534,13 @@ const Ds = (e) => Mt({
|
|
|
3530
3534
|
children: t
|
|
3531
3535
|
}
|
|
3532
3536
|
) }) })
|
|
3533
|
-
] }) : /* @__PURE__ */ n(Me.Provider, { skipDelayDuration: 0, children: /* @__PURE__ */ g(Me.Root, { open: l, onOpenChange:
|
|
3537
|
+
] }) : /* @__PURE__ */ n(Me.Provider, { skipDelayDuration: 0, children: /* @__PURE__ */ g(Me.Root, { open: l, onOpenChange: m, delayDuration: 0, children: [
|
|
3534
3538
|
/* @__PURE__ */ n(
|
|
3535
3539
|
Me.Trigger,
|
|
3536
3540
|
{
|
|
3537
3541
|
asChild: !0,
|
|
3538
|
-
onClick: (
|
|
3539
|
-
|
|
3542
|
+
onClick: (c) => {
|
|
3543
|
+
c.preventDefault(), m(!l);
|
|
3540
3544
|
},
|
|
3541
3545
|
children: e
|
|
3542
3546
|
}
|
|
@@ -3551,26 +3555,26 @@ const Ds = (e) => Mt({
|
|
|
3551
3555
|
}
|
|
3552
3556
|
) }) })
|
|
3553
3557
|
] }) });
|
|
3554
|
-
}, Ws =
|
|
3555
|
-
({ ...e }, t) => /* @__PURE__ */ n(
|
|
3558
|
+
}, Ws = jo(
|
|
3559
|
+
({ ...e }, t) => /* @__PURE__ */ n(C, { ref: t, ...e })
|
|
3556
3560
|
), we = ({
|
|
3557
3561
|
children: e,
|
|
3558
3562
|
tooltipEnabled: t = !0,
|
|
3559
3563
|
...r
|
|
3560
3564
|
}) => {
|
|
3561
|
-
const [a, i] =
|
|
3565
|
+
const [a, i] = A(!1), s = te(null);
|
|
3562
3566
|
return H(() => {
|
|
3563
3567
|
const l = () => {
|
|
3564
3568
|
if (s.current) {
|
|
3565
|
-
const { scrollWidth:
|
|
3566
|
-
i(
|
|
3569
|
+
const { scrollWidth: m, clientWidth: c } = s.current;
|
|
3570
|
+
i(m > c);
|
|
3567
3571
|
}
|
|
3568
3572
|
};
|
|
3569
3573
|
return l(), window.addEventListener("resize", l), () => {
|
|
3570
3574
|
window.removeEventListener("resize", l);
|
|
3571
3575
|
};
|
|
3572
|
-
}, [e]), !t || !a ? /* @__PURE__ */ n(
|
|
3573
|
-
|
|
3576
|
+
}, [e]), !t || !a ? /* @__PURE__ */ n(C, { ref: s, ...r, children: e }) : /* @__PURE__ */ n(
|
|
3577
|
+
Lt,
|
|
3574
3578
|
{
|
|
3575
3579
|
label: e,
|
|
3576
3580
|
style: { wordBreak: "break-word" },
|
|
@@ -3591,21 +3595,21 @@ const Ds = (e) => Mt({
|
|
|
3591
3595
|
},
|
|
3592
3596
|
className: "mm:underline-offset-2 mm:hover:text-secondary mm:text-nowrap mm:cursor-pointer mm:text-sm mm:leading-6 mm:hover:underline mm:font-mono",
|
|
3593
3597
|
children: [
|
|
3594
|
-
/* @__PURE__ */ n(
|
|
3598
|
+
/* @__PURE__ */ n(ns, { size: 14 }),
|
|
3595
3599
|
"link"
|
|
3596
3600
|
]
|
|
3597
3601
|
}
|
|
3598
|
-
),
|
|
3599
|
-
const [t, r] =
|
|
3602
|
+
), ar = ({ imageUrls: e }) => {
|
|
3603
|
+
const [t, r] = A(!1), [a, i] = A(0), s = () => {
|
|
3600
3604
|
i(
|
|
3601
|
-
(
|
|
3605
|
+
(c) => c === 0 ? e.length - 1 : c - 1
|
|
3602
3606
|
);
|
|
3603
3607
|
}, l = () => {
|
|
3604
3608
|
i(
|
|
3605
|
-
(
|
|
3609
|
+
(c) => c === e.length - 1 ? 0 : c + 1
|
|
3606
3610
|
);
|
|
3607
|
-
},
|
|
3608
|
-
return /* @__PURE__ */ g(E.Root, { onOpenChange: (
|
|
3611
|
+
}, m = e.length > 1;
|
|
3612
|
+
return /* @__PURE__ */ g(E.Root, { onOpenChange: (c) => r(c), open: t, modal: !0, children: [
|
|
3609
3613
|
/* @__PURE__ */ n(E.Trigger, { asChild: !0, children: /* @__PURE__ */ g(
|
|
3610
3614
|
"a",
|
|
3611
3615
|
{
|
|
@@ -3628,7 +3632,7 @@ const Ds = (e) => Mt({
|
|
|
3628
3632
|
/* @__PURE__ */ n(E.Content, { asChild: !0, children: /* @__PURE__ */ g(F, { className: "mm:bg-background mm:z-50 mm:fixed mm:left-1/2 mm:top-1/2 mm:max-h-[85vh] mm:w-[90vw] mm:max-w-[850px] mm:p-4 mm:rounded-md mm:-translate-x-1/2 mm:-translate-y-1/2", children: [
|
|
3629
3633
|
/* @__PURE__ */ g(M, { className: "mm:justify-between mm:items-center", children: [
|
|
3630
3634
|
/* @__PURE__ */ n(Se, { children: /* @__PURE__ */ n(E.Title, { className: "mm:text-sm", children: "Image Gallery" }) }),
|
|
3631
|
-
/* @__PURE__ */ n(E.Close, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "icon", onClick: () => r(!1), children: /* @__PURE__ */ n(
|
|
3635
|
+
/* @__PURE__ */ n(E.Close, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "icon", onClick: () => r(!1), children: /* @__PURE__ */ n(Tr, { size: 20 }) }) })
|
|
3632
3636
|
] }),
|
|
3633
3637
|
/* @__PURE__ */ n(
|
|
3634
3638
|
"img",
|
|
@@ -3638,14 +3642,14 @@ const Ds = (e) => Mt({
|
|
|
3638
3642
|
className: "mm:rounded-md mm:max-w-full mm:max-h-[calc(85vh-120px)] mm:object-contain mm:w-auto mm:mx-auto"
|
|
3639
3643
|
}
|
|
3640
3644
|
),
|
|
3641
|
-
|
|
3642
|
-
/* @__PURE__ */ n(U, { onClick: s, variant: "icon", children: /* @__PURE__ */ n(
|
|
3643
|
-
/* @__PURE__ */ g(
|
|
3645
|
+
m && /* @__PURE__ */ g(M, { className: "mm:p-2 mm:items-center mm:justify-center", children: [
|
|
3646
|
+
/* @__PURE__ */ n(U, { onClick: s, variant: "icon", children: /* @__PURE__ */ n(Er, { size: 18 }) }),
|
|
3647
|
+
/* @__PURE__ */ g(C, { className: "mm:tabular-nums", children: [
|
|
3644
3648
|
a + 1,
|
|
3645
3649
|
" / ",
|
|
3646
3650
|
e.length
|
|
3647
3651
|
] }),
|
|
3648
|
-
/* @__PURE__ */ n(U, { onClick: l, variant: "icon", children: /* @__PURE__ */ n(
|
|
3652
|
+
/* @__PURE__ */ n(U, { onClick: l, variant: "icon", children: /* @__PURE__ */ n(Yr, { size: 18 }) })
|
|
3649
3653
|
] })
|
|
3650
3654
|
] }) })
|
|
3651
3655
|
] });
|
|
@@ -3663,7 +3667,7 @@ const Ds = (e) => Mt({
|
|
|
3663
3667
|
const i = e == null ? void 0 : e.display;
|
|
3664
3668
|
if (!i || i === "empty")
|
|
3665
3669
|
return /* @__PURE__ */ n(
|
|
3666
|
-
|
|
3670
|
+
C,
|
|
3667
3671
|
{
|
|
3668
3672
|
className: "mm:whitespace-nowrap mm:text-card mm:truncate mm:text-sm mm:font-mono",
|
|
3669
3673
|
as: "span",
|
|
@@ -3672,7 +3676,7 @@ const Ds = (e) => Mt({
|
|
|
3672
3676
|
);
|
|
3673
3677
|
if (t == "percent" || t == "percentage")
|
|
3674
3678
|
return /* @__PURE__ */ n(
|
|
3675
|
-
|
|
3679
|
+
C,
|
|
3676
3680
|
{
|
|
3677
3681
|
as: "span",
|
|
3678
3682
|
className: "mm:whitespace-nowrap mm:text-card mm:truncate mm:text-sm mm:font-mono",
|
|
@@ -3682,11 +3686,11 @@ const Ds = (e) => Mt({
|
|
|
3682
3686
|
if (r == "images_list") {
|
|
3683
3687
|
const s = Ks(e.display);
|
|
3684
3688
|
if (s && s.length > 0)
|
|
3685
|
-
return /* @__PURE__ */ n(
|
|
3689
|
+
return /* @__PURE__ */ n(ar, { imageUrls: s });
|
|
3686
3690
|
}
|
|
3687
3691
|
if (r == "image" && e.display) {
|
|
3688
3692
|
const s = [e.display];
|
|
3689
|
-
return /* @__PURE__ */ n(
|
|
3693
|
+
return /* @__PURE__ */ n(ar, { imageUrls: s });
|
|
3690
3694
|
}
|
|
3691
3695
|
return r == "url" && e.display ? /* @__PURE__ */ n(Bs, { url: e.display }) : /* @__PURE__ */ n(
|
|
3692
3696
|
we,
|
|
@@ -3699,12 +3703,12 @@ const Ds = (e) => Mt({
|
|
|
3699
3703
|
);
|
|
3700
3704
|
}
|
|
3701
3705
|
), Qs = (e, t, r) => {
|
|
3702
|
-
const a = e.getValue(r), i = t.getValue(r), s =
|
|
3706
|
+
const a = e.getValue(r), i = t.getValue(r), s = Xt(a) ? a.sortValue : null, l = Xt(i) ? i.sortValue : null;
|
|
3703
3707
|
return s === null && l === null ? 0 : s === null ? -1 : l === null ? 1 : s instanceof Date && l instanceof Date ? s.getTime() - l.getTime() : typeof s == "number" && typeof l == "number" ? s - l : String(s).localeCompare(String(l));
|
|
3704
3708
|
}, Xs = ({ table: e, virtualizer: t }) => {
|
|
3705
3709
|
const r = e.getRowModel().rows, a = t.getVirtualItems(), [i, s] = a.length > 0 ? [
|
|
3706
|
-
|
|
3707
|
-
t.getTotalSize() -
|
|
3710
|
+
Vt(a[0]).start - t.options.scrollMargin,
|
|
3711
|
+
t.getTotalSize() - Vt(a.at(-1)).end
|
|
3708
3712
|
] : [0, 0];
|
|
3709
3713
|
return /* @__PURE__ */ g("tbody", { children: [
|
|
3710
3714
|
i > 0 && /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
|
|
@@ -3715,8 +3719,8 @@ const Ds = (e) => Mt({
|
|
|
3715
3719
|
}
|
|
3716
3720
|
) }),
|
|
3717
3721
|
a.map((l) => {
|
|
3718
|
-
const
|
|
3719
|
-
return !
|
|
3722
|
+
const m = l.index > r.length - 1, c = r[l.index];
|
|
3723
|
+
return !c || m ? /* @__PURE__ */ n(
|
|
3720
3724
|
"tr",
|
|
3721
3725
|
{
|
|
3722
3726
|
className: k(
|
|
@@ -3732,7 +3736,7 @@ const Ds = (e) => Mt({
|
|
|
3732
3736
|
className: k("mm:px-3 mm:py-2 mm:border-spacing-0"),
|
|
3733
3737
|
children: /* @__PURE__ */ g(M, { className: "mm:items-center", children: [
|
|
3734
3738
|
/* @__PURE__ */ n(he, { className: "mm:ml-1", size: "md" }),
|
|
3735
|
-
/* @__PURE__ */ n(
|
|
3739
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-card", children: "Loading more data ..." })
|
|
3736
3740
|
] })
|
|
3737
3741
|
}
|
|
3738
3742
|
)
|
|
@@ -3747,7 +3751,7 @@ const Ds = (e) => Mt({
|
|
|
3747
3751
|
style: {
|
|
3748
3752
|
height: l.size
|
|
3749
3753
|
},
|
|
3750
|
-
children:
|
|
3754
|
+
children: c.getVisibleCells().map((u) => /* @__PURE__ */ n(
|
|
3751
3755
|
"td",
|
|
3752
3756
|
{
|
|
3753
3757
|
className: k(
|
|
@@ -3762,7 +3766,7 @@ const Ds = (e) => Mt({
|
|
|
3762
3766
|
u.id
|
|
3763
3767
|
))
|
|
3764
3768
|
},
|
|
3765
|
-
|
|
3769
|
+
c.id
|
|
3766
3770
|
);
|
|
3767
3771
|
}),
|
|
3768
3772
|
s > 0 && /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
|
|
@@ -3779,21 +3783,21 @@ const Ds = (e) => Mt({
|
|
|
3779
3783
|
data: { explanation: t }
|
|
3780
3784
|
}) => /* @__PURE__ */ g(X, { className: "mm:w-[225px] mm:m-1 mm:wrap-anywhere", children: [
|
|
3781
3785
|
/* @__PURE__ */ n(
|
|
3782
|
-
|
|
3786
|
+
qt,
|
|
3783
3787
|
{
|
|
3784
3788
|
style: { visibility: "hidden" },
|
|
3785
3789
|
type: "target",
|
|
3786
|
-
position:
|
|
3790
|
+
position: Ut.Left
|
|
3787
3791
|
}
|
|
3788
3792
|
),
|
|
3789
|
-
/* @__PURE__ */ n(
|
|
3790
|
-
/* @__PURE__ */ n(
|
|
3793
|
+
/* @__PURE__ */ n(C, { className: "mm:text-base mm:mb-4 mm:font-semibold", children: e }),
|
|
3794
|
+
/* @__PURE__ */ n(C, { className: "mm:text-base mm:font-semibold", children: t }),
|
|
3791
3795
|
/* @__PURE__ */ n(
|
|
3792
|
-
|
|
3796
|
+
qt,
|
|
3793
3797
|
{
|
|
3794
3798
|
style: { visibility: "hidden" },
|
|
3795
3799
|
type: "source",
|
|
3796
|
-
position:
|
|
3800
|
+
position: Ut.Right
|
|
3797
3801
|
}
|
|
3798
3802
|
)
|
|
3799
3803
|
] }), Js = {
|
|
@@ -3803,32 +3807,32 @@ const Ds = (e) => Mt({
|
|
|
3803
3807
|
process: (e) => /* @__PURE__ */ n(_e, { title: "Process", ...e }),
|
|
3804
3808
|
combine: (e) => /* @__PURE__ */ n(_e, { title: "Combine", ...e }),
|
|
3805
3809
|
result: (e) => /* @__PURE__ */ n(_e, { title: "Result", ...e })
|
|
3806
|
-
},
|
|
3807
|
-
const a = r.direction === "LR", i = new
|
|
3810
|
+
}, sr = (e, t, r) => {
|
|
3811
|
+
const a = r.direction === "LR", i = new Zt.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
3808
3812
|
return i.setGraph({
|
|
3809
3813
|
rankdir: r.direction,
|
|
3810
3814
|
nodesep: 10,
|
|
3811
3815
|
ranksep: 50
|
|
3812
3816
|
}), t.forEach((s) => i.setEdge(s.source, s.target)), e.forEach(
|
|
3813
3817
|
(s) => {
|
|
3814
|
-
var l,
|
|
3818
|
+
var l, m;
|
|
3815
3819
|
return i.setNode(s.id, {
|
|
3816
3820
|
...s,
|
|
3817
3821
|
width: ((l = s.measured) == null ? void 0 : l.width) ?? 225,
|
|
3818
|
-
height: ((
|
|
3822
|
+
height: ((m = s.measured) == null ? void 0 : m.height) ?? 100
|
|
3819
3823
|
});
|
|
3820
3824
|
}
|
|
3821
|
-
),
|
|
3825
|
+
), Zt.layout(i), {
|
|
3822
3826
|
nodes: e.map((s) => {
|
|
3823
|
-
var
|
|
3824
|
-
const { x: l, y:
|
|
3827
|
+
var c, u;
|
|
3828
|
+
const { x: l, y: m } = i.node(s.id);
|
|
3825
3829
|
return {
|
|
3826
3830
|
...s,
|
|
3827
3831
|
position: {
|
|
3828
3832
|
targetPosition: a ? "left" : "top",
|
|
3829
3833
|
sourcePosition: a ? "right" : "bottom",
|
|
3830
|
-
x: l - (((
|
|
3831
|
-
y:
|
|
3834
|
+
x: l - (((c = s.measured) == null ? void 0 : c.width) ?? 225) / 2,
|
|
3835
|
+
y: m - (((u = s.measured) == null ? void 0 : u.height) ?? 100) / 2
|
|
3832
3836
|
}
|
|
3833
3837
|
};
|
|
3834
3838
|
}),
|
|
@@ -3840,21 +3844,21 @@ const Ds = (e) => Mt({
|
|
|
3840
3844
|
initialNodes: r,
|
|
3841
3845
|
initialEdges: a
|
|
3842
3846
|
}) => {
|
|
3843
|
-
const { nodes: i, edges: s } =
|
|
3847
|
+
const { nodes: i, edges: s } = sr(
|
|
3844
3848
|
r,
|
|
3845
3849
|
a,
|
|
3846
3850
|
{ direction: "LR" }
|
|
3847
|
-
), [l,
|
|
3851
|
+
), [l, m, c] = Uo(i), [u, p, w] = Zo(s), { fitView: h, flowToScreenPosition: y } = Wo();
|
|
3848
3852
|
H(
|
|
3849
3853
|
() => {
|
|
3850
3854
|
if (l.every(
|
|
3851
3855
|
(d) => {
|
|
3852
|
-
var
|
|
3853
|
-
return ((
|
|
3856
|
+
var b;
|
|
3857
|
+
return ((b = d.measured) == null ? void 0 : b.width) && d.measured.height;
|
|
3854
3858
|
}
|
|
3855
3859
|
)) {
|
|
3856
|
-
const { nodes: d, edges:
|
|
3857
|
-
|
|
3860
|
+
const { nodes: d, edges: b } = sr(l, u, { direction: "LR" });
|
|
3861
|
+
m(d), p(b);
|
|
3858
3862
|
}
|
|
3859
3863
|
},
|
|
3860
3864
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
@@ -3872,7 +3876,7 @@ const Ds = (e) => Mt({
|
|
|
3872
3876
|
), H(
|
|
3873
3877
|
() => {
|
|
3874
3878
|
window.requestAnimationFrame(() => {
|
|
3875
|
-
const { screenWidth: f, screenHeight: d } =
|
|
3879
|
+
const { screenWidth: f, screenHeight: d } = x(l);
|
|
3876
3880
|
t({ width: f + 15, height: d + 15 });
|
|
3877
3881
|
});
|
|
3878
3882
|
},
|
|
@@ -3894,21 +3898,21 @@ const Ds = (e) => Mt({
|
|
|
3894
3898
|
h().catch((f) => console.error(f));
|
|
3895
3899
|
});
|
|
3896
3900
|
}, [e.height, e.width, h]);
|
|
3897
|
-
const
|
|
3898
|
-
const d = f.map((D) => D.position),
|
|
3899
|
-
var
|
|
3900
|
-
return ((
|
|
3901
|
-
}),
|
|
3902
|
-
var
|
|
3903
|
-
return ((
|
|
3904
|
-
}),
|
|
3901
|
+
const x = (f) => {
|
|
3902
|
+
const d = f.map((D) => D.position), b = f.map((D) => {
|
|
3903
|
+
var I;
|
|
3904
|
+
return ((I = D.measured) == null ? void 0 : I.width) || 0;
|
|
3905
|
+
}), _ = f.map((D) => {
|
|
3906
|
+
var I;
|
|
3907
|
+
return ((I = D.measured) == null ? void 0 : I.height) || 0;
|
|
3908
|
+
}), v = d.map((D) => D.x), S = d.map((D) => D.y), N = Math.min(...v), L = Math.max(...v.map((D, I) => D + (b[I] ?? 0))), R = Math.min(...S), j = Math.max(...S.map((D, I) => D + (_[I] ?? 0))), z = y({ x: N, y: R }), T = y({ x: L, y: j });
|
|
3905
3909
|
return {
|
|
3906
3910
|
screenWidth: T.x - z.x,
|
|
3907
3911
|
screenHeight: T.y - z.y
|
|
3908
3912
|
};
|
|
3909
3913
|
};
|
|
3910
3914
|
return /* @__PURE__ */ n(
|
|
3911
|
-
|
|
3915
|
+
Bo,
|
|
3912
3916
|
{
|
|
3913
3917
|
maxZoom: 0.8,
|
|
3914
3918
|
minZoom: 0.8,
|
|
@@ -3921,8 +3925,8 @@ const Ds = (e) => Mt({
|
|
|
3921
3925
|
elementsSelectable: !1,
|
|
3922
3926
|
nodes: l,
|
|
3923
3927
|
edges: u,
|
|
3924
|
-
onNodesChange:
|
|
3925
|
-
onEdgesChange:
|
|
3928
|
+
onNodesChange: c,
|
|
3929
|
+
onEdgesChange: w,
|
|
3926
3930
|
nodeTypes: Js
|
|
3927
3931
|
}
|
|
3928
3932
|
);
|
|
@@ -3930,7 +3934,7 @@ const Ds = (e) => Mt({
|
|
|
3930
3934
|
nodes: e,
|
|
3931
3935
|
edges: t
|
|
3932
3936
|
}) => {
|
|
3933
|
-
const [r, a] =
|
|
3937
|
+
const [r, a] = A({ width: 500, height: 250 }), i = e.map((l) => ({
|
|
3934
3938
|
id: l.id,
|
|
3935
3939
|
type: l.type,
|
|
3936
3940
|
position: { x: 0, y: 0 },
|
|
@@ -3946,11 +3950,11 @@ const Ds = (e) => Mt({
|
|
|
3946
3950
|
stroke: "var(--mm-color-card)"
|
|
3947
3951
|
},
|
|
3948
3952
|
markerEnd: {
|
|
3949
|
-
type:
|
|
3953
|
+
type: Ko.ArrowClosed,
|
|
3950
3954
|
color: "var(--mm-color-card)"
|
|
3951
3955
|
}
|
|
3952
3956
|
}));
|
|
3953
|
-
return /* @__PURE__ */ n(
|
|
3957
|
+
return /* @__PURE__ */ n(Go, { children: /* @__PURE__ */ n(
|
|
3954
3958
|
"div",
|
|
3955
3959
|
{
|
|
3956
3960
|
style: {
|
|
@@ -3975,7 +3979,7 @@ const Ds = (e) => Mt({
|
|
|
3975
3979
|
value: r,
|
|
3976
3980
|
style: a
|
|
3977
3981
|
}) => {
|
|
3978
|
-
const i = !!t, s = i && e, l =
|
|
3982
|
+
const i = !!t, s = i && e, l = Yt();
|
|
3979
3983
|
return /* @__PURE__ */ n("th", { style: a, className: "mm:px-3 mm:py-2 mm:border-spacing-0", children: /* @__PURE__ */ g(M, { className: "mm:gap-1 mm:flex-nowrap mm:items-center", children: [
|
|
3980
3984
|
/* @__PURE__ */ n(
|
|
3981
3985
|
we,
|
|
@@ -3995,7 +3999,7 @@ const Ds = (e) => Mt({
|
|
|
3995
3999
|
transition: "opacity 0.25s ease-in-out",
|
|
3996
4000
|
pointerEvents: s ? "auto" : "none"
|
|
3997
4001
|
},
|
|
3998
|
-
children: /* @__PURE__ */ n(
|
|
4002
|
+
children: /* @__PURE__ */ n(Ir, { size: 14, className: "mm:fill-muted" })
|
|
3999
4003
|
}
|
|
4000
4004
|
) }),
|
|
4001
4005
|
/* @__PURE__ */ g(E.Portal, { container: l, children: [
|
|
@@ -4045,7 +4049,7 @@ const Ds = (e) => Mt({
|
|
|
4045
4049
|
a.id
|
|
4046
4050
|
))
|
|
4047
4051
|
}
|
|
4048
|
-
), ni =
|
|
4052
|
+
), ni = Oo(), ai = (e) => e.split("_").map((a) => a.length === 0 ? "" : a.charAt(0).toUpperCase() + a.slice(1)).join(" "), si = ({
|
|
4049
4053
|
dataColumns: e,
|
|
4050
4054
|
virtualizer: t,
|
|
4051
4055
|
data: r,
|
|
@@ -4055,51 +4059,51 @@ const Ds = (e) => Mt({
|
|
|
4055
4059
|
}) => {
|
|
4056
4060
|
const l = ce(() => r ? r.map((u) => {
|
|
4057
4061
|
const p = {};
|
|
4058
|
-
for (const [
|
|
4059
|
-
p[
|
|
4062
|
+
for (const [w, h] of Object.entries(u))
|
|
4063
|
+
p[w] = ee(h);
|
|
4060
4064
|
return p;
|
|
4061
|
-
}) : [], [r]),
|
|
4065
|
+
}) : [], [r]), m = ce(() => e && e.length > 0 ? e.map(
|
|
4062
4066
|
({ name: u, ...p }) => ni.accessor(u, {
|
|
4063
4067
|
minSize: 100,
|
|
4064
4068
|
maxSize: 200,
|
|
4065
4069
|
header: () => ai(u),
|
|
4066
|
-
cell: (
|
|
4070
|
+
cell: (w) => /* @__PURE__ */ n(
|
|
4067
4071
|
Gs,
|
|
4068
4072
|
{
|
|
4069
4073
|
unit: p.unit,
|
|
4070
4074
|
isOpened: i,
|
|
4071
4075
|
renderType: p.renderType,
|
|
4072
|
-
formattedValue:
|
|
4076
|
+
formattedValue: w.getValue()
|
|
4073
4077
|
}
|
|
4074
4078
|
),
|
|
4075
4079
|
sortingFn: Qs
|
|
4076
4080
|
})
|
|
4077
|
-
) : [], [e, i]),
|
|
4081
|
+
) : [], [e, i]), c = Ho({
|
|
4078
4082
|
data: l,
|
|
4079
|
-
columns:
|
|
4080
|
-
getCoreRowModel:
|
|
4083
|
+
columns: m,
|
|
4084
|
+
getCoreRowModel: Vo()
|
|
4081
4085
|
});
|
|
4082
4086
|
return /* @__PURE__ */ g("table", { ref: a, className: "mm:border-collapse", children: [
|
|
4083
4087
|
/* @__PURE__ */ n(
|
|
4084
4088
|
oi,
|
|
4085
4089
|
{
|
|
4086
4090
|
isOpened: i,
|
|
4087
|
-
table:
|
|
4091
|
+
table: c,
|
|
4088
4092
|
explainability: s
|
|
4089
4093
|
}
|
|
4090
4094
|
),
|
|
4091
|
-
/* @__PURE__ */ n(Xs, { table:
|
|
4095
|
+
/* @__PURE__ */ n(Xs, { table: c, virtualizer: t })
|
|
4092
4096
|
] });
|
|
4093
4097
|
}, ii = "data:image/svg+xml,%3csvg%20width='146'%20height='120'%20viewBox='0%200%20146%20120'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M131.648%2059.7265C131.648%2072.9542%20127.219%2085.3837%20119.837%2095.1904C115.748%20100.55%20110.865%20105.225%20105.187%20108.874C96.1015%20114.918%2085.0856%20118.339%2073.3883%20118.339C41.2491%20118.453%2015.1289%2092.2256%2015.1289%2059.7265C15.1289%2027.3414%2041.1355%201%2073.3883%201C85.0856%201%2095.9879%204.42096%20105.187%2010.4647C110.865%2014.1137%20115.748%2018.789%20119.837%2024.1485C127.219%2034.0693%20131.648%2046.3847%20131.648%2059.7265Z'%20fill='%23F1F3F9'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M29.0198%2051.8744H28.3164C27.7889%2051.8744%2027.4373%2051.7103%2027.4373%2051.4641C27.4373%2051.2179%2027.7889%2051.0538%2028.3164%2051.0538H29.0198C29.5473%2051.0538%2029.8989%2051.2179%2029.8989%2051.4641C29.8989%2051.7103%2029.5473%2051.8744%2029.0198%2051.8744Z'%20fill='%232D5887'/%3e%3cpath%20d='M29.0198%2055.1566H28.3164C27.7889%2055.1566%2027.4373%2054.9925%2027.4373%2054.7463C27.4373%2054.5002%2027.7889%2054.3361%2028.3164%2054.3361H29.0198C29.5473%2054.3361%2029.8989%2054.5002%2029.8989%2054.7463C29.8989%2054.9925%2029.5473%2055.1566%2029.0198%2055.1566Z'%20fill='%232D5887'/%3e%3cpath%20d='M29.0198%2058.4388H28.3164C27.7889%2058.4388%2027.4373%2058.2747%2027.4373%2058.0286C27.4373%2057.7824%2027.7889%2057.6183%2028.3164%2057.6183H29.0198C29.5473%2057.6183%2029.8989%2057.7824%2029.8989%2058.0286C29.8989%2058.2747%2029.5473%2058.4388%2029.0198%2058.4388Z'%20fill='%232D5887'/%3e%3cpath%20d='M29.0198%2061.7211H28.3164C27.7889%2061.7211%2027.4373%2061.557%2027.4373%2061.3108C27.4373%2061.0646%2027.7889%2060.9005%2028.3164%2060.9005H29.0198C29.5473%2060.9005%2029.8989%2061.0646%2029.8989%2061.3108C29.8989%2061.557%2029.5473%2061.7211%2029.0198%2061.7211Z'%20fill='%232D5887'/%3e%3cpath%20d='M61.1191%2051.8744H49.5532C49.0843%2051.8744%2048.7717%2051.7103%2048.7717%2051.4641C48.7717%2051.2179%2049.0843%2051.0538%2049.5532%2051.0538H61.1191C61.588%2051.0538%2061.9006%2051.2179%2061.9006%2051.4641C61.9006%2051.7103%2061.588%2051.8744%2061.1191%2051.8744Z'%20fill='white'/%3e%3cpath%20d='M85.7623%2061.7211H49.5266C49.0737%2061.7211%2048.7717%2061.557%2048.7717%2061.3108C48.7717%2061.0646%2049.0737%2060.9005%2049.5266%2060.9005H85.7623C86.2153%2060.9005%2086.5172%2061.0646%2086.5172%2061.3108C86.5172%2061.557%2086.2153%2061.7211%2085.7623%2061.7211Z'%20fill='url(%23paint0_linear_555_5442)'/%3e%3cpath%20d='M61.1642%2055.1566H45.4053C44.9635%2055.1566%2044.6689%2054.9925%2044.6689%2054.7463C44.6689%2054.5002%2044.9635%2054.3361%2045.4053%2054.3361H61.1642C61.606%2054.3361%2061.9006%2054.5002%2061.9006%2054.7463C61.9006%2054.9925%2061.606%2055.1566%2061.1642%2055.1566Z'%20fill='%232D5887'/%3e%3cpath%20d='M73.4741%2058.4388H45.4038C44.9629%2058.4388%2044.6689%2058.2747%2044.6689%2058.0286C44.6689%2057.7824%2044.9629%2057.6183%2045.4038%2057.6183H73.4741C73.915%2057.6183%2074.2089%2057.7824%2074.2089%2058.0286C74.0619%2058.2747%2073.768%2058.4388%2073.4741%2058.4388Z'%20fill='%232D5887'/%3e%3cpath%20d='M85.7178%2058.4388H75.008C74.5284%2058.4388%2074.2087%2058.2747%2074.2087%2058.0286C74.2087%2057.7824%2074.5284%2057.6183%2075.008%2057.6183H85.7178C86.1974%2057.6183%2086.5171%2057.7824%2086.5171%2058.0286C86.5171%2058.2747%2086.1974%2058.4388%2085.7178%2058.4388Z'%20fill='white'/%3e%3cpath%20d='M92.3053%2058.4388H88.1138C87.6481%2058.4388%2087.3376%2058.2747%2087.3376%2058.0286C87.3376%2057.7824%2087.6481%2057.6183%2088.1138%2057.6183H92.3053C92.771%2057.6183%2093.0815%2057.7824%2093.0815%2058.0286C93.0815%2058.2747%2092.771%2058.4388%2092.3053%2058.4388Z'%20fill='url(%23paint1_linear_555_5442)'/%3e%3cpath%20d='M2%20103.569H139.853'%20stroke='%23D6DEE8'%20stroke-width='2'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M98.8255%2051.0538V103.569H24.3715C21.4345%20103.569%2019.2317%20101.209%2019.2317%2098.4063V51.0538H98.8255Z'%20fill='white'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M128.365%2051.0538V98.4063C128.365%20101.357%20125.916%20103.569%20123.008%20103.569H98.8254V51.0538H128.365Z'%20fill='%23DAE1ED'/%3e%3cpath%20d='M128.365%2051.0538V98.4063C128.365%20101.357%20125.916%20103.569%20123.008%20103.569H98.8254V51.0538H128.365Z'%20fill='%23F1F3F9'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M47.9512%2051.0538L63.6074%2026.4372H143.956L127.857%2051.0538H47.9512Z'%20fill='%23C5CDDB'/%3e%3cpath%20d='M47.9512%2051.0538L63.6074%2026.4372H143.956L127.857%2051.0538H47.9512Z'%20fill='%23F1F3F9'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20opacity='0.3'%20d='M128.365%2051.1976V78.9527H106.826C104.826%2078.9527%20103.441%2077.6584%20103.133%2075.7889L98.8254%2051.0538L128.365%2051.1976Z'%20fill='url(%23paint2_linear_555_5442)'/%3e%3cpath%20d='M127.746%2051.0538H98.8254L113.511%2073.312C114.56%2074.786%20116.208%2075.6705%20117.856%2075.6705H140.334C141.832%2075.6705%20142.881%2073.9016%20141.982%2072.7224L127.746%2051.0538Z'%20fill='white'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M98.8254%2051.0538L83.0597%2026.4372H2L18.3607%2051.0538H98.8254Z'%20fill='white'%20stroke='%23D6DCE8'%20stroke-width='2'%20stroke-miterlimit='10'/%3e%3cpath%20d='M58.9543%2081.4144H27.9218C27.1967%2081.4144%2026.6167%2080.8673%2026.6167%2080.1835C26.6167%2079.4997%2027.1967%2078.9527%2027.9218%2078.9527H58.9543C59.6794%2078.9527%2060.2594%2079.4997%2060.2594%2080.1835C60.1144%2080.8673%2059.6794%2081.4144%2058.9543%2081.4144Z'%20fill='%23DAE1ED'/%3e%3cpath%20d='M58.9543%2087.1583H27.9218C27.1967%2087.1583%2026.6167%2086.7936%2026.6167%2086.3377C26.6167%2085.8818%2027.1967%2085.5172%2027.9218%2085.5172H58.9543C59.6794%2085.5172%2060.2594%2085.8818%2060.2594%2086.3377C60.1144%2086.7936%2059.6794%2087.1583%2058.9543%2087.1583Z'%20fill='%23DAE1ED'/%3e%3cpath%20d='M42.5228%2093.7227H27.9422C27.2058%2093.7227%2026.6167%2093.358%2026.6167%2092.9021C26.6167%2092.4462%2027.2058%2092.0815%2027.9422%2092.0815H42.5228C43.2592%2092.0815%2043.8483%2092.4462%2043.8483%2092.9021C43.7011%2093.358%2043.1119%2093.7227%2042.5228%2093.7227Z'%20fill='%23DAE1ED'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_555_5442'%20x1='48.9413'%20y1='61.3274'%20x2='86.561'%20y2='61.3274'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF66A9'/%3e%3cstop%20offset='1'%20stop-color='%23F53689'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_555_5442'%20x1='87.376'%20y1='58.0035'%20x2='93.0804'%20y2='58.0035'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%2383A6FF'/%3e%3cstop%20offset='1'%20stop-color='%235A78FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_555_5442'%20x1='113.602'%20y1='79.5253'%20x2='113.602'%20y2='54.1128'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.00289017'%20stop-color='%23606673'%20stop-opacity='0'/%3e%3cstop%20offset='1'%20stop-color='%23AAB2C5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", li = (e) => {
|
|
4094
|
-
const [t, r] =
|
|
4098
|
+
const [t, r] = A({
|
|
4095
4099
|
width: 0,
|
|
4096
4100
|
height: 0
|
|
4097
4101
|
});
|
|
4098
|
-
return
|
|
4102
|
+
return Mo(() => {
|
|
4099
4103
|
const a = e.current, i = new ResizeObserver((s) => {
|
|
4100
4104
|
for (const l of s) {
|
|
4101
|
-
const { width:
|
|
4102
|
-
r({ width:
|
|
4105
|
+
const { width: m, height: c } = l.contentRect;
|
|
4106
|
+
r({ width: m, height: c });
|
|
4103
4107
|
}
|
|
4104
4108
|
});
|
|
4105
4109
|
if (a) {
|
|
@@ -4117,14 +4121,14 @@ const Ds = (e) => Mt({
|
|
|
4117
4121
|
bottomWhiteFade: 'mm:relative mm:before:content-[""] mm:before:absolute mm:before:bottom-0 mm:before:left-0 mm:before:h-24 mm:before:w-full mm:before:bg-gradient-to-b mm:before:from-transparent mm:before:to-mageWhisper-6/70 mm:before:pointer-events-none mm:before:z-2',
|
|
4118
4122
|
scrollFadeIndicator: 'mm:relative mm:data-[can-scroll=true]:before:content-[""] mm:data-[can-scroll=true]:before:absolute mm:data-[can-scroll=true]:before:bottom-0 mm:data-[can-scroll=true]:before:left-0 mm:data-[can-scroll=true]:before:h-4 mm:data-[can-scroll=true]:before:w-full mm:data-[can-scroll=true]:before:border mm:data-[can-scroll=true]:before:border-black mm:data-[can-scroll=true]:before:rounded-full mm:data-[can-scroll=true]:before:translate-y-full mm:data-[can-scroll=true]:before:shadow-[0px_0px_44px_16px_var(--mm-color-card)] mm:data-[can-scroll=true]:before:pointer-events-none mm:data-[can-scroll=true]:before:z-2 mm:data-[can-scroll=true]:before:opacity-0 mm:data-[can-scroll=true]:before:transition-all mm:data-[can-scroll=true]:before:duration-300 mm:data-[hovered=true]:before:opacity-60 mm:data-[hovered=true]:before:animate-[pulsateShadow_2s_ease-in-out_infinite]'
|
|
4119
4123
|
}, ci = (e) => {
|
|
4120
|
-
const t = te(null), [r, a] =
|
|
4124
|
+
const t = te(null), [r, a] = A(!1), [i, s] = A(!1), l = ye((c) => {
|
|
4121
4125
|
if (t.current) {
|
|
4122
4126
|
const u = t.current, p = u.scrollWidth - u.clientWidth;
|
|
4123
|
-
p !== 0 ? (a(
|
|
4127
|
+
p !== 0 ? (a(c > 0), s(Math.ceil(c) < Math.floor(p))) : (a(!1), s(!1));
|
|
4124
4128
|
}
|
|
4125
|
-
}, []),
|
|
4126
|
-
(
|
|
4127
|
-
l(
|
|
4129
|
+
}, []), m = ye(
|
|
4130
|
+
(c, u) => {
|
|
4131
|
+
l(c);
|
|
4128
4132
|
},
|
|
4129
4133
|
[l]
|
|
4130
4134
|
);
|
|
@@ -4132,9 +4136,9 @@ const Ds = (e) => Mt({
|
|
|
4132
4136
|
scrollContainerRef: t,
|
|
4133
4137
|
leftFade: r,
|
|
4134
4138
|
rightFade: i,
|
|
4135
|
-
handleScroll:
|
|
4139
|
+
handleScroll: m
|
|
4136
4140
|
};
|
|
4137
|
-
},
|
|
4141
|
+
}, ho = 50, mi = 350, di = () => /* @__PURE__ */ g(F, { className: "mm:gap-2 mm:my-4 mm:text-center", children: [
|
|
4138
4142
|
/* @__PURE__ */ n(
|
|
4139
4143
|
"img",
|
|
4140
4144
|
{
|
|
@@ -4143,13 +4147,13 @@ const Ds = (e) => Mt({
|
|
|
4143
4147
|
className: "mm:m-auto mm:w-[100px]"
|
|
4144
4148
|
}
|
|
4145
4149
|
),
|
|
4146
|
-
/* @__PURE__ */ n(
|
|
4147
|
-
] }),
|
|
4150
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-muted-foreground", children: "This resulting data is empty" })
|
|
4151
|
+
] }), ir = ({
|
|
4148
4152
|
direction: e,
|
|
4149
4153
|
visible: t,
|
|
4150
4154
|
scrollContainerRef: r
|
|
4151
4155
|
}) => {
|
|
4152
|
-
const a = e === "left", i = a ?
|
|
4156
|
+
const a = e === "left", i = a ? Er : Yr;
|
|
4153
4157
|
return /* @__PURE__ */ n(
|
|
4154
4158
|
F,
|
|
4155
4159
|
{
|
|
@@ -4162,7 +4166,7 @@ const Ds = (e) => Mt({
|
|
|
4162
4166
|
opacity: t ? 1 : 0,
|
|
4163
4167
|
transition: "opacity 0.25s ease-in-out",
|
|
4164
4168
|
pointerEvents: t ? "auto" : "none",
|
|
4165
|
-
height:
|
|
4169
|
+
height: ho,
|
|
4166
4170
|
background: `linear-gradient(to ${e}, rgba(255, 255, 255, 0) 0%, var(--mm-color-background) 50%)`
|
|
4167
4171
|
},
|
|
4168
4172
|
children: /* @__PURE__ */ n(
|
|
@@ -4239,59 +4243,59 @@ const Ds = (e) => Mt({
|
|
|
4239
4243
|
isOpened: r = !0,
|
|
4240
4244
|
setIsOpened: a
|
|
4241
4245
|
}) => {
|
|
4242
|
-
const [i, s] =
|
|
4246
|
+
const [i, s] = A(0), [l, m] = A(!1), [c, u] = A(!1), { data: p, isPending: w } = Pa(
|
|
4243
4247
|
e,
|
|
4244
4248
|
t
|
|
4245
4249
|
), {
|
|
4246
4250
|
data: h,
|
|
4247
|
-
isPending:
|
|
4248
|
-
fetchNextPage:
|
|
4251
|
+
isPending: y,
|
|
4252
|
+
fetchNextPage: x,
|
|
4249
4253
|
isFetching: f,
|
|
4250
4254
|
isFetchingNextPage: d,
|
|
4251
|
-
hasNextPage:
|
|
4252
|
-
} =
|
|
4255
|
+
hasNextPage: b
|
|
4256
|
+
} = Ha(e, { pageSize: 100 }, t), _ = ce(
|
|
4253
4257
|
() => (h == null ? void 0 : h.pages.flatMap((q) => q)) || [],
|
|
4254
4258
|
[h]
|
|
4255
|
-
), { data:
|
|
4256
|
-
count:
|
|
4259
|
+
), { data: v } = $a(e, t), S = (v == null ? void 0 : v.count) || 0, { data: N } = fo(t), L = te(null), { width: R } = li(L), { scrollContainerRef: j, leftFade: z, rightFade: T, handleScroll: D } = ci(R), I = qo({
|
|
4260
|
+
count: b ? _.length + 1 : _.length,
|
|
4257
4261
|
getScrollElement: () => j.current,
|
|
4258
|
-
estimateSize: () =>
|
|
4262
|
+
estimateSize: () => ho,
|
|
4259
4263
|
overscan: 5
|
|
4260
4264
|
}), V = ye(() => {
|
|
4261
|
-
if (!j.current ||
|
|
4265
|
+
if (!j.current || S <= 0) return;
|
|
4262
4266
|
const { clientHeight: q, scrollHeight: J } = j.current;
|
|
4263
4267
|
u(J > q);
|
|
4264
|
-
const oe =
|
|
4268
|
+
const oe = I.range, W = (((oe == null ? void 0 : oe.endIndex) ?? 0) + 1) / S * 100;
|
|
4265
4269
|
s(Math.min(Math.max(W, 0), 100));
|
|
4266
|
-
}, [j,
|
|
4270
|
+
}, [j, S, I]);
|
|
4267
4271
|
H(() => {
|
|
4268
4272
|
V();
|
|
4269
|
-
}, [
|
|
4270
|
-
const
|
|
4273
|
+
}, [_, V]);
|
|
4274
|
+
const ae = ye(
|
|
4271
4275
|
({ x: q, y: J }) => {
|
|
4272
4276
|
V(), D(q, J);
|
|
4273
4277
|
},
|
|
4274
4278
|
[V, D]
|
|
4275
|
-
), re =
|
|
4279
|
+
), re = I.getVirtualItems();
|
|
4276
4280
|
if (H(() => {
|
|
4277
4281
|
const [q] = [...re].reverse();
|
|
4278
|
-
q && q.index >=
|
|
4282
|
+
q && q.index >= _.length - 1 && b && !d && x().catch((J) => console.error(J));
|
|
4279
4283
|
}, [
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4284
|
+
b,
|
|
4285
|
+
x,
|
|
4286
|
+
_.length,
|
|
4283
4287
|
d,
|
|
4284
4288
|
re
|
|
4285
|
-
]),
|
|
4289
|
+
]), w || y)
|
|
4286
4290
|
return /* @__PURE__ */ n("div", { className: "mm:w-full mm:flex mm:items-center mm:justify-center mm:h-[225px]", children: /* @__PURE__ */ n(he, { className: "mm:border-2" }) });
|
|
4287
|
-
const ie = r ? Ue.scrollFadeIndicator :
|
|
4291
|
+
const ie = r ? Ue.scrollFadeIndicator : c ? Ue.bottomWhiteFade : void 0;
|
|
4288
4292
|
return /* @__PURE__ */ g(
|
|
4289
4293
|
F,
|
|
4290
4294
|
{
|
|
4291
4295
|
id: "scrollareadebug",
|
|
4292
|
-
onMouseEnter: () =>
|
|
4293
|
-
onMouseLeave: () =>
|
|
4294
|
-
"data-hovered": r && l &&
|
|
4296
|
+
onMouseEnter: () => m(!0),
|
|
4297
|
+
onMouseLeave: () => m(!1),
|
|
4298
|
+
"data-hovered": r && l && c,
|
|
4295
4299
|
"data-can-scroll": r && Math.ceil(i) < 100,
|
|
4296
4300
|
className: k(
|
|
4297
4301
|
{
|
|
@@ -4311,7 +4315,7 @@ const Ds = (e) => Mt({
|
|
|
4311
4315
|
ie
|
|
4312
4316
|
),
|
|
4313
4317
|
onScroll: (q) => {
|
|
4314
|
-
|
|
4318
|
+
ae({
|
|
4315
4319
|
x: q.currentTarget.scrollLeft,
|
|
4316
4320
|
y: q.currentTarget.scrollTop
|
|
4317
4321
|
});
|
|
@@ -4320,8 +4324,8 @@ const Ds = (e) => Mt({
|
|
|
4320
4324
|
si,
|
|
4321
4325
|
{
|
|
4322
4326
|
tableRef: L,
|
|
4323
|
-
virtualizer:
|
|
4324
|
-
data:
|
|
4327
|
+
virtualizer: I,
|
|
4328
|
+
data: _,
|
|
4325
4329
|
dataColumns: p,
|
|
4326
4330
|
emptyTable: /* @__PURE__ */ n(di, {}),
|
|
4327
4331
|
isOpened: r,
|
|
@@ -4353,14 +4357,14 @@ const Ds = (e) => Mt({
|
|
|
4353
4357
|
!r && /* @__PURE__ */ n(
|
|
4354
4358
|
fi,
|
|
4355
4359
|
{
|
|
4356
|
-
totalRows:
|
|
4360
|
+
totalRows: S,
|
|
4357
4361
|
columnsCount: (p == null ? void 0 : p.length) || 0,
|
|
4358
4362
|
onExpand: () => a(!0)
|
|
4359
4363
|
}
|
|
4360
4364
|
),
|
|
4361
4365
|
r && /* @__PURE__ */ g(ke, { children: [
|
|
4362
4366
|
/* @__PURE__ */ n(
|
|
4363
|
-
|
|
4367
|
+
ir,
|
|
4364
4368
|
{
|
|
4365
4369
|
direction: "left",
|
|
4366
4370
|
visible: z,
|
|
@@ -4368,7 +4372,7 @@ const Ds = (e) => Mt({
|
|
|
4368
4372
|
}
|
|
4369
4373
|
),
|
|
4370
4374
|
/* @__PURE__ */ n(
|
|
4371
|
-
|
|
4375
|
+
ir,
|
|
4372
4376
|
{
|
|
4373
4377
|
direction: "right",
|
|
4374
4378
|
visible: T,
|
|
@@ -4376,11 +4380,11 @@ const Ds = (e) => Mt({
|
|
|
4376
4380
|
}
|
|
4377
4381
|
)
|
|
4378
4382
|
] }),
|
|
4379
|
-
r &&
|
|
4383
|
+
r && c && /* @__PURE__ */ n("div", { className: "mm:absolute mm:bottom-[1.5rem] mm:left-1/2 mm:-translate-x-1/2 mm:z-2", children: /* @__PURE__ */ n(
|
|
4380
4384
|
ui,
|
|
4381
4385
|
{
|
|
4382
4386
|
scrollPercentage: i,
|
|
4383
|
-
totalRows:
|
|
4387
|
+
totalRows: S,
|
|
4384
4388
|
isFetching: f,
|
|
4385
4389
|
scrollContainerRef: j,
|
|
4386
4390
|
hovered: l
|
|
@@ -4391,22 +4395,22 @@ const Ds = (e) => Mt({
|
|
|
4391
4395
|
);
|
|
4392
4396
|
}
|
|
4393
4397
|
), hi = ({ flowDataId: e }) => {
|
|
4394
|
-
const t =
|
|
4398
|
+
const t = fr(), r = se(), { data: a } = G({
|
|
4395
4399
|
queryKey: ["feedback", e],
|
|
4396
4400
|
queryFn: async () => {
|
|
4397
4401
|
if (!e || !$) return null;
|
|
4398
|
-
const { data:
|
|
4402
|
+
const { data: m } = await P.GET(Fa.path, {
|
|
4399
4403
|
params: {
|
|
4400
4404
|
path: {
|
|
4401
4405
|
flowDataId: e.toString()
|
|
4402
4406
|
}
|
|
4403
4407
|
}
|
|
4404
4408
|
});
|
|
4405
|
-
return
|
|
4409
|
+
return m;
|
|
4406
4410
|
},
|
|
4407
4411
|
enabled: !!e && r
|
|
4408
4412
|
}), { mutate: i } = Ke({
|
|
4409
|
-
mutationFn: async (
|
|
4413
|
+
mutationFn: async (m) => {
|
|
4410
4414
|
!e || !$ || await P.POST(Ra.path, {
|
|
4411
4415
|
params: {
|
|
4412
4416
|
path: {
|
|
@@ -4414,7 +4418,7 @@ const Ds = (e) => Mt({
|
|
|
4414
4418
|
}
|
|
4415
4419
|
},
|
|
4416
4420
|
body: {
|
|
4417
|
-
helpfulness:
|
|
4421
|
+
helpfulness: m
|
|
4418
4422
|
}
|
|
4419
4423
|
});
|
|
4420
4424
|
},
|
|
@@ -4425,7 +4429,7 @@ const Ds = (e) => Mt({
|
|
|
4425
4429
|
}
|
|
4426
4430
|
}), { mutate: s } = Ke({
|
|
4427
4431
|
mutationFn: async () => {
|
|
4428
|
-
!e || !$ || await P.DELETE(
|
|
4432
|
+
!e || !$ || await P.DELETE(Ia.path, {
|
|
4429
4433
|
params: {
|
|
4430
4434
|
path: {
|
|
4431
4435
|
flowDataId: e.toString()
|
|
@@ -4438,50 +4442,50 @@ const Ds = (e) => Mt({
|
|
|
4438
4442
|
queryKey: ["feedback", e]
|
|
4439
4443
|
});
|
|
4440
4444
|
}
|
|
4441
|
-
}), l = (
|
|
4442
|
-
(a == null ? void 0 : a.helpfulness) ===
|
|
4445
|
+
}), l = (m) => {
|
|
4446
|
+
(a == null ? void 0 : a.helpfulness) === m ? s() : i(m);
|
|
4443
4447
|
};
|
|
4444
4448
|
return /* @__PURE__ */ g(M, { className: "mm:gap-2", children: [
|
|
4445
|
-
/* @__PURE__ */ n(
|
|
4446
|
-
/* @__PURE__ */ n(M, { className: "mm:gap-2", children: yr.map((
|
|
4447
|
-
|
|
4449
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-muted mm:hidden mm:md:block", children: "How was this response?" }),
|
|
4450
|
+
/* @__PURE__ */ n(M, { className: "mm:gap-2", children: yr.map((m, c) => /* @__PURE__ */ g(M, { className: "mm:items-center", children: [
|
|
4451
|
+
c > 0 && /* @__PURE__ */ n("div", { className: "mm:border-l mm:border-gray-500 mm:h-3" }),
|
|
4448
4452
|
/* @__PURE__ */ n(
|
|
4449
|
-
|
|
4453
|
+
C,
|
|
4450
4454
|
{
|
|
4451
|
-
onClick: () => l(
|
|
4455
|
+
onClick: () => l(m.value),
|
|
4452
4456
|
className: k(
|
|
4453
4457
|
"mm:text-sm mm:cursor-pointer mm:text-gray-500",
|
|
4454
|
-
(a == null ? void 0 : a.helpfulness) ===
|
|
4458
|
+
(a == null ? void 0 : a.helpfulness) === m.value ? "mm:underline mm:text-gray-600" : "mm:hover:underline"
|
|
4455
4459
|
),
|
|
4456
|
-
children:
|
|
4460
|
+
children: m.label
|
|
4457
4461
|
}
|
|
4458
4462
|
)
|
|
4459
|
-
] },
|
|
4463
|
+
] }, m.value)) })
|
|
4460
4464
|
] });
|
|
4461
4465
|
}, gi = () => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(M, { className: "mm:justify-between mm:flex-nowrap mm:overflow-hidden mm:select-none", children: /* @__PURE__ */ g(M, { className: "mm:flex-1 mm:gap-1 mm:flex-nowrap mm:overflow-hidden", children: [
|
|
4462
|
-
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(
|
|
4466
|
+
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(Lr, { className: "mm:text-red-500" }) }),
|
|
4463
4467
|
/* @__PURE__ */ n(we, { className: "mm:truncate mm:flex-1 mm:font-semibold", children: "Data report creation failed" })
|
|
4464
4468
|
] }) }) }), bi = () => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(M, { className: "mm:justify-between mm:flex-nowrap mm:overflow-hidden mm:select-none", children: /* @__PURE__ */ g(M, { className: "mm:flex-1 mm:gap-1 mm:flex-nowrap mm:overflow-hidden", children: [
|
|
4465
4469
|
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(he, { className: "mm:size-3 mm:border-1" }) }),
|
|
4466
4470
|
/* @__PURE__ */ n(we, { className: "mm:truncate mm:flex-1 mm:font-semibold", children: "Data report in creation" })
|
|
4467
|
-
] }) }) }),
|
|
4471
|
+
] }) }) }), lr = ({
|
|
4468
4472
|
loading: e,
|
|
4469
4473
|
result: t
|
|
4470
4474
|
}) => {
|
|
4471
|
-
var
|
|
4472
|
-
const r = te(null), { fullWidthRef: a, setFullWidthRef: i } = Le(), s = !!a && r.current === a, [l,
|
|
4473
|
-
|
|
4474
|
-
}, { flowId: u } =
|
|
4475
|
+
var x;
|
|
4476
|
+
const r = te(null), { fullWidthRef: a, setFullWidthRef: i } = Le(), s = !!a && r.current === a, [l, m] = A(!1), c = () => {
|
|
4477
|
+
m((f) => !f);
|
|
4478
|
+
}, { flowId: u } = lo(), { data: p } = $s(
|
|
4475
4479
|
(t == null ? void 0 : t.status) === "success" ? u : null,
|
|
4476
4480
|
(t == null ? void 0 : t.status) === "success" ? t.public.flowDataId : void 0
|
|
4477
|
-
), { data:
|
|
4481
|
+
), { data: w } = fo(
|
|
4478
4482
|
(t == null ? void 0 : t.status) === "success" ? t.public.flowDataId : void 0
|
|
4479
4483
|
);
|
|
4480
4484
|
if (e || !t || !u)
|
|
4481
4485
|
return /* @__PURE__ */ n(bi, {});
|
|
4482
4486
|
if (t.status === "error")
|
|
4483
4487
|
return /* @__PURE__ */ n(gi, {});
|
|
4484
|
-
const h = !!t.public.answer,
|
|
4488
|
+
const h = !!t.public.answer, y = /* @__PURE__ */ n(
|
|
4485
4489
|
K,
|
|
4486
4490
|
{
|
|
4487
4491
|
id: h ? void 0 : `data-report-${t.public.flowDataId}`,
|
|
@@ -4504,11 +4508,11 @@ const Ds = (e) => Mt({
|
|
|
4504
4508
|
children: [
|
|
4505
4509
|
/* @__PURE__ */ g(M, { className: "mm:flex-nowrap mm:justify-between mm:items-center", children: [
|
|
4506
4510
|
/* @__PURE__ */ g(pe, { className: "mm:justify-center mm:md:items-center mm:flex-col mm:sm:flex-row mm:gap-2", children: [
|
|
4507
|
-
/* @__PURE__ */ n(
|
|
4511
|
+
/* @__PURE__ */ n(Ae, { children: "YOUR DATA REPORT" }),
|
|
4508
4512
|
!t.public.answer && /* @__PURE__ */ n(
|
|
4509
|
-
|
|
4513
|
+
cr,
|
|
4510
4514
|
{
|
|
4511
|
-
explainability:
|
|
4515
|
+
explainability: w,
|
|
4512
4516
|
isFullWidth: s
|
|
4513
4517
|
}
|
|
4514
4518
|
)
|
|
@@ -4519,16 +4523,16 @@ const Ds = (e) => Mt({
|
|
|
4519
4523
|
variant: "icon",
|
|
4520
4524
|
className: "mm:p-0 mm:size-5",
|
|
4521
4525
|
onClick: () => i(s ? null : r.current),
|
|
4522
|
-
children: s ? /* @__PURE__ */ n(
|
|
4526
|
+
children: s ? /* @__PURE__ */ n(Fr, { size: 16 }) : /* @__PURE__ */ n(Rr, { size: 16 })
|
|
4523
4527
|
}
|
|
4524
4528
|
)
|
|
4525
4529
|
] }),
|
|
4526
4530
|
/* @__PURE__ */ n(
|
|
4527
|
-
|
|
4531
|
+
C,
|
|
4528
4532
|
{
|
|
4529
4533
|
as: "h3",
|
|
4530
4534
|
className: "mm:flex-1 mm:text-lg mm:font-bold mm:m-0 mm:font-normal mm:font-serif mm:my-1",
|
|
4531
|
-
children: (
|
|
4535
|
+
children: (x = p.dataReports.at(0)) == null ? void 0 : x.title
|
|
4532
4536
|
}
|
|
4533
4537
|
),
|
|
4534
4538
|
/* @__PURE__ */ n(
|
|
@@ -4578,21 +4582,21 @@ const Ds = (e) => Mt({
|
|
|
4578
4582
|
),
|
|
4579
4583
|
children: /* @__PURE__ */ g(F, { className: "mm:space-y-0.5", children: [
|
|
4580
4584
|
/* @__PURE__ */ g(pe, { className: "mm:md:items-center mm:flex-col mm:sm:flex-row mm:gap-2", children: [
|
|
4581
|
-
/* @__PURE__ */ n(
|
|
4585
|
+
/* @__PURE__ */ n(Ae, { children: "YOUR ANSWER" }),
|
|
4582
4586
|
/* @__PURE__ */ n(
|
|
4583
|
-
|
|
4587
|
+
cr,
|
|
4584
4588
|
{
|
|
4585
|
-
explainability:
|
|
4589
|
+
explainability: w,
|
|
4586
4590
|
isFullWidth: l
|
|
4587
4591
|
}
|
|
4588
4592
|
)
|
|
4589
4593
|
] }),
|
|
4590
|
-
/* @__PURE__ */ n(
|
|
4594
|
+
/* @__PURE__ */ n(co, { children: t.public.answer }),
|
|
4591
4595
|
/* @__PURE__ */ n(
|
|
4592
4596
|
U,
|
|
4593
4597
|
{
|
|
4594
4598
|
variant: "outline",
|
|
4595
|
-
onClick:
|
|
4599
|
+
onClick: c,
|
|
4596
4600
|
className: "mm:self-start",
|
|
4597
4601
|
size: "sm",
|
|
4598
4602
|
children: l ? "Hide data report" : "Show data report"
|
|
@@ -4601,11 +4605,11 @@ const Ds = (e) => Mt({
|
|
|
4601
4605
|
] })
|
|
4602
4606
|
}
|
|
4603
4607
|
) }) }),
|
|
4604
|
-
/* @__PURE__ */ n(
|
|
4608
|
+
/* @__PURE__ */ n(Ht.Root, { open: l, children: /* @__PURE__ */ n(Ht.Content, { children: y }) })
|
|
4605
4609
|
]
|
|
4606
4610
|
}
|
|
4607
|
-
) :
|
|
4608
|
-
},
|
|
4611
|
+
) : y;
|
|
4612
|
+
}, cr = ({ explainability: e, isFullWidth: t }) => /* @__PURE__ */ g(
|
|
4609
4613
|
M,
|
|
4610
4614
|
{
|
|
4611
4615
|
className: k(
|
|
@@ -4637,7 +4641,7 @@ const Ds = (e) => Mt({
|
|
|
4637
4641
|
)
|
|
4638
4642
|
] }),
|
|
4639
4643
|
/* @__PURE__ */ n(
|
|
4640
|
-
|
|
4644
|
+
Lt,
|
|
4641
4645
|
{
|
|
4642
4646
|
label: (e == null ? void 0 : e.confidence_score_reason) ?? "Work in progress...",
|
|
4643
4647
|
className: "mm:w-[400px]",
|
|
@@ -4650,8 +4654,8 @@ const Ds = (e) => Mt({
|
|
|
4650
4654
|
t ? "mm:max-w-full" : "mm:max-w-0"
|
|
4651
4655
|
),
|
|
4652
4656
|
children: [
|
|
4653
|
-
/* @__PURE__ */ n(
|
|
4654
|
-
/* @__PURE__ */ n(
|
|
4657
|
+
/* @__PURE__ */ n(Ir, { color: "var(--mm-color-card)", size: 14 }),
|
|
4658
|
+
/* @__PURE__ */ n(C, { className: "mm:text-sm mm:text-card", children: "Reasoning" })
|
|
4655
4659
|
]
|
|
4656
4660
|
}
|
|
4657
4661
|
)
|
|
@@ -4659,7 +4663,7 @@ const Ds = (e) => Mt({
|
|
|
4659
4663
|
)
|
|
4660
4664
|
]
|
|
4661
4665
|
}
|
|
4662
|
-
), yi = ne.create(F),
|
|
4666
|
+
), yi = ne.create(F), go = ({ children: e }) => /* @__PURE__ */ n(
|
|
4663
4667
|
yi,
|
|
4664
4668
|
{
|
|
4665
4669
|
initial: { opacity: 0, y: 15 },
|
|
@@ -4669,7 +4673,7 @@ const Ds = (e) => Mt({
|
|
|
4669
4673
|
className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]",
|
|
4670
4674
|
children: e
|
|
4671
4675
|
}
|
|
4672
|
-
), vi = () => /* @__PURE__ */ n(
|
|
4676
|
+
), vi = () => /* @__PURE__ */ n(go, { children: /* @__PURE__ */ n(he, { className: "mm:size-2" }) }, "loading"), wi = ({ status: e }) => /* @__PURE__ */ n(go, { children: e === "success" ? /* @__PURE__ */ n(ss, { color: "green" }) : /* @__PURE__ */ n(is, { color: "red" }) }, "done"), mr = ({ loading: e, result: t, children: r }) => /* @__PURE__ */ n(M, { className: "mm:justify-between mm:flex-nowrap mm:overflow-hidden mm:select-none", children: /* @__PURE__ */ g(M, { className: "mm:flex-1 mm:gap-1 mm:flex-nowrap mm:overflow-hidden", children: [
|
|
4673
4677
|
/* @__PURE__ */ n(De, { mode: "wait", children: e || !t ? /* @__PURE__ */ n(vi, {}) : /* @__PURE__ */ n(wi, { status: t.status }) }),
|
|
4674
4678
|
/* @__PURE__ */ n(we, { className: "mm:truncate mm:flex-1 mm:font-semibold", children: r })
|
|
4675
4679
|
] }) }), xi = Y({
|
|
@@ -4685,8 +4689,8 @@ const Ds = (e) => Mt({
|
|
|
4685
4689
|
description: "The content of the visualization",
|
|
4686
4690
|
content: {
|
|
4687
4691
|
"application/json": {
|
|
4688
|
-
schema:
|
|
4689
|
-
|
|
4692
|
+
schema: ya.or(
|
|
4693
|
+
wa
|
|
4690
4694
|
)
|
|
4691
4695
|
}
|
|
4692
4696
|
}
|
|
@@ -4766,7 +4770,7 @@ Y({
|
|
|
4766
4770
|
}
|
|
4767
4771
|
});
|
|
4768
4772
|
const _i = (e) => {
|
|
4769
|
-
const t =
|
|
4773
|
+
const t = se();
|
|
4770
4774
|
return G({
|
|
4771
4775
|
queryKey: ["visualization", { id: e }],
|
|
4772
4776
|
queryFn: async () => await ki(e),
|
|
@@ -4799,22 +4803,22 @@ const ot = ({
|
|
|
4799
4803
|
var i;
|
|
4800
4804
|
if (!e || !t || !t.length) return null;
|
|
4801
4805
|
if (((i = t[0]) == null ? void 0 : i.payload) && (t[0].payload.x !== void 0 || t[0].payload.y !== void 0) && Si(t)) {
|
|
4802
|
-
const [{ name: s, value: l }, { name:
|
|
4806
|
+
const [{ name: s, value: l }, { name: m, value: c }] = t;
|
|
4803
4807
|
return /* @__PURE__ */ g(X, { className: "mm:p-1 mm:shadow-lg", children: [
|
|
4804
|
-
/* @__PURE__ */ g(
|
|
4805
|
-
/* @__PURE__ */ n(
|
|
4808
|
+
/* @__PURE__ */ g(C, { children: [
|
|
4809
|
+
/* @__PURE__ */ n(C, { as: "span", className: "mm:font-semibold", children: `${s}: ` }),
|
|
4806
4810
|
`${ee(l).display || l}`
|
|
4807
4811
|
] }),
|
|
4808
|
-
/* @__PURE__ */ g(
|
|
4809
|
-
/* @__PURE__ */ n(
|
|
4810
|
-
`${ee(
|
|
4812
|
+
/* @__PURE__ */ g(C, { children: [
|
|
4813
|
+
/* @__PURE__ */ n(C, { as: "span", className: "mm:font-semibold", children: `${m}: ` }),
|
|
4814
|
+
`${ee(c).display || c}`
|
|
4811
4815
|
] })
|
|
4812
4816
|
] });
|
|
4813
4817
|
} else
|
|
4814
4818
|
return /* @__PURE__ */ g(X, { className: "mm:p-1 mm:shadow-lg", children: [
|
|
4815
|
-
r != null && /* @__PURE__ */ n(
|
|
4819
|
+
r != null && /* @__PURE__ */ n(C, { className: "mm:font-semibold mm:mb-xs", children: ee(r).display ?? r }),
|
|
4816
4820
|
t.map((s, l) => {
|
|
4817
|
-
const
|
|
4821
|
+
const m = `${s.dataKey || s.name || "value"}`, c = s.value;
|
|
4818
4822
|
return /* @__PURE__ */ g(M, { className: "mm:gap-2", children: [
|
|
4819
4823
|
/* @__PURE__ */ n(
|
|
4820
4824
|
X,
|
|
@@ -4827,15 +4831,15 @@ const ot = ({
|
|
|
4827
4831
|
className: "mm:rounded-sm"
|
|
4828
4832
|
}
|
|
4829
4833
|
),
|
|
4830
|
-
/* @__PURE__ */ g(
|
|
4831
|
-
/* @__PURE__ */ g(
|
|
4832
|
-
|
|
4834
|
+
/* @__PURE__ */ g(C, { children: [
|
|
4835
|
+
/* @__PURE__ */ g(C, { as: "span", className: "mm:font-semibold", children: [
|
|
4836
|
+
m,
|
|
4833
4837
|
":",
|
|
4834
4838
|
" "
|
|
4835
4839
|
] }),
|
|
4836
|
-
ee(
|
|
4840
|
+
ee(c).display ?? c
|
|
4837
4841
|
] }, l)
|
|
4838
|
-
] },
|
|
4842
|
+
] }, m);
|
|
4839
4843
|
})
|
|
4840
4844
|
] });
|
|
4841
4845
|
}, Di = (e) => e.slice(0, Math.ceil(e.length / 2)).flatMap((t, r) => [e[r], e[e.length - 1 - r]]).filter((t) => t !== void 0), Ni = [
|
|
@@ -4848,7 +4852,7 @@ const ot = ({
|
|
|
4848
4852
|
"#ff7c43",
|
|
4849
4853
|
"#ffa600"
|
|
4850
4854
|
];
|
|
4851
|
-
function*
|
|
4855
|
+
function* Pt(e = Di(Ni)) {
|
|
4852
4856
|
const t = /* @__PURE__ */ new Set();
|
|
4853
4857
|
for (; ; ) {
|
|
4854
4858
|
t.size === e.length && t.clear();
|
|
@@ -4860,10 +4864,10 @@ const ji = ({
|
|
|
4860
4864
|
visualization: e
|
|
4861
4865
|
}) => {
|
|
4862
4866
|
var i;
|
|
4863
|
-
const { data: t, configuration: r } = e, a =
|
|
4864
|
-
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(
|
|
4867
|
+
const { data: t, configuration: r } = e, a = Pt();
|
|
4868
|
+
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(Xo, { data: t, margin: { left: 20, bottom: 40, top: 30 }, children: [
|
|
4865
4869
|
/* @__PURE__ */ n(
|
|
4866
|
-
|
|
4870
|
+
zt,
|
|
4867
4871
|
{
|
|
4868
4872
|
vertical: !1,
|
|
4869
4873
|
stroke: "var(--mm-color-muted-foreground)"
|
|
@@ -4871,7 +4875,7 @@ const ji = ({
|
|
|
4871
4875
|
),
|
|
4872
4876
|
/* @__PURE__ */ n(tt, { cursor: !1, content: /* @__PURE__ */ n(ot, {}) }),
|
|
4873
4877
|
/* @__PURE__ */ n(
|
|
4874
|
-
|
|
4878
|
+
Ft,
|
|
4875
4879
|
{
|
|
4876
4880
|
name: r.xAxisLabel || r.dimensionDataKey,
|
|
4877
4881
|
dataKey: r.dimensionDataKey,
|
|
@@ -4896,7 +4900,7 @@ const ji = ({
|
|
|
4896
4900
|
}
|
|
4897
4901
|
),
|
|
4898
4902
|
/* @__PURE__ */ n(
|
|
4899
|
-
|
|
4903
|
+
Rt,
|
|
4900
4904
|
{
|
|
4901
4905
|
label: {
|
|
4902
4906
|
value: r.yAxisLabel,
|
|
@@ -4918,7 +4922,7 @@ const ji = ({
|
|
|
4918
4922
|
}
|
|
4919
4923
|
),
|
|
4920
4924
|
(i = r.valueColumns) == null ? void 0 : i.map((s) => /* @__PURE__ */ n(
|
|
4921
|
-
|
|
4925
|
+
Jo,
|
|
4922
4926
|
{
|
|
4923
4927
|
dataKey: s,
|
|
4924
4928
|
name: r.yAxisLabel || s,
|
|
@@ -4926,7 +4930,7 @@ const ji = ({
|
|
|
4926
4930
|
maxBarSize: 100,
|
|
4927
4931
|
fill: a.next().value,
|
|
4928
4932
|
children: t.length <= 20 && /* @__PURE__ */ n(
|
|
4929
|
-
|
|
4933
|
+
en,
|
|
4930
4934
|
{
|
|
4931
4935
|
position: "top",
|
|
4932
4936
|
offset: 12,
|
|
@@ -4934,8 +4938,8 @@ const ji = ({
|
|
|
4934
4938
|
fill: "var(--mm-color-muted)",
|
|
4935
4939
|
fontFamily: "monospace",
|
|
4936
4940
|
formatter: (l) => {
|
|
4937
|
-
const
|
|
4938
|
-
return isNaN(
|
|
4941
|
+
const m = parseFloat(l);
|
|
4942
|
+
return isNaN(m) ? l : Cr(m);
|
|
4939
4943
|
}
|
|
4940
4944
|
}
|
|
4941
4945
|
)
|
|
@@ -4947,8 +4951,8 @@ const ji = ({
|
|
|
4947
4951
|
visualization: e
|
|
4948
4952
|
}) => {
|
|
4949
4953
|
var i;
|
|
4950
|
-
const { data: t, configuration: r } = e, a =
|
|
4951
|
-
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(
|
|
4954
|
+
const { data: t, configuration: r } = e, a = Pt();
|
|
4955
|
+
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(tn, { data: t, margin: { left: 20, bottom: 40, top: 30 }, children: [
|
|
4952
4956
|
/* @__PURE__ */ n(
|
|
4953
4957
|
tt,
|
|
4954
4958
|
{
|
|
@@ -4960,7 +4964,7 @@ const ji = ({
|
|
|
4960
4964
|
}
|
|
4961
4965
|
),
|
|
4962
4966
|
/* @__PURE__ */ n(
|
|
4963
|
-
|
|
4967
|
+
zt,
|
|
4964
4968
|
{
|
|
4965
4969
|
vertical: !1,
|
|
4966
4970
|
stroke: "var(--mm-color-muted-foreground)"
|
|
@@ -4969,7 +4973,7 @@ const ji = ({
|
|
|
4969
4973
|
(i = r.valueColumns) == null ? void 0 : i.map((s) => {
|
|
4970
4974
|
const l = a.next().value;
|
|
4971
4975
|
return /* @__PURE__ */ n(
|
|
4972
|
-
|
|
4976
|
+
rn,
|
|
4973
4977
|
{
|
|
4974
4978
|
type: "monotone",
|
|
4975
4979
|
dataKey: s,
|
|
@@ -4983,7 +4987,7 @@ const ji = ({
|
|
|
4983
4987
|
);
|
|
4984
4988
|
}),
|
|
4985
4989
|
/* @__PURE__ */ n(
|
|
4986
|
-
|
|
4990
|
+
Ft,
|
|
4987
4991
|
{
|
|
4988
4992
|
dataKey: r.dimensionDataKey,
|
|
4989
4993
|
label: {
|
|
@@ -5007,7 +5011,7 @@ const ji = ({
|
|
|
5007
5011
|
}
|
|
5008
5012
|
),
|
|
5009
5013
|
/* @__PURE__ */ n(
|
|
5010
|
-
|
|
5014
|
+
Rt,
|
|
5011
5015
|
{
|
|
5012
5016
|
label: {
|
|
5013
5017
|
value: r.yAxisLabel,
|
|
@@ -5032,11 +5036,11 @@ const ji = ({
|
|
|
5032
5036
|
}, zi = ({
|
|
5033
5037
|
visualization: e
|
|
5034
5038
|
}) => {
|
|
5035
|
-
const { data: t, configuration: r } = e, a =
|
|
5036
|
-
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(
|
|
5039
|
+
const { data: t, configuration: r } = e, a = Pt();
|
|
5040
|
+
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(on, { children: [
|
|
5037
5041
|
/* @__PURE__ */ n(tt, { cursor: !1, content: /* @__PURE__ */ n(ot, {}) }),
|
|
5038
5042
|
/* @__PURE__ */ n(
|
|
5039
|
-
|
|
5043
|
+
nn,
|
|
5040
5044
|
{
|
|
5041
5045
|
data: t,
|
|
5042
5046
|
dataKey: r.dataKey,
|
|
@@ -5063,7 +5067,7 @@ const ji = ({
|
|
|
5063
5067
|
),
|
|
5064
5068
|
children: t.map(() => {
|
|
5065
5069
|
const i = a.next().value;
|
|
5066
|
-
return /* @__PURE__ */ n(
|
|
5070
|
+
return /* @__PURE__ */ n(an, { fill: i });
|
|
5067
5071
|
})
|
|
5068
5072
|
}
|
|
5069
5073
|
)
|
|
@@ -5073,8 +5077,8 @@ const ji = ({
|
|
|
5073
5077
|
}) => {
|
|
5074
5078
|
var a, i;
|
|
5075
5079
|
const { data: t, configuration: r } = e;
|
|
5076
|
-
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(
|
|
5077
|
-
/* @__PURE__ */ n(
|
|
5080
|
+
return /* @__PURE__ */ n(et, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ g(sn, { data: t, margin: { left: 20, bottom: 30 }, children: [
|
|
5081
|
+
/* @__PURE__ */ n(zt, { stroke: "var(--mm-color-muted-foreground)" }),
|
|
5078
5082
|
/* @__PURE__ */ n(
|
|
5079
5083
|
tt,
|
|
5080
5084
|
{
|
|
@@ -5086,7 +5090,7 @@ const ji = ({
|
|
|
5086
5090
|
}
|
|
5087
5091
|
),
|
|
5088
5092
|
/* @__PURE__ */ n(
|
|
5089
|
-
|
|
5093
|
+
Ft,
|
|
5090
5094
|
{
|
|
5091
5095
|
dataKey: r.dimensionDataKey,
|
|
5092
5096
|
name: r.xAxisLabel || r.dimensionDataKey,
|
|
@@ -5111,7 +5115,7 @@ const ji = ({
|
|
|
5111
5115
|
}
|
|
5112
5116
|
),
|
|
5113
5117
|
/* @__PURE__ */ n(
|
|
5114
|
-
|
|
5118
|
+
Rt,
|
|
5115
5119
|
{
|
|
5116
5120
|
dataKey: (a = r.valueColumns) == null ? void 0 : a[0],
|
|
5117
5121
|
name: r.yAxisLabel || ((i = r.valueColumns) == null ? void 0 : i[0]),
|
|
@@ -5135,7 +5139,7 @@ const ji = ({
|
|
|
5135
5139
|
}
|
|
5136
5140
|
),
|
|
5137
5141
|
/* @__PURE__ */ n(
|
|
5138
|
-
|
|
5142
|
+
ln,
|
|
5139
5143
|
{
|
|
5140
5144
|
data: t,
|
|
5141
5145
|
stroke: "white",
|
|
@@ -5144,7 +5148,7 @@ const ji = ({
|
|
|
5144
5148
|
}
|
|
5145
5149
|
)
|
|
5146
5150
|
] }) });
|
|
5147
|
-
},
|
|
5151
|
+
}, Ri = ({
|
|
5148
5152
|
visualization: e
|
|
5149
5153
|
}) => {
|
|
5150
5154
|
switch (e.configuration.type) {
|
|
@@ -5159,26 +5163,26 @@ const ji = ({
|
|
|
5159
5163
|
default:
|
|
5160
5164
|
return null;
|
|
5161
5165
|
}
|
|
5162
|
-
},
|
|
5166
|
+
}, Ii = ({
|
|
5163
5167
|
visualizationId: e
|
|
5164
5168
|
}) => {
|
|
5165
5169
|
var i;
|
|
5166
5170
|
const t = te(null), { data: r } = _i(e), a = ye(async () => {
|
|
5167
5171
|
if (t.current)
|
|
5168
5172
|
try {
|
|
5169
|
-
const s = await
|
|
5173
|
+
const s = await Qo(t.current, {
|
|
5170
5174
|
backgroundColor: null,
|
|
5171
5175
|
scale: 2,
|
|
5172
5176
|
useCORS: !0,
|
|
5173
|
-
ignoreElements: (
|
|
5177
|
+
ignoreElements: (m) => m.classList.contains("screenshot-ignore"),
|
|
5174
5178
|
// Add padding through these settings
|
|
5175
5179
|
x: -20,
|
|
5176
5180
|
y: -20,
|
|
5177
5181
|
width: t.current.offsetWidth + 40,
|
|
5178
5182
|
height: t.current.offsetHeight + 40
|
|
5179
|
-
}), l = await new Promise((
|
|
5183
|
+
}), l = await new Promise((m, c) => {
|
|
5180
5184
|
s.toBlob((u) => {
|
|
5181
|
-
u ?
|
|
5185
|
+
u ? m(u) : c(new Error("Failed to create blob from canvas"));
|
|
5182
5186
|
}, "image/png");
|
|
5183
5187
|
});
|
|
5184
5188
|
await navigator.clipboard.write([
|
|
@@ -5193,18 +5197,18 @@ const ji = ({
|
|
|
5193
5197
|
return r ? /* @__PURE__ */ g(F, { ref: t, className: "mm:flex-1", children: [
|
|
5194
5198
|
/* @__PURE__ */ g(M, { className: "mm:justify-between", children: [
|
|
5195
5199
|
/* @__PURE__ */ g(
|
|
5196
|
-
|
|
5200
|
+
C,
|
|
5197
5201
|
{
|
|
5198
5202
|
as: "h3",
|
|
5199
5203
|
className: "mm:flex-1 mm:text-lg mm:font-bold mm:m-0 mm:font-normal mm:font-serif mm:my-1",
|
|
5200
5204
|
children: [
|
|
5201
5205
|
r.configuration.title,
|
|
5202
5206
|
" ",
|
|
5203
|
-
((i = r._metadata) == null ? void 0 : i.wasSampled) && /* @__PURE__ */ n(
|
|
5207
|
+
((i = r._metadata) == null ? void 0 : i.wasSampled) && /* @__PURE__ */ n(C, { as: "span", className: "mm:text-card", children: "(sample of full data)" })
|
|
5204
5208
|
]
|
|
5205
5209
|
}
|
|
5206
5210
|
),
|
|
5207
|
-
/* @__PURE__ */ n(
|
|
5211
|
+
/* @__PURE__ */ n(Lt, { label: "Copy chart to clipboard", children: /* @__PURE__ */ n(
|
|
5208
5212
|
U,
|
|
5209
5213
|
{
|
|
5210
5214
|
className: "screenshot-ignore",
|
|
@@ -5214,9 +5218,9 @@ const ji = ({
|
|
|
5214
5218
|
}
|
|
5215
5219
|
) })
|
|
5216
5220
|
] }),
|
|
5217
|
-
/* @__PURE__ */ n(
|
|
5221
|
+
/* @__PURE__ */ n(Ri, { visualization: r })
|
|
5218
5222
|
] }) : /* @__PURE__ */ n("div", { className: "mm:w-full mm:flex mm:items-center mm:justify-center", children: /* @__PURE__ */ n(he, {}) });
|
|
5219
|
-
},
|
|
5223
|
+
}, Ai = ({
|
|
5220
5224
|
flowDataVisualizationId: e
|
|
5221
5225
|
}) => {
|
|
5222
5226
|
const t = te(null), { fullWidthRef: r, setFullWidthRef: a } = Le(), i = !!r && t.current === r, s = () => {
|
|
@@ -5237,8 +5241,8 @@ const ji = ({
|
|
|
5237
5241
|
className: "mm:gap-1",
|
|
5238
5242
|
children: [
|
|
5239
5243
|
/* @__PURE__ */ g(M, { className: "mm:justify-between mm:flex-nowrap mm:items-center", children: [
|
|
5240
|
-
/* @__PURE__ */ n(
|
|
5241
|
-
/* @__PURE__ */ n(U, { variant: "icon", onClick: s, children: i ? /* @__PURE__ */ n(
|
|
5244
|
+
/* @__PURE__ */ n(Ae, { children: "YOUR VISUALIZATION" }),
|
|
5245
|
+
/* @__PURE__ */ n(U, { variant: "icon", onClick: s, children: i ? /* @__PURE__ */ n(Fr, { size: 16 }) : /* @__PURE__ */ n(Rr, { size: 16 }) })
|
|
5242
5246
|
] }),
|
|
5243
5247
|
/* @__PURE__ */ n("div", { style: { height: i ? 400 : 225 }, children: /* @__PURE__ */ n(
|
|
5244
5248
|
"div",
|
|
@@ -5249,7 +5253,7 @@ const ji = ({
|
|
|
5249
5253
|
display: "flex",
|
|
5250
5254
|
transition: "height 0.25s ease-in-out"
|
|
5251
5255
|
},
|
|
5252
|
-
children: /* @__PURE__ */ n(
|
|
5256
|
+
children: /* @__PURE__ */ n(Ii, { visualizationId: e })
|
|
5253
5257
|
}
|
|
5254
5258
|
) })
|
|
5255
5259
|
]
|
|
@@ -5258,16 +5262,16 @@ const ji = ({
|
|
|
5258
5262
|
}
|
|
5259
5263
|
);
|
|
5260
5264
|
}, Ti = () => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(M, { className: "mm:justify-between mm:flex-nowrap mm:overflow-hidden mm:select-none", children: /* @__PURE__ */ g(M, { className: "mm:flex-1 mm:gap-1 mm:flex-nowrap mm:overflow-hidden", children: [
|
|
5261
|
-
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(
|
|
5265
|
+
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(Lr, { className: "mm:text-red-500" }) }),
|
|
5262
5266
|
/* @__PURE__ */ n(we, { className: "mm:truncate mm:flex-1 mm:font-semibold", children: "Visualization creation failed" })
|
|
5263
5267
|
] }) }) }), Ei = () => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(M, { className: "mm:justify-between mm:flex-nowrap mm:overflow-hidden mm:select-none", children: /* @__PURE__ */ g(M, { className: "mm:flex-1 mm:gap-1 mm:flex-nowrap mm:overflow-hidden", children: [
|
|
5264
5268
|
/* @__PURE__ */ n(F, { className: "mm:items-center mm:justify-center mm:flex-[0_0_30px]", children: /* @__PURE__ */ n(he, { className: "mm:size-3 mm:border-1" }) }),
|
|
5265
5269
|
/* @__PURE__ */ n(we, { className: "mm:truncate mm:flex-1 mm:font-semibold", children: "Visualization in creation" })
|
|
5266
|
-
] }) }) }),
|
|
5270
|
+
] }) }) }), dr = ({
|
|
5267
5271
|
loading: e,
|
|
5268
5272
|
result: t
|
|
5269
5273
|
}) => e || !t ? /* @__PURE__ */ n(Ei, {}) : t.status === "error" ? /* @__PURE__ */ n(Ti, {}) : /* @__PURE__ */ n(
|
|
5270
|
-
|
|
5274
|
+
Ai,
|
|
5271
5275
|
{
|
|
5272
5276
|
flowDataVisualizationId: t.public.flowDataVisualizationId
|
|
5273
5277
|
}
|
|
@@ -5309,30 +5313,30 @@ const ji = ({
|
|
|
5309
5313
|
case "getAvailableTables":
|
|
5310
5314
|
case "getAvailableColumnsForTable":
|
|
5311
5315
|
case "valueBasedColumnSearch": {
|
|
5312
|
-
const
|
|
5313
|
-
return a ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(
|
|
5314
|
-
|
|
5316
|
+
const m = Yi[t.toolName], c = Li(r) % m.length;
|
|
5317
|
+
return a ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(mr, { loading: !0, result: void 0, children: m[c] }, r) }) : /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(
|
|
5318
|
+
mr,
|
|
5315
5319
|
{
|
|
5316
5320
|
loading: !1,
|
|
5317
|
-
result: (i =
|
|
5318
|
-
children: c
|
|
5321
|
+
result: (i = ao.safeParse(t.result).data) == null ? void 0 : i.result,
|
|
5322
|
+
children: m[c]
|
|
5319
5323
|
},
|
|
5320
5324
|
r
|
|
5321
5325
|
) });
|
|
5322
5326
|
}
|
|
5323
5327
|
case "generateDataReport":
|
|
5324
5328
|
return a ? /* @__PURE__ */ n(
|
|
5325
|
-
|
|
5329
|
+
lr,
|
|
5326
5330
|
{
|
|
5327
5331
|
loading: !0,
|
|
5328
5332
|
result: void 0
|
|
5329
5333
|
},
|
|
5330
5334
|
r
|
|
5331
5335
|
) : /* @__PURE__ */ n(
|
|
5332
|
-
|
|
5336
|
+
lr,
|
|
5333
5337
|
{
|
|
5334
5338
|
loading: !1,
|
|
5335
|
-
result: (s =
|
|
5339
|
+
result: (s = Ur.safeParse(
|
|
5336
5340
|
t.result
|
|
5337
5341
|
).data) == null ? void 0 : s.result
|
|
5338
5342
|
},
|
|
@@ -5340,17 +5344,17 @@ const ji = ({
|
|
|
5340
5344
|
);
|
|
5341
5345
|
case "generateVisualization":
|
|
5342
5346
|
return a ? /* @__PURE__ */ n(
|
|
5343
|
-
|
|
5347
|
+
dr,
|
|
5344
5348
|
{
|
|
5345
5349
|
loading: !0,
|
|
5346
5350
|
result: void 0
|
|
5347
5351
|
},
|
|
5348
5352
|
r
|
|
5349
5353
|
) : /* @__PURE__ */ n(
|
|
5350
|
-
|
|
5354
|
+
dr,
|
|
5351
5355
|
{
|
|
5352
5356
|
loading: !1,
|
|
5353
|
-
result: (l =
|
|
5357
|
+
result: (l = Kr.safeParse(
|
|
5354
5358
|
t.result
|
|
5355
5359
|
).data) == null ? void 0 : l.result
|
|
5356
5360
|
},
|
|
@@ -5366,12 +5370,12 @@ const ji = ({
|
|
|
5366
5370
|
part: r
|
|
5367
5371
|
},
|
|
5368
5372
|
`${r.type}-${a}`
|
|
5369
|
-
) : r.type === "text" && r.text.trim() !== "" ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(
|
|
5373
|
+
) : r.type === "text" && r.text.trim() !== "" ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(uo, { content: r.text, role: "assistant" }) }, `${e.id}-${a}`) : null), [e]);
|
|
5370
5374
|
return /* @__PURE__ */ n(ke, { children: t });
|
|
5371
5375
|
}), Oi = ({ children: e }) => /* @__PURE__ */ n(K, { isFullWidth: !1, children: /* @__PURE__ */ n(X, { className: "mm:border-[#576971] mm-white-gradient", children: /* @__PURE__ */ g(F, { className: "mm:gap-0", children: [
|
|
5372
|
-
/* @__PURE__ */ n(
|
|
5376
|
+
/* @__PURE__ */ n(Ae, { className: "mm:mb-4", children: "YOUR REQUEST" }),
|
|
5373
5377
|
e
|
|
5374
|
-
] }) }) }), Hi = me(({ content: e }) => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(
|
|
5378
|
+
] }) }) }), Hi = me(({ content: e }) => /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(uo, { content: e, role: "user" }) })), Vi = (e) => {
|
|
5375
5379
|
const { data: t, isFetched: r } = js(e, {
|
|
5376
5380
|
queryKey: ["flowSteps", { flowId: e }],
|
|
5377
5381
|
select: (s) => s ? {
|
|
@@ -5383,7 +5387,7 @@ const ji = ({
|
|
|
5383
5387
|
), i = ce(() => {
|
|
5384
5388
|
if (!a)
|
|
5385
5389
|
return [{ text: "Analyzing your request", needUserConfirmation: !1 }];
|
|
5386
|
-
const { data: s } =
|
|
5390
|
+
const { data: s } = Gn.safeParse(a.output), l = (s == null ? void 0 : s.user_friendly_goal) || (s == null ? void 0 : s.goal);
|
|
5387
5391
|
return l ? [
|
|
5388
5392
|
{ text: "Analyzing your request", needUserConfirmation: !1 },
|
|
5389
5393
|
{ text: l, needUserConfirmation: !0 },
|
|
@@ -5397,19 +5401,19 @@ const ji = ({
|
|
|
5397
5401
|
};
|
|
5398
5402
|
}, qi = Q.memo(({ message: e }) => e.role === "user" ? /* @__PURE__ */ n(Hi, { content: e.content }) : /* @__PURE__ */ n($i, { message: e })), Ui = () => /* @__PURE__ */ g(F, { className: "mm:text-center mm:gap-2 mm:my-4 mm:items-center", children: [
|
|
5399
5403
|
/* @__PURE__ */ n(he, {}),
|
|
5400
|
-
/* @__PURE__ */ n(
|
|
5404
|
+
/* @__PURE__ */ n(C, { as: "h2", className: "mm:font-medium mm:text-sm mm:text-card", children: "Loading chat history..." })
|
|
5401
5405
|
] }), Zi = () => {
|
|
5402
5406
|
const { data: e } = Ys(), t = ce(
|
|
5403
5407
|
() => e && Ce(e).startOf("hour").format("DD MMM. YYYY, [at] ha"),
|
|
5404
5408
|
[e]
|
|
5405
5409
|
);
|
|
5406
|
-
return e ? /* @__PURE__ */ g(
|
|
5410
|
+
return e ? /* @__PURE__ */ g(C, { as: "h2", className: "mm:font-normal mm:text-sm mm:text-muted", children: [
|
|
5407
5411
|
"Latest data refresh:",
|
|
5408
5412
|
" ",
|
|
5409
|
-
/* @__PURE__ */ n(
|
|
5413
|
+
/* @__PURE__ */ n(C, { ff: "mono", as: "span", className: "mm:tracking-tighter", children: t })
|
|
5410
5414
|
] }) : /* @__PURE__ */ n("div", { className: "mm:h-4 mm:w-32 mm:animate-pulse mm:bg-muted mm:rounded-lg" });
|
|
5411
5415
|
}, Wi = Q.memo(({ flowId: e }) => {
|
|
5412
|
-
const { fullWidthRef: t, setFullWidthRef: r, messagesRef: a } = Le(), { messages: i } =
|
|
5416
|
+
const { fullWidthRef: t, setFullWidthRef: r, messagesRef: a } = Le(), { messages: i } = io(e), { userRequest: s, waitingMessages: l, isFetched: m } = Vi(e), [c, u] = A(0), p = ye(() => {
|
|
5413
5417
|
a.current && a.current.scrollTo({
|
|
5414
5418
|
top: a.current.scrollHeight,
|
|
5415
5419
|
behavior: "smooth"
|
|
@@ -5420,7 +5424,7 @@ const ji = ({
|
|
|
5420
5424
|
}, [i, p]), H(() => {
|
|
5421
5425
|
let h = null;
|
|
5422
5426
|
return t && a.current && (t.scrollIntoView({ block: "start", behavior: "smooth" }), h = new IntersectionObserver(
|
|
5423
|
-
([
|
|
5427
|
+
([y]) => y != null && y.isIntersecting ? void 0 : r(null),
|
|
5424
5428
|
{
|
|
5425
5429
|
root: a.current,
|
|
5426
5430
|
threshold: 0.5
|
|
@@ -5429,23 +5433,23 @@ const ji = ({
|
|
|
5429
5433
|
h == null || h.disconnect();
|
|
5430
5434
|
};
|
|
5431
5435
|
}, [a, t, r]);
|
|
5432
|
-
const
|
|
5433
|
-
return
|
|
5436
|
+
const w = c < l.length ? l[c] : l.at(-1);
|
|
5437
|
+
return m ? /* @__PURE__ */ g(
|
|
5434
5438
|
F,
|
|
5435
5439
|
{
|
|
5436
5440
|
className: "mm:h-full mm:flex-1 mm:justify-between mm:overflow-y-scroll",
|
|
5437
5441
|
ref: a,
|
|
5438
5442
|
children: [
|
|
5439
5443
|
/* @__PURE__ */ g(F, { className: "mm:pt-2 mm:gap-3", children: [
|
|
5440
|
-
/* @__PURE__ */ n(Oi, { children: /* @__PURE__ */ n(
|
|
5441
|
-
i.length === 0 ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(
|
|
5444
|
+
/* @__PURE__ */ n(Oi, { children: /* @__PURE__ */ n(C, { ff: "serif", className: "mm:text-[15px]/6", children: s }) }),
|
|
5445
|
+
i.length === 0 ? /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(mo, { role: "assistant", children: /* @__PURE__ */ n(De, { mode: "wait", children: w && /* @__PURE__ */ n(
|
|
5442
5446
|
Ts,
|
|
5443
5447
|
{
|
|
5444
|
-
text:
|
|
5445
|
-
needUserConfirmation:
|
|
5448
|
+
text: w.text,
|
|
5449
|
+
needUserConfirmation: w.needUserConfirmation,
|
|
5446
5450
|
onAnimationComplete: () => u((h) => h + 1)
|
|
5447
5451
|
}
|
|
5448
|
-
) }) }) },
|
|
5452
|
+
) }) }) }, w == null ? void 0 : w.text) : i.map((h) => /* @__PURE__ */ n(qi, { message: h }, h.id))
|
|
5449
5453
|
] }),
|
|
5450
5454
|
/* @__PURE__ */ g(vs, { className: "mm:sticky mm:bottom-0 mm:z-2", children: [
|
|
5451
5455
|
/* @__PURE__ */ n(Ls, { flowId: e }),
|
|
@@ -5511,7 +5515,7 @@ const ji = ({
|
|
|
5511
5515
|
}
|
|
5512
5516
|
}
|
|
5513
5517
|
}), Gi = (e) => {
|
|
5514
|
-
const t =
|
|
5518
|
+
const t = se(), { messages: r } = io(e);
|
|
5515
5519
|
return G({
|
|
5516
5520
|
queryKey: ["chat-timeline", { flowId: e }],
|
|
5517
5521
|
queryFn: async () => {
|
|
@@ -5526,13 +5530,13 @@ const ji = ({
|
|
|
5526
5530
|
return ((i = a.data) == null ? void 0 : i.length) === 0 ? 1e3 : !1;
|
|
5527
5531
|
}
|
|
5528
5532
|
});
|
|
5529
|
-
}, Qi = ne.create(F),
|
|
5533
|
+
}, Qi = ne.create(F), ur = (e) => e ? "14px" : "8px", Xi = (e) => e.replace(/[^a-zA-Z0-9.,_ ]/g, ""), Ji = me(
|
|
5530
5534
|
({ isLargeBullet: e = !1 }) => /* @__PURE__ */ n(
|
|
5531
5535
|
"div",
|
|
5532
5536
|
{
|
|
5533
5537
|
style: {
|
|
5534
|
-
width:
|
|
5535
|
-
height:
|
|
5538
|
+
width: ur(e),
|
|
5539
|
+
height: ur(e),
|
|
5536
5540
|
borderRadius: "100%",
|
|
5537
5541
|
border: "2px solid",
|
|
5538
5542
|
position: "absolute",
|
|
@@ -5542,7 +5546,7 @@ const ji = ({
|
|
|
5542
5546
|
}
|
|
5543
5547
|
)
|
|
5544
5548
|
), wt = me(({ children: e }) => /* @__PURE__ */ n(
|
|
5545
|
-
|
|
5549
|
+
C,
|
|
5546
5550
|
{
|
|
5547
5551
|
style: {
|
|
5548
5552
|
marginBottom: "calc(var(--mm-spacing) / 2)",
|
|
@@ -5553,7 +5557,7 @@ const ji = ({
|
|
|
5553
5557
|
children: e
|
|
5554
5558
|
}
|
|
5555
5559
|
)), xt = me(({ children: e }) => /* @__PURE__ */ n(
|
|
5556
|
-
|
|
5560
|
+
C,
|
|
5557
5561
|
{
|
|
5558
5562
|
className: "mm:text-sm mm:line-clamp-2 mm:text-card mm:font-normal",
|
|
5559
5563
|
as: "span",
|
|
@@ -5585,10 +5589,10 @@ const ji = ({
|
|
|
5585
5589
|
]
|
|
5586
5590
|
}
|
|
5587
5591
|
), el = ({ forceExpanded: e, timelineItems: t }) => {
|
|
5588
|
-
const [r, a] =
|
|
5589
|
-
var
|
|
5590
|
-
const u = s.getRootNode(), p = u == null ? void 0 : u.getElementById(
|
|
5591
|
-
p && ((
|
|
5592
|
+
const [r, a] = A(!1), i = e ? !0 : r, s = Yt(), { messagesRef: l } = Le(), m = (c) => {
|
|
5593
|
+
var w;
|
|
5594
|
+
const u = s.getRootNode(), p = u == null ? void 0 : u.getElementById(c);
|
|
5595
|
+
p && ((w = l.current) == null || w.scrollTo({
|
|
5592
5596
|
behavior: "smooth",
|
|
5593
5597
|
top: p.offsetTop - 5
|
|
5594
5598
|
}));
|
|
@@ -5599,8 +5603,8 @@ const ji = ({
|
|
|
5599
5603
|
onMouseEnter: () => a(!0),
|
|
5600
5604
|
onMouseLeave: () => a(!1),
|
|
5601
5605
|
className: "mm:w-full",
|
|
5602
|
-
children: t.map((
|
|
5603
|
-
|
|
5606
|
+
children: t.map((c, u) => c.type === "message" ? null : c.type === "dataReport" ? /* @__PURE__ */ g(zo, { children: [
|
|
5607
|
+
c.answer && /* @__PURE__ */ n(
|
|
5604
5608
|
_t,
|
|
5605
5609
|
{
|
|
5606
5610
|
isLargeBullet: !0,
|
|
@@ -5608,15 +5612,15 @@ const ji = ({
|
|
|
5608
5612
|
children: /* @__PURE__ */ g(
|
|
5609
5613
|
"a",
|
|
5610
5614
|
{
|
|
5611
|
-
onClick: () =>
|
|
5615
|
+
onClick: () => m(`data-report-${c.flowDataId}`),
|
|
5612
5616
|
children: [
|
|
5613
5617
|
/* @__PURE__ */ n(wt, { children: "ANSWER" }),
|
|
5614
|
-
/* @__PURE__ */ n(xt, { children:
|
|
5618
|
+
/* @__PURE__ */ n(xt, { children: c.answer })
|
|
5615
5619
|
]
|
|
5616
5620
|
}
|
|
5617
5621
|
)
|
|
5618
5622
|
},
|
|
5619
|
-
`timelineitem-${
|
|
5623
|
+
`timelineitem-${c.type}-answer-${u}`
|
|
5620
5624
|
),
|
|
5621
5625
|
/* @__PURE__ */ n(
|
|
5622
5626
|
_t,
|
|
@@ -5626,17 +5630,17 @@ const ji = ({
|
|
|
5626
5630
|
children: /* @__PURE__ */ g(
|
|
5627
5631
|
"a",
|
|
5628
5632
|
{
|
|
5629
|
-
onClick: () =>
|
|
5633
|
+
onClick: () => m(`data-report-${c.flowDataId}`),
|
|
5630
5634
|
children: [
|
|
5631
5635
|
/* @__PURE__ */ n(wt, { children: "DATA REPORT" }),
|
|
5632
|
-
/* @__PURE__ */ n(xt, { children:
|
|
5636
|
+
/* @__PURE__ */ n(xt, { children: c.title })
|
|
5633
5637
|
]
|
|
5634
5638
|
}
|
|
5635
5639
|
)
|
|
5636
5640
|
},
|
|
5637
|
-
`timelineitem-${
|
|
5641
|
+
`timelineitem-${c.type}-${u}`
|
|
5638
5642
|
)
|
|
5639
|
-
] }, `timelineitem-${
|
|
5643
|
+
] }, `timelineitem-${c.type}-group-${u}`) : /* @__PURE__ */ n(
|
|
5640
5644
|
_t,
|
|
5641
5645
|
{
|
|
5642
5646
|
isLargeBullet: !0,
|
|
@@ -5644,19 +5648,19 @@ const ji = ({
|
|
|
5644
5648
|
children: /* @__PURE__ */ g(
|
|
5645
5649
|
"a",
|
|
5646
5650
|
{
|
|
5647
|
-
onClick: () =>
|
|
5651
|
+
onClick: () => m(`visualization-${c.flowDataVisualizationId}`),
|
|
5648
5652
|
children: [
|
|
5649
5653
|
/* @__PURE__ */ n(wt, { children: "CHART" }),
|
|
5650
|
-
/* @__PURE__ */ n(xt, { children:
|
|
5654
|
+
/* @__PURE__ */ n(xt, { children: c.title })
|
|
5651
5655
|
]
|
|
5652
5656
|
}
|
|
5653
5657
|
)
|
|
5654
5658
|
},
|
|
5655
|
-
`timelineitem-${
|
|
5659
|
+
`timelineitem-${c.type}-${u}`
|
|
5656
5660
|
))
|
|
5657
5661
|
}
|
|
5658
5662
|
);
|
|
5659
|
-
},
|
|
5663
|
+
}, bo = ({
|
|
5660
5664
|
flowId: e,
|
|
5661
5665
|
forceExpanded: t,
|
|
5662
5666
|
onWheel: r
|
|
@@ -5664,8 +5668,8 @@ const ji = ({
|
|
|
5664
5668
|
const { data: a } = Gi(e);
|
|
5665
5669
|
if (a)
|
|
5666
5670
|
return /* @__PURE__ */ n(F, { onWheel: r, className: "mm:items-start mm:gap-4", children: /* @__PURE__ */ n(el, { forceExpanded: t, timelineItems: a }) });
|
|
5667
|
-
},
|
|
5668
|
-
const e = Ne(
|
|
5671
|
+
}, yo = () => {
|
|
5672
|
+
const e = Ne(Or);
|
|
5669
5673
|
return /* @__PURE__ */ n(
|
|
5670
5674
|
U,
|
|
5671
5675
|
{
|
|
@@ -5673,13 +5677,13 @@ const ji = ({
|
|
|
5673
5677
|
onClick: () => {
|
|
5674
5678
|
e(!1);
|
|
5675
5679
|
},
|
|
5676
|
-
children: /* @__PURE__ */ n(
|
|
5680
|
+
children: /* @__PURE__ */ n(Tr, { size: 20 })
|
|
5677
5681
|
}
|
|
5678
5682
|
);
|
|
5679
5683
|
}, tl = ({ flowId: e }) => /* @__PURE__ */ n("div", { className: "mm:sticky mm:top-0 mm:w-full mm:bg-background mm:z-5", children: /* @__PURE__ */ g(M, { className: "mm:py-1 mm:px-2.5 mm:items-center mm:justify-between mm:border-b mm:border-muted/50 mm:xl:hidden", children: [
|
|
5680
|
-
/* @__PURE__ */ n(
|
|
5684
|
+
/* @__PURE__ */ n(yo, {}),
|
|
5681
5685
|
/* @__PURE__ */ n(
|
|
5682
|
-
|
|
5686
|
+
C,
|
|
5683
5687
|
{
|
|
5684
5688
|
as: "h2",
|
|
5685
5689
|
className: "mm:text-base mm:font-semibold mm:m-0 mm:text-center",
|
|
@@ -5688,13 +5692,13 @@ const ji = ({
|
|
|
5688
5692
|
),
|
|
5689
5693
|
/* @__PURE__ */ n(rl, { flowId: e })
|
|
5690
5694
|
] }) }), rl = ({ flowId: e }) => /* @__PURE__ */ g(xe.Root, { direction: "right", children: [
|
|
5691
|
-
/* @__PURE__ */ n(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "icon", children: /* @__PURE__ */ n(
|
|
5695
|
+
/* @__PURE__ */ n(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "icon", children: /* @__PURE__ */ n(as, { size: 20 }) }) }),
|
|
5692
5696
|
/* @__PURE__ */ g(Se, { children: [
|
|
5693
5697
|
/* @__PURE__ */ n(xe.Title, { children: "Explore your data" }),
|
|
5694
5698
|
/* @__PURE__ */ n(xe.Description, { children: "Explore your data" })
|
|
5695
5699
|
] }),
|
|
5696
5700
|
/* @__PURE__ */ n(xe.Overlay, { className: "mm:fixed mm:top-0 mm:left-0 mm:right-0 mm:bottom-0 mm:bg-black/60" }),
|
|
5697
|
-
/* @__PURE__ */ n(xe.Content, { className: "mm:fixed mm:top-0 mm:right-0 mm:h-full mm:bg-gray-100 mm:outline-none mm:pt-5 mm:w-[80%] mm:px-4", children: /* @__PURE__ */ n(
|
|
5701
|
+
/* @__PURE__ */ n(xe.Content, { className: "mm:fixed mm:top-0 mm:right-0 mm:h-full mm:bg-gray-100 mm:outline-none mm:pt-5 mm:w-[80%] mm:px-4", children: /* @__PURE__ */ n(bo, { forceExpanded: !0, flowId: e }) })
|
|
5698
5702
|
] }), ol = ({ isFullWidth: e }) => /* @__PURE__ */ n(
|
|
5699
5703
|
"div",
|
|
5700
5704
|
{
|
|
@@ -5706,8 +5710,8 @@ const ji = ({
|
|
|
5706
5710
|
},
|
|
5707
5711
|
className: "mm:fixed mm:z-3 mm:top-2 mm:hidden mm:xl:block mm:w-[250px]",
|
|
5708
5712
|
children: /* @__PURE__ */ g(M, { className: "mm:items-center", children: [
|
|
5709
|
-
/* @__PURE__ */ n(
|
|
5710
|
-
/* @__PURE__ */ n(
|
|
5713
|
+
/* @__PURE__ */ n(yo, {}),
|
|
5714
|
+
/* @__PURE__ */ n(C, { as: "h2", className: "mm:flex-1 mm:text-xl mm:font-semibold mm:m-0", children: "Explore your data" })
|
|
5711
5715
|
] })
|
|
5712
5716
|
}
|
|
5713
5717
|
), nl = ({ flowId: e, onWheel: t, isFullWidth: r }) => /* @__PURE__ */ n(
|
|
@@ -5720,18 +5724,18 @@ const ji = ({
|
|
|
5720
5724
|
pointerEvents: r ? "none" : "auto"
|
|
5721
5725
|
},
|
|
5722
5726
|
className: "mm:fixed mm:top-2 mm:z-3 mm:hidden mm:xl:block mm:min-w-[250px]",
|
|
5723
|
-
children: e ? /* @__PURE__ */ n(
|
|
5727
|
+
children: e ? /* @__PURE__ */ n(bo, { forceExpanded: !0, flowId: e, onWheel: t }) : void 0
|
|
5724
5728
|
}
|
|
5725
5729
|
), al = ({
|
|
5726
5730
|
opened: e
|
|
5727
5731
|
}) => {
|
|
5728
|
-
const t =
|
|
5729
|
-
(
|
|
5730
|
-
i.current && (i.current.scrollTop +=
|
|
5732
|
+
const t = Re(ve), r = Ne(Or), { fullWidthRef: a, messagesRef: i } = Le(), s = ye(
|
|
5733
|
+
(m) => {
|
|
5734
|
+
i.current && (i.current.scrollTop += m.deltaY);
|
|
5731
5735
|
},
|
|
5732
5736
|
[i]
|
|
5733
5737
|
), l = a !== null;
|
|
5734
|
-
return /* @__PURE__ */ n(E.Root, { onOpenChange: (
|
|
5738
|
+
return /* @__PURE__ */ n(E.Root, { onOpenChange: (m) => r(m), open: e, modal: !0, children: /* @__PURE__ */ n(De, { mode: "popLayout", children: e && t && /* @__PURE__ */ n(E.Overlay, { asChild: !0, children: /* @__PURE__ */ g(
|
|
5735
5739
|
ne.div,
|
|
5736
5740
|
{
|
|
5737
5741
|
initial: {
|
|
@@ -5747,7 +5751,7 @@ const ji = ({
|
|
|
5747
5751
|
duration: 0.5,
|
|
5748
5752
|
ease: "easeInOut"
|
|
5749
5753
|
},
|
|
5750
|
-
className: "mm:w-screen mm:fixed mm:top-0 mm:left-0 mm:right-0 mm:bottom-0 mm:grid mm:place-items-center mm:overflow-y-auto mm:bg-background",
|
|
5754
|
+
className: "mm:w-screen mm:fixed mm:top-0 mm:left-0 mm:right-0 mm:bottom-0 mm:grid mm:place-items-center mm:overflow-y-auto mm:bg-background mm-conversation-modal",
|
|
5751
5755
|
children: [
|
|
5752
5756
|
/* @__PURE__ */ g(Se, { children: [
|
|
5753
5757
|
/* @__PURE__ */ n(E.Title, { children: "Explore your data" }),
|
|
@@ -5756,11 +5760,11 @@ const ji = ({
|
|
|
5756
5760
|
/* @__PURE__ */ g(
|
|
5757
5761
|
E.Content,
|
|
5758
5762
|
{
|
|
5759
|
-
onEscapeKeyDown: (
|
|
5760
|
-
|
|
5763
|
+
onEscapeKeyDown: (m) => {
|
|
5764
|
+
m.preventDefault();
|
|
5761
5765
|
},
|
|
5762
|
-
onInteractOutside: (
|
|
5763
|
-
|
|
5766
|
+
onInteractOutside: (m) => {
|
|
5767
|
+
m.preventDefault();
|
|
5764
5768
|
},
|
|
5765
5769
|
className: "mm:w-full mm:h-full mm:overflow-y-hidden mm:flex mm:flex-col",
|
|
5766
5770
|
children: [
|
|
@@ -5785,16 +5789,17 @@ const ji = ({
|
|
|
5785
5789
|
onClose: e,
|
|
5786
5790
|
startOptions: t
|
|
5787
5791
|
}) => {
|
|
5788
|
-
const r =
|
|
5792
|
+
const r = Re(ve), a = Re(Fe), s = !!r && a === "conversation", l = (t == null ? void 0 : t.showRecentChats) ?? !1, m = (t == null ? void 0 : t.showRecommendations) ?? !1, c = (t == null ? void 0 : t.showBackdrop) ?? !1, u = (t == null ? void 0 : t.label) || "Ask your data about", p = (t == null ? void 0 : t.recommendationsLabel) || "Recommendations based on your data";
|
|
5789
5793
|
return /* @__PURE__ */ g(ke, { children: [
|
|
5790
5794
|
/* @__PURE__ */ n(ys, { children: /* @__PURE__ */ n(al, { opened: s }) }),
|
|
5791
5795
|
!s && /* @__PURE__ */ n(
|
|
5792
5796
|
bs,
|
|
5793
5797
|
{
|
|
5794
5798
|
label: u,
|
|
5799
|
+
recommendationsLabel: p,
|
|
5795
5800
|
showRecentChats: l,
|
|
5796
|
-
showRecommendations:
|
|
5797
|
-
showBackdrop:
|
|
5801
|
+
showRecommendations: m,
|
|
5802
|
+
showBackdrop: c,
|
|
5798
5803
|
onClose: e
|
|
5799
5804
|
}
|
|
5800
5805
|
)
|
|
@@ -5808,11 +5813,11 @@ const ji = ({
|
|
|
5808
5813
|
modal: s = void 0,
|
|
5809
5814
|
startOptions: l = void 0
|
|
5810
5815
|
}) => {
|
|
5811
|
-
const
|
|
5816
|
+
const m = Ne(Ct);
|
|
5812
5817
|
H(() => {
|
|
5813
|
-
|
|
5814
|
-
}, [i,
|
|
5815
|
-
const
|
|
5818
|
+
m(i);
|
|
5819
|
+
}, [i, m]);
|
|
5820
|
+
const c = (s == null ? void 0 : s.visible) === !0 || s === void 0;
|
|
5816
5821
|
return /* @__PURE__ */ n(
|
|
5817
5822
|
Us,
|
|
5818
5823
|
{
|
|
@@ -5820,7 +5825,7 @@ const ji = ({
|
|
|
5820
5825
|
externalJwt: t,
|
|
5821
5826
|
apiUrl: r,
|
|
5822
5827
|
display: a,
|
|
5823
|
-
children:
|
|
5828
|
+
children: c && /* @__PURE__ */ n(sl, { onClose: s == null ? void 0 : s.onClose, startOptions: l })
|
|
5824
5829
|
}
|
|
5825
5830
|
);
|
|
5826
5831
|
}, Tl = (e) => /* @__PURE__ */ n(il, { ...e }), El = async () => {
|