@magemetrics/ai 0.0.28 → 0.0.29

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.
@@ -12259,7 +12259,7 @@ class RealtimeClient {
12259
12259
  close: () => {
12260
12260
  this.conn = null;
12261
12261
  }
12262
- }), import("./browser-yp_VhCQy.js").then((R) => R.b).then(({ default: R }) => {
12262
+ }), import("./browser-P0ubu0oY.js").then((R) => R.b).then(({ default: R }) => {
12263
12263
  this.conn = new R(this.endpointURL(), void 0, {
12264
12264
  headers: this.headers
12265
12265
  }), this.setupConnection();
@@ -33117,17 +33117,21 @@ const AnalyzeRequestSchema = z$1.object({
33117
33117
  }).array()
33118
33118
  });
33119
33119
  z$1.object({
33120
- matched_from_descriptions: z$1.number().array(),
33121
- matched_from_values: z$1.number().array()
33120
+ id: z$1.number(),
33121
+ flow_data_id: z$1.number(),
33122
+ created_at: z$1.string(),
33123
+ updated_at: z$1.string(),
33124
+ response_type: z$1.string(),
33125
+ summary: z$1.string()
33122
33126
  });
33123
33127
  z$1.object({
33124
33128
  findings: z$1.object({
33125
33129
  title: z$1.string(),
33126
33130
  value: z$1.string(),
33127
- subtitle_sentiment: z$1.enum(["positive", "negative", "neutral"]),
33128
- subtitle_value: z$1.string(),
33129
- subtitle_description: z$1.string(),
33130
- info_description: z$1.string(),
33131
+ subtitleSentiment: z$1.enum(["positive", "negative", "neutral"]),
33132
+ subtitleValue: z$1.string(),
33133
+ subtitleDescription: z$1.string(),
33134
+ infoDescription: z$1.string(),
33131
33135
  sql: z$1.string()
33132
33136
  }).array()
33133
33137
  });
@@ -33145,24 +33149,13 @@ const VisualizationConfigGenerationSchema = z$1.object({
33145
33149
  created_at: z$1.string(),
33146
33150
  configuration: VisualizationConfigGenerationSchema.shape.plot_configuration,
33147
33151
  data_transformation: VisualizationConfigGenerationSchema.shape.transformation
33148
- });
33149
- z$1.object({
33150
- title: z$1.string(),
33151
- description: z$1.string()
33152
- });
33153
- const FlowSteps = {
33152
+ }), FlowSteps = {
33154
33153
  analyzeRequest: "analyze_request",
33155
33154
  shortlistColumns: "shortlist_columns",
33156
33155
  executeProcedure: "execute_procedure",
33157
- listInsights: "list_insights",
33158
- executeInsights: "execute_insights",
33159
- summarizeKeyFindings: "summarize_insights",
33160
- // TODO: Change reference name in the agentic workflow
33161
- graphProcedure: "visualization_procedure",
33162
- confidenceScore: "confidence_score",
33163
33156
  columnsLineage: "columns_lineage",
33164
- viewGraphs: "visualization_config_generation",
33165
- dashboard: "dashboard"
33157
+ confidenceScore: "confidence_score",
33158
+ summarizeKeyFindings: "summarize_insights"
33166
33159
  };
33167
33160
  var dayjs_min$1 = { exports: {} }, dayjs_min = dayjs_min$1.exports, hasRequiredDayjs_min;
33168
33161
  function requireDayjs_min() {
@@ -56229,6 +56222,42 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56229
56222
  }
56230
56223
  }
56231
56224
  }
56225
+ }), RetrieveFlow = createRoute({
56226
+ method: "get",
56227
+ path: "/api/v1/flows/{flowId}",
56228
+ operationId: "retrieveFlow",
56229
+ request: {
56230
+ headers: SupabaseHeaderSchema,
56231
+ params: FlowIdParam
56232
+ },
56233
+ responses: {
56234
+ 200: {
56235
+ description: "The flow with its steps",
56236
+ content: {
56237
+ "application/json": {
56238
+ schema: FlowSchema
56239
+ }
56240
+ }
56241
+ },
56242
+ 404: {
56243
+ content: {
56244
+ "application/json": {
56245
+ schema: z$1.object({ error: z$1.string() })
56246
+ }
56247
+ },
56248
+ description: "Unable to retrieve flow with this id"
56249
+ },
56250
+ 500: {
56251
+ description: "Something wrong happened",
56252
+ content: {
56253
+ "application/json": {
56254
+ schema: z$1.object({
56255
+ error: z$1.string()
56256
+ })
56257
+ }
56258
+ }
56259
+ }
56260
+ }
56232
56261
  }), End2EndApiResponseSchema = z$1.discriminatedUnion("status", [
56233
56262
  z$1.object({
56234
56263
  status: z$1.literal("error"),
@@ -56250,7 +56279,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56250
56279
  "application/json": {
56251
56280
  schema: z$1.object({
56252
56281
  userQuery: z$1.string(),
56253
- runVisualizations: z$1.boolean().optional().default(!0),
56282
+ runVisualizations: z$1.boolean().optional().default(!1),
56254
56283
  runKeyFindings: z$1.boolean().optional().default(!0)
56255
56284
  })
56256
56285
  }
@@ -56281,33 +56310,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56281
56310
  U.length > 0 && (F.filter = U);
56282
56311
  }
56283
56312
  return F;
56284
- }, flowQueryOptions = (C) => ({
56285
- queryKey: ["flow", { flowId: C }],
56286
- queryFn: async () => {
56287
- if (!C || !supabase) return null;
56288
- const { data: R, error: M } = await supabase.from("flows").select("*, flow_steps(*)").eq("id", C).order("created_at", {
56289
- referencedTable: "flow_steps",
56290
- ascending: !0
56291
- }).single();
56292
- if (M)
56293
- throw new Error(M.message);
56294
- return FlowSchema.parse(R);
56295
- }
56296
- }), useFlow = (C) => useQuery({
56297
- ...flowQueryOptions(C),
56298
- enabled: !!C,
56299
- refetchIntervalInBackground: !1,
56300
- refetchInterval: (R) => {
56301
- var G;
56302
- if (!((G = R.state.data) != null && G.flow_steps.length))
56303
- return 1e3;
56304
- const D = R.state.data.flow_steps, F = Object.values(FlowSteps);
56305
- if (D.some((Z) => Z.status === "failed")) return;
56306
- const U = D.filter((Z) => Z.status === "completed").map((Z) => Z.name);
56307
- if (!F.every((Z) => U.includes(Z)))
56308
- return 1e3;
56309
- }
56310
- }), useStartFlow = (C) => useMutation({
56313
+ }, useStartFlow = (C) => useMutation({
56311
56314
  mutationFn: async (R) => {
56312
56315
  const M = await withAuthTokens(supabase), { data: D } = await client.POST(RunEnd2EndFlowRoute.path, {
56313
56316
  params: { ...M },
@@ -56427,25 +56430,7 @@ const InsightsMessage = ({ children: C, tagText: R, isActive: M, ...D }) => {
56427
56430
  getNextPageParam: (D, F) => D.length < R ? null : F.length,
56428
56431
  refetchOnWindowFocus: !1,
56429
56432
  placeholderData: keepPreviousData
56430
- }), useFirstFlowDataId = (C) => {
56431
- const R = useContextReady();
56432
- return useQuery({
56433
- queryKey: ["firstFlowDataId", { flowId: C }],
56434
- staleTime: 1 / 0,
56435
- enabled: R,
56436
- queryFn: async () => {
56437
- const M = await (supabase == null ? void 0 : supabase.from("flow_data").select("id").eq("flow_id", C).order("created_at", { ascending: !0 }).limit(1).maybeSingle());
56438
- if (!M)
56439
- throw new Error("No flow data found");
56440
- const { data: D, error: F } = M;
56441
- if (F)
56442
- throw new Error(
56443
- `Failed to fetch first flow_data_id for flow ${C}`
56444
- );
56445
- return D == null ? void 0 : D.id;
56446
- }
56447
- });
56448
- }, recentFlowsQueryOptions = (C) => ({
56433
+ }), recentFlowsQueryOptions = (C) => ({
56449
56434
  queryKey: ["recentFlows", C],
56450
56435
  queryFn: async () => {
56451
56436
  if (!supabase) return [];
@@ -94133,7 +94118,7 @@ const Dagre = /* @__PURE__ */ getDefaultExportFromCjs(dagreExports), getLayouted
94133
94118
  }) }, D.id)) }), CellContent$1 = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "heading", c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C, sortingFn = (C, R, M) => {
94134
94119
  const D = C.getValue(M), F = R.getValue(M), H = isFormattedData(D) ? D.sortValue : null, U = isFormattedData(F) ? F.sortValue : null;
94135
94120
  return H === null && U === null ? 0 : H === null ? -1 : U === null ? 1 : H instanceof Date && U instanceof Date ? H.getTime() - U.getTime() : typeof H == "number" && typeof U == "number" ? H - U : String(H).localeCompare(String(U));
94136
- }, columnHelper$1 = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), InfiniteTable = ({ dataColumns: C, virtualizer: R, data: M, tableRef: D, explainability: F }) => {
94121
+ }, columnHelper$1 = createColumnHelper(), formatColumnName$1 = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), InfiniteTable = ({ dataColumns: C, virtualizer: R, data: M, tableRef: D, explainability: F }) => {
94137
94122
  const H = reactExports.useMemo(() => M ? M.map((G) => {
94138
94123
  const Z = {};
94139
94124
  for (const [Y, Q] of Object.entries(G))
@@ -94143,7 +94128,7 @@ const Dagre = /* @__PURE__ */ getDefaultExportFromCjs(dagreExports), getLayouted
94143
94128
  ({ name: G }) => columnHelper$1.accessor(G, {
94144
94129
  minSize: 100,
94145
94130
  maxSize: 200,
94146
- header: () => formatColumnName(G),
94131
+ header: () => formatColumnName$1(G),
94147
94132
  cell: (Z) => /* @__PURE__ */ jsxRuntimeExports.jsx(CellContent$1, { formattedValue: Z.getValue() }),
94148
94133
  sortingFn
94149
94134
  })
@@ -95026,7 +95011,360 @@ const DataReportContent = ({
95026
95011
  ]
95027
95012
  }
95028
95013
  );
95029
- }, TableBody = ({ table: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tbody, { ...R, children: C.getRowModel().rows.map((M) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tr, { children: M.getVisibleCells().map((D) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Td, { maw: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: flexRender(D.column.columnDef.cell, D.getContext()) }) }, D.id)) }, M.id)) }), TemplateNode = ({
95014
+ }, t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r = (C) => !!(C && typeof C == "object"), i = (C) => C && !!C[t], o = (C, R, M) => {
95015
+ if (i(C)) {
95016
+ const D = C[t](), { matched: F, selections: H } = D.match(R);
95017
+ return F && H && Object.keys(H).forEach((U) => M(U, H[U])), F;
95018
+ }
95019
+ if (r(C)) {
95020
+ if (!r(R)) return !1;
95021
+ if (Array.isArray(C)) {
95022
+ if (!Array.isArray(R)) return !1;
95023
+ let D = [], F = [], H = [];
95024
+ for (const U of C.keys()) {
95025
+ const q = C[U];
95026
+ i(q) && q[e] ? H.push(q) : H.length ? F.push(q) : D.push(q);
95027
+ }
95028
+ if (H.length) {
95029
+ if (H.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
95030
+ if (R.length < D.length + F.length) return !1;
95031
+ const U = R.slice(0, D.length), q = F.length === 0 ? [] : R.slice(-F.length), G = R.slice(D.length, F.length === 0 ? 1 / 0 : -F.length);
95032
+ return D.every((Z, Y) => o(Z, U[Y], M)) && F.every((Z, Y) => o(Z, q[Y], M)) && (H.length === 0 || o(H[0], G, M));
95033
+ }
95034
+ return C.length === R.length && C.every((U, q) => o(U, R[q], M));
95035
+ }
95036
+ return Reflect.ownKeys(C).every((D) => {
95037
+ const F = C[D];
95038
+ return (D in R || i(H = F) && H[t]().matcherType === "optional") && o(F, R[D], M);
95039
+ var H;
95040
+ });
95041
+ }
95042
+ return Object.is(R, C);
95043
+ }, s = (C) => {
95044
+ var R, M, D;
95045
+ return r(C) ? i(C) ? (R = (M = (D = C[t]()).getSelectionKeys) == null ? void 0 : M.call(D)) != null ? R : [] : Array.isArray(C) ? c(C, s) : c(Object.values(C), s) : [];
95046
+ }, c = (C, R) => C.reduce((M, D) => M.concat(R(D)), []);
95047
+ function a(...C) {
95048
+ if (C.length === 1) {
95049
+ const [R] = C;
95050
+ return (M) => o(R, M, () => {
95051
+ });
95052
+ }
95053
+ if (C.length === 2) {
95054
+ const [R, M] = C;
95055
+ return o(R, M, () => {
95056
+ });
95057
+ }
95058
+ throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${C.length}.`);
95059
+ }
95060
+ function u(C) {
95061
+ return Object.assign(C, { optional: () => h(C), and: (R) => m(C, R), or: (R) => d(C, R), select: (R) => R === void 0 ? y(C) : y(R, C) });
95062
+ }
95063
+ function l(C) {
95064
+ return Object.assign(((R) => Object.assign(R, { [Symbol.iterator]() {
95065
+ let M = 0;
95066
+ const D = [{ value: Object.assign(R, { [e]: !0 }), done: !1 }, { done: !0, value: void 0 }];
95067
+ return { next: () => {
95068
+ var F;
95069
+ return (F = D[M++]) != null ? F : D.at(-1);
95070
+ } };
95071
+ } }))(C), { optional: () => l(h(C)), select: (R) => l(R === void 0 ? y(C) : y(R, C)) });
95072
+ }
95073
+ function h(C) {
95074
+ return u({ [t]: () => ({ match: (R) => {
95075
+ let M = {};
95076
+ const D = (F, H) => {
95077
+ M[F] = H;
95078
+ };
95079
+ return R === void 0 ? (s(C).forEach((F) => D(F, void 0)), { matched: !0, selections: M }) : { matched: o(C, R, D), selections: M };
95080
+ }, getSelectionKeys: () => s(C), matcherType: "optional" }) });
95081
+ }
95082
+ const f = (C, R) => {
95083
+ for (const M of C) if (!R(M)) return !1;
95084
+ return !0;
95085
+ }, g = (C, R) => {
95086
+ for (const [M, D] of C.entries()) if (!R(D, M)) return !1;
95087
+ return !0;
95088
+ };
95089
+ function m(...C) {
95090
+ return u({ [t]: () => ({ match: (R) => {
95091
+ let M = {};
95092
+ const D = (F, H) => {
95093
+ M[F] = H;
95094
+ };
95095
+ return { matched: C.every((F) => o(F, R, D)), selections: M };
95096
+ }, getSelectionKeys: () => c(C, s), matcherType: "and" }) });
95097
+ }
95098
+ function d(...C) {
95099
+ return u({ [t]: () => ({ match: (R) => {
95100
+ let M = {};
95101
+ const D = (F, H) => {
95102
+ M[F] = H;
95103
+ };
95104
+ return c(C, s).forEach((F) => D(F, void 0)), { matched: C.some((F) => o(F, R, D)), selections: M };
95105
+ }, getSelectionKeys: () => c(C, s), matcherType: "or" }) });
95106
+ }
95107
+ function p(C) {
95108
+ return { [t]: () => ({ match: (R) => ({ matched: !!C(R) }) }) };
95109
+ }
95110
+ function y(...C) {
95111
+ const R = typeof C[0] == "string" ? C[0] : void 0, M = C.length === 2 ? C[1] : typeof C[0] == "string" ? void 0 : C[0];
95112
+ return u({ [t]: () => ({ match: (D) => {
95113
+ let F = { [R ?? n]: D };
95114
+ return { matched: M === void 0 || o(M, D, (H, U) => {
95115
+ F[H] = U;
95116
+ }), selections: F };
95117
+ }, getSelectionKeys: () => [R ?? n].concat(M === void 0 ? [] : s(M)) }) });
95118
+ }
95119
+ function v(C) {
95120
+ return typeof C == "number";
95121
+ }
95122
+ function b(C) {
95123
+ return typeof C == "string";
95124
+ }
95125
+ function w(C) {
95126
+ return typeof C == "bigint";
95127
+ }
95128
+ const S = u(p(function(C) {
95129
+ return !0;
95130
+ })), O = S, j = (C) => Object.assign(u(C), { startsWith: (R) => {
95131
+ return j(m(C, (M = R, p((D) => b(D) && D.startsWith(M)))));
95132
+ var M;
95133
+ }, endsWith: (R) => {
95134
+ return j(m(C, (M = R, p((D) => b(D) && D.endsWith(M)))));
95135
+ var M;
95136
+ }, minLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length >= M))(R))), length: (R) => j(m(C, ((M) => p((D) => b(D) && D.length === M))(R))), maxLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length <= M))(R))), includes: (R) => {
95137
+ return j(m(C, (M = R, p((D) => b(D) && D.includes(M)))));
95138
+ var M;
95139
+ }, regex: (R) => {
95140
+ return j(m(C, (M = R, p((D) => b(D) && !!D.match(M)))));
95141
+ var M;
95142
+ } }), K = j(p(b)), x = (C) => Object.assign(u(C), { between: (R, M) => x(m(C, ((D, F) => p((H) => v(H) && D <= H && F >= H))(R, M))), lt: (R) => x(m(C, ((M) => p((D) => v(D) && D < M))(R))), gt: (R) => x(m(C, ((M) => p((D) => v(D) && D > M))(R))), lte: (R) => x(m(C, ((M) => p((D) => v(D) && D <= M))(R))), gte: (R) => x(m(C, ((M) => p((D) => v(D) && D >= M))(R))), int: () => x(m(C, p((R) => v(R) && Number.isInteger(R)))), finite: () => x(m(C, p((R) => v(R) && Number.isFinite(R)))), positive: () => x(m(C, p((R) => v(R) && R > 0))), negative: () => x(m(C, p((R) => v(R) && R < 0))) }), E = x(p(v)), A = (C) => Object.assign(u(C), { between: (R, M) => A(m(C, ((D, F) => p((H) => w(H) && D <= H && F >= H))(R, M))), lt: (R) => A(m(C, ((M) => p((D) => w(D) && D < M))(R))), gt: (R) => A(m(C, ((M) => p((D) => w(D) && D > M))(R))), lte: (R) => A(m(C, ((M) => p((D) => w(D) && D <= M))(R))), gte: (R) => A(m(C, ((M) => p((D) => w(D) && D >= M))(R))), positive: () => A(m(C, p((R) => w(R) && R > 0))), negative: () => A(m(C, p((R) => w(R) && R < 0))) }), P = A(p(w)), T = u(p(function(C) {
95143
+ return typeof C == "boolean";
95144
+ })), B = u(p(function(C) {
95145
+ return typeof C == "symbol";
95146
+ })), _ = u(p(function(C) {
95147
+ return C == null;
95148
+ })), k = u(p(function(C) {
95149
+ return C != null;
95150
+ }));
95151
+ var N = { __proto__: null, matcher: t, optional: h, array: function(...C) {
95152
+ return l({ [t]: () => ({ match: (R) => {
95153
+ if (!Array.isArray(R)) return { matched: !1 };
95154
+ if (C.length === 0) return { matched: !0 };
95155
+ const M = C[0];
95156
+ let D = {};
95157
+ if (R.length === 0) return s(M).forEach((H) => {
95158
+ D[H] = [];
95159
+ }), { matched: !0, selections: D };
95160
+ const F = (H, U) => {
95161
+ D[H] = (D[H] || []).concat([U]);
95162
+ };
95163
+ return { matched: R.every((H) => o(M, H, F)), selections: D };
95164
+ }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95165
+ }, set: function(...C) {
95166
+ return u({ [t]: () => ({ match: (R) => {
95167
+ if (!(R instanceof Set)) return { matched: !1 };
95168
+ let M = {};
95169
+ if (R.size === 0) return { matched: !0, selections: M };
95170
+ if (C.length === 0) return { matched: !0 };
95171
+ const D = (H, U) => {
95172
+ M[H] = (M[H] || []).concat([U]);
95173
+ }, F = C[0];
95174
+ return { matched: f(R, (H) => o(F, H, D)), selections: M };
95175
+ }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95176
+ }, map: function(...C) {
95177
+ return u({ [t]: () => ({ match: (R) => {
95178
+ if (!(R instanceof Map)) return { matched: !1 };
95179
+ let M = {};
95180
+ if (R.size === 0) return { matched: !0, selections: M };
95181
+ const D = (q, G) => {
95182
+ M[q] = (M[q] || []).concat([G]);
95183
+ };
95184
+ if (C.length === 0) return { matched: !0 };
95185
+ var F;
95186
+ if (C.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(F = C[0]) == null ? void 0 : F.toString()}`);
95187
+ const [H, U] = C;
95188
+ return { matched: g(R, (q, G) => {
95189
+ const Z = o(H, G, D), Y = o(U, q, D);
95190
+ return Z && Y;
95191
+ }), selections: M };
95192
+ }, getSelectionKeys: () => C.length === 0 ? [] : [...s(C[0]), ...s(C[1])] }) });
95193
+ }, intersection: m, union: d, not: function(C) {
95194
+ return u({ [t]: () => ({ match: (R) => ({ matched: !o(C, R, () => {
95195
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
95196
+ }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(C) {
95197
+ return u(p(/* @__PURE__ */ function(R) {
95198
+ return (M) => M instanceof R;
95199
+ }(C)));
95200
+ }, shape: function(C) {
95201
+ return u(p(a(C)));
95202
+ } };
95203
+ class W extends Error {
95204
+ constructor(R) {
95205
+ let M;
95206
+ try {
95207
+ M = JSON.stringify(R);
95208
+ } catch {
95209
+ M = R;
95210
+ }
95211
+ super(`Pattern matching error: no pattern matches value ${M}`), this.input = void 0, this.input = R;
95212
+ }
95213
+ }
95214
+ const $ = { matched: !1, value: void 0 };
95215
+ function z(C) {
95216
+ return new I(C, $);
95217
+ }
95218
+ class I {
95219
+ constructor(R, M) {
95220
+ this.input = void 0, this.state = void 0, this.input = R, this.state = M;
95221
+ }
95222
+ with(...R) {
95223
+ if (this.state.matched) return this;
95224
+ const M = R[R.length - 1], D = [R[0]];
95225
+ let F;
95226
+ R.length === 3 && typeof R[1] == "function" ? F = R[1] : R.length > 2 && D.push(...R.slice(1, R.length - 1));
95227
+ let H = !1, U = {};
95228
+ const q = (Z, Y) => {
95229
+ H = !0, U[Z] = Y;
95230
+ }, G = !D.some((Z) => o(Z, this.input, q)) || F && !F(this.input) ? $ : { matched: !0, value: M(H ? n in U ? U[n] : U : this.input, this.input) };
95231
+ return new I(this.input, G);
95232
+ }
95233
+ when(R, M) {
95234
+ if (this.state.matched) return this;
95235
+ const D = !!R(this.input);
95236
+ return new I(this.input, D ? { matched: !0, value: M(this.input, this.input) } : $);
95237
+ }
95238
+ otherwise(R) {
95239
+ return this.state.matched ? this.state.value : R(this.input);
95240
+ }
95241
+ exhaustive(R = L) {
95242
+ return this.state.matched ? this.state.value : R(this.input);
95243
+ }
95244
+ run() {
95245
+ return this.exhaustive();
95246
+ }
95247
+ returnType() {
95248
+ return this;
95249
+ }
95250
+ }
95251
+ function L(C) {
95252
+ throw new W(C);
95253
+ }
95254
+ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95255
+ Paper,
95256
+ {
95257
+ withBorder: !0,
95258
+ style: { borderColor: "mageGunmetal.9" },
95259
+ px: "sm",
95260
+ py: 6,
95261
+ ...R,
95262
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "md", fw: 400, truncate: "end", style: { textAlign: "left" }, children: C })
95263
+ }
95264
+ ), GenericError = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Something went wrong. Please try again later." }), GenericLoading = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Loading..." }), useTemporaryMessage = (C) => {
95265
+ const [R, M] = reactExports.useState(C), D = reactExports.useRef(!0), F = reactExports.useRef(!1);
95266
+ return reactExports.useEffect(() => {
95267
+ D.current ? D.current = !1 : C && !F.current && (F.current = !0, setTimeout(() => {
95268
+ M(!0);
95269
+ }, 2e3));
95270
+ }, [C]), R;
95271
+ }, flowQueryOptions = (C) => ({
95272
+ queryKey: ["flows", { flowId: C }],
95273
+ queryFn: async () => {
95274
+ if (!C || !supabase) return null;
95275
+ const R = await withAuthTokens(supabase), { data: M, error: D } = await client.GET(RetrieveFlow.path, {
95276
+ params: {
95277
+ ...R,
95278
+ path: { flowId: C }
95279
+ }
95280
+ });
95281
+ if (D)
95282
+ throw new Error(D.error);
95283
+ return M;
95284
+ }
95285
+ }), STEP_NAMES = Object.values(FlowSteps), useFlow = (C) => useQuery({
95286
+ ...flowQueryOptions(C),
95287
+ enabled: !!C,
95288
+ refetchIntervalInBackground: !1,
95289
+ refetchInterval: (R) => {
95290
+ var q;
95291
+ if (!((q = R.state.data) != null && q.flow_steps.length))
95292
+ return 1e3;
95293
+ const D = R.state.data.flow_steps;
95294
+ if (D.some((G) => G.status === "failed")) return;
95295
+ const H = D.filter((G) => G.status === "completed").map((G) => G.name);
95296
+ if (!STEP_NAMES.every((G) => H.includes(G)))
95297
+ return 1e3;
95298
+ }
95299
+ }), useFirstFlowDataId = (C) => {
95300
+ const R = useContextReady();
95301
+ return useQuery({
95302
+ queryKey: ["firstFlowDataId", { flowId: C }],
95303
+ staleTime: 1 / 0,
95304
+ enabled: R,
95305
+ queryFn: async () => {
95306
+ const M = await (supabase == null ? void 0 : supabase.from("flow_data").select("id").eq("flow_id", C).order("created_at", { ascending: !0 }).limit(1).maybeSingle());
95307
+ if (!M)
95308
+ throw new Error("No flow data found");
95309
+ const { data: D, error: F } = M;
95310
+ if (F)
95311
+ throw new Error(
95312
+ `Failed to fetch first flow_data_id for flow ${C}`
95313
+ );
95314
+ return D == null ? void 0 : D.id;
95315
+ }
95316
+ });
95317
+ }, Step = ({
95318
+ title: C,
95319
+ children: R,
95320
+ value: M,
95321
+ rightSection: D,
95322
+ isLast: F,
95323
+ disabled: H
95324
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
95325
+ Accordion.Item,
95326
+ {
95327
+ value: M,
95328
+ styles: {
95329
+ item: {
95330
+ borderBottom: F ? "none" : ""
95331
+ }
95332
+ },
95333
+ children: [
95334
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
95335
+ Accordion.Control,
95336
+ {
95337
+ h: 65,
95338
+ disabled: H,
95339
+ sx: () => ({
95340
+ "&:hover": {
95341
+ backgroundColor: "transparent"
95342
+ }
95343
+ }),
95344
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { align: "center", justify: "space-between", children: [
95345
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { tt: "uppercase", size: "lg", fw: 600, children: C }),
95346
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { maw: 300, children: !!D && D })
95347
+ ] })
95348
+ }
95349
+ ),
95350
+ R && /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion.Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { px: "md", children: R }) })
95351
+ ]
95352
+ }
95353
+ ), AnimatedStep = ({
95354
+ children: C,
95355
+ ...R
95356
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95357
+ motion.span,
95358
+ {
95359
+ initial: { opacity: 0, y: 15 },
95360
+ animate: { opacity: 1, y: 0 },
95361
+ exit: { opacity: 0, y: -15 },
95362
+ transition: { duration: 0.3, ease: "easeInOut" },
95363
+ style: { minWidth: 0, textWrap: "nowrap" },
95364
+ ...R,
95365
+ children: C
95366
+ }
95367
+ ), TableBody = ({ table: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tbody, { ...R, children: C.getRowModel().rows.map((M) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Tr, { children: M.getVisibleCells().map((D) => /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1.Td, { maw: 0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { span: !0, ff: "monospace", size: "sm", truncate: "end", children: flexRender(D.column.columnDef.cell, D.getContext()) }) }, D.id)) }, M.id)) }), TemplateNode = ({
95030
95368
  title: C,
95031
95369
  data: { explanation: R }
95032
95370
  }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -95272,7 +95610,7 @@ const DataReportContent = ({
95272
95610
  H.id
95273
95611
  );
95274
95612
  }) }, F.id)) });
95275
- }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C && C.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: C, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }), columnHelper = createColumnHelper(), Table = ({
95613
+ }, MAX_CELL_CHAR_LENGTH = 35, CellContent = ({ formattedValue: { display: C } }) => C === "empty" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { c: "dimmed", size: "sm", truncate: "end", children: "empty" }) : C && C.length > MAX_CELL_CHAR_LENGTH ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, maw: "25rem", label: C, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { truncate: "end", children: C }), columnHelper = createColumnHelper(), formatColumnName = (C) => C.split("_").map((D) => D.length === 0 ? "" : D.charAt(0).toUpperCase() + D.slice(1)).join(" "), Table = ({
95276
95614
  flowId: C,
95277
95615
  dataColumns: R,
95278
95616
  data: M,
@@ -95292,6 +95630,7 @@ const DataReportContent = ({
95292
95630
  return ce;
95293
95631
  }) : [], [M]), ne = reactExports.useMemo(() => R && R.length > 0 ? R.map(
95294
95632
  ({ name: se }) => columnHelper.accessor(se, {
95633
+ header: () => formatColumnName(se),
95295
95634
  cell: (ce) => /* @__PURE__ */ jsxRuntimeExports.jsx(CellContent, { formattedValue: ce.getValue() })
95296
95635
  })
95297
95636
  ) : [], [R]), oe = useReactTable({
@@ -95456,314 +95795,7 @@ const DataReportContent = ({
95456
95795
  U ? dayjs(U).startOf("hour").format("DD MMM. YYYY, [at] ha") : "Loading..."
95457
95796
  ] })
95458
95797
  ] });
95459
- }, t = Symbol.for("@ts-pattern/matcher"), e = Symbol.for("@ts-pattern/isVariadic"), n = "@ts-pattern/anonymous-select-key", r = (C) => !!(C && typeof C == "object"), i = (C) => C && !!C[t], o = (C, R, M) => {
95460
- if (i(C)) {
95461
- const D = C[t](), { matched: F, selections: H } = D.match(R);
95462
- return F && H && Object.keys(H).forEach((U) => M(U, H[U])), F;
95463
- }
95464
- if (r(C)) {
95465
- if (!r(R)) return !1;
95466
- if (Array.isArray(C)) {
95467
- if (!Array.isArray(R)) return !1;
95468
- let D = [], F = [], H = [];
95469
- for (const U of C.keys()) {
95470
- const q = C[U];
95471
- i(q) && q[e] ? H.push(q) : H.length ? F.push(q) : D.push(q);
95472
- }
95473
- if (H.length) {
95474
- if (H.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
95475
- if (R.length < D.length + F.length) return !1;
95476
- const U = R.slice(0, D.length), q = F.length === 0 ? [] : R.slice(-F.length), G = R.slice(D.length, F.length === 0 ? 1 / 0 : -F.length);
95477
- return D.every((Z, Y) => o(Z, U[Y], M)) && F.every((Z, Y) => o(Z, q[Y], M)) && (H.length === 0 || o(H[0], G, M));
95478
- }
95479
- return C.length === R.length && C.every((U, q) => o(U, R[q], M));
95480
- }
95481
- return Reflect.ownKeys(C).every((D) => {
95482
- const F = C[D];
95483
- return (D in R || i(H = F) && H[t]().matcherType === "optional") && o(F, R[D], M);
95484
- var H;
95485
- });
95486
- }
95487
- return Object.is(R, C);
95488
- }, s = (C) => {
95489
- var R, M, D;
95490
- return r(C) ? i(C) ? (R = (M = (D = C[t]()).getSelectionKeys) == null ? void 0 : M.call(D)) != null ? R : [] : Array.isArray(C) ? c(C, s) : c(Object.values(C), s) : [];
95491
- }, c = (C, R) => C.reduce((M, D) => M.concat(R(D)), []);
95492
- function a(...C) {
95493
- if (C.length === 1) {
95494
- const [R] = C;
95495
- return (M) => o(R, M, () => {
95496
- });
95497
- }
95498
- if (C.length === 2) {
95499
- const [R, M] = C;
95500
- return o(R, M, () => {
95501
- });
95502
- }
95503
- throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${C.length}.`);
95504
- }
95505
- function u(C) {
95506
- return Object.assign(C, { optional: () => h(C), and: (R) => m(C, R), or: (R) => d(C, R), select: (R) => R === void 0 ? y(C) : y(R, C) });
95507
- }
95508
- function l(C) {
95509
- return Object.assign(((R) => Object.assign(R, { [Symbol.iterator]() {
95510
- let M = 0;
95511
- const D = [{ value: Object.assign(R, { [e]: !0 }), done: !1 }, { done: !0, value: void 0 }];
95512
- return { next: () => {
95513
- var F;
95514
- return (F = D[M++]) != null ? F : D.at(-1);
95515
- } };
95516
- } }))(C), { optional: () => l(h(C)), select: (R) => l(R === void 0 ? y(C) : y(R, C)) });
95517
- }
95518
- function h(C) {
95519
- return u({ [t]: () => ({ match: (R) => {
95520
- let M = {};
95521
- const D = (F, H) => {
95522
- M[F] = H;
95523
- };
95524
- return R === void 0 ? (s(C).forEach((F) => D(F, void 0)), { matched: !0, selections: M }) : { matched: o(C, R, D), selections: M };
95525
- }, getSelectionKeys: () => s(C), matcherType: "optional" }) });
95526
- }
95527
- const f = (C, R) => {
95528
- for (const M of C) if (!R(M)) return !1;
95529
- return !0;
95530
- }, g = (C, R) => {
95531
- for (const [M, D] of C.entries()) if (!R(D, M)) return !1;
95532
- return !0;
95533
- };
95534
- function m(...C) {
95535
- return u({ [t]: () => ({ match: (R) => {
95536
- let M = {};
95537
- const D = (F, H) => {
95538
- M[F] = H;
95539
- };
95540
- return { matched: C.every((F) => o(F, R, D)), selections: M };
95541
- }, getSelectionKeys: () => c(C, s), matcherType: "and" }) });
95542
- }
95543
- function d(...C) {
95544
- return u({ [t]: () => ({ match: (R) => {
95545
- let M = {};
95546
- const D = (F, H) => {
95547
- M[F] = H;
95548
- };
95549
- return c(C, s).forEach((F) => D(F, void 0)), { matched: C.some((F) => o(F, R, D)), selections: M };
95550
- }, getSelectionKeys: () => c(C, s), matcherType: "or" }) });
95551
- }
95552
- function p(C) {
95553
- return { [t]: () => ({ match: (R) => ({ matched: !!C(R) }) }) };
95554
- }
95555
- function y(...C) {
95556
- const R = typeof C[0] == "string" ? C[0] : void 0, M = C.length === 2 ? C[1] : typeof C[0] == "string" ? void 0 : C[0];
95557
- return u({ [t]: () => ({ match: (D) => {
95558
- let F = { [R ?? n]: D };
95559
- return { matched: M === void 0 || o(M, D, (H, U) => {
95560
- F[H] = U;
95561
- }), selections: F };
95562
- }, getSelectionKeys: () => [R ?? n].concat(M === void 0 ? [] : s(M)) }) });
95563
- }
95564
- function v(C) {
95565
- return typeof C == "number";
95566
- }
95567
- function b(C) {
95568
- return typeof C == "string";
95569
- }
95570
- function w(C) {
95571
- return typeof C == "bigint";
95572
- }
95573
- const S = u(p(function(C) {
95574
- return !0;
95575
- })), O = S, j = (C) => Object.assign(u(C), { startsWith: (R) => {
95576
- return j(m(C, (M = R, p((D) => b(D) && D.startsWith(M)))));
95577
- var M;
95578
- }, endsWith: (R) => {
95579
- return j(m(C, (M = R, p((D) => b(D) && D.endsWith(M)))));
95580
- var M;
95581
- }, minLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length >= M))(R))), length: (R) => j(m(C, ((M) => p((D) => b(D) && D.length === M))(R))), maxLength: (R) => j(m(C, ((M) => p((D) => b(D) && D.length <= M))(R))), includes: (R) => {
95582
- return j(m(C, (M = R, p((D) => b(D) && D.includes(M)))));
95583
- var M;
95584
- }, regex: (R) => {
95585
- return j(m(C, (M = R, p((D) => b(D) && !!D.match(M)))));
95586
- var M;
95587
- } }), K = j(p(b)), x = (C) => Object.assign(u(C), { between: (R, M) => x(m(C, ((D, F) => p((H) => v(H) && D <= H && F >= H))(R, M))), lt: (R) => x(m(C, ((M) => p((D) => v(D) && D < M))(R))), gt: (R) => x(m(C, ((M) => p((D) => v(D) && D > M))(R))), lte: (R) => x(m(C, ((M) => p((D) => v(D) && D <= M))(R))), gte: (R) => x(m(C, ((M) => p((D) => v(D) && D >= M))(R))), int: () => x(m(C, p((R) => v(R) && Number.isInteger(R)))), finite: () => x(m(C, p((R) => v(R) && Number.isFinite(R)))), positive: () => x(m(C, p((R) => v(R) && R > 0))), negative: () => x(m(C, p((R) => v(R) && R < 0))) }), E = x(p(v)), A = (C) => Object.assign(u(C), { between: (R, M) => A(m(C, ((D, F) => p((H) => w(H) && D <= H && F >= H))(R, M))), lt: (R) => A(m(C, ((M) => p((D) => w(D) && D < M))(R))), gt: (R) => A(m(C, ((M) => p((D) => w(D) && D > M))(R))), lte: (R) => A(m(C, ((M) => p((D) => w(D) && D <= M))(R))), gte: (R) => A(m(C, ((M) => p((D) => w(D) && D >= M))(R))), positive: () => A(m(C, p((R) => w(R) && R > 0))), negative: () => A(m(C, p((R) => w(R) && R < 0))) }), P = A(p(w)), T = u(p(function(C) {
95588
- return typeof C == "boolean";
95589
- })), B = u(p(function(C) {
95590
- return typeof C == "symbol";
95591
- })), _ = u(p(function(C) {
95592
- return C == null;
95593
- })), k = u(p(function(C) {
95594
- return C != null;
95595
- }));
95596
- var N = { __proto__: null, matcher: t, optional: h, array: function(...C) {
95597
- return l({ [t]: () => ({ match: (R) => {
95598
- if (!Array.isArray(R)) return { matched: !1 };
95599
- if (C.length === 0) return { matched: !0 };
95600
- const M = C[0];
95601
- let D = {};
95602
- if (R.length === 0) return s(M).forEach((H) => {
95603
- D[H] = [];
95604
- }), { matched: !0, selections: D };
95605
- const F = (H, U) => {
95606
- D[H] = (D[H] || []).concat([U]);
95607
- };
95608
- return { matched: R.every((H) => o(M, H, F)), selections: D };
95609
- }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95610
- }, set: function(...C) {
95611
- return u({ [t]: () => ({ match: (R) => {
95612
- if (!(R instanceof Set)) return { matched: !1 };
95613
- let M = {};
95614
- if (R.size === 0) return { matched: !0, selections: M };
95615
- if (C.length === 0) return { matched: !0 };
95616
- const D = (H, U) => {
95617
- M[H] = (M[H] || []).concat([U]);
95618
- }, F = C[0];
95619
- return { matched: f(R, (H) => o(F, H, D)), selections: M };
95620
- }, getSelectionKeys: () => C.length === 0 ? [] : s(C[0]) }) });
95621
- }, map: function(...C) {
95622
- return u({ [t]: () => ({ match: (R) => {
95623
- if (!(R instanceof Map)) return { matched: !1 };
95624
- let M = {};
95625
- if (R.size === 0) return { matched: !0, selections: M };
95626
- const D = (q, G) => {
95627
- M[q] = (M[q] || []).concat([G]);
95628
- };
95629
- if (C.length === 0) return { matched: !0 };
95630
- var F;
95631
- if (C.length === 1) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(F = C[0]) == null ? void 0 : F.toString()}`);
95632
- const [H, U] = C;
95633
- return { matched: g(R, (q, G) => {
95634
- const Z = o(H, G, D), Y = o(U, q, D);
95635
- return Z && Y;
95636
- }), selections: M };
95637
- }, getSelectionKeys: () => C.length === 0 ? [] : [...s(C[0]), ...s(C[1])] }) });
95638
- }, intersection: m, union: d, not: function(C) {
95639
- return u({ [t]: () => ({ match: (R) => ({ matched: !o(C, R, () => {
95640
- }) }), getSelectionKeys: () => [], matcherType: "not" }) });
95641
- }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(C) {
95642
- return u(p(/* @__PURE__ */ function(R) {
95643
- return (M) => M instanceof R;
95644
- }(C)));
95645
- }, shape: function(C) {
95646
- return u(p(a(C)));
95647
- } };
95648
- class W extends Error {
95649
- constructor(R) {
95650
- let M;
95651
- try {
95652
- M = JSON.stringify(R);
95653
- } catch {
95654
- M = R;
95655
- }
95656
- super(`Pattern matching error: no pattern matches value ${M}`), this.input = void 0, this.input = R;
95657
- }
95658
- }
95659
- const $ = { matched: !1, value: void 0 };
95660
- function z(C) {
95661
- return new I(C, $);
95662
- }
95663
- class I {
95664
- constructor(R, M) {
95665
- this.input = void 0, this.state = void 0, this.input = R, this.state = M;
95666
- }
95667
- with(...R) {
95668
- if (this.state.matched) return this;
95669
- const M = R[R.length - 1], D = [R[0]];
95670
- let F;
95671
- R.length === 3 && typeof R[1] == "function" ? F = R[1] : R.length > 2 && D.push(...R.slice(1, R.length - 1));
95672
- let H = !1, U = {};
95673
- const q = (Z, Y) => {
95674
- H = !0, U[Z] = Y;
95675
- }, G = !D.some((Z) => o(Z, this.input, q)) || F && !F(this.input) ? $ : { matched: !0, value: M(H ? n in U ? U[n] : U : this.input, this.input) };
95676
- return new I(this.input, G);
95677
- }
95678
- when(R, M) {
95679
- if (this.state.matched) return this;
95680
- const D = !!R(this.input);
95681
- return new I(this.input, D ? { matched: !0, value: M(this.input, this.input) } : $);
95682
- }
95683
- otherwise(R) {
95684
- return this.state.matched ? this.state.value : R(this.input);
95685
- }
95686
- exhaustive(R = L) {
95687
- return this.state.matched ? this.state.value : R(this.input);
95688
- }
95689
- run() {
95690
- return this.exhaustive();
95691
- }
95692
- returnType() {
95693
- return this;
95694
- }
95695
- }
95696
- function L(C) {
95697
- throw new W(C);
95698
- }
95699
- const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95700
- Paper,
95701
- {
95702
- withBorder: !0,
95703
- style: { borderColor: "mageGunmetal.9" },
95704
- px: "sm",
95705
- py: 6,
95706
- ...R,
95707
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: "md", fw: 400, truncate: "end", style: { textAlign: "left" }, children: C })
95708
- }
95709
- ), GenericError = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Something went wrong. Please try again later." }), GenericLoading = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Loading..." }), useTemporaryMessage = (C) => {
95710
- const [R, M] = reactExports.useState(C), D = reactExports.useRef(!0), F = reactExports.useRef(!1);
95711
- return reactExports.useEffect(() => {
95712
- D.current ? D.current = !1 : C && !F.current && (F.current = !0, setTimeout(() => {
95713
- M(!0);
95714
- }, 2e3));
95715
- }, [C]), R;
95716
- }, Step = ({
95717
- title: C,
95718
- children: R,
95719
- value: M,
95720
- rightSection: D,
95721
- isLast: F,
95722
- disabled: H
95723
- }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
95724
- Accordion.Item,
95725
- {
95726
- value: M,
95727
- styles: {
95728
- item: {
95729
- borderBottom: F ? "none" : ""
95730
- }
95731
- },
95732
- children: [
95733
- /* @__PURE__ */ jsxRuntimeExports.jsx(
95734
- Accordion.Control,
95735
- {
95736
- h: 65,
95737
- disabled: H,
95738
- sx: () => ({
95739
- "&:hover": {
95740
- backgroundColor: "transparent"
95741
- }
95742
- }),
95743
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { align: "center", justify: "space-between", children: [
95744
- /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { tt: "uppercase", size: "lg", fw: 600, children: C }),
95745
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { maw: 300, children: !!D && D })
95746
- ] })
95747
- }
95748
- ),
95749
- R && /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion.Panel, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { px: "md", children: R }) })
95750
- ]
95751
- }
95752
- ), AnimatedStep = ({
95753
- children: C,
95754
- ...R
95755
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
95756
- motion.span,
95757
- {
95758
- initial: { opacity: 0, y: 15 },
95759
- animate: { opacity: 1, y: 0 },
95760
- exit: { opacity: 0, y: -15 },
95761
- transition: { duration: 0.3, ease: "easeInOut" },
95762
- style: { minWidth: 0, textWrap: "nowrap" },
95763
- ...R,
95764
- children: C
95765
- }
95766
- ), useDataStepRenderer = (C) => {
95798
+ }, useDataStepRenderer = (C) => {
95767
95799
  var Z, Y;
95768
95800
  const R = useFlow(C), M = (Z = R.data) == null ? void 0 : Z.flow_steps.find(
95769
95801
  (Q) => Q.name === FlowSteps.shortlistColumns
@@ -95883,10 +95915,10 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95883
95915
  }
95884
95916
  );
95885
95917
  }, AnalyzeRequestRunning = () => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "We're getting clear on your needs..." }), useStepRenderer = (C) => {
95886
- var G, Z;
95887
- const R = useFlow(C), M = (G = R.data) == null ? void 0 : G.flow_steps.find(
95888
- (Y) => Y.name === FlowSteps.analyzeRequest
95889
- ), D = (M == null ? void 0 : M.status) === "completed", F = useTemporaryMessage(D), H = reactExports.useMemo(() => z(M).with(void 0, () => ({
95918
+ var Z, Y;
95919
+ const R = useFlow(C), M = useMediaQuery(`(max-width: ${em(750)})`), D = (Z = R.data) == null ? void 0 : Z.flow_steps.find(
95920
+ (Q) => Q.name === FlowSteps.analyzeRequest
95921
+ ), F = (D == null ? void 0 : D.status) === "completed", H = useTemporaryMessage(F), U = reactExports.useMemo(() => z(D).with(void 0, () => ({
95890
95922
  rightSection: /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "Your request" }) }, "tasks-0"),
95891
95923
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestRunning, {})
95892
95924
  })).with({ status: "running" }, () => ({
@@ -95896,12 +95928,12 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95896
95928
  rightSection: /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { children: "?" }) }, "tasks-2"),
95897
95929
  content: /* @__PURE__ */ jsxRuntimeExports.jsx(GenericError, {})
95898
95930
  })).with({ status: "completed" }, () => {
95899
- var Y, Q;
95931
+ var Q, J;
95900
95932
  return {
95901
- rightSection: F ? /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, w: 350, label: ((Y = R.data) == null ? void 0 : Y.request) || "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95933
+ rightSection: H ? /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: !M && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { multiline: !0, w: 350, label: ((Q = R.data) == null ? void 0 : Q.request) || "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
95902
95934
  ArtifactPaper,
95903
95935
  {
95904
- text: ((Q = R.data) == null ? void 0 : Q.request) || "",
95936
+ text: ((J = R.data) == null ? void 0 : J.request) || "",
95905
95937
  withBorder: !1
95906
95938
  }
95907
95939
  ) }) }, "tasks-3") : /* @__PURE__ */ jsxRuntimeExports.jsx(AnimatedStep, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
@@ -95918,10 +95950,10 @@ const ArtifactPaper = ({ text: C, ...R }) => /* @__PURE__ */ jsxRuntimeExports.j
95918
95950
  }
95919
95951
  )
95920
95952
  ] }) }, "data-done"),
95921
- content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestCompleted, { step: M })
95953
+ content: /* @__PURE__ */ jsxRuntimeExports.jsx(AnalyzeRequestCompleted, { step: D })
95922
95954
  };
95923
- }).otherwise(() => null), [M, (Z = R.data) == null ? void 0 : Z.request, F]), U = !!M, q = !M || M.status === "running";
95924
- return { currentStep: H, highlight: U, isLoading: q, allCompleted: D };
95955
+ }).otherwise(() => null), [D, (Y = R.data) == null ? void 0 : Y.request, M, H]), q = !!D, G = !D || D.status === "running";
95956
+ return { currentStep: U, highlight: q, isLoading: G, allCompleted: F };
95925
95957
  }, TaskStep = ({
95926
95958
  isOpened: C,
95927
95959
  flowId: R
@@ -96969,18 +97001,18 @@ ${M}`);
96969
97001
  ] }) }), Recommendations = ({
96970
97002
  startFlow: C
96971
97003
  }) => {
96972
- const { data: R, status: M } = useRecommendations(), D = reactExports.useMemo(() => R == null ? void 0 : R.slice(0, 3), [R]);
97004
+ const { data: R, status: M } = useRecommendations(), D = useMediaQuery(`(max-width: ${em(750)})`), F = reactExports.useMemo(() => R == null ? void 0 : R.slice(0, 3), [R]);
96973
97005
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { flex: 1, children: [
96974
97006
  /* @__PURE__ */ jsxRuntimeExports.jsx(Title$1, { size: "md", fw: 600, tt: "uppercase", children: "Recommendations based on your data" }),
96975
- /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { wrap: "nowrap", align: "stretch", children: M === "success" ? D == null ? void 0 : D.map((F) => /* @__PURE__ */ jsxRuntimeExports.jsx(
97007
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Group, { wrap: "nowrap", align: "stretch", gap: D ? "xs" : "md", children: M === "success" ? F == null ? void 0 : F.map((H) => /* @__PURE__ */ jsxRuntimeExports.jsx(
96976
97008
  Recommendation,
96977
97009
  {
96978
97010
  startFlow: C,
96979
- starter: F.starter,
96980
- explanation: F.explanation,
96981
- type: F.type
97011
+ starter: H.starter,
97012
+ explanation: H.explanation,
97013
+ type: H.type
96982
97014
  },
96983
- F.starter
97015
+ H.starter
96984
97016
  )) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
96985
97017
  /* @__PURE__ */ jsxRuntimeExports.jsx(RecommendationSkeleton, {}),
96986
97018
  /* @__PURE__ */ jsxRuntimeExports.jsx(RecommendationSkeleton, {}),
@@ -97046,17 +97078,17 @@ ${M}`);
97046
97078
  showRecommendations: R,
97047
97079
  onClose: M
97048
97080
  }) => {
97049
- const [D, F] = reactExports.useState(!1), H = useContextReady(), { classes: U } = useFlowTrackerStyles({}), q = useSetAtom(flowIdAtom), { mutate: G } = useStartFlow({
97050
- onSuccess: (oe) => {
97051
- q(oe.flowId);
97081
+ const [D, F] = reactExports.useState(!1), H = useContextReady(), { classes: U } = useFlowTrackerStyles({}), q = useMediaQuery(`(max-width: ${em(750)})`), G = useSetAtom(flowIdAtom), { mutate: Z } = useStartFlow({
97082
+ onSuccess: (se) => {
97083
+ G(se.flowId);
97052
97084
  }
97053
- }), Z = useQueryClient();
97085
+ }), Y = useQueryClient();
97054
97086
  reactExports.useEffect(() => {
97055
- H && (C && Z.prefetchQuery(recentFlowsQueryOptions()), R && Z.prefetchQuery(recommendationsQueryOptions()));
97056
- }, [H, R, C, Z]);
97057
- const Y = useShadowClickOutside(() => {
97087
+ H && (C && Y.prefetchQuery(recentFlowsQueryOptions()), R && Y.prefetchQuery(recommendationsQueryOptions()));
97088
+ }, [H, R, C, Y]);
97089
+ const Q = useShadowClickOutside(() => {
97058
97090
  F(!1), M == null || M();
97059
- }), Q = useForm({
97091
+ }), J = useForm({
97060
97092
  initialValues: {
97061
97093
  userQuery: ""
97062
97094
  },
@@ -97065,25 +97097,25 @@ ${M}`);
97065
97097
  userQuery: z$1.string().nonempty("Please type in a request")
97066
97098
  })
97067
97099
  )
97068
- }), J = (oe) => {
97069
- G(oe.trim());
97070
- }, te = reactExports.useMemo(
97071
- () => Q.values.userQuery.length > 30 || /[\r\n]/.test(Q.values.userQuery) ? Q.values.userQuery.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : Q.values.userQuery,
97072
- [Q.values.userQuery]
97073
- ), ie = D && R, ne = D && C;
97100
+ }), te = (se) => {
97101
+ Z(se.trim());
97102
+ }, ie = reactExports.useMemo(
97103
+ () => J.values.userQuery.length > 30 || /[\r\n]/.test(J.values.userQuery) ? J.values.userQuery.slice(0, 30).replace(/[\r\n]/g, " ") + "…" : J.values.userQuery,
97104
+ [J.values.userQuery]
97105
+ ), ne = D && R, oe = D && C;
97074
97106
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
97075
97107
  MotionStack,
97076
97108
  {
97077
97109
  flex: 1,
97078
- w: 600,
97110
+ w: q ? "95%" : 600,
97079
97111
  justify: "flex-end",
97080
97112
  style: { alignSelf: "center" },
97081
97113
  initial: "hidden",
97082
97114
  animate: "visible",
97083
97115
  exit: "hidden",
97084
97116
  variants: overlayVariants,
97085
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { pb: "md", ref: Y, children: [
97086
- ie && /* @__PURE__ */ jsxRuntimeExports.jsx(
97117
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, { pb: "md", ref: Q, children: [
97118
+ ne && /* @__PURE__ */ jsxRuntimeExports.jsx(
97087
97119
  Paper,
97088
97120
  {
97089
97121
  component: motion.div,
@@ -97099,7 +97131,7 @@ ${M}`);
97099
97131
  shadow: "lg",
97100
97132
  radius: "md",
97101
97133
  style: { overflow: "hidden", originY: 1 },
97102
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Recommendations, { startFlow: J })
97134
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Recommendations, { startFlow: te })
97103
97135
  }
97104
97136
  ),
97105
97137
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -97127,7 +97159,7 @@ ${M}`);
97127
97159
  gap: D ? "xs" : "lg",
97128
97160
  direction: D ? "column" : "row",
97129
97161
  children: [
97130
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", children: [
97162
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { justify: "space-between", gap: q ? "xs" : "md", children: [
97131
97163
  /* @__PURE__ */ jsxRuntimeExports.jsx(
97132
97164
  Title$1,
97133
97165
  {
@@ -97139,13 +97171,13 @@ ${M}`);
97139
97171
  children: "Ask your data about"
97140
97172
  }
97141
97173
  ),
97142
- ne && /* @__PURE__ */ jsxRuntimeExports.jsx(RecentDashboardsDropdown, {})
97174
+ oe && /* @__PURE__ */ jsxRuntimeExports.jsx(RecentDashboardsDropdown, {})
97143
97175
  ] }),
97144
97176
  /* @__PURE__ */ jsxRuntimeExports.jsx(
97145
97177
  "form",
97146
97178
  {
97147
- onSubmit: Q.onSubmit(
97148
- (oe) => J(oe.userQuery)
97179
+ onSubmit: J.onSubmit(
97180
+ (se) => te(se.userQuery)
97149
97181
  ),
97150
97182
  style: { flex: "1" },
97151
97183
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -97169,16 +97201,16 @@ ${M}`);
97169
97201
  }
97170
97202
  },
97171
97203
  rightSectionWidth: 28,
97172
- ...Q.getInputProps("userQuery"),
97173
- value: D ? Q.values.userQuery : te,
97204
+ ...J.getInputProps("userQuery"),
97205
+ value: D ? J.values.userQuery : ie,
97174
97206
  onFocus: () => {
97175
97207
  F(!0);
97176
97208
  },
97177
- onKeyDown: (oe) => {
97178
- oe.key === "Enter" && !oe.shiftKey && (oe.preventDefault(), Q.onSubmit((se) => J(se.userQuery))());
97209
+ onKeyDown: (se) => {
97210
+ se.key === "Enter" && !se.shiftKey && (se.preventDefault(), J.onSubmit((ce) => te(ce.userQuery))());
97179
97211
  }
97180
97212
  },
97181
- Q.key("userQuery")
97213
+ J.key("userQuery")
97182
97214
  )
97183
97215
  }
97184
97216
  )
@@ -97299,87 +97331,92 @@ ${M}`);
97299
97331
  // 11
97300
97332
  ],
97301
97333
  mageWhisper: [...colorsTuple("#FCFDFD"), "#F7F8F8"]
97302
- }, theme = (C, R) => ({
97303
- cursorType: "pointer",
97304
- colors: R ? {
97305
- mageGunmetal: R.primary,
97306
- mageMagenta: R.darkAccent,
97307
- mageRuby: R.secondary,
97308
- mageWhisper: R.lightAccent
97309
- } : defaultColors,
97310
- white: "var(--mantine-color-mageWhisper-6)",
97311
- black: R ? "black" : "var(--mantine-color-mageGunmetal-6)",
97312
- primaryColor: "mageGunmetal",
97313
- fontFamily: "'Bitter Variable', serif",
97314
- fontFamilyMonospace: '"Source Code Pro Variable", monospace',
97315
- headings: { fontFamily: "'Source Sans 3 Variable', sans-serif" },
97316
- other: {
97317
- ctaPrimaryFill: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-6) 0%, var(--mantine-color-mageGunmetal-8) 100%)",
97318
- ctaPrimaryFillDarken: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-7) 0%, var(--mantine-color-mageGunmetal-9) 100%)",
97319
- ctaSuccessFill: "linear-gradient(180deg, #179949 0%, #117035 100%)",
97320
- whiteGradient: "linear-gradient(180deg, var(--mantine-color-mageWhisper-0) 0%, var(--mantine-color-mageGunmetal-0) 100%)",
97321
- rubyGradient: "linear-gradient(91deg, var(--mantine-color-mageRuby-7) 3.36%, var(--mantine-color-mageMagenta-7) 94.28%)",
97322
- rubyShadow: `0px 0px 7px 2px ${alpha$2("var(--mantine-color-mageRuby-7)", 0.3)}`
97323
- },
97324
- components: {
97325
- Tooltip: {
97326
- styles: {
97327
- tooltip: {
97328
- fontFamily: "'Source Sans 3 Variable'",
97329
- fontSize: "var(--mantine-font-size-md)",
97330
- color: "var(--mantine-color-mageWhisper-6)",
97331
- backgroundColor: "var(--mantine-color-mageGunmetal-8)",
97332
- padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)",
97333
- lineHeight: 1.8
97334
- }
97335
- }
97334
+ }, theme = (C, R) => {
97335
+ var M, D, F;
97336
+ return {
97337
+ cursorType: "pointer",
97338
+ colors: R ? {
97339
+ mageGunmetal: R.primary,
97340
+ mageMagenta: R.darkAccent,
97341
+ mageRuby: R.secondary,
97342
+ mageWhisper: R.lightAccent
97343
+ } : defaultColors,
97344
+ white: "var(--mantine-color-mageWhisper-6)",
97345
+ black: R ? "black" : "var(--mantine-color-mageGunmetal-6)",
97346
+ primaryColor: "mageGunmetal",
97347
+ fontFamily: ((M = R == null ? void 0 : R.fonts) == null ? void 0 : M.body) || "'Bitter Variable', serif",
97348
+ fontFamilyMonospace: ((D = R == null ? void 0 : R.fonts) == null ? void 0 : D.monospace) || '"Source Code Pro Variable", monospace',
97349
+ headings: {
97350
+ fontFamily: ((F = R == null ? void 0 : R.fonts) == null ? void 0 : F.heading) || "'Source Sans 3 Variable', sans-serif"
97336
97351
  },
97337
- Text: {
97338
- styles: {
97339
- root: {
97340
- fontFamily: "'Bitter Variable'"
97341
- }
97342
- }
97352
+ other: {
97353
+ ctaPrimaryFill: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-6) 0%, var(--mantine-color-mageGunmetal-8) 100%)",
97354
+ ctaPrimaryFillDarken: "linear-gradient(180deg, var(--mantine-color-mageGunmetal-7) 0%, var(--mantine-color-mageGunmetal-9) 100%)",
97355
+ ctaSuccessFill: "linear-gradient(180deg, #179949 0%, #117035 100%)",
97356
+ whiteGradient: "linear-gradient(180deg, var(--mantine-color-mageWhisper-0) 0%, var(--mantine-color-mageGunmetal-0) 100%)",
97357
+ rubyGradient: "linear-gradient(91deg, var(--mantine-color-mageRuby-7) 3.36%, var(--mantine-color-mageMagenta-7) 94.28%)",
97358
+ rubyShadow: `0px 0px 7px 2px ${alpha$2("var(--mantine-color-mageRuby-7)", 0.3)}`
97343
97359
  },
97344
- Badge: {
97345
- styles: {
97346
- root: {
97347
- fontFamily: "'Source Sans 3 Variable'"
97360
+ components: {
97361
+ Tooltip: {
97362
+ styles: {
97363
+ tooltip: {
97364
+ fontFamily: "'Source Sans 3 Variable'",
97365
+ fontSize: "var(--mantine-font-size-md)",
97366
+ color: "var(--mantine-color-mageWhisper-6)",
97367
+ backgroundColor: "var(--mantine-color-mageGunmetal-8)",
97368
+ padding: "var(--mantine-spacing-xs) var(--mantine-spacing-sm)",
97369
+ lineHeight: 1.8
97370
+ }
97348
97371
  }
97349
- }
97350
- },
97351
- Button: {
97352
- styles: {
97353
- root: {
97354
- fontFamily: "'Source Sans 3 Variable'"
97372
+ },
97373
+ Text: {
97374
+ styles: {
97375
+ root: {
97376
+ fontFamily: "'Bitter Variable'"
97377
+ }
97355
97378
  }
97356
- }
97357
- },
97358
- Portal: {
97359
- defaultProps: {
97360
- target: C
97361
- }
97362
- },
97363
- ScrollArea: {
97364
- defaultProps: {
97365
- offsetScrollbars: "present"
97366
- }
97367
- },
97368
- Select: {
97369
- styles: {
97370
- root: {
97371
- fontFamily: "'Source Sans 3 Variable'"
97372
- },
97373
- input: {
97374
- fontFamily: "'Source Sans 3 Variable'"
97375
- },
97376
- section: {
97377
- fontFamily: "'Source Sans 3 Variable'"
97379
+ },
97380
+ Badge: {
97381
+ styles: {
97382
+ root: {
97383
+ fontFamily: "'Source Sans 3 Variable'"
97384
+ }
97385
+ }
97386
+ },
97387
+ Button: {
97388
+ styles: {
97389
+ root: {
97390
+ fontFamily: "'Source Sans 3 Variable'"
97391
+ }
97392
+ }
97393
+ },
97394
+ Portal: {
97395
+ defaultProps: {
97396
+ target: C
97397
+ }
97398
+ },
97399
+ ScrollArea: {
97400
+ defaultProps: {
97401
+ offsetScrollbars: "present"
97402
+ }
97403
+ },
97404
+ Select: {
97405
+ styles: {
97406
+ root: {
97407
+ fontFamily: "'Source Sans 3 Variable'"
97408
+ },
97409
+ input: {
97410
+ fontFamily: "'Source Sans 3 Variable'"
97411
+ },
97412
+ section: {
97413
+ fontFamily: "'Source Sans 3 Variable'"
97414
+ }
97378
97415
  }
97379
97416
  }
97380
97417
  }
97381
- }
97382
- }), cssResolver = (C) => ({
97418
+ };
97419
+ }, cssResolver = (C) => ({
97383
97420
  variables: {
97384
97421
  "--mantine-color-ctaPrimaryFill": C.other.ctaPrimaryFill,
97385
97422
  "--mantine-color-ctaPrimaryFillDarken": C.other.ctaPrimaryFillDarken,
@@ -97390,7 +97427,7 @@ ${M}`);
97390
97427
  },
97391
97428
  light: {},
97392
97429
  dark: {}
97393
- }), Wrapper = ({ children: C, root: R, themeColors: M }) => {
97430
+ }), Wrapper = ({ children: C, root: R, theme: M }) => {
97394
97431
  const D = reactExports.useMemo(
97395
97432
  () => theme(R, M),
97396
97433
  [R, M]
@@ -97427,7 +97464,7 @@ ${M}`);
97427
97464
  externalJWT: R,
97428
97465
  apiUrl: M,
97429
97466
  children: D,
97430
- themeColors: F,
97467
+ theme: F,
97431
97468
  display: H = "block"
97432
97469
  }) => {
97433
97470
  const U = reactExports.useRef(null), [q, G] = reactExports.useState(!1);
@@ -97464,7 +97501,7 @@ ${M}`);
97464
97501
  apiKey: C,
97465
97502
  externalJWT: R,
97466
97503
  apiUrl: M,
97467
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper, { root: U.current, themeColors: F, children: D })
97504
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper, { root: U.current, theme: F, children: D })
97468
97505
  }
97469
97506
  ) }) : null
97470
97507
  ] });
@@ -97490,29 +97527,31 @@ ${M}`);
97490
97527
  apiKey: C,
97491
97528
  externalJWT: R,
97492
97529
  apiUrl: M,
97493
- persist: D = "none",
97494
- modal: F = void 0,
97495
- startOptions: H = void 0,
97496
- themeColors: U = void 0
97530
+ display: D = "contents",
97531
+ persist: F = "none",
97532
+ modal: H = void 0,
97533
+ startOptions: U = void 0,
97534
+ theme: q = void 0
97497
97535
  }) => {
97498
- const q = useSetAtom(persistenceAtom);
97536
+ const G = useSetAtom(persistenceAtom);
97499
97537
  reactExports.useEffect(() => {
97500
- q(D);
97501
- }, [D, q]);
97502
- const G = (F == null ? void 0 : F.visible) === !0 || F === void 0;
97538
+ G(F);
97539
+ }, [F, G]);
97540
+ const Z = (H == null ? void 0 : H.visible) === !0 || H === void 0;
97503
97541
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
97504
97542
  AppWrapper,
97505
97543
  {
97506
97544
  apiKey: C,
97507
97545
  externalJWT: R,
97508
97546
  apiUrl: M,
97509
- themeColors: U,
97510
- children: G && /* @__PURE__ */ jsxRuntimeExports.jsx(
97547
+ theme: q,
97548
+ display: D,
97549
+ children: Z && /* @__PURE__ */ jsxRuntimeExports.jsx(
97511
97550
  InnerModal,
97512
97551
  {
97513
- onClose: F == null ? void 0 : F.onClose,
97514
- showRecentDashboards: H == null ? void 0 : H.showRecentDashboards,
97515
- showRecommendations: H == null ? void 0 : H.showRecommendations
97552
+ onClose: H == null ? void 0 : H.onClose,
97553
+ showRecentDashboards: U == null ? void 0 : U.showRecentDashboards,
97554
+ showRecommendations: U == null ? void 0 : U.showRecommendations
97516
97555
  }
97517
97556
  )
97518
97557
  }