react-semaphor 0.1.561 → 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 +452 -429
- 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-CB3oFAXk.js → analytics-base-schemas-BaIQrEzX.js} +139 -134
- package/dist/chunks/{assistant-chat-DiVHY3Hw.js → assistant-chat-R_yT8xH4.js} +104 -104
- package/dist/chunks/{bookmark-impact-CR09dpkn.js → bookmark-impact-D4Kl4amw.js} +2 -2
- package/dist/chunks/{bookmark-state-BusLpkb7.js → bookmark-state-CWeoGbrx.js} +25 -25
- package/dist/chunks/{braces-u8VorWJc.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-DDsIWJYT.js → comparison-window-caption-D1EUXzaR.js} +562 -437
- package/dist/chunks/{context-TUjw9eqr.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-BRdZBPqr.js → dashboard-Bp1y5oun.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CgvTLndW.js → dashboard-briefing-launcher-S5FB3aUW.js} +155 -154
- package/dist/chunks/{dashboard-controls-B4vfSzTF.js → dashboard-controls-CfC_6Ztn.js} +970 -968
- package/dist/chunks/{dashboard-json-Y3MF59g7.js → dashboard-json-gYZT7ZQY.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-DwjZcxj-.js → edit-dashboard-visual-u7OI_g8Q.js} +4636 -4681
- package/dist/chunks/{filter-reach-copy-bijwf_-b.js → filter-reach-copy-CvV7W5dd.js} +1470 -1101
- package/dist/chunks/{filter-value-text-DFnhwuEW.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/{global-date-filter-utils-BXgCpvQM.js → global-date-filter-utils-N1kcsOFE.js} +8997 -7417
- package/dist/chunks/{index-ClwbY3BL.js → index-CNGkfUp4.js} +91 -85
- package/dist/chunks/{layout-grid-CtvCBfOm.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-BklYgciR.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-pU51-JmY.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-CUorIB7Q.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Df5UgCGN.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-BSiGEXVC.js → matrix-operation-contract-DsLdFdSa.js} +339 -330
- package/dist/chunks/{metric-comparison-95aC0uEO.js → metric-comparison-Bnso1cm1.js} +2 -2
- package/dist/chunks/{model-change-B5wQhg5G.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-DTnMhipt.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Bo-86vwS.js → pivot-result-contract-expectations-B53jqszr.js} +5 -5
- package/dist/chunks/{pivot-result-identity-olvXJoB9.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-CGLVI40Q.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-C2YUIwKG.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
- package/dist/chunks/{report-runtime-context-DoIUr3MP.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-q_iiNXE1.js → resolve-dashboard-input-context-DaDrZGuA.js} +3455 -1744
- package/dist/chunks/{save-DH4RyrnG.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-8jqfI7hI.js → saved-dashboard-context-DFYBrE6O.js} +94 -95
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-CV7K4FI6.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-E2XWyibu.js → semaphor-ready-indicator-Cfuafnem.js} +37067 -38400
- package/dist/chunks/{shelf-drop-preview-context-C29EUzDp.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
- package/dist/chunks/{source-entity-resolution-BXI3nQ5Z.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-balDSHc7.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-CK8tvh4d.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-B77JsAzU.js → temporal-input-presentation-sk9gqLi6.js} +699 -741
- package/dist/chunks/{token-types-DhYH5YKb.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-Ufj8vjyn.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-9WsnzEO5.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
- package/dist/chunks/{validators-BtaCFIEB.js → validators-BIM0FE31.js} +764 -885
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2278 -3030
- package/dist/data-app-sdk/index.js +43 -43
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +22 -22
- package/dist/format-utils/index.js +215 -209
- package/dist/index.js +225 -224
- 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/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +5 -5
- 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/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 +3 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- 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/card-display-write.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3230 -4658
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +24 -2
- 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 +27 -1
- 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/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +8 -6
- 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 +52 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +13 -1
- 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/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +2 -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 +1 -1
- package/dist/chunks/custom-visual-inputs-DfolidZ9.js +0 -292
- package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +0 -1718
- 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,26 +5,26 @@ 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 { N as go } from "./bookmark-state-
|
|
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 Fo } from "./list-filter-
|
|
27
|
-
import { L as Ur } from "./layout-grid-
|
|
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";
|
|
28
28
|
function Lo(e, t, r) {
|
|
29
29
|
const n = zo(), a = (r == null ? void 0 : r.locale) ?? n.locale ?? Mo, s = Po(e, t);
|
|
30
30
|
if (isNaN(s))
|
|
@@ -149,7 +149,7 @@ function Go(e = "dashboard") {
|
|
|
149
149
|
return t && Br(t.reads, [r]) || (t = { reads: [r], sent: { context: Pr({ surface: "none", timeZone: r }) } }), t.sent;
|
|
150
150
|
} : ({ focus: r, snapshot: n, editing: a }) => {
|
|
151
151
|
var I;
|
|
152
|
-
const s =
|
|
152
|
+
const s = X.getState(), o = (I = s.reportContext) == null ? void 0 : I.calendar;
|
|
153
153
|
if (!o) throw new Yn();
|
|
154
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 = {
|
|
155
155
|
surface: "dashboard",
|
|
@@ -194,29 +194,29 @@ function Br(e, t) {
|
|
|
194
194
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
195
195
|
}
|
|
196
196
|
function Ho(e) {
|
|
197
|
-
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n =
|
|
197
|
+
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n = X((i) => {
|
|
198
198
|
var u, m;
|
|
199
199
|
const g = (m = (u = i.dashboard) == null ? void 0 : u.sheets) == null ? void 0 : m.find((w) => w.id === i.selectedSheetId);
|
|
200
200
|
return !!g && !xo(g);
|
|
201
|
-
}), a =
|
|
201
|
+
}), a = X((i) => i.isVisualEditing), s = $s(), o = Os();
|
|
202
202
|
return { add: te(
|
|
203
203
|
async (i, g) => {
|
|
204
204
|
var T, O;
|
|
205
|
-
const u =
|
|
205
|
+
const u = X.getState(), m = (T = u.dashboard) == null ? void 0 : T.id, w = u.selectedSheetId;
|
|
206
206
|
if (!m || !w) throw new at(Ut);
|
|
207
|
-
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) => {
|
|
208
208
|
console.warn("Adding the result without refreshed semantic metadata:", K);
|
|
209
|
-
}), h = structuredClone(
|
|
209
|
+
}), h = structuredClone(X.getState().semanticExecutionPayload);
|
|
210
210
|
zs(h, y);
|
|
211
211
|
const d = Io(
|
|
212
212
|
_.config ?? {},
|
|
213
|
-
|
|
214
|
-
), 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();
|
|
215
215
|
if (((O = b.dashboard) == null ? void 0 : O.id) !== m || b.selectedSheetId !== w || b.isVisualEditing)
|
|
216
216
|
throw new at(Ut);
|
|
217
217
|
if (!r()) throw new at(Yo);
|
|
218
218
|
const { actions: N } = b;
|
|
219
|
-
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))
|
|
220
220
|
throw b.isDashboardEditing || N.setIsDashboardEditing(!1), new at(Ut);
|
|
221
221
|
return { frameId: v.id, asTable: E };
|
|
222
222
|
},
|
|
@@ -224,7 +224,7 @@ function Ho(e) {
|
|
|
224
224
|
), available: t && n && !a };
|
|
225
225
|
}
|
|
226
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.";
|
|
227
|
-
function
|
|
227
|
+
function Qo(e, t, r) {
|
|
228
228
|
if (r !== "line" && r !== "bar" && r !== "stackedBar") return !0;
|
|
229
229
|
const n = Wn(Gn(t), r);
|
|
230
230
|
if (!n.ok) return !1;
|
|
@@ -236,16 +236,16 @@ class at extends Error {
|
|
|
236
236
|
super(t), this.name = "AddToDashboardRefusedError";
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Qn(e, t) {
|
|
240
240
|
var r;
|
|
241
241
|
return !!((r = e == null ? void 0 : e.sheets) != null && r.some((n) => {
|
|
242
242
|
var a;
|
|
243
243
|
return (a = n.frames) == null ? void 0 : a.some((s) => s.id === t);
|
|
244
244
|
}));
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Xo(e, t, r, n) {
|
|
247
247
|
var o;
|
|
248
|
-
const a = Ps(
|
|
248
|
+
const a = Ps(X.getState()), s = _o({
|
|
249
249
|
...a,
|
|
250
250
|
cardId: e.id,
|
|
251
251
|
cardOverride: e,
|
|
@@ -258,7 +258,7 @@ function Qo(e, t, r, n) {
|
|
|
258
258
|
(c) => c.dateOwner !== "global_date"
|
|
259
259
|
);
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const Xn = "vercel.ai.error", ei = Symbol.for(Xn);
|
|
262
262
|
var re = class ea extends Error {
|
|
263
263
|
/**
|
|
264
264
|
* Creates an AI SDK Error.
|
|
@@ -277,7 +277,7 @@ var re = class ea extends Error {
|
|
|
277
277
|
* @returns {boolean} True if the error is an AI SDK Error, false otherwise.
|
|
278
278
|
*/
|
|
279
279
|
static isInstance(t) {
|
|
280
|
-
return ea.hasMarker(t,
|
|
280
|
+
return ea.hasMarker(t, Xn);
|
|
281
281
|
}
|
|
282
282
|
static hasMarker(t, r) {
|
|
283
283
|
const n = Symbol.for(r);
|
|
@@ -777,7 +777,7 @@ function Wi(e) {
|
|
|
777
777
|
const Gi = (e) => {
|
|
778
778
|
const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
|
|
779
779
|
return new RegExp(`^${t}$`);
|
|
780
|
-
}, 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) => {
|
|
781
781
|
var r;
|
|
782
782
|
e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
|
|
783
783
|
}), Na = {
|
|
@@ -1370,7 +1370,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1370
1370
|
}), Ll = /* @__PURE__ */ S("$ZodNumber", (e, t) => {
|
|
1371
1371
|
nl.init(e, t), Aa.init(e, t);
|
|
1372
1372
|
}), Ul = /* @__PURE__ */ S("$ZodBoolean", (e, t) => {
|
|
1373
|
-
U.init(e, t), e._zod.pattern =
|
|
1373
|
+
U.init(e, t), e._zod.pattern = Qi, e._zod.parse = (r, n) => {
|
|
1374
1374
|
if (t.coerce)
|
|
1375
1375
|
try {
|
|
1376
1376
|
r.value = !!r.value;
|
|
@@ -1385,7 +1385,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1385
1385
|
}), r;
|
|
1386
1386
|
};
|
|
1387
1387
|
}), Bl = /* @__PURE__ */ S("$ZodNull", (e, t) => {
|
|
1388
|
-
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) => {
|
|
1389
1389
|
const a = r.value;
|
|
1390
1390
|
return a === null || r.issues.push({
|
|
1391
1391
|
expected: "null",
|
|
@@ -1762,7 +1762,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1762
1762
|
inst: e
|
|
1763
1763
|
}), n;
|
|
1764
1764
|
};
|
|
1765
|
-
}),
|
|
1765
|
+
}), Ql = /* @__PURE__ */ S("$ZodLiteral", (e, t) => {
|
|
1766
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) => {
|
|
1767
1767
|
const a = r.value;
|
|
1768
1768
|
return e._zod.values.has(a) || r.issues.push({
|
|
@@ -1772,7 +1772,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1772
1772
|
inst: e
|
|
1773
1773
|
}), r;
|
|
1774
1774
|
};
|
|
1775
|
-
}),
|
|
1775
|
+
}), Xl = /* @__PURE__ */ S("$ZodTransform", (e, t) => {
|
|
1776
1776
|
U.init(e, t), e._zod.parse = (r, n) => {
|
|
1777
1777
|
const a = t.transform(r.value, r);
|
|
1778
1778
|
if (n.async)
|
|
@@ -1810,10 +1810,10 @@ const nc = /* @__PURE__ */ S("$ZodPrefault", (e, t) => {
|
|
|
1810
1810
|
return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
|
|
1811
1811
|
}), e._zod.parse = (r, n) => {
|
|
1812
1812
|
const a = t.innerType._zod.run(r, n);
|
|
1813
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1813
|
+
return a instanceof Promise ? a.then((s) => Qr(s, e)) : Qr(a, e);
|
|
1814
1814
|
};
|
|
1815
1815
|
});
|
|
1816
|
-
function
|
|
1816
|
+
function Qr(e, t) {
|
|
1817
1817
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1818
1818
|
code: "invalid_type",
|
|
1819
1819
|
expected: "nonoptional",
|
|
@@ -1841,10 +1841,10 @@ const sc = /* @__PURE__ */ S("$ZodCatch", (e, t) => {
|
|
|
1841
1841
|
}), oc = /* @__PURE__ */ S("$ZodPipe", (e, t) => {
|
|
1842
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) => {
|
|
1843
1843
|
const a = t.in._zod.run(r, n);
|
|
1844
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1844
|
+
return a instanceof Promise ? a.then((s) => Xr(s, t, n)) : Xr(a, t, n);
|
|
1845
1845
|
};
|
|
1846
1846
|
});
|
|
1847
|
-
function
|
|
1847
|
+
function Xr(e, t, r) {
|
|
1848
1848
|
return ot(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
|
|
1849
1849
|
}
|
|
1850
1850
|
const ic = /* @__PURE__ */ S("$ZodReadonly", (e, t) => {
|
|
@@ -2320,10 +2320,10 @@ function Hc() {
|
|
|
2320
2320
|
function Yc() {
|
|
2321
2321
|
return gt((e) => e.toLowerCase());
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Qc() {
|
|
2324
2324
|
return gt((e) => e.toUpperCase());
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Xc(e, t, r) {
|
|
2327
2327
|
return new e({
|
|
2328
2328
|
type: "array",
|
|
2329
2329
|
element: t,
|
|
@@ -2938,7 +2938,7 @@ const du = (e, t) => {
|
|
|
2938
2938
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Pa = /* @__PURE__ */ S("_ZodString", (e, t) => {
|
|
2939
2939
|
br.init(e, t), q.init(e, t);
|
|
2940
2940
|
const r = e._zod.bag;
|
|
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(
|
|
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());
|
|
2942
2942
|
}), hu = /* @__PURE__ */ S("ZodString", (e, t) => {
|
|
2943
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));
|
|
2944
2944
|
});
|
|
@@ -3027,7 +3027,7 @@ const Uu = /* @__PURE__ */ S("ZodArray", (e, t) => {
|
|
|
3027
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;
|
|
3028
3028
|
});
|
|
3029
3029
|
function Da(e, t) {
|
|
3030
|
-
return
|
|
3030
|
+
return Xc(Uu, e, t);
|
|
3031
3031
|
}
|
|
3032
3032
|
const ja = /* @__PURE__ */ S("ZodObject", (e, t) => {
|
|
3033
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]);
|
|
@@ -3134,7 +3134,7 @@ function Ua(e, t) {
|
|
|
3134
3134
|
});
|
|
3135
3135
|
}
|
|
3136
3136
|
const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
3137
|
-
|
|
3137
|
+
Ql.init(e, t), q.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3138
3138
|
get() {
|
|
3139
3139
|
if (t.values.length > 1)
|
|
3140
3140
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3142,15 +3142,15 @@ const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
});
|
|
3144
3144
|
});
|
|
3145
|
-
function
|
|
3145
|
+
function Qu(e, t) {
|
|
3146
3146
|
return new Yu({
|
|
3147
3147
|
type: "literal",
|
|
3148
3148
|
values: Array.isArray(e) ? e : [e],
|
|
3149
3149
|
...$(t)
|
|
3150
3150
|
});
|
|
3151
3151
|
}
|
|
3152
|
-
const
|
|
3153
|
-
|
|
3152
|
+
const Xu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
3153
|
+
Xl.init(e, t), q.init(e, t), e._zod.parse = (r, n) => {
|
|
3154
3154
|
r.addIssue = (s) => {
|
|
3155
3155
|
if (typeof s == "string")
|
|
3156
3156
|
r.issues.push(dt(s, r.value, t));
|
|
@@ -3164,7 +3164,7 @@ const Qu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
|
3164
3164
|
};
|
|
3165
3165
|
});
|
|
3166
3166
|
function ed(e) {
|
|
3167
|
-
return new
|
|
3167
|
+
return new Xu({
|
|
3168
3168
|
type: "transform",
|
|
3169
3169
|
transform: e
|
|
3170
3170
|
});
|
|
@@ -4103,7 +4103,7 @@ function Yd(e, t) {
|
|
|
4103
4103
|
for (const o in a) {
|
|
4104
4104
|
let c = a[o];
|
|
4105
4105
|
if (c === void 0 || c._def === void 0) continue;
|
|
4106
|
-
const f =
|
|
4106
|
+
const f = Xd(c), i = F(c._def, {
|
|
4107
4107
|
...t,
|
|
4108
4108
|
currentPath: [
|
|
4109
4109
|
...t.currentPath,
|
|
@@ -4119,10 +4119,10 @@ function Yd(e, t) {
|
|
|
4119
4119
|
i !== void 0 && (r.properties[o] = i, f || n.push(o));
|
|
4120
4120
|
}
|
|
4121
4121
|
n.length && (r.required = n);
|
|
4122
|
-
const s =
|
|
4122
|
+
const s = Qd(e, t);
|
|
4123
4123
|
return s !== void 0 && (r.additionalProperties = s), r;
|
|
4124
4124
|
}
|
|
4125
|
-
function
|
|
4125
|
+
function Qd(e, t) {
|
|
4126
4126
|
if (e.catchall._def.typeName !== "ZodNever") return F(e.catchall._def, {
|
|
4127
4127
|
...t,
|
|
4128
4128
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
@@ -4136,7 +4136,7 @@ function Xd(e, t) {
|
|
|
4136
4136
|
return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4137
4137
|
}
|
|
4138
4138
|
}
|
|
4139
|
-
function
|
|
4139
|
+
function Xd(e) {
|
|
4140
4140
|
try {
|
|
4141
4141
|
return e.isOptional();
|
|
4142
4142
|
} catch {
|
|
@@ -4556,7 +4556,7 @@ async function He(e) {
|
|
|
4556
4556
|
return typeof e == "function" && (e = e()), e;
|
|
4557
4557
|
}
|
|
4558
4558
|
new TextDecoder();
|
|
4559
|
-
const Ya = "AI_InvalidArgumentError",
|
|
4559
|
+
const Ya = "AI_InvalidArgumentError", Qa = `vercel.ai.error.${Ya}`, Ip = Symbol.for(Qa);
|
|
4560
4560
|
var Et = class extends re {
|
|
4561
4561
|
constructor({ parameter: e, value: t, message: r }) {
|
|
4562
4562
|
super({
|
|
@@ -4565,14 +4565,14 @@ var Et = class extends re {
|
|
|
4565
4565
|
}), this[Ip] = !0, this.parameter = e, this.value = t;
|
|
4566
4566
|
}
|
|
4567
4567
|
static isInstance(e) {
|
|
4568
|
-
return re.hasMarker(e,
|
|
4568
|
+
return re.hasMarker(e, Qa);
|
|
4569
4569
|
}
|
|
4570
4570
|
};
|
|
4571
|
-
const
|
|
4571
|
+
const Xa = "AI_UIMessageStreamError", es = `vercel.ai.error.${Xa}`, Sp = Symbol.for(es);
|
|
4572
4572
|
var Me = class extends re {
|
|
4573
4573
|
constructor({ chunkType: e, chunkId: t, message: r }) {
|
|
4574
4574
|
super({
|
|
4575
|
-
name:
|
|
4575
|
+
name: Xa,
|
|
4576
4576
|
message: r
|
|
4577
4577
|
}), this[Sp] = !0, this.chunkType = e, this.chunkId = t;
|
|
4578
4578
|
}
|
|
@@ -4602,7 +4602,7 @@ const l = {
|
|
|
4602
4602
|
enum: Ua,
|
|
4603
4603
|
instanceof: vd,
|
|
4604
4604
|
lazy: fd,
|
|
4605
|
-
literal:
|
|
4605
|
+
literal: Qu,
|
|
4606
4606
|
looseObject: Vu,
|
|
4607
4607
|
never: Za,
|
|
4608
4608
|
null: ju,
|
|
@@ -6400,26 +6400,26 @@ function Yp(e, t) {
|
|
|
6400
6400
|
}, f);
|
|
6401
6401
|
};
|
|
6402
6402
|
}
|
|
6403
|
-
var
|
|
6404
|
-
const
|
|
6403
|
+
var Qp = Yp;
|
|
6404
|
+
const Xp = /* @__PURE__ */ ho(Qp);
|
|
6405
6405
|
function ef(e, t) {
|
|
6406
|
-
return t != null ?
|
|
6406
|
+
return t != null ? Xp(e, t) : e;
|
|
6407
6407
|
}
|
|
6408
6408
|
function tf(e) {
|
|
6409
6409
|
return Array.isArray(e) ? [...e] : e != null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null) ? { ...e } : e;
|
|
6410
6410
|
}
|
|
6411
|
-
var ce,
|
|
6411
|
+
var ce, Qe, Xe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
6412
6412
|
constructor(e = []) {
|
|
6413
6413
|
me(this, ce);
|
|
6414
|
-
me(this, Xe);
|
|
6415
6414
|
me(this, Qe);
|
|
6415
|
+
me(this, Xe);
|
|
6416
6416
|
me(this, Ze);
|
|
6417
6417
|
me(this, De);
|
|
6418
6418
|
me(this, je);
|
|
6419
6419
|
me(this, Ne);
|
|
6420
6420
|
me(this, pt);
|
|
6421
6421
|
me(this, ft);
|
|
6422
|
-
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) => {
|
|
6423
6423
|
ee(this, ce, L(this, ce).concat(t)), L(this, Ne).call(this);
|
|
6424
6424
|
}, this.popMessage = () => {
|
|
6425
6425
|
ee(this, ce, L(this, ce).slice(0, -1)), L(this, Ne).call(this);
|
|
@@ -6454,16 +6454,16 @@ var ce, Xe, Qe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6454
6454
|
}), ee(this, ce, e);
|
|
6455
6455
|
}
|
|
6456
6456
|
get status() {
|
|
6457
|
-
return L(this,
|
|
6457
|
+
return L(this, Qe);
|
|
6458
6458
|
}
|
|
6459
6459
|
set status(e) {
|
|
6460
|
-
ee(this,
|
|
6460
|
+
ee(this, Qe, e), L(this, pt).call(this);
|
|
6461
6461
|
}
|
|
6462
6462
|
get error() {
|
|
6463
|
-
return L(this,
|
|
6463
|
+
return L(this, Xe);
|
|
6464
6464
|
}
|
|
6465
6465
|
set error(e) {
|
|
6466
|
-
ee(this,
|
|
6466
|
+
ee(this, Xe, e), L(this, ft).call(this);
|
|
6467
6467
|
}
|
|
6468
6468
|
get messages() {
|
|
6469
6469
|
return L(this, ce);
|
|
@@ -6471,7 +6471,7 @@ var ce, Xe, Qe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6471
6471
|
set messages(e) {
|
|
6472
6472
|
ee(this, ce, [...e]), L(this, Ne).call(this);
|
|
6473
6473
|
}
|
|
6474
|
-
}, 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 {
|
|
6475
6475
|
constructor({ messages: t, ...r }) {
|
|
6476
6476
|
const n = new rf(t);
|
|
6477
6477
|
super({
|
|
@@ -6682,12 +6682,12 @@ function hf(e) {
|
|
|
6682
6682
|
const Z = t.current.applyProposal;
|
|
6683
6683
|
if (r.current !== C || !Z) return;
|
|
6684
6684
|
const de = C.proposals.has(M.proposalId), pe = C.proposals.get(M.proposalId) ?? null;
|
|
6685
|
-
R(C, 1), a((
|
|
6686
|
-
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 };
|
|
6687
6687
|
let ae;
|
|
6688
6688
|
try {
|
|
6689
|
-
ae =
|
|
6690
|
-
{ 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 },
|
|
6691
6691
|
{ stillWanted: () => r.current === C }
|
|
6692
6692
|
) : fe;
|
|
6693
6693
|
} catch (Ie) {
|
|
@@ -6733,15 +6733,15 @@ function hf(e) {
|
|
|
6733
6733
|
...Z.cardReplay ?? {},
|
|
6734
6734
|
...C.length ? { taggedFields: C } : {}
|
|
6735
6735
|
};
|
|
6736
|
-
if (
|
|
6737
|
-
return y(new qn(
|
|
6736
|
+
if (Xt({ ...de, message: M }) > et.requestBytes)
|
|
6737
|
+
return y(new qn(Xt(de)).message), "not_sent";
|
|
6738
6738
|
y(void 0);
|
|
6739
6739
|
const pe = (fe = Z.context.selectedCard) == null ? void 0 : fe.id;
|
|
6740
6740
|
pe && (m.aboutCardId = pe);
|
|
6741
|
-
const
|
|
6742
|
-
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(
|
|
6743
6743
|
{ text: M, ...C.length ? { metadata: { taggedFields: C } } : {} },
|
|
6744
|
-
{ body:
|
|
6744
|
+
{ body: Q ? { ...de, openDashboard: Q } : de }
|
|
6745
6745
|
), "sent";
|
|
6746
6746
|
},
|
|
6747
6747
|
[m, h]
|
|
@@ -6754,7 +6754,7 @@ function hf(e) {
|
|
|
6754
6754
|
[m, O]
|
|
6755
6755
|
), Y = te(
|
|
6756
6756
|
(R) => {
|
|
6757
|
-
const C =
|
|
6757
|
+
const C = X.getState().actions.undoProposal(R);
|
|
6758
6758
|
return C.ok && a((M) => Pe(M, m.chat.id, R, { status: "undone" })), C.ok;
|
|
6759
6759
|
},
|
|
6760
6760
|
[m]
|
|
@@ -6763,9 +6763,9 @@ function hf(e) {
|
|
|
6763
6763
|
var pe;
|
|
6764
6764
|
const C = m.chat.id, M = (pe = s[C]) == null ? void 0 : pe[R];
|
|
6765
6765
|
if ((M == null ? void 0 : M.status) !== "offered") return;
|
|
6766
|
-
o((
|
|
6767
|
-
const Z = await cf(u.connection(), R).catch((
|
|
6768
|
-
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));
|
|
6769
6769
|
},
|
|
6770
6770
|
[m, u, s]
|
|
6771
6771
|
), We = te(
|
|
@@ -6846,9 +6846,9 @@ function hf(e) {
|
|
|
6846
6846
|
function gf(e, t) {
|
|
6847
6847
|
var n;
|
|
6848
6848
|
if (!t || e.surface !== "dashboard") return;
|
|
6849
|
-
const r =
|
|
6849
|
+
const r = X.getState().dashboard;
|
|
6850
6850
|
if (!(!(r != null && r.id) || r.id !== ((n = e.dashboard) == null ? void 0 : n.id)))
|
|
6851
|
-
return
|
|
6851
|
+
return Xt(r) <= et.openDashboardBytes ? r : void 0;
|
|
6852
6852
|
}
|
|
6853
6853
|
function Ht(e, t) {
|
|
6854
6854
|
const r = {
|
|
@@ -7071,8 +7071,8 @@ function Tf({
|
|
|
7071
7071
|
] });
|
|
7072
7072
|
}
|
|
7073
7073
|
function Af(e, t, r) {
|
|
7074
|
-
const [n, a] = j({ status: "idle" }), s =
|
|
7075
|
-
(c) => n.status === "added" ?
|
|
7074
|
+
const [n, a] = j({ status: "idle" }), s = X(
|
|
7075
|
+
(c) => n.status === "added" ? Qn(c.dashboard, n.frameId) : !1
|
|
7076
7076
|
);
|
|
7077
7077
|
if (!r || !e.card) return { action: null, note: null };
|
|
7078
7078
|
if (n.status === "added" && s)
|
|
@@ -7167,7 +7167,7 @@ function $f({ artifact: e, onClose: t }) {
|
|
|
7167
7167
|
);
|
|
7168
7168
|
}
|
|
7169
7169
|
function ms(e, t) {
|
|
7170
|
-
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(
|
|
7171
7171
|
() => If(e, a, o, s),
|
|
7172
7172
|
[e, a, o, s]
|
|
7173
7173
|
), f = a.kind === "table" || a.kind !== "number" && !c ? "table" : a.kind;
|
|
@@ -7321,11 +7321,11 @@ function Zf({ trace: e, stages: t }) {
|
|
|
7321
7321
|
we(r("check"))
|
|
7322
7322
|
] }),
|
|
7323
7323
|
/* @__PURE__ */ k("p", { children: [
|
|
7324
|
-
|
|
7324
|
+
Qt(n),
|
|
7325
7325
|
" tokens in (",
|
|
7326
|
-
|
|
7326
|
+
Qt(a),
|
|
7327
7327
|
" cached) · ",
|
|
7328
|
-
|
|
7328
|
+
Qt(s),
|
|
7329
7329
|
" out · ",
|
|
7330
7330
|
e.model
|
|
7331
7331
|
] })
|
|
@@ -7364,7 +7364,7 @@ function jf({ trace: e, stages: t }) {
|
|
|
7364
7364
|
] })
|
|
7365
7365
|
] });
|
|
7366
7366
|
}
|
|
7367
|
-
function
|
|
7367
|
+
function Qt(e) {
|
|
7368
7368
|
return e.toLocaleString("en-US");
|
|
7369
7369
|
}
|
|
7370
7370
|
function vt({
|
|
@@ -7612,7 +7612,7 @@ function qf({
|
|
|
7612
7612
|
onUndo: r,
|
|
7613
7613
|
onAskAgain: n
|
|
7614
7614
|
}) {
|
|
7615
|
-
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;
|
|
7616
7616
|
return /* @__PURE__ */ k(
|
|
7617
7617
|
vt,
|
|
7618
7618
|
{
|
|
@@ -7780,9 +7780,9 @@ function Yf({
|
|
|
7780
7780
|
onAdd: a,
|
|
7781
7781
|
onPick: s,
|
|
7782
7782
|
onAskAgain: o,
|
|
7783
|
-
proposalStates: c =
|
|
7783
|
+
proposalStates: c = Qf,
|
|
7784
7784
|
onUndoProposal: f,
|
|
7785
|
-
modelChangeStates: i =
|
|
7785
|
+
modelChangeStates: i = Xf,
|
|
7786
7786
|
onAddModelChange: g,
|
|
7787
7787
|
onDismissModelChange: u
|
|
7788
7788
|
}) {
|
|
@@ -7814,7 +7814,7 @@ function Yf({
|
|
|
7814
7814
|
r ? /* @__PURE__ */ p("p", { role: "alert", className: "text-[12.5px] leading-[1.6] text-destructive", children: r }) : null
|
|
7815
7815
|
] });
|
|
7816
7816
|
}
|
|
7817
|
-
const
|
|
7817
|
+
const Qf = {}, Xf = {};
|
|
7818
7818
|
function em(e) {
|
|
7819
7819
|
return e.parts.map((t) => t.type === "text" ? t.text : "").join("");
|
|
7820
7820
|
}
|
|
@@ -8050,8 +8050,8 @@ function gm({
|
|
|
8050
8050
|
s.ok ? /* @__PURE__ */ p(mt, { className: "h-3 w-3" }) : null,
|
|
8051
8051
|
s.ok ? "Copied" : "Couldn’t copy"
|
|
8052
8052
|
] }) : null,
|
|
8053
|
-
/* @__PURE__ */ k(
|
|
8054
|
-
/* @__PURE__ */ p(
|
|
8053
|
+
/* @__PURE__ */ k(Qs, { children: [
|
|
8054
|
+
/* @__PURE__ */ p(Xs, { asChild: !0, children: /* @__PURE__ */ p(
|
|
8055
8055
|
H,
|
|
8056
8056
|
{
|
|
8057
8057
|
variant: "ghost",
|
|
@@ -8360,7 +8360,7 @@ function sh({
|
|
|
8360
8360
|
placement: r
|
|
8361
8361
|
}) {
|
|
8362
8362
|
var Ar, Cr;
|
|
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 =
|
|
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(
|
|
8364
8364
|
(A) => {
|
|
8365
8365
|
var P;
|
|
8366
8366
|
return s && A.dashboard ? (P = go(A.dashboard, s.cardId)) == null ? void 0 : P.card : void 0;
|
|
@@ -8445,7 +8445,7 @@ function sh({
|
|
|
8445
8445
|
return;
|
|
8446
8446
|
}
|
|
8447
8447
|
A.key === "Enter" && !A.shiftKey && !A.nativeEvent.isComposing && M(A);
|
|
8448
|
-
},
|
|
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) => {
|
|
8449
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");
|
|
8450
8450
|
}, Oe = g === "full-page", Er = /* @__PURE__ */ p(
|
|
8451
8451
|
H,
|
|
@@ -8455,7 +8455,7 @@ function sh({
|
|
|
8455
8455
|
className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
|
|
8456
8456
|
"aria-label": "New conversation",
|
|
8457
8457
|
title: "New conversation",
|
|
8458
|
-
disabled:
|
|
8458
|
+
disabled: Q && !T.busy && !T.loading,
|
|
8459
8459
|
onClick: () => {
|
|
8460
8460
|
var A;
|
|
8461
8461
|
T.startNew(), (A = Y.current) == null || A.focus();
|
|
@@ -8483,7 +8483,7 @@ function sh({
|
|
|
8483
8483
|
T.readForCopy(A).then((P) => $o(P, { assistantName: e.assistantName, toolCalls: A }))
|
|
8484
8484
|
)
|
|
8485
8485
|
}
|
|
8486
|
-
), yt =
|
|
8486
|
+
), yt = Q && Oe && !T.loading, Ts = /* @__PURE__ */ k("footer", { className: B("shrink-0 space-y-2", yt ? "px-0" : "p-3"), children: [
|
|
8487
8487
|
m && !w && !u ? /* @__PURE__ */ k("div", { className: "flex items-center gap-1.5", children: [
|
|
8488
8488
|
/* @__PURE__ */ k(
|
|
8489
8489
|
"span",
|
|
@@ -8691,7 +8691,7 @@ function sh({
|
|
|
8691
8691
|
Mm,
|
|
8692
8692
|
{
|
|
8693
8693
|
conversation: T,
|
|
8694
|
-
empty:
|
|
8694
|
+
empty: Q,
|
|
8695
8695
|
layout: g,
|
|
8696
8696
|
onExpand: Ie,
|
|
8697
8697
|
onAdd: v,
|
|
@@ -8746,15 +8746,15 @@ function En({
|
|
|
8746
8746
|
}, [e, t, n, r]), null;
|
|
8747
8747
|
}
|
|
8748
8748
|
function Cm(e) {
|
|
8749
|
-
const t =
|
|
8749
|
+
const t = X((n) => n.isVisualEditing), r = Dn((n) => n.card);
|
|
8750
8750
|
return !e && t ? r : void 0;
|
|
8751
8751
|
}
|
|
8752
8752
|
function $m(e) {
|
|
8753
|
-
if (!(e || !
|
|
8753
|
+
if (!(e || !X.getState().isVisualEditing))
|
|
8754
8754
|
return Zn(), Es(e);
|
|
8755
8755
|
}
|
|
8756
8756
|
function Es(e) {
|
|
8757
|
-
if (e || !
|
|
8757
|
+
if (e || !X.getState().isVisualEditing) return;
|
|
8758
8758
|
const t = Dn.getState();
|
|
8759
8759
|
return { card: t.card, mode: t.isDevMode ? "sql" : "visual" };
|
|
8760
8760
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { w as g, y as $ } from "./bookmark-state-
|
|
2
|
-
import { l as F, h as C, a as O, b as v, i as S, f as T } from "./resolve-dashboard-input-context-
|
|
1
|
+
import { w as g, y as $ } from "./bookmark-state-CWeoGbrx.js";
|
|
2
|
+
import { l as F, h as C, a as O, b as v, i as S, f as T } from "./resolve-dashboard-input-context-DaDrZGuA.js";
|
|
3
3
|
function D(e) {
|
|
4
4
|
var d, c, f;
|
|
5
5
|
const { saved: s, draft: a, usage: l } = e, b = [], j = F(s);
|