react-semaphor 0.1.326 → 0.1.327
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/chunks/{braces-dHeaioTd.js → braces-B6qRDu1H.js} +1 -1
- package/dist/chunks/{braces-DVaMJoCd.js → braces-BGWZEnQJ.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog--2jD-eKu.js → calendar-preferences-dialog-CjwbE_82.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-mqU_uOmY.js → calendar-preferences-dialog-fkLUMJyR.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CLbzBHoI.js → chevrons-up-down-BpsogQvv.js} +1 -1
- package/dist/chunks/{chevrons-up-down-DNQE-uEp.js → chevrons-up-down-xG-bVFD9.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DguNfFr8.js → dashboard-briefing-launcher-Co57xBfS.js} +2 -2
- package/dist/chunks/{dashboard-briefing-launcher-DsjXUPFq.js → dashboard-briefing-launcher-Cy1nWZRW.js} +713 -719
- package/dist/chunks/{dashboard-controls-DgNkM1yT.js → dashboard-controls-BWnVEFJq.js} +7 -7
- package/dist/chunks/{dashboard-controls-XCa9PZuU.js → dashboard-controls-C7rOGZO-.js} +1 -1
- package/dist/chunks/{dashboard-json-DkA6Bf0Y.js → dashboard-json-BpRNSsF3.js} +2 -2
- package/dist/chunks/{dashboard-json-DiBd65Xf.js → dashboard-json-DBPMknGo.js} +1 -1
- package/dist/chunks/date-formatter-B4EBSe9C.js +1 -0
- package/dist/chunks/date-formatter-CzcPZx39.js +416 -0
- package/dist/chunks/edit-dashboard-visual-B2vkIKEa.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-Q5hW5MXk.js → edit-dashboard-visual-CYf26co_.js} +8241 -7784
- package/dist/chunks/{index-B1-46PoR.js → index-BD90s-wf.js} +208 -202
- package/dist/chunks/{index-DwfDwtv2.js → index-DTlbYpxd.js} +26702 -26334
- package/dist/chunks/{palette-DtmNws9a.js → palette-CSF7IVJn.js} +1 -1
- package/dist/chunks/{palette-DpcvHAiY.js → palette-CWgEPBoG.js} +1 -1
- package/dist/chunks/{resource-management-panel-CGwWKZOP.js → resource-management-panel-D6nbfJY3.js} +1 -1
- package/dist/chunks/{resource-management-panel-D2oAQkKi.js → resource-management-panel-D893Onv8.js} +3 -3
- package/dist/chunks/{save-Cv_XRb94.js → save-CtQbSub2.js} +1 -1
- package/dist/chunks/{save-BY7WF62U.js → save-DRdFKF57.js} +1 -1
- package/dist/chunks/switch-DJJJD_g1.js +168 -0
- package/dist/chunks/{switch-j3AThLFk.js → switch-DKf6vHfP.js} +2447 -2405
- package/dist/chunks/{use-create-flow-overlay-state-BQPXP0AM.js → use-create-flow-overlay-state-C4LgoK8q.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CP6GDQAX.js → use-create-flow-overlay-state-p21zs2p6.js} +4 -4
- package/dist/chunks/{use-visual-utils-CSXU-96k.js → use-visual-utils-BKBua6o4.js} +2 -2
- package/dist/chunks/{use-visual-utils-NpOW5uZ1.js → use-visual-utils-BqWm0QeW.js} +1 -1
- package/dist/chunks/{validators-DvTxl9i0.js → validators-DDAweCzB.js} +67 -48
- package/dist/chunks/validators-odlRJblR.js +2 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +907 -527
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.cjs +4 -4
- package/dist/format-utils/index.js +22 -21
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +1 -0
- package/dist/types/dashboard-authoring.d.ts +79 -2
- package/dist/types/dashboard.d.ts +17 -2
- package/dist/types/data-app-sdk.d.ts +1 -0
- package/dist/types/format-utils.d.ts +25 -0
- package/dist/types/main.d.ts +65 -10
- package/dist/types/shared.d.ts +17 -2
- package/dist/types/surfboard.d.ts +17 -2
- package/dist/types/types.d.ts +32 -3
- package/package.json +1 -1
- package/dist/chunks/date-formatter-D9Bvw5Qk.js +0 -1
- package/dist/chunks/date-formatter-DyIOb6uC.js +0 -333
- package/dist/chunks/edit-dashboard-visual-BC9eOc4U.js +0 -178
- package/dist/chunks/switch-5aQ_jcLH.js +0 -168
- package/dist/chunks/validators-DJUMR5An.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import { c as Ie, L as yn, a1 as
|
|
3
|
-
import { b as ut, c as mt, d as ht, e as pt, f as ft, bb as
|
|
4
|
-
import { V as
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
2
|
+
import { c as Ie, L as yn, a1 as ro, B as pe, f as ne, G as ct, u as H, E as bt, aJ as Dr, a9 as ha, g as Ke, e as He, H as pa, a as v, S as Tn, X as Ce, P as Fe, b as Ze, d as Xe, aK as ao, aL as so, aH as fa, aM as ga, a2 as Ge, a3 as Je, a4 as Qe, a5 as Ye, a6 as ue, Q as oo, aN as ba, aO as xa, $ as je, T as io, J as lo, K as Tr, aP as co } from "./switch-DKf6vHfP.js";
|
|
3
|
+
import { b as ut, c as mt, d as ht, e as pt, f as ft, bb as uo, n as ya, af as mo, ag as ho, au as va, bO as po, o as he, av as vn, x as fo, aM as Ln, aN as Rn, aP as Fn, aQ as ze, aU as Na, aH as Kt, bP as go, bQ as bo, a$ as Pn, b0 as Mn, b1 as Bn, b2 as On, b3 as Vn, b4 as $n, b5 as Un, u as Dt, _ as ot, a9 as _n, a5 as wa, a6 as jn, $ as Ca, a4 as xo, ab as yo, bJ as vo, bR as No, aJ as wo, a7 as Lr, w as Vt, a1 as Co, bS as ko, bT as So, bU as Ao, bV as Eo, bW as Io, bX as Do, bY as To, bZ as Lo, b_ as ka, b$ as Ro, c0 as Fo, c1 as Po, c2 as Mo, c3 as Bo, c4 as gt, c5 as Oo, bI as Sa, aw as Aa, c6 as Vo, c7 as $o, c8 as Uo, c9 as _o, ca as jo, cb as zo, cc as Ko, cd as Ea, ce as Ho, cf as qo, cg as Ia, ch as Da, ci as Ta, cj as Wo, ck as Go, b8 as La, bx as Jo, bu as Qo, cl as Yo, aV as Zo, cm as Ra, cn as Xo, co as ei, aW as Rr, cp as ti, cq as ni, cr as Nn, cs as ri, ct as ai, cu as Fa, cv as zn, cw as si, cx as oi, cy as ii, cz as Pa, cA as Tt, cB as Ma, ay as wn, b6 as Ba, cC as li, cD as di, ax as Cn, cE as ci, cF as Oa, cG as ui, cH as mi, cI as hi, cJ as pi, cK as fi, cL as gi, cM as bi, cN as xi } from "./index-DTlbYpxd.js";
|
|
4
|
+
import { V as yi, E as Fr, a as Pr, b as vi, c as Ni, L as wi, d as Ci, C as ki, u as Va, e as $a, f as Si, R as Ai, S as Ei } from "./use-create-flow-overlay-state-p21zs2p6.js";
|
|
5
|
+
import Ii, { useState as S, useContext as Di, useRef as Ee, useCallback as me, useEffect as ce, useMemo as V } from "react";
|
|
6
|
+
import { u as Ua } from "./use-visual-utils-BKBua6o4.js";
|
|
7
7
|
import "./index-CuHybtft.js";
|
|
8
|
-
import {
|
|
8
|
+
import { l as Mr } from "./date-formatter-CzcPZx39.js";
|
|
9
9
|
import "./index-CJdxSyQq.js";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
/**
|
|
@@ -14,7 +14,7 @@ import "react-dom";
|
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const Ti = Ie("ArrowUpRight", [
|
|
18
18
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
19
19
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
20
20
|
]);
|
|
@@ -36,7 +36,7 @@ const Br = Ie("FileDown", [
|
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
38
|
*/
|
|
39
|
-
const
|
|
39
|
+
const Li = Ie("FilterX", [
|
|
40
40
|
["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
|
|
41
41
|
["path", { d: "m22 3-5 5", key: "12jva0" }],
|
|
42
42
|
["path", { d: "m17 3 5 5", key: "k36vhe" }]
|
|
@@ -47,7 +47,7 @@ const Ti = Ie("FilterX", [
|
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
49
|
*/
|
|
50
|
-
const
|
|
50
|
+
const Ri = Ie("ListChecks", [
|
|
51
51
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
52
52
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }],
|
|
53
53
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
@@ -60,7 +60,7 @@ const Li = Ie("ListChecks", [
|
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
const
|
|
63
|
+
const _a = Ie("Mail", [
|
|
64
64
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
|
|
65
65
|
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
|
|
66
66
|
]);
|
|
@@ -79,7 +79,7 @@ const kn = Ie("MessageSquare", [
|
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const Fi = Ie("Newspaper", [
|
|
83
83
|
[
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
@@ -97,7 +97,7 @@ const Ri = Ie("Newspaper", [
|
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
99
|
*/
|
|
100
|
-
const
|
|
100
|
+
const ja = Ie("Pause", [
|
|
101
101
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
102
102
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
103
103
|
]);
|
|
@@ -107,7 +107,7 @@ const za = Ie("Pause", [
|
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const Pi = Ie("Undo2", [
|
|
111
111
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
112
112
|
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
113
113
|
]);
|
|
@@ -117,7 +117,7 @@ const Fi = Ie("Undo2", [
|
|
|
117
117
|
* This source code is licensed under the ISC license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
119
|
*/
|
|
120
|
-
const
|
|
120
|
+
const za = Ie("UsersRound", [
|
|
121
121
|
["path", { d: "M18 21a8 8 0 0 0-16 0", key: "3ypg7q" }],
|
|
122
122
|
["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
|
|
123
123
|
["path", { d: "M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3", key: "10s06x" }]
|
|
@@ -137,7 +137,7 @@ const Sn = Ie("Zap", [
|
|
|
137
137
|
}
|
|
138
138
|
]
|
|
139
139
|
]);
|
|
140
|
-
function
|
|
140
|
+
function Mi({
|
|
141
141
|
open: e,
|
|
142
142
|
onOpenChange: n,
|
|
143
143
|
isLibraryVisual: r,
|
|
@@ -149,7 +149,7 @@ function Pi({
|
|
|
149
149
|
const [c, d] = S(
|
|
150
150
|
r && a ? `Copy of ${a}` : a || ""
|
|
151
151
|
), [u, p] = S("");
|
|
152
|
-
|
|
152
|
+
Ii.useEffect(() => {
|
|
153
153
|
e && (d(
|
|
154
154
|
r && a ? `Copy of ${a}` : a || ""
|
|
155
155
|
), p(""));
|
|
@@ -185,7 +185,7 @@ function Pi({
|
|
|
185
185
|
/* @__PURE__ */ s(pt, { className: "flex items-center gap-2", children: [
|
|
186
186
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
187
187
|
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
188
|
-
|
|
188
|
+
yi,
|
|
189
189
|
{
|
|
190
190
|
type: h.badgeType,
|
|
191
191
|
showLabel: !0,
|
|
@@ -199,7 +199,7 @@ function Pi({
|
|
|
199
199
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
200
200
|
/* @__PURE__ */ t(yn, { htmlFor: "name", children: "Name" }),
|
|
201
201
|
/* @__PURE__ */ t(
|
|
202
|
-
|
|
202
|
+
ro,
|
|
203
203
|
{
|
|
204
204
|
id: "name",
|
|
205
205
|
value: c,
|
|
@@ -212,7 +212,7 @@ function Pi({
|
|
|
212
212
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
213
213
|
/* @__PURE__ */ t(yn, { htmlFor: "description", children: "Description (optional)" }),
|
|
214
214
|
/* @__PURE__ */ t(
|
|
215
|
-
|
|
215
|
+
uo,
|
|
216
216
|
{
|
|
217
217
|
id: "description",
|
|
218
218
|
value: u,
|
|
@@ -241,19 +241,19 @@ function Pi({
|
|
|
241
241
|
] })
|
|
242
242
|
] }) });
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
const [e, n] = S(!1), [r, a] = S(!1), [o, i] = S(null), [l, c] = S(null), d = ct((
|
|
246
|
-
(
|
|
247
|
-
), { getUpdatedFrame: D } =
|
|
248
|
-
var
|
|
249
|
-
return ((
|
|
250
|
-
})(), $ =
|
|
251
|
-
|
|
244
|
+
function Bi() {
|
|
245
|
+
const [e, n] = S(!1), [r, a] = S(!1), [o, i] = S(null), [l, c] = S(null), d = ct((E) => E.frame), u = ct((E) => E.card), p = mo(), f = H((E) => E.selectedSheetId), h = H((E) => E.dashboard), b = H(
|
|
246
|
+
(E) => E.actions.setIsDashboardPanelOpen
|
|
247
|
+
), { getUpdatedFrame: D } = Ua(), { selectVisual: k } = ho(), { addFrame: N, setSelectedFrameId: g, setIsVisualEditing: L } = bt(), x = va(), C = !!(d != null && d.visualId), T = (() => {
|
|
248
|
+
var E, P;
|
|
249
|
+
return ((E = d == null ? void 0 : d.cards) == null ? void 0 : E.length) === 1 && ((P = d.cards[0]) != null && P.title) ? d.cards[0].title : p != null && p.title ? p.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
250
|
+
})(), $ = po((E) => {
|
|
251
|
+
E != null && E.id && (k(E), r && o && l && f && (async () => {
|
|
252
252
|
try {
|
|
253
253
|
const P = {
|
|
254
254
|
...o,
|
|
255
255
|
id: Dr(),
|
|
256
|
-
visualId:
|
|
256
|
+
visualId: E.id
|
|
257
257
|
// Link to the newly created library visual
|
|
258
258
|
};
|
|
259
259
|
N(f, P, {
|
|
@@ -273,7 +273,7 @@ function Mi() {
|
|
|
273
273
|
return {
|
|
274
274
|
saveAsDialogOpen: e,
|
|
275
275
|
setSaveAsDialogOpen: n,
|
|
276
|
-
handleSaveAs: async (
|
|
276
|
+
handleSaveAs: async (E) => {
|
|
277
277
|
if (!f) {
|
|
278
278
|
he.error("No sheet selected");
|
|
279
279
|
return;
|
|
@@ -287,13 +287,13 @@ function Mi() {
|
|
|
287
287
|
...P,
|
|
288
288
|
cards: P.cards.map((_) => ({
|
|
289
289
|
..._,
|
|
290
|
-
title:
|
|
290
|
+
title: E.name
|
|
291
291
|
// Use visual name as card title
|
|
292
292
|
}))
|
|
293
293
|
} : P;
|
|
294
|
-
if (
|
|
294
|
+
if (E.saveToLibrary) {
|
|
295
295
|
let _ = null;
|
|
296
|
-
if (
|
|
296
|
+
if (E.saveToCurrentDashboard)
|
|
297
297
|
try {
|
|
298
298
|
_ = await x(K, {
|
|
299
299
|
previousFrame: vn(h, K.id)
|
|
@@ -307,16 +307,16 @@ function Mi() {
|
|
|
307
307
|
);
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
|
-
a(
|
|
310
|
+
a(E.saveToCurrentDashboard), i(K), c(_);
|
|
311
311
|
const O = {
|
|
312
|
-
title:
|
|
313
|
-
description:
|
|
312
|
+
title: E.name,
|
|
313
|
+
description: E.description,
|
|
314
314
|
frameObject: K,
|
|
315
315
|
// Card title synced for single-card frames
|
|
316
316
|
isPrivate: !1
|
|
317
317
|
};
|
|
318
318
|
$.mutate(O);
|
|
319
|
-
} else if (
|
|
319
|
+
} else if (E.saveToCurrentDashboard) {
|
|
320
320
|
const _ = {
|
|
321
321
|
...K,
|
|
322
322
|
// Card title already synced
|
|
@@ -344,15 +344,15 @@ function Mi() {
|
|
|
344
344
|
isSaving: $.isPending
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a =
|
|
347
|
+
function Ic(e = {}) {
|
|
348
|
+
const n = ct((B) => B.frame), r = ct((B) => B.editorContext), a = fo((B) => B.selectedVisual), o = H((B) => B.selectedFrameId), i = H((B) => B.selectedSheetId), l = H((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = bt(), [u, p] = S(!1), [f, h] = S("both"), b = va(), D = (r == null ? void 0 : r.type) === "documentSection", k = !!(n != null && n.visualId || a != null && a.id), N = !!(n != null && n.visualId && o), g = k && !N, {
|
|
349
349
|
saveAsDialogOpen: L,
|
|
350
350
|
setSaveAsDialogOpen: x,
|
|
351
351
|
handleSaveAs: C,
|
|
352
352
|
isLibraryVisual: T,
|
|
353
353
|
currentVisualName: $,
|
|
354
354
|
isSaving: R
|
|
355
|
-
} =
|
|
355
|
+
} = Bi(), { getUpdatedFrame: E } = Ua();
|
|
356
356
|
if (D)
|
|
357
357
|
return /* @__PURE__ */ s(ae, { children: [
|
|
358
358
|
/* @__PURE__ */ t(Fr, { className: "rounded-control", variant: "default" }),
|
|
@@ -365,7 +365,7 @@ function Ac(e = {}) {
|
|
|
365
365
|
}
|
|
366
366
|
if (u) return;
|
|
367
367
|
p(!0);
|
|
368
|
-
const B =
|
|
368
|
+
const B = E(), K = ha(B);
|
|
369
369
|
if (K) {
|
|
370
370
|
p(!1), he.error(K);
|
|
371
371
|
return;
|
|
@@ -396,8 +396,8 @@ function Ac(e = {}) {
|
|
|
396
396
|
return /* @__PURE__ */ s(ae, { children: [
|
|
397
397
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
398
398
|
!k && /* @__PURE__ */ t(Fr, { className: "!rounded-none", variant: "default" }),
|
|
399
|
-
k && g && /* @__PURE__ */ t(
|
|
400
|
-
k && N && /* @__PURE__ */ t(
|
|
399
|
+
k && g && /* @__PURE__ */ t(vi, { className: "!rounded-none", variant: "default" }),
|
|
400
|
+
k && N && /* @__PURE__ */ t(Ni, { className: "!rounded-none" }),
|
|
401
401
|
/* @__PURE__ */ s(Ln, { modal: !1, children: [
|
|
402
402
|
/* @__PURE__ */ t(Rn, { asChild: !0, children: /* @__PURE__ */ t(
|
|
403
403
|
pe,
|
|
@@ -447,7 +447,7 @@ function Ac(e = {}) {
|
|
|
447
447
|
onClick: () => z("library"),
|
|
448
448
|
disabled: R,
|
|
449
449
|
children: [
|
|
450
|
-
/* @__PURE__ */ t(
|
|
450
|
+
/* @__PURE__ */ t(wi, { className: "h-3.5 w-3.5" }),
|
|
451
451
|
"Save as Library Visual"
|
|
452
452
|
]
|
|
453
453
|
}
|
|
@@ -458,7 +458,7 @@ function Ac(e = {}) {
|
|
|
458
458
|
onClick: () => z("both"),
|
|
459
459
|
disabled: R,
|
|
460
460
|
children: [
|
|
461
|
-
/* @__PURE__ */ t(
|
|
461
|
+
/* @__PURE__ */ t(Ci, { className: "h-3.5 w-3.5" }),
|
|
462
462
|
"Save Copy as Linked Visual"
|
|
463
463
|
]
|
|
464
464
|
}
|
|
@@ -470,7 +470,7 @@ function Ac(e = {}) {
|
|
|
470
470
|
] }),
|
|
471
471
|
/* @__PURE__ */ t(Pr, {}),
|
|
472
472
|
/* @__PURE__ */ t(
|
|
473
|
-
|
|
473
|
+
Mi,
|
|
474
474
|
{
|
|
475
475
|
open: L,
|
|
476
476
|
onOpenChange: (B) => {
|
|
@@ -485,11 +485,11 @@ function Ac(e = {}) {
|
|
|
485
485
|
)
|
|
486
486
|
] });
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = pa(), { config: o } =
|
|
488
|
+
function Dc({ className: e }) {
|
|
489
|
+
const n = ct((u) => u.isDevMode), r = H((u) => u.isVisualEditing), { setIsDevMode: a } = pa(), { config: o } = Di(go).tokenProps, i = (o == null ? void 0 : o.showAdvancedMode) !== !1;
|
|
490
490
|
if (!r || !i)
|
|
491
491
|
return null;
|
|
492
|
-
const l = n ? Tn :
|
|
492
|
+
const l = n ? Tn : bo, c = n ? "Drag & drop" : "SQL", d = n ? "Switch to drag-and-drop mode" : "Switch to SQL mode";
|
|
493
493
|
return /* @__PURE__ */ s(
|
|
494
494
|
"button",
|
|
495
495
|
{
|
|
@@ -508,7 +508,7 @@ function Ic({ className: e }) {
|
|
|
508
508
|
}
|
|
509
509
|
);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Tc({
|
|
512
512
|
open: e,
|
|
513
513
|
onOpenChange: n,
|
|
514
514
|
onSave: r,
|
|
@@ -548,15 +548,15 @@ function Dc({
|
|
|
548
548
|
] })
|
|
549
549
|
] }) });
|
|
550
550
|
}
|
|
551
|
-
const
|
|
552
|
-
function
|
|
551
|
+
const Oi = 1e4, Vi = 15e3, $i = 3e4, Ui = 3e4, _i = 12e4, Or = 2 * 60 * 60 * 1e3;
|
|
552
|
+
function ji(e) {
|
|
553
553
|
const n = Date.now() - e.getTime();
|
|
554
|
-
return n <
|
|
554
|
+
return n < Ui ? Oi : n < _i ? Vi : $i;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Lc() {
|
|
557
557
|
const { authToken: e, tokenProps: n } = Dt(), r = ot((h) => h.activeExports), [a, o] = S(
|
|
558
558
|
typeof document < "u" ? !document.hidden : !0
|
|
559
|
-
), i =
|
|
559
|
+
), i = Ee(null), l = Ee(!1), c = Ee(void 0), d = n == null ? void 0 : n.apiServiceUrl, u = e == null ? void 0 : e.accessToken, p = me(() => {
|
|
560
560
|
const h = ot.getState().activeExports;
|
|
561
561
|
return Array.from(h.values()).filter(
|
|
562
562
|
(b) => _n(b.status)
|
|
@@ -640,7 +640,7 @@ function Tc() {
|
|
|
640
640
|
const x = L.reduce(
|
|
641
641
|
(T, $) => $.startedAt < T ? $.startedAt : T,
|
|
642
642
|
L[0].startedAt
|
|
643
|
-
), C =
|
|
643
|
+
), C = ji(x);
|
|
644
644
|
i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
645
645
|
var T;
|
|
646
646
|
(T = c.current) == null || T.call(c);
|
|
@@ -667,13 +667,13 @@ function Tc() {
|
|
|
667
667
|
inProgressCount: p().length
|
|
668
668
|
};
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
const { authToken: e, tokenProps: n } = Dt(), r = ot((c) => c.activeExports), { addExport: a } = Ca(), o =
|
|
670
|
+
function Rc() {
|
|
671
|
+
const { authToken: e, tokenProps: n } = Dt(), r = ot((c) => c.activeExports), { addExport: a } = Ca(), o = Ee(!1), i = n == null ? void 0 : n.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
|
|
672
672
|
ce(() => {
|
|
673
673
|
if (o.current || !i || !l) return;
|
|
674
674
|
(async () => {
|
|
675
675
|
try {
|
|
676
|
-
const { exports: d } = await
|
|
676
|
+
const { exports: d } = await xo(i, l, {
|
|
677
677
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
678
678
|
limit: 20
|
|
679
679
|
// Limit to recent exports
|
|
@@ -695,7 +695,7 @@ function Lc() {
|
|
|
695
695
|
id: u.id,
|
|
696
696
|
status: u.status,
|
|
697
697
|
progress: p,
|
|
698
|
-
title:
|
|
698
|
+
title: zi(u),
|
|
699
699
|
totalRows: u.totalRows,
|
|
700
700
|
totalChunks: u.totalChunks,
|
|
701
701
|
completedChunks: u.completedChunks,
|
|
@@ -716,12 +716,12 @@ function Lc() {
|
|
|
716
716
|
})();
|
|
717
717
|
}, [i, l, a, r]);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function zi(e) {
|
|
720
720
|
return e.title ? e.title : _n(
|
|
721
721
|
e.status
|
|
722
722
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function Ki({
|
|
725
725
|
export: e,
|
|
726
726
|
onRemove: n
|
|
727
727
|
}) {
|
|
@@ -732,9 +732,9 @@ function zi({
|
|
|
732
732
|
}, o = () => {
|
|
733
733
|
switch (e.status) {
|
|
734
734
|
case "completed":
|
|
735
|
-
return /* @__PURE__ */ t(
|
|
735
|
+
return /* @__PURE__ */ t(wo, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
|
|
736
736
|
case "failed":
|
|
737
|
-
return /* @__PURE__ */ t(
|
|
737
|
+
return /* @__PURE__ */ t(ki, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
|
|
738
738
|
default:
|
|
739
739
|
return /* @__PURE__ */ t(ne, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
|
|
740
740
|
}
|
|
@@ -765,7 +765,7 @@ function zi({
|
|
|
765
765
|
] }),
|
|
766
766
|
e.fileSize && /* @__PURE__ */ s(ae, { children: [
|
|
767
767
|
/* @__PURE__ */ t("span", { children: "•" }),
|
|
768
|
-
/* @__PURE__ */ t("span", { children:
|
|
768
|
+
/* @__PURE__ */ t("span", { children: yo(e.fileSize) })
|
|
769
769
|
] })
|
|
770
770
|
] }),
|
|
771
771
|
i && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: l }),
|
|
@@ -795,14 +795,14 @@ function zi({
|
|
|
795
795
|
className: "h-8 bg-transparent",
|
|
796
796
|
onClick: r,
|
|
797
797
|
children: [
|
|
798
|
-
/* @__PURE__ */ t(
|
|
798
|
+
/* @__PURE__ */ t(vo, { className: "mr-1.5 h-3.5 w-3.5" }),
|
|
799
799
|
"Download"
|
|
800
800
|
]
|
|
801
801
|
}
|
|
802
802
|
)
|
|
803
803
|
] }),
|
|
804
804
|
i && /* @__PURE__ */ s("div", { children: [
|
|
805
|
-
/* @__PURE__ */ t(
|
|
805
|
+
/* @__PURE__ */ t(No, { value: e.progress, className: "h-1.5" }),
|
|
806
806
|
/* @__PURE__ */ s("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
|
|
807
807
|
e.progress,
|
|
808
808
|
"% complete"
|
|
@@ -812,7 +812,7 @@ function zi({
|
|
|
812
812
|
] })
|
|
813
813
|
] });
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Hi() {
|
|
816
816
|
const { authToken: e, tokenProps: n } = Dt(), r = ot((k) => k.activeExports), { clearCompleted: a, removeExport: o, updateExport: i } = Ca(), [l, c] = S(!1), [d, u] = S(!1), p = Array.from(r.values()).sort(
|
|
817
817
|
(k, N) => N.startedAt.getTime() - k.startedAt.getTime()
|
|
818
818
|
), f = p.some(
|
|
@@ -942,7 +942,7 @@ function Ki() {
|
|
|
942
942
|
] })
|
|
943
943
|
] }),
|
|
944
944
|
/* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: p.map((k) => /* @__PURE__ */ t(
|
|
945
|
-
|
|
945
|
+
Ki,
|
|
946
946
|
{
|
|
947
947
|
export: k,
|
|
948
948
|
onRemove: D
|
|
@@ -951,10 +951,10 @@ function Ki() {
|
|
|
951
951
|
)) }) })
|
|
952
952
|
] });
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function Fc({
|
|
955
955
|
variant: e
|
|
956
956
|
}) {
|
|
957
|
-
const n = ot((d) => d.activeExports), r =
|
|
957
|
+
const n = ot((d) => d.activeExports), r = Co(), a = n.size > 0, o = Array.from(n.values()).some(
|
|
958
958
|
(d) => d.status === "completed" || d.status === "failed"
|
|
959
959
|
), l = r > 0 ? r > 9 ? "9+" : String(r) : null;
|
|
960
960
|
return /* @__PURE__ */ s(Fe, { children: [
|
|
@@ -966,7 +966,7 @@ function Rc({
|
|
|
966
966
|
className: "relative w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
967
967
|
"aria-label": "Export notifications",
|
|
968
968
|
children: [
|
|
969
|
-
/* @__PURE__ */ t(
|
|
969
|
+
/* @__PURE__ */ t(ko, { className: "h-3.5 w-3.5" }),
|
|
970
970
|
a && /* @__PURE__ */ t(
|
|
971
971
|
"span",
|
|
972
972
|
{
|
|
@@ -977,10 +977,10 @@ function Rc({
|
|
|
977
977
|
]
|
|
978
978
|
}
|
|
979
979
|
) }),
|
|
980
|
-
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(
|
|
980
|
+
/* @__PURE__ */ t(Xe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(Hi, {}) })
|
|
981
981
|
] });
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function qi(e) {
|
|
984
984
|
if (e)
|
|
985
985
|
return {
|
|
986
986
|
renamed: e.type === "rename" ? { oldId: e.oldId, newId: e.newId } : void 0,
|
|
@@ -989,7 +989,7 @@ function Hi(e) {
|
|
|
989
989
|
affectedBindingControlIds: e.type === "add" || e.type === "update" ? e.affectedBindingControlIds : void 0
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Wi({
|
|
993
993
|
open: e,
|
|
994
994
|
onOpenChange: n,
|
|
995
995
|
trigger: r,
|
|
@@ -1003,7 +1003,7 @@ function qi({
|
|
|
1003
1003
|
preventPassiveDismissDuringCreate: u,
|
|
1004
1004
|
resolvedOpen: p,
|
|
1005
1005
|
setIsCreateFlowActive: f
|
|
1006
|
-
} =
|
|
1006
|
+
} = Va({
|
|
1007
1007
|
open: e,
|
|
1008
1008
|
onOpenChange: n,
|
|
1009
1009
|
initialCreateFlowActive: o === "create",
|
|
@@ -1014,16 +1014,16 @@ function qi({
|
|
|
1014
1014
|
// create and make consumers use `forceClose()` from a dedicated
|
|
1015
1015
|
// button.
|
|
1016
1016
|
dismissMode: a ? "passive" : "explicit-only"
|
|
1017
|
-
}), h = H((
|
|
1017
|
+
}), h = H((E) => E.dashboard), { setDashboardControlsModel: b } = bt(), { participants: D } = So(ao(h)), k = Array.from(
|
|
1018
1018
|
new Map(
|
|
1019
1019
|
D.flatMap(
|
|
1020
|
-
(
|
|
1020
|
+
(E) => E.fieldChoices.map((P) => {
|
|
1021
1021
|
var z;
|
|
1022
1022
|
return [
|
|
1023
1023
|
P.value,
|
|
1024
1024
|
{
|
|
1025
1025
|
option: P,
|
|
1026
|
-
target: (z =
|
|
1026
|
+
target: (z = E.fieldTargetMap) == null ? void 0 : z[P.value]
|
|
1027
1027
|
}
|
|
1028
1028
|
];
|
|
1029
1029
|
})
|
|
@@ -1032,26 +1032,26 @@ function qi({
|
|
|
1032
1032
|
), N = Array.from(
|
|
1033
1033
|
new Map(
|
|
1034
1034
|
D.flatMap(
|
|
1035
|
-
(
|
|
1035
|
+
(E) => E.metricChoices.map((P) => {
|
|
1036
1036
|
var z;
|
|
1037
1037
|
return [
|
|
1038
1038
|
P.value,
|
|
1039
1039
|
{
|
|
1040
1040
|
option: P,
|
|
1041
|
-
target: (z =
|
|
1041
|
+
target: (z = E.metricTargetMap) == null ? void 0 : z[P.value]
|
|
1042
1042
|
}
|
|
1043
1043
|
];
|
|
1044
1044
|
})
|
|
1045
1045
|
)
|
|
1046
1046
|
).values()
|
|
1047
|
-
), g =
|
|
1047
|
+
), g = so({
|
|
1048
1048
|
...h || {},
|
|
1049
1049
|
controls: []
|
|
1050
|
-
}), L = Ao(h), x = (
|
|
1050
|
+
}), L = Ao(h), x = (E, P, z) => {
|
|
1051
1051
|
b(
|
|
1052
|
-
|
|
1052
|
+
E,
|
|
1053
1053
|
P,
|
|
1054
|
-
|
|
1054
|
+
qi(z)
|
|
1055
1055
|
);
|
|
1056
1056
|
}, C = me(() => {
|
|
1057
1057
|
if (i) {
|
|
@@ -1060,13 +1060,13 @@ function qi({
|
|
|
1060
1060
|
}
|
|
1061
1061
|
f(!1);
|
|
1062
1062
|
}, [i, l, f]), T = /* @__PURE__ */ t(
|
|
1063
|
-
|
|
1063
|
+
$a,
|
|
1064
1064
|
{
|
|
1065
1065
|
scope: "dashboard",
|
|
1066
1066
|
controls: h.controls || [],
|
|
1067
1067
|
reservedControlIds: g,
|
|
1068
1068
|
defaultValues: h.defaultControlValues || {},
|
|
1069
|
-
usageByControlId:
|
|
1069
|
+
usageByControlId: Eo(h),
|
|
1070
1070
|
availableFieldChoices: k,
|
|
1071
1071
|
availableMetricChoices: N,
|
|
1072
1072
|
structuralParticipants: D,
|
|
@@ -1127,7 +1127,7 @@ function qi({
|
|
|
1127
1127
|
}
|
|
1128
1128
|
) });
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const Gi = [
|
|
1131
1131
|
"enum",
|
|
1132
1132
|
"multi_enum",
|
|
1133
1133
|
"text",
|
|
@@ -1135,7 +1135,7 @@ const Wi = [
|
|
|
1135
1135
|
"boolean",
|
|
1136
1136
|
"date"
|
|
1137
1137
|
];
|
|
1138
|
-
function
|
|
1138
|
+
function Ji({
|
|
1139
1139
|
open: e,
|
|
1140
1140
|
onOpenChange: n,
|
|
1141
1141
|
initialMode: r = "manage"
|
|
@@ -1148,29 +1148,29 @@ function Gi({
|
|
|
1148
1148
|
preventPassiveDismissDuringCreate: c,
|
|
1149
1149
|
resolvedOpen: d,
|
|
1150
1150
|
setIsCreateFlowActive: u
|
|
1151
|
-
} =
|
|
1151
|
+
} = Va({
|
|
1152
1152
|
open: e,
|
|
1153
1153
|
onOpenChange: n,
|
|
1154
1154
|
initialCreateFlowActive: r === "create",
|
|
1155
1155
|
dismissMode: "explicit-only"
|
|
1156
|
-
}), p = H((
|
|
1157
|
-
(
|
|
1156
|
+
}), p = H((E) => E.dashboard), f = H((E) => E.selectedSheetId), { setDashboardInputs: h } = bt(), b = (R = p.sheets) == null ? void 0 : R.find(
|
|
1157
|
+
(E) => E.id === f
|
|
1158
1158
|
), D = (b == null ? void 0 : b.kind) === "document" && !!b.document, k = V(
|
|
1159
|
-
() => D && (b != null && b.document) ?
|
|
1159
|
+
() => D && (b != null && b.document) ? Io(p, b.id) : [],
|
|
1160
1160
|
[p, D, b == null ? void 0 : b.document, b == null ? void 0 : b.id]
|
|
1161
1161
|
), N = V(
|
|
1162
1162
|
() => k.filter(
|
|
1163
|
-
(
|
|
1163
|
+
(E) => E.kind === "control"
|
|
1164
1164
|
),
|
|
1165
1165
|
[k]
|
|
1166
1166
|
), g = V(
|
|
1167
|
-
() => N.map((
|
|
1167
|
+
() => N.map((E) => E.control),
|
|
1168
1168
|
[N]
|
|
1169
1169
|
), L = V(
|
|
1170
|
-
() =>
|
|
1170
|
+
() => Yi(g),
|
|
1171
1171
|
[g]
|
|
1172
1172
|
), x = V(
|
|
1173
|
-
() =>
|
|
1173
|
+
() => Qi(p),
|
|
1174
1174
|
[p]
|
|
1175
1175
|
), C = me(() => {
|
|
1176
1176
|
if (a) {
|
|
@@ -1179,13 +1179,13 @@ function Gi({
|
|
|
1179
1179
|
}
|
|
1180
1180
|
u(!1);
|
|
1181
1181
|
}, [a, o, u]), T = me(
|
|
1182
|
-
(
|
|
1182
|
+
(E, P, z) => {
|
|
1183
1183
|
!D || !(b != null && b.document) || h(
|
|
1184
|
-
|
|
1184
|
+
Xi({
|
|
1185
1185
|
allInputs: p.inputs || [],
|
|
1186
1186
|
documentSheetId: b.id,
|
|
1187
1187
|
currentDocumentInputs: k,
|
|
1188
|
-
nextControls:
|
|
1188
|
+
nextControls: E,
|
|
1189
1189
|
nextDefaultValues: P,
|
|
1190
1190
|
change: z
|
|
1191
1191
|
})
|
|
@@ -1217,7 +1217,7 @@ function Gi({
|
|
|
1217
1217
|
)
|
|
1218
1218
|
] }),
|
|
1219
1219
|
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ t(
|
|
1220
|
-
|
|
1220
|
+
$a,
|
|
1221
1221
|
{
|
|
1222
1222
|
scope: "dashboard",
|
|
1223
1223
|
controls: g,
|
|
@@ -1228,7 +1228,7 @@ function Gi({
|
|
|
1228
1228
|
availableMetricChoices: [],
|
|
1229
1229
|
structuralParticipants: [],
|
|
1230
1230
|
structuralParticipantIdsByControlId: {},
|
|
1231
|
-
allowedControlTypes:
|
|
1231
|
+
allowedControlTypes: Gi,
|
|
1232
1232
|
initialCreateFlow: r === "create",
|
|
1233
1233
|
onCreateFlowActiveChange: u,
|
|
1234
1234
|
onCreateFlowComplete: C,
|
|
@@ -1240,22 +1240,22 @@ function Gi({
|
|
|
1240
1240
|
}
|
|
1241
1241
|
) });
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Qi(e) {
|
|
1244
1244
|
return (e.controls || []).map((n) => n.id);
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Yi(e) {
|
|
1247
1247
|
const n = {};
|
|
1248
1248
|
for (const r of e)
|
|
1249
1249
|
r.defaultValue !== void 0 && (n[r.id] = r.defaultValue);
|
|
1250
1250
|
return n;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Zi(e, n) {
|
|
1253
1253
|
return n ? Object.prototype.hasOwnProperty.call(n, e.id) ? {
|
|
1254
1254
|
...e,
|
|
1255
1255
|
defaultValue: n[e.id]
|
|
1256
1256
|
} : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 } : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 };
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function Xi({
|
|
1259
1259
|
allInputs: e,
|
|
1260
1260
|
documentSheetId: n,
|
|
1261
1261
|
currentDocumentInputs: r,
|
|
@@ -1266,7 +1266,7 @@ function Zi({
|
|
|
1266
1266
|
const l = new Map(
|
|
1267
1267
|
a.map((h) => [
|
|
1268
1268
|
h.id,
|
|
1269
|
-
|
|
1269
|
+
Zi(h, o)
|
|
1270
1270
|
])
|
|
1271
1271
|
), c = (i == null ? void 0 : i.type) === "rename" ? { oldId: i.oldId, newId: i.newId } : null, d = /* @__PURE__ */ new Set(), u = [];
|
|
1272
1272
|
for (const h of r) {
|
|
@@ -1278,7 +1278,7 @@ function Zi({
|
|
|
1278
1278
|
if (!b)
|
|
1279
1279
|
continue;
|
|
1280
1280
|
d.add(b.id);
|
|
1281
|
-
const D =
|
|
1281
|
+
const D = Do(
|
|
1282
1282
|
b.id,
|
|
1283
1283
|
[...e, ...u].filter(
|
|
1284
1284
|
(N) => N.id !== h.id
|
|
@@ -1294,7 +1294,7 @@ function Zi({
|
|
|
1294
1294
|
}
|
|
1295
1295
|
for (const h of l.values())
|
|
1296
1296
|
d.has(h.id) || u.push(
|
|
1297
|
-
|
|
1297
|
+
To({
|
|
1298
1298
|
control: h,
|
|
1299
1299
|
existingInputs: [...e, ...u],
|
|
1300
1300
|
sheetId: n
|
|
@@ -1307,7 +1307,7 @@ function Zi({
|
|
|
1307
1307
|
(h) => !p.has(h.id)
|
|
1308
1308
|
), ...u];
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function el({
|
|
1311
1311
|
showFilters: e,
|
|
1312
1312
|
onShowFiltersChange: n,
|
|
1313
1313
|
pickerContent: r,
|
|
@@ -1319,7 +1319,7 @@ function Xi({
|
|
|
1319
1319
|
pickerContentClassName: d,
|
|
1320
1320
|
settingsContentClassName: u
|
|
1321
1321
|
}) {
|
|
1322
|
-
const p = o === "toolbar", [f, h] = S(!1), b =
|
|
1322
|
+
const p = o === "toolbar", [f, h] = S(!1), b = Lo("interactive");
|
|
1323
1323
|
return /* @__PURE__ */ s(
|
|
1324
1324
|
"div",
|
|
1325
1325
|
{
|
|
@@ -1343,7 +1343,7 @@ function Xi({
|
|
|
1343
1343
|
l
|
|
1344
1344
|
),
|
|
1345
1345
|
children: [
|
|
1346
|
-
e ? /* @__PURE__ */ t(
|
|
1346
|
+
e ? /* @__PURE__ */ t(Li, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" }),
|
|
1347
1347
|
"Filter"
|
|
1348
1348
|
]
|
|
1349
1349
|
}
|
|
@@ -1394,8 +1394,8 @@ function Xi({
|
|
|
1394
1394
|
}
|
|
1395
1395
|
);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1397
|
+
function tl() {
|
|
1398
|
+
Si();
|
|
1399
1399
|
const e = H((d) => d.selectedSheetId), n = H((d) => d.selectedFrameId), r = H((d) => d.dashboard), a = H((d) => d.actions.getSelectedFrame), { setSelectedFrameId: o } = bt(), { setCard: i } = pa(), l = ct((d) => d.card.dataSource);
|
|
1400
1400
|
return ce(() => {
|
|
1401
1401
|
var u, p;
|
|
@@ -1412,36 +1412,30 @@ function el() {
|
|
|
1412
1412
|
hasEntities: !!(l != null && l.selectedEntities && l.selectedEntities.length > 0)
|
|
1413
1413
|
};
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1416
|
-
const e = H((
|
|
1417
|
-
(
|
|
1418
|
-
), r = H((
|
|
1415
|
+
function nl() {
|
|
1416
|
+
const e = H((d) => d.dashboard), n = H(
|
|
1417
|
+
(d) => d.semanticExecutionPayload
|
|
1418
|
+
), r = H((d) => d.actions.addFilter), { hasEntities: a } = tl(), { isLoading: o } = Ro(), i = V(
|
|
1419
1419
|
() => Fo(e, n),
|
|
1420
1420
|
[e, n]
|
|
1421
|
-
),
|
|
1421
|
+
), c = !Po(e.filters) && i.hasEligibleCards && !o;
|
|
1422
1422
|
return /* @__PURE__ */ s("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
"
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
"
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range, applied across every date-aware card on the dashboard." })
|
|
1440
|
-
] })
|
|
1441
|
-
]
|
|
1442
|
-
}
|
|
1443
|
-
)
|
|
1444
|
-
] }),
|
|
1423
|
+
c && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ s(
|
|
1424
|
+
"button",
|
|
1425
|
+
{
|
|
1426
|
+
type: "button",
|
|
1427
|
+
onClick: () => r(Bo()),
|
|
1428
|
+
title: `Applies to ${i.eligibleCardCount} of ${i.totalCardCount} date-aware cards`,
|
|
1429
|
+
className: "flex w-full items-start gap-2 rounded-[4px] px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
1430
|
+
children: [
|
|
1431
|
+
/* @__PURE__ */ t(Mo, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1432
|
+
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
|
|
1433
|
+
/* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
1434
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
1435
|
+
] })
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1438
|
+
) }),
|
|
1445
1439
|
!a && /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
1446
1440
|
/* @__PURE__ */ t(gt, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
1447
1441
|
/* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
@@ -1451,7 +1445,7 @@ function tl() {
|
|
|
1451
1445
|
] });
|
|
1452
1446
|
}
|
|
1453
1447
|
const Vr = !1;
|
|
1454
|
-
function
|
|
1448
|
+
function rl({
|
|
1455
1449
|
onAddFilter: e,
|
|
1456
1450
|
onAddControl: n,
|
|
1457
1451
|
onManageControls: r,
|
|
@@ -1487,7 +1481,7 @@ function nl({
|
|
|
1487
1481
|
/* @__PURE__ */ t(
|
|
1488
1482
|
un,
|
|
1489
1483
|
{
|
|
1490
|
-
icon:
|
|
1484
|
+
icon: Sa,
|
|
1491
1485
|
label: "Manage controls",
|
|
1492
1486
|
onClick: () => {
|
|
1493
1487
|
r(), a();
|
|
@@ -1500,7 +1494,7 @@ function nl({
|
|
|
1500
1494
|
/* @__PURE__ */ t("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
1501
1495
|
Vr,
|
|
1502
1496
|
/* @__PURE__ */ t(
|
|
1503
|
-
|
|
1497
|
+
al,
|
|
1504
1498
|
{
|
|
1505
1499
|
id: "filter-display-wrap",
|
|
1506
1500
|
label: "Wrap to multiple lines",
|
|
@@ -1530,7 +1524,7 @@ function un({
|
|
|
1530
1524
|
}
|
|
1531
1525
|
);
|
|
1532
1526
|
}
|
|
1533
|
-
function
|
|
1527
|
+
function al({
|
|
1534
1528
|
id: e,
|
|
1535
1529
|
label: n,
|
|
1536
1530
|
checked: r,
|
|
@@ -1548,7 +1542,7 @@ function rl({
|
|
|
1548
1542
|
)
|
|
1549
1543
|
] });
|
|
1550
1544
|
}
|
|
1551
|
-
function
|
|
1545
|
+
function Pc({
|
|
1552
1546
|
size: e,
|
|
1553
1547
|
className: n,
|
|
1554
1548
|
primaryButtonClassName: r,
|
|
@@ -1587,13 +1581,13 @@ function Fc({
|
|
|
1587
1581
|
}, [g]);
|
|
1588
1582
|
return /* @__PURE__ */ s(ae, { children: [
|
|
1589
1583
|
/* @__PURE__ */ t(
|
|
1590
|
-
|
|
1584
|
+
el,
|
|
1591
1585
|
{
|
|
1592
1586
|
showFilters: N ? !1 : p,
|
|
1593
1587
|
onShowFiltersChange: L,
|
|
1594
|
-
pickerContent: /* @__PURE__ */ t(
|
|
1588
|
+
pickerContent: /* @__PURE__ */ t(nl, {}),
|
|
1595
1589
|
settingsContent: (R) => /* @__PURE__ */ t(
|
|
1596
|
-
|
|
1590
|
+
rl,
|
|
1597
1591
|
{
|
|
1598
1592
|
onAddFilter: x,
|
|
1599
1593
|
onAddControl: C,
|
|
@@ -1610,7 +1604,7 @@ function Fc({
|
|
|
1610
1604
|
}
|
|
1611
1605
|
),
|
|
1612
1606
|
l ? N ? /* @__PURE__ */ t(
|
|
1613
|
-
|
|
1607
|
+
Ji,
|
|
1614
1608
|
{
|
|
1615
1609
|
open: !0,
|
|
1616
1610
|
onOpenChange: (R) => {
|
|
@@ -1619,7 +1613,7 @@ function Fc({
|
|
|
1619
1613
|
initialMode: l
|
|
1620
1614
|
}
|
|
1621
1615
|
) : /* @__PURE__ */ t(
|
|
1622
|
-
|
|
1616
|
+
Wi,
|
|
1623
1617
|
{
|
|
1624
1618
|
open: !0,
|
|
1625
1619
|
onOpenChange: (R) => {
|
|
@@ -1636,7 +1630,7 @@ class Kn extends Error {
|
|
|
1636
1630
|
super(n), this.status = r, this.details = a, this.name = "BriefingsApiError";
|
|
1637
1631
|
}
|
|
1638
1632
|
}
|
|
1639
|
-
function
|
|
1633
|
+
function Ka(e, n) {
|
|
1640
1634
|
return `${e.replace(/\/$/, "")}${n}`;
|
|
1641
1635
|
}
|
|
1642
1636
|
function fe(e) {
|
|
@@ -1650,20 +1644,20 @@ function Ht(e) {
|
|
|
1650
1644
|
const r = n.toString();
|
|
1651
1645
|
return r ? `?${r}` : "";
|
|
1652
1646
|
}
|
|
1653
|
-
async function
|
|
1647
|
+
async function sl(e) {
|
|
1654
1648
|
if ((e.headers.get("content-type") ?? "").includes("application/json"))
|
|
1655
1649
|
return e.json().catch(() => ({}));
|
|
1656
1650
|
const r = await e.text().catch(() => "");
|
|
1657
1651
|
return r ? { error: r } : {};
|
|
1658
1652
|
}
|
|
1659
|
-
function
|
|
1653
|
+
function Ha(e) {
|
|
1660
1654
|
if (!e || typeof e != "object")
|
|
1661
1655
|
return null;
|
|
1662
1656
|
const n = e;
|
|
1663
1657
|
return typeof n.error == "string" ? n.error : null;
|
|
1664
1658
|
}
|
|
1665
1659
|
async function ge(e, n, r, a) {
|
|
1666
|
-
const o = await fetch(
|
|
1660
|
+
const o = await fetch(Ka(e, r), {
|
|
1667
1661
|
cache: (a == null ? void 0 : a.cache) ?? "no-store",
|
|
1668
1662
|
...a,
|
|
1669
1663
|
headers: {
|
|
@@ -1674,22 +1668,22 @@ async function ge(e, n, r, a) {
|
|
|
1674
1668
|
}), i = await o.json().catch(() => ({}));
|
|
1675
1669
|
if (!o.ok)
|
|
1676
1670
|
throw new Kn(
|
|
1677
|
-
|
|
1671
|
+
Ha(i) || "Briefings API request failed",
|
|
1678
1672
|
o.status,
|
|
1679
1673
|
i
|
|
1680
1674
|
);
|
|
1681
1675
|
return i;
|
|
1682
1676
|
}
|
|
1683
|
-
async function
|
|
1684
|
-
const o = await fetch(
|
|
1677
|
+
async function qa(e, n, r, a) {
|
|
1678
|
+
const o = await fetch(Ka(e, r), {
|
|
1685
1679
|
headers: {
|
|
1686
1680
|
Authorization: `Bearer ${n}`
|
|
1687
1681
|
}
|
|
1688
1682
|
});
|
|
1689
1683
|
if (!o.ok) {
|
|
1690
|
-
const i = await
|
|
1684
|
+
const i = await sl(o);
|
|
1691
1685
|
throw new Kn(
|
|
1692
|
-
|
|
1686
|
+
Ha(i) || "Briefing artifact request failed",
|
|
1693
1687
|
o.status,
|
|
1694
1688
|
i
|
|
1695
1689
|
);
|
|
@@ -1698,16 +1692,16 @@ async function Wa(e, n, r, a) {
|
|
|
1698
1692
|
kind: a,
|
|
1699
1693
|
content: await o.text(),
|
|
1700
1694
|
contentType: o.headers.get("content-type") ?? "text/plain",
|
|
1701
|
-
filename:
|
|
1695
|
+
filename: ol(o.headers.get("content-disposition"))
|
|
1702
1696
|
};
|
|
1703
1697
|
}
|
|
1704
|
-
function
|
|
1698
|
+
function ol(e) {
|
|
1705
1699
|
if (!e)
|
|
1706
1700
|
return;
|
|
1707
1701
|
const n = /filename="([^"]+)"/.exec(e);
|
|
1708
1702
|
return n == null ? void 0 : n[1];
|
|
1709
1703
|
}
|
|
1710
|
-
async function
|
|
1704
|
+
async function il(e, n, r) {
|
|
1711
1705
|
return ge(
|
|
1712
1706
|
e,
|
|
1713
1707
|
n,
|
|
@@ -1722,7 +1716,7 @@ async function ol(e, n, r) {
|
|
|
1722
1716
|
})}`
|
|
1723
1717
|
);
|
|
1724
1718
|
}
|
|
1725
|
-
async function
|
|
1719
|
+
async function Mc(e, n, r) {
|
|
1726
1720
|
return ge(
|
|
1727
1721
|
e,
|
|
1728
1722
|
n,
|
|
@@ -1731,14 +1725,14 @@ async function Pc(e, n, r) {
|
|
|
1731
1725
|
})}`
|
|
1732
1726
|
);
|
|
1733
1727
|
}
|
|
1734
|
-
async function
|
|
1728
|
+
async function Wa(e, n, r) {
|
|
1735
1729
|
return ge(
|
|
1736
1730
|
e,
|
|
1737
1731
|
n,
|
|
1738
1732
|
`/v1/briefings/${fe(r)}`
|
|
1739
1733
|
);
|
|
1740
1734
|
}
|
|
1741
|
-
async function
|
|
1735
|
+
async function ll(e, n, r) {
|
|
1742
1736
|
return ge(e, n, "/v1/briefings", {
|
|
1743
1737
|
method: "POST",
|
|
1744
1738
|
body: JSON.stringify(r)
|
|
@@ -1750,43 +1744,43 @@ async function Hn(e, n, r, a) {
|
|
|
1750
1744
|
body: JSON.stringify(a)
|
|
1751
1745
|
});
|
|
1752
1746
|
}
|
|
1753
|
-
async function
|
|
1747
|
+
async function Ga(e, n, r) {
|
|
1754
1748
|
return Hn(e, n, r, { status: "PAUSED" });
|
|
1755
1749
|
}
|
|
1756
|
-
async function
|
|
1750
|
+
async function Ja(e, n, r) {
|
|
1757
1751
|
return Hn(e, n, r, { status: "ACTIVE" });
|
|
1758
1752
|
}
|
|
1759
|
-
async function
|
|
1753
|
+
async function Qa(e, n, r) {
|
|
1760
1754
|
return ge(e, n, `/v1/briefings/${fe(r)}`, {
|
|
1761
1755
|
method: "DELETE"
|
|
1762
1756
|
});
|
|
1763
1757
|
}
|
|
1764
|
-
async function
|
|
1758
|
+
async function Ya(e, n, r, a) {
|
|
1765
1759
|
return ge(e, n, `/v1/briefings/${fe(r)}/runs`, {
|
|
1766
1760
|
method: "POST",
|
|
1767
1761
|
body: JSON.stringify(a)
|
|
1768
1762
|
});
|
|
1769
1763
|
}
|
|
1770
|
-
async function
|
|
1764
|
+
async function dl(e, n, r) {
|
|
1771
1765
|
return ge(e, n, "/v1/briefings/preview-plan", {
|
|
1772
1766
|
method: "POST",
|
|
1773
1767
|
body: JSON.stringify({ draft: r })
|
|
1774
1768
|
});
|
|
1775
1769
|
}
|
|
1776
|
-
async function
|
|
1770
|
+
async function cl(e, n, r) {
|
|
1777
1771
|
return ge(e, n, "/v1/briefings/preview-runs", {
|
|
1778
1772
|
method: "POST",
|
|
1779
1773
|
body: JSON.stringify(r)
|
|
1780
1774
|
});
|
|
1781
1775
|
}
|
|
1782
|
-
async function
|
|
1776
|
+
async function ul(e, n, r) {
|
|
1783
1777
|
return (await ge(
|
|
1784
1778
|
e,
|
|
1785
1779
|
n,
|
|
1786
1780
|
`/v1/briefings/preview-runs/${fe(r)}`
|
|
1787
1781
|
)).previewRun;
|
|
1788
1782
|
}
|
|
1789
|
-
async function
|
|
1783
|
+
async function Bc(e, n, r, a) {
|
|
1790
1784
|
return ge(
|
|
1791
1785
|
e,
|
|
1792
1786
|
n,
|
|
@@ -1797,14 +1791,14 @@ async function Mc(e, n, r, a) {
|
|
|
1797
1791
|
})}`
|
|
1798
1792
|
);
|
|
1799
1793
|
}
|
|
1800
|
-
async function
|
|
1794
|
+
async function Za(e, n, r, a) {
|
|
1801
1795
|
return (await ge(
|
|
1802
1796
|
e,
|
|
1803
1797
|
n,
|
|
1804
1798
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}`
|
|
1805
1799
|
)).run;
|
|
1806
1800
|
}
|
|
1807
|
-
async function
|
|
1801
|
+
async function ml(e, n, r, a) {
|
|
1808
1802
|
return ge(
|
|
1809
1803
|
e,
|
|
1810
1804
|
n,
|
|
@@ -1815,7 +1809,7 @@ async function ul(e, n, r, a) {
|
|
|
1815
1809
|
}
|
|
1816
1810
|
);
|
|
1817
1811
|
}
|
|
1818
|
-
async function
|
|
1812
|
+
async function hl(e, n, r, a) {
|
|
1819
1813
|
return ge(
|
|
1820
1814
|
e,
|
|
1821
1815
|
n,
|
|
@@ -1825,23 +1819,23 @@ async function ml(e, n, r, a) {
|
|
|
1825
1819
|
}
|
|
1826
1820
|
);
|
|
1827
1821
|
}
|
|
1828
|
-
async function
|
|
1829
|
-
return
|
|
1822
|
+
async function Oc(e, n, r, a, o) {
|
|
1823
|
+
return qa(
|
|
1830
1824
|
e,
|
|
1831
1825
|
n,
|
|
1832
1826
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}/artifact${Ht({ kind: o })}`,
|
|
1833
1827
|
o
|
|
1834
1828
|
);
|
|
1835
1829
|
}
|
|
1836
|
-
async function
|
|
1837
|
-
return
|
|
1830
|
+
async function Vc(e, n, r, a) {
|
|
1831
|
+
return qa(
|
|
1838
1832
|
e,
|
|
1839
1833
|
n,
|
|
1840
1834
|
`/v1/briefings/${fe(r)}/runs/${fe(a)}/evidence`,
|
|
1841
1835
|
"evidence"
|
|
1842
1836
|
);
|
|
1843
1837
|
}
|
|
1844
|
-
async function
|
|
1838
|
+
async function pl(e, n, r) {
|
|
1845
1839
|
var o;
|
|
1846
1840
|
const a = await ge(e, n, "/v1/ai/generate", {
|
|
1847
1841
|
method: "POST",
|
|
@@ -1858,12 +1852,12 @@ async function hl(e, n, r) {
|
|
|
1858
1852
|
);
|
|
1859
1853
|
return a.result.polished;
|
|
1860
1854
|
}
|
|
1861
|
-
const
|
|
1855
|
+
const fl = {
|
|
1862
1856
|
pageSize: "letter",
|
|
1863
1857
|
orientation: "portrait",
|
|
1864
1858
|
includeFilters: !0,
|
|
1865
1859
|
includeTimestamp: !0
|
|
1866
|
-
},
|
|
1860
|
+
}, gl = {
|
|
1867
1861
|
delimiter: ",",
|
|
1868
1862
|
includeHeaders: !0,
|
|
1869
1863
|
useFormattedValues: !0
|
|
@@ -1901,7 +1895,7 @@ function qn(e) {
|
|
|
1901
1895
|
return "Dashboard card";
|
|
1902
1896
|
}
|
|
1903
1897
|
}
|
|
1904
|
-
function
|
|
1898
|
+
function bl(e) {
|
|
1905
1899
|
var n;
|
|
1906
1900
|
switch (e.type) {
|
|
1907
1901
|
case "dashboard":
|
|
@@ -1916,7 +1910,7 @@ function gl(e) {
|
|
|
1916
1910
|
return e.format === "csv" ? "Card data CSV" : "Card render";
|
|
1917
1911
|
}
|
|
1918
1912
|
}
|
|
1919
|
-
function
|
|
1913
|
+
function Xa(e) {
|
|
1920
1914
|
var n;
|
|
1921
1915
|
switch (e.type) {
|
|
1922
1916
|
case "dashboard":
|
|
@@ -1927,18 +1921,18 @@ function es(e) {
|
|
|
1927
1921
|
return ["pdf", "png"];
|
|
1928
1922
|
case "card": {
|
|
1929
1923
|
const r = (n = e.settings) == null ? void 0 : n.cardType;
|
|
1930
|
-
return
|
|
1924
|
+
return rs(r);
|
|
1931
1925
|
}
|
|
1932
1926
|
}
|
|
1933
1927
|
}
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1928
|
+
function xl(e, n) {
|
|
1929
|
+
return Xa(e).includes(n) ? {
|
|
1936
1930
|
...Pe(e),
|
|
1937
1931
|
format: n,
|
|
1938
|
-
settings:
|
|
1932
|
+
settings: ns(e.settings, n)
|
|
1939
1933
|
} : Pe(e);
|
|
1940
1934
|
}
|
|
1941
|
-
function
|
|
1935
|
+
function yl(e, n) {
|
|
1942
1936
|
const r = {
|
|
1943
1937
|
...e.settings,
|
|
1944
1938
|
...n
|
|
@@ -1948,7 +1942,7 @@ function xl(e, n) {
|
|
|
1948
1942
|
settings: r
|
|
1949
1943
|
};
|
|
1950
1944
|
}
|
|
1951
|
-
function
|
|
1945
|
+
function es(e) {
|
|
1952
1946
|
var l, c;
|
|
1953
1947
|
if (e.source.type !== "dashboard")
|
|
1954
1948
|
return [];
|
|
@@ -1988,10 +1982,10 @@ function ts(e) {
|
|
|
1988
1982
|
defaultFormat: "pdf"
|
|
1989
1983
|
});
|
|
1990
1984
|
if (i)
|
|
1991
|
-
for (const d of
|
|
1985
|
+
for (const d of as(i)) {
|
|
1992
1986
|
if (d.card.type === "text")
|
|
1993
1987
|
continue;
|
|
1994
|
-
const u =
|
|
1988
|
+
const u = rs(d.card.type);
|
|
1995
1989
|
a.push({
|
|
1996
1990
|
key: `card:${n}:${d.card.id}`,
|
|
1997
1991
|
kind: "card",
|
|
@@ -2011,8 +2005,8 @@ function ts(e) {
|
|
|
2011
2005
|
}
|
|
2012
2006
|
return a;
|
|
2013
2007
|
}
|
|
2014
|
-
function
|
|
2015
|
-
const { option: n } = e, r = e.format ?? n.defaultFormat, a =
|
|
2008
|
+
function An(e) {
|
|
2009
|
+
const { option: n } = e, r = e.format ?? n.defaultFormat, a = vl({
|
|
2016
2010
|
option: n,
|
|
2017
2011
|
format: r,
|
|
2018
2012
|
runtime: e.runtime
|
|
@@ -2056,21 +2050,21 @@ function En(e) {
|
|
|
2056
2050
|
}
|
|
2057
2051
|
}
|
|
2058
2052
|
function Ur(e) {
|
|
2059
|
-
const n =
|
|
2060
|
-
return o ? [
|
|
2053
|
+
const n = es(e), r = n.find((i) => i.kind === "dashboard_sheet"), o = n.find((i) => i.kind === "dashboard") ?? r;
|
|
2054
|
+
return o ? [An({ option: o, runtime: e.runtime })] : [];
|
|
2061
2055
|
}
|
|
2062
|
-
function
|
|
2056
|
+
function vl(e) {
|
|
2063
2057
|
const n = {
|
|
2064
|
-
...
|
|
2058
|
+
...ns(void 0, e.format)
|
|
2065
2059
|
}, r = e.runtime;
|
|
2066
|
-
return r != null && r.theme && (n.theme = r.theme), e.option.kind === "dashboard" && (n.sheetSelection = "all"), e.option.kind === "dashboard_sheet" && (n.sheetSelection = "current", n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "document_sheet" && (n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "card" && (n.selectedSheetId = e.option.sheetId, n.cardType = e.option.cardType, e.option.cardControlDefinitions && (n.cardControlDefinitions = te(e.option.cardControlDefinitions)), e.option.controlBindings && (n.controlBindings = te(e.option.controlBindings)), e.option.tablePreferences && (n.tablePreferences = te(e.option.tablePreferences))),
|
|
2060
|
+
return r != null && r.theme && (n.theme = r.theme), e.option.kind === "dashboard" && (n.sheetSelection = "all"), e.option.kind === "dashboard_sheet" && (n.sheetSelection = "current", n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "document_sheet" && (n.currentSheetId = e.option.sheetId, n.currentSheetName = e.option.title.replace(/\sPDF$/, "")), e.option.kind === "card" && (n.selectedSheetId = e.option.sheetId, n.cardType = e.option.cardType, e.option.cardControlDefinitions && (n.cardControlDefinitions = te(e.option.cardControlDefinitions)), e.option.controlBindings && (n.controlBindings = te(e.option.controlBindings)), e.option.tablePreferences && (n.tablePreferences = te(e.option.tablePreferences))), Nl({ settings: n, option: e.option, runtime: r }), n.includeFilters !== !1 && (n.filterLine = Al(n.filterValues)), n;
|
|
2067
2061
|
}
|
|
2068
|
-
function
|
|
2062
|
+
function Nl(e) {
|
|
2069
2063
|
const { settings: n, option: r, runtime: a } = e;
|
|
2070
2064
|
if (!a)
|
|
2071
2065
|
return;
|
|
2072
2066
|
if (r.kind === "card") {
|
|
2073
|
-
|
|
2067
|
+
wl({ settings: n, option: r, runtime: a });
|
|
2074
2068
|
return;
|
|
2075
2069
|
}
|
|
2076
2070
|
const o = r.kind === "dashboard" ? "all" : "current", i = r.kind === "dashboard" ? a.selectedSheetId : r.sheetId, l = _o({
|
|
@@ -2082,7 +2076,7 @@ function vl(e) {
|
|
|
2082
2076
|
cardControlValuesMap: a.cardControlValuesMap
|
|
2083
2077
|
});
|
|
2084
2078
|
n.sheetFilterValues = te(l.filterValues), n.filterValues = te(l.filterValues), n.controlValues = te(l.controlValues), a.controlDefinitions && (n.controlDefinitions = te(a.controlDefinitions));
|
|
2085
|
-
const c =
|
|
2079
|
+
const c = Cl({
|
|
2086
2080
|
option: r,
|
|
2087
2081
|
runtime: a,
|
|
2088
2082
|
selectedSheetId: r.kind === "dashboard" && o === "all" ? void 0 : i,
|
|
@@ -2092,7 +2086,7 @@ function vl(e) {
|
|
|
2092
2086
|
c
|
|
2093
2087
|
));
|
|
2094
2088
|
}
|
|
2095
|
-
function
|
|
2089
|
+
function wl(e) {
|
|
2096
2090
|
var u, p, f;
|
|
2097
2091
|
const { settings: n, option: r, runtime: a } = e, o = r.cardId, i = zo(
|
|
2098
2092
|
a.filters,
|
|
@@ -2131,7 +2125,7 @@ function Nl(e) {
|
|
|
2131
2125
|
...a.controlValues || {},
|
|
2132
2126
|
...((f = a.cardControlValuesMap) == null ? void 0 : f[o]) || {}
|
|
2133
2127
|
}, a.controlDefinitions && (n.controlDefinitions = te(a.controlDefinitions)));
|
|
2134
|
-
const d =
|
|
2128
|
+
const d = kl({
|
|
2135
2129
|
option: r,
|
|
2136
2130
|
runtime: a,
|
|
2137
2131
|
filterValues: n.filterValues,
|
|
@@ -2142,14 +2136,14 @@ function Nl(e) {
|
|
|
2142
2136
|
d
|
|
2143
2137
|
));
|
|
2144
2138
|
}
|
|
2145
|
-
function
|
|
2139
|
+
function Cl(e) {
|
|
2146
2140
|
var c;
|
|
2147
2141
|
const { option: n, runtime: r } = e, a = r.dashboard;
|
|
2148
2142
|
if (!((c = a == null ? void 0 : a.inputs) != null && c.length))
|
|
2149
2143
|
return;
|
|
2150
|
-
const o = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2144
|
+
const o = (/* @__PURE__ */ new Date()).toISOString(), i = ts();
|
|
2151
2145
|
if (n.kind === "document_sheet" && n.sheetId)
|
|
2152
|
-
return
|
|
2146
|
+
return Ea({
|
|
2153
2147
|
dashboard: a,
|
|
2154
2148
|
sheetId: n.sheetId,
|
|
2155
2149
|
sheetKind: "document",
|
|
@@ -2182,12 +2176,12 @@ function wl(e) {
|
|
|
2182
2176
|
timezone: i
|
|
2183
2177
|
}).snapshot;
|
|
2184
2178
|
}
|
|
2185
|
-
function
|
|
2179
|
+
function kl(e) {
|
|
2186
2180
|
var c;
|
|
2187
2181
|
const { option: n, runtime: r } = e, a = r.dashboard;
|
|
2188
2182
|
if (!((c = a == null ? void 0 : a.inputs) != null && c.length) || !n.cardId)
|
|
2189
2183
|
return;
|
|
2190
|
-
const o =
|
|
2184
|
+
const o = Sl(a, n.sheetId, n.cardId), i = e.inlineFilterValues !== void 0 ? {
|
|
2191
2185
|
...r.inlineFilterValuesMap || {},
|
|
2192
2186
|
[n.cardId]: e.inlineFilterValues
|
|
2193
2187
|
} : r.inlineFilterValuesMap, l = e.filterValues !== void 0 ? qo({
|
|
@@ -2198,7 +2192,7 @@ function Cl(e) {
|
|
|
2198
2192
|
cardId: n.cardId,
|
|
2199
2193
|
sheetKind: "dashboard"
|
|
2200
2194
|
}) : r.dashboardInputValues;
|
|
2201
|
-
return
|
|
2195
|
+
return Ea({
|
|
2202
2196
|
dashboard: a,
|
|
2203
2197
|
sheetId: (o == null ? void 0 : o.sheet.id) || n.sheetId,
|
|
2204
2198
|
card: (o == null ? void 0 : o.card) || null,
|
|
@@ -2212,20 +2206,20 @@ function Cl(e) {
|
|
|
2212
2206
|
cardControlValuesMap: r.cardControlValuesMap
|
|
2213
2207
|
},
|
|
2214
2208
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2215
|
-
timezone:
|
|
2209
|
+
timezone: ts()
|
|
2216
2210
|
}).snapshot;
|
|
2217
2211
|
}
|
|
2218
|
-
function
|
|
2212
|
+
function Sl(e, n, r) {
|
|
2219
2213
|
const a = e.sheets || [], o = n ? a.filter((i) => i.id === n) : a;
|
|
2220
2214
|
for (const i of o)
|
|
2221
|
-
for (const l of
|
|
2215
|
+
for (const l of as(i))
|
|
2222
2216
|
if (l.card.id === r)
|
|
2223
2217
|
return { sheet: i, card: l.card };
|
|
2224
2218
|
}
|
|
2225
|
-
function
|
|
2219
|
+
function ts() {
|
|
2226
2220
|
return typeof Intl < "u" ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
|
|
2227
2221
|
}
|
|
2228
|
-
function
|
|
2222
|
+
function Al(e) {
|
|
2229
2223
|
if (!Array.isArray(e))
|
|
2230
2224
|
return "";
|
|
2231
2225
|
const n = e.filter(
|
|
@@ -2233,15 +2227,15 @@ function Sl(e) {
|
|
|
2233
2227
|
);
|
|
2234
2228
|
return jo(n);
|
|
2235
2229
|
}
|
|
2236
|
-
function
|
|
2237
|
-
return n === "csv" ? { ...
|
|
2230
|
+
function ns(e, n) {
|
|
2231
|
+
return n === "csv" ? { ...gl, ...e } : { ...fl, ...e };
|
|
2238
2232
|
}
|
|
2239
|
-
function
|
|
2233
|
+
function rs(e) {
|
|
2240
2234
|
return e ? Uo(e).filter(
|
|
2241
2235
|
(n) => n !== "png"
|
|
2242
2236
|
) : ["pdf"];
|
|
2243
2237
|
}
|
|
2244
|
-
function
|
|
2238
|
+
function as(e) {
|
|
2245
2239
|
const n = [], r = /* @__PURE__ */ new Set(), a = (o, i) => {
|
|
2246
2240
|
!(o != null && o.id) || r.has(o.id) || (r.add(o.id), n.push({ card: o, frame: i }));
|
|
2247
2241
|
};
|
|
@@ -2264,7 +2258,7 @@ function hn(e) {
|
|
|
2264
2258
|
function te(e) {
|
|
2265
2259
|
return typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
2266
2260
|
}
|
|
2267
|
-
const
|
|
2261
|
+
const ss = ["markdown"], El = {
|
|
2268
2262
|
name: "",
|
|
2269
2263
|
description: "",
|
|
2270
2264
|
instruction: "",
|
|
@@ -2272,7 +2266,7 @@ const os = ["markdown"], El = {
|
|
|
2272
2266
|
body: { type: "generated_analysis", instruction: "" },
|
|
2273
2267
|
attachments: [],
|
|
2274
2268
|
output: {
|
|
2275
|
-
artifactFormats: [...
|
|
2269
|
+
artifactFormats: [...ss],
|
|
2276
2270
|
includeEvidence: !0,
|
|
2277
2271
|
includeSql: !0
|
|
2278
2272
|
},
|
|
@@ -2291,11 +2285,11 @@ const os = ["markdown"], El = {
|
|
|
2291
2285
|
},
|
|
2292
2286
|
limits: {}
|
|
2293
2287
|
};
|
|
2294
|
-
function
|
|
2288
|
+
function os(e) {
|
|
2295
2289
|
const n = e.trim();
|
|
2296
2290
|
return n.length > 0 ? n : void 0;
|
|
2297
2291
|
}
|
|
2298
|
-
function
|
|
2292
|
+
function Il(e) {
|
|
2299
2293
|
return {
|
|
2300
2294
|
...e,
|
|
2301
2295
|
source: { ...e.source },
|
|
@@ -2315,16 +2309,16 @@ function Al(e) {
|
|
|
2315
2309
|
limits: { ...e.limits }
|
|
2316
2310
|
};
|
|
2317
2311
|
}
|
|
2318
|
-
function
|
|
2312
|
+
function Dl(e) {
|
|
2319
2313
|
return e.type === "generated_analysis" ? e.instruction : e.type === "custom_message" ? e.message : "";
|
|
2320
2314
|
}
|
|
2321
|
-
function
|
|
2315
|
+
function is(e, n) {
|
|
2322
2316
|
return e.type === "custom_message" ? { type: "custom_message", message: n } : e.type === "none" ? { type: "none" } : { type: "generated_analysis", instruction: n };
|
|
2323
2317
|
}
|
|
2324
2318
|
function Wn(e) {
|
|
2325
|
-
return
|
|
2319
|
+
return is(e.body, e.instruction.trim());
|
|
2326
2320
|
}
|
|
2327
|
-
function
|
|
2321
|
+
function ls(e) {
|
|
2328
2322
|
return {
|
|
2329
2323
|
artifactFormats: [...e.artifactFormats],
|
|
2330
2324
|
includeEvidence: e.includeEvidence,
|
|
@@ -2334,29 +2328,29 @@ function ds(e) {
|
|
|
2334
2328
|
...e.format ? { format: e.format } : {}
|
|
2335
2329
|
};
|
|
2336
2330
|
}
|
|
2337
|
-
function
|
|
2331
|
+
function ds(e) {
|
|
2338
2332
|
const n = {};
|
|
2339
2333
|
return e.maxToolCalls !== void 0 && (n.maxToolCalls = e.maxToolCalls), e.maxRows !== void 0 && (n.maxRows = e.maxRows), e.timeoutMs !== void 0 && (n.timeoutMs = e.timeoutMs), Object.keys(n).length > 0 ? n : void 0;
|
|
2340
2334
|
}
|
|
2341
|
-
function
|
|
2335
|
+
function cs(e, n) {
|
|
2342
2336
|
if (!e)
|
|
2343
2337
|
return;
|
|
2344
2338
|
const r = n.reduce((a, o) => (e[o] !== void 0 && (a[o] = e[o]), a), {});
|
|
2345
2339
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
2346
2340
|
}
|
|
2347
|
-
function
|
|
2341
|
+
function us(e) {
|
|
2348
2342
|
return e.recipients.length === 0 && e.channels.length === 0 ? null : {
|
|
2349
2343
|
recipients: e.recipients.map((n) => ({ ...n })),
|
|
2350
2344
|
channels: [...e.channels],
|
|
2351
|
-
channelConfigs:
|
|
2345
|
+
channelConfigs: cs(
|
|
2352
2346
|
e.channelConfigs,
|
|
2353
2347
|
e.channels
|
|
2354
2348
|
)
|
|
2355
2349
|
};
|
|
2356
2350
|
}
|
|
2357
|
-
function
|
|
2351
|
+
function Tl(e) {
|
|
2358
2352
|
return {
|
|
2359
|
-
artifactFormats: e != null && e.artifactFormats && e.artifactFormats.length > 0 ? [...e.artifactFormats] : [...
|
|
2353
|
+
artifactFormats: e != null && e.artifactFormats && e.artifactFormats.length > 0 ? [...e.artifactFormats] : [...ss],
|
|
2360
2354
|
includeEvidence: (e == null ? void 0 : e.includeEvidence) ?? !0,
|
|
2361
2355
|
includeSql: (e == null ? void 0 : e.includeSql) ?? !0,
|
|
2362
2356
|
audience: e == null ? void 0 : e.audience,
|
|
@@ -2364,46 +2358,46 @@ function Dl(e) {
|
|
|
2364
2358
|
format: e == null ? void 0 : e.format
|
|
2365
2359
|
};
|
|
2366
2360
|
}
|
|
2367
|
-
function
|
|
2361
|
+
function Ll(e) {
|
|
2368
2362
|
return e.body.type === "generated_analysis" ? e.body.instruction : e.body.type === "custom_message" ? e.body.message : "";
|
|
2369
2363
|
}
|
|
2370
|
-
function
|
|
2364
|
+
function Rl(e) {
|
|
2371
2365
|
return {
|
|
2372
2366
|
enabled: !0,
|
|
2373
2367
|
recipients: (e == null ? void 0 : e.recipients.map((n) => ({ ...n }))) ?? [],
|
|
2374
2368
|
channels: e != null && e.channels ? [...e.channels] : [],
|
|
2375
2369
|
subject: "",
|
|
2376
2370
|
message: "",
|
|
2377
|
-
channelConfigs:
|
|
2371
|
+
channelConfigs: cs(
|
|
2378
2372
|
e == null ? void 0 : e.channelConfigs,
|
|
2379
2373
|
(e == null ? void 0 : e.channels) ?? []
|
|
2380
2374
|
)
|
|
2381
2375
|
};
|
|
2382
2376
|
}
|
|
2383
|
-
function
|
|
2377
|
+
function Fl(e, n, r) {
|
|
2384
2378
|
return e === void 0 || Number.isInteger(e) && e >= n && e <= r;
|
|
2385
2379
|
}
|
|
2386
|
-
function
|
|
2380
|
+
function Pl(e) {
|
|
2387
2381
|
const n = e.trim();
|
|
2388
2382
|
return n.includes("@") && n.includes(".") && !n.includes(" ");
|
|
2389
2383
|
}
|
|
2390
2384
|
function pn(e, n, r, a, o) {
|
|
2391
|
-
|
|
2385
|
+
Fl(r, a, o) || e.push({
|
|
2392
2386
|
field: `limits.${n}`,
|
|
2393
2387
|
message: `${n} must be an integer between ${a} and ${o}`
|
|
2394
2388
|
});
|
|
2395
2389
|
}
|
|
2396
|
-
function
|
|
2397
|
-
return
|
|
2390
|
+
function Ml(e) {
|
|
2391
|
+
return En(El, e ?? {});
|
|
2398
2392
|
}
|
|
2399
|
-
function
|
|
2393
|
+
function En(e, n) {
|
|
2400
2394
|
var l, c, d, u;
|
|
2401
|
-
const r = n.instruction ?? (n.body ?
|
|
2395
|
+
const r = n.instruction ?? (n.body ? Dl(n.body) : e.instruction), a = is(
|
|
2402
2396
|
n.body ? { ...n.body } : { ...e.body },
|
|
2403
2397
|
r
|
|
2404
2398
|
), o = (l = n.delivery) != null && l.channels ? [...n.delivery.channels] : [...e.delivery.channels], i = ((c = n.delivery) == null ? void 0 : c.channelConfigs) ?? e.delivery.channelConfigs;
|
|
2405
2399
|
return {
|
|
2406
|
-
...
|
|
2400
|
+
...Il(e),
|
|
2407
2401
|
...n,
|
|
2408
2402
|
instruction: r,
|
|
2409
2403
|
source: n.source ? { ...n.source } : { ...e.source },
|
|
@@ -2431,53 +2425,53 @@ function An(e, n) {
|
|
|
2431
2425
|
}
|
|
2432
2426
|
};
|
|
2433
2427
|
}
|
|
2434
|
-
function
|
|
2428
|
+
function At(e) {
|
|
2435
2429
|
return {
|
|
2436
2430
|
name: e.name,
|
|
2437
2431
|
description: e.description ?? "",
|
|
2438
|
-
instruction:
|
|
2432
|
+
instruction: Ll(e),
|
|
2439
2433
|
source: { ...e.source },
|
|
2440
2434
|
body: { ...e.body },
|
|
2441
2435
|
attachments: e.attachments.map(Pe),
|
|
2442
|
-
output:
|
|
2436
|
+
output: Tl(e.presentation),
|
|
2443
2437
|
schedule: {
|
|
2444
2438
|
enabled: !!e.scheduleExpr,
|
|
2445
2439
|
scheduleExpr: e.scheduleExpr ?? "",
|
|
2446
2440
|
timezone: e.timezone || "UTC",
|
|
2447
2441
|
status: e.status === "PAUSED" || e.status === "DISABLED" ? e.status : "ACTIVE"
|
|
2448
2442
|
},
|
|
2449
|
-
delivery:
|
|
2443
|
+
delivery: Rl(e.deliveryConfig),
|
|
2450
2444
|
limits: e.limits ? { ...e.limits } : {}
|
|
2451
2445
|
};
|
|
2452
2446
|
}
|
|
2453
2447
|
function _r(e) {
|
|
2454
2448
|
return {
|
|
2455
2449
|
name: e.name.trim(),
|
|
2456
|
-
description:
|
|
2450
|
+
description: os(e.description) ?? null,
|
|
2457
2451
|
status: e.schedule.status,
|
|
2458
2452
|
scheduleExpr: e.schedule.enabled ? e.schedule.scheduleExpr.trim() : null,
|
|
2459
2453
|
timezone: e.schedule.timezone.trim() || "UTC",
|
|
2460
2454
|
source: { ...e.source },
|
|
2461
2455
|
body: Wn(e),
|
|
2462
2456
|
attachments: e.attachments.map(Pe),
|
|
2463
|
-
presentation:
|
|
2464
|
-
limits:
|
|
2465
|
-
deliveryConfig:
|
|
2457
|
+
presentation: ls(e.output),
|
|
2458
|
+
limits: ds(e.limits),
|
|
2459
|
+
deliveryConfig: us(e.delivery)
|
|
2466
2460
|
};
|
|
2467
2461
|
}
|
|
2468
|
-
function
|
|
2462
|
+
function Bl(e) {
|
|
2469
2463
|
return {
|
|
2470
2464
|
name: e.name.trim(),
|
|
2471
|
-
description:
|
|
2465
|
+
description: os(e.description) ?? null,
|
|
2472
2466
|
status: e.schedule.status,
|
|
2473
2467
|
scheduleExpr: e.schedule.enabled ? e.schedule.scheduleExpr.trim() : null,
|
|
2474
2468
|
timezone: e.schedule.timezone.trim() || "UTC",
|
|
2475
2469
|
source: { ...e.source },
|
|
2476
2470
|
body: Wn(e),
|
|
2477
2471
|
attachments: e.attachments.map(Pe),
|
|
2478
|
-
presentation:
|
|
2479
|
-
limits:
|
|
2480
|
-
deliveryConfig:
|
|
2472
|
+
presentation: ls(e.output),
|
|
2473
|
+
limits: ds(e.limits),
|
|
2474
|
+
deliveryConfig: us(e.delivery)
|
|
2481
2475
|
};
|
|
2482
2476
|
}
|
|
2483
2477
|
function jr(e) {
|
|
@@ -2505,7 +2499,7 @@ function jr(e) {
|
|
|
2505
2499
|
field: "delivery.channels",
|
|
2506
2500
|
message: "Choose at least one delivery channel or remove recipients"
|
|
2507
2501
|
}), e.delivery.recipients.forEach((u, p) => {
|
|
2508
|
-
u.type === "email" && !
|
|
2502
|
+
u.type === "email" && !Pl(u.address) && n.push({
|
|
2509
2503
|
field: `delivery.recipients.${p}.address`,
|
|
2510
2504
|
message: "Email recipient address is invalid"
|
|
2511
2505
|
});
|
|
@@ -2530,15 +2524,15 @@ function jr(e) {
|
|
|
2530
2524
|
};
|
|
2531
2525
|
}
|
|
2532
2526
|
const It = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
2533
|
-
function
|
|
2527
|
+
function Ol({
|
|
2534
2528
|
attachment: e,
|
|
2535
2529
|
open: n,
|
|
2536
2530
|
onOpenChange: r,
|
|
2537
2531
|
onChange: a,
|
|
2538
2532
|
children: o
|
|
2539
2533
|
}) {
|
|
2540
|
-
const i =
|
|
2541
|
-
a(
|
|
2534
|
+
const i = Xa(e), l = e.settings || {}, c = e.format === "csv", d = (u) => {
|
|
2535
|
+
a(yl(e, u));
|
|
2542
2536
|
};
|
|
2543
2537
|
return /* @__PURE__ */ s(Fe, { open: n, onOpenChange: r, children: [
|
|
2544
2538
|
/* @__PURE__ */ t(Ze, { asChild: !0, children: o }),
|
|
@@ -2560,7 +2554,7 @@ function Bl({
|
|
|
2560
2554
|
{
|
|
2561
2555
|
value: e.format,
|
|
2562
2556
|
onValueChange: (u) => a(
|
|
2563
|
-
|
|
2557
|
+
xl(
|
|
2564
2558
|
e,
|
|
2565
2559
|
u
|
|
2566
2560
|
)
|
|
@@ -2572,13 +2566,13 @@ function Bl({
|
|
|
2572
2566
|
}
|
|
2573
2567
|
)
|
|
2574
2568
|
] }) : null,
|
|
2575
|
-
c ? /* @__PURE__ */ t(
|
|
2569
|
+
c ? /* @__PURE__ */ t($l, { settings: l, onChange: d }) : /* @__PURE__ */ t(Vl, { settings: l, onChange: d })
|
|
2576
2570
|
]
|
|
2577
2571
|
}
|
|
2578
2572
|
)
|
|
2579
2573
|
] });
|
|
2580
2574
|
}
|
|
2581
|
-
function
|
|
2575
|
+
function Vl({
|
|
2582
2576
|
settings: e,
|
|
2583
2577
|
onChange: n
|
|
2584
2578
|
}) {
|
|
@@ -2646,7 +2640,7 @@ function Ol({
|
|
|
2646
2640
|
] })
|
|
2647
2641
|
] });
|
|
2648
2642
|
}
|
|
2649
|
-
function
|
|
2643
|
+
function $l({
|
|
2650
2644
|
settings: e,
|
|
2651
2645
|
onChange: n
|
|
2652
2646
|
}) {
|
|
@@ -2707,7 +2701,7 @@ function $t({
|
|
|
2707
2701
|
/* @__PURE__ */ t("span", { children: e })
|
|
2708
2702
|
] });
|
|
2709
2703
|
}
|
|
2710
|
-
function
|
|
2704
|
+
function Ul({
|
|
2711
2705
|
attachments: e,
|
|
2712
2706
|
onChange: n,
|
|
2713
2707
|
onAdd: r,
|
|
@@ -2724,13 +2718,13 @@ function $l({
|
|
|
2724
2718
|
"aria-label": o ? "Attach files" : "Add another attachment",
|
|
2725
2719
|
className: "inline-flex h-6 items-center gap-1 rounded-control px-1.5 text-[11px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
|
|
2726
2720
|
children: [
|
|
2727
|
-
/* @__PURE__ */ t(
|
|
2721
|
+
/* @__PURE__ */ t(Ia, { className: "h-3 w-3" }),
|
|
2728
2722
|
o ? "Attach" : null
|
|
2729
2723
|
]
|
|
2730
2724
|
}
|
|
2731
2725
|
),
|
|
2732
2726
|
e.map((i, l) => /* @__PURE__ */ t(
|
|
2733
|
-
|
|
2727
|
+
_l,
|
|
2734
2728
|
{
|
|
2735
2729
|
attachment: i,
|
|
2736
2730
|
disabled: a,
|
|
@@ -2757,13 +2751,13 @@ function $l({
|
|
|
2757
2751
|
)
|
|
2758
2752
|
] });
|
|
2759
2753
|
}
|
|
2760
|
-
function
|
|
2754
|
+
function _l({
|
|
2761
2755
|
attachment: e,
|
|
2762
2756
|
disabled: n,
|
|
2763
2757
|
onUpdate: r,
|
|
2764
2758
|
onRemove: a
|
|
2765
2759
|
}) {
|
|
2766
|
-
const [o, i] = S(!1), l = qn(e), c =
|
|
2760
|
+
const [o, i] = S(!1), l = qn(e), c = bl(e), d = e.format.toUpperCase();
|
|
2767
2761
|
return /* @__PURE__ */ s(
|
|
2768
2762
|
"span",
|
|
2769
2763
|
{
|
|
@@ -2774,7 +2768,7 @@ function Ul({
|
|
|
2774
2768
|
title: c ? `${l} · ${c}` : l,
|
|
2775
2769
|
children: [
|
|
2776
2770
|
/* @__PURE__ */ t(
|
|
2777
|
-
|
|
2771
|
+
Ol,
|
|
2778
2772
|
{
|
|
2779
2773
|
attachment: e,
|
|
2780
2774
|
open: o,
|
|
@@ -2788,7 +2782,7 @@ function Ul({
|
|
|
2788
2782
|
className: "inline-flex max-w-[180px] items-center gap-1 disabled:opacity-50",
|
|
2789
2783
|
children: [
|
|
2790
2784
|
/* @__PURE__ */ t(
|
|
2791
|
-
|
|
2785
|
+
jl,
|
|
2792
2786
|
{
|
|
2793
2787
|
format: e.format,
|
|
2794
2788
|
className: "h-3 w-3 shrink-0 text-muted-foreground/70"
|
|
@@ -2816,14 +2810,14 @@ function Ul({
|
|
|
2816
2810
|
}
|
|
2817
2811
|
);
|
|
2818
2812
|
}
|
|
2819
|
-
function
|
|
2813
|
+
function jl({
|
|
2820
2814
|
format: e,
|
|
2821
2815
|
className: n
|
|
2822
2816
|
}) {
|
|
2823
|
-
return /* @__PURE__ */ t(e === "csv" ?
|
|
2817
|
+
return /* @__PURE__ */ t(e === "csv" ? Da : Ta, { className: v(n) });
|
|
2824
2818
|
}
|
|
2825
|
-
const
|
|
2826
|
-
function
|
|
2819
|
+
const zl = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
2820
|
+
function Kl({
|
|
2827
2821
|
open: e,
|
|
2828
2822
|
onOpenChange: n,
|
|
2829
2823
|
source: r,
|
|
@@ -2834,16 +2828,16 @@ function zl({
|
|
|
2834
2828
|
onSubmit: c
|
|
2835
2829
|
}) {
|
|
2836
2830
|
const d = V(
|
|
2837
|
-
() =>
|
|
2831
|
+
() => es({ source: r, dashboard: a, selectedSheetId: o }),
|
|
2838
2832
|
[r, a, o]
|
|
2839
2833
|
), [u, p] = S([]);
|
|
2840
2834
|
ce(() => {
|
|
2841
2835
|
if (!e) return;
|
|
2842
2836
|
const T = [];
|
|
2843
2837
|
for (const $ of l) {
|
|
2844
|
-
const R = $r($),
|
|
2838
|
+
const R = $r($), E = d.find(
|
|
2845
2839
|
(P) => P.formats.some((z) => {
|
|
2846
|
-
const B =
|
|
2840
|
+
const B = An({
|
|
2847
2841
|
option: P,
|
|
2848
2842
|
format: z,
|
|
2849
2843
|
runtime: i
|
|
@@ -2851,9 +2845,9 @@ function zl({
|
|
|
2851
2845
|
return $r(B) === R;
|
|
2852
2846
|
})
|
|
2853
2847
|
);
|
|
2854
|
-
|
|
2855
|
-
optionKey:
|
|
2856
|
-
format: $.format ??
|
|
2848
|
+
E && T.push({
|
|
2849
|
+
optionKey: E.key,
|
|
2850
|
+
format: $.format ?? E.defaultFormat
|
|
2857
2851
|
});
|
|
2858
2852
|
}
|
|
2859
2853
|
p(T);
|
|
@@ -2870,14 +2864,14 @@ function zl({
|
|
|
2870
2864
|
p((R) => R.some((P) => P.optionKey === T) ? R.filter((P) => P.optionKey !== T) : [...R, { optionKey: T, format: $ }]);
|
|
2871
2865
|
}, D = (T, $) => {
|
|
2872
2866
|
p(
|
|
2873
|
-
(R) => R.map((
|
|
2867
|
+
(R) => R.map((E) => E.optionKey === T ? { ...E, format: $ } : E)
|
|
2874
2868
|
);
|
|
2875
2869
|
}, k = () => {
|
|
2876
2870
|
const T = [];
|
|
2877
2871
|
for (const $ of u) {
|
|
2878
|
-
const R = d.find((
|
|
2872
|
+
const R = d.find((E) => E.key === $.optionKey);
|
|
2879
2873
|
R && T.push(
|
|
2880
|
-
|
|
2874
|
+
An({
|
|
2881
2875
|
option: R,
|
|
2882
2876
|
format: $.format,
|
|
2883
2877
|
runtime: i
|
|
@@ -2974,7 +2968,7 @@ function fn({
|
|
|
2974
2968
|
emptyText: l
|
|
2975
2969
|
}) {
|
|
2976
2970
|
return /* @__PURE__ */ s("section", { children: [
|
|
2977
|
-
/* @__PURE__ */ t("div", { className: v(
|
|
2971
|
+
/* @__PURE__ */ t("div", { className: v(zl, "mb-2"), children: e }),
|
|
2978
2972
|
n.length === 0 ? /* @__PURE__ */ t("div", { className: "rounded-card border border-dashed border-border px-3 py-2 text-[12px] text-muted-foreground", children: l || "Nothing available." }) : /* @__PURE__ */ t("div", { className: "divide-y divide-border rounded-card border border-border", children: n.map((c) => {
|
|
2979
2973
|
const d = r.has(c.key), u = a[c.key] ?? c.defaultFormat;
|
|
2980
2974
|
return /* @__PURE__ */ s(
|
|
@@ -2993,9 +2987,9 @@ function fn({
|
|
|
2993
2987
|
onClick: () => o(c.key, c.defaultFormat),
|
|
2994
2988
|
className: "flex min-w-0 flex-1 items-start gap-2 text-left",
|
|
2995
2989
|
children: [
|
|
2996
|
-
/* @__PURE__ */ t(
|
|
2990
|
+
/* @__PURE__ */ t(Hl, { selected: d }),
|
|
2997
2991
|
/* @__PURE__ */ t(
|
|
2998
|
-
|
|
2992
|
+
ql,
|
|
2999
2993
|
{
|
|
3000
2994
|
kind: c.kind,
|
|
3001
2995
|
format: u,
|
|
@@ -3037,7 +3031,7 @@ function fn({
|
|
|
3037
3031
|
}) })
|
|
3038
3032
|
] });
|
|
3039
3033
|
}
|
|
3040
|
-
function
|
|
3034
|
+
function Hl({ selected: e }) {
|
|
3041
3035
|
return /* @__PURE__ */ t(
|
|
3042
3036
|
"span",
|
|
3043
3037
|
{
|
|
@@ -3050,15 +3044,15 @@ function Kl({ selected: e }) {
|
|
|
3050
3044
|
}
|
|
3051
3045
|
);
|
|
3052
3046
|
}
|
|
3053
|
-
function
|
|
3047
|
+
function ql({
|
|
3054
3048
|
kind: e,
|
|
3055
3049
|
format: n,
|
|
3056
3050
|
cardType: r,
|
|
3057
3051
|
className: a
|
|
3058
3052
|
}) {
|
|
3059
|
-
return /* @__PURE__ */ t(n === "csv" ?
|
|
3053
|
+
return /* @__PURE__ */ t(n === "csv" ? Da : e === "dashboard" ? Wo : e === "card" ? r === "table" || r === "aggregateTable" || r === "pivotTable" || r === "detailTable" ? Ai : oo : Ta, { className: a });
|
|
3060
3054
|
}
|
|
3061
|
-
const
|
|
3055
|
+
const Wl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Gl = 250;
|
|
3062
3056
|
function kt(e) {
|
|
3063
3057
|
switch (e.type) {
|
|
3064
3058
|
case "email":
|
|
@@ -3071,10 +3065,10 @@ function kt(e) {
|
|
|
3071
3065
|
return `group:${e.groupId}`;
|
|
3072
3066
|
}
|
|
3073
3067
|
}
|
|
3074
|
-
function
|
|
3068
|
+
function Jl(e) {
|
|
3075
3069
|
return e.type === "user" ? e.userId : e.type === "tenant_user" ? e.tenantUserId : null;
|
|
3076
3070
|
}
|
|
3077
|
-
function
|
|
3071
|
+
function Ql(e) {
|
|
3078
3072
|
return e.type === "group" ? e.groupId : null;
|
|
3079
3073
|
}
|
|
3080
3074
|
function St(e) {
|
|
@@ -3107,17 +3101,17 @@ function Hr({
|
|
|
3107
3101
|
prefix: o,
|
|
3108
3102
|
placeholder: i
|
|
3109
3103
|
}) {
|
|
3110
|
-
const l =
|
|
3104
|
+
const l = Ee(null), [c, d] = S(!1), [u, p] = S(""), [f, h] = S(0), [b, D] = S(
|
|
3111
3105
|
() => /* @__PURE__ */ new Map()
|
|
3112
3106
|
), [k, N] = S(
|
|
3113
3107
|
() => /* @__PURE__ */ new Map()
|
|
3114
|
-
), [g, L] = S("people"), x = Go(u,
|
|
3108
|
+
), [g, L] = S("people"), x = Go(u, Gl), { currentUser: C } = La(), T = (C == null ? void 0 : C.type) === "tenant", { users: $, isLoading: R } = Jo({
|
|
3115
3109
|
search: x,
|
|
3116
3110
|
active: !0,
|
|
3117
3111
|
type: T ? "tenant" : "all",
|
|
3118
3112
|
tenantId: T ? C.tenantId : void 0,
|
|
3119
3113
|
limit: 25
|
|
3120
|
-
}), { groups:
|
|
3114
|
+
}), { groups: E, isLoading: P } = Qo({
|
|
3121
3115
|
search: x,
|
|
3122
3116
|
type: T ? "TENANT_GROUP" : "all",
|
|
3123
3117
|
tenantId: T ? C.tenantId : void 0,
|
|
@@ -3127,49 +3121,49 @@ function Hr({
|
|
|
3127
3121
|
[e]
|
|
3128
3122
|
), B = V(
|
|
3129
3123
|
() => new Set(
|
|
3130
|
-
e.map(
|
|
3124
|
+
e.map(Jl).filter((A) => !!A)
|
|
3131
3125
|
),
|
|
3132
3126
|
[e]
|
|
3133
3127
|
), K = V(
|
|
3134
3128
|
() => new Set(
|
|
3135
|
-
e.map(
|
|
3129
|
+
e.map(Ql).filter((A) => !!A)
|
|
3136
3130
|
),
|
|
3137
3131
|
[e]
|
|
3138
3132
|
), _ = V(() => {
|
|
3139
|
-
const
|
|
3133
|
+
const A = new Map(b);
|
|
3140
3134
|
return $.forEach((M) => {
|
|
3141
|
-
|
|
3142
|
-
}), C != null && C.id &&
|
|
3135
|
+
A.set(M.id, zr(M));
|
|
3136
|
+
}), C != null && C.id && A.set(C.id, {
|
|
3143
3137
|
kind: "user",
|
|
3144
3138
|
id: C.id,
|
|
3145
3139
|
name: C.name || C.email || "User",
|
|
3146
3140
|
email: C.email || "",
|
|
3147
3141
|
type: C.type
|
|
3148
|
-
}),
|
|
3142
|
+
}), A;
|
|
3149
3143
|
}, [b, $, C]), O = V(() => {
|
|
3150
|
-
const
|
|
3144
|
+
const A = /* @__PURE__ */ new Set();
|
|
3151
3145
|
return e.forEach((M) => {
|
|
3152
3146
|
var we;
|
|
3153
3147
|
if (M.type === "email") {
|
|
3154
3148
|
const lt = St(M.address);
|
|
3155
|
-
lt &&
|
|
3149
|
+
lt && A.add(lt);
|
|
3156
3150
|
return;
|
|
3157
3151
|
}
|
|
3158
3152
|
if (M.type === "group")
|
|
3159
3153
|
return;
|
|
3160
3154
|
const oe = M.type === "tenant_user" ? M.tenantUserId : M.userId, be = St((we = _.get(oe)) == null ? void 0 : we.email);
|
|
3161
|
-
be &&
|
|
3162
|
-
}),
|
|
3155
|
+
be && A.add(be);
|
|
3156
|
+
}), A;
|
|
3163
3157
|
}, [_, e]), J = V(() => {
|
|
3164
|
-
const
|
|
3165
|
-
return
|
|
3166
|
-
|
|
3167
|
-
}),
|
|
3168
|
-
}, [k,
|
|
3169
|
-
() => $.filter((
|
|
3170
|
-
if (B.has(
|
|
3171
|
-
const M = St(
|
|
3172
|
-
return M && O.has(M) ? !1 : T ?
|
|
3158
|
+
const A = new Map(k);
|
|
3159
|
+
return E.forEach((M) => {
|
|
3160
|
+
A.set(M.id, Kr(M));
|
|
3161
|
+
}), A;
|
|
3162
|
+
}, [k, E]), I = V(
|
|
3163
|
+
() => $.filter((A) => {
|
|
3164
|
+
if (B.has(A.id)) return !1;
|
|
3165
|
+
const M = St(A.email);
|
|
3166
|
+
return M && O.has(M) ? !1 : T ? A.type === "tenant" && A.tenantId === (C == null ? void 0 : C.tenantId) : !0;
|
|
3173
3167
|
}).map(zr),
|
|
3174
3168
|
[
|
|
3175
3169
|
$,
|
|
@@ -3179,14 +3173,14 @@ function Hr({
|
|
|
3179
3173
|
C == null ? void 0 : C.tenantId
|
|
3180
3174
|
]
|
|
3181
3175
|
), ve = V(
|
|
3182
|
-
() => I.filter((
|
|
3176
|
+
() => I.filter((A) => A.type === "organization"),
|
|
3183
3177
|
[I]
|
|
3184
3178
|
), w = V(
|
|
3185
|
-
() => I.filter((
|
|
3179
|
+
() => I.filter((A) => A.type === "tenant"),
|
|
3186
3180
|
[I]
|
|
3187
3181
|
), q = V(
|
|
3188
|
-
() =>
|
|
3189
|
-
[
|
|
3182
|
+
() => E.filter((A) => K.has(A.id) ? !1 : (C == null ? void 0 : C.type) === "tenant" ? A.type === "TENANT_GROUP" && A.tenantId === C.tenantId : !0).map(Kr),
|
|
3183
|
+
[E, K, C == null ? void 0 : C.type, C == null ? void 0 : C.tenantId]
|
|
3190
3184
|
), se = V(
|
|
3191
3185
|
() => T ? [
|
|
3192
3186
|
{
|
|
@@ -3233,28 +3227,28 @@ function Hr({
|
|
|
3233
3227
|
), ke = V(
|
|
3234
3228
|
() => [...X, ...De],
|
|
3235
3229
|
[X, De]
|
|
3236
|
-
), Te = ke.length === 0 ? 0 : Math.min(f, ke.length - 1), U = u.trim(), et =
|
|
3237
|
-
z.has(kt(
|
|
3238
|
-
}, Se = (
|
|
3239
|
-
n(e.filter((M) => kt(M) !==
|
|
3230
|
+
), Te = ke.length === 0 ? 0 : Math.min(f, ke.length - 1), U = u.trim(), et = Wl.test(U), Me = St(U), Le = Me ? O.has(Me) : !1, tt = R || P, W = (A) => {
|
|
3231
|
+
z.has(kt(A)) || (n([...e, A]), p(""), h(0));
|
|
3232
|
+
}, Se = (A) => {
|
|
3233
|
+
n(e.filter((M) => kt(M) !== A));
|
|
3240
3234
|
}, qe = () => {
|
|
3241
3235
|
!et || Le || W({ type: "email", address: U });
|
|
3242
|
-
}, j = (
|
|
3243
|
-
const M = St(
|
|
3236
|
+
}, j = (A) => {
|
|
3237
|
+
const M = St(A.email);
|
|
3244
3238
|
M && O.has(M) || (D((oe) => {
|
|
3245
3239
|
const be = new Map(oe);
|
|
3246
|
-
return be.set(
|
|
3240
|
+
return be.set(A.id, A), be;
|
|
3247
3241
|
}), W(
|
|
3248
|
-
|
|
3242
|
+
A.type === "tenant" ? { type: "tenant_user", tenantUserId: A.id } : { type: "user", userId: A.id }
|
|
3249
3243
|
));
|
|
3250
|
-
}, ee = (
|
|
3244
|
+
}, ee = (A) => {
|
|
3251
3245
|
N((M) => {
|
|
3252
3246
|
const oe = new Map(M);
|
|
3253
|
-
return oe.set(
|
|
3254
|
-
}), W({ type: "group", groupId:
|
|
3255
|
-
}, xt = (
|
|
3256
|
-
if (
|
|
3257
|
-
if (
|
|
3247
|
+
return oe.set(A.id, A), oe;
|
|
3248
|
+
}), W({ type: "group", groupId: A.id });
|
|
3249
|
+
}, xt = (A) => {
|
|
3250
|
+
if (A.key === "Enter") {
|
|
3251
|
+
if (A.preventDefault(), et && !Le) {
|
|
3258
3252
|
qe();
|
|
3259
3253
|
return;
|
|
3260
3254
|
}
|
|
@@ -3267,37 +3261,37 @@ function Hr({
|
|
|
3267
3261
|
ee(M);
|
|
3268
3262
|
return;
|
|
3269
3263
|
}
|
|
3270
|
-
} else if (
|
|
3271
|
-
|
|
3264
|
+
} else if (A.key === "ArrowDown")
|
|
3265
|
+
A.preventDefault(), h(
|
|
3272
3266
|
(M) => Math.min(M + 1, Math.max(ke.length - 1, 0))
|
|
3273
3267
|
);
|
|
3274
|
-
else if (
|
|
3275
|
-
|
|
3276
|
-
else if (
|
|
3268
|
+
else if (A.key === "ArrowUp")
|
|
3269
|
+
A.preventDefault(), h((M) => Math.max(M - 1, 0));
|
|
3270
|
+
else if (A.key === "Escape")
|
|
3277
3271
|
d(!1);
|
|
3278
|
-
else if (
|
|
3272
|
+
else if (A.key === "Backspace" && u.length === 0) {
|
|
3279
3273
|
const M = e[e.length - 1];
|
|
3280
3274
|
M && Se(kt(M));
|
|
3281
3275
|
}
|
|
3282
|
-
}, Yn = e.map((
|
|
3283
|
-
const M = kt(
|
|
3284
|
-
if (
|
|
3276
|
+
}, Yn = e.map((A) => {
|
|
3277
|
+
const M = kt(A);
|
|
3278
|
+
if (A.type === "email")
|
|
3285
3279
|
return {
|
|
3286
3280
|
key: M,
|
|
3287
|
-
label:
|
|
3281
|
+
label: A.name || A.address,
|
|
3288
3282
|
icon: /* @__PURE__ */ t(Yo, { className: "h-3 w-3" }),
|
|
3289
3283
|
onRemove: () => Se(M)
|
|
3290
3284
|
};
|
|
3291
|
-
if (
|
|
3292
|
-
const we = J.get(
|
|
3285
|
+
if (A.type === "group") {
|
|
3286
|
+
const we = J.get(A.groupId);
|
|
3293
3287
|
return {
|
|
3294
3288
|
key: M,
|
|
3295
3289
|
label: (we == null ? void 0 : we.name) || "Group",
|
|
3296
|
-
icon: /* @__PURE__ */ t(
|
|
3290
|
+
icon: /* @__PURE__ */ t(za, { className: "h-3 w-3" }),
|
|
3297
3291
|
onRemove: () => Se(M)
|
|
3298
3292
|
};
|
|
3299
3293
|
}
|
|
3300
|
-
const oe =
|
|
3294
|
+
const oe = A.type === "tenant_user" ? A.tenantUserId : A.userId, be = _.get(oe);
|
|
3301
3295
|
return {
|
|
3302
3296
|
key: M,
|
|
3303
3297
|
label: (be == null ? void 0 : be.name) || (be == null ? void 0 : be.email) || "User",
|
|
@@ -3315,19 +3309,19 @@ function Hr({
|
|
|
3315
3309
|
a && "cursor-not-allowed opacity-60"
|
|
3316
3310
|
),
|
|
3317
3311
|
onClick: () => {
|
|
3318
|
-
var
|
|
3319
|
-
a || ((
|
|
3312
|
+
var A;
|
|
3313
|
+
a || ((A = l.current) == null || A.focus(), d(!0));
|
|
3320
3314
|
},
|
|
3321
3315
|
children: [
|
|
3322
3316
|
o ? /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: o }) : null,
|
|
3323
|
-
Yn.map((
|
|
3324
|
-
|
|
3317
|
+
Yn.map((A) => /* @__PURE__ */ t(
|
|
3318
|
+
Yl,
|
|
3325
3319
|
{
|
|
3326
|
-
icon:
|
|
3327
|
-
label:
|
|
3328
|
-
onRemove:
|
|
3320
|
+
icon: A.icon,
|
|
3321
|
+
label: A.label,
|
|
3322
|
+
onRemove: A.onRemove
|
|
3329
3323
|
},
|
|
3330
|
-
|
|
3324
|
+
A.key
|
|
3331
3325
|
)),
|
|
3332
3326
|
/* @__PURE__ */ t(
|
|
3333
3327
|
"input",
|
|
@@ -3337,8 +3331,8 @@ function Hr({
|
|
|
3337
3331
|
value: u,
|
|
3338
3332
|
disabled: a,
|
|
3339
3333
|
placeholder: i ?? (e.length > 0 ? "Add more..." : "Add people, emails, or groups"),
|
|
3340
|
-
onChange: (
|
|
3341
|
-
p(
|
|
3334
|
+
onChange: (A) => {
|
|
3335
|
+
p(A.target.value), h(0), d(!0);
|
|
3342
3336
|
},
|
|
3343
3337
|
onFocus: () => d(!0),
|
|
3344
3338
|
onKeyDown: xt
|
|
@@ -3352,13 +3346,13 @@ function Hr({
|
|
|
3352
3346
|
{
|
|
3353
3347
|
align: "start",
|
|
3354
3348
|
sideOffset: 8,
|
|
3355
|
-
onOpenAutoFocus: (
|
|
3349
|
+
onOpenAutoFocus: (A) => A.preventDefault(),
|
|
3356
3350
|
className: v(
|
|
3357
3351
|
"z-[60] w-[var(--radix-popover-trigger-width)] min-w-[360px] rounded-card border border-border bg-background p-0 text-foreground shadow-md outline-none",
|
|
3358
3352
|
"max-h-[min(320px,var(--radix-popover-content-available-height))] overflow-y-auto"
|
|
3359
3353
|
),
|
|
3360
3354
|
children: /* @__PURE__ */ t(
|
|
3361
|
-
|
|
3355
|
+
Zl,
|
|
3362
3356
|
{
|
|
3363
3357
|
activeIndex: Te,
|
|
3364
3358
|
activeFilter: g,
|
|
@@ -3367,8 +3361,8 @@ function Hr({
|
|
|
3367
3361
|
groupSuggestions: De,
|
|
3368
3362
|
loading: tt,
|
|
3369
3363
|
onAddEmail: qe,
|
|
3370
|
-
onFilterChange: (
|
|
3371
|
-
L(
|
|
3364
|
+
onFilterChange: (A) => {
|
|
3365
|
+
L(A), h(0);
|
|
3372
3366
|
},
|
|
3373
3367
|
onGroupClick: ee,
|
|
3374
3368
|
onUserClick: j,
|
|
@@ -3383,7 +3377,7 @@ function Hr({
|
|
|
3383
3377
|
)
|
|
3384
3378
|
] }) });
|
|
3385
3379
|
}
|
|
3386
|
-
function
|
|
3380
|
+
function Yl({
|
|
3387
3381
|
icon: e,
|
|
3388
3382
|
label: n,
|
|
3389
3383
|
onRemove: r
|
|
@@ -3405,7 +3399,7 @@ function Ql({
|
|
|
3405
3399
|
)
|
|
3406
3400
|
] });
|
|
3407
3401
|
}
|
|
3408
|
-
function
|
|
3402
|
+
function Zl({
|
|
3409
3403
|
activeIndex: e,
|
|
3410
3404
|
activeFilter: n,
|
|
3411
3405
|
emailAlreadyAdded: r,
|
|
@@ -3476,7 +3470,7 @@ function Yl({
|
|
|
3476
3470
|
Wr,
|
|
3477
3471
|
{
|
|
3478
3472
|
active: g === e,
|
|
3479
|
-
avatar: /* @__PURE__ */ t("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ t(
|
|
3473
|
+
avatar: /* @__PURE__ */ t("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-control border border-border bg-muted text-muted-foreground", children: /* @__PURE__ */ t(za, { className: "h-3 w-3" }) }),
|
|
3480
3474
|
detail: N.memberCount !== void 0 ? `${N.memberCount} member${N.memberCount === 1 ? "" : "s"}` : N.description ?? void 0,
|
|
3481
3475
|
tag: N.type === "ORG_GROUP" ? "Org group" : "Tenant group",
|
|
3482
3476
|
viewerType: D,
|
|
@@ -3493,7 +3487,7 @@ function Yl({
|
|
|
3493
3487
|
onClick: l,
|
|
3494
3488
|
className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left hover:bg-muted",
|
|
3495
3489
|
children: [
|
|
3496
|
-
/* @__PURE__ */ t(
|
|
3490
|
+
/* @__PURE__ */ t(_a, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
3497
3491
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
3498
3492
|
/* @__PURE__ */ s("div", { className: "text-[13px] text-foreground", children: [
|
|
3499
3493
|
"Send to ",
|
|
@@ -3563,7 +3557,7 @@ function In({
|
|
|
3563
3557
|
onError: c,
|
|
3564
3558
|
onTimeout: d
|
|
3565
3559
|
}) {
|
|
3566
|
-
const [u, p] = S(null), [f, h] = S("idle"), b =
|
|
3560
|
+
const [u, p] = S(null), [f, h] = S("idle"), b = Ee(null), D = Ee({
|
|
3567
3561
|
fetchRun: o,
|
|
3568
3562
|
onRun: i,
|
|
3569
3563
|
onTerminalRun: l,
|
|
@@ -3606,10 +3600,10 @@ function In({
|
|
|
3606
3600
|
}
|
|
3607
3601
|
let x = !1, C = !1, T = null;
|
|
3608
3602
|
const $ = Date.now(), R = async () => {
|
|
3609
|
-
var
|
|
3603
|
+
var E, P, z, B, K, _;
|
|
3610
3604
|
if (!(x || C)) {
|
|
3611
3605
|
if (Date.now() - $ > a) {
|
|
3612
|
-
p((O) => O === u ? null : O), h("timed_out"), (P = (
|
|
3606
|
+
p((O) => O === u ? null : O), h("timed_out"), (P = (E = D.current).onTimeout) == null || P.call(E, u);
|
|
3613
3607
|
return;
|
|
3614
3608
|
}
|
|
3615
3609
|
C = !0;
|
|
@@ -3685,7 +3679,7 @@ function Gr({
|
|
|
3685
3679
|
] })
|
|
3686
3680
|
] });
|
|
3687
3681
|
}
|
|
3688
|
-
function
|
|
3682
|
+
function Xl({
|
|
3689
3683
|
includeEvidence: e,
|
|
3690
3684
|
includeSql: n,
|
|
3691
3685
|
includeHtml: r,
|
|
@@ -3702,7 +3696,7 @@ function Zl({
|
|
|
3702
3696
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3703
3697
|
"aria-label": "Output options",
|
|
3704
3698
|
children: [
|
|
3705
|
-
/* @__PURE__ */ t(
|
|
3699
|
+
/* @__PURE__ */ t(Ra, { className: "h-3 w-3" }),
|
|
3706
3700
|
"Output options",
|
|
3707
3701
|
/* @__PURE__ */ s("span", { className: "font-mono text-[11px] tabular-nums text-muted-foreground", children: [
|
|
3708
3702
|
"· ",
|
|
@@ -3847,7 +3841,7 @@ Format:
|
|
|
3847
3841
|
- Headline (≤ 12 words)
|
|
3848
3842
|
- Three bullets max
|
|
3849
3843
|
- Link to the full dashboard`;
|
|
3850
|
-
function
|
|
3844
|
+
function ed(e, n, r) {
|
|
3851
3845
|
const a = e.includes("markdown") ? e.filter((o) => o !== n) : ["markdown"];
|
|
3852
3846
|
return r ? Array.from(/* @__PURE__ */ new Set([...a, n])) : a;
|
|
3853
3847
|
}
|
|
@@ -3941,8 +3935,8 @@ const Bt = [
|
|
|
3941
3935
|
}
|
|
3942
3936
|
})
|
|
3943
3937
|
}
|
|
3944
|
-
], Z = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",
|
|
3945
|
-
function
|
|
3938
|
+
], Z = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Et = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", _e = "inline-flex h-7 items-center gap-1.5 rounded-control border border-border bg-background px-2.5 text-[12px] text-foreground hover:bg-muted disabled:opacity-50", Xr = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
3939
|
+
function td({
|
|
3946
3940
|
scheduleExpr: e,
|
|
3947
3941
|
timezone: n,
|
|
3948
3942
|
onScheduleChange: r
|
|
@@ -3964,7 +3958,7 @@ function ed({
|
|
|
3964
3958
|
f({ ...a, hour: g, minute: L });
|
|
3965
3959
|
}, D = (g) => {
|
|
3966
3960
|
f({ ...a, weekdays: g });
|
|
3967
|
-
}, k = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = V(() =>
|
|
3961
|
+
}, k = `${String(a.hour).padStart(2, "0")}:${String(a.minute).padStart(2, "0")}`, N = V(() => nd(), []);
|
|
3968
3962
|
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
3969
3963
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3", children: [
|
|
3970
3964
|
/* @__PURE__ */ t("span", { className: Z, children: "When" }),
|
|
@@ -4014,9 +4008,9 @@ function ed({
|
|
|
4014
4008
|
{
|
|
4015
4009
|
type: "button",
|
|
4016
4010
|
"aria-expanded": u,
|
|
4017
|
-
className: v(
|
|
4011
|
+
className: v(Et, "h-6 px-1.5 text-[11px]"),
|
|
4018
4012
|
children: [
|
|
4019
|
-
/* @__PURE__ */ t(
|
|
4013
|
+
/* @__PURE__ */ t(Ra, { className: "h-3 w-3" }),
|
|
4020
4014
|
"More options",
|
|
4021
4015
|
/* @__PURE__ */ t(
|
|
4022
4016
|
Ke,
|
|
@@ -4080,7 +4074,7 @@ function ed({
|
|
|
4080
4074
|
/* @__PURE__ */ t(ti, { className: "h-3 w-3 shrink-0 text-muted-foreground/70" }),
|
|
4081
4075
|
/* @__PURE__ */ t(Qe, {})
|
|
4082
4076
|
] }) }),
|
|
4083
|
-
/* @__PURE__ */ t(Ye, { className: "max-h-[280px]", children: ni.map((g) => /* @__PURE__ */ t(ue, { value: g, children:
|
|
4077
|
+
/* @__PURE__ */ t(Ye, { className: "max-h-[280px]", children: ni.map((g) => /* @__PURE__ */ t(ue, { value: g, children: rd(g) }, g)) })
|
|
4084
4078
|
]
|
|
4085
4079
|
}
|
|
4086
4080
|
)
|
|
@@ -4130,7 +4124,7 @@ function ed({
|
|
|
4130
4124
|
] }) })
|
|
4131
4125
|
] });
|
|
4132
4126
|
}
|
|
4133
|
-
function
|
|
4127
|
+
function nd() {
|
|
4134
4128
|
const e = [];
|
|
4135
4129
|
for (let n = 0; n < 24; n += 1)
|
|
4136
4130
|
for (const r of [0, 30]) {
|
|
@@ -4139,7 +4133,7 @@ function td() {
|
|
|
4139
4133
|
}
|
|
4140
4134
|
return e;
|
|
4141
4135
|
}
|
|
4142
|
-
function
|
|
4136
|
+
function rd(e) {
|
|
4143
4137
|
return !e || e === "UTC" ? "UTC" : {
|
|
4144
4138
|
"America/New_York": "Eastern Time (ET)",
|
|
4145
4139
|
"America/Chicago": "Central Time (CT)",
|
|
@@ -4156,11 +4150,11 @@ function jt() {
|
|
|
4156
4150
|
const e = /* @__PURE__ */ new Date();
|
|
4157
4151
|
return e.setHours(0, 0, 0, 0), e;
|
|
4158
4152
|
}
|
|
4159
|
-
function
|
|
4153
|
+
function ad(e, n) {
|
|
4160
4154
|
return e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate();
|
|
4161
4155
|
}
|
|
4162
4156
|
function ea(e) {
|
|
4163
|
-
return
|
|
4157
|
+
return ad(e, jt()) ? "Today" : e.toLocaleDateString(void 0, {
|
|
4164
4158
|
month: "short",
|
|
4165
4159
|
day: "numeric",
|
|
4166
4160
|
year: "numeric"
|
|
@@ -4243,13 +4237,13 @@ function na({
|
|
|
4243
4237
|
)
|
|
4244
4238
|
] });
|
|
4245
4239
|
}
|
|
4246
|
-
function
|
|
4240
|
+
function sd({
|
|
4247
4241
|
source: e,
|
|
4248
4242
|
resolvedSourceContext: n,
|
|
4249
4243
|
sourceDetail: r,
|
|
4250
4244
|
onChange: a
|
|
4251
4245
|
}) {
|
|
4252
|
-
const [o, i] = S(!1), l =
|
|
4246
|
+
const [o, i] = S(!1), l = Ee(null), c = n.source.type === "dashboard" ? n.source : null, d = c !== null;
|
|
4253
4247
|
ce(() => {
|
|
4254
4248
|
if (!o) return;
|
|
4255
4249
|
const N = (g) => {
|
|
@@ -4379,7 +4373,7 @@ function ra({
|
|
|
4379
4373
|
}
|
|
4380
4374
|
);
|
|
4381
4375
|
}
|
|
4382
|
-
function
|
|
4376
|
+
function od({
|
|
4383
4377
|
channels: e,
|
|
4384
4378
|
selectedChannelId: n,
|
|
4385
4379
|
onChange: r,
|
|
@@ -4389,7 +4383,7 @@ function sd({
|
|
|
4389
4383
|
disabled: l,
|
|
4390
4384
|
className: c
|
|
4391
4385
|
}) {
|
|
4392
|
-
const d =
|
|
4386
|
+
const d = Ee(null), [u, p] = S(!1), [f, h] = S(""), b = V(
|
|
4393
4387
|
() => e.find((g) => g.id === n) ?? null,
|
|
4394
4388
|
[e, n]
|
|
4395
4389
|
), D = V(() => {
|
|
@@ -4446,7 +4440,7 @@ function sd({
|
|
|
4446
4440
|
}
|
|
4447
4441
|
),
|
|
4448
4442
|
b ? /* @__PURE__ */ t(
|
|
4449
|
-
|
|
4443
|
+
id,
|
|
4450
4444
|
{
|
|
4451
4445
|
channel: b,
|
|
4452
4446
|
onRemove: () => {
|
|
@@ -4496,7 +4490,7 @@ function sd({
|
|
|
4496
4490
|
L ? "bg-muted text-foreground" : "text-foreground/85 hover:bg-muted/60"
|
|
4497
4491
|
),
|
|
4498
4492
|
children: [
|
|
4499
|
-
g.isPrivate ? /* @__PURE__ */ t(
|
|
4493
|
+
g.isPrivate ? /* @__PURE__ */ t(Fa, { className: "h-3 w-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ t(zn, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
4500
4494
|
/* @__PURE__ */ t("span", { className: "truncate", children: g.name }),
|
|
4501
4495
|
typeof g.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "ml-auto text-[11px] text-muted-foreground", children: [
|
|
4502
4496
|
g.memberCount,
|
|
@@ -4510,12 +4504,12 @@ function sd({
|
|
|
4510
4504
|
)
|
|
4511
4505
|
] }) });
|
|
4512
4506
|
}
|
|
4513
|
-
function
|
|
4507
|
+
function id({
|
|
4514
4508
|
channel: e,
|
|
4515
4509
|
onRemove: n
|
|
4516
4510
|
}) {
|
|
4517
4511
|
return /* @__PURE__ */ s("span", { className: "inline-flex h-6 max-w-full items-center gap-1.5 rounded-control border border-border bg-muted pl-1.5 pr-1 text-[12px]", children: [
|
|
4518
|
-
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(
|
|
4512
|
+
/* @__PURE__ */ t("span", { className: "shrink-0 text-muted-foreground", children: e.isPrivate ? /* @__PURE__ */ t(Fa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(zn, { className: "h-3 w-3" }) }),
|
|
4519
4513
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: e.name }),
|
|
4520
4514
|
typeof e.memberCount == "number" ? /* @__PURE__ */ s("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
4521
4515
|
"· ",
|
|
@@ -4536,8 +4530,8 @@ function od({
|
|
|
4536
4530
|
)
|
|
4537
4531
|
] });
|
|
4538
4532
|
}
|
|
4539
|
-
const
|
|
4540
|
-
function
|
|
4533
|
+
const ms = Ut, it = _t;
|
|
4534
|
+
function ld(e) {
|
|
4541
4535
|
var a, o;
|
|
4542
4536
|
const n = (a = e == null ? void 0 : e.email) == null ? void 0 : a.trim();
|
|
4543
4537
|
if (!n)
|
|
@@ -4549,7 +4543,7 @@ function id(e) {
|
|
|
4549
4543
|
...r && r !== n ? { name: r } : {}
|
|
4550
4544
|
};
|
|
4551
4545
|
}
|
|
4552
|
-
function
|
|
4546
|
+
function hs(e) {
|
|
4553
4547
|
const n = V(
|
|
4554
4548
|
() => e ? new Date(e).getTime() : null,
|
|
4555
4549
|
[e]
|
|
@@ -4568,7 +4562,7 @@ function Gn(e) {
|
|
|
4568
4562
|
function ie(e) {
|
|
4569
4563
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
4570
4564
|
}
|
|
4571
|
-
function
|
|
4565
|
+
function dd(e) {
|
|
4572
4566
|
if (!ie(e)) return null;
|
|
4573
4567
|
const n = typeof e.subject == "string" ? e.subject : null, r = typeof e.body == "string" ? e.body : null, a = Array.isArray(e.recipients) ? e.recipients.flatMap((l) => !ie(l) || typeof l.label != "string" ? [] : [
|
|
4574
4568
|
{
|
|
@@ -4598,7 +4592,7 @@ function ld(e) {
|
|
|
4598
4592
|
...typeof e.attachmentNotice == "string" ? { attachmentNotice: e.attachmentNotice } : {}
|
|
4599
4593
|
};
|
|
4600
4594
|
}
|
|
4601
|
-
function
|
|
4595
|
+
function cd(e) {
|
|
4602
4596
|
if (!ie(e)) return null;
|
|
4603
4597
|
const n = typeof e.channel == "string" ? e.channel : null, r = typeof e.text == "string" ? e.text : null, a = Array.isArray(e.blocks) ? e.blocks.filter(ie) : null;
|
|
4604
4598
|
if (!n || !r || !a) return null;
|
|
@@ -4616,7 +4610,7 @@ function dd(e) {
|
|
|
4616
4610
|
...o ? { thread: o } : {}
|
|
4617
4611
|
};
|
|
4618
4612
|
}
|
|
4619
|
-
function
|
|
4613
|
+
function ud(e) {
|
|
4620
4614
|
if (!ie(e)) return null;
|
|
4621
4615
|
if (e.type === "email") {
|
|
4622
4616
|
const n = typeof e.address == "string" ? e.address : null;
|
|
@@ -4656,13 +4650,13 @@ function cd(e) {
|
|
|
4656
4650
|
}
|
|
4657
4651
|
return null;
|
|
4658
4652
|
}
|
|
4659
|
-
function
|
|
4653
|
+
function ps(e) {
|
|
4660
4654
|
if (!ie(e.result)) return null;
|
|
4661
4655
|
const n = ie(e.result.deliveryReadiness) ? e.result.deliveryReadiness : null, r = n && ie(n.intent) ? n.intent : null, a = ie(e.result.deliveryPackage) ? e.result.deliveryPackage : null, o = ie(e.result.deliveryResult) ? e.result.deliveryResult : null, i = ie(e.result.package) ? e.result.package : null, l = typeof (a == null ? void 0 : a.subject) == "string" && a.subject || typeof (n == null ? void 0 : n.subject) == "string" && n.subject || typeof (r == null ? void 0 : r.subject) == "string" && r.subject || typeof e.result.title == "string" && e.result.title || "Briefing email", c = typeof (a == null ? void 0 : a.bodyMarkdown) == "string" && a.bodyMarkdown || typeof (r == null ? void 0 : r.body) == "string" && r.body || typeof e.result.summary == "string" && e.result.summary || "", d = typeof (a == null ? void 0 : a.bodyHtml) == "string" && a.bodyHtml.trim() ? a.bodyHtml : null;
|
|
4662
4656
|
if (!c)
|
|
4663
4657
|
return null;
|
|
4664
4658
|
const u = Array.isArray(r == null ? void 0 : r.recipients) ? r.recipients.flatMap((h) => {
|
|
4665
|
-
const b =
|
|
4659
|
+
const b = ud(h);
|
|
4666
4660
|
return b ? [b] : [];
|
|
4667
4661
|
}) : [], p = Array.isArray(r == null ? void 0 : r.channels) ? r.channels.filter((h) => typeof h == "string") : typeof (o == null ? void 0 : o.channel) == "string" ? [o.channel] : [], f = Array.isArray(i == null ? void 0 : i.attachments) ? i.attachments.flatMap((h) => ie(h) ? typeof h.label == "string" ? [h.label] : typeof h.title == "string" ? [h.title] : typeof h.filename == "string" ? [h.filename] : [] : []) : [];
|
|
4668
4662
|
return {
|
|
@@ -4674,7 +4668,7 @@ function fs(e) {
|
|
|
4674
4668
|
attachments: f
|
|
4675
4669
|
};
|
|
4676
4670
|
}
|
|
4677
|
-
function
|
|
4671
|
+
function fs({
|
|
4678
4672
|
html: e,
|
|
4679
4673
|
title: n = "Briefing HTML artifact",
|
|
4680
4674
|
className: r
|
|
@@ -4739,7 +4733,7 @@ function aa(e, n) {
|
|
|
4739
4733
|
message: typeof r.message == "string" ? r.message : ""
|
|
4740
4734
|
};
|
|
4741
4735
|
}
|
|
4742
|
-
function
|
|
4736
|
+
function md(e) {
|
|
4743
4737
|
return e.status === "SUCCESS" ? "Complete" : e.status === "FAILED" ? "Failed" : e.status === "RUNNING" ? "Running" : "Queued";
|
|
4744
4738
|
}
|
|
4745
4739
|
function Jn(e) {
|
|
@@ -4787,7 +4781,7 @@ function Jn(e) {
|
|
|
4787
4781
|
message: typeof a.message == "string" ? a.message : ""
|
|
4788
4782
|
};
|
|
4789
4783
|
}
|
|
4790
|
-
function
|
|
4784
|
+
function hd(e) {
|
|
4791
4785
|
var n, r, a, o;
|
|
4792
4786
|
if (e.channel === "BRIEFING" || e.channels) {
|
|
4793
4787
|
const i = (r = (n = e.channels) == null ? void 0 : n.email) == null ? void 0 : r.status, l = (o = (a = e.channels) == null ? void 0 : a.slack) == null ? void 0 : o.status;
|
|
@@ -4808,19 +4802,19 @@ function md(e) {
|
|
|
4808
4802
|
}
|
|
4809
4803
|
return e.status === "SENT" ? e.channel === "SLACK" ? "Slack sent" : e.sentCount === 1 ? "Email sent" : `${e.sentCount} emails sent` : e.status === "FAILED" ? e.channel === "SLACK" ? "Slack failed" : e.failedCount === 1 ? "Email failed" : `${e.failedCount || e.attemptedCount || 0} emails failed` : e.status === "NOT_CONFIGURED" ? "Email not configured" : e.message || "Email delivery skipped";
|
|
4810
4804
|
}
|
|
4811
|
-
function
|
|
4805
|
+
function pd(e) {
|
|
4812
4806
|
return e.status === "SENT" ? Y.success.surface : e.status === "FAILED" || e.status === "PARTIAL" ? Y.danger.surface : Y.warning.surface;
|
|
4813
4807
|
}
|
|
4814
|
-
function
|
|
4808
|
+
function gs(e) {
|
|
4815
4809
|
return e.status === "SUCCESS" ? /* @__PURE__ */ t(He, { className: v("h-3 w-3", Y.success.icon) }) : e.status === "FAILED" ? /* @__PURE__ */ t(Ce, { className: v("h-3 w-3", Y.danger.icon) }) : e.status === "RUNNING" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : /* @__PURE__ */ t("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-muted-foreground/70" });
|
|
4816
4810
|
}
|
|
4817
|
-
const
|
|
4811
|
+
const fd = [
|
|
4818
4812
|
{ pattern: /^plan preview/i, label: "Plan preview" },
|
|
4819
4813
|
{ pattern: /^analysis preview/i, label: "Analysis preview" }
|
|
4820
4814
|
];
|
|
4821
|
-
function
|
|
4815
|
+
function gd(e) {
|
|
4822
4816
|
const n = e.runtime.split(/;\s*/).map((o) => o.trim()).filter(Boolean), r = e.toolCalls.split(/;\s*/).map((o) => o.trim()).filter(Boolean), a = [];
|
|
4823
|
-
for (const { pattern: o, label: i } of
|
|
4817
|
+
for (const { pattern: o, label: i } of fd) {
|
|
4824
4818
|
const l = sa(
|
|
4825
4819
|
n.find((d) => o.test(d))
|
|
4826
4820
|
), c = sa(
|
|
@@ -4837,7 +4831,7 @@ function sa(e) {
|
|
|
4837
4831
|
).replace(/[.;]\s*$/, "").trim() || null;
|
|
4838
4832
|
}
|
|
4839
4833
|
const oa = 3;
|
|
4840
|
-
function
|
|
4834
|
+
function bd({
|
|
4841
4835
|
previewPlan: e,
|
|
4842
4836
|
previewRun: n,
|
|
4843
4837
|
scopeLabel: r
|
|
@@ -4850,7 +4844,7 @@ function gd({
|
|
|
4850
4844
|
Re,
|
|
4851
4845
|
{
|
|
4852
4846
|
field: "Datasets",
|
|
4853
|
-
value: /* @__PURE__ */ t(
|
|
4847
|
+
value: /* @__PURE__ */ t(Md, { plan: e })
|
|
4854
4848
|
}
|
|
4855
4849
|
),
|
|
4856
4850
|
/* @__PURE__ */ t(
|
|
@@ -4884,11 +4878,11 @@ function gd({
|
|
|
4884
4878
|
)
|
|
4885
4879
|
] })
|
|
4886
4880
|
] }),
|
|
4887
|
-
e.scope.grounding ? /* @__PURE__ */ t(
|
|
4881
|
+
e.scope.grounding ? /* @__PURE__ */ t(xd, { plan: e }) : null,
|
|
4888
4882
|
/* @__PURE__ */ s("div", { children: [
|
|
4889
4883
|
/* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "What I'll do" }),
|
|
4890
4884
|
/* @__PURE__ */ t("ol", { className: "space-y-3", children: e.steps.map((a) => /* @__PURE__ */ t(
|
|
4891
|
-
|
|
4885
|
+
Bd,
|
|
4892
4886
|
{
|
|
4893
4887
|
order: a.order,
|
|
4894
4888
|
title: a.title,
|
|
@@ -4911,7 +4905,7 @@ function gd({
|
|
|
4911
4905
|
/* @__PURE__ */ t("div", { className: Z, children: "Estimate" }),
|
|
4912
4906
|
(() => {
|
|
4913
4907
|
var l;
|
|
4914
|
-
const o =
|
|
4908
|
+
const o = gd(e.estimate).find(
|
|
4915
4909
|
(c) => c.label.toLowerCase().includes("analysis")
|
|
4916
4910
|
), i = (o == null ? void 0 : o.duration) ?? ((l = e.estimate.runtime) == null ? void 0 : l.trim()) ?? null;
|
|
4917
4911
|
return /* @__PURE__ */ t("div", { className: "mt-1 text-[12px] tabular-nums text-foreground/80", children: i ?? "—" });
|
|
@@ -4922,10 +4916,10 @@ function gd({
|
|
|
4922
4916
|
/* @__PURE__ */ t(je, { className: "mt-0.5 h-3 w-3 shrink-0" }),
|
|
4923
4917
|
/* @__PURE__ */ t("ul", { className: "space-y-0.5", children: e.ambiguities.map((a) => /* @__PURE__ */ t("li", { children: a }, a)) })
|
|
4924
4918
|
] }) }) : null,
|
|
4925
|
-
n && !it(n.status) ? /* @__PURE__ */ t(
|
|
4919
|
+
n && !it(n.status) ? /* @__PURE__ */ t(bs, { run: n, labelPrefix: "Preview" }) : null
|
|
4926
4920
|
] });
|
|
4927
4921
|
}
|
|
4928
|
-
function
|
|
4922
|
+
function xd({ plan: e }) {
|
|
4929
4923
|
const n = e.scope.grounding;
|
|
4930
4924
|
if (!n)
|
|
4931
4925
|
return null;
|
|
@@ -4948,13 +4942,13 @@ function bd({ plan: e }) {
|
|
|
4948
4942
|
] })
|
|
4949
4943
|
] });
|
|
4950
4944
|
}
|
|
4951
|
-
function
|
|
4945
|
+
function bs({
|
|
4952
4946
|
run: e,
|
|
4953
4947
|
labelPrefix: n
|
|
4954
4948
|
}) {
|
|
4955
4949
|
const r = e.progress ?? null, a = r ? (r.recentEvents ?? []).filter(
|
|
4956
4950
|
(d) => d.label !== r.label || d.updatedAt !== r.updatedAt
|
|
4957
|
-
).slice(-4).reverse() : [], o = it(e.status), i = r ? zt(r.label) : `${n ? `${n} ` : ""}${
|
|
4951
|
+
).slice(-4).reverse() : [], o = it(e.status), i = r ? zt(r.label) : `${n ? `${n} ` : ""}${md(e)}`, l = Ns(e), c = r != null && r.updatedAt ? new Date(r.updatedAt).toLocaleTimeString([], {
|
|
4958
4952
|
hour: "numeric",
|
|
4959
4953
|
minute: "2-digit",
|
|
4960
4954
|
second: "2-digit"
|
|
@@ -4968,7 +4962,7 @@ function xs({
|
|
|
4968
4962
|
/* @__PURE__ */ s("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4969
4963
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
4970
4964
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 text-[12px] text-foreground", children: [
|
|
4971
|
-
o ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) :
|
|
4965
|
+
o ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin text-muted-foreground" }) : gs(e),
|
|
4972
4966
|
/* @__PURE__ */ t("span", { className: "font-medium", children: i })
|
|
4973
4967
|
] }),
|
|
4974
4968
|
r != null && r.detail && e.status !== "FAILED" ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] text-muted-foreground", children: r.detail }) : null
|
|
@@ -4983,7 +4977,7 @@ function xs({
|
|
|
4983
4977
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
4984
4978
|
children: [
|
|
4985
4979
|
/* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
4986
|
-
/* @__PURE__ */ t("span", { children:
|
|
4980
|
+
/* @__PURE__ */ t("span", { children: vs(d.label) })
|
|
4987
4981
|
]
|
|
4988
4982
|
},
|
|
4989
4983
|
`${d.updatedAt}-${d.label}-${u}`
|
|
@@ -4994,7 +4988,7 @@ function xs({
|
|
|
4994
4988
|
}
|
|
4995
4989
|
);
|
|
4996
4990
|
}
|
|
4997
|
-
function
|
|
4991
|
+
function xs({
|
|
4998
4992
|
run: e,
|
|
4999
4993
|
onRetryRun: n,
|
|
5000
4994
|
retryDisabled: r,
|
|
@@ -5002,7 +4996,7 @@ function ys({
|
|
|
5002
4996
|
onDeleteRun: o,
|
|
5003
4997
|
deletePending: i
|
|
5004
4998
|
}) {
|
|
5005
|
-
const [l, c] = S(!1), [d, u] = S(!1), p =
|
|
4999
|
+
const [l, c] = S(!1), [d, u] = S(!1), p = ys(
|
|
5006
5000
|
e.completedAt ?? e.startedAt ?? e.scheduledFor
|
|
5007
5001
|
), h = (e.error ? /cancel/i.test(e.error) : !1) ? "Run cancelled" : "Run failed";
|
|
5008
5002
|
return /* @__PURE__ */ s(
|
|
@@ -5061,7 +5055,7 @@ function ys({
|
|
|
5061
5055
|
type: "button",
|
|
5062
5056
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
5063
5057
|
"aria-label": "More run actions",
|
|
5064
|
-
children: /* @__PURE__ */ t(
|
|
5058
|
+
children: /* @__PURE__ */ t(Ma, { className: "h-3.5 w-3.5" })
|
|
5065
5059
|
}
|
|
5066
5060
|
) }),
|
|
5067
5061
|
/* @__PURE__ */ t(Fn, { align: "end", className: "z-[60] w-44", children: /* @__PURE__ */ s(
|
|
@@ -5095,7 +5089,7 @@ function ys({
|
|
|
5095
5089
|
/* @__PURE__ */ s($n, { children: [
|
|
5096
5090
|
/* @__PURE__ */ t(Un, { disabled: i, children: "Cancel" }),
|
|
5097
5091
|
/* @__PURE__ */ s(
|
|
5098
|
-
|
|
5092
|
+
Ba,
|
|
5099
5093
|
{
|
|
5100
5094
|
disabled: i,
|
|
5101
5095
|
onClick: (b) => {
|
|
@@ -5116,20 +5110,20 @@ function ys({
|
|
|
5116
5110
|
}
|
|
5117
5111
|
);
|
|
5118
5112
|
}
|
|
5119
|
-
function
|
|
5113
|
+
function yd({ run: e }) {
|
|
5120
5114
|
const n = Jn(e);
|
|
5121
|
-
return !
|
|
5115
|
+
return !ms(e.status) || !n || n.status === "SKIPPED" ? null : /* @__PURE__ */ s(
|
|
5122
5116
|
"div",
|
|
5123
5117
|
{
|
|
5124
5118
|
className: v(
|
|
5125
5119
|
"rounded-card border px-3 py-2 text-[12px]",
|
|
5126
|
-
|
|
5120
|
+
pd(n)
|
|
5127
5121
|
),
|
|
5128
5122
|
"aria-label": "Email delivery status",
|
|
5129
5123
|
children: [
|
|
5130
5124
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 font-medium", children: [
|
|
5131
5125
|
/* @__PURE__ */ t(Ei, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
5132
|
-
/* @__PURE__ */ t("span", { children:
|
|
5126
|
+
/* @__PURE__ */ t("span", { children: hd(n) })
|
|
5133
5127
|
] }),
|
|
5134
5128
|
n.message ? /* @__PURE__ */ t("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-80", children: n.message }) : null,
|
|
5135
5129
|
/* @__PURE__ */ s("p", { className: "mt-1 text-[11px] leading-[1.5] opacity-70", children: [
|
|
@@ -5140,7 +5134,7 @@ function xd({ run: e }) {
|
|
|
5140
5134
|
}
|
|
5141
5135
|
);
|
|
5142
5136
|
}
|
|
5143
|
-
function
|
|
5137
|
+
function ys(e) {
|
|
5144
5138
|
if (!e)
|
|
5145
5139
|
return null;
|
|
5146
5140
|
const n = new Date(e);
|
|
@@ -5151,11 +5145,11 @@ function vs(e) {
|
|
|
5151
5145
|
minute: "2-digit"
|
|
5152
5146
|
});
|
|
5153
5147
|
}
|
|
5154
|
-
function
|
|
5148
|
+
function vd(e) {
|
|
5155
5149
|
const n = Jn(e);
|
|
5156
5150
|
return e.status === "FAILED" ? (n == null ? void 0 : n.status) === "FAILED" ? "Last email failed" : "Last run failed" : (n == null ? void 0 : n.channel) === "BRIEFING" || n != null && n.channels ? n.status === "SENT" ? "Last delivery sent" : n.status === "FAILED" || n.status === "PARTIAL" ? "Last delivery failed" : "Last delivery completed" : (n == null ? void 0 : n.status) === "SENT" ? n.channel === "SLACK" ? "Last Slack sent" : n.sentCount === 1 ? "Last email sent" : "Last emails sent" : (n == null ? void 0 : n.status) === "FAILED" ? "Last email failed" : "Last run completed";
|
|
5157
5151
|
}
|
|
5158
|
-
function
|
|
5152
|
+
function Nd({
|
|
5159
5153
|
run: e,
|
|
5160
5154
|
onViewOutput: n,
|
|
5161
5155
|
onDeleteRun: r,
|
|
@@ -5164,12 +5158,12 @@ function vd({
|
|
|
5164
5158
|
retryDisabledReason: i,
|
|
5165
5159
|
deletePending: l
|
|
5166
5160
|
}) {
|
|
5167
|
-
const c = Jn(e), d =
|
|
5161
|
+
const c = Jn(e), d = ys(
|
|
5168
5162
|
e.completedAt ?? e.startedAt ?? e.scheduledFor
|
|
5169
5163
|
);
|
|
5170
5164
|
if (e.status === "FAILED" || (c == null ? void 0 : c.status) === "FAILED")
|
|
5171
5165
|
return /* @__PURE__ */ t(
|
|
5172
|
-
|
|
5166
|
+
xs,
|
|
5173
5167
|
{
|
|
5174
5168
|
run: e,
|
|
5175
5169
|
onRetryRun: a,
|
|
@@ -5201,8 +5195,8 @@ function vd({
|
|
|
5201
5195
|
Y.success.label
|
|
5202
5196
|
),
|
|
5203
5197
|
children: [
|
|
5204
|
-
|
|
5205
|
-
/* @__PURE__ */ t("span", { children:
|
|
5198
|
+
gs(e),
|
|
5199
|
+
/* @__PURE__ */ t("span", { children: vd(e) }),
|
|
5206
5200
|
d ? /* @__PURE__ */ t("span", { className: "font-normal text-muted-foreground", children: d }) : null
|
|
5207
5201
|
]
|
|
5208
5202
|
}
|
|
@@ -5216,7 +5210,7 @@ function vd({
|
|
|
5216
5210
|
className: _e,
|
|
5217
5211
|
onClick: n,
|
|
5218
5212
|
children: [
|
|
5219
|
-
/* @__PURE__ */ t(
|
|
5213
|
+
/* @__PURE__ */ t(Pa, { className: "h-3 w-3" }),
|
|
5220
5214
|
"View output"
|
|
5221
5215
|
]
|
|
5222
5216
|
}
|
|
@@ -5228,7 +5222,7 @@ function vd({
|
|
|
5228
5222
|
function zt(e) {
|
|
5229
5223
|
return e.replace(/\s+(started|completed)$/i, "");
|
|
5230
5224
|
}
|
|
5231
|
-
function
|
|
5225
|
+
function vs(e) {
|
|
5232
5226
|
const n = /^(.*)\s+(started|completed)$/i.exec(e.trim());
|
|
5233
5227
|
if (!n)
|
|
5234
5228
|
return e;
|
|
@@ -5237,7 +5231,7 @@ function Ns(e) {
|
|
|
5237
5231
|
}
|
|
5238
5232
|
const ia = 4;
|
|
5239
5233
|
function la({ run: e }) {
|
|
5240
|
-
const n = e.progress ?? null, r = n ?
|
|
5234
|
+
const n = e.progress ?? null, r = n ? wd(n.recentEvents ?? [], n.label).slice(-ia).reverse() : [], a = n != null && n.detail && n.detail !== n.label ? n.detail : null, o = Ns(e), i = [...r];
|
|
5241
5235
|
for (; i.length < ia; )
|
|
5242
5236
|
i.push(null);
|
|
5243
5237
|
return /* @__PURE__ */ s("div", { className: "border-b border-border bg-muted/60 px-4 py-3", children: [
|
|
@@ -5250,7 +5244,7 @@ function la({ run: e }) {
|
|
|
5250
5244
|
className: "flex items-start gap-2 text-[11px] leading-[1.45] text-muted-foreground",
|
|
5251
5245
|
children: l ? /* @__PURE__ */ s(ae, { children: [
|
|
5252
5246
|
/* @__PURE__ */ t(He, { className: "mt-0.5 h-3 w-3 shrink-0 text-border" }),
|
|
5253
|
-
/* @__PURE__ */ t("span", { children:
|
|
5247
|
+
/* @__PURE__ */ t("span", { children: vs(l.label) })
|
|
5254
5248
|
] }) : /* @__PURE__ */ s(ae, { children: [
|
|
5255
5249
|
/* @__PURE__ */ t("span", { className: "mt-1.5 inline-block h-px w-3 shrink-0 bg-border" }),
|
|
5256
5250
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" })
|
|
@@ -5270,7 +5264,7 @@ function la({ run: e }) {
|
|
|
5270
5264
|
o.length > 0 ? /* @__PURE__ */ t("p", { className: "mt-2 text-[11px] leading-[1.55] text-muted-foreground", children: o.join(" ") }) : null
|
|
5271
5265
|
] });
|
|
5272
5266
|
}
|
|
5273
|
-
function
|
|
5267
|
+
function wd(e, n) {
|
|
5274
5268
|
const r = n ? n.replace(/\s+(started|completed)$/i, "").trim().toLowerCase() : null, a = r ? e.filter((c) => c.label.replace(/\s+(started|completed)$/i, "").trim().toLowerCase() !== r) : e.slice(), o = /* @__PURE__ */ new Set();
|
|
5275
5269
|
for (const c of a) {
|
|
5276
5270
|
const d = /^(.*)\s+completed$/i.exec(c.label.trim());
|
|
@@ -5287,7 +5281,7 @@ function Nd(e, n) {
|
|
|
5287
5281
|
l.set(c.label.trim().toLowerCase(), c);
|
|
5288
5282
|
return Array.from(l.values());
|
|
5289
5283
|
}
|
|
5290
|
-
function
|
|
5284
|
+
function Cd() {
|
|
5291
5285
|
return /* @__PURE__ */ t(
|
|
5292
5286
|
"div",
|
|
5293
5287
|
{
|
|
@@ -5305,12 +5299,12 @@ function wd() {
|
|
|
5305
5299
|
}
|
|
5306
5300
|
);
|
|
5307
5301
|
}
|
|
5308
|
-
function
|
|
5302
|
+
function kd({
|
|
5309
5303
|
run: e,
|
|
5310
5304
|
onExpand: n
|
|
5311
5305
|
}) {
|
|
5312
5306
|
var o;
|
|
5313
|
-
const r =
|
|
5307
|
+
const r = hs(e.startedAt), a = (o = e.progress) != null && o.label ? zt(e.progress.label) : "Briefing running";
|
|
5314
5308
|
return /* @__PURE__ */ s("div", { className: "fixed bottom-4 right-4 z-50 w-[320px] overflow-hidden rounded-card border border-border bg-background shadow-md", children: [
|
|
5315
5309
|
/* @__PURE__ */ s(
|
|
5316
5310
|
"button",
|
|
@@ -5332,7 +5326,7 @@ function Cd({
|
|
|
5332
5326
|
/* @__PURE__ */ t("div", { className: "border-t border-border/60 bg-muted px-3 py-1.5", children: /* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "We'll notify you when it's ready" }) })
|
|
5333
5327
|
] });
|
|
5334
5328
|
}
|
|
5335
|
-
function
|
|
5329
|
+
function Sd({
|
|
5336
5330
|
title: e,
|
|
5337
5331
|
durationSeconds: n,
|
|
5338
5332
|
status: r,
|
|
@@ -5400,10 +5394,10 @@ function kd({
|
|
|
5400
5394
|
}
|
|
5401
5395
|
);
|
|
5402
5396
|
}
|
|
5403
|
-
function
|
|
5397
|
+
function Ad({
|
|
5404
5398
|
run: e
|
|
5405
5399
|
}) {
|
|
5406
|
-
const n =
|
|
5400
|
+
const n = hs(e == null ? void 0 : e.startedAt);
|
|
5407
5401
|
return n === null ? null : /* @__PURE__ */ s("span", { className: "font-mono text-[11px] tabular-nums text-muted-foreground", children: [
|
|
5408
5402
|
"· ",
|
|
5409
5403
|
Gn(n)
|
|
@@ -5433,7 +5427,7 @@ function Ed({
|
|
|
5433
5427
|
children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2 px-4 py-2 text-[12px]", children: [
|
|
5434
5428
|
/* @__PURE__ */ t(ne, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground" }),
|
|
5435
5429
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate font-medium text-foreground", children: u }),
|
|
5436
|
-
/* @__PURE__ */ t(
|
|
5430
|
+
/* @__PURE__ */ t(Ad, { run: b }),
|
|
5437
5431
|
h ? /* @__PURE__ */ s(ae, { children: [
|
|
5438
5432
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-border", children: "·" }),
|
|
5439
5433
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-muted-foreground", children: p })
|
|
@@ -5490,17 +5484,17 @@ function Ed({
|
|
|
5490
5484
|
}
|
|
5491
5485
|
);
|
|
5492
5486
|
}
|
|
5493
|
-
function
|
|
5487
|
+
function Ns(e) {
|
|
5494
5488
|
if (!e.result || typeof e.result != "object" || Array.isArray(e.result))
|
|
5495
5489
|
return [];
|
|
5496
5490
|
const n = e.result.warnings;
|
|
5497
5491
|
return Array.isArray(n) ? n.filter((r) => typeof r == "string") : [];
|
|
5498
5492
|
}
|
|
5499
|
-
function
|
|
5493
|
+
function Id(e) {
|
|
5500
5494
|
var n, r;
|
|
5501
5495
|
return ((r = (n = e.result) == null ? void 0 : n.limits) == null ? void 0 : r.previewKind) === "email_package";
|
|
5502
5496
|
}
|
|
5503
|
-
function
|
|
5497
|
+
function ws({
|
|
5504
5498
|
children: e,
|
|
5505
5499
|
muted: n
|
|
5506
5500
|
}) {
|
|
@@ -5515,7 +5509,7 @@ function Cs({
|
|
|
5515
5509
|
}
|
|
5516
5510
|
);
|
|
5517
5511
|
}
|
|
5518
|
-
function
|
|
5512
|
+
function Dd({
|
|
5519
5513
|
recipient: e
|
|
5520
5514
|
}) {
|
|
5521
5515
|
const [n, r] = S(!1), a = e.previewMembers ?? [];
|
|
@@ -5555,12 +5549,12 @@ function Id({
|
|
|
5555
5549
|
" members"
|
|
5556
5550
|
] }) : null
|
|
5557
5551
|
] }) : null
|
|
5558
|
-
] }) : /* @__PURE__ */ s(
|
|
5552
|
+
] }) : /* @__PURE__ */ s(ws, { children: [
|
|
5559
5553
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: e.label }),
|
|
5560
5554
|
e.detail ? /* @__PURE__ */ t("span", { className: "ml-1.5 min-w-0 truncate text-muted-foreground", children: e.detail }) : null
|
|
5561
5555
|
] });
|
|
5562
5556
|
}
|
|
5563
|
-
function
|
|
5557
|
+
function Cs({
|
|
5564
5558
|
markdown: e,
|
|
5565
5559
|
className: n
|
|
5566
5560
|
}) {
|
|
@@ -5628,7 +5622,7 @@ function Qn({
|
|
|
5628
5622
|
/* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-[11px] text-muted-foreground", children: [
|
|
5629
5623
|
/* @__PURE__ */ t("span", { className: "text-muted-foreground/70", children: "To" }),
|
|
5630
5624
|
e.recipients.length > 0 ? e.recipients.map((l, c) => /* @__PURE__ */ t(
|
|
5631
|
-
|
|
5625
|
+
Dd,
|
|
5632
5626
|
{
|
|
5633
5627
|
recipient: l
|
|
5634
5628
|
},
|
|
@@ -5645,11 +5639,11 @@ function Qn({
|
|
|
5645
5639
|
] }),
|
|
5646
5640
|
o || n ? /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
5647
5641
|
o ? /* @__PURE__ */ t(
|
|
5648
|
-
|
|
5642
|
+
io,
|
|
5649
5643
|
{
|
|
5650
5644
|
value: r,
|
|
5651
5645
|
onValueChange: (l) => a(l === "html" ? "html" : "rendered"),
|
|
5652
|
-
children: /* @__PURE__ */ s(
|
|
5646
|
+
children: /* @__PURE__ */ s(lo, { size: "xs", children: [
|
|
5653
5647
|
/* @__PURE__ */ t(Tr, { value: "rendered", children: "Rendered" }),
|
|
5654
5648
|
/* @__PURE__ */ t(Tr, { value: "html", children: "HTML" })
|
|
5655
5649
|
] })
|
|
@@ -5668,17 +5662,17 @@ function Qn({
|
|
|
5668
5662
|
] }) : null
|
|
5669
5663
|
] }),
|
|
5670
5664
|
r === "html" && o ? /* @__PURE__ */ t(
|
|
5671
|
-
|
|
5665
|
+
fs,
|
|
5672
5666
|
{
|
|
5673
5667
|
html: e.bodyHtml ?? "",
|
|
5674
5668
|
title: "Briefing email HTML preview",
|
|
5675
5669
|
className: "h-[620px] rounded-none border-0"
|
|
5676
5670
|
}
|
|
5677
|
-
) : /* @__PURE__ */ t(
|
|
5671
|
+
) : /* @__PURE__ */ t(Cs, { markdown: e.body, className: "px-4 py-3.5" }),
|
|
5678
5672
|
e.attachments.length > 0 || e.attachmentNotice ? /* @__PURE__ */ s("footer", { className: "border-t border-border/60 px-4 py-2", children: [
|
|
5679
5673
|
e.attachments.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
5680
5674
|
/* @__PURE__ */ t("span", { children: "Attached:" }),
|
|
5681
|
-
e.attachments.map((l) => /* @__PURE__ */ t(
|
|
5675
|
+
e.attachments.map((l) => /* @__PURE__ */ t(ws, { children: l }, l))
|
|
5682
5676
|
] }) : null,
|
|
5683
5677
|
e.attachmentNotice ? /* @__PURE__ */ s("div", { className: "mt-2 flex items-start gap-1.5 rounded-card border border-border bg-muted px-2.5 py-1.5 text-[11px] leading-[1.45] text-muted-foreground", children: [
|
|
5684
5678
|
/* @__PURE__ */ t(je, { className: "mt-0.5 h-3 w-3 shrink-0" }),
|
|
@@ -5692,17 +5686,17 @@ function dt(e) {
|
|
|
5692
5686
|
const n = e.text;
|
|
5693
5687
|
return typeof n == "string" ? n : null;
|
|
5694
5688
|
}
|
|
5695
|
-
function
|
|
5689
|
+
function Td(e) {
|
|
5696
5690
|
return e.type === "header" || e.type === "section" ? dt(e.text) : e.type === "context" && Array.isArray(e.elements) && e.elements.map((r) => ie(r) ? dt(r) : null).filter((r) => !!r).join(" · ") || null;
|
|
5697
5691
|
}
|
|
5698
|
-
function
|
|
5692
|
+
function Ld(e) {
|
|
5699
5693
|
return e.flatMap((n) => n.type !== "actions" || !Array.isArray(n.elements) ? [] : n.elements.flatMap((r) => {
|
|
5700
5694
|
if (!ie(r)) return [];
|
|
5701
5695
|
const a = dt(r.text);
|
|
5702
5696
|
return a ? [a] : [];
|
|
5703
5697
|
}));
|
|
5704
5698
|
}
|
|
5705
|
-
function
|
|
5699
|
+
function Rd(e) {
|
|
5706
5700
|
const n = {
|
|
5707
5701
|
header: null,
|
|
5708
5702
|
context: null,
|
|
@@ -5739,27 +5733,27 @@ function bn({ size: e = 6 }) {
|
|
|
5739
5733
|
}
|
|
5740
5734
|
);
|
|
5741
5735
|
}
|
|
5742
|
-
function
|
|
5736
|
+
function Fd({ channel: e }) {
|
|
5743
5737
|
const r = /^[CDG][A-Z0-9]{6,}$/.test(e) ? e : e.startsWith("#") ? e.slice(1) : e;
|
|
5744
5738
|
return /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
|
|
5745
5739
|
/* @__PURE__ */ t(zn, { className: "h-3 w-3" }),
|
|
5746
5740
|
/* @__PURE__ */ t("span", { className: "truncate", children: r })
|
|
5747
5741
|
] });
|
|
5748
5742
|
}
|
|
5749
|
-
function
|
|
5743
|
+
function Pd({
|
|
5750
5744
|
preview: e,
|
|
5751
5745
|
onExpand: n,
|
|
5752
5746
|
trustLine: r,
|
|
5753
5747
|
reactions: a
|
|
5754
5748
|
}) {
|
|
5755
|
-
const o =
|
|
5749
|
+
const o = Rd(e.blocks), i = o.header ? dt(o.header.text) : null, l = o.context ? Td(o.context) : null, c = o.sections.map((f) => dt(f.text)).filter((f) => !!f), d = o.actions ? Ld([o.actions]) : [], [u, p] = S(!0);
|
|
5756
5750
|
return /* @__PURE__ */ s("article", { className: "overflow-hidden rounded-card border border-border bg-background", children: [
|
|
5757
5751
|
/* @__PURE__ */ s("header", { className: "flex items-center justify-between gap-3 border-b border-border/60 px-4 py-3", children: [
|
|
5758
5752
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5759
5753
|
/* @__PURE__ */ t(kn, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
5760
5754
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
5761
5755
|
/* @__PURE__ */ t("h3", { className: "truncate text-[13px] font-semibold leading-5 text-foreground", children: "Slack message preview" }),
|
|
5762
|
-
/* @__PURE__ */ t("div", { className: "mt-0.5", children: /* @__PURE__ */ t(
|
|
5756
|
+
/* @__PURE__ */ t("div", { className: "mt-0.5", children: /* @__PURE__ */ t(Fd, { channel: e.channel }) })
|
|
5763
5757
|
] })
|
|
5764
5758
|
] }),
|
|
5765
5759
|
n ? /* @__PURE__ */ t(
|
|
@@ -5864,7 +5858,7 @@ function Re({
|
|
|
5864
5858
|
}
|
|
5865
5859
|
);
|
|
5866
5860
|
}
|
|
5867
|
-
function
|
|
5861
|
+
function Md({ plan: e }) {
|
|
5868
5862
|
const n = e.scope.datasets;
|
|
5869
5863
|
return n.length ? /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1.5", children: n.map((r) => /* @__PURE__ */ s(
|
|
5870
5864
|
"span",
|
|
@@ -5881,7 +5875,7 @@ function Pd({ plan: e }) {
|
|
|
5881
5875
|
/* @__PURE__ */ t("span", { children: "No reachable datasets discovered during plan preview. Choose a dashboard, domain, metric, or more specific business question before running." })
|
|
5882
5876
|
] });
|
|
5883
5877
|
}
|
|
5884
|
-
function
|
|
5878
|
+
function Bd({
|
|
5885
5879
|
order: e,
|
|
5886
5880
|
title: n,
|
|
5887
5881
|
detail: r,
|
|
@@ -5954,7 +5948,7 @@ function da({
|
|
|
5954
5948
|
fullWidth: r
|
|
5955
5949
|
}) {
|
|
5956
5950
|
var u, p, f, h, b;
|
|
5957
|
-
const a = e.result, o = (u = a == null ? void 0 : a.artifactPreview) == null ? void 0 : u.markdown, i = (p = a == null ? void 0 : a.artifactPreview) == null ? void 0 : p.html, l =
|
|
5951
|
+
const a = e.result, o = (u = a == null ? void 0 : a.artifactPreview) == null ? void 0 : u.markdown, i = (p = a == null ? void 0 : a.artifactPreview) == null ? void 0 : p.html, l = Id(e), c = l ? dd((f = a == null ? void 0 : a.limits) == null ? void 0 : f.emailPreview) : null, d = ((h = a == null ? void 0 : a.limits) == null ? void 0 : h.previewKind) === "slack_message" ? cd(a.limits.slackPreview) : null;
|
|
5958
5952
|
return /* @__PURE__ */ s(
|
|
5959
5953
|
"div",
|
|
5960
5954
|
{
|
|
@@ -5975,7 +5969,7 @@ function da({
|
|
|
5975
5969
|
{
|
|
5976
5970
|
type: "button",
|
|
5977
5971
|
onClick: n,
|
|
5978
|
-
className: v(
|
|
5972
|
+
className: v(Et, "h-6 px-1.5 text-[11px]"),
|
|
5979
5973
|
"aria-label": "Expand preview to a larger view",
|
|
5980
5974
|
children: [
|
|
5981
5975
|
/* @__PURE__ */ t(Tt, { className: "h-3 w-3" }),
|
|
@@ -5992,7 +5986,7 @@ function da({
|
|
|
5992
5986
|
] }) : null
|
|
5993
5987
|
] }),
|
|
5994
5988
|
c ? /* @__PURE__ */ t(Qn, { preview: c, onExpand: n }) : d ? /* @__PURE__ */ t(
|
|
5995
|
-
|
|
5989
|
+
Pd,
|
|
5996
5990
|
{
|
|
5997
5991
|
preview: d,
|
|
5998
5992
|
onExpand: n,
|
|
@@ -6005,10 +5999,10 @@ function da({
|
|
|
6005
5999
|
"rounded-card border border-border px-4 py-3",
|
|
6006
6000
|
l && "bg-background "
|
|
6007
6001
|
),
|
|
6008
|
-
children: /* @__PURE__ */ t(
|
|
6002
|
+
children: /* @__PURE__ */ t(Cs, { markdown: o })
|
|
6009
6003
|
}
|
|
6010
6004
|
) : i ? /* @__PURE__ */ t(
|
|
6011
|
-
|
|
6005
|
+
fs,
|
|
6012
6006
|
{
|
|
6013
6007
|
html: i,
|
|
6014
6008
|
title: "Briefing preview HTML artifact",
|
|
@@ -6032,10 +6026,10 @@ function ca({
|
|
|
6032
6026
|
retryDisabledReason: i,
|
|
6033
6027
|
deletePending: l
|
|
6034
6028
|
}) {
|
|
6035
|
-
const c =
|
|
6029
|
+
const c = ps(e), d = e.status === "FAILED";
|
|
6036
6030
|
return /* @__PURE__ */ s("div", { className: "space-y-4", "aria-label": "Briefing run result", children: [
|
|
6037
6031
|
d ? /* @__PURE__ */ t(
|
|
6038
|
-
|
|
6032
|
+
xs,
|
|
6039
6033
|
{
|
|
6040
6034
|
run: e,
|
|
6041
6035
|
onRetryRun: a,
|
|
@@ -6053,11 +6047,11 @@ function ca({
|
|
|
6053
6047
|
/* @__PURE__ */ t("div", { className: Z, children: "Briefing" }),
|
|
6054
6048
|
/* @__PURE__ */ t("article", { className: "mt-2 rounded-card border border-border px-4 py-3 text-[13px] leading-[1.55] text-foreground", children: e.result.summary })
|
|
6055
6049
|
] }) : null,
|
|
6056
|
-
/* @__PURE__ */ t(
|
|
6057
|
-
/* @__PURE__ */ t(
|
|
6050
|
+
/* @__PURE__ */ t(yd, { run: e }),
|
|
6051
|
+
/* @__PURE__ */ t(bs, { run: e, labelPrefix: "Run" })
|
|
6058
6052
|
] });
|
|
6059
6053
|
}
|
|
6060
|
-
function
|
|
6054
|
+
function Od({
|
|
6061
6055
|
previewRun: e,
|
|
6062
6056
|
isStale: n,
|
|
6063
6057
|
onViewOutput: r
|
|
@@ -6080,7 +6074,7 @@ function Bd({
|
|
|
6080
6074
|
className: _e,
|
|
6081
6075
|
onClick: r,
|
|
6082
6076
|
children: [
|
|
6083
|
-
/* @__PURE__ */ t(
|
|
6077
|
+
/* @__PURE__ */ t(Pa, { className: "h-3 w-3" }),
|
|
6084
6078
|
"View output"
|
|
6085
6079
|
]
|
|
6086
6080
|
}
|
|
@@ -6090,36 +6084,36 @@ function Bd({
|
|
|
6090
6084
|
function Ot(e, n) {
|
|
6091
6085
|
return e.includes(n) ? e : [...e, n];
|
|
6092
6086
|
}
|
|
6093
|
-
function
|
|
6087
|
+
function Vd(e, n) {
|
|
6094
6088
|
const r = e.filter((a) => a !== n);
|
|
6095
6089
|
return r.length > 0 ? r : [n];
|
|
6096
6090
|
}
|
|
6097
|
-
const
|
|
6098
|
-
createBriefing:
|
|
6091
|
+
const $d = {
|
|
6092
|
+
createBriefing: ll,
|
|
6099
6093
|
updateBriefing: Hn,
|
|
6100
|
-
pauseBriefing:
|
|
6101
|
-
resumeBriefing:
|
|
6102
|
-
deleteBriefing:
|
|
6103
|
-
getBriefing:
|
|
6104
|
-
runBriefingNow:
|
|
6105
|
-
getBriefingRun:
|
|
6106
|
-
cancelBriefingRun:
|
|
6107
|
-
deleteBriefingRun:
|
|
6108
|
-
previewBriefingPlan:
|
|
6109
|
-
runBriefingPreview:
|
|
6110
|
-
getBriefingPreviewRun:
|
|
6111
|
-
polishBriefingText:
|
|
6112
|
-
}, ua = 2e3,
|
|
6113
|
-
function
|
|
6094
|
+
pauseBriefing: Ga,
|
|
6095
|
+
resumeBriefing: Ja,
|
|
6096
|
+
deleteBriefing: Qa,
|
|
6097
|
+
getBriefing: Wa,
|
|
6098
|
+
runBriefingNow: Ya,
|
|
6099
|
+
getBriefingRun: Za,
|
|
6100
|
+
cancelBriefingRun: ml,
|
|
6101
|
+
deleteBriefingRun: hl,
|
|
6102
|
+
previewBriefingPlan: dl,
|
|
6103
|
+
runBriefingPreview: cl,
|
|
6104
|
+
getBriefingPreviewRun: ul,
|
|
6105
|
+
polishBriefingText: pl
|
|
6106
|
+
}, ua = 2e3, Ud = 10 * 6e4, _d = 20 * 6e4;
|
|
6107
|
+
function jd() {
|
|
6114
6108
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
6115
6109
|
}
|
|
6116
|
-
function
|
|
6110
|
+
function Ae(e) {
|
|
6117
6111
|
return e instanceof Error && e.message ? e.message : "Something went wrong. Please try again.";
|
|
6118
6112
|
}
|
|
6119
|
-
function
|
|
6113
|
+
function zd(e, n) {
|
|
6120
6114
|
return `${e.replace(/\/$/, "")}${n}`;
|
|
6121
6115
|
}
|
|
6122
|
-
function
|
|
6116
|
+
function Kd(e, n) {
|
|
6123
6117
|
if (!e) return n;
|
|
6124
6118
|
try {
|
|
6125
6119
|
return new URL(n, new URL(e).origin).toString();
|
|
@@ -6128,7 +6122,7 @@ function zd(e, n) {
|
|
|
6128
6122
|
}
|
|
6129
6123
|
}
|
|
6130
6124
|
async function xn(e, n, r, a) {
|
|
6131
|
-
const o = await fetch(
|
|
6125
|
+
const o = await fetch(zd(e, r), {
|
|
6132
6126
|
cache: "no-store",
|
|
6133
6127
|
...a,
|
|
6134
6128
|
headers: {
|
|
@@ -6142,7 +6136,7 @@ async function xn(e, n, r, a) {
|
|
|
6142
6136
|
}
|
|
6143
6137
|
return i;
|
|
6144
6138
|
}
|
|
6145
|
-
function
|
|
6139
|
+
function ks(e, n) {
|
|
6146
6140
|
return n || (e != null && e.source ? {
|
|
6147
6141
|
source: e.source,
|
|
6148
6142
|
label: e.source.type === "dashboard" ? "This dashboard" : "This project"
|
|
@@ -6153,12 +6147,12 @@ function Ss(e, n) {
|
|
|
6153
6147
|
}
|
|
6154
6148
|
function ma(e) {
|
|
6155
6149
|
if (e.briefing)
|
|
6156
|
-
return
|
|
6157
|
-
const n =
|
|
6150
|
+
return At(e.briefing);
|
|
6151
|
+
const n = ks(
|
|
6158
6152
|
e.briefing,
|
|
6159
6153
|
e.sourceContext
|
|
6160
6154
|
);
|
|
6161
|
-
return
|
|
6155
|
+
return Ml({
|
|
6162
6156
|
source: n.source,
|
|
6163
6157
|
name: n.source.type === "dashboard" ? "Dashboard Briefing" : "Project Briefing",
|
|
6164
6158
|
instruction: Dn,
|
|
@@ -6170,10 +6164,10 @@ function ma(e) {
|
|
|
6170
6164
|
} : {}
|
|
6171
6165
|
});
|
|
6172
6166
|
}
|
|
6173
|
-
function
|
|
6167
|
+
function Hd(e) {
|
|
6174
6168
|
return e === "PAUSED" || e === "DISABLED" ? "bg-muted text-muted-foreground" : "bg-primary/10 text-primary";
|
|
6175
6169
|
}
|
|
6176
|
-
function
|
|
6170
|
+
function qd({
|
|
6177
6171
|
apiServiceUrl: e,
|
|
6178
6172
|
token: n,
|
|
6179
6173
|
briefing: r,
|
|
@@ -6181,7 +6175,7 @@ function Hd({
|
|
|
6181
6175
|
title: o = "Briefing",
|
|
6182
6176
|
className: i,
|
|
6183
6177
|
client: l,
|
|
6184
|
-
generateRequestId: c =
|
|
6178
|
+
generateRequestId: c = jd,
|
|
6185
6179
|
onSaved: d,
|
|
6186
6180
|
onDeleted: u,
|
|
6187
6181
|
onRunStarted: p,
|
|
@@ -6189,20 +6183,20 @@ function Hd({
|
|
|
6189
6183
|
onBack: h,
|
|
6190
6184
|
onMinimizeRun: b
|
|
6191
6185
|
}) {
|
|
6192
|
-
var Nr, wr, Cr, kr, Sr,
|
|
6193
|
-
const { authToken: D, tokenProps: k } = Dt(), { currentUser: N } =
|
|
6186
|
+
var Nr, wr, Cr, kr, Sr, Ar, Er;
|
|
6187
|
+
const { authToken: D, tokenProps: k } = Dt(), { currentUser: N } = La(), g = H((m) => m.dashboard), L = H((m) => m.theme), x = H((m) => m.selectedSheetId), C = H((m) => m.filterValues), T = H((m) => m.controlValues), $ = H(
|
|
6194
6188
|
(m) => m.semanticExecutionPayload
|
|
6195
6189
|
), R = H(
|
|
6196
6190
|
(m) => m.cardControlValuesMap
|
|
6197
|
-
),
|
|
6191
|
+
), E = H(
|
|
6198
6192
|
(m) => m.inlineFilterValuesMap
|
|
6199
6193
|
), P = H(
|
|
6200
6194
|
(m) => m.dashboardInputValues
|
|
6201
|
-
), z =
|
|
6202
|
-
() =>
|
|
6195
|
+
), z = co((m) => m.interactionStates), B = e ?? (k == null ? void 0 : k.apiServiceUrl), K = n ?? (D == null ? void 0 : D.accessToken), _ = V(() => ({ ...$d, ...l }), [l]), O = V(
|
|
6196
|
+
() => ks(r, a),
|
|
6203
6197
|
[r, a]
|
|
6204
6198
|
), J = V(
|
|
6205
|
-
() =>
|
|
6199
|
+
() => ld(N),
|
|
6206
6200
|
[N]
|
|
6207
6201
|
), [I, ve] = S(
|
|
6208
6202
|
r ?? null
|
|
@@ -6214,16 +6208,16 @@ function Hd({
|
|
|
6214
6208
|
})
|
|
6215
6209
|
), [se, X] = S(null), [De, ke] = S([]), [Te, U] = S(null), [et, Me] = S(null), [Le, tt] = S(
|
|
6216
6210
|
null
|
|
6217
|
-
), [W, Se] = S(null), [qe, j] = S(0), [ee, xt] = S(null), [Yn,
|
|
6211
|
+
), [W, Se] = S(null), [qe, j] = S(0), [ee, xt] = S(null), [Yn, A] = S(!1), [M, oe] = S("edit"), [be, we] = S(0), [lt, Es] = S(!1), [Is, qt] = S("EMAIL"), [Ds, Wt] = S(!1), [Zn, Gt] = S(null), [Ts, Jt] = S(!1), [le, Ls] = S(
|
|
6218
6212
|
null
|
|
6219
|
-
), [Qt, Xn] = S([]), [Lt, er] = S(!1), [tr, nr] = S(null), [
|
|
6213
|
+
), [Qt, Xn] = S([]), [Lt, er] = S(!1), [tr, nr] = S(null), [Rs, Fs] = S(0), [nt, Rt] = S(null), [Ps, Yt] = S(!1), [Zt, rr] = S(!1), [ar, sr] = S(null), [yt, Xt] = S(null);
|
|
6220
6214
|
ce(() => {
|
|
6221
6215
|
if (!yt) return;
|
|
6222
6216
|
const m = window.setTimeout(() => Xt(null), 12e3);
|
|
6223
6217
|
return () => window.clearTimeout(m);
|
|
6224
6218
|
}, [yt]);
|
|
6225
|
-
const or =
|
|
6226
|
-
activeRunId:
|
|
6219
|
+
const or = Ee(void 0), {
|
|
6220
|
+
activeRunId: Ms,
|
|
6227
6221
|
resetTerminalRun: ir,
|
|
6228
6222
|
startRun: en,
|
|
6229
6223
|
stop: tn
|
|
@@ -6231,7 +6225,7 @@ function Hd({
|
|
|
6231
6225
|
apiServiceUrl: B,
|
|
6232
6226
|
token: K,
|
|
6233
6227
|
intervalMs: ua,
|
|
6234
|
-
timeoutMs:
|
|
6228
|
+
timeoutMs: _d,
|
|
6235
6229
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => {
|
|
6236
6230
|
if (!(I != null && I.id))
|
|
6237
6231
|
throw new Error("Missing saved Briefing id for run polling.");
|
|
@@ -6249,7 +6243,7 @@ function Hd({
|
|
|
6249
6243
|
oe("result"), U(null);
|
|
6250
6244
|
},
|
|
6251
6245
|
onError: (m) => {
|
|
6252
|
-
U(`Unable to refresh briefing run status: ${
|
|
6246
|
+
U(`Unable to refresh briefing run status: ${Ae(m)}`);
|
|
6253
6247
|
},
|
|
6254
6248
|
onTimeout: () => {
|
|
6255
6249
|
U(
|
|
@@ -6257,14 +6251,14 @@ function Hd({
|
|
|
6257
6251
|
);
|
|
6258
6252
|
}
|
|
6259
6253
|
}), {
|
|
6260
|
-
activeRunId:
|
|
6261
|
-
startRun:
|
|
6254
|
+
activeRunId: Bs,
|
|
6255
|
+
startRun: Os,
|
|
6262
6256
|
stop: lr
|
|
6263
6257
|
} = In({
|
|
6264
6258
|
apiServiceUrl: B,
|
|
6265
6259
|
token: K,
|
|
6266
6260
|
intervalMs: ua,
|
|
6267
|
-
timeoutMs:
|
|
6261
|
+
timeoutMs: Ud,
|
|
6268
6262
|
fetchRun: ({ apiServiceUrl: m, token: y, runId: F }) => _.getBriefingPreviewRun(
|
|
6269
6263
|
m,
|
|
6270
6264
|
y,
|
|
@@ -6277,7 +6271,7 @@ function Hd({
|
|
|
6277
6271
|
m.status === "FAILED" ? U(m.error || "Briefing preview failed.") : (U(null), oe("result"));
|
|
6278
6272
|
},
|
|
6279
6273
|
onError: (m) => {
|
|
6280
|
-
U(`Unable to refresh briefing preview status: ${
|
|
6274
|
+
U(`Unable to refresh briefing preview status: ${Ae(m)}`);
|
|
6281
6275
|
},
|
|
6282
6276
|
onTimeout: (m) => {
|
|
6283
6277
|
Se(
|
|
@@ -6289,18 +6283,18 @@ function Hd({
|
|
|
6289
6283
|
} : y
|
|
6290
6284
|
), U("Briefing preview status refresh timed out.");
|
|
6291
6285
|
}
|
|
6292
|
-
}), de = !!(I != null && I.id), nn = (I == null ? void 0 : I.status) === "PAUSED" || w.schedule.status === "PAUSED",
|
|
6286
|
+
}), de = !!(I != null && I.id), nn = (I == null ? void 0 : I.status) === "PAUSED" || w.schedule.status === "PAUSED", Vs = de && !!(I != null && I.scheduleExpr || w.schedule.enabled), rt = et ?? (I == null ? void 0 : I.latestRun) ?? null, xe = rt && it(rt.status) && Ms === rt.id ? rt : null, Ne = rt && ms(rt.status) ? rt : null, ye = M === "result" && ((W == null ? void 0 : W.status) === "SUCCESS" || Ne) ? "result" : M === "plan" && Le ? "plan" : "edit", $s = O.detail ?? (w.source.type === "dashboard" ? (
|
|
6293
6287
|
// Prefer the dashboard's actual title from the store; never expose
|
|
6294
6288
|
// the raw ID to end users.
|
|
6295
6289
|
(g == null ? void 0 : g.title) ?? null
|
|
6296
|
-
) : "All project data available to this token"), dr = (I == null ? void 0 : I.status) ?? w.schedule.status, rn = W !== null && it(W.status) &&
|
|
6290
|
+
) : "All project data available to this token"), dr = (I == null ? void 0 : I.status) ?? w.schedule.status, rn = W !== null && it(W.status) && Bs === W.id || xe !== null, We = se !== null || rn, Us = ye === "edit" && Ne !== null && !rn, an = (W == null ? void 0 : W.status) === "SUCCESS" && W.result ? W : null, _s = an !== null && ee !== null && ee !== qe, vt = Zn === "preview" ? W : null, Be = Zn === "saved" ? Ne : null, Nt = Be ? ps(Be) : null, js = ((Nr = vt == null ? void 0 : vt.result) == null ? void 0 : Nr.title) ?? (Nt == null ? void 0 : Nt.subject) ?? (ie(Be == null ? void 0 : Be.result) && typeof Be.result.title == "string" ? Be.result.title : null) ?? (I == null ? void 0 : I.name) ?? "Briefing preview", Ft = V(
|
|
6297
6291
|
() => ({
|
|
6298
6292
|
dashboard: g,
|
|
6299
6293
|
theme: L || "light",
|
|
6300
6294
|
filters: g == null ? void 0 : g.filters,
|
|
6301
6295
|
selectedSheetId: x,
|
|
6302
6296
|
filterValues: C,
|
|
6303
|
-
inlineFilterValuesMap:
|
|
6297
|
+
inlineFilterValuesMap: E,
|
|
6304
6298
|
controlValues: T,
|
|
6305
6299
|
controlDefinitions: (g == null ? void 0 : g.controls) || [],
|
|
6306
6300
|
dashboardControls: (g == null ? void 0 : g.controls) || [],
|
|
@@ -6316,7 +6310,7 @@ function Hd({
|
|
|
6316
6310
|
P,
|
|
6317
6311
|
C,
|
|
6318
6312
|
z,
|
|
6319
|
-
|
|
6313
|
+
E,
|
|
6320
6314
|
$,
|
|
6321
6315
|
x,
|
|
6322
6316
|
L
|
|
@@ -6335,12 +6329,12 @@ function Hd({
|
|
|
6335
6329
|
if (!r) {
|
|
6336
6330
|
const Ir = Bt.findIndex(
|
|
6337
6331
|
(Ue) => Ue.label === "Business review" && (!Ue.available || Ue.available(y.source))
|
|
6338
|
-
),
|
|
6332
|
+
), no = Bt.findIndex(
|
|
6339
6333
|
(Ue) => !Ue.available || Ue.available(y.source)
|
|
6340
|
-
), cn = Ir !== -1 ? Ir :
|
|
6334
|
+
), cn = Ir !== -1 ? Ir : no;
|
|
6341
6335
|
if (cn !== -1) {
|
|
6342
6336
|
const Ue = Bt[cn];
|
|
6343
|
-
y =
|
|
6337
|
+
y = En(
|
|
6344
6338
|
y,
|
|
6345
6339
|
Ue.draft(y.source, {
|
|
6346
6340
|
attachments: Ue.seedsDashboardAttachment ? Ur({
|
|
@@ -6372,7 +6366,7 @@ function Hd({
|
|
|
6372
6366
|
(m) => m.id === cr
|
|
6373
6367
|
), Pt = (G == null ? void 0 : G.threadMentions) ?? [], ur = Pt.length > 0, mr = JSON.stringify({
|
|
6374
6368
|
recipients: Pt
|
|
6375
|
-
}), Mt = Oe && !sn ? "SLACK" : sn && !Oe ? "EMAIL" :
|
|
6369
|
+
}), Mt = Oe && !sn ? "SLACK" : sn && !Oe ? "EMAIL" : Is, on = Mt === "EMAIL" ? "SLACK" : "EMAIL";
|
|
6376
6370
|
ce(() => {
|
|
6377
6371
|
if (!B || !K || !Oe)
|
|
6378
6372
|
return;
|
|
@@ -6393,9 +6387,9 @@ function Hd({
|
|
|
6393
6387
|
throw y;
|
|
6394
6388
|
})
|
|
6395
6389
|
]).then(([y, F]) => {
|
|
6396
|
-
m || (
|
|
6390
|
+
m || (Ls(y), Xn(F.channels));
|
|
6397
6391
|
}).catch((y) => {
|
|
6398
|
-
m || (nr(
|
|
6392
|
+
m || (nr(Ae(y)), Xn([]));
|
|
6399
6393
|
}).finally(() => {
|
|
6400
6394
|
m || er(!1);
|
|
6401
6395
|
}), () => {
|
|
@@ -6405,7 +6399,7 @@ function Hd({
|
|
|
6405
6399
|
Oe,
|
|
6406
6400
|
B,
|
|
6407
6401
|
K,
|
|
6408
|
-
|
|
6402
|
+
Rs
|
|
6409
6403
|
]), ce(() => {
|
|
6410
6404
|
if (!B || !K || !Oe) {
|
|
6411
6405
|
Rt(null);
|
|
@@ -6441,8 +6435,8 @@ function Hd({
|
|
|
6441
6435
|
mr
|
|
6442
6436
|
]);
|
|
6443
6437
|
const re = (m) => {
|
|
6444
|
-
q((y) =>
|
|
6445
|
-
}, $e = () => !B || !K ? (U("Missing Semaphor API credentials."), null) : { apiServiceUrl: B, token: K },
|
|
6438
|
+
q((y) => En(y, m)), ke([]), U(null), I != null && I.id || (tt(null), j((y) => y + 1), oe("edit"));
|
|
6439
|
+
}, $e = () => !B || !K ? (U("Missing Semaphor API credentials."), null) : { apiServiceUrl: B, token: K }, zs = async (m) => {
|
|
6446
6440
|
const y = jr(w);
|
|
6447
6441
|
if (ke(y.issues), U(null), !y.valid)
|
|
6448
6442
|
return null;
|
|
@@ -6455,19 +6449,19 @@ function Hd({
|
|
|
6455
6449
|
F.apiServiceUrl,
|
|
6456
6450
|
F.token,
|
|
6457
6451
|
I.id,
|
|
6458
|
-
|
|
6452
|
+
Bl(w)
|
|
6459
6453
|
) : await _.createBriefing(
|
|
6460
6454
|
F.apiServiceUrl,
|
|
6461
6455
|
F.token,
|
|
6462
6456
|
_r(w)
|
|
6463
6457
|
);
|
|
6464
|
-
return ve(Q.briefing), q(
|
|
6458
|
+
return ve(Q.briefing), q(At(Q.briefing)), d == null || d(Q.briefing), Q.briefing;
|
|
6465
6459
|
} catch (Q) {
|
|
6466
|
-
return U(
|
|
6460
|
+
return U(Ae(Q)), null;
|
|
6467
6461
|
} finally {
|
|
6468
6462
|
m != null && m.pendingAction && X(null);
|
|
6469
6463
|
}
|
|
6470
|
-
},
|
|
6464
|
+
}, Ks = async () => zs({ pendingAction: "save" }), hr = () => {
|
|
6471
6465
|
const m = jr(w);
|
|
6472
6466
|
return ke(m.issues), U(null), m.valid ? _r(w) : null;
|
|
6473
6467
|
}, pr = async (m) => {
|
|
@@ -6486,11 +6480,11 @@ function Hd({
|
|
|
6486
6480
|
);
|
|
6487
6481
|
return tt(Q.plan), m != null && m.silent || oe("plan"), Q.plan;
|
|
6488
6482
|
} catch (Q) {
|
|
6489
|
-
return U(
|
|
6483
|
+
return U(Ae(Q)), null;
|
|
6490
6484
|
} finally {
|
|
6491
6485
|
X(null);
|
|
6492
6486
|
}
|
|
6493
|
-
},
|
|
6487
|
+
}, Hs = async () => {
|
|
6494
6488
|
const m = $e();
|
|
6495
6489
|
if (!m)
|
|
6496
6490
|
return;
|
|
@@ -6510,9 +6504,9 @@ function Hd({
|
|
|
6510
6504
|
requestId: c()
|
|
6511
6505
|
}
|
|
6512
6506
|
);
|
|
6513
|
-
xt(qe),
|
|
6507
|
+
xt(qe), Os(Q.previewRun);
|
|
6514
6508
|
} catch (F) {
|
|
6515
|
-
U(
|
|
6509
|
+
U(Ae(F));
|
|
6516
6510
|
} finally {
|
|
6517
6511
|
X(null);
|
|
6518
6512
|
}
|
|
@@ -6520,7 +6514,7 @@ function Hd({
|
|
|
6520
6514
|
const m = $e();
|
|
6521
6515
|
if (m) {
|
|
6522
6516
|
if (!(I != null && I.id)) {
|
|
6523
|
-
await
|
|
6517
|
+
await Hs();
|
|
6524
6518
|
return;
|
|
6525
6519
|
}
|
|
6526
6520
|
if (at) {
|
|
@@ -6537,7 +6531,7 @@ function Hd({
|
|
|
6537
6531
|
);
|
|
6538
6532
|
en(y.run), p == null || p(y);
|
|
6539
6533
|
} catch (y) {
|
|
6540
|
-
U(
|
|
6534
|
+
U(Ae(y));
|
|
6541
6535
|
} finally {
|
|
6542
6536
|
X(null);
|
|
6543
6537
|
}
|
|
@@ -6553,8 +6547,8 @@ function Hd({
|
|
|
6553
6547
|
m.token,
|
|
6554
6548
|
I.id
|
|
6555
6549
|
);
|
|
6556
|
-
return ve(y.briefing), q(
|
|
6557
|
-
},
|
|
6550
|
+
return ve(y.briefing), q(At(y.briefing)), d == null || d(y.briefing), y.briefing;
|
|
6551
|
+
}, qs = async () => {
|
|
6558
6552
|
if (!(I != null && I.id) || !(xe != null && xe.id))
|
|
6559
6553
|
return;
|
|
6560
6554
|
const m = $e();
|
|
@@ -6569,17 +6563,17 @@ function Hd({
|
|
|
6569
6563
|
);
|
|
6570
6564
|
tn(), Me(y.run), oe("result"), await fr().catch(() => null);
|
|
6571
6565
|
} catch (y) {
|
|
6572
|
-
U(
|
|
6566
|
+
U(Ae(y));
|
|
6573
6567
|
} finally {
|
|
6574
6568
|
X(null);
|
|
6575
6569
|
}
|
|
6576
6570
|
}
|
|
6577
|
-
},
|
|
6571
|
+
}, Ws = () => {
|
|
6578
6572
|
!I || !xe || b == null || b({
|
|
6579
6573
|
briefing: { ...I, latestRun: xe },
|
|
6580
6574
|
run: xe
|
|
6581
6575
|
});
|
|
6582
|
-
},
|
|
6576
|
+
}, Gs = async () => {
|
|
6583
6577
|
if (!w.instruction.trim())
|
|
6584
6578
|
return;
|
|
6585
6579
|
const y = $e();
|
|
@@ -6593,12 +6587,12 @@ function Hd({
|
|
|
6593
6587
|
), Q = w.instruction;
|
|
6594
6588
|
re({ instruction: F }), Xt({ previousText: Q });
|
|
6595
6589
|
} catch (F) {
|
|
6596
|
-
sr(
|
|
6590
|
+
sr(Ae(F));
|
|
6597
6591
|
} finally {
|
|
6598
6592
|
rr(!1);
|
|
6599
6593
|
}
|
|
6600
6594
|
}
|
|
6601
|
-
},
|
|
6595
|
+
}, Js = () => {
|
|
6602
6596
|
yt && (re({ instruction: yt.previousText }), Xt(null));
|
|
6603
6597
|
}, gr = async (m) => {
|
|
6604
6598
|
if (!(I != null && I.id))
|
|
@@ -6616,12 +6610,12 @@ function Hd({
|
|
|
6616
6610
|
const F = await fr().catch(() => null), Q = (F == null ? void 0 : F.latestRun) ?? null;
|
|
6617
6611
|
Me(Q), Q || oe("edit");
|
|
6618
6612
|
} catch (F) {
|
|
6619
|
-
U(
|
|
6613
|
+
U(Ae(F));
|
|
6620
6614
|
} finally {
|
|
6621
6615
|
X(null);
|
|
6622
6616
|
}
|
|
6623
6617
|
}
|
|
6624
|
-
},
|
|
6618
|
+
}, Qs = async (m) => {
|
|
6625
6619
|
if (!(I != null && I.id))
|
|
6626
6620
|
return;
|
|
6627
6621
|
const y = $e();
|
|
@@ -6637,16 +6631,16 @@ function Hd({
|
|
|
6637
6631
|
y.token,
|
|
6638
6632
|
I.id
|
|
6639
6633
|
);
|
|
6640
|
-
ve(F.briefing), q(
|
|
6634
|
+
ve(F.briefing), q(At(F.briefing)), d == null || d(F.briefing);
|
|
6641
6635
|
} catch (F) {
|
|
6642
|
-
U(
|
|
6636
|
+
U(Ae(F));
|
|
6643
6637
|
} finally {
|
|
6644
6638
|
X(null);
|
|
6645
6639
|
}
|
|
6646
6640
|
}
|
|
6647
|
-
},
|
|
6641
|
+
}, Ys = w.instruction.split(`
|
|
6648
6642
|
`).map((m) => m.trim()).find((m) => m.length > 0), br = V(
|
|
6649
|
-
() => I ?
|
|
6643
|
+
() => I ? At(I) : null,
|
|
6650
6644
|
[I]
|
|
6651
6645
|
), at = !!br && JSON.stringify(w) !== JSON.stringify(br), st = w.body.type === "custom_message", dn = st ? "Note" : "Analysis", Ct = st ? "Email body" : "What should this briefing investigate?", xr = st ? "Write the email body that recipients will see." : "Describe the outcome in business terms. Mention what to watch, when to bother the team, and what to include in the briefing.", yr = st ? "Plain note — sent as-is in the email body. No analysis is generated for this preset." : "Write this like instructions to an analyst — what to watch, when to bother the team, and what to include in the briefing.", vr = (m) => {
|
|
6652
6646
|
var y, F;
|
|
@@ -6677,11 +6671,11 @@ function Hd({
|
|
|
6677
6671
|
}
|
|
6678
6672
|
}
|
|
6679
6673
|
});
|
|
6680
|
-
},
|
|
6674
|
+
}, Zs = () => {
|
|
6681
6675
|
if (wt) {
|
|
6682
6676
|
re({
|
|
6683
6677
|
delivery: {
|
|
6684
|
-
channels:
|
|
6678
|
+
channels: Vd(
|
|
6685
6679
|
w.delivery.channels,
|
|
6686
6680
|
on
|
|
6687
6681
|
)
|
|
@@ -6690,7 +6684,7 @@ function Hd({
|
|
|
6690
6684
|
return;
|
|
6691
6685
|
}
|
|
6692
6686
|
vr(on);
|
|
6693
|
-
},
|
|
6687
|
+
}, Xs = (m) => {
|
|
6694
6688
|
var F;
|
|
6695
6689
|
const y = Qt.find((Q) => Q.id === m);
|
|
6696
6690
|
qt("SLACK"), re({
|
|
@@ -6717,7 +6711,7 @@ function Hd({
|
|
|
6717
6711
|
}
|
|
6718
6712
|
}
|
|
6719
6713
|
});
|
|
6720
|
-
},
|
|
6714
|
+
}, eo = (m) => {
|
|
6721
6715
|
var y, F;
|
|
6722
6716
|
qt("SLACK"), re({
|
|
6723
6717
|
delivery: {
|
|
@@ -6739,7 +6733,7 @@ function Hd({
|
|
|
6739
6733
|
}
|
|
6740
6734
|
}
|
|
6741
6735
|
});
|
|
6742
|
-
},
|
|
6736
|
+
}, to = V(() => {
|
|
6743
6737
|
const m = w.schedule.enabled ? w.schedule.scheduleExpr || "Scheduled" : "On demand", y = w.delivery.recipients.length, F = y === 0 ? "No email recipients" : `${y} email recipient${y === 1 ? "" : "s"}`, Q = Ve ? `#${Ve.name}` : "Slack channel";
|
|
6744
6738
|
return wt ? `${m} · ${F} · ${Q}` : Oe ? `${m} · ${Ve ? `#${Ve.name}` : "Slack channel"}` : `${m} · ${F}`;
|
|
6745
6739
|
}, [
|
|
@@ -6781,7 +6775,7 @@ function Hd({
|
|
|
6781
6775
|
{
|
|
6782
6776
|
className: v(
|
|
6783
6777
|
"inline-flex items-center rounded-control px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-[0.06em]",
|
|
6784
|
-
|
|
6778
|
+
Hd(dr)
|
|
6785
6779
|
),
|
|
6786
6780
|
children: dr
|
|
6787
6781
|
}
|
|
@@ -6806,8 +6800,8 @@ function Hd({
|
|
|
6806
6800
|
className: "flex w-full items-center justify-between gap-2 border-b border-border px-4 py-2.5 text-left transition-colors hover:bg-muted/60",
|
|
6807
6801
|
children: [
|
|
6808
6802
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
6809
|
-
/* @__PURE__ */ t("div", { className: "truncate text-[12px] text-foreground/80", children:
|
|
6810
|
-
/* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children:
|
|
6803
|
+
/* @__PURE__ */ t("div", { className: "truncate text-[12px] text-foreground/80", children: Ys || w.name || "Untitled briefing" }),
|
|
6804
|
+
/* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: to })
|
|
6811
6805
|
] }),
|
|
6812
6806
|
/* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground", children: [
|
|
6813
6807
|
"Edit brief",
|
|
@@ -6816,7 +6810,7 @@ function Hd({
|
|
|
6816
6810
|
]
|
|
6817
6811
|
}
|
|
6818
6812
|
) : null,
|
|
6819
|
-
xe ? /* @__PURE__ */ t(
|
|
6813
|
+
xe ? /* @__PURE__ */ t(Cd, {}) : null,
|
|
6820
6814
|
/* @__PURE__ */ t(
|
|
6821
6815
|
Ed,
|
|
6822
6816
|
{
|
|
@@ -6824,9 +6818,9 @@ function Hd({
|
|
|
6824
6818
|
previewRun: W,
|
|
6825
6819
|
savedActiveRun: xe,
|
|
6826
6820
|
detailsVisible: lt,
|
|
6827
|
-
onShowDetails: () =>
|
|
6828
|
-
onCancelSavedRun: xe ?
|
|
6829
|
-
onMinimizeRun: xe && b ?
|
|
6821
|
+
onShowDetails: () => Es((m) => !m),
|
|
6822
|
+
onCancelSavedRun: xe ? qs : void 0,
|
|
6823
|
+
onMinimizeRun: xe && b ? Ws : void 0
|
|
6830
6824
|
}
|
|
6831
6825
|
),
|
|
6832
6826
|
lt && W && it(W.status) ? /* @__PURE__ */ t(la, { run: W }) : lt && xe ? /* @__PURE__ */ t(la, { run: xe }) : null,
|
|
@@ -6860,15 +6854,15 @@ function Hd({
|
|
|
6860
6854
|
)) })
|
|
6861
6855
|
] }),
|
|
6862
6856
|
an ? /* @__PURE__ */ t(
|
|
6863
|
-
|
|
6857
|
+
Od,
|
|
6864
6858
|
{
|
|
6865
6859
|
previewRun: an,
|
|
6866
|
-
isStale:
|
|
6860
|
+
isStale: _s,
|
|
6867
6861
|
onViewOutput: () => oe("result")
|
|
6868
6862
|
}
|
|
6869
6863
|
) : null,
|
|
6870
|
-
|
|
6871
|
-
|
|
6864
|
+
Us && Ne ? /* @__PURE__ */ t(
|
|
6865
|
+
Nd,
|
|
6872
6866
|
{
|
|
6873
6867
|
run: Ne,
|
|
6874
6868
|
onViewOutput: () => oe("result"),
|
|
@@ -6938,7 +6932,7 @@ function Hd({
|
|
|
6938
6932
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50",
|
|
6939
6933
|
"aria-label": "Attach files",
|
|
6940
6934
|
children: [
|
|
6941
|
-
/* @__PURE__ */ t(
|
|
6935
|
+
/* @__PURE__ */ t(Ia, { className: "h-3 w-3" }),
|
|
6942
6936
|
"Attach"
|
|
6943
6937
|
]
|
|
6944
6938
|
}
|
|
@@ -6946,7 +6940,7 @@ function Hd({
|
|
|
6946
6940
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" })
|
|
6947
6941
|
] }) : null,
|
|
6948
6942
|
/* @__PURE__ */ t(
|
|
6949
|
-
|
|
6943
|
+
Xl,
|
|
6950
6944
|
{
|
|
6951
6945
|
includeEvidence: w.output.includeEvidence,
|
|
6952
6946
|
includeSql: w.output.includeSql,
|
|
@@ -6954,7 +6948,7 @@ function Hd({
|
|
|
6954
6948
|
onChange: (m, y) => {
|
|
6955
6949
|
re(m === "evidence" ? { output: { includeEvidence: y } } : m === "sql" ? { output: { includeSql: y } } : {
|
|
6956
6950
|
output: {
|
|
6957
|
-
artifactFormats:
|
|
6951
|
+
artifactFormats: ed(
|
|
6958
6952
|
w.output.artifactFormats,
|
|
6959
6953
|
"html",
|
|
6960
6954
|
y
|
|
@@ -6969,7 +6963,7 @@ function Hd({
|
|
|
6969
6963
|
/* @__PURE__ */ t(
|
|
6970
6964
|
ut,
|
|
6971
6965
|
{
|
|
6972
|
-
open:
|
|
6966
|
+
open: Ps,
|
|
6973
6967
|
onOpenChange: Yt,
|
|
6974
6968
|
children: /* @__PURE__ */ s(mt, { className: "flex h-[80vh] max-h-[800px] w-[92vw] max-w-[860px] flex-col gap-0 p-0", children: [
|
|
6975
6969
|
/* @__PURE__ */ s(ht, { className: "border-b border-border/60 px-5 py-3", children: [
|
|
@@ -7005,10 +6999,10 @@ function Hd({
|
|
|
7005
6999
|
"button",
|
|
7006
7000
|
{
|
|
7007
7001
|
type: "button",
|
|
7008
|
-
onClick:
|
|
7002
|
+
onClick: Js,
|
|
7009
7003
|
className: "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-foreground/80 hover:bg-muted hover:text-foreground",
|
|
7010
7004
|
children: [
|
|
7011
|
-
/* @__PURE__ */ t(
|
|
7005
|
+
/* @__PURE__ */ t(Pi, { className: "h-3 w-3" }),
|
|
7012
7006
|
"Revert polish"
|
|
7013
7007
|
]
|
|
7014
7008
|
}
|
|
@@ -7017,12 +7011,12 @@ function Hd({
|
|
|
7017
7011
|
"button",
|
|
7018
7012
|
{
|
|
7019
7013
|
type: "button",
|
|
7020
|
-
onClick:
|
|
7014
|
+
onClick: Gs,
|
|
7021
7015
|
disabled: Zt || !w.instruction.trim() || !B || !K,
|
|
7022
7016
|
title: "Fix typos, grammar, and minor wording without changing your meaning",
|
|
7023
7017
|
className: _e,
|
|
7024
7018
|
children: [
|
|
7025
|
-
Zt ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
7019
|
+
Zt ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(ci, { className: "h-3 w-3" }),
|
|
7026
7020
|
Zt ? "Polishing…" : "Polish"
|
|
7027
7021
|
]
|
|
7028
7022
|
}
|
|
@@ -7042,7 +7036,7 @@ function Hd({
|
|
|
7042
7036
|
),
|
|
7043
7037
|
w.source.type === "dashboard" ? /* @__PURE__ */ s("div", { children: [
|
|
7044
7038
|
w.attachments.length > 0 ? /* @__PURE__ */ t(
|
|
7045
|
-
|
|
7039
|
+
Ul,
|
|
7046
7040
|
{
|
|
7047
7041
|
attachments: w.attachments,
|
|
7048
7042
|
disabled: We,
|
|
@@ -7053,9 +7047,9 @@ function Hd({
|
|
|
7053
7047
|
}
|
|
7054
7048
|
) : null,
|
|
7055
7049
|
/* @__PURE__ */ t(
|
|
7056
|
-
|
|
7050
|
+
Kl,
|
|
7057
7051
|
{
|
|
7058
|
-
open:
|
|
7052
|
+
open: Ts,
|
|
7059
7053
|
onOpenChange: Jt,
|
|
7060
7054
|
source: w.source,
|
|
7061
7055
|
dashboard: g,
|
|
@@ -7091,9 +7085,9 @@ function Hd({
|
|
|
7091
7085
|
)
|
|
7092
7086
|
] }),
|
|
7093
7087
|
w.schedule.enabled ? /* @__PURE__ */ t("div", { className: "mt-3 pl-6", children: /* @__PURE__ */ t(
|
|
7094
|
-
|
|
7088
|
+
td,
|
|
7095
7089
|
{
|
|
7096
|
-
scheduleExpr: w.schedule.scheduleExpr || Nn(
|
|
7090
|
+
scheduleExpr: w.schedule.scheduleExpr || Nn(mi),
|
|
7097
7091
|
timezone: w.schedule.timezone || "UTC",
|
|
7098
7092
|
onScheduleChange: (m) => re({
|
|
7099
7093
|
schedule: {
|
|
@@ -7121,7 +7115,7 @@ function Hd({
|
|
|
7121
7115
|
Mt === m && y && "ring-1 ring-foreground/20"
|
|
7122
7116
|
),
|
|
7123
7117
|
children: [
|
|
7124
|
-
m === "EMAIL" ? /* @__PURE__ */ t(
|
|
7118
|
+
m === "EMAIL" ? /* @__PURE__ */ t(_a, { className: "h-3 w-3" }) : /* @__PURE__ */ t(kn, { className: "h-3 w-3" }),
|
|
7125
7119
|
m === "EMAIL" ? "Email" : "Slack"
|
|
7126
7120
|
]
|
|
7127
7121
|
},
|
|
@@ -7132,9 +7126,9 @@ function Hd({
|
|
|
7132
7126
|
"button",
|
|
7133
7127
|
{
|
|
7134
7128
|
type: "button",
|
|
7135
|
-
onClick:
|
|
7129
|
+
onClick: Zs,
|
|
7136
7130
|
className: v(
|
|
7137
|
-
|
|
7131
|
+
Et,
|
|
7138
7132
|
"h-6 px-1.5 text-[11px]"
|
|
7139
7133
|
),
|
|
7140
7134
|
children: [
|
|
@@ -7164,11 +7158,11 @@ function Hd({
|
|
|
7164
7158
|
] })
|
|
7165
7159
|
) : le != null && le.installed ? /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
7166
7160
|
/* @__PURE__ */ t(
|
|
7167
|
-
|
|
7161
|
+
od,
|
|
7168
7162
|
{
|
|
7169
7163
|
channels: Qt,
|
|
7170
7164
|
selectedChannelId: cr,
|
|
7171
|
-
onChange:
|
|
7165
|
+
onChange: Xs,
|
|
7172
7166
|
destinationKind: "channel",
|
|
7173
7167
|
onDestinationKindChange: () => {
|
|
7174
7168
|
},
|
|
@@ -7179,7 +7173,7 @@ function Hd({
|
|
|
7179
7173
|
Hr,
|
|
7180
7174
|
{
|
|
7181
7175
|
value: Pt,
|
|
7182
|
-
onChange:
|
|
7176
|
+
onChange: eo,
|
|
7183
7177
|
prefix: "Thread @",
|
|
7184
7178
|
placeholder: Pt.length > 0 ? "Add more…" : "Mention people in the thread reply"
|
|
7185
7179
|
}
|
|
@@ -7209,7 +7203,7 @@ function Hd({
|
|
|
7209
7203
|
"aria-hidden": !0
|
|
7210
7204
|
}
|
|
7211
7205
|
),
|
|
7212
|
-
/* @__PURE__ */ t("span", { children: ((
|
|
7206
|
+
/* @__PURE__ */ t("span", { children: ((Er = le == null ? void 0 : le.workspace) == null ? void 0 : Er.teamName) ?? "Slack" }),
|
|
7213
7207
|
Ve ? /* @__PURE__ */ s(ae, { children: [
|
|
7214
7208
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7215
7209
|
/* @__PURE__ */ t("span", { children: Ve.isMember ? `Bot in #${Ve.name}` : `Can post to #${Ve.name}` })
|
|
@@ -7225,7 +7219,7 @@ function Hd({
|
|
|
7225
7219
|
/* @__PURE__ */ t("div", { className: "text-[12.5px] font-medium text-foreground", children: "Slack is not connected" }),
|
|
7226
7220
|
/* @__PURE__ */ t("p", { className: "mx-auto max-w-[320px] text-[11.5px] leading-[1.5] text-muted-foreground", children: (Sr = le == null ? void 0 : le.capabilities) != null && Sr.canConfigure ? "Connect the Slack workspace to choose channels the bot can post in." : "Ask an admin to connect Slack before this briefing can post to a channel." }),
|
|
7227
7221
|
/* @__PURE__ */ s("div", { className: "mt-1 flex items-center justify-center gap-2", children: [
|
|
7228
|
-
(
|
|
7222
|
+
(Ar = le == null ? void 0 : le.capabilities) != null && Ar.canConfigure ? (
|
|
7229
7223
|
/* Route to the admin integrations page rather than
|
|
7230
7224
|
starting OAuth inline. Setup includes channel
|
|
7231
7225
|
allowlist + identity-link management; that surface
|
|
@@ -7235,7 +7229,7 @@ function Hd({
|
|
|
7235
7229
|
/* @__PURE__ */ t(
|
|
7236
7230
|
"a",
|
|
7237
7231
|
{
|
|
7238
|
-
href:
|
|
7232
|
+
href: Kd(
|
|
7239
7233
|
B,
|
|
7240
7234
|
"/admin/integrations/slack"
|
|
7241
7235
|
),
|
|
@@ -7250,7 +7244,7 @@ function Hd({
|
|
|
7250
7244
|
"button",
|
|
7251
7245
|
{
|
|
7252
7246
|
type: "button",
|
|
7253
|
-
onClick: () =>
|
|
7247
|
+
onClick: () => Fs((m) => m + 1),
|
|
7254
7248
|
disabled: Lt,
|
|
7255
7249
|
className: _e,
|
|
7256
7250
|
children: [
|
|
@@ -7266,11 +7260,11 @@ function Hd({
|
|
|
7266
7260
|
st ? null : /* @__PURE__ */ s("div", { children: [
|
|
7267
7261
|
/* @__PURE__ */ t("div", { className: v(Z, "mb-2"), children: "Scope" }),
|
|
7268
7262
|
/* @__PURE__ */ t(
|
|
7269
|
-
|
|
7263
|
+
sd,
|
|
7270
7264
|
{
|
|
7271
7265
|
source: w.source,
|
|
7272
7266
|
resolvedSourceContext: O,
|
|
7273
|
-
sourceDetail:
|
|
7267
|
+
sourceDetail: $s,
|
|
7274
7268
|
onChange: (m) => re({ source: m })
|
|
7275
7269
|
}
|
|
7276
7270
|
)
|
|
@@ -7285,7 +7279,7 @@ function Hd({
|
|
|
7285
7279
|
] })
|
|
7286
7280
|
] })
|
|
7287
7281
|
] }) : ye === "plan" && Le ? /* @__PURE__ */ t(
|
|
7288
|
-
|
|
7282
|
+
bd,
|
|
7289
7283
|
{
|
|
7290
7284
|
previewPlan: Le,
|
|
7291
7285
|
previewRun: W && W.status !== "SUCCESS" ? W : null,
|
|
@@ -7350,15 +7344,15 @@ function Hd({
|
|
|
7350
7344
|
) : null
|
|
7351
7345
|
] }) : null,
|
|
7352
7346
|
/* @__PURE__ */ t("footer", { className: "sticky bottom-0 border-t border-border bg-background px-4 py-3", children: /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
7353
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: de &&
|
|
7347
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", children: de && Vs ? /* @__PURE__ */ s(
|
|
7354
7348
|
"button",
|
|
7355
7349
|
{
|
|
7356
7350
|
type: "button",
|
|
7357
7351
|
className: _e,
|
|
7358
7352
|
disabled: We,
|
|
7359
|
-
onClick: () =>
|
|
7353
|
+
onClick: () => Qs(nn ? "ACTIVE" : "PAUSED"),
|
|
7360
7354
|
children: [
|
|
7361
|
-
se === "pause" || se === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : nn ? /* @__PURE__ */ t(
|
|
7355
|
+
se === "pause" || se === "resume" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : nn ? /* @__PURE__ */ t(Oa, { className: "h-3 w-3" }) : /* @__PURE__ */ t(ja, { className: "h-3 w-3" }),
|
|
7362
7356
|
nn ? "Resume" : "Pause"
|
|
7363
7357
|
]
|
|
7364
7358
|
}
|
|
@@ -7366,14 +7360,14 @@ function Hd({
|
|
|
7366
7360
|
"button",
|
|
7367
7361
|
{
|
|
7368
7362
|
type: "button",
|
|
7369
|
-
className:
|
|
7363
|
+
className: Et,
|
|
7370
7364
|
onClick: () => oe("edit"),
|
|
7371
7365
|
children: [
|
|
7372
7366
|
/* @__PURE__ */ t(Cn, { className: "h-3 w-3 rotate-180" }),
|
|
7373
7367
|
ye === "result" ? "Edit brief" : "Tweak brief"
|
|
7374
7368
|
]
|
|
7375
7369
|
}
|
|
7376
|
-
) : !de && f && !h ? /* @__PURE__ */ t("button", { type: "button", className:
|
|
7370
|
+
) : !de && f && !h ? /* @__PURE__ */ t("button", { type: "button", className: Et, onClick: f, children: "Discard" }) : null }),
|
|
7377
7371
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
7378
7372
|
!de && ye === "edit" && !st ? /* @__PURE__ */ s(
|
|
7379
7373
|
"button",
|
|
@@ -7385,7 +7379,7 @@ function Hd({
|
|
|
7385
7379
|
pr();
|
|
7386
7380
|
},
|
|
7387
7381
|
children: [
|
|
7388
|
-
se === "plan" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
7382
|
+
se === "plan" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(Ri, { className: "h-3 w-3" }),
|
|
7389
7383
|
"Preview plan"
|
|
7390
7384
|
]
|
|
7391
7385
|
}
|
|
@@ -7399,7 +7393,7 @@ function Hd({
|
|
|
7399
7393
|
onClick: ln,
|
|
7400
7394
|
title: de && at ? "Save your changes before running — Run now uses the saved briefing." : void 0,
|
|
7401
7395
|
children: [
|
|
7402
|
-
se === "run" || se === "preview" || rn ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : ye === "result" ? /* @__PURE__ */ t(Vt, { className: "h-3 w-3" }) : ye === "plan" ? /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }) : de ? /* @__PURE__ */ t(
|
|
7396
|
+
se === "run" || se === "preview" || rn ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : ye === "result" ? /* @__PURE__ */ t(Vt, { className: "h-3 w-3" }) : ye === "plan" ? /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }) : de ? /* @__PURE__ */ t(ui, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Sn, { className: "h-3 w-3" }),
|
|
7403
7397
|
de ? "Run now" : ye === "plan" ? "Run plan" : ye === "result" ? "Run again" : "Show preview"
|
|
7404
7398
|
]
|
|
7405
7399
|
}
|
|
@@ -7410,7 +7404,7 @@ function Hd({
|
|
|
7410
7404
|
type: "button",
|
|
7411
7405
|
className: de ? _e : Xr,
|
|
7412
7406
|
disabled: We,
|
|
7413
|
-
onClick:
|
|
7407
|
+
onClick: Ks,
|
|
7414
7408
|
children: [
|
|
7415
7409
|
se === "save" ? /* @__PURE__ */ t(ne, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(He, { className: "h-3 w-3" }),
|
|
7416
7410
|
de ? "Save changes" : "Create briefing"
|
|
@@ -7422,13 +7416,13 @@ function Hd({
|
|
|
7422
7416
|
/* @__PURE__ */ t(
|
|
7423
7417
|
ut,
|
|
7424
7418
|
{
|
|
7425
|
-
open:
|
|
7419
|
+
open: Ds,
|
|
7426
7420
|
onOpenChange: (m) => {
|
|
7427
7421
|
Wt(m), m || Gt(null);
|
|
7428
7422
|
},
|
|
7429
7423
|
children: /* @__PURE__ */ s(mt, { className: "flex max-h-[90vh] w-[min(960px,calc(100vw-32px))] max-w-none flex-col gap-0 overflow-hidden p-0", children: [
|
|
7430
7424
|
/* @__PURE__ */ s(ht, { className: "border-b border-border px-6 py-3 text-left", children: [
|
|
7431
|
-
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children:
|
|
7425
|
+
/* @__PURE__ */ t(pt, { className: "truncate text-[14px] font-semibold leading-5", children: js }),
|
|
7432
7426
|
/* @__PURE__ */ t(ft, { className: "text-[12px] text-muted-foreground", children: "Full briefing render" })
|
|
7433
7427
|
] }),
|
|
7434
7428
|
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: vt ? /* @__PURE__ */ t(da, { previewRun: vt, fullWidth: !0 }) : Nt ? /* @__PURE__ */ t(Qn, { preview: Nt }) : Be ? /* @__PURE__ */ t(ca, { run: Be }) : null })
|
|
@@ -7439,7 +7433,7 @@ function Hd({
|
|
|
7439
7433
|
}
|
|
7440
7434
|
);
|
|
7441
7435
|
}
|
|
7442
|
-
function
|
|
7436
|
+
function Wd({
|
|
7443
7437
|
disabled: e,
|
|
7444
7438
|
briefingCount: n,
|
|
7445
7439
|
className: r,
|
|
@@ -7457,39 +7451,39 @@ function qd({
|
|
|
7457
7451
|
onClick: a,
|
|
7458
7452
|
"aria-label": "Briefings",
|
|
7459
7453
|
children: [
|
|
7460
|
-
/* @__PURE__ */ t(
|
|
7454
|
+
/* @__PURE__ */ t(Fi, { className: "h-3.5 w-3.5" }),
|
|
7461
7455
|
"Briefings",
|
|
7462
7456
|
o ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: n }) : null
|
|
7463
7457
|
]
|
|
7464
7458
|
}
|
|
7465
7459
|
);
|
|
7466
7460
|
}
|
|
7467
|
-
const
|
|
7468
|
-
listBriefings:
|
|
7469
|
-
getBriefing:
|
|
7470
|
-
pauseBriefing:
|
|
7471
|
-
resumeBriefing:
|
|
7472
|
-
deleteBriefing:
|
|
7473
|
-
runBriefingNow:
|
|
7474
|
-
},
|
|
7475
|
-
function
|
|
7461
|
+
const Gd = {
|
|
7462
|
+
listBriefings: il,
|
|
7463
|
+
getBriefing: Wa,
|
|
7464
|
+
pauseBriefing: Ga,
|
|
7465
|
+
resumeBriefing: Ja,
|
|
7466
|
+
deleteBriefing: Qa,
|
|
7467
|
+
runBriefingNow: Ya
|
|
7468
|
+
}, Jd = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", Qd = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Ss = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
7469
|
+
function Yd(e) {
|
|
7476
7470
|
return (e == null ? void 0 : e.trim()) || "This dashboard";
|
|
7477
7471
|
}
|
|
7478
|
-
function
|
|
7472
|
+
function Zd(e) {
|
|
7479
7473
|
return e === "This dashboard" ? "Watch this dashboard" : `Watch ${e}`;
|
|
7480
7474
|
}
|
|
7481
|
-
function
|
|
7475
|
+
function Xd(e, n) {
|
|
7482
7476
|
return e.source.type === "dashboard" && e.source.dashboardId === n;
|
|
7483
7477
|
}
|
|
7484
|
-
function
|
|
7478
|
+
function ec(e) {
|
|
7485
7479
|
return e === "dashboard" ? "This dashboard" : "Project";
|
|
7486
7480
|
}
|
|
7487
|
-
function
|
|
7481
|
+
function tc(e, n, r) {
|
|
7488
7482
|
return n === "dashboard" ? e.filter(
|
|
7489
|
-
(a) =>
|
|
7483
|
+
(a) => Xd(a, r)
|
|
7490
7484
|
) : e;
|
|
7491
7485
|
}
|
|
7492
|
-
async function
|
|
7486
|
+
async function nc({
|
|
7493
7487
|
apiClient: e,
|
|
7494
7488
|
apiServiceUrl: n,
|
|
7495
7489
|
token: r
|
|
@@ -7508,7 +7502,7 @@ async function tc({
|
|
|
7508
7502
|
}
|
|
7509
7503
|
return o;
|
|
7510
7504
|
}
|
|
7511
|
-
function
|
|
7505
|
+
function rc(e) {
|
|
7512
7506
|
if (!e) return "Never";
|
|
7513
7507
|
const n = new Date(e);
|
|
7514
7508
|
if (Number.isNaN(n.getTime())) return "Unknown";
|
|
@@ -7522,10 +7516,10 @@ function nc(e) {
|
|
|
7522
7516
|
const l = Math.round(i / 7);
|
|
7523
7517
|
return l < 5 ? `${l}w ago` : `${Math.round(i / 30)}mo ago`;
|
|
7524
7518
|
}
|
|
7525
|
-
function
|
|
7519
|
+
function ac(e) {
|
|
7526
7520
|
return e.scheduleExpr ? e.scheduleExpr : "On demand";
|
|
7527
7521
|
}
|
|
7528
|
-
function
|
|
7522
|
+
function sc(e) {
|
|
7529
7523
|
if (e.lastRunStatus) {
|
|
7530
7524
|
const n = e.lastRunStatus.toString().toUpperCase();
|
|
7531
7525
|
return n === "SUCCESS" ? "Last run completed." : n === "FAILED" ? "Last run failed." : `Last run ${e.lastRunStatus.toString().toLowerCase()}`;
|
|
@@ -7535,10 +7529,10 @@ function ac(e) {
|
|
|
7535
7529
|
function As(e) {
|
|
7536
7530
|
return e.hasActiveRun ? "Running" : e.lastRunStatus ? `Last run ${e.lastRunStatus.toString().toLowerCase()}` : "Idle";
|
|
7537
7531
|
}
|
|
7538
|
-
function
|
|
7532
|
+
function oc(e) {
|
|
7539
7533
|
return e.source.type === "dashboard" ? "This dashboard" : "Project";
|
|
7540
7534
|
}
|
|
7541
|
-
function
|
|
7535
|
+
function ic({
|
|
7542
7536
|
activeView: e,
|
|
7543
7537
|
onChange: n
|
|
7544
7538
|
}) {
|
|
@@ -7561,7 +7555,7 @@ function oc({
|
|
|
7561
7555
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
7562
7556
|
a ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
7563
7557
|
),
|
|
7564
|
-
children:
|
|
7558
|
+
children: ec(r)
|
|
7565
7559
|
},
|
|
7566
7560
|
r
|
|
7567
7561
|
);
|
|
@@ -7569,7 +7563,7 @@ function oc({
|
|
|
7569
7563
|
}
|
|
7570
7564
|
);
|
|
7571
7565
|
}
|
|
7572
|
-
function
|
|
7566
|
+
function lc({
|
|
7573
7567
|
briefings: e,
|
|
7574
7568
|
dashboardLabel: n,
|
|
7575
7569
|
sourceView: r,
|
|
@@ -7595,7 +7589,7 @@ function ic({
|
|
|
7595
7589
|
children: [
|
|
7596
7590
|
/* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
7597
7591
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
7598
|
-
/* @__PURE__ */ t("div", { className:
|
|
7592
|
+
/* @__PURE__ */ t("div", { className: Jd, children: "Briefings" }),
|
|
7599
7593
|
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: r === "dashboard" ? n : "Project briefings" })
|
|
7600
7594
|
] }),
|
|
7601
7595
|
/* @__PURE__ */ t(
|
|
@@ -7612,7 +7606,7 @@ function ic({
|
|
|
7612
7606
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
7613
7607
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
7614
7608
|
/* @__PURE__ */ t(
|
|
7615
|
-
|
|
7609
|
+
ic,
|
|
7616
7610
|
{
|
|
7617
7611
|
activeView: r,
|
|
7618
7612
|
onChange: i
|
|
@@ -7638,7 +7632,7 @@ function ic({
|
|
|
7638
7632
|
// case without crowding the toolbar.
|
|
7639
7633
|
/* @__PURE__ */ t(ne, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
7640
7634
|
) : null,
|
|
7641
|
-
k > 0 ? /* @__PURE__ */ s("button", { onClick: d, className:
|
|
7635
|
+
k > 0 ? /* @__PURE__ */ s("button", { onClick: d, className: Ss, children: [
|
|
7642
7636
|
/* @__PURE__ */ t(Kt, { className: "h-3 w-3" }),
|
|
7643
7637
|
"New briefing"
|
|
7644
7638
|
] }) : null
|
|
@@ -7652,9 +7646,9 @@ function ic({
|
|
|
7652
7646
|
] }) : null,
|
|
7653
7647
|
/* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto", children: [
|
|
7654
7648
|
a ? /* @__PURE__ */ t("div", { className: "m-4 rounded-card border border-destructive/30 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: a }) : null,
|
|
7655
|
-
!o && e.length === 0 && !a ? /* @__PURE__ */ t(
|
|
7649
|
+
!o && e.length === 0 && !a ? /* @__PURE__ */ t(dc, { onNew: d }) : null,
|
|
7656
7650
|
e.map((x) => /* @__PURE__ */ t(
|
|
7657
|
-
|
|
7651
|
+
uc,
|
|
7658
7652
|
{
|
|
7659
7653
|
briefing: x,
|
|
7660
7654
|
isOpening: h === x.id,
|
|
@@ -7671,10 +7665,10 @@ function ic({
|
|
|
7671
7665
|
"a",
|
|
7672
7666
|
{
|
|
7673
7667
|
href: D,
|
|
7674
|
-
className: v(
|
|
7668
|
+
className: v(Qd, "h-6 px-1 text-[11px]"),
|
|
7675
7669
|
children: [
|
|
7676
7670
|
"Manage all briefings",
|
|
7677
|
-
/* @__PURE__ */ t(
|
|
7671
|
+
/* @__PURE__ */ t(Ti, { className: "h-3 w-3" })
|
|
7678
7672
|
]
|
|
7679
7673
|
}
|
|
7680
7674
|
) }) : null
|
|
@@ -7682,18 +7676,18 @@ function ic({
|
|
|
7682
7676
|
}
|
|
7683
7677
|
);
|
|
7684
7678
|
}
|
|
7685
|
-
function
|
|
7679
|
+
function dc({ onNew: e }) {
|
|
7686
7680
|
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center px-8 py-12 text-center", children: [
|
|
7687
|
-
/* @__PURE__ */ t(
|
|
7681
|
+
/* @__PURE__ */ t(cc, { className: "mb-5 h-[88px] w-[112px] text-border" }),
|
|
7688
7682
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "Have an analyst brief your team" }),
|
|
7689
7683
|
/* @__PURE__ */ t("p", { className: "mt-1.5 max-w-[320px] text-[12px] leading-5 text-muted-foreground", children: "Describe what to watch. An analyst digs into this dashboard and the data behind it, then briefs your team on the cadence you choose." }),
|
|
7690
|
-
/* @__PURE__ */ s("button", { onClick: e, className: v(
|
|
7684
|
+
/* @__PURE__ */ s("button", { onClick: e, className: v(Ss, "mt-4"), children: [
|
|
7691
7685
|
/* @__PURE__ */ t(Kt, { className: "h-3 w-3" }),
|
|
7692
7686
|
"New briefing"
|
|
7693
7687
|
] })
|
|
7694
7688
|
] });
|
|
7695
7689
|
}
|
|
7696
|
-
function
|
|
7690
|
+
function cc({ className: e }) {
|
|
7697
7691
|
return /* @__PURE__ */ s(
|
|
7698
7692
|
"svg",
|
|
7699
7693
|
{
|
|
@@ -7870,7 +7864,7 @@ function dc({ className: e }) {
|
|
|
7870
7864
|
}
|
|
7871
7865
|
);
|
|
7872
7866
|
}
|
|
7873
|
-
function
|
|
7867
|
+
function uc({
|
|
7874
7868
|
briefing: e,
|
|
7875
7869
|
isOpening: n,
|
|
7876
7870
|
isBusy: r,
|
|
@@ -7879,7 +7873,7 @@ function cc({
|
|
|
7879
7873
|
onTogglePause: i,
|
|
7880
7874
|
onDelete: l
|
|
7881
7875
|
}) {
|
|
7882
|
-
const c = e.status === "PAUSED", d = e.hasActiveRun, u =
|
|
7876
|
+
const c = e.status === "PAUSED", d = e.hasActiveRun, u = sc(e), p = rc(e.lastRunAt), f = e.lastRunStatus, h = f === "SUCCESS" ? Y.success.dot : f === "FAILED" ? Y.danger.dot : f ? Y.warning.dot : Y.neutral.dot;
|
|
7883
7877
|
return /* @__PURE__ */ s(
|
|
7884
7878
|
"div",
|
|
7885
7879
|
{
|
|
@@ -7904,10 +7898,10 @@ function cc({
|
|
|
7904
7898
|
c ? /* @__PURE__ */ t("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
|
|
7905
7899
|
] }),
|
|
7906
7900
|
/* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground", children: [
|
|
7907
|
-
/* @__PURE__ */ t("span", { children:
|
|
7901
|
+
/* @__PURE__ */ t("span", { children: oc(e) }),
|
|
7908
7902
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7909
|
-
/* @__PURE__ */ t(
|
|
7910
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
7903
|
+
/* @__PURE__ */ t(xi, { className: "h-3 w-3" }),
|
|
7904
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: ac(e) }),
|
|
7911
7905
|
e.lastRunAt ? /* @__PURE__ */ s(ae, { children: [
|
|
7912
7906
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
7913
7907
|
/* @__PURE__ */ s("span", { children: [
|
|
@@ -7939,12 +7933,12 @@ function cc({
|
|
|
7939
7933
|
onClick: (b) => b.stopPropagation(),
|
|
7940
7934
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-control text-muted-foreground/70 opacity-60 hover:bg-muted hover:text-foreground/80 focus-visible:opacity-100 group-hover:opacity-100",
|
|
7941
7935
|
"aria-label": "Briefing actions",
|
|
7942
|
-
children: /* @__PURE__ */ t(
|
|
7936
|
+
children: /* @__PURE__ */ t(Ma, { className: "h-3.5 w-3.5" })
|
|
7943
7937
|
}
|
|
7944
7938
|
) }),
|
|
7945
7939
|
/* @__PURE__ */ s(Fn, { align: "end", className: "w-44", children: [
|
|
7946
7940
|
/* @__PURE__ */ s(ze, { onClick: a, children: [
|
|
7947
|
-
/* @__PURE__ */ t(
|
|
7941
|
+
/* @__PURE__ */ t(Sa, { className: "h-3.5 w-3.5" }),
|
|
7948
7942
|
"Edit briefing"
|
|
7949
7943
|
] }),
|
|
7950
7944
|
/* @__PURE__ */ s(
|
|
@@ -7966,10 +7960,10 @@ function cc({
|
|
|
7966
7960
|
b.preventDefault(), i();
|
|
7967
7961
|
},
|
|
7968
7962
|
children: c ? /* @__PURE__ */ s(ae, { children: [
|
|
7969
|
-
/* @__PURE__ */ t(
|
|
7963
|
+
/* @__PURE__ */ t(Oa, { className: "h-3.5 w-3.5" }),
|
|
7970
7964
|
"Resume"
|
|
7971
7965
|
] }) : /* @__PURE__ */ s(ae, { children: [
|
|
7972
|
-
/* @__PURE__ */ t(
|
|
7966
|
+
/* @__PURE__ */ t(ja, { className: "h-3.5 w-3.5" }),
|
|
7973
7967
|
"Pause"
|
|
7974
7968
|
] })
|
|
7975
7969
|
}
|
|
@@ -7994,8 +7988,8 @@ function cc({
|
|
|
7994
7988
|
}
|
|
7995
7989
|
);
|
|
7996
7990
|
}
|
|
7997
|
-
const
|
|
7998
|
-
function
|
|
7991
|
+
const mc = 2e3, hc = 20 * 6e4;
|
|
7992
|
+
function pc({
|
|
7999
7993
|
briefingId: e,
|
|
8000
7994
|
initialRun: n,
|
|
8001
7995
|
apiServiceUrl: r,
|
|
@@ -8007,13 +8001,13 @@ function hc({
|
|
|
8007
8001
|
const [c, d] = S(n), { startRun: u } = In({
|
|
8008
8002
|
apiServiceUrl: r,
|
|
8009
8003
|
token: a,
|
|
8010
|
-
intervalMs:
|
|
8011
|
-
timeoutMs:
|
|
8004
|
+
intervalMs: mc,
|
|
8005
|
+
timeoutMs: hc,
|
|
8012
8006
|
fetchRun: ({
|
|
8013
8007
|
apiServiceUrl: f,
|
|
8014
8008
|
token: h,
|
|
8015
8009
|
runId: b
|
|
8016
|
-
}) =>
|
|
8010
|
+
}) => Za(f, h, e, b),
|
|
8017
8011
|
onRun: (f) => {
|
|
8018
8012
|
d(f);
|
|
8019
8013
|
},
|
|
@@ -8023,12 +8017,12 @@ function hc({
|
|
|
8023
8017
|
onTimeout: () => {
|
|
8024
8018
|
i();
|
|
8025
8019
|
}
|
|
8026
|
-
}), p =
|
|
8020
|
+
}), p = Ee(!1);
|
|
8027
8021
|
return ce(() => {
|
|
8028
8022
|
p.current || (p.current = !0, _t(n.status) ? u(n) : Ut(n.status) && o(n));
|
|
8029
|
-
}, [n, o, u]), /* @__PURE__ */ t(
|
|
8023
|
+
}, [n, o, u]), /* @__PURE__ */ t(kd, { run: c, onExpand: l });
|
|
8030
8024
|
}
|
|
8031
|
-
function
|
|
8025
|
+
function $c({
|
|
8032
8026
|
dashboardId: e,
|
|
8033
8027
|
dashboardTitle: n,
|
|
8034
8028
|
apiServiceUrl: r,
|
|
@@ -8040,17 +8034,17 @@ function Vc({
|
|
|
8040
8034
|
}) {
|
|
8041
8035
|
const { authToken: d, tokenProps: u } = Dt(), [p, f] = S(!1), [h, b] = S("list"), [D, k] = S("dashboard"), [N, g] = S(
|
|
8042
8036
|
[]
|
|
8043
|
-
), [L, x] = S(null), [C, T] = S(!1), [$, R] = S(null), [
|
|
8037
|
+
), [L, x] = S(null), [C, T] = S(!1), [$, R] = S(null), [E, P] = S(null), [z, B] = S(
|
|
8044
8038
|
null
|
|
8045
8039
|
), [K, _] = S(null), [O, J] = S(
|
|
8046
8040
|
null
|
|
8047
|
-
), [I, ve] = S(null), w = r ?? (u == null ? void 0 : u.apiServiceUrl), q = a ?? (d == null ? void 0 : d.accessToken), se = V(() => ({ ...
|
|
8048
|
-
() =>
|
|
8041
|
+
), [I, ve] = S(null), w = r ?? (u == null ? void 0 : u.apiServiceUrl), q = a ?? (d == null ? void 0 : d.accessToken), se = V(() => ({ ...Gd, ...c }), [c]), X = Yd(n), De = V(
|
|
8042
|
+
() => tc(N, D, e),
|
|
8049
8043
|
[e, N, D]
|
|
8050
8044
|
), ke = V(() => D === "dashboard" ? {
|
|
8051
8045
|
source: { type: "dashboard", dashboardId: e },
|
|
8052
8046
|
label: X,
|
|
8053
|
-
detail:
|
|
8047
|
+
detail: Zd(X)
|
|
8054
8048
|
} : {
|
|
8055
8049
|
source: { type: "project" },
|
|
8056
8050
|
label: "This project",
|
|
@@ -8060,7 +8054,7 @@ function Vc({
|
|
|
8060
8054
|
T(!0), _(null);
|
|
8061
8055
|
try {
|
|
8062
8056
|
g(
|
|
8063
|
-
await
|
|
8057
|
+
await nc({
|
|
8064
8058
|
apiClient: se,
|
|
8065
8059
|
apiServiceUrl: w,
|
|
8066
8060
|
token: q
|
|
@@ -8108,7 +8102,7 @@ function Vc({
|
|
|
8108
8102
|
w,
|
|
8109
8103
|
q,
|
|
8110
8104
|
j.id,
|
|
8111
|
-
{ requestId:
|
|
8105
|
+
{ requestId: fc() }
|
|
8112
8106
|
), U();
|
|
8113
8107
|
} catch (ee) {
|
|
8114
8108
|
he.error(
|
|
@@ -8160,9 +8154,9 @@ function Vc({
|
|
|
8160
8154
|
P(null);
|
|
8161
8155
|
}
|
|
8162
8156
|
}, qe = De.length;
|
|
8163
|
-
return /* @__PURE__ */ s(
|
|
8157
|
+
return /* @__PURE__ */ s(hi, { open: p, onOpenChange: f, children: [
|
|
8164
8158
|
/* @__PURE__ */ t(
|
|
8165
|
-
|
|
8159
|
+
Wd,
|
|
8166
8160
|
{
|
|
8167
8161
|
disabled: o || !Te,
|
|
8168
8162
|
briefingCount: qe,
|
|
@@ -8171,18 +8165,18 @@ function Vc({
|
|
|
8171
8165
|
}
|
|
8172
8166
|
),
|
|
8173
8167
|
/* @__PURE__ */ s(
|
|
8174
|
-
|
|
8168
|
+
pi,
|
|
8175
8169
|
{
|
|
8176
8170
|
side: "right",
|
|
8177
8171
|
hideClose: !0,
|
|
8178
8172
|
className: "flex h-full w-full flex-col overflow-hidden p-0 sm:max-w-[560px]",
|
|
8179
8173
|
children: [
|
|
8180
|
-
/* @__PURE__ */ s(
|
|
8181
|
-
/* @__PURE__ */ t(
|
|
8182
|
-
/* @__PURE__ */ t(
|
|
8174
|
+
/* @__PURE__ */ s(fi, { className: "sr-only", children: [
|
|
8175
|
+
/* @__PURE__ */ t(gi, { children: "Briefings" }),
|
|
8176
|
+
/* @__PURE__ */ t(bi, { children: "Manage briefings for this dashboard." })
|
|
8183
8177
|
] }),
|
|
8184
8178
|
h === "list" ? /* @__PURE__ */ t(
|
|
8185
|
-
|
|
8179
|
+
lc,
|
|
8186
8180
|
{
|
|
8187
8181
|
briefings: De,
|
|
8188
8182
|
dashboardLabel: X,
|
|
@@ -8203,11 +8197,11 @@ function Vc({
|
|
|
8203
8197
|
},
|
|
8204
8198
|
onDelete: (j) => B(j),
|
|
8205
8199
|
selectingId: $,
|
|
8206
|
-
busyId:
|
|
8200
|
+
busyId: E,
|
|
8207
8201
|
manageBriefingsHref: l
|
|
8208
8202
|
}
|
|
8209
8203
|
) : /* @__PURE__ */ t(
|
|
8210
|
-
|
|
8204
|
+
qd,
|
|
8211
8205
|
{
|
|
8212
8206
|
apiServiceUrl: w,
|
|
8213
8207
|
token: q,
|
|
@@ -8234,7 +8228,7 @@ function Vc({
|
|
|
8234
8228
|
}
|
|
8235
8229
|
),
|
|
8236
8230
|
O && w && q ? /* @__PURE__ */ t(
|
|
8237
|
-
|
|
8231
|
+
pc,
|
|
8238
8232
|
{
|
|
8239
8233
|
briefingId: O.briefing.id,
|
|
8240
8234
|
initialRun: O.run,
|
|
@@ -8255,7 +8249,7 @@ function Vc({
|
|
|
8255
8249
|
}
|
|
8256
8250
|
) : null,
|
|
8257
8251
|
I ? /* @__PURE__ */ t("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ t(
|
|
8258
|
-
|
|
8252
|
+
Sd,
|
|
8259
8253
|
{
|
|
8260
8254
|
title: I.run.status === "SUCCESS" ? `${I.briefing.name} is ready` : `${I.briefing.name} run failed`,
|
|
8261
8255
|
durationSeconds: I.run.startedAt && I.run.completedAt ? Math.max(
|
|
@@ -8290,7 +8284,7 @@ function Vc({
|
|
|
8290
8284
|
/* @__PURE__ */ s($n, { children: [
|
|
8291
8285
|
/* @__PURE__ */ t(Un, { children: "Cancel" }),
|
|
8292
8286
|
/* @__PURE__ */ t(
|
|
8293
|
-
|
|
8287
|
+
Ba,
|
|
8294
8288
|
{
|
|
8295
8289
|
className: "bg-destructive/90 hover:bg-destructive",
|
|
8296
8290
|
onClick: Se,
|
|
@@ -8303,51 +8297,51 @@ function Vc({
|
|
|
8303
8297
|
)
|
|
8304
8298
|
] });
|
|
8305
8299
|
}
|
|
8306
|
-
function
|
|
8300
|
+
function fc() {
|
|
8307
8301
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
8308
8302
|
}
|
|
8309
8303
|
export {
|
|
8310
|
-
|
|
8304
|
+
Dc as A,
|
|
8311
8305
|
Kn as B,
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8306
|
+
En as C,
|
|
8307
|
+
Wi as D,
|
|
8308
|
+
Hi as E,
|
|
8309
|
+
At as F,
|
|
8316
8310
|
_r as G,
|
|
8317
|
-
|
|
8311
|
+
Bl as H,
|
|
8318
8312
|
jr as I,
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8313
|
+
qd as J,
|
|
8314
|
+
$c as K,
|
|
8315
|
+
za as L,
|
|
8316
|
+
Pi as M,
|
|
8317
|
+
Fc as N,
|
|
8318
|
+
Tc as U,
|
|
8319
|
+
Ic as V,
|
|
8320
|
+
Wd as W,
|
|
8321
|
+
Ki as a,
|
|
8322
|
+
Rc as b,
|
|
8323
|
+
Ji as c,
|
|
8324
|
+
el as d,
|
|
8325
|
+
Pc as e,
|
|
8326
|
+
Mc as f,
|
|
8327
|
+
Wa as g,
|
|
8328
|
+
ll as h,
|
|
8335
8329
|
Hn as i,
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8330
|
+
Qa as j,
|
|
8331
|
+
Ya as k,
|
|
8332
|
+
il as l,
|
|
8333
|
+
dl as m,
|
|
8334
|
+
cl as n,
|
|
8335
|
+
ul as o,
|
|
8336
|
+
Ga as p,
|
|
8337
|
+
Bc as q,
|
|
8338
|
+
Ja as r,
|
|
8339
|
+
Za as s,
|
|
8340
|
+
ml as t,
|
|
8341
|
+
Lc as u,
|
|
8342
|
+
hl as v,
|
|
8343
|
+
Oc as w,
|
|
8344
|
+
Vc as x,
|
|
8345
|
+
pl as y,
|
|
8346
|
+
Ml as z
|
|
8353
8347
|
};
|