react-semaphor 0.1.195 → 0.1.196

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