react-semaphor 0.1.558 → 0.1.560
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 +368 -358
- 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 +630 -0
- package/dist/chunks/{assistant-chat-BCWoP6Rf.js → assistant-chat-Bu2fFm_I.js} +206 -207
- package/dist/chunks/{bookmark-state-PjQpxbG7.js → bookmark-state-BFY9oNmr.js} +3 -3
- package/dist/chunks/{braces-D5Ucy7q1.js → braces-Da41xfUd.js} +1 -1
- package/dist/chunks/{comparison-window-caption-Dc7BaCMz.js → comparison-window-caption-4FNkMrzE.js} +213 -213
- package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-B-DLRGrV.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
- package/dist/chunks/{dashboard-wK6Bai4V.js → dashboard-_MeBuy67.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Coqghdn6.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
- package/dist/chunks/{dashboard-controls-BYWSM2RM.js → dashboard-controls-Bi7fyG-4.js} +98 -98
- package/dist/chunks/{dashboard-json-pPTB5gj0.js → dashboard-json-B1mU_OMa.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-PY_7Xm55.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
- package/dist/chunks/{edit-dashboard-visual-BODxuUeq.js → edit-dashboard-visual-0CJN31Y3.js} +8274 -8514
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
- package/dist/chunks/{filter-value-text-CUBpotVN.js → filter-value-text-CRC-K_l_.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-BsFqnnbA.js → global-date-filter-utils-D8365uPH.js} +4088 -3416
- package/dist/chunks/{index-DP_wQl0v.js → index-DtHidOPV.js} +579 -604
- package/dist/chunks/{layout-grid-CkoXmv0L.js → layout-grid-BvsH4RY2.js} +1 -1
- package/dist/chunks/{list-filter-B4i25kuc.js → list-filter-Dg0otx5E.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-4GTUDheD.js → matrix-analytical-definition-CM18W8w6.js} +41 -41
- package/dist/chunks/{matrix-card-fS_4O7zA.js → matrix-card-HPskLaPy.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Dj7HaAHC.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-CpgLZ7E5.js → matrix-operation-contract-WPv4R-H_.js} +130 -130
- package/dist/chunks/{metric-comparison-C8LY7GG5.js → metric-comparison-ljMKYZKa.js} +2 -2
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
- package/dist/chunks/{palette-stlpjVk4.js → palette-Bsh376zO.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DMk-mKhG.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
- package/dist/chunks/{pivot-result-identity-CrQ54Xbj.js → pivot-result-identity-vS9TSh4f.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-BI2z2LlB.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
- package/dist/chunks/{report-preferences-dialog-Dc-YyVwf.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
- package/dist/chunks/{report-runtime-context-CohdtiMg.js → report-runtime-context-BZQh9ywy.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-BZYI1hB0.js → resolve-dashboard-input-context-CAMiWvyR.js} +2021 -2239
- package/dist/chunks/{save-C1dgxgAu.js → save-B5EAsgQF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CIBoMq46.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
- package/dist/chunks/{selection-reducer-_d6aKJnj.js → selection-reducer-D0YnaAD9.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-ERTLU7B4.js → semaphor-ready-indicator-XLBLOJ2V.js} +38446 -39176
- package/dist/chunks/{shelf-drop-preview-context-fEnx6iL_.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
- package/dist/chunks/source-entity-resolution-dUG5VWRm.js +607 -0
- package/dist/chunks/{switch-BqUan2mN.js → switch-ByxH4M7t.js} +3 -3
- package/dist/chunks/{table-export-sheet-CTCTA_bd.js → table-export-sheet-C_GdeTYU.js} +1 -1
- package/dist/chunks/{table-settings-DF1gdVQR.js → table-settings-Imz0FgWi.js} +8 -8
- package/dist/chunks/{temporal-input-presentation-DoSniQj1.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
- package/dist/chunks/{token-types-DFyLflLY.js → token-types-CQtXUVMy.js} +1 -1
- package/dist/chunks/{upload-DcoyjkRV.js → upload-wbR-NVzq.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-xhb9YFg-.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
- package/dist/chunks/validators-CXTneCA4.js +3453 -0
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2207 -1496
- package/dist/data-app-sdk/index.js +20 -20
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +181 -176
- package/dist/index.js +22 -22
- 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/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +6 -6
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +39 -9
- package/dist/types/lib/stores/table-actions.d.ts +9 -3
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +13 -44
- package/dist/types/lib/utils/card-config-utils.d.ts +9 -1
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/source-capabilities.d.ts +21 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +1 -1
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-BvJH9JO-.js +0 -3411
- package/dist/chunks/source-entity-resolution-DXW1HpKf.js +0 -816
- package/dist/chunks/validators-hmfNNQz8.js +0 -3595
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
|
@@ -4,31 +4,30 @@ var $r = (e) => {
|
|
|
4
4
|
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
|
-
import { useCallback as te, useRef as ie, useMemo as it, useEffect as ke, useState as
|
|
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
|
|
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 Q, 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 Xs, ck as Qs, 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-XLBLOJ2V.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-ByxH4M7t.js";
|
|
10
10
|
import "./index-CuHybtft.js";
|
|
11
|
-
import "./validators-
|
|
12
|
-
import "./matrix-operation-contract-
|
|
13
|
-
import "./analytics-base-schemas-
|
|
11
|
+
import "./validators-CXTneCA4.js";
|
|
12
|
+
import "./matrix-operation-contract-WPv4R-H_.js";
|
|
13
|
+
import "./analytics-base-schemas-CHLxsPfX.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 {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { d as _o } from "./document-dashboard-inputs-PY_7Xm55.js";
|
|
17
|
+
import { I as go } from "./table-settings-Imz0FgWi.js";
|
|
18
|
+
import { l as bo, m as ct, c as Qt, A as et, d as qn } from "./context-BgPDzLHZ.js";
|
|
19
|
+
import { p as Pr, a as vo, A as Jn } from "./saved-dashboard-context-n2Wn11cV.js";
|
|
20
|
+
import { ek as yo, aw as xo, v as Rr } from "./global-date-filter-utils-D8365uPH.js";
|
|
21
|
+
import { o as Kn, p as wo } from "./report-preferences-dialog-BV8L0SeS.js";
|
|
22
|
+
import { d as _o } from "./document-dashboard-inputs-CkWfDB8c.js";
|
|
24
23
|
import { w as Io, c as Wn } from "./visual-choice-JiJ-_3bi.js";
|
|
25
|
-
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-
|
|
26
|
-
import {
|
|
27
|
-
import { L as Po } from "./list-filter-
|
|
28
|
-
import {
|
|
29
|
-
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-Ccn1zaxl.js";
|
|
25
|
+
import { aq as Zr, ar as Dr, as as jr, at as Fr, a5 as zo, a3 as Mo } from "./temporal-input-presentation-uvNK_tM0.js";
|
|
26
|
+
import { L as Po } from "./list-filter-Dg0otx5E.js";
|
|
27
|
+
import { v as Ro, x as Zo, y as Do, z as wt, A as jo, B as Lr, C as Fo } from "./pivot-result-contract-expectations-Bl5suy4-.js";
|
|
28
|
+
import { L as Ur } from "./layout-grid-BvsH4RY2.js";
|
|
30
29
|
function Lo(e, t, r) {
|
|
31
|
-
const n = Ro(), a = (r == null ? void 0 : r.locale) ?? n.locale ?? Zo, s =
|
|
30
|
+
const n = Ro(), a = (r == null ? void 0 : r.locale) ?? n.locale ?? Zo, s = Do(e, t);
|
|
32
31
|
if (isNaN(s))
|
|
33
32
|
throw new RangeError("Invalid time value");
|
|
34
33
|
const o = Object.assign({}, r, {
|
|
@@ -37,9 +36,9 @@ function Lo(e, t, r) {
|
|
|
37
36
|
});
|
|
38
37
|
let c, f;
|
|
39
38
|
s > 0 ? (c = wt(t), f = wt(e)) : (c = wt(e), f = wt(t));
|
|
40
|
-
const i =
|
|
39
|
+
const i = jo((r == null ? void 0 : r.roundingMethod) ?? "round"), g = f.getTime() - c.getTime(), u = g / Fr, m = Lr(f) - Lr(c), w = (g - m) / Fr, I = r == null ? void 0 : r.unit;
|
|
41
40
|
let E;
|
|
42
|
-
if (I ? E = I : u < 1 ? E = "second" : u < 60 ? E = "minute" : u < Zr ? E = "hour" : w <
|
|
41
|
+
if (I ? E = I : u < 1 ? E = "second" : u < 60 ? E = "minute" : u < Zr ? E = "hour" : w < Dr ? E = "day" : w < jr ? E = "month" : E = "year", E === "second") {
|
|
43
42
|
const _ = i(g / 1e3);
|
|
44
43
|
return a.formatDistance("xSeconds", _, o);
|
|
45
44
|
} else if (E === "minute") {
|
|
@@ -52,10 +51,10 @@ function Lo(e, t, r) {
|
|
|
52
51
|
const _ = i(w / Zr);
|
|
53
52
|
return a.formatDistance("xDays", _, o);
|
|
54
53
|
} else if (E === "month") {
|
|
55
|
-
const _ = i(w /
|
|
54
|
+
const _ = i(w / Dr);
|
|
56
55
|
return _ === 12 && I !== "month" ? a.formatDistance("xYears", 1, o) : a.formatDistance("xMonths", _, o);
|
|
57
56
|
} else {
|
|
58
|
-
const _ = i(w /
|
|
57
|
+
const _ = i(w / jr);
|
|
59
58
|
return a.formatDistance("xYears", _, o);
|
|
60
59
|
}
|
|
61
60
|
}
|
|
@@ -151,7 +150,7 @@ function Go(e = "dashboard") {
|
|
|
151
150
|
return t && Br(t.reads, [r]) || (t = { reads: [r], sent: { context: Pr({ surface: "none", timeZone: r }) } }), t.sent;
|
|
152
151
|
} : ({ focus: r, snapshot: n, editing: a }) => {
|
|
153
152
|
var I;
|
|
154
|
-
const s =
|
|
153
|
+
const s = Q.getState(), o = (I = s.reportContext) == null ? void 0 : I.calendar;
|
|
155
154
|
if (!o) throw new Yn();
|
|
156
155
|
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 = {
|
|
157
156
|
surface: "dashboard",
|
|
@@ -196,29 +195,29 @@ function Br(e, t) {
|
|
|
196
195
|
return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
|
|
197
196
|
}
|
|
198
197
|
function Ho(e) {
|
|
199
|
-
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n =
|
|
198
|
+
const { canChange: t, canChangeNow: r } = Kn(e.surface === "dashboard"), n = Q((i) => {
|
|
200
199
|
var u, m;
|
|
201
200
|
const g = (m = (u = i.dashboard) == null ? void 0 : u.sheets) == null ? void 0 : m.find((w) => w.id === i.selectedSheetId);
|
|
202
201
|
return !!g && !xo(g);
|
|
203
|
-
}), a =
|
|
202
|
+
}), a = Q((i) => i.isVisualEditing), s = $s(), o = Os();
|
|
204
203
|
return { add: te(
|
|
205
204
|
async (i, g) => {
|
|
206
205
|
var T, O;
|
|
207
|
-
const u =
|
|
206
|
+
const u = Q.getState(), m = (T = u.dashboard) == null ? void 0 : T.id, w = u.selectedSheetId;
|
|
208
207
|
if (!m || !w) throw new at(Ut);
|
|
209
|
-
const I = { title: i.title, type: So[g], ...i.card }, E = !
|
|
208
|
+
const I = { title: i.title, type: So[g], ...i.card }, E = !Xo({ ...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) => {
|
|
210
209
|
console.warn("Adding the result without refreshed semantic metadata:", K);
|
|
211
|
-
}), h = structuredClone(
|
|
210
|
+
}), h = structuredClone(Q.getState().semanticExecutionPayload);
|
|
212
211
|
zs(h, y);
|
|
213
212
|
const d = Io(
|
|
214
213
|
_.config ?? {},
|
|
215
|
-
|
|
216
|
-
), v = d === (_.config ?? {}) ? x : { ...x, cards: [{ ..._, config: d }] }, b =
|
|
214
|
+
Qo(_, w, h, s)
|
|
215
|
+
), v = d === (_.config ?? {}) ? x : { ...x, cards: [{ ..._, config: d }] }, b = Q.getState();
|
|
217
216
|
if (((O = b.dashboard) == null ? void 0 : O.id) !== m || b.selectedSheetId !== w || b.isVisualEditing)
|
|
218
217
|
throw new at(Ut);
|
|
219
218
|
if (!r()) throw new at(Yo);
|
|
220
219
|
const { actions: N } = b;
|
|
221
|
-
if (N.setIsDashboardEditing(!0), N.addFrame(w, v, { semanticExecutionPayload: y }), !
|
|
220
|
+
if (N.setIsDashboardEditing(!0), N.addFrame(w, v, { semanticExecutionPayload: y }), !Xn(Q.getState().dashboard, v.id))
|
|
222
221
|
throw b.isDashboardEditing || N.setIsDashboardEditing(!1), new at(Ut);
|
|
223
222
|
return { frameId: v.id, asTable: E };
|
|
224
223
|
},
|
|
@@ -226,7 +225,7 @@ function Ho(e) {
|
|
|
226
225
|
), available: t && n && !a };
|
|
227
226
|
}
|
|
228
227
|
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.";
|
|
229
|
-
function
|
|
228
|
+
function Xo(e, t, r) {
|
|
230
229
|
if (r !== "line" && r !== "bar" && r !== "stackedBar") return !0;
|
|
231
230
|
const n = Wn(Gn(t), r);
|
|
232
231
|
if (!n.ok) return !1;
|
|
@@ -238,16 +237,16 @@ class at extends Error {
|
|
|
238
237
|
super(t), this.name = "AddToDashboardRefusedError";
|
|
239
238
|
}
|
|
240
239
|
}
|
|
241
|
-
function
|
|
240
|
+
function Xn(e, t) {
|
|
242
241
|
var r;
|
|
243
242
|
return !!((r = e == null ? void 0 : e.sheets) != null && r.some((n) => {
|
|
244
243
|
var a;
|
|
245
244
|
return (a = n.frames) == null ? void 0 : a.some((s) => s.id === t);
|
|
246
245
|
}));
|
|
247
246
|
}
|
|
248
|
-
function
|
|
247
|
+
function Qo(e, t, r, n) {
|
|
249
248
|
var o;
|
|
250
|
-
const a = Ps(
|
|
249
|
+
const a = Ps(Q.getState()), s = _o({
|
|
251
250
|
...a,
|
|
252
251
|
cardId: e.id,
|
|
253
252
|
cardOverride: e,
|
|
@@ -260,7 +259,7 @@ function Xo(e, t, r, n) {
|
|
|
260
259
|
(c) => c.dateOwner !== "global_date"
|
|
261
260
|
);
|
|
262
261
|
}
|
|
263
|
-
const
|
|
262
|
+
const Qn = "vercel.ai.error", ei = Symbol.for(Qn);
|
|
264
263
|
var re = class ea extends Error {
|
|
265
264
|
/**
|
|
266
265
|
* Creates an AI SDK Error.
|
|
@@ -279,7 +278,7 @@ var re = class ea extends Error {
|
|
|
279
278
|
* @returns {boolean} True if the error is an AI SDK Error, false otherwise.
|
|
280
279
|
*/
|
|
281
280
|
static isInstance(t) {
|
|
282
|
-
return ea.hasMarker(t,
|
|
281
|
+
return ea.hasMarker(t, Qn);
|
|
283
282
|
}
|
|
284
283
|
static hasMarker(t, r) {
|
|
285
284
|
const n = Symbol.for(r);
|
|
@@ -459,7 +458,7 @@ function di(e, t) {
|
|
|
459
458
|
const r = (e.toString().split(".")[1] || "").length, n = (t.toString().split(".")[1] || "").length, a = r > n ? r : n, s = Number.parseInt(e.toFixed(a).replace(".", "")), o = Number.parseInt(t.toFixed(a).replace(".", ""));
|
|
460
459
|
return s % o / 10 ** a;
|
|
461
460
|
}
|
|
462
|
-
function
|
|
461
|
+
function D(e, t, r) {
|
|
463
462
|
Object.defineProperty(e, t, {
|
|
464
463
|
get() {
|
|
465
464
|
{
|
|
@@ -759,10 +758,10 @@ const Si = (e) => (t, r, n, a) => {
|
|
|
759
758
|
error: new e(s.issues.map((o) => Te(o, a, Ee())))
|
|
760
759
|
} : { success: !0, data: s.value };
|
|
761
760
|
}, Ei = /* @__PURE__ */ wa(ya), Ti = /^[cC][^\s-]{8,}$/, Ai = /^[0-9a-z]+$/, Ci = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, $i = /^[0-9a-vA-V]{20}$/, Oi = /^[A-Za-z0-9]{27}$/, zi = /^[a-zA-Z0-9_-]{21}$/, Mi = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Pi = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Jr = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, Ri = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
762
|
-
function
|
|
761
|
+
function Di() {
|
|
763
762
|
return new RegExp(Zi, "u");
|
|
764
763
|
}
|
|
765
|
-
const
|
|
764
|
+
const ji = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Fi = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, Li = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Ui = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Bi = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, _a = /^[A-Za-z0-9_-]*$/, Vi = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, qi = /^\+(?:[0-9]){6,14}[0-9]$/, Ia = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Ji = /* @__PURE__ */ new RegExp(`^${Ia}$`);
|
|
766
765
|
function Sa(e) {
|
|
767
766
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
768
767
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
@@ -779,7 +778,7 @@ function Wi(e) {
|
|
|
779
778
|
const Gi = (e) => {
|
|
780
779
|
const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
|
|
781
780
|
return new RegExp(`^${t}$`);
|
|
782
|
-
}, Hi = /^\d+$/, Yi = /^-?\d+(?:\.\d+)?/i,
|
|
781
|
+
}, Hi = /^\d+$/, Yi = /^-?\d+(?:\.\d+)?/i, Xi = /true|false/i, Qi = /null/i, el = /^[^A-Z]*$/, tl = /^[^a-z]*$/, le = /* @__PURE__ */ S("$ZodCheck", (e, t) => {
|
|
783
782
|
var r;
|
|
784
783
|
e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
|
|
785
784
|
}), Na = {
|
|
@@ -1213,7 +1212,7 @@ const hl = {
|
|
|
1213
1212
|
}
|
|
1214
1213
|
};
|
|
1215
1214
|
}), xl = /* @__PURE__ */ S("$ZodEmoji", (e, t) => {
|
|
1216
|
-
t.pattern ?? (t.pattern =
|
|
1215
|
+
t.pattern ?? (t.pattern = Di()), V.init(e, t);
|
|
1217
1216
|
}), wl = /* @__PURE__ */ S("$ZodNanoID", (e, t) => {
|
|
1218
1217
|
t.pattern ?? (t.pattern = zi), V.init(e, t);
|
|
1219
1218
|
}), _l = /* @__PURE__ */ S("$ZodCUID", (e, t) => {
|
|
@@ -1235,7 +1234,7 @@ const hl = {
|
|
|
1235
1234
|
}), Cl = /* @__PURE__ */ S("$ZodISODuration", (e, t) => {
|
|
1236
1235
|
t.pattern ?? (t.pattern = Mi), V.init(e, t);
|
|
1237
1236
|
}), $l = /* @__PURE__ */ S("$ZodIPv4", (e, t) => {
|
|
1238
|
-
t.pattern ?? (t.pattern =
|
|
1237
|
+
t.pattern ?? (t.pattern = ji), V.init(e, t), e._zod.onattach.push((r) => {
|
|
1239
1238
|
const n = r._zod.bag;
|
|
1240
1239
|
n.format = "ipv4";
|
|
1241
1240
|
});
|
|
@@ -1323,10 +1322,10 @@ const Zl = /* @__PURE__ */ S("$ZodBase64URL", (e, t) => {
|
|
|
1323
1322
|
continue: !t.abort
|
|
1324
1323
|
});
|
|
1325
1324
|
};
|
|
1326
|
-
}),
|
|
1325
|
+
}), Dl = /* @__PURE__ */ S("$ZodE164", (e, t) => {
|
|
1327
1326
|
t.pattern ?? (t.pattern = qi), V.init(e, t);
|
|
1328
1327
|
});
|
|
1329
|
-
function
|
|
1328
|
+
function jl(e, t = null) {
|
|
1330
1329
|
try {
|
|
1331
1330
|
const r = e.split(".");
|
|
1332
1331
|
if (r.length !== 3)
|
|
@@ -1342,7 +1341,7 @@ function Dl(e, t = null) {
|
|
|
1342
1341
|
}
|
|
1343
1342
|
const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
1344
1343
|
V.init(e, t), e._zod.check = (r) => {
|
|
1345
|
-
|
|
1344
|
+
jl(r.value, t.alg) || r.issues.push({
|
|
1346
1345
|
code: "invalid_format",
|
|
1347
1346
|
format: "jwt",
|
|
1348
1347
|
input: r.value,
|
|
@@ -1372,7 +1371,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1372
1371
|
}), Ll = /* @__PURE__ */ S("$ZodNumber", (e, t) => {
|
|
1373
1372
|
nl.init(e, t), Aa.init(e, t);
|
|
1374
1373
|
}), Ul = /* @__PURE__ */ S("$ZodBoolean", (e, t) => {
|
|
1375
|
-
U.init(e, t), e._zod.pattern =
|
|
1374
|
+
U.init(e, t), e._zod.pattern = Xi, e._zod.parse = (r, n) => {
|
|
1376
1375
|
if (t.coerce)
|
|
1377
1376
|
try {
|
|
1378
1377
|
r.value = !!r.value;
|
|
@@ -1387,7 +1386,7 @@ const Fl = /* @__PURE__ */ S("$ZodJWT", (e, t) => {
|
|
|
1387
1386
|
}), r;
|
|
1388
1387
|
};
|
|
1389
1388
|
}), Bl = /* @__PURE__ */ S("$ZodNull", (e, t) => {
|
|
1390
|
-
U.init(e, t), e._zod.pattern =
|
|
1389
|
+
U.init(e, t), e._zod.pattern = Qi, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (r, n) => {
|
|
1391
1390
|
const a = r.value;
|
|
1392
1391
|
return a === null || r.issues.push({
|
|
1393
1392
|
expected: "null",
|
|
@@ -1453,7 +1452,7 @@ const Kl = /* @__PURE__ */ S("$ZodObject", (e, t) => {
|
|
|
1453
1452
|
optionalKeys: new Set(m)
|
|
1454
1453
|
};
|
|
1455
1454
|
});
|
|
1456
|
-
|
|
1455
|
+
D(e._zod, "propValues", () => {
|
|
1457
1456
|
const u = t.shape, m = {};
|
|
1458
1457
|
for (const w in u) {
|
|
1459
1458
|
const I = u[w]._zod;
|
|
@@ -1570,10 +1569,10 @@ function Gr(e, t, r, n) {
|
|
|
1570
1569
|
}), t;
|
|
1571
1570
|
}
|
|
1572
1571
|
const Ca = /* @__PURE__ */ S("$ZodUnion", (e, t) => {
|
|
1573
|
-
U.init(e, t),
|
|
1572
|
+
U.init(e, t), D(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), D(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), D(e._zod, "values", () => {
|
|
1574
1573
|
if (t.options.every((r) => r._zod.values))
|
|
1575
1574
|
return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
|
|
1576
|
-
}),
|
|
1575
|
+
}), D(e._zod, "pattern", () => {
|
|
1577
1576
|
if (t.options.every((r) => r._zod.pattern)) {
|
|
1578
1577
|
const r = t.options.map((n) => n._zod.pattern);
|
|
1579
1578
|
return new RegExp(`^(${r.map((n) => hr(n.source)).join("|")})$`);
|
|
@@ -1599,7 +1598,7 @@ const Ca = /* @__PURE__ */ S("$ZodUnion", (e, t) => {
|
|
|
1599
1598
|
}), Wl = /* @__PURE__ */ S("$ZodDiscriminatedUnion", (e, t) => {
|
|
1600
1599
|
Ca.init(e, t);
|
|
1601
1600
|
const r = e._zod.parse;
|
|
1602
|
-
|
|
1601
|
+
D(e._zod, "propValues", () => {
|
|
1603
1602
|
const a = {};
|
|
1604
1603
|
for (const s of t.options) {
|
|
1605
1604
|
const o = s._zod.propValues;
|
|
@@ -1764,7 +1763,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1764
1763
|
inst: e
|
|
1765
1764
|
}), n;
|
|
1766
1765
|
};
|
|
1767
|
-
}),
|
|
1766
|
+
}), Xl = /* @__PURE__ */ S("$ZodLiteral", (e, t) => {
|
|
1768
1767
|
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) => {
|
|
1769
1768
|
const a = r.value;
|
|
1770
1769
|
return e._zod.values.has(a) || r.issues.push({
|
|
@@ -1774,7 +1773,7 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1774
1773
|
inst: e
|
|
1775
1774
|
}), r;
|
|
1776
1775
|
};
|
|
1777
|
-
}),
|
|
1776
|
+
}), Ql = /* @__PURE__ */ S("$ZodTransform", (e, t) => {
|
|
1778
1777
|
U.init(e, t), e._zod.parse = (r, n) => {
|
|
1779
1778
|
const a = t.transform(r.value, r);
|
|
1780
1779
|
if (n.async)
|
|
@@ -1784,17 +1783,17 @@ const Hl = /* @__PURE__ */ S("$ZodRecord", (e, t) => {
|
|
|
1784
1783
|
return r.value = a, r;
|
|
1785
1784
|
};
|
|
1786
1785
|
}), ec = /* @__PURE__ */ S("$ZodOptional", (e, t) => {
|
|
1787
|
-
U.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional",
|
|
1786
|
+
U.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", D(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), D(e._zod, "pattern", () => {
|
|
1788
1787
|
const r = t.innerType._zod.pattern;
|
|
1789
1788
|
return r ? new RegExp(`^(${hr(r.source)})?$`) : void 0;
|
|
1790
1789
|
}), e._zod.parse = (r, n) => t.innerType._zod.optin === "optional" ? t.innerType._zod.run(r, n) : r.value === void 0 ? r : t.innerType._zod.run(r, n);
|
|
1791
1790
|
}), tc = /* @__PURE__ */ S("$ZodNullable", (e, t) => {
|
|
1792
|
-
U.init(e, t),
|
|
1791
|
+
U.init(e, t), D(e._zod, "optin", () => t.innerType._zod.optin), D(e._zod, "optout", () => t.innerType._zod.optout), D(e._zod, "pattern", () => {
|
|
1793
1792
|
const r = t.innerType._zod.pattern;
|
|
1794
1793
|
return r ? new RegExp(`^(${hr(r.source)}|null)$`) : void 0;
|
|
1795
|
-
}),
|
|
1794
|
+
}), D(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
|
|
1796
1795
|
}), rc = /* @__PURE__ */ S("$ZodDefault", (e, t) => {
|
|
1797
|
-
U.init(e, t), e._zod.optin = "optional",
|
|
1796
|
+
U.init(e, t), e._zod.optin = "optional", D(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
|
|
1798
1797
|
if (r.value === void 0)
|
|
1799
1798
|
return r.value = t.defaultValue, r;
|
|
1800
1799
|
const a = t.innerType._zod.run(r, n);
|
|
@@ -1805,17 +1804,17 @@ function Yr(e, t) {
|
|
|
1805
1804
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1806
1805
|
}
|
|
1807
1806
|
const nc = /* @__PURE__ */ S("$ZodPrefault", (e, t) => {
|
|
1808
|
-
U.init(e, t), e._zod.optin = "optional",
|
|
1807
|
+
U.init(e, t), e._zod.optin = "optional", D(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
|
|
1809
1808
|
}), ac = /* @__PURE__ */ S("$ZodNonOptional", (e, t) => {
|
|
1810
|
-
U.init(e, t),
|
|
1809
|
+
U.init(e, t), D(e._zod, "values", () => {
|
|
1811
1810
|
const r = t.innerType._zod.values;
|
|
1812
1811
|
return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
|
|
1813
1812
|
}), e._zod.parse = (r, n) => {
|
|
1814
1813
|
const a = t.innerType._zod.run(r, n);
|
|
1815
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1814
|
+
return a instanceof Promise ? a.then((s) => Xr(s, e)) : Xr(a, e);
|
|
1816
1815
|
};
|
|
1817
1816
|
});
|
|
1818
|
-
function
|
|
1817
|
+
function Xr(e, t) {
|
|
1819
1818
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1820
1819
|
code: "invalid_type",
|
|
1821
1820
|
expected: "nonoptional",
|
|
@@ -1824,7 +1823,7 @@ function Qr(e, t) {
|
|
|
1824
1823
|
}), e;
|
|
1825
1824
|
}
|
|
1826
1825
|
const sc = /* @__PURE__ */ S("$ZodCatch", (e, t) => {
|
|
1827
|
-
U.init(e, t), e._zod.optin = "optional",
|
|
1826
|
+
U.init(e, t), e._zod.optin = "optional", D(e._zod, "optout", () => t.innerType._zod.optout), D(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
|
|
1828
1827
|
const a = t.innerType._zod.run(r, n);
|
|
1829
1828
|
return a instanceof Promise ? a.then((s) => (r.value = s.value, s.issues.length && (r.value = t.catchValue({
|
|
1830
1829
|
...r,
|
|
@@ -1841,16 +1840,16 @@ const sc = /* @__PURE__ */ S("$ZodCatch", (e, t) => {
|
|
|
1841
1840
|
}), r.issues = []), r);
|
|
1842
1841
|
};
|
|
1843
1842
|
}), oc = /* @__PURE__ */ S("$ZodPipe", (e, t) => {
|
|
1844
|
-
U.init(e, t),
|
|
1843
|
+
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) => {
|
|
1845
1844
|
const a = t.in._zod.run(r, n);
|
|
1846
|
-
return a instanceof Promise ? a.then((s) =>
|
|
1845
|
+
return a instanceof Promise ? a.then((s) => Qr(s, t, n)) : Qr(a, t, n);
|
|
1847
1846
|
};
|
|
1848
1847
|
});
|
|
1849
|
-
function
|
|
1848
|
+
function Qr(e, t, r) {
|
|
1850
1849
|
return ot(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
|
|
1851
1850
|
}
|
|
1852
1851
|
const ic = /* @__PURE__ */ S("$ZodReadonly", (e, t) => {
|
|
1853
|
-
U.init(e, t),
|
|
1852
|
+
U.init(e, t), D(e._zod, "propValues", () => t.innerType._zod.propValues), D(e._zod, "values", () => t.innerType._zod.values), D(e._zod, "optin", () => t.innerType._zod.optin), D(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
|
|
1854
1853
|
const a = t.innerType._zod.run(r, n);
|
|
1855
1854
|
return a instanceof Promise ? a.then(en) : en(a);
|
|
1856
1855
|
};
|
|
@@ -1859,7 +1858,7 @@ function en(e) {
|
|
|
1859
1858
|
return e.value = Object.freeze(e.value), e;
|
|
1860
1859
|
}
|
|
1861
1860
|
const lc = /* @__PURE__ */ S("$ZodLazy", (e, t) => {
|
|
1862
|
-
U.init(e, t),
|
|
1861
|
+
U.init(e, t), D(e._zod, "innerType", () => t.getter()), D(e._zod, "pattern", () => e._zod.innerType._zod.pattern), D(e._zod, "propValues", () => e._zod.innerType._zod.propValues), D(e._zod, "optin", () => e._zod.innerType._zod.optin), D(e._zod, "optout", () => e._zod.innerType._zod.optout), e._zod.parse = (r, n) => e._zod.innerType._zod.run(r, n);
|
|
1863
1862
|
}), cc = /* @__PURE__ */ S("$ZodCustom", (e, t) => {
|
|
1864
1863
|
le.init(e, t), U.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
|
|
1865
1864
|
const n = r.value, a = t.fn(n);
|
|
@@ -2169,7 +2168,7 @@ function Zc(e, t) {
|
|
|
2169
2168
|
...$(t)
|
|
2170
2169
|
});
|
|
2171
2170
|
}
|
|
2172
|
-
function
|
|
2171
|
+
function Dc(e, t) {
|
|
2173
2172
|
return new e({
|
|
2174
2173
|
type: "number",
|
|
2175
2174
|
check: "number_format",
|
|
@@ -2178,7 +2177,7 @@ function jc(e, t) {
|
|
|
2178
2177
|
...$(t)
|
|
2179
2178
|
});
|
|
2180
2179
|
}
|
|
2181
|
-
function
|
|
2180
|
+
function jc(e, t) {
|
|
2182
2181
|
return new e({
|
|
2183
2182
|
type: "boolean",
|
|
2184
2183
|
...$(t)
|
|
@@ -2322,10 +2321,10 @@ function Hc() {
|
|
|
2322
2321
|
function Yc() {
|
|
2323
2322
|
return gt((e) => e.toLowerCase());
|
|
2324
2323
|
}
|
|
2325
|
-
function
|
|
2324
|
+
function Xc() {
|
|
2326
2325
|
return gt((e) => e.toUpperCase());
|
|
2327
2326
|
}
|
|
2328
|
-
function
|
|
2327
|
+
function Qc(e, t, r) {
|
|
2329
2328
|
return new e({
|
|
2330
2329
|
type: "array",
|
|
2331
2330
|
element: t,
|
|
@@ -2912,9 +2911,9 @@ const du = (e, t) => {
|
|
|
2912
2911
|
// enumerable: false,
|
|
2913
2912
|
}
|
|
2914
2913
|
});
|
|
2915
|
-
},
|
|
2914
|
+
}, Dt = S("ZodError", du, {
|
|
2916
2915
|
Parent: Error
|
|
2917
|
-
}), pu = /* @__PURE__ */ Si(
|
|
2916
|
+
}), pu = /* @__PURE__ */ Si(Dt), fu = /* @__PURE__ */ Ni(Dt), mu = /* @__PURE__ */ xa(Dt), Ma = /* @__PURE__ */ wa(Dt), q = /* @__PURE__ */ S("ZodType", (e, t) => (U.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
|
|
2918
2917
|
{
|
|
2919
2918
|
...t,
|
|
2920
2919
|
checks: [
|
|
@@ -2923,7 +2922,7 @@ const du = (e, t) => {
|
|
|
2923
2922
|
]
|
|
2924
2923
|
}
|
|
2925
2924
|
// { parent: true }
|
|
2926
|
-
), e.clone = (r, n) => Je(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => pu(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => mu(e, r, n), e.parseAsync = async (r, n) => fu(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => Ma(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(gd(r, n)), e.superRefine = (r) => e.check(bd(r)), e.overwrite = (r) => e.check(gt(r)), e.optional = () => un(e), e.nullable = () => dn(e), e.nullish = () => un(dn(e)), e.nonoptional = (r) => od(e, r), e.array = () =>
|
|
2925
|
+
), e.clone = (r, n) => Je(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => pu(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => mu(e, r, n), e.parseAsync = async (r, n) => fu(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => Ma(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(gd(r, n)), e.superRefine = (r) => e.check(bd(r)), e.overwrite = (r) => e.check(gt(r)), e.optional = () => un(e), e.nullable = () => dn(e), e.nullish = () => un(dn(e)), e.nonoptional = (r) => od(e, r), e.array = () => Da(e), e.or = (r) => La([e, r]), e.and = (r) => Wu(e, r), e.transform = (r) => pn(e, ed(r)), e.default = (r) => nd(e, r), e.prefault = (r) => sd(e, r), e.catch = (r) => ld(e, r), e.pipe = (r) => pn(e, r), e.readonly = () => dd(e), e.describe = (r) => {
|
|
2927
2926
|
const n = e.clone();
|
|
2928
2927
|
return st.add(n, { description: r }), n;
|
|
2929
2928
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2940,7 +2939,7 @@ const du = (e, t) => {
|
|
|
2940
2939
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Pa = /* @__PURE__ */ S("_ZodString", (e, t) => {
|
|
2941
2940
|
br.init(e, t), q.init(e, t);
|
|
2942
2941
|
const r = e._zod.bag;
|
|
2943
|
-
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(
|
|
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(Xc());
|
|
2944
2943
|
}), hu = /* @__PURE__ */ S("ZodString", (e, t) => {
|
|
2945
2944
|
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));
|
|
2946
2945
|
});
|
|
@@ -2984,7 +2983,7 @@ const J = /* @__PURE__ */ S("ZodStringFormat", (e, t) => {
|
|
|
2984
2983
|
}), $u = /* @__PURE__ */ S("ZodBase64URL", (e, t) => {
|
|
2985
2984
|
Zl.init(e, t), J.init(e, t);
|
|
2986
2985
|
}), Ou = /* @__PURE__ */ S("ZodE164", (e, t) => {
|
|
2987
|
-
|
|
2986
|
+
Dl.init(e, t), J.init(e, t);
|
|
2988
2987
|
}), zu = /* @__PURE__ */ S("ZodJWT", (e, t) => {
|
|
2989
2988
|
Fl.init(e, t), J.init(e, t);
|
|
2990
2989
|
}), Ra = /* @__PURE__ */ S("ZodNumber", (e, t) => {
|
|
@@ -2999,19 +2998,19 @@ const Pu = /* @__PURE__ */ S("ZodNumberFormat", (e, t) => {
|
|
|
2999
2998
|
Ll.init(e, t), Ra.init(e, t);
|
|
3000
2999
|
});
|
|
3001
3000
|
function cn(e) {
|
|
3002
|
-
return
|
|
3001
|
+
return Dc(Pu, e);
|
|
3003
3002
|
}
|
|
3004
3003
|
const Ru = /* @__PURE__ */ S("ZodBoolean", (e, t) => {
|
|
3005
3004
|
Ul.init(e, t), q.init(e, t);
|
|
3006
3005
|
});
|
|
3007
3006
|
function Zu(e) {
|
|
3008
|
-
return
|
|
3007
|
+
return jc(Ru, e);
|
|
3009
3008
|
}
|
|
3010
|
-
const
|
|
3009
|
+
const Du = /* @__PURE__ */ S("ZodNull", (e, t) => {
|
|
3011
3010
|
Bl.init(e, t), q.init(e, t);
|
|
3012
3011
|
});
|
|
3013
|
-
function
|
|
3014
|
-
return Fc(
|
|
3012
|
+
function ju(e) {
|
|
3013
|
+
return Fc(Du, e);
|
|
3015
3014
|
}
|
|
3016
3015
|
const Fu = /* @__PURE__ */ S("ZodUnknown", (e, t) => {
|
|
3017
3016
|
Vl.init(e, t), q.init(e, t);
|
|
@@ -3028,11 +3027,11 @@ function Za(e) {
|
|
|
3028
3027
|
const Uu = /* @__PURE__ */ S("ZodArray", (e, t) => {
|
|
3029
3028
|
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;
|
|
3030
3029
|
});
|
|
3031
|
-
function
|
|
3032
|
-
return
|
|
3030
|
+
function Da(e, t) {
|
|
3031
|
+
return Qc(Uu, e, t);
|
|
3033
3032
|
}
|
|
3034
|
-
const
|
|
3035
|
-
Kl.init(e, t), q.init(e, t),
|
|
3033
|
+
const ja = /* @__PURE__ */ S("ZodObject", (e, t) => {
|
|
3034
|
+
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]);
|
|
3036
3035
|
});
|
|
3037
3036
|
function Bu(e, t) {
|
|
3038
3037
|
const r = {
|
|
@@ -3042,10 +3041,10 @@ function Bu(e, t) {
|
|
|
3042
3041
|
},
|
|
3043
3042
|
...$(t)
|
|
3044
3043
|
};
|
|
3045
|
-
return new
|
|
3044
|
+
return new ja(r);
|
|
3046
3045
|
}
|
|
3047
3046
|
function Vu(e, t) {
|
|
3048
|
-
return new
|
|
3047
|
+
return new ja({
|
|
3049
3048
|
type: "object",
|
|
3050
3049
|
get shape() {
|
|
3051
3050
|
return Rt(this, "shape", { ...e }), this.shape;
|
|
@@ -3136,7 +3135,7 @@ function Ua(e, t) {
|
|
|
3136
3135
|
});
|
|
3137
3136
|
}
|
|
3138
3137
|
const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
3139
|
-
|
|
3138
|
+
Xl.init(e, t), q.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3140
3139
|
get() {
|
|
3141
3140
|
if (t.values.length > 1)
|
|
3142
3141
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3144,15 +3143,15 @@ const Yu = /* @__PURE__ */ S("ZodLiteral", (e, t) => {
|
|
|
3144
3143
|
}
|
|
3145
3144
|
});
|
|
3146
3145
|
});
|
|
3147
|
-
function
|
|
3146
|
+
function Xu(e, t) {
|
|
3148
3147
|
return new Yu({
|
|
3149
3148
|
type: "literal",
|
|
3150
3149
|
values: Array.isArray(e) ? e : [e],
|
|
3151
3150
|
...$(t)
|
|
3152
3151
|
});
|
|
3153
3152
|
}
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3153
|
+
const Qu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
3154
|
+
Ql.init(e, t), q.init(e, t), e._zod.parse = (r, n) => {
|
|
3156
3155
|
r.addIssue = (s) => {
|
|
3157
3156
|
if (typeof s == "string")
|
|
3158
3157
|
r.issues.push(dt(s, r.value, t));
|
|
@@ -3166,7 +3165,7 @@ const Xu = /* @__PURE__ */ S("ZodTransform", (e, t) => {
|
|
|
3166
3165
|
};
|
|
3167
3166
|
});
|
|
3168
3167
|
function ed(e) {
|
|
3169
|
-
return new
|
|
3168
|
+
return new Qu({
|
|
3170
3169
|
type: "transform",
|
|
3171
3170
|
transform: e
|
|
3172
3171
|
});
|
|
@@ -3686,8 +3685,8 @@ function Zd(e) {
|
|
|
3686
3685
|
enum: Array.from(e.values)
|
|
3687
3686
|
};
|
|
3688
3687
|
}
|
|
3689
|
-
const
|
|
3690
|
-
function
|
|
3688
|
+
const Dd = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
|
|
3689
|
+
function jd(e, t) {
|
|
3691
3690
|
const r = [F(e.left._def, {
|
|
3692
3691
|
...t,
|
|
3693
3692
|
currentPath: [
|
|
@@ -3704,7 +3703,7 @@ function Dd(e, t) {
|
|
|
3704
3703
|
]
|
|
3705
3704
|
})].filter((a) => !!a), n = [];
|
|
3706
3705
|
return r.forEach((a) => {
|
|
3707
|
-
if (
|
|
3706
|
+
if (Dd(a)) n.push(...a.allOf);
|
|
3708
3707
|
else {
|
|
3709
3708
|
let s = a;
|
|
3710
3709
|
if ("additionalProperties" in a && a.additionalProperties === !1) {
|
|
@@ -4105,7 +4104,7 @@ function Yd(e, t) {
|
|
|
4105
4104
|
for (const o in a) {
|
|
4106
4105
|
let c = a[o];
|
|
4107
4106
|
if (c === void 0 || c._def === void 0) continue;
|
|
4108
|
-
const f =
|
|
4107
|
+
const f = Qd(c), i = F(c._def, {
|
|
4109
4108
|
...t,
|
|
4110
4109
|
currentPath: [
|
|
4111
4110
|
...t.currentPath,
|
|
@@ -4121,10 +4120,10 @@ function Yd(e, t) {
|
|
|
4121
4120
|
i !== void 0 && (r.properties[o] = i, f || n.push(o));
|
|
4122
4121
|
}
|
|
4123
4122
|
n.length && (r.required = n);
|
|
4124
|
-
const s =
|
|
4123
|
+
const s = Xd(e, t);
|
|
4125
4124
|
return s !== void 0 && (r.additionalProperties = s), r;
|
|
4126
4125
|
}
|
|
4127
|
-
function
|
|
4126
|
+
function Xd(e, t) {
|
|
4128
4127
|
if (e.catchall._def.typeName !== "ZodNever") return F(e.catchall._def, {
|
|
4129
4128
|
...t,
|
|
4130
4129
|
currentPath: [...t.currentPath, "additionalProperties"]
|
|
@@ -4138,7 +4137,7 @@ function Qd(e, t) {
|
|
|
4138
4137
|
return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4139
4138
|
}
|
|
4140
4139
|
}
|
|
4141
|
-
function
|
|
4140
|
+
function Qd(e) {
|
|
4142
4141
|
try {
|
|
4143
4142
|
return e.isOptional();
|
|
4144
4143
|
} catch {
|
|
@@ -4251,7 +4250,7 @@ const ip = (e, t) => F(e.innerType._def, t), lp = (e, t, r) => {
|
|
|
4251
4250
|
case "ZodDiscriminatedUnion":
|
|
4252
4251
|
return Kd(e, r);
|
|
4253
4252
|
case "ZodIntersection":
|
|
4254
|
-
return
|
|
4253
|
+
return jd(e, r);
|
|
4255
4254
|
case "ZodTuple":
|
|
4256
4255
|
return ap(e, r);
|
|
4257
4256
|
case "ZodRecord":
|
|
@@ -4402,7 +4401,7 @@ function mp(e) {
|
|
|
4402
4401
|
let t;
|
|
4403
4402
|
return () => (t == null && (t = e()), t);
|
|
4404
4403
|
}
|
|
4405
|
-
function
|
|
4404
|
+
function jt(e, { validate: t } = {}) {
|
|
4406
4405
|
return {
|
|
4407
4406
|
[sr]: !0,
|
|
4408
4407
|
_type: void 0,
|
|
@@ -4416,14 +4415,14 @@ function hp(e) {
|
|
|
4416
4415
|
return typeof e == "object" && e !== null && sr in e && e[sr] === !0 && "jsonSchema" in e && "validate" in e;
|
|
4417
4416
|
}
|
|
4418
4417
|
function gp(e) {
|
|
4419
|
-
return e == null ?
|
|
4418
|
+
return e == null ? jt({
|
|
4420
4419
|
type: "object",
|
|
4421
4420
|
properties: {},
|
|
4422
4421
|
additionalProperties: !1
|
|
4423
4422
|
}) : hp(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Ga(e) : bp(e) : e();
|
|
4424
4423
|
}
|
|
4425
4424
|
function bp(e) {
|
|
4426
|
-
return
|
|
4425
|
+
return jt(() => {
|
|
4427
4426
|
if (!vp(e)) throw new Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
|
|
4428
4427
|
return yr(e["~standard"].jsonSchema.input({ target: "draft-07" }));
|
|
4429
4428
|
}, { validate: async (t) => {
|
|
@@ -4444,7 +4443,7 @@ function vp(e) {
|
|
|
4444
4443
|
return e["~standard"].jsonSchema != null;
|
|
4445
4444
|
}
|
|
4446
4445
|
function yp(e, t) {
|
|
4447
|
-
return
|
|
4446
|
+
return jt(() => fp(e, { $refStrategy: "none" }), { validate: async (r) => {
|
|
4448
4447
|
const n = await e.safeParseAsync(r);
|
|
4449
4448
|
return n.success ? {
|
|
4450
4449
|
success: !0,
|
|
@@ -4456,7 +4455,7 @@ function yp(e, t) {
|
|
|
4456
4455
|
} });
|
|
4457
4456
|
}
|
|
4458
4457
|
function xp(e, t) {
|
|
4459
|
-
return
|
|
4458
|
+
return jt(() => yr(ru(e, {
|
|
4460
4459
|
target: "draft-7",
|
|
4461
4460
|
io: "input",
|
|
4462
4461
|
reused: "inline"
|
|
@@ -4558,7 +4557,7 @@ async function He(e) {
|
|
|
4558
4557
|
return typeof e == "function" && (e = e()), e;
|
|
4559
4558
|
}
|
|
4560
4559
|
new TextDecoder();
|
|
4561
|
-
const Ya = "AI_InvalidArgumentError",
|
|
4560
|
+
const Ya = "AI_InvalidArgumentError", Xa = `vercel.ai.error.${Ya}`, Ip = Symbol.for(Xa);
|
|
4562
4561
|
var Et = class extends re {
|
|
4563
4562
|
constructor({ parameter: e, value: t, message: r }) {
|
|
4564
4563
|
super({
|
|
@@ -4567,14 +4566,14 @@ var Et = class extends re {
|
|
|
4567
4566
|
}), this[Ip] = !0, this.parameter = e, this.value = t;
|
|
4568
4567
|
}
|
|
4569
4568
|
static isInstance(e) {
|
|
4570
|
-
return re.hasMarker(e,
|
|
4569
|
+
return re.hasMarker(e, Xa);
|
|
4571
4570
|
}
|
|
4572
4571
|
};
|
|
4573
|
-
const
|
|
4572
|
+
const Qa = "AI_UIMessageStreamError", es = `vercel.ai.error.${Qa}`, Sp = Symbol.for(es);
|
|
4574
4573
|
var Me = class extends re {
|
|
4575
4574
|
constructor({ chunkType: e, chunkId: t, message: r }) {
|
|
4576
4575
|
super({
|
|
4577
|
-
name:
|
|
4576
|
+
name: Qa,
|
|
4578
4577
|
message: r
|
|
4579
4578
|
}), this[Sp] = !0, this.chunkType = e, this.chunkId = t;
|
|
4580
4579
|
}
|
|
@@ -4597,17 +4596,17 @@ function ts(e, t) {
|
|
|
4597
4596
|
return r;
|
|
4598
4597
|
}
|
|
4599
4598
|
const l = {
|
|
4600
|
-
array:
|
|
4599
|
+
array: Da,
|
|
4601
4600
|
boolean: Zu,
|
|
4602
4601
|
custom: hd,
|
|
4603
4602
|
discriminatedUnion: Ju,
|
|
4604
4603
|
enum: Ua,
|
|
4605
4604
|
instanceof: vd,
|
|
4606
4605
|
lazy: fd,
|
|
4607
|
-
literal:
|
|
4606
|
+
literal: Xu,
|
|
4608
4607
|
looseObject: Vu,
|
|
4609
4608
|
never: Za,
|
|
4610
|
-
null:
|
|
4609
|
+
null: ju,
|
|
4611
4610
|
number: Mu,
|
|
4612
4611
|
object: Bu,
|
|
4613
4612
|
record: Hu,
|
|
@@ -4843,7 +4842,7 @@ l.union([
|
|
|
4843
4842
|
Rp,
|
|
4844
4843
|
Zp
|
|
4845
4844
|
]);
|
|
4846
|
-
function
|
|
4845
|
+
function Dp(e) {
|
|
4847
4846
|
const t = ["ROOT"];
|
|
4848
4847
|
let r = -1, n = null, a = 0;
|
|
4849
4848
|
function s(g) {
|
|
@@ -5044,7 +5043,7 @@ function jp(e) {
|
|
|
5044
5043
|
}
|
|
5045
5044
|
return i;
|
|
5046
5045
|
}
|
|
5047
|
-
async function
|
|
5046
|
+
async function jp(e) {
|
|
5048
5047
|
if (e === void 0) return {
|
|
5049
5048
|
value: void 0,
|
|
5050
5049
|
state: "undefined-input"
|
|
@@ -5053,7 +5052,7 @@ async function Dp(e) {
|
|
|
5053
5052
|
return t.success ? {
|
|
5054
5053
|
value: t.value,
|
|
5055
5054
|
state: "successful-parse"
|
|
5056
|
-
} : (t = await or({ text:
|
|
5055
|
+
} : (t = await or({ text: Dp(e) }), t.success ? {
|
|
5057
5056
|
value: t.value,
|
|
5058
5057
|
state: "repaired-parse"
|
|
5059
5058
|
} : {
|
|
@@ -5560,7 +5559,7 @@ function Bp({ stream: e, messageMetadataSchema: t, dataPartSchemas: r, runUpdate
|
|
|
5560
5559
|
message: `Received tool-input-delta for missing tool call with ID "${i.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
|
|
5561
5560
|
});
|
|
5562
5561
|
d.text += i.inputTextDelta;
|
|
5563
|
-
const { value: v } = await
|
|
5562
|
+
const { value: v } = await jp(d.text);
|
|
5564
5563
|
d.dynamic ? y({
|
|
5565
5564
|
toolCallId: i.toolCallId,
|
|
5566
5565
|
toolName: d.toolName,
|
|
@@ -6402,26 +6401,26 @@ function Yp(e, t) {
|
|
|
6402
6401
|
}, f);
|
|
6403
6402
|
};
|
|
6404
6403
|
}
|
|
6405
|
-
var
|
|
6406
|
-
const
|
|
6404
|
+
var Xp = Yp;
|
|
6405
|
+
const Qp = /* @__PURE__ */ ho(Xp);
|
|
6407
6406
|
function ef(e, t) {
|
|
6408
|
-
return t != null ?
|
|
6407
|
+
return t != null ? Qp(e, t) : e;
|
|
6409
6408
|
}
|
|
6410
6409
|
function tf(e) {
|
|
6411
6410
|
return Array.isArray(e) ? [...e] : e != null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null) ? { ...e } : e;
|
|
6412
6411
|
}
|
|
6413
|
-
var ce,
|
|
6412
|
+
var ce, Xe, Qe, Ze, De, je, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
6414
6413
|
constructor(e = []) {
|
|
6415
6414
|
me(this, ce);
|
|
6416
|
-
me(this, Qe);
|
|
6417
6415
|
me(this, Xe);
|
|
6416
|
+
me(this, Qe);
|
|
6418
6417
|
me(this, Ze);
|
|
6419
|
-
me(this, je);
|
|
6420
6418
|
me(this, De);
|
|
6419
|
+
me(this, je);
|
|
6421
6420
|
me(this, Ne);
|
|
6422
6421
|
me(this, pt);
|
|
6423
6422
|
me(this, ft);
|
|
6424
|
-
ee(this,
|
|
6423
|
+
ee(this, Xe, "ready"), ee(this, Qe, void 0), ee(this, Ze, /* @__PURE__ */ new Set()), ee(this, De, /* @__PURE__ */ new Set()), ee(this, je, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
|
|
6425
6424
|
ee(this, ce, L(this, ce).concat(t)), L(this, Ne).call(this);
|
|
6426
6425
|
}, this.popMessage = () => {
|
|
6427
6426
|
ee(this, ce, L(this, ce).slice(0, -1)), L(this, Ne).call(this);
|
|
@@ -6443,29 +6442,29 @@ var ce, Qe, Xe, Ze, je, De, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6443
6442
|
return L(this, Ze).add(n), () => {
|
|
6444
6443
|
L(this, Ze).delete(n);
|
|
6445
6444
|
};
|
|
6446
|
-
}, this["~registerStatusCallback"] = (t) => (L(this,
|
|
6447
|
-
L(this, je).delete(t);
|
|
6448
|
-
}), this["~registerErrorCallback"] = (t) => (L(this, De).add(t), () => {
|
|
6445
|
+
}, this["~registerStatusCallback"] = (t) => (L(this, De).add(t), () => {
|
|
6449
6446
|
L(this, De).delete(t);
|
|
6447
|
+
}), this["~registerErrorCallback"] = (t) => (L(this, je).add(t), () => {
|
|
6448
|
+
L(this, je).delete(t);
|
|
6450
6449
|
}), ee(this, Ne, () => {
|
|
6451
6450
|
L(this, Ze).forEach((t) => t());
|
|
6452
6451
|
}), ee(this, pt, () => {
|
|
6453
|
-
L(this, je).forEach((t) => t());
|
|
6454
|
-
}), ee(this, ft, () => {
|
|
6455
6452
|
L(this, De).forEach((t) => t());
|
|
6453
|
+
}), ee(this, ft, () => {
|
|
6454
|
+
L(this, je).forEach((t) => t());
|
|
6456
6455
|
}), ee(this, ce, e);
|
|
6457
6456
|
}
|
|
6458
6457
|
get status() {
|
|
6459
|
-
return L(this,
|
|
6458
|
+
return L(this, Xe);
|
|
6460
6459
|
}
|
|
6461
6460
|
set status(e) {
|
|
6462
|
-
ee(this,
|
|
6461
|
+
ee(this, Xe, e), L(this, pt).call(this);
|
|
6463
6462
|
}
|
|
6464
6463
|
get error() {
|
|
6465
|
-
return L(this,
|
|
6464
|
+
return L(this, Qe);
|
|
6466
6465
|
}
|
|
6467
6466
|
set error(e) {
|
|
6468
|
-
ee(this,
|
|
6467
|
+
ee(this, Qe, e), L(this, ft).call(this);
|
|
6469
6468
|
}
|
|
6470
6469
|
get messages() {
|
|
6471
6470
|
return L(this, ce);
|
|
@@ -6473,7 +6472,7 @@ var ce, Qe, Xe, Ze, je, De, Ne, pt, ft, Tn, rf = (Tn = class {
|
|
|
6473
6472
|
set messages(e) {
|
|
6474
6473
|
ee(this, ce, [...e]), L(this, Ne).call(this);
|
|
6475
6474
|
}
|
|
6476
|
-
}, ce = new WeakMap(),
|
|
6475
|
+
}, ce = new WeakMap(), Xe = new WeakMap(), Qe = 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 {
|
|
6477
6476
|
constructor({ messages: t, ...r }) {
|
|
6478
6477
|
const n = new rf(t);
|
|
6479
6478
|
super({
|
|
@@ -6551,7 +6550,7 @@ function af({ throttle: e, experimental_throttle: t, resume: r = !1, ...n } = {}
|
|
|
6551
6550
|
u.stop();
|
|
6552
6551
|
};
|
|
6553
6552
|
}, [u, m]);
|
|
6554
|
-
const [w, I] =
|
|
6553
|
+
const [w, I] = j(() => Nt(u));
|
|
6555
6554
|
w.chat !== u && I(Nt(u)), ke(() => {
|
|
6556
6555
|
let h = !0;
|
|
6557
6556
|
const d = () => {
|
|
@@ -6659,7 +6658,7 @@ function hf(e) {
|
|
|
6659
6658
|
Ue(() => {
|
|
6660
6659
|
t.current = e;
|
|
6661
6660
|
});
|
|
6662
|
-
const r = ie(void 0), [n, a] =
|
|
6661
|
+
const r = ie(void 0), [n, a] = j({}), [s, o] = j({}), [c, f] = j({ chatId: "", count: 0 }), [i, g] = j(), [u] = j(() => {
|
|
6663
6662
|
const R = (C, M) => {
|
|
6664
6663
|
C.pendingApplies += M, r.current === C && f({ chatId: C.chat.id, count: C.pendingApplies });
|
|
6665
6664
|
};
|
|
@@ -6684,12 +6683,12 @@ function hf(e) {
|
|
|
6684
6683
|
const Z = t.current.applyProposal;
|
|
6685
6684
|
if (r.current !== C || !Z) return;
|
|
6686
6685
|
const de = C.proposals.has(M.proposalId), pe = C.proposals.get(M.proposalId) ?? null;
|
|
6687
|
-
R(C, 1), a((
|
|
6688
|
-
const
|
|
6686
|
+
R(C, 1), a((X) => Pe(X, C.chat.id, M.proposalId, { status: "applying" })), C.applying = C.applying.then(async () => {
|
|
6687
|
+
const X = 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 };
|
|
6689
6688
|
let ae;
|
|
6690
6689
|
try {
|
|
6691
|
-
ae =
|
|
6692
|
-
{ proposalId: M.proposalId, operations: M.operations, context: M.context, basedOn:
|
|
6690
|
+
ae = X ? await Z(
|
|
6691
|
+
{ proposalId: M.proposalId, operations: M.operations, context: M.context, basedOn: X },
|
|
6693
6692
|
{ stillWanted: () => r.current === C }
|
|
6694
6693
|
) : fe;
|
|
6695
6694
|
} catch (Ie) {
|
|
@@ -6701,13 +6700,13 @@ function hf(e) {
|
|
|
6701
6700
|
}).finally(() => R(C, -1));
|
|
6702
6701
|
}
|
|
6703
6702
|
};
|
|
6704
|
-
}), [m, w] =
|
|
6703
|
+
}), [m, w] = j(() => Ht(u));
|
|
6705
6704
|
Ue(() => (r.current = m, () => {
|
|
6706
6705
|
r.current === m && (r.current = void 0);
|
|
6707
6706
|
}), [m]);
|
|
6708
6707
|
const { messages: I, status: E, error: _ } = af({ chat: m.chat });
|
|
6709
6708
|
ke(() => () => void m.chat.stop(), [m]);
|
|
6710
|
-
const [x, y] =
|
|
6709
|
+
const [x, y] = j(), [h, d] = j([]), v = ie(void 0), [b, N] = j(!1);
|
|
6711
6710
|
ke(() => () => {
|
|
6712
6711
|
var R;
|
|
6713
6712
|
return (R = v.current) == null ? void 0 : R.abort();
|
|
@@ -6735,15 +6734,15 @@ function hf(e) {
|
|
|
6735
6734
|
...Z.cardReplay ?? {},
|
|
6736
6735
|
...C.length ? { taggedFields: C } : {}
|
|
6737
6736
|
};
|
|
6738
|
-
if (
|
|
6739
|
-
return y(new qn(
|
|
6737
|
+
if (Qt({ ...de, message: M }) > et.requestBytes)
|
|
6738
|
+
return y(new qn(Qt(de)).message), "not_sent";
|
|
6740
6739
|
y(void 0);
|
|
6741
6740
|
const pe = (fe = Z.context.selectedCard) == null ? void 0 : fe.id;
|
|
6742
6741
|
pe && (m.aboutCardId = pe);
|
|
6743
|
-
const
|
|
6744
|
-
return m.answerBase =
|
|
6742
|
+
const X = gf(Z.context, (($e = (ae = t.current).canChangeOpenDashboard) == null ? void 0 : $e.call(ae)) ?? !1);
|
|
6743
|
+
return m.answerBase = X, m.proposals.clear(), m.appliedAfter.clear(), m.chat.sendMessage(
|
|
6745
6744
|
{ text: M, ...C.length ? { metadata: { taggedFields: C } } : {} },
|
|
6746
|
-
{ body:
|
|
6745
|
+
{ body: X ? { ...de, openDashboard: X } : de }
|
|
6747
6746
|
), "sent";
|
|
6748
6747
|
},
|
|
6749
6748
|
[m, h]
|
|
@@ -6756,7 +6755,7 @@ function hf(e) {
|
|
|
6756
6755
|
[m, O]
|
|
6757
6756
|
), Y = te(
|
|
6758
6757
|
(R) => {
|
|
6759
|
-
const C =
|
|
6758
|
+
const C = Q.getState().actions.undoProposal(R);
|
|
6760
6759
|
return C.ok && a((M) => Pe(M, m.chat.id, R, { status: "undone" })), C.ok;
|
|
6761
6760
|
},
|
|
6762
6761
|
[m]
|
|
@@ -6765,9 +6764,9 @@ function hf(e) {
|
|
|
6765
6764
|
var pe;
|
|
6766
6765
|
const C = m.chat.id, M = (pe = s[C]) == null ? void 0 : pe[R];
|
|
6767
6766
|
if ((M == null ? void 0 : M.status) !== "offered") return;
|
|
6768
|
-
o((
|
|
6769
|
-
const Z = await cf(u.connection(), R).catch((
|
|
6770
|
-
o((
|
|
6767
|
+
o((X) => Pe(X, C, R, { status: "adding" }));
|
|
6768
|
+
const Z = await cf(u.connection(), R).catch((X) => (console.warn("The relationship could not be added:", X), { ok: !1, code: void 0 })), de = Z.ok ? { status: "added" } : { status: "refused", message: ko(Z.code) };
|
|
6769
|
+
o((X) => Pe(X, C, R, de));
|
|
6771
6770
|
},
|
|
6772
6771
|
[m, u, s]
|
|
6773
6772
|
), We = te(
|
|
@@ -6848,9 +6847,9 @@ function hf(e) {
|
|
|
6848
6847
|
function gf(e, t) {
|
|
6849
6848
|
var n;
|
|
6850
6849
|
if (!t || e.surface !== "dashboard") return;
|
|
6851
|
-
const r =
|
|
6850
|
+
const r = Q.getState().dashboard;
|
|
6852
6851
|
if (!(!(r != null && r.id) || r.id !== ((n = e.dashboard) == null ? void 0 : n.id)))
|
|
6853
|
-
return
|
|
6852
|
+
return Qt(r) <= et.openDashboardBytes ? r : void 0;
|
|
6854
6853
|
}
|
|
6855
6854
|
function Ht(e, t) {
|
|
6856
6855
|
const r = {
|
|
@@ -7028,7 +7027,7 @@ function kr({
|
|
|
7028
7027
|
testId: r,
|
|
7029
7028
|
chevron: n = !0
|
|
7030
7029
|
}) {
|
|
7031
|
-
const [a, s] =
|
|
7030
|
+
const [a, s] = j(!1);
|
|
7032
7031
|
return /* @__PURE__ */ k("div", { className: "space-y-1.5", "data-testid": r, children: [
|
|
7033
7032
|
/* @__PURE__ */ k(
|
|
7034
7033
|
"button",
|
|
@@ -7038,7 +7037,7 @@ function kr({
|
|
|
7038
7037
|
onClick: () => s((o) => !o),
|
|
7039
7038
|
className: "inline-flex items-center gap-1 text-[11.5px] text-muted-foreground hover:text-foreground",
|
|
7040
7039
|
children: [
|
|
7041
|
-
n ? /* @__PURE__ */ p(
|
|
7040
|
+
n ? /* @__PURE__ */ p(Ds, { className: B("h-3 w-3 transition-transform", a && "rotate-90") }) : null,
|
|
7042
7041
|
e
|
|
7043
7042
|
]
|
|
7044
7043
|
}
|
|
@@ -7073,8 +7072,8 @@ function Tf({
|
|
|
7073
7072
|
] });
|
|
7074
7073
|
}
|
|
7075
7074
|
function Af(e, t, r) {
|
|
7076
|
-
const [n, a] =
|
|
7077
|
-
(c) => n.status === "added" ?
|
|
7075
|
+
const [n, a] = j({ status: "idle" }), s = Q(
|
|
7076
|
+
(c) => n.status === "added" ? Xn(c.dashboard, n.frameId) : !1
|
|
7078
7077
|
);
|
|
7079
7078
|
if (!r || !e.card) return { action: null, note: null };
|
|
7080
7079
|
if (n.status === "added" && s)
|
|
@@ -7122,7 +7121,7 @@ function Cf(e, t) {
|
|
|
7122
7121
|
return r.length ? /* @__PURE__ */ p("p", { role: "status", className: "text-[11.5px] text-muted-foreground", children: r.join(" ") }) : null;
|
|
7123
7122
|
}
|
|
7124
7123
|
function $f({ artifact: e, onClose: t }) {
|
|
7125
|
-
const { kind: r, setKind: n, visual: a, chart: s, shown: o } = ms(e, "table"), [c, f] =
|
|
7124
|
+
const { kind: r, setKind: n, visual: a, chart: s, shown: o } = ms(e, "table"), [c, f] = j(), i = it(() => Mf(e.records, c), [e.records, c]);
|
|
7126
7125
|
return /* @__PURE__ */ k(
|
|
7127
7126
|
"section",
|
|
7128
7127
|
{
|
|
@@ -7169,7 +7168,7 @@ function $f({ artifact: e, onClose: t }) {
|
|
|
7169
7168
|
);
|
|
7170
7169
|
}
|
|
7171
7170
|
function ms(e, t) {
|
|
7172
|
-
const [r, n] =
|
|
7171
|
+
const [r, n] = j(t), a = it(() => Of(e, r), [e, r]), s = Q(js((i) => ({ themeStyle: i.themeStyle, theme: i.theme }))), o = Sr(), c = it(
|
|
7173
7172
|
() => If(e, a, o, s),
|
|
7174
7173
|
[e, a, o, s]
|
|
7175
7174
|
), f = a.kind === "table" || a.kind !== "number" && !c ? "table" : a.kind;
|
|
@@ -7323,24 +7322,24 @@ function Zf({ trace: e, stages: t }) {
|
|
|
7323
7322
|
we(r("check"))
|
|
7324
7323
|
] }),
|
|
7325
7324
|
/* @__PURE__ */ k("p", { children: [
|
|
7326
|
-
|
|
7325
|
+
Xt(n),
|
|
7327
7326
|
" tokens in (",
|
|
7328
|
-
|
|
7327
|
+
Xt(a),
|
|
7329
7328
|
" cached) · ",
|
|
7330
|
-
|
|
7329
|
+
Xt(s),
|
|
7331
7330
|
" out · ",
|
|
7332
7331
|
e.model
|
|
7333
7332
|
] })
|
|
7334
7333
|
] }),
|
|
7335
|
-
/* @__PURE__ */ p(kr, { label: "Timeline", children: /* @__PURE__ */ p(
|
|
7334
|
+
/* @__PURE__ */ p(kr, { label: "Timeline", children: /* @__PURE__ */ p(jf, { trace: e, stages: t }) })
|
|
7336
7335
|
] });
|
|
7337
7336
|
}
|
|
7338
|
-
const
|
|
7337
|
+
const Df = {
|
|
7339
7338
|
check: "bg-amber-400/80",
|
|
7340
7339
|
model: "bg-primary/70",
|
|
7341
7340
|
step: "bg-muted-foreground/50"
|
|
7342
7341
|
};
|
|
7343
|
-
function
|
|
7342
|
+
function jf({ trace: e, stages: t }) {
|
|
7344
7343
|
const r = new Map(t.map((s) => [s.stageId, s.label])), n = Math.max(e.totalMs, 1), a = e.spans.flatMap(
|
|
7345
7344
|
(s) => s.kind === "model" && s.firstOutputMs !== void 0 ? [s.firstOutputMs] : []
|
|
7346
7345
|
);
|
|
@@ -7350,7 +7349,7 @@ function Df({ trace: e, stages: t }) {
|
|
|
7350
7349
|
/* @__PURE__ */ p("span", { className: "relative h-2 rounded-[2px] bg-muted", children: /* @__PURE__ */ p(
|
|
7351
7350
|
"span",
|
|
7352
7351
|
{
|
|
7353
|
-
className: B("absolute top-0 h-2 rounded-[2px]",
|
|
7352
|
+
className: B("absolute top-0 h-2 rounded-[2px]", Df[s.kind]),
|
|
7354
7353
|
style: {
|
|
7355
7354
|
left: `${s.startMs / n * 100}%`,
|
|
7356
7355
|
width: `${Math.max(s.durationMs / n * 100, 0.8)}%`
|
|
@@ -7366,7 +7365,7 @@ function Df({ trace: e, stages: t }) {
|
|
|
7366
7365
|
] })
|
|
7367
7366
|
] });
|
|
7368
7367
|
}
|
|
7369
|
-
function
|
|
7368
|
+
function Xt(e) {
|
|
7370
7369
|
return e.toLocaleString("en-US");
|
|
7371
7370
|
}
|
|
7372
7371
|
function vt({
|
|
@@ -7430,7 +7429,7 @@ function Lf({
|
|
|
7430
7429
|
options: r,
|
|
7431
7430
|
onPick: n
|
|
7432
7431
|
}) {
|
|
7433
|
-
const [a, s] =
|
|
7432
|
+
const [a, s] = j(() => /* @__PURE__ */ new Set()), o = (f) => s((i) => {
|
|
7434
7433
|
const g = new Set(i);
|
|
7435
7434
|
return g.has(f) ? g.delete(f) : g.add(f), g;
|
|
7436
7435
|
}), c = r.filter((f) => a.has(f.optionId));
|
|
@@ -7505,7 +7504,7 @@ function Uf(e) {
|
|
|
7505
7504
|
`);
|
|
7506
7505
|
}
|
|
7507
7506
|
function xs({ onPick: e }) {
|
|
7508
|
-
const [t, r] =
|
|
7507
|
+
const [t, r] = j(), n = ie(null);
|
|
7509
7508
|
if (t === void 0)
|
|
7510
7509
|
return /* @__PURE__ */ k(
|
|
7511
7510
|
"button",
|
|
@@ -7614,7 +7613,7 @@ function qf({
|
|
|
7614
7613
|
onUndo: r,
|
|
7615
7614
|
onAskAgain: n
|
|
7616
7615
|
}) {
|
|
7617
|
-
const a =
|
|
7616
|
+
const a = Q((g) => Bs(g, e.proposalId)), s = Q((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;
|
|
7618
7617
|
return /* @__PURE__ */ k(
|
|
7619
7618
|
vt,
|
|
7620
7619
|
{
|
|
@@ -7653,13 +7652,13 @@ function qf({
|
|
|
7653
7652
|
] }, u);
|
|
7654
7653
|
}) }),
|
|
7655
7654
|
f && e.warnings.length ? /* @__PURE__ */ p("ul", { className: "space-y-1", children: e.warnings.map((g, u) => /* @__PURE__ */ k("li", { className: "flex items-start gap-1.5 text-[11.5px] leading-[1.5] text-muted-foreground", children: [
|
|
7656
|
-
/* @__PURE__ */ p(
|
|
7655
|
+
/* @__PURE__ */ p(Fn, { className: "mt-[2px] h-3 w-3 shrink-0" }),
|
|
7657
7656
|
/* @__PURE__ */ p("span", { children: g.message })
|
|
7658
7657
|
] }, u)) }) : null,
|
|
7659
7658
|
i ? /* @__PURE__ */ k("div", { className: "flex flex-wrap items-center justify-between gap-2 border-t border-border pt-2", children: [
|
|
7660
7659
|
/* @__PURE__ */ p("span", { className: "text-[11.5px] leading-[1.5] text-muted-foreground", children: i }),
|
|
7661
7660
|
o.kind === "refused" && n ? /* @__PURE__ */ k(H, { variant: "outline", size: "xs", className: "h-[26px] gap-1 px-2 text-[11.5px]", onClick: n, children: [
|
|
7662
|
-
/* @__PURE__ */ p(
|
|
7661
|
+
/* @__PURE__ */ p(Ln, { className: "h-3 w-3" }),
|
|
7663
7662
|
"Ask again"
|
|
7664
7663
|
] }) : null
|
|
7665
7664
|
] }) : null
|
|
@@ -7710,7 +7709,7 @@ function Kf({
|
|
|
7710
7709
|
)
|
|
7711
7710
|
] }, i)) }),
|
|
7712
7711
|
o && e.warnings.length ? /* @__PURE__ */ p("ul", { className: "space-y-1", children: e.warnings.map((f, i) => /* @__PURE__ */ k("li", { className: "flex items-start gap-1.5 text-[11.5px] leading-[1.5] text-muted-foreground", children: [
|
|
7713
|
-
/* @__PURE__ */ p(
|
|
7712
|
+
/* @__PURE__ */ p(Fn, { className: "mt-[2px] h-3 w-3 shrink-0" }),
|
|
7714
7713
|
/* @__PURE__ */ p("span", { children: f.message })
|
|
7715
7714
|
] }, i)) }) : null,
|
|
7716
7715
|
o ? /* @__PURE__ */ k(Le, { children: [
|
|
@@ -7746,7 +7745,7 @@ function Kf({
|
|
|
7746
7745
|
c ? /* @__PURE__ */ k("div", { className: "flex flex-wrap items-center justify-between gap-2 border-t border-border pt-2", children: [
|
|
7747
7746
|
/* @__PURE__ */ p("span", { className: "text-[11.5px] leading-[1.5] text-muted-foreground", children: c }),
|
|
7748
7747
|
(s === "added" || s === "refused") && a ? /* @__PURE__ */ k(H, { variant: "outline", size: "xs", className: "h-[26px] gap-1 px-2 text-[11.5px]", onClick: a, children: [
|
|
7749
|
-
/* @__PURE__ */ p(
|
|
7748
|
+
/* @__PURE__ */ p(Ln, { className: "h-3 w-3" }),
|
|
7750
7749
|
"Ask again"
|
|
7751
7750
|
] }) : null
|
|
7752
7751
|
] }) : null
|
|
@@ -7782,9 +7781,9 @@ function Yf({
|
|
|
7782
7781
|
onAdd: a,
|
|
7783
7782
|
onPick: s,
|
|
7784
7783
|
onAskAgain: o,
|
|
7785
|
-
proposalStates: c =
|
|
7784
|
+
proposalStates: c = Xf,
|
|
7786
7785
|
onUndoProposal: f,
|
|
7787
|
-
modelChangeStates: i =
|
|
7786
|
+
modelChangeStates: i = Qf,
|
|
7788
7787
|
onAddModelChange: g,
|
|
7789
7788
|
onDismissModelChange: u
|
|
7790
7789
|
}) {
|
|
@@ -7816,7 +7815,7 @@ function Yf({
|
|
|
7816
7815
|
r ? /* @__PURE__ */ p("p", { role: "alert", className: "text-[12.5px] leading-[1.6] text-destructive", children: r }) : null
|
|
7817
7816
|
] });
|
|
7818
7817
|
}
|
|
7819
|
-
const
|
|
7818
|
+
const Xf = {}, Qf = {};
|
|
7820
7819
|
function em(e) {
|
|
7821
7820
|
return e.parts.map((t) => t.type === "text" ? t.text : "").join("");
|
|
7822
7821
|
}
|
|
@@ -7906,12 +7905,12 @@ function im({ items: e, notes: t }) {
|
|
|
7906
7905
|
return /* @__PURE__ */ k("div", { className: "space-y-0.5", "data-testid": "assistant-using", children: [
|
|
7907
7906
|
/* @__PURE__ */ k("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "What this answer used", children: [
|
|
7908
7907
|
n.map((s, o) => /* @__PURE__ */ p(lm, { children: s }, o)),
|
|
7909
|
-
a.length ? /* @__PURE__ */ k(
|
|
7910
|
-
/* @__PURE__ */ p(
|
|
7908
|
+
a.length ? /* @__PURE__ */ k(Un, { children: [
|
|
7909
|
+
/* @__PURE__ */ p(Bn, { asChild: !0, children: /* @__PURE__ */ k("button", { type: "button", "aria-label": `${a.length} more`, className: _s, children: [
|
|
7911
7910
|
"+",
|
|
7912
7911
|
a.length
|
|
7913
7912
|
] }) }),
|
|
7914
|
-
/* @__PURE__ */ p(
|
|
7913
|
+
/* @__PURE__ */ p(Vn, { align: "start", className: "w-auto max-w-[280px] p-2", children: /* @__PURE__ */ p("ul", { className: "space-y-1 text-[12px] text-foreground", children: a.map((s, o) => /* @__PURE__ */ p("li", { className: "break-words", children: s }, o)) }) })
|
|
7915
7914
|
] }) : null
|
|
7916
7915
|
] }),
|
|
7917
7916
|
t.map((s, o) => /* @__PURE__ */ p("p", { className: "text-[11.5px] text-muted-foreground", children: s }, o))
|
|
@@ -8037,7 +8036,7 @@ function gm({
|
|
|
8037
8036
|
canCopy: n,
|
|
8038
8037
|
onCopy: a
|
|
8039
8038
|
}) {
|
|
8040
|
-
const [s, o] =
|
|
8039
|
+
const [s, o] = j(), c = ie(void 0);
|
|
8041
8040
|
ke(() => () => clearTimeout(c.current), []);
|
|
8042
8041
|
const f = (g) => {
|
|
8043
8042
|
a(g === "tool_calls").then(
|
|
@@ -8052,8 +8051,8 @@ function gm({
|
|
|
8052
8051
|
s.ok ? /* @__PURE__ */ p(mt, { className: "h-3 w-3" }) : null,
|
|
8053
8052
|
s.ok ? "Copied" : "Couldn’t copy"
|
|
8054
8053
|
] }) : null,
|
|
8055
|
-
/* @__PURE__ */ k(
|
|
8056
|
-
/* @__PURE__ */ p(
|
|
8054
|
+
/* @__PURE__ */ k(Xs, { children: [
|
|
8055
|
+
/* @__PURE__ */ p(Qs, { asChild: !0, children: /* @__PURE__ */ p(
|
|
8057
8056
|
H,
|
|
8058
8057
|
{
|
|
8059
8058
|
variant: "ghost",
|
|
@@ -8128,7 +8127,7 @@ function vm({
|
|
|
8128
8127
|
staleTime: 0,
|
|
8129
8128
|
// A failed read says so at once, whichever client the host mounted.
|
|
8130
8129
|
retry: !1
|
|
8131
|
-
}), f = Rn(), [i, g] =
|
|
8130
|
+
}), f = Rn(), [i, g] = j(), [u, m] = j(() => /* @__PURE__ */ new Set()), [w, I] = j(), E = (y = c.data) == null ? void 0 : y.filter((h) => !u.has(h.conversationId)), _ = async (h) => {
|
|
8132
8131
|
g(h);
|
|
8133
8132
|
const d = await n(h);
|
|
8134
8133
|
g((v) => v === h ? void 0 : v), d === "not_opened" && cr(f, lr(e));
|
|
@@ -8253,16 +8252,16 @@ function wm({
|
|
|
8253
8252
|
disabled: n,
|
|
8254
8253
|
onAdd: a
|
|
8255
8254
|
}) {
|
|
8256
|
-
const [s, o] =
|
|
8255
|
+
const [s, o] = j(!1), [c, f] = j(""), i = Ns(e, t, s || r.length > 0), g = new Set(r.map(ve)), u = (i.data ?? []).filter((I) => !g.has(ve(I.source))), m = c.trim().toLowerCase(), w = m ? u.filter((I) => `${I.label} ${I.domainLabel ?? ""}`.toLowerCase().includes(m)) : u;
|
|
8257
8256
|
return /* @__PURE__ */ k(
|
|
8258
|
-
|
|
8257
|
+
Un,
|
|
8259
8258
|
{
|
|
8260
8259
|
open: s,
|
|
8261
8260
|
onOpenChange: (I) => {
|
|
8262
8261
|
o(I), I || f(""), I && i.isError && i.refetch();
|
|
8263
8262
|
},
|
|
8264
8263
|
children: [
|
|
8265
|
-
/* @__PURE__ */ p(
|
|
8264
|
+
/* @__PURE__ */ p(Bn, { asChild: !0, children: /* @__PURE__ */ p(
|
|
8266
8265
|
H,
|
|
8267
8266
|
{
|
|
8268
8267
|
type: "button",
|
|
@@ -8275,7 +8274,7 @@ function wm({
|
|
|
8275
8274
|
children: /* @__PURE__ */ p(Pt, { className: "h-4 w-4" })
|
|
8276
8275
|
}
|
|
8277
8276
|
) }),
|
|
8278
|
-
/* @__PURE__ */ p(
|
|
8277
|
+
/* @__PURE__ */ p(Vn, { align: "start", className: "w-72 p-1.5", children: i.isPending ? /* @__PURE__ */ k("p", { className: "flex items-center gap-1.5 px-1.5 py-1 text-[12px] text-muted-foreground", role: "status", children: [
|
|
8279
8278
|
/* @__PURE__ */ p(Be, { className: "h-3 w-3 animate-spin" }),
|
|
8280
8279
|
"Loading"
|
|
8281
8280
|
] }) : i.isError ? /* @__PURE__ */ p("p", { className: "px-1.5 py-1 text-[12px] text-muted-foreground", children: "Could not load sources." }) : u.length === 0 ? /* @__PURE__ */ p("p", { className: "px-1.5 py-1 text-[12px] text-muted-foreground", children: "Nothing more to add." }) : /* @__PURE__ */ k(Le, { children: [
|
|
@@ -8326,7 +8325,7 @@ function _m({ entries: e, onPick: t }) {
|
|
|
8326
8325
|
] }, n)) });
|
|
8327
8326
|
}
|
|
8328
8327
|
function Im(e) {
|
|
8329
|
-
const [t, r] =
|
|
8328
|
+
const [t, r] = j([]), n = e ? t.filter((o) => o.cardId === e).map((o) => o.field) : [], a = n.length >= et.taggedFields, s = (o) => !!e && !a && !n.some((c) => er(c, o));
|
|
8330
8329
|
return {
|
|
8331
8330
|
shown: n,
|
|
8332
8331
|
/** Five are tagged: nothing more can be. */
|
|
@@ -8356,18 +8355,18 @@ function Sm(e, t) {
|
|
|
8356
8355
|
return { text: e.slice(0, n) + e.slice(t), caret: n };
|
|
8357
8356
|
}
|
|
8358
8357
|
const Nm = [], km = { withRequest: !0 };
|
|
8359
|
-
function
|
|
8358
|
+
function oh({
|
|
8360
8359
|
instance: e,
|
|
8361
8360
|
surface: t = "dashboard",
|
|
8362
8361
|
placement: r
|
|
8363
8362
|
}) {
|
|
8364
8363
|
var Ar, Cr;
|
|
8365
|
-
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 =
|
|
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 = Q(
|
|
8366
8365
|
(A) => {
|
|
8367
8366
|
var P;
|
|
8368
8367
|
return s && A.dashboard ? (P = go(A.dashboard, s.cardId)) == null ? void 0 : P.card : void 0;
|
|
8369
8368
|
}
|
|
8370
|
-
), w = Cm(n), I = ie(void 0), [E] =
|
|
8369
|
+
), w = Cm(n), I = ie(void 0), [E] = j(() => Go(t)), [_, x] = j([]), y = te(
|
|
8371
8370
|
(A) => {
|
|
8372
8371
|
I.current = A;
|
|
8373
8372
|
const P = Em(
|
|
@@ -8394,7 +8393,7 @@ function ih({
|
|
|
8394
8393
|
onFailed: (A) => {
|
|
8395
8394
|
A instanceof tt && A.code === "context_invalid" && cr(h, ls(e.id));
|
|
8396
8395
|
}
|
|
8397
|
-
}), [O, K] =
|
|
8396
|
+
}), [O, K] = j(""), Y = ie(null);
|
|
8398
8397
|
ke(() => {
|
|
8399
8398
|
var A;
|
|
8400
8399
|
(o || n) && ((A = Y.current) == null || A.focus());
|
|
@@ -8406,7 +8405,7 @@ function ih({
|
|
|
8406
8405
|
const { focus: A, beside: P } = e.store.getState();
|
|
8407
8406
|
A && Ke.current(A.cardId, { beside: P });
|
|
8408
8407
|
}, [c, e]);
|
|
8409
|
-
const We = (w == null ? void 0 : w.id) ?? (m == null ? void 0 : m.id), W = Im(We), ye = We ? _ : [], [Ae, Ce] =
|
|
8408
|
+
const We = (w == null ? void 0 : w.id) ?? (m == null ? void 0 : m.id), W = Im(We), ye = We ? _ : [], [Ae, Ce] = j(), _e = Ae ? W.available(ye).filter((A) => A.label.toLowerCase().includes(Ae.query.toLowerCase())) : [], xe = Ae && _e.length ? { ...Ae, active: Math.min(Ae.active, _e.length - 1) } : void 0, R = ie(void 0);
|
|
8410
8409
|
Ue(() => {
|
|
8411
8410
|
var A;
|
|
8412
8411
|
R.current !== void 0 && ((A = Y.current) == null || A.setSelectionRange(R.current, R.current), R.current = void 0);
|
|
@@ -8447,7 +8446,7 @@ function ih({
|
|
|
8447
8446
|
return;
|
|
8448
8447
|
}
|
|
8449
8448
|
A.key === "Enter" && !A.shiftKey && !A.nativeEvent.isComposing && M(A);
|
|
8450
|
-
},
|
|
8449
|
+
}, X = 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) => {
|
|
8451
8450
|
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");
|
|
8452
8451
|
}, Oe = g === "full-page", Er = /* @__PURE__ */ p(
|
|
8453
8452
|
H,
|
|
@@ -8457,7 +8456,7 @@ function ih({
|
|
|
8457
8456
|
className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
|
|
8458
8457
|
"aria-label": "New conversation",
|
|
8459
8458
|
title: "New conversation",
|
|
8460
|
-
disabled:
|
|
8459
|
+
disabled: X && !T.busy && !T.loading,
|
|
8461
8460
|
onClick: () => {
|
|
8462
8461
|
var A;
|
|
8463
8462
|
T.startNew(), (A = Y.current) == null || A.focus();
|
|
@@ -8485,7 +8484,7 @@ function ih({
|
|
|
8485
8484
|
T.readForCopy(A).then((P) => $o(P, { assistantName: e.assistantName, toolCalls: A }))
|
|
8486
8485
|
)
|
|
8487
8486
|
}
|
|
8488
|
-
), yt =
|
|
8487
|
+
), yt = X && Oe && !T.loading, Ts = /* @__PURE__ */ k("footer", { className: B("shrink-0 space-y-2", yt ? "px-0" : "p-3"), children: [
|
|
8489
8488
|
m && !w && !u ? /* @__PURE__ */ k("div", { className: "flex items-center gap-1.5", children: [
|
|
8490
8489
|
/* @__PURE__ */ k(
|
|
8491
8490
|
"span",
|
|
@@ -8542,7 +8541,7 @@ function ih({
|
|
|
8542
8541
|
Ce(P === void 0 ? void 0 : { query: P, active: 0 });
|
|
8543
8542
|
},
|
|
8544
8543
|
onKeyDown: pe,
|
|
8545
|
-
onFocus: w ?
|
|
8544
|
+
onFocus: w ? Zn : void 0,
|
|
8546
8545
|
className: "block max-h-40 min-h-[2.5rem] w-full resize-none bg-transparent px-3 pt-2.5 text-[13px] leading-[1.5] text-foreground outline-none placeholder:text-muted-foreground"
|
|
8547
8546
|
}
|
|
8548
8547
|
),
|
|
@@ -8693,7 +8692,7 @@ function ih({
|
|
|
8693
8692
|
Mm,
|
|
8694
8693
|
{
|
|
8695
8694
|
conversation: T,
|
|
8696
|
-
empty:
|
|
8695
|
+
empty: X,
|
|
8697
8696
|
layout: g,
|
|
8698
8697
|
onExpand: Ie,
|
|
8699
8698
|
onAdd: v,
|
|
@@ -8748,16 +8747,16 @@ function En({
|
|
|
8748
8747
|
}, [e, t, n, r]), null;
|
|
8749
8748
|
}
|
|
8750
8749
|
function Cm(e) {
|
|
8751
|
-
const t =
|
|
8750
|
+
const t = Q((n) => n.isVisualEditing), r = Dn((n) => n.card);
|
|
8752
8751
|
return !e && t ? r : void 0;
|
|
8753
8752
|
}
|
|
8754
8753
|
function $m(e) {
|
|
8755
|
-
if (!(e || !
|
|
8756
|
-
return
|
|
8754
|
+
if (!(e || !Q.getState().isVisualEditing))
|
|
8755
|
+
return Zn(), Es(e);
|
|
8757
8756
|
}
|
|
8758
8757
|
function Es(e) {
|
|
8759
|
-
if (e || !
|
|
8760
|
-
const t =
|
|
8758
|
+
if (e || !Q.getState().isVisualEditing) return;
|
|
8759
|
+
const t = Dn.getState();
|
|
8761
8760
|
return { card: t.card, mode: t.isDevMode ? "sql" : "visual" };
|
|
8762
8761
|
}
|
|
8763
8762
|
function Om(e) {
|
|
@@ -8786,7 +8785,7 @@ function Mm({
|
|
|
8786
8785
|
onPick: s,
|
|
8787
8786
|
onAskAgain: o
|
|
8788
8787
|
}) {
|
|
8789
|
-
const c = ie(null), [f, i] =
|
|
8788
|
+
const c = ie(null), [f, i] = j(!0), g = ie(void 0), u = ie(r);
|
|
8790
8789
|
Ue(() => {
|
|
8791
8790
|
const E = c.current;
|
|
8792
8791
|
!E || u.current === r || (u.current = r, f ? E.scrollTop = E.scrollHeight : g.current && zm(E, g.current));
|
|
@@ -8847,5 +8846,5 @@ function Mm({
|
|
|
8847
8846
|
] });
|
|
8848
8847
|
}
|
|
8849
8848
|
export {
|
|
8850
|
-
|
|
8849
|
+
oh as default
|
|
8851
8850
|
};
|