react-semaphor 0.1.568 → 0.1.570

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.
Files changed (191) hide show
  1. package/README.md +0 -7
  2. package/dist/analytics-protocol/index.js +434 -454
  3. package/dist/appearance/index.js +6 -3
  4. package/dist/appearance-runtime/index.js +1 -1
  5. package/dist/assistant-context/index.js +1 -1
  6. package/dist/brand-studio/index.js +572 -436
  7. package/dist/briefings/index.js +4 -4
  8. package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
  9. package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
  10. package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
  11. package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
  12. package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
  13. package/dist/chunks/brand-B4BdpAB_.js +54 -0
  14. package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
  15. package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
  16. package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
  17. package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
  18. package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
  19. package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
  20. package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
  21. package/dist/chunks/edit-Bpdh_P_a.js +226 -0
  22. package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
  23. package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
  24. package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
  25. package/dist/chunks/index-BVKzKl5d.js +90 -0
  26. package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
  27. package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
  28. package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
  29. package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
  30. package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
  31. package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
  32. package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
  33. package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
  34. package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
  35. package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
  36. package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
  37. package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
  38. package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
  39. package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
  40. package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
  41. package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
  42. package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
  43. package/dist/chunks/resolver-DG_tfEpt.js +156 -0
  44. package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
  45. package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
  46. package/dist/chunks/schema-C9NPiIru.js +2568 -0
  47. package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
  48. package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
  49. package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
  50. package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
  51. package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
  52. package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
  53. package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
  54. package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
  55. package/dist/chunks/validators-B8fpdinG.js +3651 -0
  56. package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
  57. package/dist/dashboard/index.js +2 -2
  58. package/dist/dashboard-authoring/index.js +1888 -1826
  59. package/dist/format-utils/index.js +230 -231
  60. package/dist/index.js +349 -353
  61. package/dist/layouts/index.js +1 -1
  62. package/dist/report-runtime-context/index.js +1 -1
  63. package/dist/style.css +1 -1
  64. package/dist/surfboard/index.js +2 -2
  65. package/dist/types/appearance/index.d.ts +1 -0
  66. package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
  67. package/dist/types/brand-studio/index.d.ts +1 -1
  68. package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
  69. package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
  70. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
  71. package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
  72. package/dist/types/components/surfboard/filter/types.d.ts +5 -4
  73. package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
  74. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
  75. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
  76. package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
  77. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
  78. package/dist/types/index.js +9 -9
  79. package/dist/types/lib/appearance/aliases.d.ts +42 -0
  80. package/dist/types/lib/appearance/compiler.d.ts +6 -0
  81. package/dist/types/lib/appearance/defaults.d.ts +6 -0
  82. package/dist/types/lib/appearance/index.d.ts +2 -0
  83. package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
  84. package/dist/types/lib/appearance/resolver.d.ts +2 -2
  85. package/dist/types/lib/appearance/types.d.ts +38 -1
  86. package/dist/types/lib/charts/types.d.ts +6 -2
  87. package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
  88. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
  89. package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
  90. package/dist/types/lib/download-pdf.d.ts +0 -1
  91. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
  92. package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
  93. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  94. package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
  95. package/dist/types/lib/stores/editor-store.d.ts +0 -1
  96. package/dist/types/lib/stores/table-actions.d.ts +0 -1
  97. package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
  98. package/dist/types/lib/types/common-types.d.ts +3 -2
  99. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  100. package/dist/types/lib/types/index.d.ts +1 -1
  101. package/dist/types/lib/types/summary-types.d.ts +0 -5
  102. package/dist/types/lib/utils/card-definition.d.ts +7 -7
  103. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
  104. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
  105. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
  106. package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
  107. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
  108. package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
  109. package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
  110. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
  111. package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
  112. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
  113. package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
  114. package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
  115. package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
  116. package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
  117. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
  118. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
  119. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
  120. package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
  121. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
  122. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
  123. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
  124. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
  125. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
  126. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
  127. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
  128. package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
  129. package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
  130. package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
  131. package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
  132. package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
  133. package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
  134. package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
  135. package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
  136. package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
  137. package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
  138. package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  140. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
  141. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
  142. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
  144. package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
  145. package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
  146. package/dist/types/shared/temporal/index.d.ts +0 -2
  147. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
  148. package/package.json +7 -26
  149. package/DATA_APP_SDK.md +0 -339
  150. package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
  151. package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
  152. package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
  153. package/dist/chunks/color-CJvdlFM_.js +0 -2162
  154. package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
  155. package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
  156. package/dist/chunks/index-CLIro-EG.js +0 -425
  157. package/dist/chunks/index-CuHybtft.js +0 -51
  158. package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
  159. package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
  160. package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
  161. package/dist/chunks/operators-B3zZoskU.js +0 -66
  162. package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
  163. package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
  164. package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
  165. package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
  166. package/dist/chunks/validators-wtjw0aw6.js +0 -3332
  167. package/dist/data-app-sdk/index.js +0 -1412
  168. package/dist/data-app-sdk-adapters/index.js +0 -361
  169. package/dist/data-app-sdk-validation/index.js +0 -1031
  170. package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
  171. package/dist/types/data-app-sdk/adapters.d.ts +0 -35
  172. package/dist/types/data-app-sdk/builders.d.ts +0 -62
  173. package/dist/types/data-app-sdk/contracts.d.ts +0 -419
  174. package/dist/types/data-app-sdk/executor.d.ts +0 -5
  175. package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
  176. package/dist/types/data-app-sdk/hooks.d.ts +0 -11
  177. package/dist/types/data-app-sdk/index.d.ts +0 -9
  178. package/dist/types/data-app-sdk/provider.d.ts +0 -8
  179. package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
  180. package/dist/types/data-app-sdk/selection.d.ts +0 -2
  181. package/dist/types/data-app-sdk/validation.d.ts +0 -58
  182. package/dist/types/data-app-sdk-adapters.d.ts +0 -2
  183. package/dist/types/data-app-sdk-validation.d.ts +0 -2
  184. package/dist/types/data-app-sdk.d.ts +0 -2
  185. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
  186. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
  187. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
  188. package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
  189. package/dist/types/shared/temporal/relative-date.d.ts +0 -21
  190. package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
  191. package/src/data-app-sdk/README.md +0 -402
@@ -1,28 +1,28 @@
1
1
  import { jsx as t, jsxs as s, Fragment as U } from "react/jsx-runtime";
2
- import la, { useState as A, useEffect as Ie, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as da } from "react";
3
- import { da as it, bu as Le, bv as Ve, bx as Pe, db as Ba, aU as $e, aR as ot, dc as Oa, dd as lt, de as Ct, a7 as dt, a4 as ve, u as w, df as _a, dg as Ma, bt as M, dh as Ra, a6 as oe, aP as za, bZ as Ua, di as $a, dj as ja, bn as ca, bN as be, ch as ua, bM as tt, o as qa, k as Wa, dk as Qa, ck as wt, cl as St, cm as kt, cn as Dt, co as At, cp as Ft, cq as It, cr as ha, cu as Et, dl as Ka, dm as Ha, c9 as pt, c6 as je, c7 as qe, dn as ma, c8 as We, bV as re, ci as Ga, cd as at, dp as Ya, bS as Xa, bw as Tt, by as ct, dq as pa, bs as Ja, dr as fa, be as ut, ds as Za, bf as en, i as tn, dt as an, b9 as nn, w as rn, t as sn, du as on, dv as ln, dw as ga, dx as dn, dy as cn, dz as Ce, dA as un, R as ba, dB as hn, dC as mn, aM as pn, dD as fn, dE as ge, dF as gn, W as Lt, dG as bn, dH as ft, dI as xn, dJ as $t, dK as vn, dL as yn, dM as Nn, dN as xa, cK as Cn, dO as wn, dP as Sn, dQ as Vt, cv as va, dR as kn, dS as jt, dT as Dn, dU as An, dV as Fn, dW as In, aT as En, bo as Tn, bY as ya, dX as Ln, dY as Vn, dZ as Xe, d_ as Pn, d$ as Bn, e0 as On, A as _n, aB as Mn, aC as Rn, ah as zn, ag as Un, af as $n, ae as jn, ab as qn, a9 as Wn, e1 as Qn, e2 as Kn, e3 as Hn, e4 as Gn, e5 as Yn, az as Xn } from "./semaphor-ready-indicator-BSEdUq40.js";
4
- import { c as we, B as L, X as Qe, n as ze, s as xe, L as de, l as Pt, e as Bt, k as Jn, z as Ot, P as Ee, a5 as Na, d as Te, a as nt, S as Ca, b as Nt, t as Se, u as ke, v as De, w as Ae, x as fe, a6 as Zn } from "./code-editor-DJNOsgJH.js";
5
- import { L as Ue } from "./layout-grid-0hIlqEtk.js";
6
- import "./index-CuHybtft.js";
7
- import { o as er } from "./validators-wtjw0aw6.js";
8
- import "./matrix-operation-contract-Eb6elidS.js";
2
+ import la, { useState as A, useEffect as Ee, useCallback as ie, useMemo as Y, useLayoutEffect as Ut, useRef as et, useContext as da } from "react";
3
+ import { dx as it, bt as Le, bu as Ve, bw as Pe, dy as Ba, aT as $e, aQ as ot, dz as Oa, dA as lt, dB as Ct, a6 as dt, a3 as ve, u as w, dC as _a, dD as Ma, bs as M, dE as Ra, a5 as oe, aO as za, bY as Ua, dF as $a, dG as ja, bm as ca, bM as be, cg as ua, bL as tt, n as qa, j as Wa, dH as Qa, cj as wt, ck as St, cl as kt, cm as Dt, cn as At, co as Ft, cp as Et, cq as ha, ct as It, dI as Ka, de as Ha, c8 as pt, c5 as je, c6 as qe, dq as ma, c7 as We, bU as re, ch as Ga, cc as at, dJ as Ya, bR as Xa, dK as pa, bd as ct, bv as Tt, bx as ut, dL as fa, br as Ja, dM as Za, be as en, h as tn, dN as an, b8 as nn, v as rn, r as sn, dO as on, dP as ln, dQ as ga, dR as dn, dS as cn, dT as Ce, dU as un, R as ba, dV as hn, dW as mn, aL as pn, dX as fn, dY as ge, dZ as gn, T as Lt, d_ as bn, d$ as ft, e0 as xn, e1 as $t, e2 as vn, e3 as yn, e4 as Nn, e5 as xa, cJ as Cn, e6 as wn, e7 as Sn, dk as Vt, cu as va, e8 as kn, e9 as jt, ea as Dn, eb as An, ec as Fn, ed as En, aS as In, bn as Tn, bX as ya, ee as Ln, ef as Vn, eg as Xe, eh as Pn, ei as Bn, ej as On, A as _n, aA as Mn, aB as Rn, ag as zn, af as Un, ae as $n, ad as jn, aa as qn, a8 as Wn, ek as Qn, el as Kn, em as Hn, en as Gn, eo as Yn, ay as Xn } from "./semaphor-ready-indicator-ByFvqHEO.js";
4
+ import { c as we, B as L, X as Qe, s as ze, x as xe, L as de, q as Pt, j as Bt, p as Jn, F as Ot, e as Ie, aa as Na, h as Te, f as nt, i as Ca, g as Nt, y as Se, z as ke, A as De, D as Ae, E as fe, ab as Zn } from "./style-sheet-parts-C7qGZuH1.js";
5
+ import { L as Ue } from "./layout-grid-8rR-LPTk.js";
6
+ import { c as J } from "./pickers-DkqmtnTL.js";
7
+ import { S as er } from "./validators-B8fpdinG.js";
8
+ import "./matrix-operation-contract-DCVinw1o.js";
9
9
  import "./analytics-base-schemas-BaIQrEzX.js";
10
- import "zod";
11
10
  import "../value-format-preferences/index.js";
12
- import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
13
11
  import { s as Je } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
14
- import { by as qt, b8 as Wt, eh as Qt, gF as tr, gG as rt, g7 as Kt, gH as ar, o as Ke, gI as nr, p as rr, g4 as sr, gJ as ir, gK as or, cm as lr, gL as dr, l as cr, f0 as ur, gM as hr, gN as mr, a as _t, aL as pr, a2 as fr, c0 as gr, gO as br, gP as xr, cb as vr, gQ as yr, gR as Ht, gS as Nr } from "./resolve-dashboard-input-context-Du0fjN3h.js";
15
- import { createPortal as Cr } from "react-dom";
16
- import { aK as Gt, ar as wr } from "./temporal-input-presentation--2r9BLr0.js";
17
- import { aA as Sr, an as kr, D as Dr, a8 as st, R as Ar } from "./bookmark-state-Du3s13_V.js";
18
- import "./index-RNaTnE3m.js";
12
+ import { bE as qt, ba as Wt, em as Qt, gJ as tr, gK as rt, fI as Kt, gL as ar, o as Ke, gM as nr, p as rr, gb as sr, gN as ir, gO as or, cs as lr, gP as dr, l as cr, f5 as ur, gQ as hr, gR as mr, a as _t, aM as pr, a4 as fr, c6 as gr, gS as br, gT as xr, ch as vr, gU as yr, gV as Ht, gW as Nr } from "./resolve-dashboard-input-context-Lkbwycwe.js";
13
+ import { S as wa } from "./save-D985VvYp.js";
14
+ import { V as Cr, L as wr, a as Sr, u as Sa, C as ka, F as kr, b as Dr, A as Ar, c as Fr } from "./card-filter-builder-0VvKmRst.js";
15
+ import { m as Er, k as Da, p as Aa } from "./report-preferences-dialog-Yvhv3WX2.js";
16
+ import { createPortal as Ir } from "react-dom";
17
+ import { aV as Gt, ar as Tr } from "./temporal-input-presentation-CqbJjIuu.js";
18
+ import { aA as Lr, an as Vr, D as Pr, a8 as st, R as Br } from "./bookmark-state-CflS88gq.js";
19
+ import "zod";
20
+ import "./schema-C9NPiIru.js";
21
+ import "./index-CV_Kzou0.js";
19
22
  import "./context-R31TSL5V.js";
20
- import { S as wa } from "./save-D6pHmSSP.js";
21
- import { V as Fr, L as Ir, a as Er, u as Sa, C as ka, F as Tr, b as Lr, A as Vr, c as Pr } from "./card-filter-builder-BBuB99GZ.js";
22
- import { m as Br, k as Da, n as Aa } from "./report-preferences-dialog-Mbd-I0wV.js";
23
- import { v as Or, E as _r } from "./filter-reach-copy-jZGzK_IH.js";
24
- import { a as Yt, d as Xt, c as Mr, i as Rr, b as zr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-DOX03R4A.js";
25
- import { g as pe, d as jr, a as qr } from "./index-CPNZW0mu.js";
23
+ import { v as Or, F as _r } from "./filter-reach-copy-BSY33ro5.js";
24
+ import { a as Yt, d as Xt, c as Mr, i as Rr, b as zr, e as Ur, v as Jt, f as Zt, g as $r } from "./variable-draft-9-huI1h4.js";
25
+ import { g as pe, d as jr, a as qr } from "./index-y3HUzRNk.js";
26
26
  /**
27
27
  * @license lucide-react v0.453.0 - ISC
28
28
  *
@@ -148,7 +148,7 @@ function Jr({
148
148
  isCreating: n
149
149
  }) {
150
150
  const i = it("interactive"), [o, l] = A(""), [u, c] = A("");
151
- Ie(() => {
151
+ Ee(() => {
152
152
  e || (l(""), c(""));
153
153
  }, [e]);
154
154
  const d = () => {
@@ -248,7 +248,7 @@ function Jr({
248
248
  }
249
249
  function Zr(e) {
250
250
  const [a, r] = A(null), [n, i] = A(null), o = Ba();
251
- return Ie(() => {
251
+ return Ee(() => {
252
252
  if (!e || e.trim() === "") {
253
253
  r(null), i(null);
254
254
  return;
@@ -429,7 +429,7 @@ function Be() {
429
429
  setIsDashboardEditing: _,
430
430
  setIsVisualEditing: b,
431
431
  clearSelectedFrameId: S
432
- } = ve(), v = w((O) => O.selectedSheetId), T = w((O) => O.selectedFrameId), I = w((O) => O.dashboard), H = w(
432
+ } = ve(), v = w((O) => O.selectedSheetId), T = w((O) => O.selectedFrameId), E = w((O) => O.dashboard), H = w(
433
433
  (O) => O.inlineFilterValuesMap
434
434
  ), B = _a((i == null ? void 0 : i.id) || "", {
435
435
  enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
@@ -461,7 +461,7 @@ function Be() {
461
461
  setApplyFilters: P,
462
462
  setIsDashboardEditing: _,
463
463
  setIsVisualEditing: b,
464
- dashboard: I,
464
+ dashboard: E,
465
465
  selectedSheetId: v,
466
466
  selectedFrameId: T,
467
467
  inlineFilterValuesMap: H
@@ -495,7 +495,7 @@ function Be() {
495
495
  P,
496
496
  D,
497
497
  S,
498
- I,
498
+ E,
499
499
  v,
500
500
  T,
501
501
  H
@@ -507,7 +507,7 @@ function Be() {
507
507
  try {
508
508
  if (o(O), !v)
509
509
  return te("No sheet selected. Please select a sheet first.");
510
- const { data: G, fromCache: E } = await aa(
510
+ const { data: G, fromCache: I } = await aa(
511
511
  a.apiServiceUrl,
512
512
  (e == null ? void 0 : e.accessToken) || "",
513
513
  O.id,
@@ -524,7 +524,7 @@ function Be() {
524
524
  visualId: O.id
525
525
  // Link this frame to the library visual
526
526
  };
527
- return await n(v, R), _(!0), { success: !0, fromCache: E };
527
+ return await n(v, R), _(!0), { success: !0, fromCache: I };
528
528
  } catch (G) {
529
529
  return console.error("Error adding visual:", G), te(
530
530
  G instanceof Error ? G.message : "Failed to add visual to dashboard"
@@ -552,21 +552,21 @@ function Be() {
552
552
  refetch: B.refetch
553
553
  };
554
554
  }
555
- function Ia(e) {
555
+ function Ea(e) {
556
556
  return e ? new Date(e).toLocaleDateString("en-US", {
557
557
  month: "short",
558
558
  day: "numeric",
559
559
  year: "numeric"
560
560
  }) : "Unknown";
561
561
  }
562
- function Ea(e, a) {
562
+ function Ia(e, a) {
563
563
  var n;
564
564
  const r = (n = e.ownership.createdBy) == null ? void 0 : n.type;
565
565
  return r === "tenant" || r === "organization" && a;
566
566
  }
567
567
  function Mt(e, a) {
568
568
  var r, n;
569
- return Ea(e, a) ? ((r = e.ownership.createdBy) == null ? void 0 : r.name) || ((n = e.createdByTenantUserRel) == null ? void 0 : n.name) || e.lastModifiedBy || "Unknown" : "Organization";
569
+ return Ia(e, a) ? ((r = e.ownership.createdBy) == null ? void 0 : r.name) || ((n = e.createdByTenantUserRel) == null ? void 0 : n.name) || e.lastModifiedBy || "Unknown" : "Organization";
570
570
  }
571
571
  function ns(e, a) {
572
572
  return Mt(e, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
@@ -593,7 +593,7 @@ function Wi({
593
593
  a(!1), P();
594
594
  }, { selectVisual: _ } = Ct(), { handleAddLibraryVisual: b, handleEditLibraryVisual: S } = Be(), { isConsoleMode: v } = Ua(), {
595
595
  resources: T,
596
- isLoading: I,
596
+ isLoading: E,
597
597
  isError: H,
598
598
  createResource: B,
599
599
  updateResource: Q,
@@ -608,7 +608,7 @@ function Wi({
608
608
  }
609
609
  ), {
610
610
  startUpdating: G,
611
- stopUpdating: E,
611
+ stopUpdating: I,
612
612
  isUpdating: ae
613
613
  } = ja(), j = T, R = Y(() => {
614
614
  const C = n.trim().toLowerCase();
@@ -713,10 +713,10 @@ function Wi({
713
713
  },
714
714
  {
715
715
  onSuccess: () => {
716
- E(p.id, Ne), m(null);
716
+ I(p.id, Ne), m(null);
717
717
  },
718
718
  onError: () => {
719
- E(p.id, Ne);
719
+ I(p.id, Ne);
720
720
  }
721
721
  }
722
722
  );
@@ -780,7 +780,7 @@ function Wi({
780
780
  }
781
781
  )
782
782
  ] }),
783
- /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: I ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : H ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : R.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
783
+ /* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: E ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(Xr, {}) }) : H ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : R.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
784
784
  /* @__PURE__ */ t(Ue, { className: "h-5 w-5 text-muted-foreground/60" }),
785
785
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
786
786
  /* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
@@ -926,7 +926,7 @@ function Wi({
926
926
  /* @__PURE__ */ t(At, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
927
927
  ] }),
928
928
  /* @__PURE__ */ s(Ft, { children: [
929
- /* @__PURE__ */ t(It, { disabled: Z, children: "Cancel" }),
929
+ /* @__PURE__ */ t(Et, { disabled: Z, children: "Cancel" }),
930
930
  /* @__PURE__ */ s(
931
931
  ha,
932
932
  {
@@ -966,7 +966,7 @@ function is({
966
966
  return /* @__PURE__ */ s("div", { className: "min-w-[48rem]", children: [
967
967
  /* @__PURE__ */ s("div", { className: "grid h-9 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/60 px-3 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: [
968
968
  /* @__PURE__ */ t(
969
- Et,
969
+ It,
970
970
  {
971
971
  checked: r ? !0 : n ? "indeterminate" : !1,
972
972
  onCheckedChange: i,
@@ -1027,7 +1027,7 @@ function os({
1027
1027
  ),
1028
1028
  children: [
1029
1029
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
1030
- Et,
1030
+ It,
1031
1031
  {
1032
1032
  checked: a,
1033
1033
  onCheckedChange: () => r(e.id),
@@ -1068,7 +1068,7 @@ function os({
1068
1068
  /* @__PURE__ */ t("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children: ns(e, p) }),
1069
1069
  /* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: Mt(e, p) })
1070
1070
  ] }),
1071
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Ia(e.updatedAt) }),
1071
+ /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: Ea(e.updatedAt) }),
1072
1072
  /* @__PURE__ */ t(ss, { visual: e }),
1073
1073
  /* @__PURE__ */ t("span", { className: "text-right tabular-nums text-muted-foreground", children: e.ownership.sharedCount > 0 ? e.ownership.sharedCount : "—" }),
1074
1074
  /* @__PURE__ */ t(
@@ -1174,13 +1174,13 @@ function ls({
1174
1174
  ] }),
1175
1175
  /* @__PURE__ */ t(at, {}),
1176
1176
  /* @__PURE__ */ s("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
1177
- Ea(e, c) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
1177
+ Ia(e, c) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
1178
1178
  /* @__PURE__ */ t(Ya, { className: "h-3 w-3" }),
1179
1179
  /* @__PURE__ */ t("span", { className: "truncate", children: Mt(e, c) })
1180
1180
  ] }),
1181
1181
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
1182
1182
  /* @__PURE__ */ t(Xa, { className: "h-3 w-3" }),
1183
- /* @__PURE__ */ t("span", { children: Ia(e.updatedAt) })
1183
+ /* @__PURE__ */ t("span", { children: Ea(e.updatedAt) })
1184
1184
  ] })
1185
1185
  ] })
1186
1186
  ]
@@ -1230,110 +1230,6 @@ function Qi(e, a, r = !1) {
1230
1230
  }));
1231
1231
  }, [u, o]), l;
1232
1232
  }
1233
- function ds({
1234
- open: e,
1235
- onOpenChange: a,
1236
- isLibraryVisual: r,
1237
- currentVisualName: n,
1238
- isSaving: i = !1,
1239
- destinationMode: o = "both",
1240
- onConfirm: l
1241
- }) {
1242
- const [u, c] = A(
1243
- r && n ? `Copy of ${n}` : n || ""
1244
- ), [d, h] = A("");
1245
- la.useEffect(() => {
1246
- e && (c(
1247
- r && n ? `Copy of ${n}` : n || ""
1248
- ), h(""));
1249
- }, [e, r, n]);
1250
- const p = !!u.trim(), m = o === "local" ? {
1251
- saveToLibrary: !1,
1252
- saveToCurrentDashboard: !0,
1253
- badgeType: "local",
1254
- description: "Creates a local copy on the current dashboard.",
1255
- actionLabel: "Add to Dashboard (Local)"
1256
- } : o === "library" ? {
1257
- saveToLibrary: !0,
1258
- saveToCurrentDashboard: !1,
1259
- badgeType: "library",
1260
- description: "Creates a reusable visual in Visual Library.",
1261
- actionLabel: "Save as Library Visual"
1262
- } : {
1263
- saveToLibrary: !0,
1264
- saveToCurrentDashboard: !0,
1265
- badgeType: "linked",
1266
- description: "Creates a new library visual and adds a linked copy to this dashboard.",
1267
- actionLabel: "Save Copy as Linked Visual"
1268
- }, f = () => {
1269
- !p || i || l({
1270
- name: u.trim(),
1271
- description: d.trim() || void 0,
1272
- saveToLibrary: m.saveToLibrary,
1273
- saveToCurrentDashboard: m.saveToCurrentDashboard
1274
- });
1275
- };
1276
- return /* @__PURE__ */ t(Le, { open: e, onOpenChange: a, children: /* @__PURE__ */ s(Ve, { className: "sm:max-w-[500px]", children: [
1277
- /* @__PURE__ */ s(Tt, { children: [
1278
- /* @__PURE__ */ s(Pe, { className: "flex items-center gap-2", children: [
1279
- /* @__PURE__ */ t("span", { children: "Save Visual As" }),
1280
- m.badgeType !== "local" && /* @__PURE__ */ t(
1281
- Fr,
1282
- {
1283
- type: m.badgeType,
1284
- showLabel: !0,
1285
- className: "px-2 py-0.5"
1286
- }
1287
- )
1288
- ] }),
1289
- /* @__PURE__ */ t(ct, { children: m.description })
1290
- ] }),
1291
- /* @__PURE__ */ s("div", { className: "grid gap-4 py-4", children: [
1292
- /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1293
- /* @__PURE__ */ t(ze, { htmlFor: "name", children: "Name" }),
1294
- /* @__PURE__ */ t(
1295
- xe,
1296
- {
1297
- id: "name",
1298
- value: u,
1299
- onChange: (g) => c(g.target.value),
1300
- placeholder: "Enter visual name",
1301
- disabled: i
1302
- }
1303
- )
1304
- ] }),
1305
- /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1306
- /* @__PURE__ */ t(ze, { htmlFor: "description", children: "Description (optional)" }),
1307
- /* @__PURE__ */ t(
1308
- pa,
1309
- {
1310
- id: "description",
1311
- value: d,
1312
- onChange: (g) => h(g.target.value),
1313
- placeholder: "Enter visual description",
1314
- rows: 3,
1315
- disabled: i
1316
- }
1317
- )
1318
- ] })
1319
- ] }),
1320
- /* @__PURE__ */ s(Ja, { children: [
1321
- /* @__PURE__ */ t(
1322
- L,
1323
- {
1324
- variant: "outline",
1325
- onClick: () => a(!1),
1326
- disabled: i,
1327
- children: "Cancel"
1328
- }
1329
- ),
1330
- /* @__PURE__ */ s(L, { onClick: f, disabled: !p || i, children: [
1331
- i && /* @__PURE__ */ t(de, { className: "mr-2 h-4 w-4 animate-spin" }),
1332
- m.actionLabel
1333
- ] })
1334
- ] })
1335
- ] }) });
1336
- }
1337
1233
  function Rt(e) {
1338
1234
  var a;
1339
1235
  for (const r of e.cards)
@@ -1364,11 +1260,11 @@ function gt({
1364
1260
  }
1365
1261
  );
1366
1262
  }
1367
- function cs({
1263
+ function ds({
1368
1264
  className: e,
1369
1265
  variant: a = "default"
1370
1266
  }) {
1371
- const r = ot(), [n, i] = A(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Be(), u = lt(), c = oe((p) => p.frame), d = fa();
1267
+ const r = ot(), [n, i] = A(!1), { setIsVisualEditing: o } = ve(), { getUpdatedFrame: l } = Be(), u = lt(), c = oe((p) => p.frame), d = pa();
1372
1268
  return /* @__PURE__ */ t(
1373
1269
  L,
1374
1270
  {
@@ -1414,10 +1310,10 @@ function cs({
1414
1310
  }
1415
1311
  );
1416
1312
  }
1417
- function us({
1313
+ function cs({
1418
1314
  className: e
1419
1315
  }) {
1420
- const a = ot(), [r, n] = A(!1), i = lt(), o = oe((g) => g.frame), l = w((g) => g.selectedSheetId), u = w((g) => g.dashboard), { updateFrame: c, setIsVisualEditing: d } = ve(), { getUpdatedFrame: h } = Be(), p = fa(), m = ut();
1316
+ const a = ot(), [r, n] = A(!1), i = lt(), o = oe((g) => g.frame), l = w((g) => g.selectedSheetId), u = w((g) => g.dashboard), { updateFrame: c, setIsVisualEditing: d } = ve(), { getUpdatedFrame: h } = Be(), p = pa(), m = ct();
1421
1317
  return /* @__PURE__ */ t(
1422
1318
  L,
1423
1319
  {
@@ -1500,8 +1396,112 @@ function bt({ className: e }) {
1500
1396
  }
1501
1397
  );
1502
1398
  }
1399
+ function us({
1400
+ open: e,
1401
+ onOpenChange: a,
1402
+ isLibraryVisual: r,
1403
+ currentVisualName: n,
1404
+ isSaving: i = !1,
1405
+ destinationMode: o = "both",
1406
+ onConfirm: l
1407
+ }) {
1408
+ const [u, c] = A(
1409
+ r && n ? `Copy of ${n}` : n || ""
1410
+ ), [d, h] = A("");
1411
+ la.useEffect(() => {
1412
+ e && (c(
1413
+ r && n ? `Copy of ${n}` : n || ""
1414
+ ), h(""));
1415
+ }, [e, r, n]);
1416
+ const p = !!u.trim(), m = o === "local" ? {
1417
+ saveToLibrary: !1,
1418
+ saveToCurrentDashboard: !0,
1419
+ badgeType: "local",
1420
+ description: "Creates a local copy on the current dashboard.",
1421
+ actionLabel: "Add to Dashboard (Local)"
1422
+ } : o === "library" ? {
1423
+ saveToLibrary: !0,
1424
+ saveToCurrentDashboard: !1,
1425
+ badgeType: "library",
1426
+ description: "Creates a reusable visual in Visual Library.",
1427
+ actionLabel: "Save as Library Visual"
1428
+ } : {
1429
+ saveToLibrary: !0,
1430
+ saveToCurrentDashboard: !0,
1431
+ badgeType: "linked",
1432
+ description: "Creates a new library visual and adds a linked copy to this dashboard.",
1433
+ actionLabel: "Save Copy as Linked Visual"
1434
+ }, f = () => {
1435
+ !p || i || l({
1436
+ name: u.trim(),
1437
+ description: d.trim() || void 0,
1438
+ saveToLibrary: m.saveToLibrary,
1439
+ saveToCurrentDashboard: m.saveToCurrentDashboard
1440
+ });
1441
+ };
1442
+ return /* @__PURE__ */ t(Le, { open: e, onOpenChange: a, children: /* @__PURE__ */ s(Ve, { className: "sm:max-w-[500px]", children: [
1443
+ /* @__PURE__ */ s(Tt, { children: [
1444
+ /* @__PURE__ */ s(Pe, { className: "flex items-center gap-2", children: [
1445
+ /* @__PURE__ */ t("span", { children: "Save Visual As" }),
1446
+ m.badgeType !== "local" && /* @__PURE__ */ t(
1447
+ Cr,
1448
+ {
1449
+ type: m.badgeType,
1450
+ showLabel: !0,
1451
+ className: "px-2 py-0.5"
1452
+ }
1453
+ )
1454
+ ] }),
1455
+ /* @__PURE__ */ t(ut, { children: m.description })
1456
+ ] }),
1457
+ /* @__PURE__ */ s("div", { className: "grid gap-4 py-4", children: [
1458
+ /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1459
+ /* @__PURE__ */ t(ze, { htmlFor: "name", children: "Name" }),
1460
+ /* @__PURE__ */ t(
1461
+ xe,
1462
+ {
1463
+ id: "name",
1464
+ value: u,
1465
+ onChange: (g) => c(g.target.value),
1466
+ placeholder: "Enter visual name",
1467
+ disabled: i
1468
+ }
1469
+ )
1470
+ ] }),
1471
+ /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
1472
+ /* @__PURE__ */ t(ze, { htmlFor: "description", children: "Description (optional)" }),
1473
+ /* @__PURE__ */ t(
1474
+ fa,
1475
+ {
1476
+ id: "description",
1477
+ value: d,
1478
+ onChange: (g) => h(g.target.value),
1479
+ placeholder: "Enter visual description",
1480
+ rows: 3,
1481
+ disabled: i
1482
+ }
1483
+ )
1484
+ ] })
1485
+ ] }),
1486
+ /* @__PURE__ */ s(Ja, { children: [
1487
+ /* @__PURE__ */ t(
1488
+ L,
1489
+ {
1490
+ variant: "outline",
1491
+ onClick: () => a(!1),
1492
+ disabled: i,
1493
+ children: "Cancel"
1494
+ }
1495
+ ),
1496
+ /* @__PURE__ */ s(L, { onClick: f, disabled: !p || i, children: [
1497
+ i && /* @__PURE__ */ t(de, { className: "mr-2 h-4 w-4 animate-spin" }),
1498
+ m.actionLabel
1499
+ ] })
1500
+ ] })
1501
+ ] }) });
1502
+ }
1503
1503
  function hs() {
1504
- const [e, a] = A(!1), [r, n] = A(!1), [i, o] = A(null), [l, u] = A(null), c = oe((b) => b.frame), d = oe((b) => b.card), h = lt(), p = w((b) => b.selectedSheetId), m = w((b) => b.dashboard), { getUpdatedFrame: f } = Be(), { selectVisual: g } = Ct(), { addFrame: y, setIsVisualEditing: N } = ve(), k = ut(), V = !!(c != null && c.visualId), P = (() => {
1504
+ const [e, a] = A(!1), [r, n] = A(!1), [i, o] = A(null), [l, u] = A(null), c = oe((b) => b.frame), d = oe((b) => b.card), h = lt(), p = w((b) => b.selectedSheetId), m = w((b) => b.dashboard), { getUpdatedFrame: f } = Be(), { selectVisual: g } = Ct(), { addFrame: y, setIsVisualEditing: N } = ve(), k = ct(), V = !!(c != null && c.visualId), P = (() => {
1505
1505
  var b, S;
1506
1506
  return ((b = c == null ? void 0 : c.cards) == null ? void 0 : b.length) === 1 && ((S = c.cards[0]) != null && S.title) ? c.cards[0].title : h != null && h.title ? h.title : (d == null ? void 0 : d.title) || "Untitled Visual";
1507
1507
  })(), D = Za((b) => {
@@ -1536,17 +1536,17 @@ function hs() {
1536
1536
  }
1537
1537
  const S = f(), T = S.cards.length === 1 ? {
1538
1538
  ...S,
1539
- cards: S.cards.map((I) => ({
1540
- ...I,
1539
+ cards: S.cards.map((E) => ({
1540
+ ...E,
1541
1541
  title: b.name
1542
1542
  // Use visual name as card title
1543
1543
  }))
1544
1544
  } : S;
1545
1545
  if (b.saveToLibrary) {
1546
- let I = null;
1546
+ let E = null;
1547
1547
  if (b.saveToCurrentDashboard)
1548
1548
  try {
1549
- I = await k(T, {
1549
+ E = await k(T, {
1550
1550
  previousFrame: rt(m, T.id)
1551
1551
  });
1552
1552
  } catch (B) {
@@ -1558,7 +1558,7 @@ function hs() {
1558
1558
  );
1559
1559
  return;
1560
1560
  }
1561
- n(b.saveToCurrentDashboard), o(T), u(I);
1561
+ n(b.saveToCurrentDashboard), o(T), u(E);
1562
1562
  const H = {
1563
1563
  title: b.name,
1564
1564
  description: b.description,
@@ -1568,7 +1568,7 @@ function hs() {
1568
1568
  };
1569
1569
  D.mutate(H);
1570
1570
  } else if (b.saveToCurrentDashboard) {
1571
- const I = {
1571
+ const E = {
1572
1572
  ...T,
1573
1573
  // Card title already synced
1574
1574
  id: Kt(),
@@ -1579,7 +1579,7 @@ function hs() {
1579
1579
  const H = await k(T, {
1580
1580
  previousFrame: rt(m, T.id)
1581
1581
  });
1582
- y(p, I, {
1582
+ y(p, E, {
1583
1583
  semanticExecutionPayload: H
1584
1584
  }), M.success("Visual saved to dashboard"), a(!1), N(!1);
1585
1585
  } catch (H) {
@@ -1595,7 +1595,7 @@ function hs() {
1595
1595
  };
1596
1596
  }
1597
1597
  function Ki(e = {}) {
1598
- const { isInspectionMode: a } = en(), r = oe((B) => B.frame), n = oe((B) => B.editorContext), i = tn((B) => B.selectedVisual), o = w((B) => B.selectedFrameId), l = w((B) => B.selectedSheetId), u = w((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = ve(), [h, p] = A(!1), [m, f] = A("both"), g = ut(), y = (n == null ? void 0 : n.type) === "documentSection", N = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = N && !k, {
1598
+ const { isInspectionMode: a } = en(), r = oe((B) => B.frame), n = oe((B) => B.editorContext), i = tn((B) => B.selectedVisual), o = w((B) => B.selectedFrameId), l = w((B) => B.selectedSheetId), u = w((B) => B.dashboard), { setIsVisualEditing: c, updateFrame: d } = ve(), [h, p] = A(!1), [m, f] = A("both"), g = ct(), y = (n == null ? void 0 : n.type) === "documentSection", N = !!(r != null && r.visualId || i != null && i.id), k = !!(r != null && r.visualId && o), V = N && !k, {
1599
1599
  saveAsDialogOpen: P,
1600
1600
  setSaveAsDialogOpen: D,
1601
1601
  handleSaveAs: _,
@@ -1619,7 +1619,7 @@ function Ki(e = {}) {
1619
1619
  /* @__PURE__ */ t(gt, { className: "rounded-control", variant: "default" }),
1620
1620
  /* @__PURE__ */ t(bt, {})
1621
1621
  ] });
1622
- const I = async () => {
1622
+ const E = async () => {
1623
1623
  if (!l) {
1624
1624
  M.error("No sheet selected");
1625
1625
  return;
@@ -1652,8 +1652,8 @@ function Ki(e = {}) {
1652
1652
  return /* @__PURE__ */ s(U, { children: [
1653
1653
  /* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
1654
1654
  !N && /* @__PURE__ */ t(gt, { className: "!rounded-none", variant: "default" }),
1655
- N && V && /* @__PURE__ */ t(cs, { className: "!rounded-none", variant: "default" }),
1656
- N && k && /* @__PURE__ */ t(us, { className: "!rounded-none" }),
1655
+ N && V && /* @__PURE__ */ t(ds, { className: "!rounded-none", variant: "default" }),
1656
+ N && k && /* @__PURE__ */ t(cs, { className: "!rounded-none" }),
1657
1657
  /* @__PURE__ */ s(je, { modal: !1, children: [
1658
1658
  /* @__PURE__ */ t(qe, { asChild: !0, children: /* @__PURE__ */ t(
1659
1659
  L,
@@ -1676,7 +1676,7 @@ function Ki(e = {}) {
1676
1676
  /* @__PURE__ */ s(
1677
1677
  re,
1678
1678
  {
1679
- onClick: I,
1679
+ onClick: E,
1680
1680
  disabled: h,
1681
1681
  children: [
1682
1682
  /* @__PURE__ */ t(Bt, { className: "h-3.5 w-3.5" }),
@@ -1703,7 +1703,7 @@ function Ki(e = {}) {
1703
1703
  onClick: () => H("library"),
1704
1704
  disabled: v,
1705
1705
  children: [
1706
- /* @__PURE__ */ t(Ir, { className: "h-3.5 w-3.5" }),
1706
+ /* @__PURE__ */ t(wr, { className: "h-3.5 w-3.5" }),
1707
1707
  "Save as Library Visual"
1708
1708
  ]
1709
1709
  }
@@ -1714,7 +1714,7 @@ function Ki(e = {}) {
1714
1714
  onClick: () => H("both"),
1715
1715
  disabled: v,
1716
1716
  children: [
1717
- /* @__PURE__ */ t(Er, { className: "h-3.5 w-3.5" }),
1717
+ /* @__PURE__ */ t(Sr, { className: "h-3.5 w-3.5" }),
1718
1718
  "Save Copy as Linked Visual"
1719
1719
  ]
1720
1720
  }
@@ -1726,7 +1726,7 @@ function Ki(e = {}) {
1726
1726
  ] }),
1727
1727
  /* @__PURE__ */ t(bt, {}),
1728
1728
  /* @__PURE__ */ t(
1729
- ds,
1729
+ us,
1730
1730
  {
1731
1731
  open: P,
1732
1732
  onOpenChange: (B) => {
@@ -1765,7 +1765,7 @@ function Hi({ className: e }) {
1765
1765
  );
1766
1766
  }
1767
1767
  function Gi() {
1768
- const e = Br() === "sm", a = w((c) => c.isDashboardEditing), r = w((c) => c.isVisualEditing), n = w((c) => {
1768
+ const e = Er() === "sm", a = w((c) => c.isDashboardEditing), r = w((c) => c.isVisualEditing), n = w((c) => {
1769
1769
  var h;
1770
1770
  const d = ((h = c.dashboard) == null ? void 0 : h.sheets) ?? [];
1771
1771
  return d.find((p) => p.id === c.selectedSheetId) ?? d[0];
@@ -1955,7 +1955,7 @@ function to({
1955
1955
  children: c
1956
1956
  }
1957
1957
  ),
1958
- /* @__PURE__ */ t(It, { disabled: i, children: u }),
1958
+ /* @__PURE__ */ t(Et, { disabled: i, children: u }),
1959
1959
  /* @__PURE__ */ t(L, { type: "button", size: "xs", onClick: r, disabled: i, children: i ? /* @__PURE__ */ s(U, { children: [
1960
1960
  /* @__PURE__ */ t(de, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
1961
1961
  "Saving..."
@@ -2119,14 +2119,14 @@ function no({ variant: e }) {
2119
2119
  onOpen: r
2120
2120
  });
2121
2121
  return i.collapsed ? /* @__PURE__ */ s(
2122
- Ee,
2122
+ Ie,
2123
2123
  {
2124
2124
  open: i.popoverOpen,
2125
2125
  onOpenChange: (o) => {
2126
2126
  i.setPopoverOpen(o), o && r();
2127
2127
  },
2128
2128
  children: [
2129
- i.anchorSlot && Cr(
2129
+ i.anchorSlot && Ir(
2130
2130
  /* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "absolute right-0 top-0 h-7 w-px" }) }),
2131
2131
  i.anchorSlot
2132
2132
  ),
@@ -2142,7 +2142,7 @@ function no({ variant: e }) {
2142
2142
  )
2143
2143
  ]
2144
2144
  }
2145
- ) : /* @__PURE__ */ s(Ee, { onOpenChange: (o) => {
2145
+ ) : /* @__PURE__ */ s(Ie, { onOpenChange: (o) => {
2146
2146
  o && r();
2147
2147
  }, children: [
2148
2148
  /* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ s(
@@ -2247,16 +2247,16 @@ function gs({
2247
2247
  // create and make consumers use `forceClose()` from a dedicated
2248
2248
  // button.
2249
2249
  dismissMode: n ? "passive" : "explicit-only"
2250
- }), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = vn(Sr(m)), y = Array.from(
2250
+ }), m = w((v) => v.dashboard), { setDashboardControlsModel: f } = ve(), { participants: g } = vn(Lr(m)), y = Array.from(
2251
2251
  new Map(
2252
2252
  g.flatMap(
2253
2253
  (v) => v.fieldChoices.map((T) => {
2254
- var I;
2254
+ var E;
2255
2255
  return [
2256
2256
  T.value,
2257
2257
  {
2258
2258
  option: T,
2259
- target: (I = v.fieldTargetMap) == null ? void 0 : I[T.value]
2259
+ target: (E = v.fieldTargetMap) == null ? void 0 : E[T.value]
2260
2260
  }
2261
2261
  ];
2262
2262
  })
@@ -2266,12 +2266,12 @@ function gs({
2266
2266
  new Map(
2267
2267
  g.flatMap(
2268
2268
  (v) => v.metricChoices.map((T) => {
2269
- var I;
2269
+ var E;
2270
2270
  return [
2271
2271
  T.value,
2272
2272
  {
2273
2273
  option: T,
2274
- target: (I = v.metricTargetMap) == null ? void 0 : I[T.value]
2274
+ target: (E = v.metricTargetMap) == null ? void 0 : E[T.value]
2275
2275
  }
2276
2276
  ];
2277
2277
  })
@@ -2280,11 +2280,11 @@ function gs({
2280
2280
  ), k = nr({
2281
2281
  ...m || {},
2282
2282
  controls: []
2283
- }), V = yn(m), P = (v, T, I) => {
2283
+ }), V = yn(m), P = (v, T, E) => {
2284
2284
  f(
2285
2285
  v,
2286
2286
  T,
2287
- fs(I)
2287
+ fs(E)
2288
2288
  );
2289
2289
  }, D = ie(() => {
2290
2290
  if (o) {
@@ -2317,7 +2317,7 @@ function gs({
2317
2317
  ] }),
2318
2318
  _
2319
2319
  ] });
2320
- return n ? /* @__PURE__ */ s(Ee, { open: h, onOpenChange: u, children: [
2320
+ return n ? /* @__PURE__ */ s(Ie, { open: h, onOpenChange: u, children: [
2321
2321
  /* @__PURE__ */ t(nt, { asChild: !0, children: r || /* @__PURE__ */ s(L, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
2322
2322
  /* @__PURE__ */ t(Ca, { className: "mr-2 h-4 w-4" }),
2323
2323
  "Controls"
@@ -2346,7 +2346,7 @@ function gs({
2346
2346
  children: [
2347
2347
  /* @__PURE__ */ t(Pe, { className: "text-[15px]", children: b }),
2348
2348
  /* @__PURE__ */ t(
2349
- ct,
2349
+ ut,
2350
2350
  {
2351
2351
  className: c ? "sr-only" : "text-[13px]",
2352
2352
  children: c ? "Configure and add a shared dashboard control." : "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."
@@ -2415,7 +2415,7 @@ function xs({
2415
2415
  }
2416
2416
  d(!1);
2417
2417
  }, [n, i, d]), _ = ie(
2418
- (v, T, I) => {
2418
+ (v, T, E) => {
2419
2419
  !g || !(f != null && f.document) || m(
2420
2420
  Cs({
2421
2421
  dashboard: h,
@@ -2423,7 +2423,7 @@ function xs({
2423
2423
  currentDocumentInputs: y,
2424
2424
  nextControls: v,
2425
2425
  nextDefaultValues: T,
2426
- change: I
2426
+ change: E
2427
2427
  })
2428
2428
  );
2429
2429
  },
@@ -2445,7 +2445,7 @@ function xs({
2445
2445
  /* @__PURE__ */ s(Tt, { className: l ? "space-y-0" : void 0, children: [
2446
2446
  /* @__PURE__ */ t(Pe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
2447
2447
  /* @__PURE__ */ t(
2448
- ct,
2448
+ ut,
2449
2449
  {
2450
2450
  className: l ? "sr-only" : "text-[13px]",
2451
2451
  children: l ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
@@ -2568,7 +2568,7 @@ function ws({
2568
2568
  o
2569
2569
  ),
2570
2570
  children: [
2571
- /* @__PURE__ */ s(Ee, { open: e, onOpenChange: a, children: [
2571
+ /* @__PURE__ */ s(Ie, { open: e, onOpenChange: a, children: [
2572
2572
  /* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ s(
2573
2573
  L,
2574
2574
  {
@@ -2579,7 +2579,7 @@ function ws({
2579
2579
  l
2580
2580
  ),
2581
2581
  children: [
2582
- e ? /* @__PURE__ */ t(Tr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" }),
2582
+ e ? /* @__PURE__ */ t(kr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" }),
2583
2583
  "Filter"
2584
2584
  ]
2585
2585
  }
@@ -2598,7 +2598,7 @@ function ws({
2598
2598
  }
2599
2599
  )
2600
2600
  ] }),
2601
- /* @__PURE__ */ s(Ee, { open: p, onOpenChange: m, children: [
2601
+ /* @__PURE__ */ s(Ie, { open: p, onOpenChange: m, children: [
2602
2602
  /* @__PURE__ */ t(nt, { asChild: !0, children: /* @__PURE__ */ t(
2603
2603
  L,
2604
2604
  {
@@ -2631,9 +2631,9 @@ function ws({
2631
2631
  );
2632
2632
  }
2633
2633
  function Ss() {
2634
- Lr();
2634
+ Dr();
2635
2635
  const e = w((c) => c.selectedSheetId), a = w((c) => c.selectedFrameId), r = w((c) => c.dashboard), n = w((c) => c.actions.getSelectedFrame), { setSelectedFrameId: i } = ve(), { setCard: o } = dt(), l = oe((c) => c.card.dataSource);
2636
- return Ie(() => {
2636
+ return Ee(() => {
2637
2637
  var d, h;
2638
2638
  let c = n();
2639
2639
  if (!c) {
@@ -2767,7 +2767,7 @@ function As({
2767
2767
  onCheckedChange: n
2768
2768
  }) {
2769
2769
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-2 rounded-control px-1 py-1 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
2770
- /* @__PURE__ */ t(Et, { id: e, checked: r, onCheckedChange: n }),
2770
+ /* @__PURE__ */ t(It, { id: e, checked: r, onCheckedChange: n }),
2771
2771
  /* @__PURE__ */ t(
2772
2772
  ze,
2773
2773
  {
@@ -2865,7 +2865,7 @@ function ro({
2865
2865
  }
2866
2866
  function Fs(e, a) {
2867
2867
  return (e.variables ?? []).map((r) => {
2868
- const n = kr(e, r.id);
2868
+ const n = Vr(e, r.id);
2869
2869
  return {
2870
2870
  variable: r,
2871
2871
  question: Or(r),
@@ -2874,11 +2874,11 @@ function Fs(e, a) {
2874
2874
  };
2875
2875
  });
2876
2876
  }
2877
- function Is(e, a) {
2877
+ function Es(e, a) {
2878
2878
  const r = a ? e.places.filter((i) => i.sheetId === a).length : 0, n = e.places.length - r;
2879
2879
  return e.places.length ? r && n ? `Used here · ${n} elsewhere` : r ? "Used here" : `Used in ${n} ${n === 1 ? "place" : "places"}` : "Not used yet";
2880
2880
  }
2881
- function Es({
2881
+ function Is({
2882
2882
  dashboard: e,
2883
2883
  sheetId: a,
2884
2884
  sheetTitle: r,
@@ -2952,7 +2952,7 @@ function ia({
2952
2952
  /* @__PURE__ */ t("span", { className: J("block truncate text-[12px] font-medium text-foreground", !e.variable.label && "font-mono"), children: e.variable.label || e.variable.name }),
2953
2953
  /* @__PURE__ */ t("span", { className: "mt-0.5 block truncate text-[11px] text-muted-foreground", children: e.question })
2954
2954
  ] }),
2955
- /* @__PURE__ */ t("span", { className: J("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Is(e, a) })
2955
+ /* @__PURE__ */ t("span", { className: J("truncate text-right text-[11px]", n ? "text-muted-foreground/70" : "text-muted-foreground"), children: Es(e, a) })
2956
2956
  ]
2957
2957
  }
2958
2958
  );
@@ -2969,7 +2969,7 @@ function io() {
2969
2969
  const e = w((d) => d.variablesListOpen), a = w((d) => d.actions.setVariablesListOpen), r = w((d) => d.dashboard), n = w((d) => d.selectedSheetId), i = w((d) => d.actions.openVariableEditor), o = it("interactive"), l = (c = r.sheets) == null ? void 0 : c.find((d) => d.id === n), u = (d) => {
2970
2970
  a(!1), i(d);
2971
2971
  };
2972
- return /* @__PURE__ */ s(Ee, { open: e, onOpenChange: a, children: [
2972
+ return /* @__PURE__ */ s(Ie, { open: e, onOpenChange: a, children: [
2973
2973
  /* @__PURE__ */ t(Na, { asChild: !0, children: /* @__PURE__ */ t("span", { "aria-hidden": !0, className: "pointer-events-none inline-block h-7 w-0 self-center" }) }),
2974
2974
  /* @__PURE__ */ t(
2975
2975
  Te,
@@ -2981,7 +2981,7 @@ function io() {
2981
2981
  className: "z-50 w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
2982
2982
  style: o.contentStyle,
2983
2983
  children: /* @__PURE__ */ t(
2984
- Es,
2984
+ Is,
2985
2985
  {
2986
2986
  dashboard: r,
2987
2987
  sheetId: n ?? void 0,
@@ -2999,7 +2999,7 @@ function Ts(e, a) {
2999
2999
  return new Set(
3000
3000
  (e.sheets ?? []).map((i) => {
3001
3001
  const o = { sheetId: i.id, cardId: a, sheetKind: Ke(i) ? "document" : "dashboard" };
3002
- return r.filter((l) => Dr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
3002
+ return r.filter((l) => Pr(l, o)).map((l) => l.runtimeScope === "shared" ? l.id : `${l.id}@${i.id}`).join(`
3003
3003
  `);
3004
3004
  })
3005
3005
  ).size > 1;
@@ -3155,7 +3155,7 @@ function Us({
3155
3155
  handle: r,
3156
3156
  onCalculatedFieldOpenChange: n
3157
3157
  }) {
3158
- var O, te, Z, G, E, ae, j, R, ne, ue, he, ye;
3158
+ var O, te, Z, G, I, ae, j, R, ne, ue, he, ye;
3159
3159
  const { tokenProps: i } = $e(), o = ((O = i.config) == null ? void 0 : O.showAdvancedMode) !== !1, l = ((te = i.config) == null ? void 0 : te.showDirectSource) !== !1, { connections: u } = va(), [c, d] = A(!1), [h, p] = A(!1), [m, f] = A(!1), g = (x) => {
3160
3160
  p(x), n == null || n(x);
3161
3161
  }, { fields: y, isLoading: N, error: k } = Bs(e.mode === "data" ? e.dataSource : void 0), V = [...e.calculatedFields ?? [], ...y], P = (x) => x && (V.find((z) => z.id === x.id) ?? V.find((z) => $s(z, x))), D = [
@@ -3163,7 +3163,7 @@ function Us({
3163
3163
  ...[e.field, e.sortField].filter(
3164
3164
  (x) => !!x && !P(x) && !V.some((z) => z.id === x.id)
3165
3165
  )
3166
- ], _ = ((Z = P(e.field)) == null ? void 0 : Z.id) ?? ((G = e.field) == null ? void 0 : G.id) ?? "", b = ((E = P(e.sortField ?? e.field)) == null ? void 0 : E.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = Rs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Pt : jt, I = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
3166
+ ], _ = ((Z = P(e.field)) == null ? void 0 : Z.id) ?? ((G = e.field) == null ? void 0 : G.id) ?? "", b = ((I = P(e.sortField ?? e.field)) == null ? void 0 : I.id) ?? ((ae = e.sortField ?? e.field) == null ? void 0 : ae.id) ?? "", S = (x) => a({ ...e, ...x }), v = Rs(e.dataSource), T = ((j = e.dataSource) == null ? void 0 : j.mode) === "database" ? Pt : jt, E = "mt-1 inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", H = {
3167
3167
  connectionId: ((R = e.dataSource) == null ? void 0 : R.connectionId) || e.connectionId,
3168
3168
  dataSource: e.dataSource,
3169
3169
  config: e.conditions ? { filters: e.conditions } : {},
@@ -3228,7 +3228,7 @@ function Us({
3228
3228
  ]
3229
3229
  }
3230
3230
  ),
3231
- /* @__PURE__ */ s("button", { type: "button", onClick: () => S({ mode: "data" }), className: I, children: [
3231
+ /* @__PURE__ */ s("button", { type: "button", onClick: () => S({ mode: "data" }), className: E, children: [
3232
3232
  /* @__PURE__ */ t(jt, { className: "h-3 w-3", "aria-hidden": !0 }),
3233
3233
  " Use a dataset or table instead"
3234
3234
  ] })
@@ -3239,7 +3239,7 @@ function Us({
3239
3239
  label: "SQL",
3240
3240
  hint: /* @__PURE__ */ t(U, { children: "One row. Each column is a part; the first shows by default. Filters reach it where the SQL names them, as a SQL card's do." }),
3241
3241
  children: /* @__PURE__ */ t(
3242
- pa,
3242
+ fa,
3243
3243
  {
3244
3244
  size: "xs",
3245
3245
  value: e.sql,
@@ -3275,13 +3275,13 @@ function Us({
3275
3275
  o ? /* @__PURE__ */ s("button", { type: "button", onClick: () => {
3276
3276
  var x;
3277
3277
  return S({ mode: "sql", connectionId: ((x = e.dataSource) == null ? void 0 : x.connectionId) || e.connectionId });
3278
- }, className: I, children: [
3278
+ }, className: E, children: [
3279
3279
  /* @__PURE__ */ t(Yr, { className: "h-3 w-3", "aria-hidden": !0 }),
3280
3280
  " Write SQL instead"
3281
3281
  ] }) : null
3282
3282
  ] }),
3283
3283
  /* @__PURE__ */ t(
3284
- Vr,
3284
+ Ar,
3285
3285
  {
3286
3286
  open: c,
3287
3287
  onOpenChange: d,
@@ -3396,7 +3396,7 @@ function Us({
3396
3396
  // In place, not a dialog over the dialog: each edit is the draft's, and
3397
3397
  // Cancel or Done here keeps or drops it. A new source starts a new list.
3398
3398
  /* @__PURE__ */ t(
3399
- Pr,
3399
+ Fr,
3400
3400
  {
3401
3401
  filters: e.conditions ?? null,
3402
3402
  availableFields: D,
@@ -3468,10 +3468,10 @@ function Ks({
3468
3468
  onHoldEscape: r
3469
3469
  }) {
3470
3470
  var Z, G;
3471
- const n = w((E) => E.dashboard), i = w((E) => E.selectedSheetId), o = w((E) => E.actions.saveVariableChange), [l, u] = A(
3471
+ const n = w((I) => I.dashboard), i = w((I) => I.selectedSheetId), o = w((I) => I.actions.saveVariableChange), [l, u] = A(
3472
3472
  () => e ? zr(e) : Ur()
3473
- ), [c, d] = A("data"), [h, p] = A(!1), m = (E) => {
3474
- p(E), r == null || r(E);
3473
+ ), [c, d] = A("data"), [h, p] = A(!1), m = (I) => {
3474
+ p(I), r == null || r(I);
3475
3475
  }, [f, g] = A([]), [y, N] = A(null), k = !e, V = Qs(l), P = Y(
3476
3476
  () => Jt({ ...JSON.parse(V), name: "" }, n),
3477
3477
  [V, n]
@@ -3488,15 +3488,15 @@ function Ks({
3488
3488
  ), T = Y(
3489
3489
  () => ({
3490
3490
  ...n,
3491
- variables: [...(n.variables ?? []).filter((E) => E.id !== v.id), v]
3491
+ variables: [...(n.variables ?? []).filter((I) => I.id !== v.id), v]
3492
3492
  }),
3493
3493
  [n, v]
3494
- ), I = $r(l), H = ut(), B = w((E) => E.actions.mergeSemanticExecutionPayload), [Q, X] = A(!1), O = async () => {
3495
- const E = Jt(l, n);
3494
+ ), E = $r(l), H = ct(), B = w((I) => I.actions.mergeSemanticExecutionPayload), [Q, X] = A(!1), O = async () => {
3495
+ const I = Jt(l, n);
3496
3496
  X(!0);
3497
3497
  let ae;
3498
3498
  try {
3499
- const R = vr(n, e ? { kind: "update", id: e.id, patch: E } : { kind: "add", variable: E });
3499
+ const R = vr(n, e ? { kind: "update", id: e.id, patch: I } : { kind: "add", variable: I });
3500
3500
  if (!R.ok) {
3501
3501
  X(!1), g(R.issues);
3502
3502
  return;
@@ -3514,19 +3514,19 @@ function Ks({
3514
3514
  return;
3515
3515
  }
3516
3516
  const j = o(
3517
- k ? { kind: "add", variable: E } : { kind: "update", id: E.id, patch: Hs(E) }
3517
+ k ? { kind: "add", variable: I } : { kind: "update", id: I.id, patch: Hs(I) }
3518
3518
  );
3519
3519
  if (X(!1), !j.ok) {
3520
3520
  g(j.issues);
3521
3521
  return;
3522
3522
  }
3523
3523
  B(ae), a();
3524
- }, te = (E) => {
3524
+ }, te = (I) => {
3525
3525
  if (!e) return;
3526
- const ae = o({ kind: "remove", id: e.id, confirmed: E });
3526
+ const ae = o({ kind: "remove", id: e.id, confirmed: I });
3527
3527
  if (!ae.ok) {
3528
3528
  const j = ae.issues.find((R) => R.code === "inUse");
3529
- if (j && !E) {
3529
+ if (j && !I) {
3530
3530
  N(j);
3531
3531
  return;
3532
3532
  }
@@ -3563,22 +3563,22 @@ function Ks({
3563
3563
  }
3564
3564
  )
3565
3565
  ] }),
3566
- h ? null : /* @__PURE__ */ t("nav", { role: "tablist", "aria-label": "Variable settings sections", className: "flex h-9 shrink-0 items-stretch gap-4 border-b border-border/60 px-4", children: Ws.map((E) => /* @__PURE__ */ s(
3566
+ h ? null : /* @__PURE__ */ t("nav", { role: "tablist", "aria-label": "Variable settings sections", className: "flex h-9 shrink-0 items-stretch gap-4 border-b border-border/60 px-4", children: Ws.map((I) => /* @__PURE__ */ s(
3567
3567
  "button",
3568
3568
  {
3569
3569
  role: "tab",
3570
- "aria-selected": c === E.id,
3571
- onClick: () => d(E.id),
3570
+ "aria-selected": c === I.id,
3571
+ onClick: () => d(I.id),
3572
3572
  className: J(
3573
3573
  "relative -mb-px inline-flex items-center text-[13px] transition-colors focus-visible:outline-none",
3574
- c === E.id ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
3574
+ c === I.id ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground"
3575
3575
  ),
3576
3576
  children: [
3577
- E.label,
3578
- c === E.id ? /* @__PURE__ */ t("span", { className: "absolute inset-x-0 -bottom-px h-[2px] bg-foreground" }) : null
3577
+ I.label,
3578
+ c === I.id ? /* @__PURE__ */ t("span", { className: "absolute inset-x-0 -bottom-px h-[2px] bg-foreground" }) : null
3579
3579
  ]
3580
3580
  },
3581
- E.id
3581
+ I.id
3582
3582
  )) }),
3583
3583
  /* @__PURE__ */ s("div", { className: J("min-h-0 flex-1 overflow-y-auto", c === "filters" || h ? "" : "space-y-4 px-4 py-4"), children: [
3584
3584
  c === "data" ? /* @__PURE__ */ t(
@@ -3600,15 +3600,15 @@ function Ks({
3600
3600
  draft: l,
3601
3601
  draftVariable: v,
3602
3602
  draftDashboard: T,
3603
- blocker: I,
3603
+ blocker: E,
3604
3604
  selectedSheetId: i ?? void 0
3605
3605
  }
3606
3606
  ),
3607
- f.length ? /* @__PURE__ */ t("div", { className: "shrink-0 border-t border-border/60 bg-destructive/5 px-4 py-2 text-[11px] leading-4 text-destructive", role: "alert", children: f.map((E) => /* @__PURE__ */ s("p", { children: [
3608
- E.message,
3607
+ f.length ? /* @__PURE__ */ t("div", { className: "shrink-0 border-t border-border/60 bg-destructive/5 px-4 py-2 text-[11px] leading-4 text-destructive", role: "alert", children: f.map((I) => /* @__PURE__ */ s("p", { children: [
3608
+ I.message,
3609
3609
  " ",
3610
- E.fix
3611
- ] }, `${E.code}:${E.path ?? ""}`)) }) : null,
3610
+ I.fix
3611
+ ] }, `${I.code}:${I.path ?? ""}`)) }) : null,
3612
3612
  y ? /* @__PURE__ */ s("div", { className: "shrink-0 border-t border-border/60 bg-amber-500/10 px-4 py-2 text-[11px] leading-4 text-amber-800 dark:text-amber-300", role: "alertdialog", children: [
3613
3613
  /* @__PURE__ */ s("p", { children: [
3614
3614
  y.message,
@@ -3636,7 +3636,7 @@ function Ks({
3636
3636
  ),
3637
3637
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
3638
3638
  /* @__PURE__ */ t(L, { variant: "outline", size: "xs", onClick: a, children: "Cancel" }),
3639
- /* @__PURE__ */ t(L, { size: "xs", disabled: !!I || Q, title: I, onClick: () => void O(), children: k ? "Create" : "Done" })
3639
+ /* @__PURE__ */ t(L, { size: "xs", disabled: !!E || Q, title: E, onClick: () => void O(), children: k ? "Create" : "Done" })
3640
3640
  ] })
3641
3641
  ] })
3642
3642
  ] })
@@ -3694,7 +3694,7 @@ const Xs = [
3694
3694
  ];
3695
3695
  function Js({ draft: e, onChange: a }) {
3696
3696
  var u, c;
3697
- const r = e.mode === "sql" ? "unknown" : _t((u = e.field) == null ? void 0 : u.dataType), n = (c = e.presentation) == null ? void 0 : c.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? wr(n.pattern) : null, l = (d) => a({ ...e, presentation: d && Object.keys(d).length ? d : void 0 });
3697
+ const r = e.mode === "sql" ? "unknown" : _t((u = e.field) == null ? void 0 : u.dataType), n = (c = e.presentation) == null ? void 0 : c.temporal, i = n ? n.mode === "style" ? n.dateStyle : n.mode === "pattern" ? "pattern" : "auto" : "auto", o = (n == null ? void 0 : n.mode) === "pattern" ? Tr(n.pattern) : null, l = (d) => a({ ...e, presentation: d && Object.keys(d).length ? d : void 0 });
3698
3698
  return /* @__PURE__ */ s(U, { children: [
3699
3699
  r === "date" || r === "unknown" ? /* @__PURE__ */ s(se, { label: "Dates read as", hint: "A chip can change this for itself.", children: [
3700
3700
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
@@ -3758,12 +3758,12 @@ function Zs({
3758
3758
  const o = r.sheets ?? [], l = Y(() => Ts(r, a.id), [r, a.id]), [u, c] = A(void 0), d = (l ? u : void 0) ?? i ?? ((S = o[0]) == null ? void 0 : S.id), h = o.find((v) => v.id === d), p = w((v) => d ? v.documentSectionRuntimeBySheetId[d] : void 0), m = !!(h && Ke(h)), f = Y(
3759
3759
  () => d ? m ? p ? { kind: "document", sheetId: d, runtime: p } : void 0 : { kind: "sheet", sheetId: d } : void 0,
3760
3760
  [m, p, d]
3761
- ), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = In({
3761
+ ), g = Y(() => n || !f ? [] : [a], [n, a, f]), N = En({
3762
3762
  dashboard: r,
3763
3763
  place: f ?? { kind: "sheet", sheetId: d ?? "" },
3764
3764
  purpose: "preview",
3765
3765
  variables: g
3766
- }).byId.get(a.id), k = En(), V = Tn(), P = Y(
3766
+ }).byId.get(a.id), k = In(), V = Tn(), P = Y(
3767
3767
  () => xr({ preferences: k, calendar: V }),
3768
3768
  [V, k]
3769
3769
  );
@@ -3810,7 +3810,7 @@ function ei(e, a, r) {
3810
3810
  ] }), o = (h) => h === void 0 ? "" : h === "beyondCap" ? `more than ${st} match` : `${h} ${h === 1 ? "match" : "matches"}`, l = "filterReach" in a ? a.filterReach : [], u = l.filter((h) => h.status === "applied").length, c = l.length - u, d = l.length ? ` · ${u} ${u === 1 ? "filter" : "filters"} applied${c ? `, ${c} skipped` : ""}` : "";
3811
3811
  switch (a.status) {
3812
3812
  case "answered": {
3813
- const h = Ar(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Ht(p, e.presentation, r) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = Nr(e, a, r);
3813
+ const h = Br(e, Object.keys(a.parts))[0], p = h ? a.parts[h] : void 0, m = p && Ht(p, e.presentation, r) || "(empty)", f = `${o(a.matched)}${d}`.replace(/^ · /, ""), g = Nr(e, a, r);
3814
3814
  return g && typeof g == "object" && "unavailable" in g ? { body: n(m), meta: f, unavailable: g.unavailable } : g === "noPrevious" ? { body: n(m), meta: `${f} · Nothing in the period before to compare with.`.replace(/^ · /, "") } : g ? {
3815
3815
  body: /* @__PURE__ */ s(U, { children: [
3816
3816
  n(g.value),
@@ -3861,7 +3861,7 @@ function oo() {
3861
3861
  },
3862
3862
  children: [
3863
3863
  /* @__PURE__ */ t(Pe, { className: "sr-only", children: "Variable from data" }),
3864
- /* @__PURE__ */ t(ct, { className: "sr-only", children: "Define a value from your data to show in text." }),
3864
+ /* @__PURE__ */ t(ut, { className: "sr-only", children: "Define a value from your data to show in text." }),
3865
3865
  /* @__PURE__ */ t(
3866
3866
  Ks,
3867
3867
  {
@@ -3993,7 +3993,7 @@ function di({
3993
3993
  contentKind: V,
3994
3994
  hideHeader: P = !1
3995
3995
  }) {
3996
- const D = e.length, _ = e.filter((I) => I.status === "ACTIVE").length, b = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", S = e.find((I) => I.hasActiveRun) ?? null, v = V ?? "reports & briefings", T = r === "dashboard" ? a : `Project ${v}`;
3996
+ const D = e.length, _ = e.filter((E) => E.status === "ACTIVE").length, b = V === "reports" ? D === 1 ? "report" : "reports" : V === "briefings" ? D === 1 ? "briefing" : "briefings" : D === 1 ? "item" : "items", S = e.find((E) => E.hasActiveRun) ?? null, v = V ?? "reports & briefings", T = r === "dashboard" ? a : `Project ${v}`;
3997
3997
  return /* @__PURE__ */ s(
3998
3998
  "section",
3999
3999
  {
@@ -4110,18 +4110,18 @@ function di({
4110
4110
  contentKind: V
4111
4111
  }
4112
4112
  ) : null,
4113
- e.map((I) => /* @__PURE__ */ t(
4113
+ e.map((E) => /* @__PURE__ */ t(
4114
4114
  hi,
4115
4115
  {
4116
- briefing: I,
4117
- isOpening: y === I.id,
4118
- isBusy: N === I.id,
4119
- onOpen: () => u(I.id),
4120
- onRunNow: () => m(I),
4121
- onTogglePause: () => f(I),
4122
- onDelete: () => g(I)
4116
+ briefing: E,
4117
+ isOpening: y === E.id,
4118
+ isBusy: N === E.id,
4119
+ onOpen: () => u(E.id),
4120
+ onRunNow: () => m(E),
4121
+ onTogglePause: () => f(E),
4122
+ onDelete: () => g(E)
4123
4123
  },
4124
- I.id
4124
+ E.id
4125
4125
  ))
4126
4126
  ] }),
4127
4127
  k ? /* @__PURE__ */ t("div", { className: "border-t border-border px-4 py-2.5", children: /* @__PURE__ */ s(
@@ -4542,17 +4542,17 @@ function xi({
4542
4542
  h ? "author" : "list"
4543
4543
  ), [S, v] = A(
4544
4544
  h ?? "analytical_briefing"
4545
- ), [T, I] = A("dashboard"), [H, B] = A(
4545
+ ), [T, E] = A("dashboard"), [H, B] = A(
4546
4546
  []
4547
- ), [Q, X] = A(null), O = h && !N && !Q ? "list" : _, [te, Z] = A(!1), [G, E] = A(null), [ae, j] = A(null), [R, ne] = A(
4547
+ ), [Q, X] = A(null), O = h && !N && !Q ? "list" : _, [te, Z] = A(!1), [G, I] = A(null), [ae, j] = A(null), [R, ne] = A(
4548
4548
  null
4549
4549
  ), [ue, he] = A(null), ye = et(null), x = et(P);
4550
- Ie(() => {
4550
+ Ee(() => {
4551
4551
  const F = P && !x.current;
4552
- x.current = P, !(!F || !h) && (X(null), I("dashboard"), v(h), b("author"), he(null));
4552
+ x.current = P, !(!F || !h) && (X(null), E("dashboard"), v(h), b("author"), he(null));
4553
4553
  }, [P, h]);
4554
4554
  const z = Lt(), $ = r ?? (g == null ? void 0 : g.apiServiceUrl), K = n ?? (f == null ? void 0 : f.accessToken), le = Y(() => ({ ...bi, ...m }), [m]), [Oe, ht] = A(null);
4555
- Ie(() => {
4555
+ Ee(() => {
4556
4556
  if (!p || !$ || !K) return;
4557
4557
  let F = !0;
4558
4558
  return le.getBriefing($, K, p.briefingId).then(({ briefing: W }) => {
@@ -4607,16 +4607,16 @@ function xi({
4607
4607
  }
4608
4608
  }
4609
4609
  }, [le, $, K]);
4610
- Ie(() => {
4610
+ Ee(() => {
4611
4611
  !P || O !== "list" || !_e || ce();
4612
4612
  }, [_e, O, ce, P]);
4613
4613
  const Re = () => {
4614
- X(null), I("dashboard"), b("list"), D(!0);
4614
+ X(null), E("dashboard"), b("list"), D(!0);
4615
4615
  }, C = (F) => {
4616
4616
  X(null), v(F), b("author");
4617
4617
  }, q = async (F) => {
4618
4618
  if (!(!$ || !K)) {
4619
- E(F), he(null);
4619
+ I(F), he(null);
4620
4620
  try {
4621
4621
  const W = await le.getBriefing(
4622
4622
  $,
@@ -4629,7 +4629,7 @@ function xi({
4629
4629
  W instanceof Error ? W.message : "Could not open briefing."
4630
4630
  );
4631
4631
  } finally {
4632
- E(null);
4632
+ I(null);
4633
4633
  }
4634
4634
  }
4635
4635
  }, ee = async (F) => {
@@ -4742,7 +4742,7 @@ function xi({
4742
4742
  !N && "cursor-not-allowed opacity-50"
4743
4743
  ),
4744
4744
  onClick: () => {
4745
- N && (X(null), v(h), I("dashboard"), b("author"));
4745
+ N && (X(null), v(h), E("dashboard"), b("author"));
4746
4746
  },
4747
4747
  children: Q ? `Edit ${pe(Q).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
4748
4748
  }
@@ -4783,7 +4783,7 @@ function xi({
4783
4783
  sourceView: T,
4784
4784
  error: ue,
4785
4785
  loading: te,
4786
- onSourceViewChange: I,
4786
+ onSourceViewChange: E,
4787
4787
  onClose: () => D(!1),
4788
4788
  onEdit: (F) => {
4789
4789
  q(F);
@@ -4862,7 +4862,7 @@ function xi({
4862
4862
  ] })
4863
4863
  ] }),
4864
4864
  /* @__PURE__ */ s(Ft, { children: [
4865
- /* @__PURE__ */ t(It, { children: "Cancel" }),
4865
+ /* @__PURE__ */ t(Et, { children: "Cancel" }),
4866
4866
  /* @__PURE__ */ s(
4867
4867
  ha,
4868
4868
  {