react-semaphor 0.1.560 → 0.1.562
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.js +450 -423
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
- package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
- package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
- package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
- package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
- package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
- package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
- package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
- package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
- package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
- package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
- package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
- package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
- package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
- package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
- package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
- package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
- package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
- package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
- package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
- package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2477 -2685
- package/dist/data-app-sdk/index.js +30 -30
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +25 -25
- package/dist/format-utils/index.js +274 -267
- package/dist/index.js +59 -59
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
- package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +50 -51
- package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
- package/dist/types/lib/print/print-inputs.d.ts +2 -1
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/stores/editor-store.d.ts +9 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/lib/types/explorer-types.d.ts +7 -1
- package/dist/types/lib/types/interaction-types.d.ts +3 -1
- package/dist/types/lib/types/token-types.d.ts +0 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
- package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +76 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -0
- package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3402 -4313
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
- package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
- package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
- package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
- package/dist/types/shared/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
- package/dist/types/shared/temporal/index.d.ts +1 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
- package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
- package/package.json +2 -2
- package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
- package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
- package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
- package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
- package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
- package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
- package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
- package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
- package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
- package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
- package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
- package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
- package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
- package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
- package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
- package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
|
@@ -5,29 +5,28 @@ var Or = (e, t, r) => t.has(e) || $r("Cannot " + r);
|
|
|
5
5
|
var L = (e, t, r) => (Or(e, t, "read from private field"), r ? r.call(e) : t.get(e)), me = (e, t, r) => t.has(e) ? $r("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ee = (e, t, r, n) => (Or(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
|
|
6
6
|
import { jsx as p, jsxs as k, Fragment as Le } from "react/jsx-runtime";
|
|
7
7
|
import { useCallback as te, useRef as ie, useMemo as it, useEffect as ke, useState as j, useLayoutEffect as Ue, useId as As } from "react";
|
|
8
|
-
import { u as
|
|
9
|
-
import { c as qe, B as H, X as lt, j as jn, k as fo, d as mt, L as Be, I as Fn, R as Ln, P as Un, a as Bn, b as Vn } from "./switch-
|
|
8
|
+
import { u as X, du as Cs, ba as $s, bu as Os, Y as zs, dv as Ms, dw as Ps, Z as zr, b7 as Rs, dx as Zs, aR as Ds, bp as js, dy as dr, cR as Fs, dz as Ls, dA as Mt, dB as Cn, dC as Us, a$ as Pt, cm as Mr, dD as $n, $ as Bs, cg as On, bx as Vs, c9 as qs, aS as zn, di as Mn, dE as Js, dF as Ks, bD as Ws, dG as Gs, dH as Hs, dI as Ys, cj as Qs, ck as Xs, cS as eo, cl as to, cr as ro, dJ as no, c6 as Lt, cq as ao, cv as so, c8 as Pn, b5 as Rn, b8 as oo, bo as xt, b3 as Zn, dK as io, dL as lo, dM as co, dN as uo, a6 as Dn, dO as po } from "./semaphor-ready-indicator-Cfuafnem.js";
|
|
9
|
+
import { c as qe, B as H, X as lt, j as jn, k as fo, d as mt, L as Be, I as Fn, R as Ln, P as Un, a as Bn, b as Vn } from "./switch-BW4yXSYs.js";
|
|
10
10
|
import "./index-CuHybtft.js";
|
|
11
|
-
import "./validators-
|
|
12
|
-
import "./matrix-operation-contract-
|
|
13
|
-
import "./analytics-base-schemas-
|
|
11
|
+
import "./validators-BIM0FE31.js";
|
|
12
|
+
import "./matrix-operation-contract-DsLdFdSa.js";
|
|
13
|
+
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
14
14
|
import "zod";
|
|
15
15
|
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as mo } from "../value-format-preferences/index.js";
|
|
16
16
|
import { g as ho, c as B } from "./_commonjsHelpers-DimLPMtv.js";
|
|
17
|
-
import {
|
|
18
|
-
import { l as bo, m as ct, c as
|
|
19
|
-
import { p as Pr, a as vo, A as Jn } from "./saved-dashboard-context-
|
|
20
|
-
import {
|
|
21
|
-
import { o as Kn, p as wo } from "./report-preferences-dialog-
|
|
22
|
-
import {
|
|
17
|
+
import { N as go } from "./bookmark-state-CWeoGbrx.js";
|
|
18
|
+
import { l as bo, m as ct, c as Xt, A as et, d as qn } from "./context-R31TSL5V.js";
|
|
19
|
+
import { p as Pr, a as vo, A as Jn } from "./saved-dashboard-context-DFYBrE6O.js";
|
|
20
|
+
import { fF as yo, a$ as xo, eQ as Rr } from "./global-date-filter-utils-N1kcsOFE.js";
|
|
21
|
+
import { o as Kn, p as wo } from "./report-preferences-dialog-C4RAR8u5.js";
|
|
22
|
+
import { q as _o } from "./resolve-dashboard-input-context-DaDrZGuA.js";
|
|
23
23
|
import { w as Io, c as Wn } from "./visual-choice-JiJ-_3bi.js";
|
|
24
|
-
import { m as So, v as Gn, t as No, n as ko, k as ve, d as Eo, b as To, l as pr, w as Ao, h as Co, s as er, f as $o, a as Oo } from "./model-change-
|
|
25
|
-
import {
|
|
26
|
-
import { L as
|
|
27
|
-
import {
|
|
28
|
-
import { L as Ur } from "./layout-grid-BvsH4RY2.js";
|
|
24
|
+
import { m as So, v as Gn, t as No, n as ko, k as ve, d as Eo, b as To, l as pr, w as Ao, h as Co, s as er, f as $o, a as Oo } from "./model-change-T1cRkh3m.js";
|
|
25
|
+
import { aK as zo, aL as Mo, aM as Po, aN as wt, aO as Ro, aP as Zr, aQ as Dr, aR as jr, aS as Fr, aT as Lr, aU as Zo, ac as Do, aa as jo } from "./temporal-input-presentation-sk9gqLi6.js";
|
|
26
|
+
import { L as Fo } from "./list-filter-BoeLBfL3.js";
|
|
27
|
+
import { L as Ur } from "./layout-grid-BM65viQh.js";
|
|
29
28
|
function Lo(e, t, r) {
|
|
30
|
-
const n =
|
|
29
|
+
const n = zo(), a = (r == null ? void 0 : r.locale) ?? n.locale ?? Mo, s = Po(e, t);
|
|
31
30
|
if (isNaN(s))
|
|
32
31
|
throw new RangeError("Invalid time value");
|
|
33
32
|
const o = Object.assign({}, r, {
|
|
@@ -36,9 +35,9 @@ function Lo(e, t, r) {
|
|
|
36
35
|
});
|
|
37
36
|
let c, f;
|
|
38
37
|
s > 0 ? (c = wt(t), f = wt(e)) : (c = wt(e), f = wt(t));
|
|
39
|
-
const i =
|
|
38
|
+
const i = Ro((r == null ? void 0 : r.roundingMethod) ?? "round"), g = f.getTime() - c.getTime(), u = g / Lr, m = Zr(f) - Zr(c), w = (g - m) / Lr, I = r == null ? void 0 : r.unit;
|
|
40
39
|
let E;
|
|
41
|
-
if (I ? E = I : u < 1 ? E = "second" : u < 60 ? E = "minute" : u <
|
|
40
|
+
if (I ? E = I : u < 1 ? E = "second" : u < 60 ? E = "minute" : u < Dr ? E = "hour" : w < jr ? E = "day" : w < Fr ? E = "month" : E = "year", E === "second") {
|
|
42
41
|
const _ = i(g / 1e3);
|
|
43
42
|
return a.formatDistance("xSeconds", _, o);
|
|
44
43
|
} else if (E === "minute") {
|
|
@@ -48,18 +47,18 @@ function Lo(e, t, r) {
|
|
|
48
47
|
const _ = i(u / 60);
|
|
49
48
|
return a.formatDistance("xHours", _, o);
|
|
50
49
|
} else if (E === "day") {
|
|
51
|
-
const _ = i(w /
|
|
50
|
+
const _ = i(w / Dr);
|
|
52
51
|
return a.formatDistance("xDays", _, o);
|
|
53
52
|
} else if (E === "month") {
|
|
54
|
-
const _ = i(w /
|
|
53
|
+
const _ = i(w / jr);
|
|
55
54
|
return _ === 12 && I !== "month" ? a.formatDistance("xYears", 1, o) : a.formatDistance("xMonths", _, o);
|
|
56
55
|
} else {
|
|
57
|
-
const _ = i(w /
|
|
56
|
+
const _ = i(w / Fr);
|
|
58
57
|
return a.formatDistance("xYears", _, o);
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
function Uo(e, t) {
|
|
62
|
-
return Lo(e,
|
|
61
|
+
return Lo(e, Zo(e), t);
|
|
63
62
|
}
|
|
64
63
|
/**
|
|
65
64
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -150,7 +149,7 @@ function Go(e = "dashboard") {
|
|
|
150
149
|
return t && Br(t.reads, [r]) || (t = { reads: [r], sent: { context: Pr({ surface: "none", timeZone: r }) } }), t.sent;
|
|
151
150
|
} : ({ focus: r, snapshot: n, editing: a }) => {
|
|
152
151
|
var I;
|
|
153
|
-
const s =
|
|
152
|
+
const s = X.getState(), o = (I = s.reportContext) == null ? void 0 : I.calendar;
|
|
154
153
|
if (!o) throw new Yn();
|
|
155
154
|
const c = a ? a.card.id : r == null ? void 0 : r.cardId, f = c ? (n == null ? void 0 : n.cardId) === c && n.draft === !!a && (!a || n.card === a.card) ? n.snapshot : "pending" : void 0, i = {
|
|
156
155
|
surface: "dashboard",
|
|
@@ -195,29 +194,29 @@ function Br(e, t) {
|
|
|
195
194
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
196
195
|
}
|
|
197
196
|
function Ho(e) {
|
|
198
|
-
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n =
|
|
197
|
+
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n = X((i) => {
|
|
199
198
|
var u, m;
|
|
200
199
|
const g = (m = (u = i.dashboard) == null ? void 0 : u.sheets) == null ? void 0 : m.find((w) => w.id === i.selectedSheetId);
|
|
201
200
|
return !!g && !xo(g);
|
|
202
|
-
}), a =
|
|
201
|
+
}), a = X((i) => i.isVisualEditing), s = $s(), o = Os();
|
|
203
202
|
return { add: te(
|
|
204
203
|
async (i, g) => {
|
|
205
204
|
var T, O;
|
|
206
|
-
const u =
|
|
205
|
+
const u = X.getState(), m = (T = u.dashboard) == null ? void 0 : T.id, w = u.selectedSheetId;
|
|
207
206
|
if (!m || !w) throw new at(Ut);
|
|
208
|
-
const I = { title: i.title, type: So[g], ...i.card }, E = !
|
|
207
|
+
const I = { title: i.title, type: So[g], ...i.card }, E = !Qo({ ...I, id: "check" }, i, g), _ = { ...I, ...E ? { type: "table" } : {}, id: Rr() }, x = { id: Rr(), cards: [_], activeCardId: _.id }, y = await o(x, { reuseLoaded: !0 }).catch((K) => {
|
|
209
208
|
console.warn("Adding the result without refreshed semantic metadata:", K);
|
|
210
|
-
}), h = structuredClone(
|
|
209
|
+
}), h = structuredClone(X.getState().semanticExecutionPayload);
|
|
211
210
|
zs(h, y);
|
|
212
211
|
const d = Io(
|
|
213
212
|
_.config ?? {},
|
|
214
|
-
|
|
215
|
-
), v = d === (_.config ?? {}) ? x : { ...x, cards: [{ ..._, config: d }] }, b =
|
|
213
|
+
Xo(_, w, h, s)
|
|
214
|
+
), v = d === (_.config ?? {}) ? x : { ...x, cards: [{ ..._, config: d }] }, b = X.getState();
|
|
216
215
|
if (((O = b.dashboard) == null ? void 0 : O.id) !== m || b.selectedSheetId !== w || b.isVisualEditing)
|
|
217
216
|
throw new at(Ut);
|
|
218
217
|
if (!r()) throw new at(Yo);
|
|
219
218
|
const { actions: N } = b;
|
|
220
|
-
if (N.setIsDashboardEditing(!0), N.addFrame(w, v, { semanticExecutionPayload: y }), !
|
|
219
|
+
if (N.setIsDashboardEditing(!0), N.addFrame(w, v, { semanticExecutionPayload: y }), !Qn(X.getState().dashboard, v.id))
|
|
221
220
|
throw b.isDashboardEditing || N.setIsDashboardEditing(!1), new at(Ut);
|
|
222
221
|
return { frameId: v.id, asTable: E };
|
|
223
222
|
},
|
|
@@ -225,7 +224,7 @@ function Ho(e) {
|
|
|
225
224
|
), available: t && n && !a };
|
|
226
225
|
}
|
|
227
226
|
const Ut = "The dashboard changed while this was being added. Try again.", Yo = "Changes to this dashboard can't be saved here, so the card wasn't added.";
|
|
228
|
-
function
|
|
227
|
+
function Qo(e, t, r) {
|
|
229
228
|
if (r !== "line" && r !== "bar" && r !== "stackedBar") return !0;
|
|
230
229
|
const n = Wn(Gn(t), r);
|
|
231
230
|
if (!n.ok) return !1;
|
|
@@ -237,16 +236,16 @@ class at extends Error {
|
|
|
237
236
|
super(t), this.name = "AddToDashboardRefusedError";
|
|
238
237
|
}
|
|
239
238
|
}
|
|
240
|
-
function
|
|
239
|
+
function Qn(e, t) {
|
|
241
240
|
var r;
|
|
242
241
|
return !!((r = e == null ? void 0 : e.sheets) != null && r.some((n) => {
|
|
243
242
|
var a;
|
|
244
243
|
return (a = n.frames) == null ? void 0 : a.some((s) => s.id === t);
|
|
245
244
|
}));
|
|
246
245
|
}
|
|
247
|
-
function
|
|
246
|
+
function Xo(e, t, r, n) {
|
|
248
247
|
var o;
|
|
249
|
-
const a = Ps(
|
|
248
|
+
const a = Ps(X.getState()), s = _o({
|
|
250
249
|
...a,
|
|
251
250
|
cardId: e.id,
|
|
252
251
|
cardOverride: e,
|
|
@@ -259,7 +258,7 @@ function Qo(e, t, r, n) {
|
|
|
259
258
|
(c) => c.dateOwner !== "global_date"
|
|
260
259
|
);
|
|
261
260
|
}
|
|
262
|
-
const
|
|
261
|
+
const Xn = "vercel.ai.error", ei = Symbol.for(Xn);
|
|
263
262
|
var re = class ea extends Error {
|
|
264
263
|
/**
|
|
265
264
|
* Creates an AI SDK Error.
|
|
@@ -278,7 +277,7 @@ var re = class ea extends Error {
|
|
|
278
277
|
* @returns {boolean} True if the error is an AI SDK Error, false otherwise.
|
|
279
278
|
*/
|
|
280
279
|
static isInstance(t) {
|
|
281
|
-
return ea.hasMarker(t,
|
|
280
|
+
return ea.hasMarker(t, Xn);
|
|
282
281
|
}
|
|
283
282
|
static hasMarker(t, r) {
|
|
284
283
|
const n = Symbol.for(r);
|
|
@@ -778,7 +777,7 @@ function Wi(e) {
|
|
|
778
777
|
const Gi = (e) => {
|
|
779
778
|
const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
|
|
780
779
|
return new RegExp(`^${t}$`);
|
|
781
|
-
}, Hi = /^\d+$/, Yi = /^-?\d+(?:\.\d+)?/i,
|
|
780
|
+
}, Hi = /^\d+$/, Yi = /^-?\d+(?:\.\d+)?/i, Qi = /true|false/i, Xi = /null/i, el = /^[^A-Z]*$/, tl = /^[^a-z]*$/, le = /* @__PURE__ */ S("$ZodCheck", (e, t) => {
|
|
782
781
|
var r;
|
|
783
782
|
e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
|
|
784
783
|
}), Na = {
|
|
@@ -1371,7 +1370,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1371
1370
|
}), Ll = /* @__PURE__ */ S("$ZodNumber", (e, t) => {
|
|
1372
1371
|
nl.init(e, t), Aa.init(e, t);
|
|
1373
1372
|
}), Ul = /* @__PURE__ */ S("$ZodBoolean", (e, t) => {
|
|
1374
|
-
U.init(e, t), e._zod.pattern =
|
|
1373
|
+
U.init(e, t), e._zod.pattern = Qi, e._zod.parse = (r, n) => {
|
|
1375
1374
|
if (t.coerce)
|
|
1376
1375
|
try {
|
|
1377
1376
|
r.value = !!r.value;
|
|
@@ -1386,7 +1385,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1386
1385
|
}), r;
|
|
1387
1386
|
};
|
|
1388
1387
|
}), Bl = /* @__PURE__ */ S("$ZodNull", (e, t) => {
|
|
1389
|
-
U.init(e, t), e._zod.pattern =
|
|
1388
|
+
U.init(e, t), e._zod.pattern = Xi, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (r, n) => {
|
|
1390
1389
|
const a = r.value;
|
|
1391
1390
|
return a === null || r.issues.push({
|
|
1392
1391
|
expected: "null",
|
|
@@ -1763,7 +1762,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1763
1762
|
inst: e
|
|
1764
1763
|
}), n;
|
|
1765
1764
|
};
|
|
1766
|
-
}),
|
|
1765
|
+
}), Ql = /* @__PURE__ */ S("$ZodLiteral", (e, t) => {
|
|
1767
1766
|
U.init(e, t), e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? ht(r) : r ? r.toString() : String(r)).join("|")})$`), e._zod.parse = (r, n) => {
|
|
1768
1767
|
const a = r.value;
|
|
1769
1768
|
return e._zod.values.has(a) || r.issues.push({
|
|
@@ -1773,7 +1772,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1773
1772
|
inst: e
|
|
1774
1773
|
}), r;
|
|
1775
1774
|
};
|
|
1776
|
-
}),
|
|
1775
|
+
}), Xl = /* @__PURE__ */ S("$ZodTransform", (e, t) => {
|
|
1777
1776
|
U.init(e, t), e._zod.parse = (r, n) => {
|
|
1778
1777
|
const a = t.transform(r.value, r);
|
|
1779
1778
|
if (n.async)
|
|
@@ -1811,10 +1810,10 @@ const nc = /* @__PURE__ */ S("$ZodPrefault", (e, t) => {
|
|
|
1811
1810
|
return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
|
|
1812
1811
|
}), e._zod.parse = (r, n) => {
|
|
1813
1812
|
const a = t.innerType._zod.run(r, n);
|
|
1814
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1813
|
+
return a instanceof Promise ? a.then((s) => Qr(s, e)) : Qr(a, e);
|
|
1815
1814
|
};
|
|
1816
1815
|
});
|
|
1817
|
-
function
|
|
1816
|
+
function Qr(e, t) {
|
|
1818
1817
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1819
1818
|
code: "invalid_type",
|
|
1820
1819
|
expected: "nonoptional",
|
|
@@ -1842,10 +1841,10 @@ const sc = /* @__PURE__ */ S("$ZodCatch", (e, t) => {
|
|
|
1842
1841
|
}), oc = /* @__PURE__ */ S("$ZodPipe", (e, t) => {
|
|
1843
1842
|
U.init(e, t), D(e._zod, "values", () => t.in._zod.values), D(e._zod, "optin", () => t.in._zod.optin), D(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (r, n) => {
|
|
1844
1843
|
const a = t.in._zod.run(r, n);
|
|
1845
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1844
|
+
return a instanceof Promise ? a.then((s) => Xr(s, t, n)) : Xr(a, t, n);
|
|
1846
1845
|
};
|
|
1847
1846
|
});
|
|
1848
|
-
function
|
|
1847
|
+
function Xr(e, t, r) {
|
|
1849
1848
|
return ot(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
|
|
1850
1849
|
}
|
|
1851
1850
|
const ic = /* @__PURE__ */ S("$ZodReadonly", (e, t) => {
|
|
@@ -2321,10 +2320,10 @@ function Hc() {
|
|
|
2321
2320
|
function Yc() {
|
|
2322
2321
|
return gt((e) => e.toLowerCase());
|
|
2323
2322
|
}
|
|
2324
|
-
function
|
|
2323
|
+
function Qc() {
|
|
2325
2324
|
return gt((e) => e.toUpperCase());
|
|
2326
2325
|
}
|
|
2327
|
-
function
|
|
2326
|
+
function Xc(e, t, r) {
|
|
2328
2327
|
return new e({
|
|
2329
2328
|
type: "array",
|
|
2330
2329
|
element: t,
|
|
@@ -2939,7 +2938,7 @@ const du = (e, t) => {
|
|
|
2939
2938
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Pa = /* @__PURE__ */ S("_ZodString", (e, t) => {
|
|
2940
2939
|
br.init(e, t), q.init(e, t);
|
|
2941
2940
|
const r = e._zod.bag;
|
|
2942
|
-
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Bc(...n)), e.includes = (...n) => e.check(Jc(...n)), e.startsWith = (...n) => e.check(Kc(...n)), e.endsWith = (...n) => e.check(Wc(...n)), e.min = (...n) => e.check($t(...n)), e.max = (...n) => e.check(Oa(...n)), e.length = (...n) => e.check(za(...n)), e.nonempty = (...n) => e.check($t(1, ...n)), e.lowercase = (n) => e.check(Vc(n)), e.uppercase = (n) => e.check(qc(n)), e.trim = () => e.check(Hc()), e.normalize = (...n) => e.check(Gc(...n)), e.toLowerCase = () => e.check(Yc()), e.toUpperCase = () => e.check(
|
|
2941
|
+
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Bc(...n)), e.includes = (...n) => e.check(Jc(...n)), e.startsWith = (...n) => e.check(Kc(...n)), e.endsWith = (...n) => e.check(Wc(...n)), e.min = (...n) => e.check($t(...n)), e.max = (...n) => e.check(Oa(...n)), e.length = (...n) => e.check(za(...n)), e.nonempty = (...n) => e.check($t(1, ...n)), e.lowercase = (n) => e.check(Vc(n)), e.uppercase = (n) => e.check(qc(n)), e.trim = () => e.check(Hc()), e.normalize = (...n) => e.check(Gc(...n)), e.toLowerCase = () => e.check(Yc()), e.toUpperCase = () => e.check(Qc());
|
|
2943
2942
|
}), hu = /* @__PURE__ */ S("ZodString", (e, t) => {
|
|
2944
2943
|
br.init(e, t), Pa.init(e, t), e.email = (r) => e.check(pc(bu, r)), e.url = (r) => e.check(bc(vu, r)), e.jwt = (r) => e.check(Oc(zu, r)), e.emoji = (r) => e.check(vc(yu, r)), e.guid = (r) => e.check(rn(ln, r)), e.uuid = (r) => e.check(fc(St, r)), e.uuidv4 = (r) => e.check(mc(St, r)), e.uuidv6 = (r) => e.check(hc(St, r)), e.uuidv7 = (r) => e.check(gc(St, r)), e.nanoid = (r) => e.check(yc(xu, r)), e.guid = (r) => e.check(rn(ln, r)), e.cuid = (r) => e.check(xc(wu, r)), e.cuid2 = (r) => e.check(wc(_u, r)), e.ulid = (r) => e.check(_c(Iu, r)), e.base64 = (r) => e.check(Ac(Cu, r)), e.base64url = (r) => e.check(Cc($u, r)), e.xid = (r) => e.check(Ic(Su, r)), e.ksuid = (r) => e.check(Sc(Nu, r)), e.ipv4 = (r) => e.check(Nc(ku, r)), e.ipv6 = (r) => e.check(kc(Eu, r)), e.cidrv4 = (r) => e.check(Ec(Tu, r)), e.cidrv6 = (r) => e.check(Tc(Au, r)), e.e164 = (r) => e.check($c(Ou, r)), e.datetime = (r) => e.check(au(r)), e.date = (r) => e.check(ou(r)), e.time = (r) => e.check(lu(r)), e.duration = (r) => e.check(uu(r));
|
|
2945
2944
|
});
|
|
@@ -3028,7 +3027,7 @@ const Uu = /* @__PURE__ */ S("ZodArray", (e, t) => {
|
|
|
3028
3027
|
Jl.init(e, t), q.init(e, t), e.element = t.element, e.min = (r, n) => e.check($t(r, n)), e.nonempty = (r) => e.check($t(1, r)), e.max = (r, n) => e.check(Oa(r, n)), e.length = (r, n) => e.check(za(r, n)), e.unwrap = () => e.element;
|
|
3029
3028
|
});
|
|
3030
3029
|
function Da(e, t) {
|
|
3031
|
-
return
|
|
3030
|
+
return Xc(Uu, e, t);
|
|
3032
3031
|
}
|
|
3033
3032
|
const ja = /* @__PURE__ */ S("ZodObject", (e, t) => {
|
|
3034
3033
|
Kl.init(e, t), q.init(e, t), D(e, "shape", () => t.shape), e.keyof = () => Ua(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ot() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ot() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Za() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => vi(e, r), e.merge = (r) => yi(e, r), e.pick = (r) => gi(e, r), e.omit = (r) => bi(e, r), e.partial = (...r) => xi(Ba, e, r[0]), e.required = (...r) => wi(Va, e, r[0]);
|
|
@@ -3135,7 +3134,7 @@ function Ua(e, t) {
|
|
|
3135
3134
|
});
|
|
3136
3135
|
}
|
|
3137
3136
|
const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
3138
|
-
|
|
3137
|
+
Ql.init(e, t), q.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3139
3138
|
get() {
|
|
3140
3139
|
if (t.values.length > 1)
|
|
3141
3140
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3143,15 +3142,15 @@ const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
|
3143
3142
|
}
|
|
3144
3143
|
});
|
|
3145
3144
|
});
|
|
3146
|
-
function
|
|
3145
|
+
function Qu(e, t) {
|
|
3147
3146
|
return new Yu({
|
|
3148
3147
|
type: "literal",
|
|
3149
3148
|
values: Array.isArray(e) ? e : [e],
|
|
3150
3149
|
...$(t)
|
|
3151
3150
|
});
|
|
3152
3151
|
}
|
|
3153
|
-
const
|
|
3154
|
-
|
|
3152
|
+
const Xu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
3153
|
+
Xl.init(e, t), q.init(e, t), e._zod.parse = (r, n) => {
|
|
3155
3154
|
r.addIssue = (s) => {
|
|
3156
3155
|
if (typeof s == "string")
|
|
3157
3156
|
r.issues.push(dt(s, r.value, t));
|
|
@@ -3165,7 +3164,7 @@ const Qu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
|
3165
3164
|
};
|
|
3166
3165
|
});
|
|
3167
3166
|
function ed(e) {
|
|
3168
|
-
return new
|
|
3167
|
+
return new Xu({
|
|
3169
3168
|
type: "transform",
|
|
3170
3169
|
transform: e
|
|
3171
3170
|
});
|
|
@@ -4104,7 +4103,7 @@ function Yd(e, t) {
|
|
|
4104
4103
|
for (const o in a) {
|
|
4105
4104
|
let c = a[o];
|
|
4106
4105
|
if (c === void 0 || c._def === void 0) continue;
|
|
4107
|
-
const f =
|
|
4106
|
+
const f = Xd(c), i = F(c._def, {
|
|
4108
4107
|
...t,
|
|
4109
4108
|
currentPath: [
|
|
4110
4109
|
...t.currentPath,
|
|
@@ -4120,10 +4119,10 @@ function Yd(e, t) {
|
|
|
4120
4119
|
i !== void 0 && (r.properties[o] = i, f || n.push(o));
|
|
4121
4120
|
}
|
|
4122
4121
|
n.length && (r.required = n);
|
|
4123
|
-
const s =
|
|
4122
|
+
const s = Qd(e, t);
|
|
4124
4123
|
return s !== void 0 && (r.additionalProperties = s), r;
|
|
4125
4124
|
}
|
|
4126
|
-
function
|
|
4125
|
+
function Qd(e, t) {
|
|
4127
4126
|
if (e.catchall._def.typeName !== "ZodNever") return F(e.catchall._def, {
|
|
4128
4127
|
...t,
|
|
4129
4128
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
@@ -4137,7 +4136,7 @@ function Xd(e, t) {
|
|
|
4137
4136
|
return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4138
4137
|
}
|
|
4139
4138
|
}
|
|
4140
|
-
function
|
|
4139
|
+
function Xd(e) {
|
|
4141
4140
|
try {
|
|
4142
4141
|
return e.isOptional();
|
|
4143
4142
|
} catch {
|
|
@@ -4557,7 +4556,7 @@ async function He(e) {
|
|
|
4557
4556
|
return typeof e == "function" && (e = e()), e;
|
|
4558
4557
|
}
|
|
4559
4558
|
new TextDecoder();
|
|
4560
|
-
const Ya = "AI_InvalidArgumentError",
|
|
4559
|
+
const Ya = "AI_InvalidArgumentError", Qa = `vercel.ai.error.${Ya}`, Ip = Symbol.for(Qa);
|
|
4561
4560
|
var Et = class extends re {
|
|
4562
4561
|
constructor({ parameter: e, value: t, message: r }) {
|
|
4563
4562
|
super({
|
|
@@ -4566,14 +4565,14 @@ var Et = class extends re {
|
|
|
4566
4565
|
}), this[Ip] = !0, this.parameter = e, this.value = t;
|
|
4567
4566
|
}
|
|
4568
4567
|
static isInstance(e) {
|
|
4569
|
-
return re.hasMarker(e,
|
|
4568
|
+
return re.hasMarker(e, Qa);
|
|
4570
4569
|
}
|
|
4571
4570
|
};
|
|
4572
|
-
const
|
|
4571
|
+
const Xa = "AI_UIMessageStreamError", es = `vercel.ai.error.${Xa}`, Sp = Symbol.for(es);
|
|
4573
4572
|
var Me = class extends re {
|
|
4574
4573
|
constructor({ chunkType: e, chunkId: t, message: r }) {
|
|
4575
4574
|
super({
|
|
4576
|
-
name:
|
|
4575
|
+
name: Xa,
|
|
4577
4576
|
message: r
|
|
4578
4577
|
}), this[Sp] = !0, this.chunkType = e, this.chunkId = t;
|
|
4579
4578
|
}
|
|
@@ -4603,7 +4602,7 @@ const l = {
|
|
|
4603
4602
|
enum: Ua,
|
|
4604
4603
|
instanceof: vd,
|
|
4605
4604
|
lazy: fd,
|
|
4606
|
-
literal:
|
|
4605
|
+
literal: Qu,
|
|
4607
4606
|
looseObject: Vu,
|
|
4608
4607
|
never: Za,
|
|
4609
4608
|
null: ju,
|
|
@@ -6401,26 +6400,26 @@ function Yp(e, t) {
|
|
|
6401
6400
|
}, f);
|
|
6402
6401
|
};
|
|
6403
6402
|
}
|
|
6404
|
-
var
|
|
6405
|
-
const
|
|
6403
|
+
var Qp = Yp;
|
|
6404
|
+
const Xp = /* @__PURE__ */ ho(Qp);
|
|
6406
6405
|
function ef(e, t) {
|
|
6407
|
-
return t != null ?
|
|
6406
|
+
return t != null ? Xp(e, t) : e;
|
|
6408
6407
|
}
|
|
6409
6408
|
function tf(e) {
|
|
6410
6409
|
return Array.isArray(e) ? [...e] : e != null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null) ? { ...e } : e;
|
|
6411
6410
|
}
|
|
6412
|
-
var ce,
|
|
6411
|
+
var ce, Qe, Xe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
6413
6412
|
constructor(e = []) {
|
|
6414
6413
|
me(this, ce);
|
|
6415
|
-
me(this, Xe);
|
|
6416
6414
|
me(this, Qe);
|
|
6415
|
+
me(this, Xe);
|
|
6417
6416
|
me(this, Ze);
|
|
6418
6417
|
me(this, De);
|
|
6419
6418
|
me(this, je);
|
|
6420
6419
|
me(this, Ne);
|
|
6421
6420
|
me(this, pt);
|
|
6422
6421
|
me(this, ft);
|
|
6423
|
-
ee(this,
|
|
6422
|
+
ee(this, Qe, "ready"), ee(this, Xe, void 0), ee(this, Ze, /* @__PURE__ */ new Set()), ee(this, De, /* @__PURE__ */ new Set()), ee(this, je, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
|
|
6424
6423
|
ee(this, ce, L(this, ce).concat(t)), L(this, Ne).call(this);
|
|
6425
6424
|
}, this.popMessage = () => {
|
|
6426
6425
|
ee(this, ce, L(this, ce).slice(0, -1)), L(this, Ne).call(this);
|
|
@@ -6455,16 +6454,16 @@ var ce, Xe, Qe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6455
6454
|
}), ee(this, ce, e);
|
|
6456
6455
|
}
|
|
6457
6456
|
get status() {
|
|
6458
|
-
return L(this,
|
|
6457
|
+
return L(this, Qe);
|
|
6459
6458
|
}
|
|
6460
6459
|
set status(e) {
|
|
6461
|
-
ee(this,
|
|
6460
|
+
ee(this, Qe, e), L(this, pt).call(this);
|
|
6462
6461
|
}
|
|
6463
6462
|
get error() {
|
|
6464
|
-
return L(this,
|
|
6463
|
+
return L(this, Xe);
|
|
6465
6464
|
}
|
|
6466
6465
|
set error(e) {
|
|
6467
|
-
ee(this,
|
|
6466
|
+
ee(this, Xe, e), L(this, ft).call(this);
|
|
6468
6467
|
}
|
|
6469
6468
|
get messages() {
|
|
6470
6469
|
return L(this, ce);
|
|
@@ -6472,7 +6471,7 @@ var ce, Xe, Qe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6472
6471
|
set messages(e) {
|
|
6473
6472
|
ee(this, ce, [...e]), L(this, Ne).call(this);
|
|
6474
6473
|
}
|
|
6475
|
-
}, ce = new WeakMap(),
|
|
6474
|
+
}, ce = new WeakMap(), Qe = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), De = new WeakMap(), je = new WeakMap(), Ne = new WeakMap(), pt = new WeakMap(), ft = new WeakMap(), Tn), Fe, An, is = (An = class extends Hp {
|
|
6476
6475
|
constructor({ messages: t, ...r }) {
|
|
6477
6476
|
const n = new rf(t);
|
|
6478
6477
|
super({
|
|
@@ -6683,12 +6682,12 @@ function hf(e) {
|
|
|
6683
6682
|
const Z = t.current.applyProposal;
|
|
6684
6683
|
if (r.current !== C || !Z) return;
|
|
6685
6684
|
const de = C.proposals.has(M.proposalId), pe = C.proposals.get(M.proposalId) ?? null;
|
|
6686
|
-
R(C, 1), a((
|
|
6687
|
-
const
|
|
6685
|
+
R(C, 1), a((Q) => Pe(Q, C.chat.id, M.proposalId, { status: "applying" })), C.applying = C.applying.then(async () => {
|
|
6686
|
+
const Q = de ? pe === null ? C.answerBase : C.appliedAfter.get(pe) : void 0, fe = de && pe !== null ? { ok: !1, reason: "previous_not_applied", message: zr.previous_not_applied } : { ok: !1, reason: "dashboard_changed", message: zr.dashboard_changed };
|
|
6688
6687
|
let ae;
|
|
6689
6688
|
try {
|
|
6690
|
-
ae =
|
|
6691
|
-
{ proposalId: M.proposalId, operations: M.operations, context: M.context, basedOn:
|
|
6689
|
+
ae = Q ? await Z(
|
|
6690
|
+
{ proposalId: M.proposalId, operations: M.operations, context: M.context, basedOn: Q },
|
|
6692
6691
|
{ stillWanted: () => r.current === C }
|
|
6693
6692
|
) : fe;
|
|
6694
6693
|
} catch (Ie) {
|
|
@@ -6734,15 +6733,15 @@ function hf(e) {
|
|
|
6734
6733
|
...Z.cardReplay ?? {},
|
|
6735
6734
|
...C.length ? { taggedFields: C } : {}
|
|
6736
6735
|
};
|
|
6737
|
-
if (
|
|
6738
|
-
return y(new qn(
|
|
6736
|
+
if (Xt({ ...de, message: M }) > et.requestBytes)
|
|
6737
|
+
return y(new qn(Xt(de)).message), "not_sent";
|
|
6739
6738
|
y(void 0);
|
|
6740
6739
|
const pe = (fe = Z.context.selectedCard) == null ? void 0 : fe.id;
|
|
6741
6740
|
pe && (m.aboutCardId = pe);
|
|
6742
|
-
const
|
|
6743
|
-
return m.answerBase =
|
|
6741
|
+
const Q = gf(Z.context, (($e = (ae = t.current).canChangeOpenDashboard) == null ? void 0 : $e.call(ae)) ?? !1);
|
|
6742
|
+
return m.answerBase = Q, m.proposals.clear(), m.appliedAfter.clear(), m.chat.sendMessage(
|
|
6744
6743
|
{ text: M, ...C.length ? { metadata: { taggedFields: C } } : {} },
|
|
6745
|
-
{ body:
|
|
6744
|
+
{ body: Q ? { ...de, openDashboard: Q } : de }
|
|
6746
6745
|
), "sent";
|
|
6747
6746
|
},
|
|
6748
6747
|
[m, h]
|
|
@@ -6755,7 +6754,7 @@ function hf(e) {
|
|
|
6755
6754
|
[m, O]
|
|
6756
6755
|
), Y = te(
|
|
6757
6756
|
(R) => {
|
|
6758
|
-
const C =
|
|
6757
|
+
const C = X.getState().actions.undoProposal(R);
|
|
6759
6758
|
return C.ok && a((M) => Pe(M, m.chat.id, R, { status: "undone" })), C.ok;
|
|
6760
6759
|
},
|
|
6761
6760
|
[m]
|
|
@@ -6764,9 +6763,9 @@ function hf(e) {
|
|
|
6764
6763
|
var pe;
|
|
6765
6764
|
const C = m.chat.id, M = (pe = s[C]) == null ? void 0 : pe[R];
|
|
6766
6765
|
if ((M == null ? void 0 : M.status) !== "offered") return;
|
|
6767
|
-
o((
|
|
6768
|
-
const Z = await cf(u.connection(), R).catch((
|
|
6769
|
-
o((
|
|
6766
|
+
o((Q) => Pe(Q, C, R, { status: "adding" }));
|
|
6767
|
+
const Z = await cf(u.connection(), R).catch((Q) => (console.warn("The relationship could not be added:", Q), { ok: !1, code: void 0 })), de = Z.ok ? { status: "added" } : { status: "refused", message: ko(Z.code) };
|
|
6768
|
+
o((Q) => Pe(Q, C, R, de));
|
|
6770
6769
|
},
|
|
6771
6770
|
[m, u, s]
|
|
6772
6771
|
), We = te(
|
|
@@ -6847,9 +6846,9 @@ function hf(e) {
|
|
|
6847
6846
|
function gf(e, t) {
|
|
6848
6847
|
var n;
|
|
6849
6848
|
if (!t || e.surface !== "dashboard") return;
|
|
6850
|
-
const r =
|
|
6849
|
+
const r = X.getState().dashboard;
|
|
6851
6850
|
if (!(!(r != null && r.id) || r.id !== ((n = e.dashboard) == null ? void 0 : n.id)))
|
|
6852
|
-
return
|
|
6851
|
+
return Xt(r) <= et.openDashboardBytes ? r : void 0;
|
|
6853
6852
|
}
|
|
6854
6853
|
function Ht(e, t) {
|
|
6855
6854
|
const r = {
|
|
@@ -6935,7 +6934,7 @@ function Sr() {
|
|
|
6935
6934
|
return Rs() ?? mo;
|
|
6936
6935
|
}
|
|
6937
6936
|
function fs(e, t) {
|
|
6938
|
-
return
|
|
6937
|
+
return jo({
|
|
6939
6938
|
metadata: e,
|
|
6940
6939
|
locale: t.locale,
|
|
6941
6940
|
styles: { dateStyle: t.dateStyle, dateTime: t.dateTime }
|
|
@@ -6948,7 +6947,7 @@ function Nr(e, t, r) {
|
|
|
6948
6947
|
if (e == null) return "";
|
|
6949
6948
|
if (t.temporalBucket && typeof e == "string")
|
|
6950
6949
|
try {
|
|
6951
|
-
return
|
|
6950
|
+
return Do({
|
|
6952
6951
|
value: e,
|
|
6953
6952
|
metadata: t.temporalBucket,
|
|
6954
6953
|
format: fs(t.temporalBucket, r).format
|
|
@@ -7072,8 +7071,8 @@ function Tf({
|
|
|
7072
7071
|
] });
|
|
7073
7072
|
}
|
|
7074
7073
|
function Af(e, t, r) {
|
|
7075
|
-
const [n, a] = j({ status: "idle" }), s =
|
|
7076
|
-
(c) => n.status === "added" ?
|
|
7074
|
+
const [n, a] = j({ status: "idle" }), s = X(
|
|
7075
|
+
(c) => n.status === "added" ? Qn(c.dashboard, n.frameId) : !1
|
|
7077
7076
|
);
|
|
7078
7077
|
if (!r || !e.card) return { action: null, note: null };
|
|
7079
7078
|
if (n.status === "added" && s)
|
|
@@ -7168,7 +7167,7 @@ function $f({ artifact: e, onClose: t }) {
|
|
|
7168
7167
|
);
|
|
7169
7168
|
}
|
|
7170
7169
|
function ms(e, t) {
|
|
7171
|
-
const [r, n] = j(t), a = it(() => Of(e, r), [e, r]), s =
|
|
7170
|
+
const [r, n] = j(t), a = it(() => Of(e, r), [e, r]), s = X(js((i) => ({ themeStyle: i.themeStyle, theme: i.theme }))), o = Sr(), c = it(
|
|
7172
7171
|
() => If(e, a, o, s),
|
|
7173
7172
|
[e, a, o, s]
|
|
7174
7173
|
), f = a.kind === "table" || a.kind !== "number" && !c ? "table" : a.kind;
|
|
@@ -7322,11 +7321,11 @@ function Zf({ trace: e, stages: t }) {
|
|
|
7322
7321
|
we(r("check"))
|
|
7323
7322
|
] }),
|
|
7324
7323
|
/* @__PURE__ */ k("p", { children: [
|
|
7325
|
-
|
|
7324
|
+
Qt(n),
|
|
7326
7325
|
" tokens in (",
|
|
7327
|
-
|
|
7326
|
+
Qt(a),
|
|
7328
7327
|
" cached) · ",
|
|
7329
|
-
|
|
7328
|
+
Qt(s),
|
|
7330
7329
|
" out · ",
|
|
7331
7330
|
e.model
|
|
7332
7331
|
] })
|
|
@@ -7365,7 +7364,7 @@ function jf({ trace: e, stages: t }) {
|
|
|
7365
7364
|
] })
|
|
7366
7365
|
] });
|
|
7367
7366
|
}
|
|
7368
|
-
function
|
|
7367
|
+
function Qt(e) {
|
|
7369
7368
|
return e.toLocaleString("en-US");
|
|
7370
7369
|
}
|
|
7371
7370
|
function vt({
|
|
@@ -7613,7 +7612,7 @@ function qf({
|
|
|
7613
7612
|
onUndo: r,
|
|
7614
7613
|
onAskAgain: n
|
|
7615
7614
|
}) {
|
|
7616
|
-
const a =
|
|
7615
|
+
const a = X((g) => Bs(g, e.proposalId)), s = X((g) => g.isVisualEditing), o = Wf(t, a), c = o.kind === "undone" || o.kind === "refused", f = !c && o.kind !== "settled", i = o.kind === "changed_since" ? Vf : o.kind === "undone" ? "Undone." : o.kind === "refused" ? o.message : void 0;
|
|
7617
7616
|
return /* @__PURE__ */ k(
|
|
7618
7617
|
vt,
|
|
7619
7618
|
{
|
|
@@ -7770,7 +7769,7 @@ function Gf(e) {
|
|
|
7770
7769
|
return e.reason === "refused" ? `Not applied: ${e.message}` : e.message;
|
|
7771
7770
|
}
|
|
7772
7771
|
function Hf(e) {
|
|
7773
|
-
return e.startsWith("filter.") ?
|
|
7772
|
+
return e.startsWith("filter.") ? Fo : e === "card.add" ? Pt : e === "card.remove" ? zn : Mn;
|
|
7774
7773
|
}
|
|
7775
7774
|
const kn = 4;
|
|
7776
7775
|
function Yf({
|
|
@@ -7781,9 +7780,9 @@ function Yf({
|
|
|
7781
7780
|
onAdd: a,
|
|
7782
7781
|
onPick: s,
|
|
7783
7782
|
onAskAgain: o,
|
|
7784
|
-
proposalStates: c =
|
|
7783
|
+
proposalStates: c = Qf,
|
|
7785
7784
|
onUndoProposal: f,
|
|
7786
|
-
modelChangeStates: i =
|
|
7785
|
+
modelChangeStates: i = Xf,
|
|
7787
7786
|
onAddModelChange: g,
|
|
7788
7787
|
onDismissModelChange: u
|
|
7789
7788
|
}) {
|
|
@@ -7815,7 +7814,7 @@ function Yf({
|
|
|
7815
7814
|
r ? /* @__PURE__ */ p("p", { role: "alert", className: "text-[12.5px] leading-[1.6] text-destructive", children: r }) : null
|
|
7816
7815
|
] });
|
|
7817
7816
|
}
|
|
7818
|
-
const
|
|
7817
|
+
const Qf = {}, Xf = {};
|
|
7819
7818
|
function em(e) {
|
|
7820
7819
|
return e.parts.map((t) => t.type === "text" ? t.text : "").join("");
|
|
7821
7820
|
}
|
|
@@ -8051,8 +8050,8 @@ function gm({
|
|
|
8051
8050
|
s.ok ? /* @__PURE__ */ p(mt, { className: "h-3 w-3" }) : null,
|
|
8052
8051
|
s.ok ? "Copied" : "Couldn’t copy"
|
|
8053
8052
|
] }) : null,
|
|
8054
|
-
/* @__PURE__ */ k(
|
|
8055
|
-
/* @__PURE__ */ p(
|
|
8053
|
+
/* @__PURE__ */ k(Qs, { children: [
|
|
8054
|
+
/* @__PURE__ */ p(Xs, { asChild: !0, children: /* @__PURE__ */ p(
|
|
8056
8055
|
H,
|
|
8057
8056
|
{
|
|
8058
8057
|
variant: "ghost",
|
|
@@ -8355,13 +8354,13 @@ function Sm(e, t) {
|
|
|
8355
8354
|
return { text: e.slice(0, n) + e.slice(t), caret: n };
|
|
8356
8355
|
}
|
|
8357
8356
|
const Nm = [], km = { withRequest: !0 };
|
|
8358
|
-
function
|
|
8357
|
+
function sh({
|
|
8359
8358
|
instance: e,
|
|
8360
8359
|
surface: t = "dashboard",
|
|
8361
8360
|
placement: r
|
|
8362
8361
|
}) {
|
|
8363
8362
|
var Ar, Cr;
|
|
8364
|
-
const n = t === "none", a = oo(), s = xt(e.store, (A) => A.focus), o = xt(e.store, (A) => A.isOpen), c = xt(e.store, (A) => A.askCount), f = xt(e.store, (A) => A.layout), i = n ? "full-page" : f, g = r ?? i, u = g === "beside-card", m =
|
|
8363
|
+
const n = t === "none", a = oo(), s = xt(e.store, (A) => A.focus), o = xt(e.store, (A) => A.isOpen), c = xt(e.store, (A) => A.askCount), f = xt(e.store, (A) => A.layout), i = n ? "full-page" : f, g = r ?? i, u = g === "beside-card", m = X(
|
|
8365
8364
|
(A) => {
|
|
8366
8365
|
var P;
|
|
8367
8366
|
return s && A.dashboard ? (P = go(A.dashboard, s.cardId)) == null ? void 0 : P.card : void 0;
|
|
@@ -8446,7 +8445,7 @@ function oh({
|
|
|
8446
8445
|
return;
|
|
8447
8446
|
}
|
|
8448
8447
|
A.key === "Enter" && !A.shiftKey && !A.nativeEvent.isComposing && M(A);
|
|
8449
|
-
},
|
|
8448
|
+
}, Q = T.messages.length === 0, [fe, ae] = j(), $e = (fe == null ? void 0 : fe.sessionKey) === T.sessionKey ? Am(T.messages, fe.artifactId) : void 0, Ie = (A) => {
|
|
8450
8449
|
ae((P) => ({ sessionKey: T.sessionKey, artifactId: A, opened: ((P == null ? void 0 : P.opened) ?? 0) + 1 })), e.leaveBeside(), i !== "full-page" && e.setLayout("full-page");
|
|
8451
8450
|
}, Oe = g === "full-page", Er = /* @__PURE__ */ p(
|
|
8452
8451
|
H,
|
|
@@ -8456,7 +8455,7 @@ function oh({
|
|
|
8456
8455
|
className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
|
|
8457
8456
|
"aria-label": "New conversation",
|
|
8458
8457
|
title: "New conversation",
|
|
8459
|
-
disabled:
|
|
8458
|
+
disabled: Q && !T.busy && !T.loading,
|
|
8460
8459
|
onClick: () => {
|
|
8461
8460
|
var A;
|
|
8462
8461
|
T.startNew(), (A = Y.current) == null || A.focus();
|
|
@@ -8484,7 +8483,7 @@ function oh({
|
|
|
8484
8483
|
T.readForCopy(A).then((P) => $o(P, { assistantName: e.assistantName, toolCalls: A }))
|
|
8485
8484
|
)
|
|
8486
8485
|
}
|
|
8487
|
-
), yt =
|
|
8486
|
+
), yt = Q && Oe && !T.loading, Ts = /* @__PURE__ */ k("footer", { className: B("shrink-0 space-y-2", yt ? "px-0" : "p-3"), children: [
|
|
8488
8487
|
m && !w && !u ? /* @__PURE__ */ k("div", { className: "flex items-center gap-1.5", children: [
|
|
8489
8488
|
/* @__PURE__ */ k(
|
|
8490
8489
|
"span",
|
|
@@ -8692,7 +8691,7 @@ function oh({
|
|
|
8692
8691
|
Mm,
|
|
8693
8692
|
{
|
|
8694
8693
|
conversation: T,
|
|
8695
|
-
empty:
|
|
8694
|
+
empty: Q,
|
|
8696
8695
|
layout: g,
|
|
8697
8696
|
onExpand: Ie,
|
|
8698
8697
|
onAdd: v,
|
|
@@ -8747,15 +8746,15 @@ function En({
|
|
|
8747
8746
|
}, [e, t, n, r]), null;
|
|
8748
8747
|
}
|
|
8749
8748
|
function Cm(e) {
|
|
8750
|
-
const t =
|
|
8749
|
+
const t = X((n) => n.isVisualEditing), r = Dn((n) => n.card);
|
|
8751
8750
|
return !e && t ? r : void 0;
|
|
8752
8751
|
}
|
|
8753
8752
|
function $m(e) {
|
|
8754
|
-
if (!(e || !
|
|
8753
|
+
if (!(e || !X.getState().isVisualEditing))
|
|
8755
8754
|
return Zn(), Es(e);
|
|
8756
8755
|
}
|
|
8757
8756
|
function Es(e) {
|
|
8758
|
-
if (e || !
|
|
8757
|
+
if (e || !X.getState().isVisualEditing) return;
|
|
8759
8758
|
const t = Dn.getState();
|
|
8760
8759
|
return { card: t.card, mode: t.isDevMode ? "sql" : "visual" };
|
|
8761
8760
|
}
|
|
@@ -8846,5 +8845,5 @@ function Mm({
|
|
|
8846
8845
|
] });
|
|
8847
8846
|
}
|
|
8848
8847
|
export {
|
|
8849
|
-
|
|
8848
|
+
sh as default
|
|
8850
8849
|
};
|