react-semaphor 0.1.182 → 0.1.184

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 (42) hide show
  1. package/dist/chunks/calendar-preferences-dialog-D9oF_URo.js +1 -0
  2. package/dist/chunks/calendar-preferences-dialog-DeXKY9JD.js +457 -0
  3. package/dist/chunks/common-types-CfJLrTJd.js +1 -0
  4. package/dist/chunks/common-types-DhqlRVrq.js +8 -0
  5. package/dist/chunks/{dashboard-controls-pGlGtKRR.js → dashboard-controls-CB8282ob.js} +8 -8
  6. package/dist/chunks/{dashboard-controls-BnBXzFOj.js → dashboard-controls-lRs5t5cg.js} +499 -484
  7. package/dist/chunks/{dashboard-json-UVBr47Qj.js → dashboard-json-BmzqRV5Q.js} +1 -1
  8. package/dist/chunks/{dashboard-json-CiIyCwJi.js → dashboard-json-Brn4hMd-.js} +1 -1
  9. package/dist/chunks/date-formatter-Sz6QDaM8.js +1 -0
  10. package/dist/chunks/{index-B4EhQdS9.js → date-formatter-Y8Za1ib3.js} +500 -544
  11. package/dist/chunks/{edit-dashboard-visual-DoP_x_tT.js → edit-dashboard-visual--FJBg3i3.js} +914 -914
  12. package/dist/chunks/{edit-dashboard-visual-CXvyi_qa.js → edit-dashboard-visual-DNq8ni5W.js} +8 -8
  13. package/dist/chunks/{editor-action-buttons-5UEhKl88.js → editor-action-buttons-COCkxvCM.js} +27 -27
  14. package/dist/chunks/{editor-action-buttons-Bftd6Bfx.js → editor-action-buttons-RPpMm3Zr.js} +1 -1
  15. package/dist/chunks/{index-ahdw_esL.js → index-CyYJ0bVW.js} +24904 -24743
  16. package/dist/chunks/{index-D59dkH2b.js → index-Dz2kwOQh.js} +229 -229
  17. package/dist/chunks/{notification-bell-CKI2j8jH.js → notification-bell-B86bWytX.js} +109 -109
  18. package/dist/chunks/{notification-bell-DtWcBdzp.js → notification-bell-Bdk-qQIx.js} +2 -2
  19. package/dist/chunks/{resource-management-panel-qkl060k8.js → resource-management-panel-BZKSwkRq.js} +160 -160
  20. package/dist/chunks/{resource-management-panel-BLiCtZZE.js → resource-management-panel-CvKBoIFQ.js} +1 -1
  21. package/dist/chunks/{use-role-aware-display-preferences-CLf3yEts.js → use-role-aware-display-preferences-D-jgaajh.js} +1 -1
  22. package/dist/chunks/{use-role-aware-display-preferences-JstD5WLE.js → use-role-aware-display-preferences-Kxc427Zx.js} +1 -1
  23. package/dist/chunks/{use-visual-utils-TGjvLx_R.js → use-visual-utils-Du4NIgMk.js} +1 -1
  24. package/dist/chunks/{use-visual-utils-BbN7rxtD.js → use-visual-utils-DwQQN6wI.js} +33 -33
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +3 -3
  27. package/dist/format-utils/index.cjs +5 -5
  28. package/dist/format-utils/index.js +200 -250
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.js +75 -71
  31. package/dist/style.css +1 -1
  32. package/dist/surfboard/index.cjs +1 -1
  33. package/dist/surfboard/index.js +6 -4
  34. package/dist/types/dashboard.d.ts +6 -2
  35. package/dist/types/format-utils.d.ts +43 -20
  36. package/dist/types/index.cjs +1 -1
  37. package/dist/types/index.js +8 -5
  38. package/dist/types/main.d.ts +99 -9
  39. package/dist/types/surfboard.d.ts +13 -2
  40. package/dist/types/types.d.ts +319 -2
  41. package/package.json +1 -1
  42. package/dist/chunks/index-8Crk3ROJ.js +0 -1
@@ -1,19 +1,20 @@
1
- import { jsxs as r, jsx as e, Fragment as _ } from "react/jsx-runtime";
2
- import { aF as J, bV as Ks, u as x, aV as es, aW as ss, B as M, aY as as, aZ as ve, bW as ke, as as ts, aN as U, bu as Oe, bX as Qs, a_ as Ie, bv as _e, bw as Te, bx as Ge, by as rs, bz as Se, bY as W, bB as Ws, I as j, bZ as Js, b2 as Ys, b_ as Xs, b$ as Qe, c0 as ns, c as ie, c1 as os, aH as ce, c2 as le, aL as A, c3 as is, bG as Zs, c4 as ea, aG as $, b1 as q, c5 as sa, c6 as aa, c7 as xe, c8 as ta, c9 as ra, ca as cs, cb as ls, cc as ne, cd as oe, bD as we, b8 as Ce, ce as De, b3 as ds, cf as Le, bH as us, e as ms, cg as na, bb as hs, bc as ps, bd as fs, be as gs, bf as vs, bg as bs, bh as ys, bi as Ee, aT as oa, ch as ia, G as ca, au as We, A as te, ci as la, M as da, R as be, cj as ua, ck as ma, cl as ha, cm as pa, a$ as fa, Y as ga, cn as va, co as ba, cp as ya, cq as Na, cr as Sa, L as xa, W as wa } from "./index-ahdw_esL.js";
3
- import * as L from "react";
4
- import Ns, { useState as S, useMemo as re, useEffect as Ca } from "react";
1
+ import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
2
+ import { aT as Y, bZ as Ws, u as w, b4 as Me, b5 as Oe, B as A, b7 as Ie, b8 as ne, b_ as _e, aG as ts, l as F, m as Te, b$ as Js, b9 as Pe, n as Ge, o as Re, p as Ue, q as rs, L as Se, c0 as J, G as Ys, W as U, c1 as Zs, bd as Xs, c2 as ea, c3 as Ye, c4 as ns, c as ce, c5 as os, aU as le, c6 as de, I as E, c7 as is, bK as sa, c8 as aa, H as q, bc as $, c9 as ta, ca as ra, cb as xe, cc as na, cd as oa, ce as cs, cf as ls, cg as oe, ch as ie, bH as we, bj as Ce, ci as De, be as ds, cj as Le, bL as us, e as ms, ck as ia, bm as hs, bn as ps, bo as fs, bp as gs, bq as vs, br as bs, bs as ys, bt as Ee, b2 as ca, cl as la, Z as da, aI as Ze, Y as te, cm as ua, a3 as ma, _ as be, cn as ha, co as pa, cp as fa, cq as ga, ba as va, aa as ba, cr as ya, cs as Na, ct as Sa, cu as xa, cv as wa, b6 as Ca, bg as Da, a2 as La, a9 as Ea } from "./index-CyYJ0bVW.js";
3
+ import * as D from "react";
4
+ import Ns, { useState as x, useMemo as re, useEffect as Aa } from "react";
5
5
  import "react-dom";
6
- import { b as Da, u as La, c as Ea, A as Aa, V as Ma, S as ka, N as Oa, U as Ia } from "./notification-bell-CKI2j8jH.js";
7
- import { u as _a } from "./use-role-aware-display-preferences-CLf3yEts.js";
8
- import { b as Ta } from "./index-B4EhQdS9.js";
9
- import { S as Je } from "./editor-action-buttons-5UEhKl88.js";
6
+ import { b as ka, u as Ma, c as Oa, A as Ia, V as _a, S as Ta, N as Pa, U as Ga } from "./notification-bell-B86bWytX.js";
7
+ import { u as Ra } from "./use-role-aware-display-preferences-D-jgaajh.js";
8
+ import { d as Ua } from "./date-formatter-Y8Za1ib3.js";
9
+ import { C as Fa } from "./calendar-preferences-dialog-DeXKY9JD.js";
10
+ import { S as Xe } from "./editor-action-buttons-COCkxvCM.js";
10
11
  /**
11
12
  * @license lucide-react v0.453.0 - ISC
12
13
  *
13
14
  * This source code is licensed under the ISC license.
14
15
  * See the LICENSE file in the root directory of this source tree.
15
16
  */
16
- const Ga = J("Glasses", [
17
+ const ja = Y("Glasses", [
17
18
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
18
19
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
19
20
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -26,7 +27,7 @@ const Ga = J("Glasses", [
26
27
  * This source code is licensed under the ISC license.
27
28
  * See the LICENSE file in the root directory of this source tree.
28
29
  */
29
- const Ra = J("Menu", [
30
+ const qa = Y("Menu", [
30
31
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
31
32
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
32
33
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -37,7 +38,7 @@ const Ra = J("Menu", [
37
38
  * This source code is licensed under the ISC license.
38
39
  * See the LICENSE file in the root directory of this source tree.
39
40
  */
40
- const Pa = J("Moon", [
41
+ const $a = Y("Moon", [
41
42
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
42
43
  ]);
43
44
  /**
@@ -46,7 +47,7 @@ const Pa = J("Moon", [
46
47
  * This source code is licensed under the ISC license.
47
48
  * See the LICENSE file in the root directory of this source tree.
48
49
  */
49
- const Ua = J("ShieldX", [
50
+ const Va = Y("ShieldX", [
50
51
  [
51
52
  "path",
52
53
  {
@@ -63,7 +64,7 @@ const Ua = J("ShieldX", [
63
64
  * This source code is licensed under the ISC license.
64
65
  * See the LICENSE file in the root directory of this source tree.
65
66
  */
66
- const Fa = J("Sun", [
67
+ const za = Y("Sun", [
67
68
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
68
69
  ["path", { d: "M12 2v2", key: "tus03m" }],
69
70
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -84,26 +85,26 @@ var Ae = { exports: {} }, ye = {};
84
85
  * This source code is licensed under the MIT license found in the
85
86
  * LICENSE file in the root directory of this source tree.
86
87
  */
87
- var Ye;
88
- function ja() {
89
- if (Ye) return ye;
90
- Ye = 1;
88
+ var es;
89
+ function Ha() {
90
+ if (es) return ye;
91
+ es = 1;
91
92
  var s = Ns;
92
93
  function n(l, h) {
93
94
  return l === h && (l !== 0 || 1 / l === 1 / h) || l !== l && h !== h;
94
95
  }
95
96
  var a = typeof Object.is == "function" ? Object.is : n, t = s.useState, i = s.useEffect, o = s.useLayoutEffect, u = s.useDebugValue;
96
97
  function m(l, h) {
97
- var p = h(), v = t({ inst: { value: p, getSnapshot: h } }), y = v[0].inst, N = v[1];
98
+ var p = h(), g = t({ inst: { value: p, getSnapshot: h } }), y = g[0].inst, S = g[1];
98
99
  return o(
99
100
  function() {
100
- y.value = p, y.getSnapshot = h, f(y) && N({ inst: y });
101
+ y.value = p, y.getSnapshot = h, f(y) && S({ inst: y });
101
102
  },
102
103
  [l, p, h]
103
104
  ), i(
104
105
  function() {
105
- return f(y) && N({ inst: y }), l(function() {
106
- f(y) && N({ inst: y });
106
+ return f(y) && S({ inst: y }), l(function() {
107
+ f(y) && S({ inst: y });
107
108
  });
108
109
  },
109
110
  [l]
@@ -119,10 +120,10 @@ function ja() {
119
120
  return !0;
120
121
  }
121
122
  }
122
- function b(l, h) {
123
+ function v(l, h) {
123
124
  return h();
124
125
  }
125
- var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? b : m;
126
+ var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : m;
126
127
  return ye.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : d, ye;
127
128
  }
128
129
  var Ne = {};
@@ -135,76 +136,76 @@ var Ne = {};
135
136
  * This source code is licensed under the MIT license found in the
136
137
  * LICENSE file in the root directory of this source tree.
137
138
  */
138
- var Xe;
139
- function $a() {
140
- return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() {
141
- function s(p, v) {
142
- return p === v && (p !== 0 || 1 / p === 1 / v) || p !== p && v !== v;
139
+ var ss;
140
+ function Ba() {
141
+ return ss || (ss = 1, process.env.NODE_ENV !== "production" && function() {
142
+ function s(p, g) {
143
+ return p === g && (p !== 0 || 1 / p === 1 / g) || p !== p && g !== g;
143
144
  }
144
- function n(p, v) {
145
+ function n(p, g) {
145
146
  d || i.startTransition === void 0 || (d = !0, console.error(
146
147
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
147
148
  ));
148
- var y = v();
149
+ var y = g();
149
150
  if (!l) {
150
- var N = v();
151
- o(y, N) || (console.error(
151
+ var S = g();
152
+ o(y, S) || (console.error(
152
153
  "The result of getSnapshot should be cached to avoid an infinite loop"
153
154
  ), l = !0);
154
155
  }
155
- N = u({
156
- inst: { value: y, getSnapshot: v }
156
+ S = u({
157
+ inst: { value: y, getSnapshot: g }
157
158
  });
158
- var E = N[0].inst, T = N[1];
159
+ var L = S[0].inst, _ = S[1];
159
160
  return f(
160
161
  function() {
161
- E.value = y, E.getSnapshot = v, a(E) && T({ inst: E });
162
+ L.value = y, L.getSnapshot = g, a(L) && _({ inst: L });
162
163
  },
163
- [p, y, v]
164
+ [p, y, g]
164
165
  ), m(
165
166
  function() {
166
- return a(E) && T({ inst: E }), p(function() {
167
- a(E) && T({ inst: E });
167
+ return a(L) && _({ inst: L }), p(function() {
168
+ a(L) && _({ inst: L });
168
169
  });
169
170
  },
170
171
  [p]
171
- ), b(y), y;
172
+ ), v(y), y;
172
173
  }
173
174
  function a(p) {
174
- var v = p.getSnapshot;
175
+ var g = p.getSnapshot;
175
176
  p = p.value;
176
177
  try {
177
- var y = v();
178
+ var y = g();
178
179
  return !o(p, y);
179
180
  } catch {
180
181
  return !0;
181
182
  }
182
183
  }
183
- function t(p, v) {
184
- return v();
184
+ function t(p, g) {
185
+ return g();
185
186
  }
186
187
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
187
- var i = Ns, o = typeof Object.is == "function" ? Object.is : s, u = i.useState, m = i.useEffect, f = i.useLayoutEffect, b = i.useDebugValue, d = !1, l = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : n;
188
+ var i = Ns, o = typeof Object.is == "function" ? Object.is : s, u = i.useState, m = i.useEffect, f = i.useLayoutEffect, v = i.useDebugValue, d = !1, l = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : n;
188
189
  Ne.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
189
190
  }()), Ne;
190
191
  }
191
- process.env.NODE_ENV === "production" ? Ae.exports = ja() : Ae.exports = $a();
192
- var qa = Ae.exports;
193
- function Va() {
194
- const { setTheme: s } = Ks(), n = x(
192
+ process.env.NODE_ENV === "production" ? Ae.exports = Ha() : Ae.exports = Ba();
193
+ var Ka = Ae.exports;
194
+ function Qa() {
195
+ const { setTheme: s } = Ws(), n = w(
195
196
  (a) => a.actions.setDashboardTheme
196
197
  );
197
- return /* @__PURE__ */ r(es, { children: [
198
- /* @__PURE__ */ e(ss, { asChild: !0, children: /* @__PURE__ */ r(M, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
198
+ return /* @__PURE__ */ r(Me, { children: [
199
+ /* @__PURE__ */ e(Oe, { asChild: !0, children: /* @__PURE__ */ r(A, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
199
200
  /* @__PURE__ */ e(
200
- Fa,
201
+ za,
201
202
  {
202
203
  strokeWidth: 1.5,
203
204
  className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
204
205
  }
205
206
  ),
206
207
  /* @__PURE__ */ e(
207
- Pa,
208
+ $a,
208
209
  {
209
210
  strokeWidth: 1.5,
210
211
  className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
@@ -212,9 +213,9 @@ function Va() {
212
213
  ),
213
214
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
214
215
  ] }) }),
215
- /* @__PURE__ */ r(as, { align: "end", children: [
216
+ /* @__PURE__ */ r(Ie, { align: "end", children: [
216
217
  /* @__PURE__ */ e(
217
- ve,
218
+ ne,
218
219
  {
219
220
  onClick: () => {
220
221
  s("light"), n("light");
@@ -223,7 +224,7 @@ function Va() {
223
224
  }
224
225
  ),
225
226
  /* @__PURE__ */ e(
226
- ve,
227
+ ne,
227
228
  {
228
229
  onClick: () => {
229
230
  s("dark"), n("dark");
@@ -232,7 +233,7 @@ function Va() {
232
233
  }
233
234
  ),
234
235
  /* @__PURE__ */ e(
235
- ve,
236
+ ne,
236
237
  {
237
238
  onClick: () => {
238
239
  s("system"), n("system");
@@ -243,22 +244,22 @@ function Va() {
243
244
  ] })
244
245
  ] });
245
246
  }
246
- async function za(s, n, a, t, i) {
247
+ async function Wa(s, n, a, t, i) {
247
248
  if (!i)
248
249
  return null;
249
250
  const o = JSON.stringify(a), u = `${s}/v1/lens`;
250
- return await ke(u, i, {
251
+ return await _e(u, i, {
251
252
  name: n,
252
253
  template: o,
253
254
  filterValues: t,
254
255
  operation: "create"
255
256
  });
256
257
  }
257
- async function Me(s, n, a) {
258
+ async function ke(s, n, a) {
258
259
  if (!a)
259
260
  return null;
260
261
  const { id: t, template: i, filterValues: o, isDefault: u, shared: m } = n, f = `${s}/v1/lens`;
261
- return await ke(f, a, {
262
+ return await _e(f, a, {
262
263
  lensId: t,
263
264
  template: i,
264
265
  filterValues: o,
@@ -267,54 +268,54 @@ async function Me(s, n, a) {
267
268
  operation: "update"
268
269
  });
269
270
  }
270
- async function Ha(s, n, a) {
271
+ async function Ja(s, n, a) {
271
272
  if (!a)
272
273
  return null;
273
274
  const t = `${s}/v1/lens`;
274
- return await ke(t, a, {
275
+ return await _e(t, a, {
275
276
  operation: "delete",
276
277
  lensId: n
277
278
  });
278
279
  }
279
- function Ba() {
280
- const [s, n] = S(""), [a, t] = S(!1), i = x((N) => N.lenses), { setLenses: o, setSelectedLensId: u } = ts(), [m, f] = S(!1), [b, d] = S(!1), l = x((N) => N.dashboard), h = x((N) => N.filterValues), { authToken: p, tokenProps: v } = U();
280
+ function Ya() {
281
+ const [s, n] = x(""), [a, t] = x(!1), i = w((S) => S.lenses), { setLenses: o, setSelectedLensId: u } = ts(), [m, f] = x(!1), [v, d] = x(!1), l = w((S) => S.dashboard), h = w((S) => S.filterValues), { authToken: p, tokenProps: g } = F();
281
282
  async function y() {
282
283
  f(!0);
283
- const N = await za(
284
- v.apiServiceUrl,
284
+ const S = await Wa(
285
+ g.apiServiceUrl,
285
286
  s,
286
287
  l,
287
288
  h,
288
289
  p == null ? void 0 : p.accessToken
289
290
  );
290
- N && (o([...i || [], N]), u(N.id), d(!1)), f(!1);
291
+ S && (o([...i || [], S]), u(S.id), d(!1)), f(!1);
291
292
  }
292
- return /* @__PURE__ */ r(Oe, { open: b, onOpenChange: d, children: [
293
- /* @__PURE__ */ e(Qs, { asChild: !0, children: /* @__PURE__ */ r(
294
- M,
293
+ return /* @__PURE__ */ r(Te, { open: v, onOpenChange: d, children: [
294
+ /* @__PURE__ */ e(Js, { asChild: !0, children: /* @__PURE__ */ r(
295
+ A,
295
296
  {
296
297
  variant: "secondary",
297
298
  className: "h-7 p-2",
298
299
  size: "sm",
299
300
  children: [
300
- /* @__PURE__ */ e(Ie, { className: "mr-2 h-4 w-4" }),
301
+ /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4" }),
301
302
  "Lens"
302
303
  ]
303
304
  }
304
305
  ) }),
305
- /* @__PURE__ */ r(_e, { className: "sm:max-w-[425px]", children: [
306
- /* @__PURE__ */ r(Te, { children: [
307
- /* @__PURE__ */ e(Ge, { children: "Create Lens" }),
306
+ /* @__PURE__ */ r(Ge, { className: "sm:max-w-[425px]", children: [
307
+ /* @__PURE__ */ r(Re, { children: [
308
+ /* @__PURE__ */ e(Ue, { children: "Create Lens" }),
308
309
  /* @__PURE__ */ e(rs, { children: "Lenses are private by default and are only visible to you." })
309
310
  ] }),
310
311
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
311
312
  /* @__PURE__ */ e(Se, { className: "text-right", children: "Name" }),
312
313
  /* @__PURE__ */ e(
313
- W,
314
+ J,
314
315
  {
315
316
  value: s,
316
- onChange: (N) => {
317
- n(N.target.value);
317
+ onChange: (S) => {
318
+ n(S.target.value);
318
319
  },
319
320
  id: "name",
320
321
  className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
@@ -322,8 +323,8 @@ function Ba() {
322
323
  )
323
324
  ] }) }),
324
325
  a && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
325
- /* @__PURE__ */ e(Ws, { children: /* @__PURE__ */ e(
326
- M,
326
+ /* @__PURE__ */ e(Ys, { children: /* @__PURE__ */ e(
327
+ A,
327
328
  {
328
329
  size: "sm",
329
330
  variant: "outline",
@@ -336,14 +337,14 @@ function Ba() {
336
337
  ] })
337
338
  ] });
338
339
  }
339
- function Ka() {
340
- const [s, n] = S(!1), a = x((l) => l.lenses), t = x((l) => l.selectedLensId), { setLenses: i, setSelectedLensId: o } = ts(), { authToken: u, tokenProps: m } = U();
340
+ function Za() {
341
+ const [s, n] = x(!1), a = w((l) => l.lenses), t = w((l) => l.selectedLensId), { setLenses: i, setSelectedLensId: o } = ts(), { authToken: u, tokenProps: m } = F();
341
342
  async function f(l) {
342
343
  o(l);
343
344
  }
344
- async function b(l) {
345
- if (await Ha(m.apiServiceUrl, l, u == null ? void 0 : u.accessToken)) {
346
- const p = a == null ? void 0 : a.filter((v) => v.id !== l);
345
+ async function v(l) {
346
+ if (await Ja(m.apiServiceUrl, l, u == null ? void 0 : u.accessToken)) {
347
+ const p = a == null ? void 0 : a.filter((g) => g.id !== l);
347
348
  i(p || []), o("original");
348
349
  }
349
350
  }
@@ -360,30 +361,30 @@ function Ka() {
360
361
  ...l,
361
362
  isDefault: !l.isDefault
362
363
  };
363
- await Me(m.apiServiceUrl, p, u == null ? void 0 : u.accessToken);
364
- const v = a == null ? void 0 : a.find((y) => y.isDefault);
365
- if (v && v.id !== l.id) {
364
+ await ke(m.apiServiceUrl, p, u == null ? void 0 : u.accessToken);
365
+ const g = a == null ? void 0 : a.find((y) => y.isDefault);
366
+ if (g && g.id !== l.id) {
366
367
  const y = {
367
- ...v,
368
+ ...g,
368
369
  isDefault: !1
369
370
  };
370
- await Me(m.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
371
+ await ke(m.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
371
372
  }
372
373
  }
373
- return /* @__PURE__ */ r(es, { open: s, onOpenChange: n, children: [
374
- /* @__PURE__ */ e(ss, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ga, { className: "h-4 w-4" }) }) }),
375
- /* @__PURE__ */ r(as, { align: "end", className: "w-60", children: [
376
- /* @__PURE__ */ e(Js, { className: "px-3", children: "Lenses" }),
377
- /* @__PURE__ */ e(Ys, {}),
374
+ return /* @__PURE__ */ r(Me, { open: s, onOpenChange: n, children: [
375
+ /* @__PURE__ */ e(Oe, { asChild: !0, children: /* @__PURE__ */ e(U, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ja, { className: "h-4 w-4" }) }) }),
376
+ /* @__PURE__ */ r(Ie, { align: "end", className: "w-60", children: [
377
+ /* @__PURE__ */ e(Zs, { className: "px-3", children: "Lenses" }),
378
+ /* @__PURE__ */ e(Xs, {}),
378
379
  /* @__PURE__ */ r(
379
- Xs,
380
+ ea,
380
381
  {
381
382
  value: t,
382
383
  onValueChange: f,
383
384
  children: [
384
- /* @__PURE__ */ e(Qe, { value: "original", children: "Original" }),
385
+ /* @__PURE__ */ e(Ye, { value: "original", children: "Original" }),
385
386
  a == null ? void 0 : a.map((l) => /* @__PURE__ */ r(
386
- Qe,
387
+ Ye,
387
388
  {
388
389
  className: "group flex justify-between gap-2",
389
390
  value: l.id,
@@ -396,7 +397,7 @@ function Ka() {
396
397
  onClick: (h) => {
397
398
  h.preventDefault(), d(l);
398
399
  },
399
- className: ie(
400
+ className: ce(
400
401
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
401
402
  {
402
403
  invisible: !l.isDefault,
@@ -410,7 +411,7 @@ function Ka() {
410
411
  os,
411
412
  {
412
413
  onClick: (h) => {
413
- h.preventDefault(), b(l.id);
414
+ h.preventDefault(), v(l.id);
414
415
  },
415
416
  className: "invisible size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
416
417
  strokeWidth: 1.5
@@ -427,10 +428,10 @@ function Ka() {
427
428
  ] })
428
429
  ] });
429
430
  }
430
- const Qa = async (s, n, a) => {
431
+ const Xa = async (s, n, a) => {
431
432
  const t = `${s}/management/v1/groups`;
432
433
  return await is(t, n, a);
433
- }, Wa = async (s, n, a) => {
434
+ }, et = async (s, n, a) => {
434
435
  const t = `${s}/management/v1/groups/${a}`, i = await fetch(t, {
435
436
  method: "DELETE",
436
437
  headers: {
@@ -441,10 +442,10 @@ const Qa = async (s, n, a) => {
441
442
  const o = await i.text();
442
443
  throw new Error(o || "Failed to delete group");
443
444
  }
444
- }, Ja = async (s, n, a, t) => {
445
+ }, st = async (s, n, a, t) => {
445
446
  const i = `${s}/management/v1/groups/${a}/members`;
446
447
  return await is(i, n, t);
447
- }, Ya = async (s, n, a, t) => {
448
+ }, at = async (s, n, a, t) => {
448
449
  const i = `${s}/management/v1/groups/${a}/members`, o = await fetch(i, {
449
450
  method: "DELETE",
450
451
  headers: {
@@ -458,78 +459,78 @@ const Qa = async (s, n, a) => {
458
459
  throw new Error(u || "Failed to remove group members");
459
460
  }
460
461
  };
461
- function Xa() {
462
- const { authToken: s, tokenProps: n } = U(), a = ce();
463
- return le({
464
- mutationFn: (t) => Qa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
462
+ function tt() {
463
+ const { authToken: s, tokenProps: n } = F(), a = le();
464
+ return de({
465
+ mutationFn: (t) => Xa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
465
466
  onSuccess: () => {
466
- a.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
467
+ a.invalidateQueries({ queryKey: ["groups"] }), E.success("Group created successfully");
467
468
  },
468
469
  onError: (t) => {
469
- console.error("Failed to create group:", t), A.error("Failed to create group", {
470
+ console.error("Failed to create group:", t), E.error("Failed to create group", {
470
471
  description: t.message
471
472
  });
472
473
  }
473
474
  });
474
475
  }
475
- function Za() {
476
- const { authToken: s, tokenProps: n } = U(), a = ce();
477
- return le({
478
- mutationFn: (t) => Wa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
476
+ function rt() {
477
+ const { authToken: s, tokenProps: n } = F(), a = le();
478
+ return de({
479
+ mutationFn: (t) => et(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
479
480
  onSuccess: (t, i) => {
480
- a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", i] }), A.success("Group deleted successfully");
481
+ a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", i] }), E.success("Group deleted successfully");
481
482
  },
482
483
  onError: (t) => {
483
- console.error("Failed to delete group:", t), A.error("Failed to delete group", {
484
+ console.error("Failed to delete group:", t), E.error("Failed to delete group", {
484
485
  description: t.message
485
486
  });
486
487
  }
487
488
  });
488
489
  }
489
- function et() {
490
- const { authToken: s, tokenProps: n } = U(), a = ce();
491
- return le({
490
+ function nt() {
491
+ const { authToken: s, tokenProps: n } = F(), a = le();
492
+ return de({
492
493
  mutationFn: ({
493
494
  groupId: t,
494
495
  data: i
495
- }) => Ja(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
496
+ }) => st(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
496
497
  onSuccess: (t, i) => {
497
498
  a.invalidateQueries({ queryKey: ["group", i.groupId] }), a.invalidateQueries({
498
499
  queryKey: ["group-members", i.groupId]
499
- }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
500
+ }), a.invalidateQueries({ queryKey: ["groups"] }), E.success("Members added successfully");
500
501
  },
501
502
  onError: (t) => {
502
- console.error("Failed to add group members:", t), A.error("Failed to add members", {
503
+ console.error("Failed to add group members:", t), E.error("Failed to add members", {
503
504
  description: t.message
504
505
  });
505
506
  }
506
507
  });
507
508
  }
508
- function st() {
509
- const { authToken: s, tokenProps: n } = U(), a = ce();
510
- return le({
509
+ function ot() {
510
+ const { authToken: s, tokenProps: n } = F(), a = le();
511
+ return de({
511
512
  mutationFn: ({
512
513
  groupId: t,
513
514
  data: i
514
- }) => Ya(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
515
+ }) => at(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, i),
515
516
  onSuccess: (t, i) => {
516
517
  a.invalidateQueries({ queryKey: ["group", i.groupId] }), a.invalidateQueries({
517
518
  queryKey: ["group-members", i.groupId]
518
- }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
519
+ }), a.invalidateQueries({ queryKey: ["groups"] }), E.success("Members removed successfully");
519
520
  },
520
521
  onError: (t) => {
521
- console.error("Failed to remove group members:", t), A.error("Failed to remove members", {
522
+ console.error("Failed to remove group members:", t), E.error("Failed to remove members", {
522
523
  description: t.message
523
524
  });
524
525
  }
525
526
  });
526
527
  }
527
- function at({
528
+ function it({
528
529
  onSuccess: s,
529
530
  tenantId: n,
530
531
  isTenantUser: a
531
532
  }) {
532
- const [t, i] = S(""), [o, u] = S(""), [m, f] = S({}), b = Xa(), d = () => {
533
+ const [t, i] = x(""), [o, u] = x(""), [m, f] = x({}), v = tt(), d = () => {
533
534
  const h = {};
534
535
  return t.trim() ? t.length < 3 ? h.name = "Group name must be at least 3 characters" : t.length > 50 && (h.name = "Group name must be less than 50 characters") : h.name = "Group name is required", o && o.length > 200 && (h.description = "Description must be less than 200 characters"), f(h), Object.keys(h).length === 0;
535
536
  };
@@ -542,9 +543,9 @@ function at({
542
543
  ...a && n ? { tenantId: n } : {}
543
544
  };
544
545
  try {
545
- await b.mutateAsync(p), i(""), u(""), f({}), s();
546
- } catch (v) {
547
- console.error("Failed to create group:", v);
546
+ await v.mutateAsync(p), i(""), u(""), f({}), s();
547
+ } catch (g) {
548
+ console.error("Failed to create group:", g);
548
549
  }
549
550
  }, className: "space-y-6", children: [
550
551
  /* @__PURE__ */ r("div", { className: "space-y-4", children: [
@@ -554,7 +555,7 @@ function at({
554
555
  /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
555
556
  ] }),
556
557
  /* @__PURE__ */ e(
557
- W,
558
+ J,
558
559
  {
559
560
  id: "group-name",
560
561
  placeholder: "e.g., Marketing Team, Engineering Squad",
@@ -563,7 +564,7 @@ function at({
563
564
  i(h.target.value), m.name && f((p) => ({ ...p, name: "" }));
564
565
  },
565
566
  className: m.name ? "border-destructive" : "",
566
- disabled: b.isPending
567
+ disabled: v.isPending
567
568
  }
568
569
  ),
569
570
  m.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.name })
@@ -574,7 +575,7 @@ function at({
574
575
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
575
576
  ] }),
576
577
  /* @__PURE__ */ e(
577
- Zs,
578
+ sa,
578
579
  {
579
580
  id: "group-description",
580
581
  placeholder: "Describe the purpose of this group...",
@@ -583,7 +584,7 @@ function at({
583
584
  u(h.target.value), m.description && f((p) => ({ ...p, description: "" }));
584
585
  },
585
586
  className: m.description ? "border-destructive" : "",
586
- disabled: b.isPending,
587
+ disabled: v.isPending,
587
588
  rows: 3
588
589
  }
589
590
  ),
@@ -594,33 +595,33 @@ function at({
594
595
  ] })
595
596
  ] }),
596
597
  /* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
597
- /* @__PURE__ */ e(ea, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
598
+ /* @__PURE__ */ e(aa, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
598
599
  /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "This group will be accessible to users in your workspace. You can add members after creating the group." })
599
600
  ] }) })
600
601
  ] }),
601
602
  /* @__PURE__ */ r("div", { className: "flex justify-end gap-3", children: [
602
603
  /* @__PURE__ */ e(
603
- M,
604
+ A,
604
605
  {
605
606
  type: "button",
606
607
  variant: "outline",
607
608
  onClick: () => {
608
609
  i(""), u(""), f({});
609
610
  },
610
- disabled: b.isPending,
611
+ disabled: v.isPending,
611
612
  children: "Clear"
612
613
  }
613
614
  ),
614
615
  /* @__PURE__ */ e(
615
- M,
616
+ A,
616
617
  {
617
618
  type: "submit",
618
- disabled: b.isPending || !t.trim(),
619
- children: b.isPending ? /* @__PURE__ */ r(_, { children: [
620
- /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
619
+ disabled: v.isPending || !t.trim(),
620
+ children: v.isPending ? /* @__PURE__ */ r(I, { children: [
621
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
621
622
  "Creating..."
622
- ] }) : /* @__PURE__ */ r(_, { children: [
623
- /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4" }),
623
+ ] }) : /* @__PURE__ */ r(I, { children: [
624
+ /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4" }),
624
625
  "Create Group"
625
626
  ] })
626
627
  }
@@ -628,41 +629,41 @@ function at({
628
629
  ] })
629
630
  ] });
630
631
  }
631
- function tt(s, n = []) {
632
+ function ct(s, n = []) {
632
633
  let a = [];
633
634
  function t(o, u) {
634
- const m = L.createContext(u);
635
+ const m = D.createContext(u);
635
636
  m.displayName = o + "Context";
636
637
  const f = a.length;
637
638
  a = [...a, u];
638
- const b = (l) => {
639
- var E;
640
- const { scope: h, children: p, ...v } = l, y = ((E = h == null ? void 0 : h[s]) == null ? void 0 : E[f]) || m, N = L.useMemo(() => v, Object.values(v));
641
- return /* @__PURE__ */ e(y.Provider, { value: N, children: p });
639
+ const v = (l) => {
640
+ var L;
641
+ const { scope: h, children: p, ...g } = l, y = ((L = h == null ? void 0 : h[s]) == null ? void 0 : L[f]) || m, S = D.useMemo(() => g, Object.values(g));
642
+ return /* @__PURE__ */ e(y.Provider, { value: S, children: p });
642
643
  };
643
- b.displayName = o + "Provider";
644
+ v.displayName = o + "Provider";
644
645
  function d(l, h) {
645
646
  var y;
646
- const p = ((y = h == null ? void 0 : h[s]) == null ? void 0 : y[f]) || m, v = L.useContext(p);
647
- if (v) return v;
647
+ const p = ((y = h == null ? void 0 : h[s]) == null ? void 0 : y[f]) || m, g = D.useContext(p);
648
+ if (g) return g;
648
649
  if (u !== void 0) return u;
649
650
  throw new Error(`\`${l}\` must be used within \`${o}\``);
650
651
  }
651
- return [b, d];
652
+ return [v, d];
652
653
  }
653
654
  const i = () => {
654
- const o = a.map((u) => L.createContext(u));
655
+ const o = a.map((u) => D.createContext(u));
655
656
  return function(m) {
656
657
  const f = (m == null ? void 0 : m[s]) || o;
657
- return L.useMemo(
658
+ return D.useMemo(
658
659
  () => ({ [`__scope${s}`]: { ...m, [s]: f } }),
659
660
  [m, f]
660
661
  );
661
662
  };
662
663
  };
663
- return i.scopeName = s, [t, rt(i, ...n)];
664
+ return i.scopeName = s, [t, lt(i, ...n)];
664
665
  }
665
- function rt(...s) {
666
+ function lt(...s) {
666
667
  const n = s[0];
667
668
  if (s.length === 1) return n;
668
669
  const a = () => {
@@ -671,16 +672,16 @@ function rt(...s) {
671
672
  scopeName: i.scopeName
672
673
  }));
673
674
  return function(o) {
674
- const u = t.reduce((m, { useScope: f, scopeName: b }) => {
675
- const l = f(o)[`__scope${b}`];
675
+ const u = t.reduce((m, { useScope: f, scopeName: v }) => {
676
+ const l = f(o)[`__scope${v}`];
676
677
  return { ...m, ...l };
677
678
  }, {});
678
- return L.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
679
+ return D.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
679
680
  };
680
681
  };
681
682
  return a.scopeName = n.scopeName, a;
682
683
  }
683
- var nt = [
684
+ var dt = [
684
685
  "a",
685
686
  "button",
686
687
  "div",
@@ -698,187 +699,187 @@ var nt = [
698
699
  "span",
699
700
  "svg",
700
701
  "ul"
701
- ], Re = nt.reduce((s, n) => {
702
- const a = sa(`Primitive.${n}`), t = L.forwardRef((i, o) => {
702
+ ], Fe = dt.reduce((s, n) => {
703
+ const a = ta(`Primitive.${n}`), t = D.forwardRef((i, o) => {
703
704
  const { asChild: u, ...m } = i, f = u ? a : n;
704
705
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(f, { ...m, ref: o });
705
706
  });
706
707
  return t.displayName = `Primitive.${n}`, { ...s, [n]: t };
707
708
  }, {});
708
- function ot() {
709
- return qa.useSyncExternalStore(
710
- it,
709
+ function ut() {
710
+ return Ka.useSyncExternalStore(
711
+ mt,
711
712
  () => !0,
712
713
  () => !1
713
714
  );
714
715
  }
715
- function it() {
716
+ function mt() {
716
717
  return () => {
717
718
  };
718
719
  }
719
- var Pe = "Avatar", [ct] = tt(Pe), [lt, Ss] = ct(Pe), xs = L.forwardRef(
720
+ var je = "Avatar", [ht] = ct(je), [pt, Ss] = ht(je), xs = D.forwardRef(
720
721
  (s, n) => {
721
- const { __scopeAvatar: a, ...t } = s, [i, o] = L.useState("idle");
722
+ const { __scopeAvatar: a, ...t } = s, [i, o] = D.useState("idle");
722
723
  return /* @__PURE__ */ e(
723
- lt,
724
+ pt,
724
725
  {
725
726
  scope: a,
726
727
  imageLoadingStatus: i,
727
728
  onImageLoadingStatusChange: o,
728
- children: /* @__PURE__ */ e(Re.span, { ...t, ref: n })
729
+ children: /* @__PURE__ */ e(Fe.span, { ...t, ref: n })
729
730
  }
730
731
  );
731
732
  }
732
733
  );
733
- xs.displayName = Pe;
734
- var ws = "AvatarImage", Cs = L.forwardRef(
734
+ xs.displayName = je;
735
+ var ws = "AvatarImage", Cs = D.forwardRef(
735
736
  (s, n) => {
736
737
  const { __scopeAvatar: a, src: t, onLoadingStatusChange: i = () => {
737
- }, ...o } = s, u = Ss(ws, a), m = dt(t, o), f = aa((b) => {
738
- i(b), u.onImageLoadingStatusChange(b);
738
+ }, ...o } = s, u = Ss(ws, a), m = ft(t, o), f = ra((v) => {
739
+ i(v), u.onImageLoadingStatusChange(v);
739
740
  });
740
741
  return xe(() => {
741
742
  m !== "idle" && f(m);
742
- }, [m, f]), m === "loaded" ? /* @__PURE__ */ e(Re.img, { ...o, ref: n, src: t }) : null;
743
+ }, [m, f]), m === "loaded" ? /* @__PURE__ */ e(Fe.img, { ...o, ref: n, src: t }) : null;
743
744
  }
744
745
  );
745
746
  Cs.displayName = ws;
746
- var Ds = "AvatarFallback", Ls = L.forwardRef(
747
+ var Ds = "AvatarFallback", Ls = D.forwardRef(
747
748
  (s, n) => {
748
- const { __scopeAvatar: a, delayMs: t, ...i } = s, o = Ss(Ds, a), [u, m] = L.useState(t === void 0);
749
- return L.useEffect(() => {
749
+ const { __scopeAvatar: a, delayMs: t, ...i } = s, o = Ss(Ds, a), [u, m] = D.useState(t === void 0);
750
+ return D.useEffect(() => {
750
751
  if (t !== void 0) {
751
752
  const f = window.setTimeout(() => m(!0), t);
752
753
  return () => window.clearTimeout(f);
753
754
  }
754
- }, [t]), u && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Re.span, { ...i, ref: n }) : null;
755
+ }, [t]), u && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Fe.span, { ...i, ref: n }) : null;
755
756
  }
756
757
  );
757
758
  Ls.displayName = Ds;
758
- function Ze(s, n) {
759
+ function as(s, n) {
759
760
  return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
760
761
  }
761
- function dt(s, { referrerPolicy: n, crossOrigin: a }) {
762
- const t = ot(), i = L.useRef(null), o = t ? (i.current || (i.current = new window.Image()), i.current) : null, [u, m] = L.useState(
763
- () => Ze(o, s)
762
+ function ft(s, { referrerPolicy: n, crossOrigin: a }) {
763
+ const t = ut(), i = D.useRef(null), o = t ? (i.current || (i.current = new window.Image()), i.current) : null, [u, m] = D.useState(
764
+ () => as(o, s)
764
765
  );
765
766
  return xe(() => {
766
- m(Ze(o, s));
767
+ m(as(o, s));
767
768
  }, [o, s]), xe(() => {
768
769
  const f = (l) => () => {
769
770
  m(l);
770
771
  };
771
772
  if (!o) return;
772
- const b = f("loaded"), d = f("error");
773
- return o.addEventListener("load", b), o.addEventListener("error", d), n && (o.referrerPolicy = n), typeof a == "string" && (o.crossOrigin = a), () => {
774
- o.removeEventListener("load", b), o.removeEventListener("error", d);
773
+ const v = f("loaded"), d = f("error");
774
+ return o.addEventListener("load", v), o.addEventListener("error", d), n && (o.referrerPolicy = n), typeof a == "string" && (o.crossOrigin = a), () => {
775
+ o.removeEventListener("load", v), o.removeEventListener("error", d);
775
776
  };
776
777
  }, [o, a, n]), u;
777
778
  }
778
- var Es = xs, As = Cs, Ms = Ls;
779
- const Ue = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
779
+ var Es = xs, As = Cs, ks = Ls;
780
+ const qe = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
780
781
  Es,
781
782
  {
782
783
  ref: a,
783
- className: ie(
784
+ className: ce(
784
785
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
785
786
  s
786
787
  ),
787
788
  ...n
788
789
  }
789
790
  ));
790
- Ue.displayName = Es.displayName;
791
- const ut = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
791
+ qe.displayName = Es.displayName;
792
+ const gt = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
792
793
  As,
793
794
  {
794
795
  ref: a,
795
- className: ie("aspect-square h-full w-full", s),
796
+ className: ce("aspect-square h-full w-full", s),
796
797
  ...n
797
798
  }
798
799
  ));
799
- ut.displayName = As.displayName;
800
- const Fe = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
801
- Ms,
800
+ gt.displayName = As.displayName;
801
+ const $e = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
802
+ ks,
802
803
  {
803
804
  ref: a,
804
- className: ie(
805
+ className: ce(
805
806
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
806
807
  s
807
808
  ),
808
809
  ...n
809
810
  }
810
811
  ));
811
- Fe.displayName = Ms.displayName;
812
- function mt({
812
+ $e.displayName = ks.displayName;
813
+ function vt({
813
814
  open: s,
814
815
  onOpenChange: n,
815
816
  group: a,
816
817
  onUpdate: t
817
818
  }) {
818
- const [i, o] = S("members"), [u, m] = S(""), [f, b] = S([]), [d, l] = S([]), { data: h, isLoading: p, refetch: v } = ta(a.id), y = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: E } = ra({
819
+ const [i, o] = x("members"), [u, m] = x(""), [f, v] = x([]), [d, l] = x([]), { data: h, isLoading: p, refetch: g } = na(a.id), y = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: S, isLoading: L } = oa({
819
820
  type: y,
820
821
  tenantId: a.tenantId || void 0,
821
822
  active: !0,
822
823
  limit: 100
823
- }), T = et(), R = st(), k = (h == null ? void 0 : h.members) || [], P = re(() => new Set(k.map((g) => g.userId)), [k]), G = re(() => N.filter((g) => !P.has(g.id)), [N, P]), V = re(() => {
824
- if (!u) return G;
825
- const g = u.toLowerCase();
826
- return G.filter(
827
- (D) => {
828
- var O, F;
829
- return ((O = D.name) == null ? void 0 : O.toLowerCase().includes(g)) || ((F = D.email) == null ? void 0 : F.toLowerCase().includes(g));
824
+ }), _ = nt(), G = ot(), M = (h == null ? void 0 : h.members) || [], V = re(() => new Set(M.map((b) => b.userId)), [M]), T = re(() => S.filter((b) => !V.has(b.id)), [S, V]), R = re(() => {
825
+ if (!u) return T;
826
+ const b = u.toLowerCase();
827
+ return T.filter(
828
+ (N) => {
829
+ var k, P;
830
+ return ((k = N.name) == null ? void 0 : k.toLowerCase().includes(b)) || ((P = N.email) == null ? void 0 : P.toLowerCase().includes(b));
830
831
  }
831
832
  );
832
- }, [G, u]), w = re(() => {
833
- if (!u) return k;
834
- const g = u.toLowerCase();
835
- return k.filter(
836
- (D) => {
837
- var O, F, Y, X;
838
- return ((F = (O = D.user) == null ? void 0 : O.name) == null ? void 0 : F.toLowerCase().includes(g)) || ((X = (Y = D.user) == null ? void 0 : Y.email) == null ? void 0 : X.toLowerCase().includes(g));
833
+ }, [T, u]), C = re(() => {
834
+ if (!u) return M;
835
+ const b = u.toLowerCase();
836
+ return M.filter(
837
+ (N) => {
838
+ var k, P, j, Z;
839
+ return ((P = (k = N.user) == null ? void 0 : k.name) == null ? void 0 : P.toLowerCase().includes(b)) || ((Z = (j = N.user) == null ? void 0 : j.email) == null ? void 0 : Z.toLowerCase().includes(b));
839
840
  }
840
841
  );
841
- }, [k, u]), z = async () => {
842
+ }, [M, u]), z = async () => {
842
843
  if (f.length !== 0)
843
844
  try {
844
- await T.mutateAsync({
845
+ await _.mutateAsync({
845
846
  groupId: a.id,
846
847
  data: {
847
848
  userIds: f,
848
849
  userType: y === "tenant" ? "tenant" : "org"
849
850
  }
850
- }), b([]), o("members"), v(), t == null || t();
851
- } catch (g) {
852
- console.error("Failed to add members:", g);
851
+ }), v([]), o("members"), g(), t == null || t();
852
+ } catch (b) {
853
+ console.error("Failed to add members:", b);
853
854
  }
854
- }, de = async () => {
855
+ }, H = async () => {
855
856
  if (d.length !== 0)
856
857
  try {
857
- await R.mutateAsync({
858
+ await G.mutateAsync({
858
859
  groupId: a.id,
859
860
  data: {
860
861
  userIds: d
861
862
  }
862
- }), l([]), v(), t == null || t();
863
- } catch (g) {
864
- console.error("Failed to remove members:", g);
863
+ }), l([]), g(), t == null || t();
864
+ } catch (b) {
865
+ console.error("Failed to remove members:", b);
865
866
  }
866
- }, ue = (g) => {
867
- b(
868
- (D) => D.includes(g) ? D.filter((O) => O !== g) : [...D, g]
867
+ }, ue = (b) => {
868
+ v(
869
+ (N) => N.includes(b) ? N.filter((k) => k !== b) : [...N, b]
869
870
  );
870
- }, C = (g) => {
871
+ }, me = (b) => {
871
872
  l(
872
- (D) => D.includes(g) ? D.filter((O) => O !== g) : [...D, g]
873
+ (N) => N.includes(b) ? N.filter((k) => k !== b) : [...N, b]
873
874
  );
874
875
  };
875
- return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(Oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(_e, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
876
- /* @__PURE__ */ r(Te, { children: [
877
- /* @__PURE__ */ e(Ge, { children: a.name }),
876
+ return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(Te, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ge, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
877
+ /* @__PURE__ */ r(Re, { children: [
878
+ /* @__PURE__ */ e(Ue, { children: a.name }),
878
879
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: [
879
- k.length,
880
+ M.length,
880
881
  " ",
881
- k.length === 1 ? "member" : "members"
882
+ M.length === 1 ? "member" : "members"
882
883
  ] }) }),
883
884
  /* @__PURE__ */ r("p", { id: "group-members-description", className: "sr-only", children: [
884
885
  "Add or remove members from the ",
@@ -886,38 +887,38 @@ function mt({
886
887
  " group"
887
888
  ] })
888
889
  ] }),
889
- /* @__PURE__ */ r(cs, { value: i, onValueChange: (g) => {
890
- o(g), m(""), l([]);
890
+ /* @__PURE__ */ r(cs, { value: i, onValueChange: (b) => {
891
+ o(b), m(""), l([]);
891
892
  }, className: "mt-4", children: [
892
893
  /* @__PURE__ */ r(ls, { className: "grid w-full grid-cols-2", children: [
893
- /* @__PURE__ */ e(ne, { value: "members", children: "Current Members" }),
894
- /* @__PURE__ */ e(ne, { value: "add", children: "Add Members" })
894
+ /* @__PURE__ */ e(oe, { value: "members", children: "Current Members" }),
895
+ /* @__PURE__ */ e(oe, { value: "add", children: "Add Members" })
895
896
  ] }),
896
- /* @__PURE__ */ r(oe, { value: "members", className: "mt-4 space-y-4", children: [
897
+ /* @__PURE__ */ r(ie, { value: "members", className: "mt-4 space-y-4", children: [
897
898
  /* @__PURE__ */ r("div", { className: "relative", children: [
898
899
  /* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
899
900
  /* @__PURE__ */ e(
900
- W,
901
+ J,
901
902
  {
902
903
  placeholder: "Search members...",
903
904
  value: u,
904
- onChange: (g) => m(g.target.value),
905
+ onChange: (b) => m(b.target.value),
905
906
  className: "pl-10"
906
907
  }
907
908
  )
908
909
  ] }),
909
- /* @__PURE__ */ e(Ce, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : w.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
910
- /* @__PURE__ */ e(q, { className: "h-12 w-12 mb-3 opacity-50" }),
910
+ /* @__PURE__ */ e(Ce, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((b) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, b)) }) : C.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
911
+ /* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
911
912
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
912
913
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
913
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: w.map((g) => /* @__PURE__ */ e(
914
- ht,
914
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: C.map((b) => /* @__PURE__ */ e(
915
+ bt,
915
916
  {
916
- member: g,
917
- selected: d.includes(g.userId),
918
- onToggle: () => C(g.userId)
917
+ member: b,
918
+ selected: d.includes(b.userId),
919
+ onToggle: () => me(b.userId)
919
920
  },
920
- g.id
921
+ b.id
921
922
  )) }) }),
922
923
  d.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
923
924
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
@@ -927,16 +928,16 @@ function mt({
927
928
  " selected"
928
929
  ] }),
929
930
  /* @__PURE__ */ e(
930
- M,
931
+ A,
931
932
  {
932
933
  variant: "destructive",
933
934
  size: "sm",
934
- onClick: de,
935
- disabled: R.isPending,
936
- children: R.isPending ? /* @__PURE__ */ r(_, { children: [
937
- /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
935
+ onClick: H,
936
+ disabled: G.isPending,
937
+ children: G.isPending ? /* @__PURE__ */ r(I, { children: [
938
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
938
939
  "Removing..."
939
- ] }) : /* @__PURE__ */ r(_, { children: [
940
+ ] }) : /* @__PURE__ */ r(I, { children: [
940
941
  /* @__PURE__ */ e(ds, { className: "mr-2 h-4 w-4" }),
941
942
  "Remove Selected"
942
943
  ] })
@@ -944,31 +945,31 @@ function mt({
944
945
  )
945
946
  ] })
946
947
  ] }),
947
- /* @__PURE__ */ r(oe, { value: "add", className: "mt-4 space-y-4", children: [
948
+ /* @__PURE__ */ r(ie, { value: "add", className: "mt-4 space-y-4", children: [
948
949
  /* @__PURE__ */ r("div", { className: "relative", children: [
949
950
  /* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
950
951
  /* @__PURE__ */ e(
951
- W,
952
+ J,
952
953
  {
953
954
  placeholder: "Search users to add...",
954
955
  value: u,
955
- onChange: (g) => m(g.target.value),
956
+ onChange: (b) => m(b.target.value),
956
957
  className: "pl-10"
957
958
  }
958
959
  )
959
960
  ] }),
960
- /* @__PURE__ */ e(Ce, { className: "h-[300px]", children: E ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : V.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
961
+ /* @__PURE__ */ e(Ce, { className: "h-[300px]", children: L ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((b) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, b)) }) : R.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
961
962
  /* @__PURE__ */ e(Le, { className: "h-12 w-12 mb-3 opacity-50" }),
962
963
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
963
964
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
964
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: V.map((g) => /* @__PURE__ */ e(
965
- pt,
965
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: R.map((b) => /* @__PURE__ */ e(
966
+ yt,
966
967
  {
967
- user: g,
968
- selected: f.includes(g.id),
969
- onToggle: () => ue(g.id)
968
+ user: b,
969
+ selected: f.includes(b.id),
970
+ onToggle: () => ue(b.id)
970
971
  },
971
- g.id
972
+ b.id
972
973
  )) }) }),
973
974
  f.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
974
975
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
@@ -978,14 +979,14 @@ function mt({
978
979
  " selected"
979
980
  ] }),
980
981
  /* @__PURE__ */ e(
981
- M,
982
+ A,
982
983
  {
983
984
  onClick: z,
984
- disabled: T.isPending,
985
- children: T.isPending ? /* @__PURE__ */ r(_, { children: [
986
- /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
985
+ disabled: _.isPending,
986
+ children: _.isPending ? /* @__PURE__ */ r(I, { children: [
987
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
987
988
  "Adding..."
988
- ] }) : /* @__PURE__ */ r(_, { children: [
989
+ ] }) : /* @__PURE__ */ r(I, { children: [
989
990
  /* @__PURE__ */ e(Le, { className: "mr-2 h-4 w-4" }),
990
991
  "Add Members"
991
992
  ] })
@@ -996,7 +997,7 @@ function mt({
996
997
  ] })
997
998
  ] }) }) });
998
999
  }
999
- function ht({
1000
+ function bt({
1000
1001
  member: s,
1001
1002
  selected: n,
1002
1003
  onToggle: a
@@ -1010,7 +1011,7 @@ function ht({
1010
1011
  onClick: a,
1011
1012
  children: [
1012
1013
  /* @__PURE__ */ e(us, { checked: n }),
1013
- /* @__PURE__ */ e(Ue, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
1014
+ /* @__PURE__ */ e(qe, { className: "h-8 w-8", children: /* @__PURE__ */ e($e, { className: "text-xs", children: t }) }),
1014
1015
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
1015
1016
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
1016
1017
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = s.user) == null ? void 0 : m.email })
@@ -1019,7 +1020,7 @@ function ht({
1019
1020
  }
1020
1021
  );
1021
1022
  }
1022
- function pt({
1023
+ function yt({
1023
1024
  user: s,
1024
1025
  selected: n,
1025
1026
  onToggle: a
@@ -1033,7 +1034,7 @@ function pt({
1033
1034
  onClick: a,
1034
1035
  children: [
1035
1036
  /* @__PURE__ */ e(us, { checked: n }),
1036
- /* @__PURE__ */ e(Ue, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
1037
+ /* @__PURE__ */ e(qe, { className: "h-8 w-8", children: /* @__PURE__ */ e($e, { className: "text-xs", children: t }) }),
1037
1038
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
1038
1039
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
1039
1040
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
@@ -1042,96 +1043,96 @@ function pt({
1042
1043
  }
1043
1044
  );
1044
1045
  }
1045
- function ft({
1046
+ function Nt({
1046
1047
  open: s,
1047
1048
  onOpenChange: n
1048
1049
  }) {
1049
- const [a, t] = S("groups"), [i, o] = S(""), [u, m] = S(null), [f, b] = S(!1), [d, l] = S(null), { tokenProps: h } = U(), { currentUser: p } = ms(), v = Za(), y = (p == null ? void 0 : p.type) === "tenant", N = h == null ? void 0 : h.tenantId, { groups: E, isLoading: T, refetch: R } = na({
1050
+ const [a, t] = x("groups"), [i, o] = x(""), [u, m] = x(null), [f, v] = x(!1), [d, l] = x(null), { tokenProps: h } = F(), { currentUser: p } = ms(), g = rt(), y = (p == null ? void 0 : p.type) === "tenant", S = h == null ? void 0 : h.tenantId, { groups: L, isLoading: _, refetch: G } = ia({
1050
1051
  type: y ? "TENANT_GROUP" : "all",
1051
- tenantId: y ? N : void 0,
1052
+ tenantId: y ? S : void 0,
1052
1053
  includeMembers: !1
1053
- }), k = E.filter(
1054
- (w) => {
1054
+ }), M = L.filter(
1055
+ (C) => {
1055
1056
  var z;
1056
- return w.name.toLowerCase().includes(i.toLowerCase()) || ((z = w.description) == null ? void 0 : z.toLowerCase().includes(i.toLowerCase()));
1057
+ return C.name.toLowerCase().includes(i.toLowerCase()) || ((z = C.description) == null ? void 0 : z.toLowerCase().includes(i.toLowerCase()));
1057
1058
  }
1058
- ), P = async () => {
1059
+ ), V = async () => {
1059
1060
  if (d)
1060
1061
  try {
1061
- await v.mutateAsync(d.id), l(null), R();
1062
- } catch (w) {
1063
- console.error("Failed to delete group:", w);
1062
+ await g.mutateAsync(d.id), l(null), G();
1063
+ } catch (C) {
1064
+ console.error("Failed to delete group:", C);
1064
1065
  }
1065
- }, G = (w) => {
1066
- m(w), b(!0);
1067
- }, V = () => {
1068
- t("groups"), R();
1066
+ }, T = (C) => {
1067
+ m(C), v(!0);
1068
+ }, R = () => {
1069
+ t("groups"), G();
1069
1070
  };
1070
- return /* @__PURE__ */ r(_, { children: [
1071
- /* @__PURE__ */ e(Oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(_e, { className: "max-w-4xl max-h-[80vh]", children: [
1072
- /* @__PURE__ */ r(Te, { children: [
1073
- /* @__PURE__ */ r(Ge, { className: "flex items-center gap-2", children: [
1074
- /* @__PURE__ */ e(q, { className: "h-5 w-5" }),
1071
+ return /* @__PURE__ */ r(I, { children: [
1072
+ /* @__PURE__ */ e(Te, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ge, { className: "max-w-4xl max-h-[80vh]", children: [
1073
+ /* @__PURE__ */ r(Re, { children: [
1074
+ /* @__PURE__ */ r(Ue, { className: "flex items-center gap-2", children: [
1075
+ /* @__PURE__ */ e($, { className: "h-5 w-5" }),
1075
1076
  "Group Management"
1076
1077
  ] }),
1077
1078
  /* @__PURE__ */ e(rs, { children: "Manage your groups, create new groups, and control group membership" })
1078
1079
  ] }),
1079
1080
  /* @__PURE__ */ r(cs, { value: a, onValueChange: t, className: "mt-4", children: [
1080
1081
  /* @__PURE__ */ r(ls, { className: "grid w-full grid-cols-2", children: [
1081
- /* @__PURE__ */ r(ne, { value: "groups", className: "flex items-center gap-2", children: [
1082
- /* @__PURE__ */ e(q, { className: "h-4 w-4" }),
1082
+ /* @__PURE__ */ r(oe, { value: "groups", className: "flex items-center gap-2", children: [
1083
+ /* @__PURE__ */ e($, { className: "h-4 w-4" }),
1083
1084
  "Groups"
1084
1085
  ] }),
1085
- /* @__PURE__ */ r(ne, { value: "create", className: "flex items-center gap-2", children: [
1086
- /* @__PURE__ */ e(Ie, { className: "h-4 w-4" }),
1086
+ /* @__PURE__ */ r(oe, { value: "create", className: "flex items-center gap-2", children: [
1087
+ /* @__PURE__ */ e(Pe, { className: "h-4 w-4" }),
1087
1088
  "Create Group"
1088
1089
  ] })
1089
1090
  ] }),
1090
- /* @__PURE__ */ e(oe, { value: "groups", className: "mt-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
1091
+ /* @__PURE__ */ e(ie, { value: "groups", className: "mt-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
1091
1092
  /* @__PURE__ */ r("div", { className: "relative", children: [
1092
1093
  /* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1093
1094
  /* @__PURE__ */ e(
1094
- W,
1095
+ J,
1095
1096
  {
1096
1097
  placeholder: "Search groups...",
1097
1098
  value: i,
1098
- onChange: (w) => o(w.target.value),
1099
+ onChange: (C) => o(C.target.value),
1099
1100
  className: "pl-10"
1100
1101
  }
1101
1102
  )
1102
1103
  ] }),
1103
- /* @__PURE__ */ e(Ce, { className: "h-[400px]", children: T ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((w) => /* @__PURE__ */ e(De, { className: "h-24 w-full" }, w)) }) : k.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1104
- /* @__PURE__ */ e(q, { className: "h-12 w-12 mb-3 opacity-50" }),
1104
+ /* @__PURE__ */ e(Ce, { className: "h-[400px]", children: _ ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((C) => /* @__PURE__ */ e(De, { className: "h-24 w-full" }, C)) }) : M.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1105
+ /* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
1105
1106
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1106
1107
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: i ? "Try a different search" : "Create your first group to get started" })
1107
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: k.map((w) => /* @__PURE__ */ e(
1108
- gt,
1108
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((C) => /* @__PURE__ */ e(
1109
+ St,
1109
1110
  {
1110
- group: w,
1111
- onManageMembers: () => G(w),
1112
- onDelete: () => l(w),
1111
+ group: C,
1112
+ onManageMembers: () => T(C),
1113
+ onDelete: () => l(C),
1113
1114
  currentUserId: p == null ? void 0 : p.id
1114
1115
  },
1115
- w.id
1116
+ C.id
1116
1117
  )) }) })
1117
1118
  ] }) }),
1118
- /* @__PURE__ */ e(oe, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1119
- at,
1119
+ /* @__PURE__ */ e(ie, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1120
+ it,
1120
1121
  {
1121
- onSuccess: V,
1122
- tenantId: N,
1122
+ onSuccess: R,
1123
+ tenantId: S,
1123
1124
  isTenantUser: y
1124
1125
  }
1125
1126
  ) })
1126
1127
  ] })
1127
1128
  ] }) }),
1128
1129
  u && /* @__PURE__ */ e(
1129
- mt,
1130
+ vt,
1130
1131
  {
1131
1132
  open: f,
1132
- onOpenChange: b,
1133
+ onOpenChange: v,
1133
1134
  group: u,
1134
- onUpdate: () => R()
1135
+ onUpdate: () => G()
1135
1136
  }
1136
1137
  ),
1137
1138
  /* @__PURE__ */ e(
@@ -1153,11 +1154,11 @@ function ft({
1153
1154
  /* @__PURE__ */ e(
1154
1155
  Ee,
1155
1156
  {
1156
- onClick: P,
1157
- disabled: v.isPending,
1157
+ onClick: V,
1158
+ disabled: g.isPending,
1158
1159
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1159
- children: v.isPending ? /* @__PURE__ */ r(_, { children: [
1160
- /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
1160
+ children: g.isPending ? /* @__PURE__ */ r(I, { children: [
1161
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1161
1162
  "Deleting..."
1162
1163
  ] }) : "Delete Group"
1163
1164
  }
@@ -1168,7 +1169,7 @@ function ft({
1168
1169
  )
1169
1170
  ] });
1170
1171
  }
1171
- function gt({
1172
+ function St({
1172
1173
  group: s,
1173
1174
  onManageMembers: n,
1174
1175
  onDelete: a,
@@ -1183,20 +1184,20 @@ function gt({
1183
1184
  ] }),
1184
1185
  /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
1185
1186
  /* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
1186
- /* @__PURE__ */ e(q, { className: "h-3 w-3" }),
1187
+ /* @__PURE__ */ e($, { className: "h-3 w-3" }),
1187
1188
  s.memberCount,
1188
1189
  " ",
1189
1190
  s.memberCount === 1 ? "member" : "members"
1190
1191
  ] }),
1191
1192
  /* @__PURE__ */ r("span", { children: [
1192
1193
  "Created ",
1193
- Ta(new Date(s.createdAt), "MMM d, yyyy")
1194
+ Ua(new Date(s.createdAt), "MMM d, yyyy")
1194
1195
  ] })
1195
1196
  ] })
1196
1197
  ] }),
1197
1198
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
1198
1199
  /* @__PURE__ */ e(
1199
- M,
1200
+ A,
1200
1201
  {
1201
1202
  variant: "ghost",
1202
1203
  size: "sm",
@@ -1206,7 +1207,7 @@ function gt({
1206
1207
  }
1207
1208
  ),
1208
1209
  i && /* @__PURE__ */ e(
1209
- M,
1210
+ A,
1210
1211
  {
1211
1212
  variant: "ghost",
1212
1213
  size: "sm",
@@ -1219,43 +1220,43 @@ function gt({
1219
1220
  ] })
1220
1221
  ] }) });
1221
1222
  }
1222
- function Lt() {
1223
- var He, Be, Ke;
1224
- Da(), La();
1223
+ function It() {
1224
+ var Qe, We, Je;
1225
+ ka(), Ma();
1225
1226
  const {
1226
1227
  authToken: s,
1227
1228
  tokenProps: n,
1228
1229
  id: a
1229
- } = U(), { isLocalDev: t } = oa(), { permissions: i } = _a(), o = ia(), { isLoading: u } = ca();
1230
- x((c) => c.theme);
1231
- const m = x((c) => c.lenses), f = x((c) => c.selectedLensId), b = m == null ? void 0 : m.find((c) => c.id === f), d = x((c) => c.dashboard);
1232
- x((c) => c.selectedSheetId);
1233
- const l = x(
1230
+ } = F(), { isLocalDev: t } = ca(), { permissions: i } = Ra(), o = la(), { isLoading: u } = da();
1231
+ w((c) => c.theme);
1232
+ const m = w((c) => c.lenses), f = w((c) => c.selectedLensId), v = m == null ? void 0 : m.find((c) => c.id === f), d = w((c) => c.dashboard);
1233
+ w((c) => c.selectedSheetId);
1234
+ const l = w(
1234
1235
  (c) => c.isDashboardEditing
1235
- ), { setDashboardTitle: h } = x((c) => c.actions), [p, v] = S(!1), [y, N] = S(!1), [E, T] = S(!1), [R, k] = S(!1), [P, G] = S(null), [V, w] = S(!1), z = x((c) => c.isDashboardPanelOpen), de = x(
1236
+ ), { setDashboardTitle: h } = w((c) => c.actions), [p, g] = x(!1), [y, S] = x(!1), [L, _] = x(!1), [G, M] = x(!1), [V, T] = x(!1), [R, C] = x(null), [z, H] = x(!1), ue = w((c) => c.isDashboardPanelOpen), me = w(
1236
1237
  (c) => c.actions.setIsDashboardPanelOpen
1237
- ), ue = x((c) => c.filterValues), C = x((c) => c.isVisualEditing);
1238
- We((c) => c.card);
1239
- const g = te(
1238
+ ), b = w((c) => c.filterValues), N = w((c) => c.isVisualEditing);
1239
+ Ze((c) => c.card);
1240
+ const k = te(
1240
1241
  (c) => c.selectedDashboard
1241
- ), D = te(
1242
+ ), P = te(
1242
1243
  (c) => c.initialDashboard
1243
1244
  );
1244
- te((c) => c.selectedVisual), x((c) => c.selectedFrameId), We((c) => c.frame);
1245
- const O = g ? (Be = g == null ? void 0 : g.permissions) == null ? void 0 : Be.canEdit : (He = D == null ? void 0 : D.permissions) == null ? void 0 : He.canEdit, F = x((c) => c.showFilters), Y = la((c) => c.setPanelOpen), X = x(
1245
+ te((c) => c.selectedVisual), w((c) => c.selectedFrameId), Ze((c) => c.frame);
1246
+ const j = k ? (We = k == null ? void 0 : k.permissions) == null ? void 0 : We.canEdit : (Qe = P == null ? void 0 : P.permissions) == null ? void 0 : Qe.canEdit, Z = w((c) => c.showFilters), Ms = ua((c) => c.setPanelOpen), Os = w(
1246
1247
  (c) => c.showDashboardJSON
1247
- ), me = x((c) => c.onSaveFunction), ks = x(
1248
+ ), he = w((c) => c.onSaveFunction), Is = w(
1248
1249
  (c) => c.actions.setShowFilters
1249
- ), { setIsDashboardEditing: je, setShowDashboardJSON: $e } = x(
1250
+ ), { setIsDashboardEditing: Ve, setShowDashboardJSON: ze } = w(
1250
1251
  (c) => c.actions
1251
- ), { setInitialDashboard: qe, clearSelectedDashboard: Os } = te(
1252
+ ), { setInitialDashboard: He, clearSelectedDashboard: _s } = te(
1252
1253
  (c) => c.actions
1253
- ), { resources: Z } = da(be.DASHBOARD), { currentUser: Is } = ms(), _s = ua(Is), H = g || D, Ve = H ? {
1254
- id: H.id,
1255
- title: (d == null ? void 0 : d.title) || H.title || "Dashboard"
1256
- } : null, { handleAddNewFrame: Ts } = ma(), [B, he] = S(!1), [Gs, ee] = S(!1), se = ha(be.DASHBOARD), [K, pe] = S(
1254
+ ), { resources: X } = ma(be.DASHBOARD), { currentUser: Ts } = ms(), Ps = ha(Ts), B = k || P, Be = B ? {
1255
+ id: B.id,
1256
+ title: (d == null ? void 0 : d.title) || B.title || "Dashboard"
1257
+ } : null, { handleAddNewFrame: Gs } = pa(), [K, pe] = x(!1), [Rs, ee] = x(!1), se = fa(be.DASHBOARD), [Q, fe] = x(
1257
1258
  null
1258
- ), Rs = async (c, I) => {
1259
+ ), Us = async (c, O) => {
1259
1260
  if (!(d != null && d.id)) {
1260
1261
  console.log("No dashboard ID found");
1261
1262
  return;
@@ -1263,7 +1264,7 @@ function Lt() {
1263
1264
  console.log("Updating dashboard title:", {
1264
1265
  dashboardId: d.id,
1265
1266
  newTitle: c,
1266
- previousTitle: I
1267
+ previousTitle: O
1267
1268
  }), se.mutate(
1268
1269
  {
1269
1270
  resourceId: d.id,
@@ -1271,87 +1272,87 @@ function Lt() {
1271
1272
  },
1272
1273
  {
1273
1274
  onSuccess: () => {
1274
- console.log("Dashboard title updated successfully"), A.success("Dashboard title updated");
1275
+ console.log("Dashboard title updated successfully"), E.success("Dashboard title updated");
1275
1276
  },
1276
- onError: (Q) => {
1277
- console.error("Failed to update dashboard title:", Q), A.error("Failed to update dashboard title"), h(I);
1277
+ onError: (W) => {
1278
+ console.error("Failed to update dashboard title:", W), E.error("Failed to update dashboard title"), h(O);
1278
1279
  }
1279
1280
  }
1280
1281
  );
1281
1282
  };
1282
- Ca(() => {
1283
- if (Z && Z.length > 0) {
1283
+ Aa(() => {
1284
+ if (X && X.length > 0) {
1284
1285
  const c = d == null ? void 0 : d.id;
1285
1286
  if (c) {
1286
- const I = Z.find(
1287
- (Q) => Q.id === c
1287
+ const O = X.find(
1288
+ (W) => W.id === c
1288
1289
  );
1289
- I && qe(I);
1290
+ O && He(O);
1290
1291
  }
1291
1292
  }
1292
- }, [Z, d == null ? void 0 : d.id, qe]);
1293
- const ae = n.orgUserId || n.tenantId, Ps = l && !C && ae && O, { setDashboard: Us } = x((c) => c.actions), Fs = () => {
1294
- je(!0);
1295
- }, fe = () => {
1296
- je(!1), $e(!1), pe(null);
1293
+ }, [X, d == null ? void 0 : d.id, He]);
1294
+ const ae = n.orgUserId || n.tenantId, Fs = l && !N && ae && j, { setDashboard: js } = w((c) => c.actions), qs = () => {
1295
+ Ve(!0);
1296
+ }, ge = () => {
1297
+ Ve(!1), ze(!1), fe(null);
1297
1298
  };
1298
- Ea(
1299
+ Oa(
1299
1300
  l,
1300
1301
  d,
1301
- K,
1302
- (c) => pe(c)
1302
+ Q,
1303
+ (c) => fe(c)
1303
1304
  );
1304
- const js = () => K ? JSON.stringify(d) !== JSON.stringify(K) : !1, $s = () => {
1305
- js() ? ee(!0) : fe();
1306
- }, qs = async () => {
1307
- await ge({ closeAfterSave: !0 });
1308
- }, Vs = () => {
1309
- K && Us(K), fe(), ee(!1);
1305
+ const $s = () => Q ? JSON.stringify(d) !== JSON.stringify(Q) : !1, Vs = () => {
1306
+ $s() ? ee(!0) : ge();
1307
+ }, zs = async () => {
1308
+ await ve({ closeAfterSave: !0 });
1309
+ }, Hs = () => {
1310
+ Q && js(Q), ge(), ee(!1);
1310
1311
  };
1311
- async function ge(c) {
1312
- const I = (c == null ? void 0 : c.closeAfterSave) ?? V;
1313
- w(I), I && ee(!1);
1314
- const Q = wa(d);
1315
- k(!0), G(null), he(!0);
1316
- const Bs = {
1312
+ async function ve(c) {
1313
+ const O = (c == null ? void 0 : c.closeAfterSave) ?? z;
1314
+ H(O), O && ee(!1);
1315
+ const W = Ea(d);
1316
+ T(!0), C(null), pe(!0);
1317
+ const Qs = {
1317
1318
  template: d
1318
1319
  };
1319
1320
  se.mutate(
1320
1321
  {
1321
1322
  resourceId: d.id,
1322
- data: Bs
1323
+ data: Qs
1323
1324
  },
1324
1325
  {
1325
1326
  onSuccess: () => {
1326
- he(!1), A.success("Dashboard saved!"), pe(Q), k(!1), w(!1), I && fe();
1327
+ pe(!1), E.success("Dashboard saved!"), fe(W), T(!1), H(!1), O && ge();
1327
1328
  },
1328
1329
  onError: () => {
1329
- he(!1), G("Failed to save dashboard. Please try again."), A.error("Failed to save dashboard");
1330
+ pe(!1), C("Failed to save dashboard. Please try again."), E.error("Failed to save dashboard");
1330
1331
  }
1331
1332
  }
1332
1333
  );
1333
1334
  }
1334
- async function zs() {
1335
- if (v(!0), !f || !b) return;
1336
- const c = JSON.stringify(d), I = {
1337
- ...b,
1335
+ async function Bs() {
1336
+ if (g(!0), !f || !v) return;
1337
+ const c = JSON.stringify(d), O = {
1338
+ ...v,
1338
1339
  template: c,
1339
- filterValues: ue
1340
+ filterValues: b
1340
1341
  };
1341
- await Me(
1342
+ await ke(
1342
1343
  n.apiServiceUrl,
1343
- I,
1344
+ O,
1344
1345
  s == null ? void 0 : s.accessToken
1345
- ), A.success("Lens saved"), me == null || me(d), v(!1);
1346
+ ), E.success("Lens saved"), he == null || he(d), g(!1);
1346
1347
  }
1347
- const ze = (b == null ? void 0 : b.name) || d.title;
1348
+ const Ke = (v == null ? void 0 : v.name) || d.title;
1348
1349
  se.isPending && console.log("Title during update:", {
1349
- title: ze,
1350
+ title: Ke,
1350
1351
  dashboardStateTitle: d.title,
1351
1352
  dashboardId: d == null ? void 0 : d.id,
1352
- currentLensName: b == null ? void 0 : b.name
1353
+ currentLensName: v == null ? void 0 : v.name
1353
1354
  });
1354
- const Hs = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail;
1355
+ const Ks = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail;
1355
1356
  return /* @__PURE__ */ r(
1356
1357
  "div",
1357
1358
  {
@@ -1359,47 +1360,47 @@ function Lt() {
1359
1360
  role: "dashboard-controls",
1360
1361
  children: [
1361
1362
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1362
- Hs && /* @__PURE__ */ r(_, { children: [
1363
+ Ks && /* @__PURE__ */ r(I, { children: [
1363
1364
  /* @__PURE__ */ e(
1364
- j,
1365
+ U,
1365
1366
  {
1366
1367
  "aria-label": "Manage Dashboards",
1367
1368
  tooltip: "Manage Dashboards",
1368
1369
  onClick: () => {
1369
- de(!z);
1370
+ me(!ue);
1370
1371
  },
1371
1372
  className: "h-7 p-2",
1372
- children: /* @__PURE__ */ e(Ra, { className: "h-4 w-4" })
1373
+ children: /* @__PURE__ */ e(qa, { className: "h-4 w-4" })
1373
1374
  }
1374
1375
  ),
1375
- o && !C && /* @__PURE__ */ e(
1376
- j,
1376
+ o && !N && /* @__PURE__ */ e(
1377
+ U,
1377
1378
  {
1378
1379
  "aria-label": "Dashboard Hub",
1379
1380
  tooltip: "Dashboard Hub",
1380
- onClick: () => Os(),
1381
+ onClick: () => _s(),
1381
1382
  className: "h-7 p-2",
1382
1383
  children: /* @__PURE__ */ e(ns, { className: "h-4 w-4" })
1383
1384
  }
1384
1385
  )
1385
1386
  ] }),
1386
- !C && o && (u ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1387
- /* @__PURE__ */ e($, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1387
+ !N && o && (u ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1388
+ /* @__PURE__ */ e(q, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1388
1389
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1389
1390
  ] }) : /* @__PURE__ */ e(
1390
- pa,
1391
+ ga,
1391
1392
  {
1392
- value: ze || "Untitled Dashboard",
1393
+ value: Ke || "Untitled Dashboard",
1393
1394
  onSave: (c) => {
1394
1395
  console.log("EditableText onSave called:", {
1395
1396
  newTitle: c,
1396
- canEditDashboard: O,
1397
+ canEditDashboard: j,
1397
1398
  dashboardId: d == null ? void 0 : d.id
1398
1399
  });
1399
- const I = (d == null ? void 0 : d.title) || "";
1400
- h(c), Rs(c, I);
1400
+ const O = (d == null ? void 0 : d.title) || "";
1401
+ h(c), Us(c, O);
1401
1402
  },
1402
- isEditable: O && !b,
1403
+ isEditable: j && !v,
1403
1404
  displayClassName: "text-sm font-medium",
1404
1405
  inputClassName: "text-sm font-medium",
1405
1406
  placeholder: "Dashboard Title",
@@ -1408,178 +1409,192 @@ function Lt() {
1408
1409
  ))
1409
1410
  ] }),
1410
1411
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1411
- C && /* @__PURE__ */ r(_, { children: [
1412
- /* @__PURE__ */ e(Aa, { className: "mr-2" }),
1413
- /* @__PURE__ */ e(Ma, { className: "h-7" })
1412
+ N && /* @__PURE__ */ r(I, { children: [
1413
+ /* @__PURE__ */ e(Ia, { className: "mr-2" }),
1414
+ /* @__PURE__ */ e(_a, { className: "h-7" })
1414
1415
  ] }),
1415
- t && !C && /* @__PURE__ */ r(_, { children: [
1416
+ t && !N && /* @__PURE__ */ r(I, { children: [
1416
1417
  /* @__PURE__ */ e(
1417
- j,
1418
+ U,
1418
1419
  {
1419
1420
  tooltip: "Copy Token",
1420
1421
  onClick: () => {
1421
1422
  var c;
1422
- s != null && s.accessToken && ((c = navigator == null ? void 0 : navigator.clipboard) != null && c.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => A.success("Token copied to clipboard")).catch(() => A.error("Unable to copy token")) : A.error("Clipboard not available"));
1423
+ s != null && s.accessToken && ((c = navigator == null ? void 0 : navigator.clipboard) != null && c.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => E.success("Token copied to clipboard")).catch(() => E.error("Unable to copy token")) : E.error("Clipboard not available"));
1423
1424
  },
1424
1425
  className: "h-7 p-2",
1425
- children: /* @__PURE__ */ e(fa, { className: "h-4 w-4" })
1426
+ children: /* @__PURE__ */ e(va, { className: "h-4 w-4" })
1426
1427
  }
1427
1428
  ),
1428
1429
  /* @__PURE__ */ e(
1429
- j,
1430
+ U,
1430
1431
  {
1431
1432
  tooltip: "Invalidate Token",
1432
- onClick: () => ga(n.apiServiceUrl),
1433
+ onClick: () => ba(n.apiServiceUrl),
1433
1434
  className: "h-7 p-2",
1434
- children: /* @__PURE__ */ e(Ua, { className: "h-4 w-4" })
1435
+ children: /* @__PURE__ */ e(Va, { className: "h-4 w-4" })
1435
1436
  }
1436
1437
  )
1437
1438
  ] }),
1438
- !C && o && /* @__PURE__ */ e(va, {}),
1439
- !C && o && /* @__PURE__ */ e(ka, {}),
1440
- !C && o && /* @__PURE__ */ e(Oa, {}),
1441
- !C && o && _s && /* @__PURE__ */ e(
1442
- j,
1439
+ !N && o && /* @__PURE__ */ e(ya, {}),
1440
+ !N && o && /* @__PURE__ */ e(Ta, {}),
1441
+ !N && o && /* @__PURE__ */ e(Pa, {}),
1442
+ !N && o && Ps && /* @__PURE__ */ e(
1443
+ U,
1443
1444
  {
1444
1445
  tooltip: "Manage Groups",
1445
- onClick: () => T(!0),
1446
+ onClick: () => _(!0),
1446
1447
  className: "h-7 p-2",
1447
- children: /* @__PURE__ */ e(q, { className: "h-4 w-4" })
1448
+ children: /* @__PURE__ */ e($, { className: "h-4 w-4" })
1448
1449
  }
1449
1450
  ),
1450
- !C && o && ((Ke = H == null ? void 0 : H.permissions) == null ? void 0 : Ke.canShare) && /* @__PURE__ */ e(
1451
- j,
1451
+ !N && o && ((Je = B == null ? void 0 : B.permissions) == null ? void 0 : Je.canShare) && /* @__PURE__ */ e(
1452
+ U,
1452
1453
  {
1453
1454
  tooltip: "Share Dashboard",
1454
- onClick: () => N(!0),
1455
+ onClick: () => S(!0),
1455
1456
  className: "h-7 p-2",
1456
- children: /* @__PURE__ */ e(ba, { className: "h-4 w-4" })
1457
+ children: /* @__PURE__ */ e(Na, { className: "h-4 w-4" })
1457
1458
  }
1458
1459
  ),
1459
- !F && !C && l && i.canUseFilters && o && /* @__PURE__ */ e(
1460
- M,
1460
+ !Z && !N && l && i.canUseFilters && o && /* @__PURE__ */ e(
1461
+ A,
1461
1462
  {
1462
1463
  className: "h-7 p-2",
1463
1464
  variant: "outline",
1464
1465
  onClick: () => {
1465
- Y("dashboard", !1), ks(!0);
1466
+ Ms("dashboard", !1), Is(!0);
1466
1467
  },
1467
1468
  size: "sm",
1468
- children: /* @__PURE__ */ e(ya, { className: "h-4 w-4" })
1469
+ children: /* @__PURE__ */ e(Sa, { className: "h-4 w-4" })
1469
1470
  }
1470
1471
  ),
1471
- l && !C && ae && t && o && /* @__PURE__ */ e(Ba, {}),
1472
- !C && ae && t && o && /* @__PURE__ */ e(Ka, {}),
1473
- l && !C && ae && b && t && o && /* @__PURE__ */ r(
1474
- M,
1472
+ l && !N && ae && t && o && /* @__PURE__ */ e(Ya, {}),
1473
+ !N && ae && t && o && /* @__PURE__ */ e(Za, {}),
1474
+ l && !N && ae && v && t && o && /* @__PURE__ */ r(
1475
+ A,
1475
1476
  {
1476
1477
  className: "h-7 p-2",
1477
1478
  variant: "secondary",
1478
1479
  disabled: p,
1479
- onClick: zs,
1480
+ onClick: Bs,
1480
1481
  size: "sm",
1481
1482
  children: [
1482
- /* @__PURE__ */ e(Je, { className: "mr-2 h-4 w-4" }),
1483
+ /* @__PURE__ */ e(Xe, { className: "mr-2 h-4 w-4" }),
1483
1484
  "Save Lens"
1484
1485
  ]
1485
1486
  }
1486
1487
  ),
1487
- l && !C && o && /* @__PURE__ */ r(
1488
- M,
1488
+ l && !N && o && /* @__PURE__ */ r(
1489
+ A,
1489
1490
  {
1490
1491
  variant: "outline",
1491
1492
  className: "h-7 p-2",
1492
1493
  size: "sm",
1493
1494
  disabled: !l,
1494
- onClick: () => Ts(),
1495
+ onClick: () => Gs(),
1495
1496
  children: [
1496
- /* @__PURE__ */ e(Ie, { className: "mr-2 h-4 w-4" }),
1497
+ /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4" }),
1497
1498
  "Visual"
1498
1499
  ]
1499
1500
  }
1500
1501
  ),
1501
- !C && !l && O && o && /* @__PURE__ */ r(
1502
- M,
1502
+ !N && !l && j && o && /* @__PURE__ */ r(
1503
+ A,
1503
1504
  {
1504
1505
  variant: "outline",
1505
1506
  className: "h-7 p-2",
1506
- onClick: Fs,
1507
+ onClick: qs,
1507
1508
  size: "sm",
1508
1509
  children: [
1509
- /* @__PURE__ */ e(Na, { className: "mr-2 h-4 w-4" }),
1510
+ /* @__PURE__ */ e(xa, { className: "mr-2 h-4 w-4" }),
1510
1511
  "Edit"
1511
1512
  ]
1512
1513
  }
1513
1514
  ),
1514
- Ps && o && /* @__PURE__ */ r(
1515
- M,
1515
+ Fs && o && /* @__PURE__ */ r(
1516
+ A,
1516
1517
  {
1517
1518
  className: "h-7 p-2",
1518
- disabled: B,
1519
- onClick: () => ge(),
1519
+ disabled: K,
1520
+ onClick: () => ve(),
1520
1521
  size: "sm",
1521
1522
  children: [
1522
- B ? /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Je, { className: "mr-2 h-4 w-4" }),
1523
- B ? "Saving..." : "Save"
1523
+ K ? /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Xe, { className: "mr-2 h-4 w-4" }),
1524
+ K ? "Saving..." : "Save"
1524
1525
  ]
1525
1526
  }
1526
1527
  ),
1527
- !C && l && t && o && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1528
- M,
1528
+ !N && l && t && o && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1529
+ A,
1529
1530
  {
1530
1531
  className: "h-7 p-2",
1531
- onClick: () => $e(!X),
1532
+ onClick: () => ze(!Os),
1532
1533
  size: "sm",
1533
1534
  variant: "ghost",
1534
- children: /* @__PURE__ */ e(Sa, { className: "h-4 w-4" })
1535
+ children: /* @__PURE__ */ e(wa, { className: "h-4 w-4" })
1535
1536
  }
1536
1537
  ) }),
1537
- !C && t && /* @__PURE__ */ e(Va, {}),
1538
- l && !C && o && /* @__PURE__ */ r(
1539
- M,
1538
+ !N && t && /* @__PURE__ */ e(Qa, {}),
1539
+ l && !N && o && /* @__PURE__ */ r(
1540
+ A,
1540
1541
  {
1541
1542
  variant: "outline",
1542
1543
  className: "h-7 p-2",
1543
- onClick: $s,
1544
+ onClick: Vs,
1544
1545
  children: [
1545
1546
  /* @__PURE__ */ e(os, { className: "mr-2 h-4 w-4" }),
1546
1547
  "Close"
1547
1548
  ]
1548
1549
  }
1549
1550
  ),
1550
- y && Ve && /* @__PURE__ */ e(
1551
- xa,
1551
+ !N && o && /* @__PURE__ */ r(Me, { children: [
1552
+ /* @__PURE__ */ e(Oe, { asChild: !0, children: /* @__PURE__ */ e(U, { tooltip: "More Options", className: "h-7 p-2", children: /* @__PURE__ */ e(Ca, { className: "h-4 w-4" }) }) }),
1553
+ /* @__PURE__ */ e(Ie, { align: "end", children: /* @__PURE__ */ r(ne, { onClick: () => M(!0), children: [
1554
+ /* @__PURE__ */ e(Da, { className: "mr-2 h-4 w-4" }),
1555
+ "Calendar Preferences"
1556
+ ] }) })
1557
+ ] }),
1558
+ y && Be && /* @__PURE__ */ e(
1559
+ La,
1552
1560
  {
1553
- resource: Ve,
1561
+ resource: Be,
1554
1562
  resourceType: be.DASHBOARD,
1555
- onClose: () => N(!1)
1563
+ onClose: () => S(!1)
1564
+ }
1565
+ ),
1566
+ /* @__PURE__ */ e(
1567
+ Nt,
1568
+ {
1569
+ open: L,
1570
+ onOpenChange: _
1556
1571
  }
1557
1572
  ),
1558
1573
  /* @__PURE__ */ e(
1559
- ft,
1574
+ Fa,
1560
1575
  {
1561
- open: E,
1562
- onOpenChange: T
1576
+ open: G,
1577
+ onOpenChange: M
1563
1578
  }
1564
1579
  ),
1565
1580
  /* @__PURE__ */ e(
1566
1581
  hs,
1567
1582
  {
1568
- open: R,
1583
+ open: V,
1569
1584
  onOpenChange: (c) => {
1570
- !c && B && !P || (k(c), c || (G(null), w(!1)));
1585
+ !c && K && !R || (T(c), c || (C(null), H(!1)));
1571
1586
  },
1572
1587
  children: /* @__PURE__ */ r(ps, { className: "max-w-sm", children: [
1573
1588
  /* @__PURE__ */ r(fs, { children: [
1574
- /* @__PURE__ */ e(gs, { children: P ? "Save failed" : "Saving dashboard" }),
1575
- /* @__PURE__ */ e(vs, { className: "pt-2", children: P ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1589
+ /* @__PURE__ */ e(gs, { children: R ? "Save failed" : "Saving dashboard" }),
1590
+ /* @__PURE__ */ e(vs, { className: "pt-2", children: R ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1576
1591
  ] }),
1577
- /* @__PURE__ */ e(bs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: P ? /* @__PURE__ */ r(_, { children: [
1592
+ /* @__PURE__ */ e(bs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: R ? /* @__PURE__ */ r(I, { children: [
1578
1593
  /* @__PURE__ */ e(
1579
1594
  ys,
1580
1595
  {
1581
1596
  onClick: () => {
1582
- k(!1), G(null), w(!1);
1597
+ T(!1), C(null), H(!1);
1583
1598
  },
1584
1599
  className: "m-0",
1585
1600
  children: "Close"
@@ -1588,7 +1603,7 @@ function Lt() {
1588
1603
  /* @__PURE__ */ e(
1589
1604
  Ee,
1590
1605
  {
1591
- onClick: () => ge(),
1606
+ onClick: () => ve(),
1592
1607
  className: "m-0",
1593
1608
  children: "Retry"
1594
1609
  }
@@ -1599,7 +1614,7 @@ function Lt() {
1599
1614
  disabled: !0,
1600
1615
  className: "m-0 cursor-default",
1601
1616
  children: [
1602
- /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4 animate-spin" }),
1617
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1603
1618
  "Saving..."
1604
1619
  ]
1605
1620
  }
@@ -1608,13 +1623,13 @@ function Lt() {
1608
1623
  }
1609
1624
  ),
1610
1625
  /* @__PURE__ */ e(
1611
- Ia,
1626
+ Ga,
1612
1627
  {
1613
- open: Gs,
1628
+ open: Rs,
1614
1629
  onOpenChange: ee,
1615
- onSave: qs,
1616
- onDiscard: Vs,
1617
- isSaving: B
1630
+ onSave: zs,
1631
+ onDiscard: Hs,
1632
+ isSaving: K
1618
1633
  }
1619
1634
  )
1620
1635
  ] })
@@ -1623,5 +1638,5 @@ function Lt() {
1623
1638
  );
1624
1639
  }
1625
1640
  export {
1626
- Lt as default
1641
+ It as default
1627
1642
  };