react-semaphor 0.1.526 → 0.1.528

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 (180) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1190 -296
  3. package/dist/brand-studio/index.js +15 -15
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-D1ofR4KJ.js → calculated-field-identity-DUu-tCQw.js} +66 -65
  6. package/dist/chunks/{card-config-utils-9sv4e-Vb.js → card-config-utils-BdPceiw8.js} +68 -65
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-BkskKMck.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-DXz1GhFZ.js → dashboard-briefing-launcher-Bb0RhGRC.js} +372 -359
  10. package/dist/chunks/{dashboard-controls-Df8qOSrs.js → dashboard-controls-loWTHPMi.js} +739 -686
  11. package/dist/chunks/{dashboard-json-Xldp0qww.js → dashboard-json-DUci_SOR.js} +10 -10
  12. package/dist/chunks/{edit-dashboard-visual-COHBqyic.js → edit-dashboard-visual-z9WN26w7.js} +6603 -6572
  13. package/dist/chunks/{editor-action-buttons-DahlP57T.js → editor-action-buttons-CGSFK9S-.js} +266 -267
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-CdXSo1pb.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-CbjuruKe.js → index-CTYnXU85.js} +781 -780
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DhykwdZs.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-2VAzGlt8.js → matrix-control-sources-BV9ywFtJ.js} +11 -11
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-1Mm8x8w7.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-Dp7kFpVk.js +1383 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-CZa3556D.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-Bqdtknud.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/{report-preferences-dialog-BcH-0lR-.js → report-preferences-dialog-VV0-Ro6F.js} +131 -132
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-NF5C07yM.js → selection-reducer-IZjBSU6Z.js} +47 -26
  35. package/dist/chunks/semantic-format-BBLvfwua.js +192 -0
  36. package/dist/chunks/{semaphor-ready-indicator-BLRDuLr4.js → semaphor-ready-indicator-DbA4mVQL.js} +49909 -46207
  37. package/dist/chunks/{slider-BYIH4icg.js → slider-DpiJG8lv.js} +81 -82
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/switch-C4YH-W1X.js +24003 -0
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +12 -12
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +165 -168
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +1 -1
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  58. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  59. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  60. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  61. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  62. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  63. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  64. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  65. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  66. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  67. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  68. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  69. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  70. package/dist/types/index.js +5 -5
  71. package/dist/types/lib/api/exports-api.d.ts +3 -0
  72. package/dist/types/lib/csv-download.d.ts +9 -0
  73. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  74. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  75. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  76. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  77. package/dist/types/lib/export-utils.d.ts +17 -15
  78. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  79. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  80. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  81. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  82. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  83. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  84. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  85. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  86. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  87. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  88. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  89. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  90. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  91. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  92. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  93. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  94. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  95. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  96. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  97. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  98. package/dist/types/lib/types/common-types.d.ts +5 -0
  99. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  100. package/dist/types/lib/types/semantic-types.d.ts +4 -2
  101. package/dist/types/lib/types/token-types.d.ts +0 -1
  102. package/dist/types/lib/utils/aggregate-expression-utils.d.ts +0 -4
  103. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  104. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  105. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  106. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  107. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  108. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +89 -0
  109. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +32 -0
  110. package/dist/types/shared/analytics-protocol/contracts.d.ts +48 -7
  111. package/dist/types/shared/analytics-protocol/index.d.ts +15 -1
  112. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  113. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  114. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  115. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +61 -6
  116. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +63 -0
  117. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  118. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  119. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  120. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  121. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  122. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  123. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  124. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  125. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  126. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  127. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  128. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  129. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  130. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  131. package/dist/types/shared/temporal/index.d.ts +5 -0
  132. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  133. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  134. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  135. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  136. package/package.json +1 -17
  137. package/src/data-app-sdk/README.md +6 -3
  138. package/dist/chunks/code-highlight-994tgM9v.js +0 -22265
  139. package/dist/chunks/dashboard-CsHvEtjN.js +0 -15
  140. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  141. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  142. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  143. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  144. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  145. package/dist/chunks/pre-block-Cq1RqhZX.js +0 -3987
  146. package/dist/chunks/search-CJz-QQ0Q.js +0 -24
  147. package/dist/chunks/switch-XaAACBrJ.js +0 -2234
  148. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  149. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  150. package/dist/data-app-builder/index.js +0 -3666
  151. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  152. package/dist/data-app-codegen/index.js +0 -22
  153. package/dist/data-app-codegen-node/index.js +0 -1807
  154. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  155. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  156. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  157. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  158. package/dist/types/data-app-builder/constants.d.ts +0 -14
  159. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  160. package/dist/types/data-app-builder/index.d.ts +0 -1
  161. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  162. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  163. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  164. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  165. package/dist/types/data-app-builder/types.d.ts +0 -558
  166. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  167. package/dist/types/data-app-builder.d.ts +0 -2
  168. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  169. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  170. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  171. package/dist/types/data-app-codegen/index.d.ts +0 -6
  172. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  173. package/dist/types/data-app-codegen/node.d.ts +0 -2
  174. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  175. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  176. package/dist/types/data-app-codegen-node.d.ts +0 -2
  177. package/dist/types/data-app-codegen.d.ts +0 -2
  178. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  179. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  180. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -1,19 +1,18 @@
1
- import { jsxs as l, jsx as a, Fragment as $ } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as a, Fragment as B } from "react/jsx-runtime";
2
2
  import Pe, { useRef as M, useState as C, useCallback as _, useEffect as U, lazy as ie, Suspense as J, Activity as De, useMemo as q, useId as V } from "react";
3
- import { aJ as Re, aK as _e, aL as Ae, aM as Ie, aN as Le, a as Fe, E as ze, F as Ue, B as Oe, S as je, U as Ve, D as We, C as Me, ax as Se, aO as $e, aP as ce, aQ as Z, aR as Be, e as He, f as Ke, g as Ge, h as Je, i as de, j as ue, aS as qe, aT as oe, aU as Ze, aV as Ye, aW as Xe, aX as Qe, aY as ea } from "./semaphor-ready-indicator-BLRDuLr4.js";
4
- import { u as R, E as aa, c as z, Z as ta, $ as ra, P as la, a as na, B as L, b as sa, C as me, L as xe, _ as I, S as ae, d as te, e as re, f as le, g as F } from "./code-highlight-994tgM9v.js";
5
- import { L as O, T as ia, a as oa, b as fe, d as he } from "./switch-XaAACBrJ.js";
6
- import { X as ca } from "./x-CXDkqdur.js";
7
- import "./validators-CsdOtZI6.js";
8
- import "./matrix-operation-contract-D32U2CSw.js";
9
- import { parseValueFormatPreferencesResponse as da, canonicalizeSupportedLocale as we, getSupportedCurrencyCodes as ua, canonicalizeSupportedCurrencyCode as ma } from "../value-format-preferences/index.js";
10
- import { S as fa } from "./pre-block-Cq1RqhZX.js";
11
- import { a as ha } from "./report-runtime-context-CxIoGyNM.js";
12
- import { r as H, a as W } from "./raw-temporal-7bFbXd2a.js";
3
+ import { aN as Re, aO as _e, aP as Ae, aQ as Ie, aR as Fe, b as Le, E as ze, F as Ue, S as Oe, B as je, a as Ve, U as We, D as Me, C as Be, aB as Se, aS as $e, aT as ce, aU as Z, aV as He, f as Ge, g as Ke, h as Je, i as qe, j as de, k as ue, aW as Ze, aX as oe, aY as Ye, aZ as Xe, a_ as Qe, a$ as ea, b0 as aa } from "./semaphor-ready-indicator-DbA4mVQL.js";
4
+ import { u as R, a0 as ta, m as O, c as z, ah as ra, ai as la, P as na, a as sa, B as F, b as ia, d as me, L as xe, aj as I, s as ae, t as te, v as re, w as le, x as L, T as oa, e as ca, f as fe, h as he } from "./switch-C4YH-W1X.js";
5
+ import { X as da } from "./x-CXDkqdur.js";
6
+ import "./validators-CQcG0EPN.js";
7
+ import "./matrix-operation-contract-Dp7kFpVk.js";
8
+ import "zod";
9
+ import { parseValueFormatPreferencesResponse as ua, canonicalizeSupportedLocale as we, getSupportedCurrencyCodes as ma, canonicalizeSupportedCurrencyCode as fa } from "../value-format-preferences/index.js";
10
+ import { a as ha } from "./report-runtime-context-CtaGGlit.js";
11
+ import { r as H, g as W } from "./raw-temporal-CdnA_OXJ.js";
13
12
  function va(e = []) {
14
13
  const r = M(null), t = M(null), s = M(null), [n, i] = C(), o = _(() => {
15
- var g, v, p;
16
- const m = ((g = r.current) == null ? void 0 : g.clientWidth) ?? 0, h = ((v = s.current) == null ? void 0 : v.offsetWidth) ?? 0, y = ((p = t.current) == null ? void 0 : p.offsetWidth) ?? 0, f = m - h - y - 8, S = Math.max(f, 0);
14
+ var b, v, p;
15
+ const m = ((b = r.current) == null ? void 0 : b.clientWidth) ?? 0, h = ((v = s.current) == null ? void 0 : v.offsetWidth) ?? 0, y = ((p = t.current) == null ? void 0 : p.offsetWidth) ?? 0, f = m - h - y - 8, S = Math.max(f, 0);
17
16
  i((k) => k === S ? k : S);
18
17
  }, []);
19
18
  return U(() => {
@@ -35,20 +34,20 @@ function pa({ filter: e }) {
35
34
  (p) => p.isDashboardEditing
36
35
  ), { preferences: t } = Re(), s = _e((v = t == null ? void 0 : t.cardDisplay) == null ? void 0 : v.mode), n = R((p) => p.filterValues), i = n == null ? void 0 : n.some(
37
36
  (p) => p.filterId === e.id
38
- ), { removeFilterValues: o, removeFilter: m, updateFilter: h } = aa(), {
37
+ ), { removeFilterValues: o, removeFilter: m, updateFilter: h } = ta(), {
39
38
  headerRef: y,
40
39
  leftActionsRef: N,
41
40
  rightActionsRef: f,
42
41
  titleMaxWidth: S,
43
- updateAvailableWidth: g
42
+ updateAvailableWidth: b
44
43
  } = va([
45
44
  r,
46
45
  i,
47
46
  s
48
47
  ]);
49
48
  return U(() => {
50
- g();
51
- }, [e.title, g]), /* @__PURE__ */ l(
49
+ b();
50
+ }, [e.title, b]), /* @__PURE__ */ l(
52
51
  "div",
53
52
  {
54
53
  ref: y,
@@ -87,7 +86,7 @@ function pa({ filter: e }) {
87
86
  o(e.id), m(e.id);
88
87
  },
89
88
  className: "text-muted-foreground hover:text-foreground",
90
- children: /* @__PURE__ */ a(ca, { className: "size-3.5" })
89
+ children: /* @__PURE__ */ a(da, { className: "size-3.5" })
91
90
  }
92
91
  )
93
92
  ]
@@ -114,7 +113,7 @@ function ya() {
114
113
  className: "flex min-w-[250px] max-w-fit flex-col gap-1 p-2",
115
114
  children: [
116
115
  /* @__PURE__ */ a(pa, { filter: s }),
117
- /* @__PURE__ */ a(Le, { filter: s })
116
+ /* @__PURE__ */ a(Fe, { filter: s })
118
117
  ]
119
118
  },
120
119
  s.id
@@ -122,13 +121,13 @@ function ya() {
122
121
  }
123
122
  ) : null;
124
123
  }
125
- function ga() {
124
+ function ba() {
126
125
  var i;
127
126
  const e = R((o) => o.dashboard), r = R((o) => o.selectedSheetId), t = R(
128
127
  (o) => o.isDashboardEditing
129
128
  ), s = (i = e.sheets) == null ? void 0 : i.find(
130
129
  (o) => o.id === r
131
- ), n = ta(s);
130
+ ), n = ra(s);
132
131
  return /* @__PURE__ */ a(
133
132
  "div",
134
133
  {
@@ -136,14 +135,14 @@ function ga() {
136
135
  className: "flex min-h-0 grow basis-0 overflow-hidden",
137
136
  children: /* @__PURE__ */ l("section", { className: "flex min-h-0 grow basis-0 flex-col overflow-hidden", children: [
138
137
  t && !n && /* @__PURE__ */ a(ya, {}),
139
- /* @__PURE__ */ a(Fe, {})
138
+ /* @__PURE__ */ a(Le, {})
140
139
  ] })
141
140
  }
142
141
  );
143
142
  }
144
- const ba = ie(() => import("./dashboard-controls-Df8qOSrs.js")), Sa = ie(
145
- () => import("./edit-dashboard-visual-COHBqyic.js")
146
- ), xa = ie(() => import("./dashboard-json-Xldp0qww.js"));
143
+ const ga = ie(() => import("./dashboard-controls-loWTHPMi.js")), Sa = ie(
144
+ () => import("./edit-dashboard-visual-z9WN26w7.js")
145
+ ), xa = ie(() => import("./dashboard-json-DUci_SOR.js"));
147
146
  function Ga({
148
147
  showControls: e = !1,
149
148
  showFooter: r = !0,
@@ -152,11 +151,11 @@ function Ga({
152
151
  const s = R((m) => m.isVisualEditing), n = R(
153
152
  (m) => m.showDashboardJSON
154
153
  ), { appearance: i, preferences: o } = t;
155
- return /* @__PURE__ */ a(ze, { FallbackComponent: Ue, children: /* @__PURE__ */ a(fa, { dashboardProps: t, children: /* @__PURE__ */ l(Oe, { children: [
156
- /* @__PURE__ */ a(je, { componentType: "surfboard", componentId: t.id }),
157
- /* @__PURE__ */ l(Ve, { appearance: i, children: [
154
+ return /* @__PURE__ */ a(ze, { FallbackComponent: Ue, children: /* @__PURE__ */ a(Oe, { dashboardProps: t, children: /* @__PURE__ */ l(je, { children: [
155
+ /* @__PURE__ */ a(Ve, { componentType: "surfboard", componentId: t.id }),
156
+ /* @__PURE__ */ l(We, { appearance: i, children: [
158
157
  /* @__PURE__ */ a(
159
- ra,
158
+ la,
160
159
  {
161
160
  toastOptions: {
162
161
  classNames: {
@@ -170,13 +169,13 @@ function Ga({
170
169
  }
171
170
  }
172
171
  ),
173
- /* @__PURE__ */ l(We, { preferences: o, children: [
172
+ /* @__PURE__ */ l(Me, { preferences: o, children: [
174
173
  n && /* @__PURE__ */ a(J, { fallback: null, children: /* @__PURE__ */ a(xa, {}) }),
175
174
  /* @__PURE__ */ l("main", { className: "relative flex h-full w-full flex-col overflow-hidden", children: [
176
- e && /* @__PURE__ */ a(J, { fallback: null, children: /* @__PURE__ */ a(ba, {}) }),
177
- /* @__PURE__ */ a("div", { className: "flex grow overflow-hidden", children: /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ l(Me, { ...t, type: "dashboard", children: [
175
+ e && /* @__PURE__ */ a(J, { fallback: null, children: /* @__PURE__ */ a(ga, {}) }),
176
+ /* @__PURE__ */ a("div", { className: "flex grow overflow-hidden", children: /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ l(Be, { ...t, type: "dashboard", children: [
178
177
  s && /* @__PURE__ */ a(J, { fallback: null, children: /* @__PURE__ */ a(Sa, {}) }),
179
- /* @__PURE__ */ a(De, { mode: s ? "hidden" : "visible", children: /* @__PURE__ */ a(ga, {}) })
178
+ /* @__PURE__ */ a(De, { mode: s ? "hidden" : "visible", children: /* @__PURE__ */ a(ba, {}) })
180
179
  ] }) }) })
181
180
  ] })
182
181
  ] })
@@ -186,7 +185,7 @@ function Ga({
186
185
  function wa(e = {}) {
187
186
  const { authToken: r, tokenProps: t } = Se(), s = R(
188
187
  (T) => T.actions.applyResolvedCalendarPreferences
189
- ), n = e.enabled ?? !0, i = (r == null ? void 0 : r.accessToken) ?? null, o = (t == null ? void 0 : t.apiServiceUrl) ?? null, [m, h] = C(!1), [y, N] = C(!1), [f, S] = C(!1), [g, v] = C(null), [p, k] = C(null), x = M(i);
188
+ ), n = e.enabled ?? !0, i = (r == null ? void 0 : r.accessToken) ?? null, o = (t == null ? void 0 : t.apiServiceUrl) ?? null, [m, h] = C(!1), [y, N] = C(!1), [f, S] = C(!1), [b, v] = C(null), [p, k] = C(null), x = M(i);
190
189
  x.current = i, U(() => {
191
190
  k(null), v(null), h(!1), N(!1), S(!1);
192
191
  }, [i]);
@@ -293,13 +292,13 @@ function wa(e = {}) {
293
292
  isLoading: m,
294
293
  isSaving: y,
295
294
  isClearing: f,
296
- error: g,
295
+ error: b,
297
296
  updatePreferences: D,
298
297
  clearPreferences: A,
299
298
  refetch: E
300
299
  };
301
300
  }
302
- const K = [
301
+ const G = [
303
302
  { value: "America/New_York", label: "Eastern Time (US & Canada)" },
304
303
  { value: "America/Chicago", label: "Central Time (US & Canada)" },
305
304
  { value: "America/Denver", label: "Mountain Time (US & Canada)" },
@@ -326,7 +325,7 @@ function Ta() {
326
325
  return e.supportedValuesOf("timeZone");
327
326
  } catch {
328
327
  }
329
- return K.map((e) => e.value);
328
+ return G.map((e) => e.value);
330
329
  }
331
330
  function Na(e) {
332
331
  if (!e) return "default";
@@ -345,7 +344,7 @@ function Na(e) {
345
344
  }
346
345
  }
347
346
  function pe(e) {
348
- const r = K.find((t) => t.value === e);
347
+ const r = G.find((t) => t.value === e);
349
348
  return r ? r.label : e;
350
349
  }
351
350
  function Ca(e) {
@@ -363,13 +362,13 @@ function ka({
363
362
  isClearing: i,
364
363
  updatePreferences: o,
365
364
  clearPreferences: m
366
- } = wa({ enabled: e }), h = $e(), y = (t == null ? void 0 : t.resolved.tz) || (h == null ? void 0 : h.tz) || "UTC", N = (t == null ? void 0 : t.resolved.weekStart) ?? (h == null ? void 0 : h.weekStart) ?? 1, [f, S] = C((t == null ? void 0 : t.stored) === null), [g, v] = C(!1), [p, k] = C(
365
+ } = wa({ enabled: e }), h = $e(), y = (t == null ? void 0 : t.resolved.tz) || (h == null ? void 0 : h.tz) || "UTC", N = (t == null ? void 0 : t.resolved.weekStart) ?? (h == null ? void 0 : h.weekStart) ?? 1, [f, S] = C((t == null ? void 0 : t.stored) === null), [b, v] = C(!1), [p, k] = C(
367
366
  y
368
367
  ), [x, P] = C(
369
368
  N
370
369
  ), [E, D] = C(!1), A = q(() => Ta(), []), T = q(
371
370
  () => A.filter(
372
- (b) => !K.some((Ee) => Ee.value === b)
371
+ (g) => !G.some((Ee) => Ee.value === g)
373
372
  ),
374
373
  [A]
375
374
  ), c = q(() => pe(p), [p]), u = t != null && t.inherited ? pe(t.inherited.tz) : "UTC", w = t != null && t.inherited ? Ca(t.inherited.weekStart) : "Monday", d = Na(
@@ -380,15 +379,15 @@ function ka({
380
379
  v(!1);
381
380
  return;
382
381
  }
383
- g || (t && S(t.stored === null), k(y), P(N));
382
+ b || (t && S(t.stored === null), k(y), P(N));
384
383
  }, [
385
384
  e,
386
- g,
385
+ b,
387
386
  t,
388
387
  y,
389
388
  N
390
389
  ]);
391
- const B = async () => {
390
+ const $ = async () => {
392
391
  if (s) {
393
392
  I.error("Preferences are still loading. Please try again.");
394
393
  return;
@@ -399,15 +398,15 @@ function ka({
399
398
  }) ? (I.success("Preferences saved."), r()) : I.error("Failed to save preferences. Please try again.");
400
399
  }, j = () => {
401
400
  r();
402
- }, G = n || i, ke = G || s;
403
- return /* @__PURE__ */ l($, { children: [
401
+ }, K = n || i, ke = K || s;
402
+ return /* @__PURE__ */ l(B, { children: [
404
403
  /* @__PURE__ */ l("div", { className: "space-y-4 py-1", children: [
405
404
  /* @__PURE__ */ l(
406
405
  ce,
407
406
  {
408
407
  value: f ? "defaults" : "custom",
409
- onValueChange: (b) => {
410
- v(!0), S(b === "defaults");
408
+ onValueChange: (g) => {
409
+ v(!0), S(g === "defaults");
411
410
  },
412
411
  className: "space-y-0.5",
413
412
  children: [
@@ -484,14 +483,14 @@ function ka({
484
483
  /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
485
484
  /* @__PURE__ */ a(O, { className: ve, children: "Timezone" }),
486
485
  /* @__PURE__ */ l(
487
- la,
486
+ na,
488
487
  {
489
488
  open: E,
490
489
  onOpenChange: D,
491
490
  modal: !0,
492
491
  children: [
493
- /* @__PURE__ */ a(na, { asChild: !0, children: /* @__PURE__ */ l(
494
- L,
492
+ /* @__PURE__ */ a(sa, { asChild: !0, children: /* @__PURE__ */ l(
493
+ F,
495
494
  {
496
495
  variant: "outline",
497
496
  size: "xs",
@@ -501,25 +500,25 @@ function ka({
501
500
  disabled: f,
502
501
  children: [
503
502
  /* @__PURE__ */ a("span", { className: "truncate", children: c }),
504
- /* @__PURE__ */ a(Be, { className: "ml-2 h-3.5 w-3.5 shrink-0 opacity-50" })
503
+ /* @__PURE__ */ a(He, { className: "ml-2 h-3.5 w-3.5 shrink-0 opacity-50" })
505
504
  ]
506
505
  }
507
506
  ) }),
508
507
  /* @__PURE__ */ a(
509
- sa,
508
+ ia,
510
509
  {
511
510
  className: "z-50 w-[--radix-popover-trigger-width] p-0",
512
511
  align: "start",
513
- children: /* @__PURE__ */ l(He, { className: "overflow-visible", children: [
512
+ children: /* @__PURE__ */ l(Ge, { className: "overflow-visible", children: [
514
513
  /* @__PURE__ */ a(Ke, { placeholder: "Search timezones…" }),
515
- /* @__PURE__ */ l(Ge, { children: [
516
- /* @__PURE__ */ a(Je, { children: "No timezone found." }),
517
- /* @__PURE__ */ a(de, { heading: "Common", children: K.map((b) => /* @__PURE__ */ l(
514
+ /* @__PURE__ */ l(Je, { children: [
515
+ /* @__PURE__ */ a(qe, { children: "No timezone found." }),
516
+ /* @__PURE__ */ a(de, { heading: "Common", children: G.map((g) => /* @__PURE__ */ l(
518
517
  ue,
519
518
  {
520
- value: `${b.value} ${b.label}`,
519
+ value: `${g.value} ${g.label}`,
521
520
  onSelect: () => {
522
- v(!0), k(b.value), D(!1);
521
+ v(!0), k(g.value), D(!1);
523
522
  },
524
523
  children: [
525
524
  /* @__PURE__ */ a(
@@ -527,23 +526,23 @@ function ka({
527
526
  {
528
527
  className: z(
529
528
  "h-3.5 w-3.5",
530
- p === b.value ? "opacity-100" : "opacity-0"
529
+ p === g.value ? "opacity-100" : "opacity-0"
531
530
  )
532
531
  }
533
532
  ),
534
- /* @__PURE__ */ a("span", { className: "flex-1", children: b.label }),
535
- /* @__PURE__ */ a("span", { className: "text-[11px] text-muted-foreground", children: b.value })
533
+ /* @__PURE__ */ a("span", { className: "flex-1", children: g.label }),
534
+ /* @__PURE__ */ a("span", { className: "text-[11px] text-muted-foreground", children: g.value })
536
535
  ]
537
536
  },
538
- b.value
537
+ g.value
539
538
  )) }),
540
- /* @__PURE__ */ a(qe, {}),
541
- /* @__PURE__ */ a(de, { heading: "All timezones", children: T.map((b) => /* @__PURE__ */ l(
539
+ /* @__PURE__ */ a(Ze, {}),
540
+ /* @__PURE__ */ a(de, { heading: "All timezones", children: T.map((g) => /* @__PURE__ */ l(
542
541
  ue,
543
542
  {
544
- value: b,
543
+ value: g,
545
544
  onSelect: () => {
546
- v(!0), k(b), D(!1);
545
+ v(!0), k(g), D(!1);
547
546
  },
548
547
  children: [
549
548
  /* @__PURE__ */ a(
@@ -551,14 +550,14 @@ function ka({
551
550
  {
552
551
  className: z(
553
552
  "h-3.5 w-3.5",
554
- p === b ? "opacity-100" : "opacity-0"
553
+ p === g ? "opacity-100" : "opacity-0"
555
554
  )
556
555
  }
557
556
  ),
558
- b
557
+ g
559
558
  ]
560
559
  },
561
- b
560
+ g
562
561
  )) })
563
562
  ] })
564
563
  ] })
@@ -574,15 +573,15 @@ function ka({
574
573
  ce,
575
574
  {
576
575
  value: String(x),
577
- onValueChange: (b) => {
578
- v(!0), P(Number(b));
576
+ onValueChange: (g) => {
577
+ v(!0), P(Number(g));
579
578
  },
580
579
  className: "flex gap-4",
581
580
  disabled: f,
582
- children: Te.map((b) => /* @__PURE__ */ l(
581
+ children: Te.map((g) => /* @__PURE__ */ l(
583
582
  "label",
584
583
  {
585
- htmlFor: `week-start-${b.value}`,
584
+ htmlFor: `week-start-${g.value}`,
586
585
  className: z(
587
586
  "flex cursor-pointer items-center gap-2 text-[13px]",
588
587
  f && "cursor-not-allowed"
@@ -591,15 +590,15 @@ function ka({
591
590
  /* @__PURE__ */ a(
592
591
  Z,
593
592
  {
594
- value: String(b.value),
595
- id: `week-start-${b.value}`,
593
+ value: String(g.value),
594
+ id: `week-start-${g.value}`,
596
595
  disabled: f
597
596
  }
598
597
  ),
599
- b.label
598
+ g.label
600
599
  ]
601
600
  },
602
- b.value
601
+ g.value
603
602
  ))
604
603
  }
605
604
  )
@@ -610,16 +609,16 @@ function ka({
610
609
  ] }),
611
610
  /* @__PURE__ */ l(oe, { children: [
612
611
  /* @__PURE__ */ a(
613
- L,
612
+ F,
614
613
  {
615
614
  variant: "outline",
616
615
  size: "xs",
617
616
  onClick: j,
618
- disabled: G,
617
+ disabled: K,
619
618
  children: "Cancel"
620
619
  }
621
620
  ),
622
- /* @__PURE__ */ a(L, { size: "xs", onClick: B, disabled: ke, children: G ? /* @__PURE__ */ l($, { children: [
621
+ /* @__PURE__ */ a(F, { size: "xs", onClick: $, disabled: ke, children: K ? /* @__PURE__ */ l(B, { children: [
623
622
  /* @__PURE__ */ a(xe, { className: "h-3.5 w-3.5 animate-spin" }),
624
623
  "Saving…"
625
624
  ] }) : "Save" })
@@ -631,12 +630,12 @@ function Ea(e = {}) {
631
630
  (c) => c.actions.applyResolvedValueFormatPreferences
632
631
  ), n = e.enabled ?? !0, i = (r == null ? void 0 : r.accessToken) ?? null, o = (t == null ? void 0 : t.apiServiceUrl) ?? null, m = M(i);
633
632
  m.current = i;
634
- const [h, y] = C(null), [N, f] = C(!1), [S, g] = C(!1), [v, p] = C(!1), [k, x] = C(null);
633
+ const [h, y] = C(null), [N, f] = C(!1), [S, b] = C(!1), [v, p] = C(!1), [k, x] = C(null);
635
634
  U(() => {
636
- y(null), x(null), f(!1), g(!1), p(!1);
635
+ y(null), x(null), f(!1), b(!1), p(!1);
637
636
  }, [i]);
638
637
  const P = _(async (c) => {
639
- const u = da(await c.json());
638
+ const u = ua(await c.json());
640
639
  if (!u.ok)
641
640
  throw new Error("Value format preferences response is invalid");
642
641
  return u.value;
@@ -681,14 +680,14 @@ function Ea(e = {}) {
681
680
  const A = _(
682
681
  async (c) => {
683
682
  const u = i;
684
- g(!0), x(null);
683
+ b(!0), x(null);
685
684
  try {
686
685
  const w = await E("PATCH", c);
687
686
  return m.current !== u ? !1 : (y(w), s(w.resolved, w.sources), !0);
688
687
  } catch (w) {
689
688
  return m.current === u && x(w instanceof Error ? w.message : "Unknown error"), !1;
690
689
  } finally {
691
- m.current === u && g(!1);
690
+ m.current === u && b(!1);
692
691
  }
693
692
  },
694
693
  [i, s, E]
@@ -739,7 +738,7 @@ const ne = [
739
738
  "INR",
740
739
  "BRL",
741
740
  "KWD"
742
- ]), Pa = ua(), Da = Pa.filter(
741
+ ]), Pa = ma(), Da = Pa.filter(
743
742
  (e) => !Ne.has(e)
744
743
  ), Ce = [
745
744
  { value: "short", label: "Short" },
@@ -801,7 +800,7 @@ function ee({
801
800
  children: [
802
801
  /* @__PURE__ */ a(te, { id: e, size: "xs", children: /* @__PURE__ */ a(re, { children: h }) }),
803
802
  /* @__PURE__ */ l(le, { children: [
804
- /* @__PURE__ */ a(F, { value: "inherit", className: "[&>span:last-child]:w-full", children: /* @__PURE__ */ l("span", { className: "flex w-full min-w-0 items-center justify-between gap-4", children: [
803
+ /* @__PURE__ */ a(L, { value: "inherit", className: "[&>span:last-child]:w-full", children: /* @__PURE__ */ l("span", { className: "flex w-full min-w-0 items-center justify-between gap-4", children: [
805
804
  /* @__PURE__ */ l("span", { children: [
806
805
  "Inherited from ",
807
806
  se(n),
@@ -812,7 +811,7 @@ function ee({
812
811
  /* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: i[s] })
813
812
  ] }) }),
814
813
  Ce.map((y) => /* @__PURE__ */ a(
815
- F,
814
+ L,
816
815
  {
817
816
  value: y.value,
818
817
  className: "[&>span:last-child]:w-full",
@@ -837,7 +836,7 @@ function _a({
837
836
  disabled: n
838
837
  }) {
839
838
  var T, c, u, w;
840
- const i = V(), o = V(), m = V(), h = V(), y = V(), f = (e.locale === void 0 ? void 0 : we(e.locale)) ?? r.locale, S = e.defaultCurrency ?? r.defaultCurrency, g = {
839
+ const i = V(), o = V(), m = V(), h = V(), y = V(), f = (e.locale === void 0 ? void 0 : we(e.locale)) ?? r.locale, S = e.defaultCurrency ?? r.defaultCurrency, b = {
841
840
  locale: f,
842
841
  dateStyle: e.dateStyle ?? r.dateStyle,
843
842
  dateTime: {
@@ -849,7 +848,7 @@ function _a({
849
848
  style: "currency",
850
849
  currency: S
851
850
  }).format(1e3), p = H({
852
- preferences: g,
851
+ preferences: b,
853
852
  calendar: { tz: "UTC" }
854
853
  }), k = W({
855
854
  value: ye,
@@ -864,7 +863,7 @@ function _a({
864
863
  value: ye,
865
864
  metadata: { kind: "raw_temporal", valueKind: "date" },
866
865
  format: H({
867
- preferences: { ...g, dateStyle: d },
866
+ preferences: { ...b, dateStyle: d },
868
867
  calendar: { tz: "UTC" }
869
868
  })
870
869
  }).text
@@ -874,8 +873,8 @@ function _a({
874
873
  metadata: { kind: "raw_temporal", valueKind: "wall_datetime" },
875
874
  format: H({
876
875
  preferences: {
877
- ...g,
878
- dateTime: { ...g.dateTime, dateStyle: d }
876
+ ...b,
877
+ dateTime: { ...b.dateTime, dateStyle: d }
879
878
  },
880
879
  calendar: { tz: "UTC" }
881
880
  })
@@ -886,16 +885,16 @@ function _a({
886
885
  metadata: { kind: "raw_temporal", valueKind: "wall_datetime" },
887
886
  format: H({
888
887
  preferences: {
889
- ...g,
890
- dateTime: { ...g.dateTime, timeStyle: d }
888
+ ...b,
889
+ dateTime: { ...b.dateTime, timeStyle: d }
891
890
  },
892
891
  calendar: { tz: "UTC" }
893
892
  })
894
893
  }).text
895
- ), A = (d, B) => {
894
+ ), A = (d, $) => {
896
895
  const j = {
897
896
  ...e.dateTime,
898
- [d]: B === "inherit" ? void 0 : B
897
+ [d]: $ === "inherit" ? void 0 : $
899
898
  };
900
899
  s({
901
900
  ...e,
@@ -924,7 +923,7 @@ function _a({
924
923
  children: [
925
924
  /* @__PURE__ */ a(te, { id: i, size: "xs", children: /* @__PURE__ */ a(re, { children: e.locale === void 0 ? `Inherited · ${r.locale}` : Ra(e.locale) }) }),
926
925
  /* @__PURE__ */ l(le, { children: [
927
- /* @__PURE__ */ l(F, { value: "inherit", children: [
926
+ /* @__PURE__ */ l(L, { value: "inherit", children: [
928
927
  "Inherited from ",
929
928
  se(t.locale),
930
929
  " ·",
@@ -933,8 +932,8 @@ function _a({
933
932
  ] }),
934
933
  e.locale && !ne.some(
935
934
  (d) => d.value === e.locale
936
- ) && /* @__PURE__ */ a(F, { value: e.locale, children: e.locale }),
937
- ne.map((d) => /* @__PURE__ */ l(F, { value: d.value, children: [
935
+ ) && /* @__PURE__ */ a(L, { value: e.locale, children: e.locale }),
936
+ ne.map((d) => /* @__PURE__ */ l(L, { value: d.value, children: [
938
937
  d.label,
939
938
  " — ",
940
939
  d.value
@@ -1013,15 +1012,15 @@ function _a({
1013
1012
  children: [
1014
1013
  /* @__PURE__ */ a(te, { id: o, size: "xs", children: /* @__PURE__ */ a(re, { children: e.defaultCurrency === void 0 ? `Inherited · ${r.defaultCurrency}` : e.defaultCurrency }) }),
1015
1014
  /* @__PURE__ */ l(le, { children: [
1016
- /* @__PURE__ */ l(F, { value: "inherit", children: [
1015
+ /* @__PURE__ */ l(L, { value: "inherit", children: [
1017
1016
  "Inherited from ",
1018
1017
  se(t.defaultCurrency),
1019
1018
  " ·",
1020
1019
  " ",
1021
1020
  r.defaultCurrency
1022
1021
  ] }),
1023
- [...Ne].map((d) => /* @__PURE__ */ a(F, { value: d, children: d }, d)),
1024
- Da.map((d) => /* @__PURE__ */ a(F, { value: d, children: d }, d))
1022
+ [...Ne].map((d) => /* @__PURE__ */ a(L, { value: d, children: d }, d)),
1023
+ Da.map((d) => /* @__PURE__ */ a(L, { value: d, children: d }, d))
1025
1024
  ] })
1026
1025
  ]
1027
1026
  }
@@ -1047,14 +1046,14 @@ function _a({
1047
1046
  /* @__PURE__ */ a("p", { className: "text-[11px] text-muted-foreground", children: "Currency values are not converted. Date examples use a fixed reference value and the Gregorian calendar." })
1048
1047
  ] });
1049
1048
  }
1050
- const ge = [
1049
+ const be = [
1051
1050
  "locale",
1052
1051
  "dateStyle",
1053
1052
  "dateTime.dateStyle",
1054
1053
  "dateTime.timeStyle",
1055
1054
  "defaultCurrency"
1056
1055
  ];
1057
- function be(e, r) {
1056
+ function ge(e, r) {
1058
1057
  var t, s;
1059
1058
  switch (r) {
1060
1059
  case "locale":
@@ -1083,17 +1082,17 @@ function Ia({
1083
1082
  active: e,
1084
1083
  onClose: r
1085
1084
  }) {
1086
- var m, h, y, N, f, S, g;
1085
+ var m, h, y, N, f, S, b;
1087
1086
  const { preferences: t, isLoading: s, isSaving: n, updatePreferences: i } = Ea({ enabled: e });
1088
1087
  if (!e) return null;
1089
1088
  if (!t)
1090
- return /* @__PURE__ */ l($, { children: [
1089
+ return /* @__PURE__ */ l(B, { children: [
1091
1090
  /* @__PURE__ */ a("div", { className: "py-2", children: /* @__PURE__ */ a("div", { className: "flex min-h-36 items-center justify-center text-[12px] text-muted-foreground", children: s ? "Loading preferences…" : "Preferences unavailable." }) }),
1092
1091
  /* @__PURE__ */ l(oe, { className: "justify-between sm:justify-between", children: [
1093
- /* @__PURE__ */ a(L, { variant: "ghost", size: "xs", disabled: !0, children: "Reset display formats" }),
1092
+ /* @__PURE__ */ a(F, { variant: "ghost", size: "xs", disabled: !0, children: "Reset display formats" }),
1094
1093
  /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
1095
- /* @__PURE__ */ a(L, { variant: "outline", size: "xs", onClick: r, children: "Cancel" }),
1096
- /* @__PURE__ */ a(L, { size: "xs", disabled: !0, children: "Save" })
1094
+ /* @__PURE__ */ a(F, { variant: "outline", size: "xs", onClick: r, children: "Cancel" }),
1095
+ /* @__PURE__ */ a(F, { size: "xs", disabled: !0, children: "Save" })
1097
1096
  ] })
1098
1097
  ] })
1099
1098
  ] });
@@ -1102,10 +1101,10 @@ function Ia({
1102
1101
  ((h = t.stored) == null ? void 0 : h.dateStyle) ?? "",
1103
1102
  ((N = (y = t.stored) == null ? void 0 : y.dateTime) == null ? void 0 : N.dateStyle) ?? "",
1104
1103
  ((S = (f = t.stored) == null ? void 0 : f.dateTime) == null ? void 0 : S.timeStyle) ?? "",
1105
- ((g = t.stored) == null ? void 0 : g.defaultCurrency) ?? ""
1104
+ ((b = t.stored) == null ? void 0 : b.defaultCurrency) ?? ""
1106
1105
  ].join(":");
1107
1106
  return /* @__PURE__ */ a(
1108
- La,
1107
+ Fa,
1109
1108
  {
1110
1109
  preferences: t,
1111
1110
  isSaving: n,
@@ -1115,7 +1114,7 @@ function Ia({
1115
1114
  o
1116
1115
  );
1117
1116
  }
1118
- function La({
1117
+ function Fa({
1119
1118
  preferences: e,
1120
1119
  isSaving: r,
1121
1120
  updatePreferences: t,
@@ -1124,27 +1123,27 @@ function La({
1124
1123
  var y, N;
1125
1124
  const [n, i] = C(
1126
1125
  () => Aa(e.stored)
1127
- ), o = (n.locale === void 0 || we(n.locale) !== void 0) && (n.defaultCurrency === void 0 || ma(n.defaultCurrency) !== void 0) && (n.dateStyle === void 0 || ["short", "medium", "long"].includes(n.dateStyle)) && (((y = n.dateTime) == null ? void 0 : y.dateStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.dateStyle)) && (((N = n.dateTime) == null ? void 0 : N.timeStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.timeStyle)), m = async () => {
1126
+ ), o = (n.locale === void 0 || we(n.locale) !== void 0) && (n.defaultCurrency === void 0 || fa(n.defaultCurrency) !== void 0) && (n.dateStyle === void 0 || ["short", "medium", "long"].includes(n.dateStyle)) && (((y = n.dateTime) == null ? void 0 : y.dateStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.dateStyle)) && (((N = n.dateTime) == null ? void 0 : N.timeStyle) === void 0 || ["short", "medium", "long"].includes(n.dateTime.timeStyle)), m = async () => {
1128
1127
  const f = {
1129
1128
  ...n.locale !== void 0 ? { locale: n.locale } : {},
1130
1129
  ...n.dateStyle !== void 0 ? { dateStyle: n.dateStyle } : {},
1131
1130
  ...n.dateTime ? { dateTime: { ...n.dateTime } } : {},
1132
1131
  ...n.defaultCurrency !== void 0 ? { defaultCurrency: n.defaultCurrency } : {}
1133
- }, S = ge.filter(
1134
- (p) => be(n, p) === void 0 && be(e.stored, p) !== void 0
1135
- ), g = {
1132
+ }, S = be.filter(
1133
+ (p) => ge(n, p) === void 0 && ge(e.stored, p) !== void 0
1134
+ ), b = {
1136
1135
  ...Object.keys(f).length > 0 ? { set: f } : {},
1137
1136
  ...S.length > 0 ? { clear: S } : {}
1138
1137
  };
1139
- (Object.keys(g).length === 0 ? !0 : await t(g)) ? (I.success("Display format preferences saved."), s()) : I.error("Failed to save preferences. Please try again.");
1138
+ (Object.keys(b).length === 0 ? !0 : await t(b)) ? (I.success("Display format preferences saved."), s()) : I.error("Failed to save preferences. Please try again.");
1140
1139
  }, h = async () => {
1141
1140
  await t({
1142
- clear: [...ge]
1141
+ clear: [...be]
1143
1142
  }) ? (I.success("Display format preferences reset."), s()) : I.error(
1144
1143
  "Failed to reset display format preferences. Please try again."
1145
1144
  );
1146
1145
  };
1147
- return /* @__PURE__ */ l($, { children: [
1146
+ return /* @__PURE__ */ l(B, { children: [
1148
1147
  /* @__PURE__ */ a("div", { className: "py-2", children: /* @__PURE__ */ a(
1149
1148
  _a,
1150
1149
  {
@@ -1157,7 +1156,7 @@ function La({
1157
1156
  ) }),
1158
1157
  /* @__PURE__ */ l(oe, { className: "justify-between sm:justify-between", children: [
1159
1158
  /* @__PURE__ */ a(
1160
- L,
1159
+ F,
1161
1160
  {
1162
1161
  variant: "ghost",
1163
1162
  size: "xs",
@@ -1168,7 +1167,7 @@ function La({
1168
1167
  ),
1169
1168
  /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
1170
1169
  /* @__PURE__ */ a(
1171
- L,
1170
+ F,
1172
1171
  {
1173
1172
  variant: "outline",
1174
1173
  size: "xs",
@@ -1178,12 +1177,12 @@ function La({
1178
1177
  }
1179
1178
  ),
1180
1179
  /* @__PURE__ */ a(
1181
- L,
1180
+ F,
1182
1181
  {
1183
1182
  size: "xs",
1184
1183
  onClick: m,
1185
1184
  disabled: r || !o,
1186
- children: r ? /* @__PURE__ */ l($, { children: [
1185
+ children: r ? /* @__PURE__ */ l(B, { children: [
1187
1186
  /* @__PURE__ */ a(xe, { className: "h-3.5 w-3.5 animate-spin" }),
1188
1187
  "Saving…"
1189
1188
  ] }) : "Save"
@@ -1193,18 +1192,18 @@ function La({
1193
1192
  ] })
1194
1193
  ] });
1195
1194
  }
1196
- function Ja({
1195
+ function Ka({
1197
1196
  open: e,
1198
1197
  onOpenChange: r
1199
1198
  }) {
1200
1199
  const [t, s] = C("display"), n = () => r(!1);
1201
- return /* @__PURE__ */ a(Ze, { open: e, onOpenChange: r, children: /* @__PURE__ */ l(Ye, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1202
- /* @__PURE__ */ l(Xe, { children: [
1203
- /* @__PURE__ */ a(Qe, { className: "text-[15px]", children: "Report preferences" }),
1204
- /* @__PURE__ */ a(ea, { className: "text-[13px] leading-5", children: "Set how values and Calendar periods appear for you." })
1200
+ return /* @__PURE__ */ a(Ye, { open: e, onOpenChange: r, children: /* @__PURE__ */ l(Xe, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1201
+ /* @__PURE__ */ l(Qe, { children: [
1202
+ /* @__PURE__ */ a(ea, { className: "text-[15px]", children: "Report preferences" }),
1203
+ /* @__PURE__ */ a(aa, { className: "text-[13px] leading-5", children: "Set how values and Calendar periods appear for you." })
1205
1204
  ] }),
1206
- /* @__PURE__ */ l(ia, { value: t, onValueChange: s, children: [
1207
- /* @__PURE__ */ l(oa, { variant: "underline", className: "w-full justify-start", children: [
1205
+ /* @__PURE__ */ l(oa, { value: t, onValueChange: s, children: [
1206
+ /* @__PURE__ */ l(ca, { variant: "underline", className: "w-full justify-start", children: [
1208
1207
  /* @__PURE__ */ a(fe, { value: "display", children: "Display formats" }),
1209
1208
  /* @__PURE__ */ a(fe, { value: "calendar", children: "Calendar" })
1210
1209
  ] }),
@@ -1227,6 +1226,6 @@ function Ja({
1227
1226
  }
1228
1227
  export {
1229
1228
  Ga as D,
1230
- Ja as R,
1229
+ Ka as R,
1231
1230
  _a as a
1232
1231
  };