@australiangreens/ag-internal-components 0.0.82 → 0.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -20,7 +20,7 @@ var Oe = (e, t) => {
20
20
  return n;
21
21
  };
22
22
  var Ee = (e, t, n) => (ue(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var F = (e, t, n) => new Promise((i, r) => {
23
+ var P = (e, t, n) => new Promise((i, r) => {
24
24
  var a = (l) => {
25
25
  try {
26
26
  d(n.next(l));
@@ -36,11 +36,11 @@ var F = (e, t, n) => new Promise((i, r) => {
36
36
  }, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, c);
37
37
  d((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as p, Fragment as L, jsx as o } from "react/jsx-runtime";
40
- import { useState as O, createContext as Xe, useCallback as ne, useContext as Qe, createElement as me, useEffect as oe, useRef as pe } from "react";
41
- import { Typography as B, Button as ie, Paper as Ye, Box as y, Drawer as xe, Dialog as Ke, DialogTitle as Je, DialogContent as Ze, DialogActions as je, Autocomplete as ve, TextField as we, CircularProgress as Ae, Chip as Lt, Tooltip as _t, Stack as Mt, styled as be, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Rt, Collapse as Ht, Avatar as Be, Fade as Wt, Skeleton as Fe, Toolbar as zt, Divider as Pe, CssBaseline as Ut, Snackbar as Gt, Alert as Vt, LinearProgress as qt, FormHelperText as Xt } from "@mui/material";
39
+ import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
40
+ import { useState as E, createContext as Xe, useCallback as ne, useContext as Qe, createElement as me, useEffect as oe, useRef as pe } from "react";
41
+ import { Typography as F, Button as ie, Paper as Ye, Box as $, Drawer as xe, Dialog as Ke, DialogTitle as Je, DialogContent as Ze, DialogActions as je, Autocomplete as ve, TextField as we, CircularProgress as Ae, Chip as Lt, Tooltip as _t, Stack as Mt, styled as be, IconButton as Q, Container as et, useTheme as ae, useMediaQuery as Rt, Collapse as Ht, Avatar as Be, Fade as Wt, Skeleton as Fe, Toolbar as zt, Divider as Pe, CssBaseline as Ut, Snackbar as Gt, Alert as Vt, LinearProgress as qt, FormHelperText as Xt } from "@mui/material";
42
42
  import Qt from "@mui/material/CssBaseline";
43
- import { styled as H, createTheme as tt, alpha as he } from "@mui/material/styles";
43
+ import { styled as W, createTheme as tt, alpha as he } from "@mui/material/styles";
44
44
  import { AgError as Yt } from "@australiangreens/ag-error";
45
45
  import { createHelper as K } from "souvlaki";
46
46
  import nt from "@mui/material/List";
@@ -51,13 +51,13 @@ import { useQuery as tn, QueryClient as nn, QueryClientProvider as on } from "@t
51
51
  import { useAuth0 as rt } from "@auth0/auth0-react";
52
52
  import { Buffer as rn } from "buffer";
53
53
  import an from "@mui/material/Skeleton";
54
- import { atom as _, useSetAtom as at, useAtomValue as Ne, useAtom as V, getDefaultStore as sn, Provider as st } from "jotai";
54
+ import { atom as M, useSetAtom as at, useAtomValue as Ne, useAtom as V, getDefaultStore as sn, Provider as st } from "jotai";
55
55
  import { useHydrateAtoms as lt } from "jotai/utils";
56
56
  function Do({ text: e }) {
57
- const [t, n] = O(0);
58
- return /* @__PURE__ */ p(L, { children: [
59
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
- /* @__PURE__ */ o(B, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
57
+ const [t, n] = E(0);
58
+ return /* @__PURE__ */ p(_, { children: [
59
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
+ /* @__PURE__ */ o(F, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
61
61
  /* @__PURE__ */ o(
62
62
  ie,
63
63
  {
@@ -85,7 +85,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
85
85
  userInfoHolder: `${U}-userInfoHolder`,
86
86
  settings: `${U}-settings`,
87
87
  pieChartIcon: `${U}-pieChartIcon`
88
- }, ln = H(y, {
88
+ }, ln = W($, {
89
89
  name: "NavBar"
90
90
  })(({ theme: e }) => ({
91
91
  [`&.${q.root}`]: {
@@ -118,7 +118,7 @@ const ct = 330, dt = 73, U = "Navbar", q = {
118
118
  width: ct
119
119
  }, ut()), dn = () => s({
120
120
  width: dt
121
- }, ut()), un = H(xe, {
121
+ }, ut()), un = W(xe, {
122
122
  shouldForwardProp: (e) => e !== "open"
123
123
  })(({ theme: e, open: t }) => s(s({
124
124
  width: t ? ct : dt,
@@ -139,7 +139,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
139
139
  overrideActions: t = hn,
140
140
  children: n
141
141
  }) => {
142
- const [{ open: i }, r] = O({ open: !0 }), a = ne((l) => {
142
+ const [{ open: i }, r] = E({ open: !0 }), a = ne((l) => {
143
143
  r({ open: l });
144
144
  }, []), c = ne(() => {
145
145
  r((l) => S(s({}, l), { open: !l.open }));
@@ -158,7 +158,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
158
158
  open: !0
159
159
  }, e), yo = K(
160
160
  (e = mn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(gn, { overrideState: e, overrideActions: t, children: n })
161
- ), Le = 7, $o = H(nt)(({ theme: e }) => ({
161
+ ), Le = 7, $o = W(nt)(({ theme: e }) => ({
162
162
  backgroundColor: "black",
163
163
  color: "white",
164
164
  "& .MuiListItem-root": {
@@ -196,7 +196,7 @@ const pt = Xe(null), pn = {}, hn = {}, gn = ({
196
196
  // '&.Mui-selected.Mui-focusVisible:hover': {
197
197
  // },
198
198
  }
199
- })), _e = 7, Io = H(nt)(({ theme: e }) => ({
199
+ })), _e = 7, Io = W(nt)(({ theme: e }) => ({
200
200
  backgroundColor: "#e8e8e8",
201
201
  color: "inherit",
202
202
  "& .MuiListItem-root": {
@@ -267,13 +267,13 @@ const ht = ({
267
267
  disableCloseOnBackdropOrEscape: u = !1
268
268
  }) => {
269
269
  var w, g;
270
- const [C, v] = O(!1);
270
+ const [m, x] = E(!1);
271
271
  return /* @__PURE__ */ p(
272
272
  Ke,
273
273
  {
274
274
  open: e,
275
- onClose: (b, k) => F(void 0, null, function* () {
276
- u && (k === "backdropClick" || k === "escapeKeyDown") || C || (a != null && a.onClick ? yield a.onClick() : c());
275
+ onClose: (k, b) => P(void 0, null, function* () {
276
+ u && (b === "backdropClick" || b === "escapeKeyDown") || m || (a != null && a.onClick ? yield a.onClick() : c());
277
277
  }),
278
278
  fullWidth: !0,
279
279
  maxWidth: i != null ? i : "xs",
@@ -288,7 +288,7 @@ const ht = ({
288
288
  {
289
289
  onClick: (w = a == null ? void 0 : a.onClick) != null ? w : c,
290
290
  "data-testid": a == null ? void 0 : a.testId,
291
- disabled: (a == null ? void 0 : a.disabled) || C,
291
+ disabled: (a == null ? void 0 : a.disabled) || m,
292
292
  color: a == null ? void 0 : a.buttonColor,
293
293
  children: (g = a == null ? void 0 : a.text) != null ? g : "Cancel"
294
294
  }
@@ -296,12 +296,12 @@ const ht = ({
296
296
  r && /* @__PURE__ */ o(
297
297
  ie,
298
298
  {
299
- onClick: () => F(void 0, null, function* () {
300
- var b;
301
- v(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), v(!1);
299
+ onClick: () => P(void 0, null, function* () {
300
+ var k;
301
+ x(!0), yield (k = r.onClick) == null ? void 0 : k.call(r), x(!1);
302
302
  }),
303
303
  "data-testid": r.testId,
304
- disabled: r.disabled || C,
304
+ disabled: r.disabled || m,
305
305
  color: r == null ? void 0 : r.buttonColor,
306
306
  children: r.text
307
307
  }
@@ -323,7 +323,7 @@ const ht = ({
323
323
  queryKey: ["autocomplete", i, r]
324
324
  });
325
325
  function Oo({
326
- lookup: e = () => F(this, null, function* () {
326
+ lookup: e = () => P(this, null, function* () {
327
327
  }),
328
328
  enableHighlighting: t = !0,
329
329
  onChange: n,
@@ -334,44 +334,44 @@ function Oo({
334
334
  sx: d,
335
335
  textFieldColor: l,
336
336
  textFieldVariant: u = "filled",
337
- loadingText: C = "Loading...",
338
- noOptionsText: v = "No options",
337
+ loadingText: m = "Loading...",
338
+ noOptionsText: x = "No options",
339
339
  popupIcon: w = /* @__PURE__ */ o(Jt, {}),
340
340
  error: g = !1,
341
- helperText: b = "",
342
- preLoadedOptions: k = void 0,
343
- disablePortal: $ = !1
341
+ helperText: k = "",
342
+ preLoadedOptions: b = void 0,
343
+ disablePortal: I = !1
344
344
  }) {
345
- const [f, D] = O(""), W = (h, m) => {
346
- const E = a.filter((N) => N.id !== m);
347
- n(E, "delete", h);
348
- }, { data: P, isLoading: M } = gt({
349
- inputValue: f,
345
+ const [D, A] = E(""), y = (h, f) => {
346
+ const B = a.filter((L) => L.id !== f);
347
+ n(B, "delete", h);
348
+ }, { data: N, isLoading: R } = gt({
349
+ inputValue: D,
350
350
  label: r,
351
351
  lookup: e,
352
352
  minLength: i,
353
- preLoadedOptions: k
354
- }), I = f.length >= i;
353
+ preLoadedOptions: b
354
+ }), T = D.length >= i;
355
355
  return /* @__PURE__ */ p("div", { "data-testid": c, children: [
356
356
  /* @__PURE__ */ o(
357
357
  ve,
358
358
  {
359
359
  sx: d,
360
360
  "data-testid": c ? `${c}:Autocomplete` : void 0,
361
- disablePortal: $,
361
+ disablePortal: I,
362
362
  multiple: !0,
363
363
  getOptionLabel: (h) => typeof h == "string" ? h : h.label,
364
- loading: I ? M : !1,
365
- options: [...a, ...P != null ? P : []],
364
+ loading: T ? R : !1,
365
+ options: [...a, ...N != null ? N : []],
366
366
  filterSelectedOptions: !0,
367
367
  includeInputInList: !0,
368
368
  value: a,
369
- onChange: (h, m, E) => {
370
- n(m, E, h);
369
+ onChange: (h, f, B) => {
370
+ n(f, B, h);
371
371
  },
372
- onInputChange: (h, m) => D(m),
373
- noOptionsText: I ? v : "Start typing to search",
374
- loadingText: C,
372
+ onInputChange: (h, f) => A(f),
373
+ noOptionsText: T ? x : "Start typing to search",
374
+ loadingText: m,
375
375
  popupIcon: w,
376
376
  renderInput: (h) => /* @__PURE__ */ o(
377
377
  we,
@@ -380,58 +380,58 @@ function Oo({
380
380
  fullWidth: !0,
381
381
  variant: u,
382
382
  error: g,
383
- helperText: b,
383
+ helperText: k,
384
384
  InputProps: S(s({}, h.InputProps), {
385
- endAdornment: /* @__PURE__ */ p(L, { children: [
386
- M ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20 }) : null,
385
+ endAdornment: /* @__PURE__ */ p(_, { children: [
386
+ R ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20 }) : null,
387
387
  h.InputProps.endAdornment
388
388
  ] })
389
389
  }),
390
390
  "data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
391
- onKeyDown: (m) => {
392
- (m.key === "Backspace" || m.key === "Delete") && m.stopPropagation();
391
+ onKeyDown: (f) => {
392
+ (f.key === "Backspace" || f.key === "Delete") && f.stopPropagation();
393
393
  },
394
394
  color: l
395
395
  })
396
396
  ),
397
397
  renderTags: () => null,
398
- isOptionEqualToValue: (h, m) => h.id === m.id,
399
- renderOption: (h, m, E) => {
398
+ isOptionEqualToValue: (h, f) => h.id === f.id,
399
+ renderOption: (h, f, B) => {
400
400
  if (t) {
401
- const N = jt(m.label, E.inputValue, {
401
+ const L = jt(f.label, B.inputValue, {
402
402
  insideWords: !0,
403
403
  findAllOccurrences: !0
404
- }), A = en(m.label, N);
404
+ }), v = en(f.label, L);
405
405
  return /* @__PURE__ */ me(
406
406
  "li",
407
407
  S(s({}, h), {
408
- key: m.id,
409
- "data-testid": c ? `${c}:Autocomplete:option(${m.id.toString()})` : void 0
408
+ key: f.id,
409
+ "data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
410
410
  }),
411
- /* @__PURE__ */ o("div", { children: A.map((x, R) => /* @__PURE__ */ o(
411
+ /* @__PURE__ */ o("div", { children: v.map((C, H) => /* @__PURE__ */ o(
412
412
  "span",
413
413
  {
414
414
  style: {
415
- fontWeight: x.highlight ? 700 : 400
415
+ fontWeight: C.highlight ? 700 : 400
416
416
  },
417
- children: x.text
417
+ children: C.text
418
418
  },
419
- R
419
+ H
420
420
  )) })
421
421
  );
422
422
  } else
423
423
  return /* @__PURE__ */ me(
424
424
  "li",
425
425
  S(s({}, h), {
426
- key: m.id,
427
- "data-testid": c ? `${c}:option(${m.id.toString()})` : void 0
426
+ key: f.id,
427
+ "data-testid": c ? `${c}:option(${f.id.toString()})` : void 0
428
428
  }),
429
- m.label
429
+ f.label
430
430
  );
431
431
  }
432
432
  }
433
433
  ),
434
- a.length > 0 && /* @__PURE__ */ o(y, { children: a.map((h) => /* @__PURE__ */ o(
434
+ a.length > 0 && /* @__PURE__ */ o($, { children: a.map((h) => /* @__PURE__ */ o(
435
435
  Lt,
436
436
  {
437
437
  sx: {
@@ -454,11 +454,11 @@ function Oo({
454
454
  }
455
455
  ]
456
456
  },
457
- children: /* @__PURE__ */ o(B, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
457
+ children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
458
458
  }
459
459
  ),
460
460
  "data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
461
- onDelete: (m) => W(m, h.id),
461
+ onDelete: (f) => y(f, h.id),
462
462
  deleteIcon: /* @__PURE__ */ o(
463
463
  Kt,
464
464
  {
@@ -471,7 +471,7 @@ function Oo({
471
471
  ] });
472
472
  }
473
473
  const Eo = ({
474
- lookup: e = () => F(void 0, null, function* () {
474
+ lookup: e = () => P(void 0, null, function* () {
475
475
  }),
476
476
  onChange: t,
477
477
  label: n,
@@ -482,52 +482,54 @@ const Eo = ({
482
482
  "data-testid": d,
483
483
  noOptionsText: l = "No options",
484
484
  minLength: u = 3,
485
- disablePortal: C = !1,
486
- preLoadedOptions: v
485
+ disablePortal: m = !1,
486
+ preLoadedOptions: x,
487
+ helperText: w = ""
487
488
  }) => {
488
- const [w, g] = O(""), { data: b, isLoading: k } = gt({
489
- inputValue: w,
489
+ const [g, k] = E(""), { data: b, isLoading: I } = gt({
490
+ inputValue: g,
490
491
  label: n,
491
492
  lookup: e,
492
493
  minLength: u != null ? u : 0,
493
- preLoadedOptions: v
494
- }), $ = w.length >= u;
494
+ preLoadedOptions: x
495
+ }), D = g.length >= u;
495
496
  return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Mt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
496
497
  ve,
497
498
  {
498
499
  sx: r,
499
500
  "data-testid": d ? `${d}:Autocomplete` : void 0,
500
- loading: $ ? k : !1,
501
+ loading: D ? I : !1,
501
502
  options: b != null ? b : [],
502
- onChange: (f, D) => {
503
- t(f, D);
503
+ onChange: (A, y) => {
504
+ t(A, y);
504
505
  },
505
- disablePortal: C,
506
- filterOptions: (f) => f,
506
+ disablePortal: m,
507
+ filterOptions: (A) => A,
507
508
  value: i,
508
- noOptionsText: $ ? l : "Start typing to search",
509
- getOptionLabel: (f) => f.label,
510
- renderInput: (f) => /* @__PURE__ */ o(
509
+ noOptionsText: D ? l : "Start typing to search",
510
+ getOptionLabel: (A) => A.label,
511
+ renderInput: (A) => /* @__PURE__ */ o(
511
512
  we,
512
513
  S(s({
513
514
  "data-testid": d ? `${d}:Autocomplete:TextField` : void 0
514
- }, f), {
515
+ }, A), {
515
516
  variant: c,
516
517
  label: n,
517
- color: a
518
+ color: a,
519
+ helperText: w
518
520
  })
519
521
  ),
520
- isOptionEqualToValue: (f, D) => f.id === D.id,
521
- onInputChange: (f, D) => {
522
- g(D);
522
+ isOptionEqualToValue: (A, y) => A.id === y.id,
523
+ onInputChange: (A, y) => {
524
+ k(y);
523
525
  },
524
- renderOption: (f, D) => /* @__PURE__ */ me(
526
+ renderOption: (A, y) => /* @__PURE__ */ me(
525
527
  "li",
526
- S(s({}, f), {
527
- key: D.id,
528
- "data-testid": d ? `${d}:Autocomplete:option(${D.id.toString()})` : void 0
528
+ S(s({}, A), {
529
+ key: y.id,
530
+ "data-testid": d ? `${d}:Autocomplete:option(${y.id.toString()})` : void 0
529
531
  }),
530
- D.label
532
+ y.label
531
533
  )
532
534
  }
533
535
  ) }) });
@@ -549,13 +551,13 @@ const Eo = ({
549
551
  closeHandler: t,
550
552
  setAuth0ExpiryTime: n
551
553
  }) => {
552
- const { logout: i, getAccessTokenSilently: r } = rt(), [a, c] = O(0), d = () => F(void 0, null, function* () {
554
+ const { logout: i, getAccessTokenSilently: r } = rt(), [a, c] = E(0), d = () => P(void 0, null, function* () {
553
555
  i({ logoutParams: { returnTo: `${window.location.origin}` } });
554
- }), l = () => F(void 0, null, function* () {
556
+ }), l = () => P(void 0, null, function* () {
555
557
  c(a + 1), t();
556
558
  });
557
559
  return oe(() => {
558
- (() => F(void 0, null, function* () {
560
+ (() => P(void 0, null, function* () {
559
561
  if (a > 0) {
560
562
  const w = yield r({ cacheMode: "off" }), g = Cn(w) * 1e3;
561
563
  n(g);
@@ -620,13 +622,13 @@ function Fo({
620
622
  let d = "Auth error", l = "An unknown Auth0 error occurred.";
621
623
  return wn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : An(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : vn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ p(Ke, { open: !0, children: [
622
624
  /* @__PURE__ */ o(Je, { children: d }),
623
- /* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(B, { children: l }) }),
625
+ /* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(F, { children: l }) }),
624
626
  /* @__PURE__ */ o(je, { children: /* @__PURE__ */ o(ie, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
625
627
  ] });
626
628
  }
627
- return n ? /* @__PURE__ */ o(L, { children: e }) : /* @__PURE__ */ o(an, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
629
+ return n ? /* @__PURE__ */ o(_, { children: e }) : /* @__PURE__ */ o(an, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
628
630
  }
629
- const bn = 24, Sn = 64, G = "TopBar", T = {
631
+ const bn = 24, Sn = 64, G = "TopBar", O = {
630
632
  topStripe: `${G}-topStripe`,
631
633
  titleBar: `${G}-titleBar`,
632
634
  titleSlider: `${G}-titleSlider`,
@@ -640,18 +642,18 @@ const bn = 24, Sn = 64, G = "TopBar", T = {
640
642
  var i, r;
641
643
  return {
642
644
  width: "100%",
643
- [`& .${T.topStripe}`]: {
645
+ [`& .${O.topStripe}`]: {
644
646
  width: "100%",
645
647
  height: `${bn}px`,
646
648
  backgroundColor: e.palette.primary.main
647
649
  },
648
- [`& .${T.titleBar}`]: {
650
+ [`& .${O.titleBar}`]: {
649
651
  backgroundColor: e.palette.primary.light,
650
652
  height: `${Sn}px`,
651
653
  padding: e.spacing(0, 3),
652
654
  width: "100%"
653
655
  },
654
- [`& .${T.titleSlider}`]: s(s({
656
+ [`& .${O.titleSlider}`]: s(s({
655
657
  height: "100%",
656
658
  display: "flex",
657
659
  alignItems: "center",
@@ -660,14 +662,14 @@ const bn = 24, Sn = 64, G = "TopBar", T = {
660
662
  easing: e.transitions.easing.sharp,
661
663
  duration: e.transitions.duration.leavingScreen
662
664
  }),
663
- [`& .${T.leftPanelButton}`]: {
665
+ [`& .${O.leftPanelButton}`]: {
664
666
  marginRight: e.spacing(2),
665
667
  flexGrow: 0
666
668
  },
667
- [`& .${T.titleText}`]: {
669
+ [`& .${O.titleText}`]: {
668
670
  flexGrow: 1
669
671
  },
670
- [`& .${T.rightPanelButton}`]: {
672
+ [`& .${O.rightPanelButton}`]: {
671
673
  flexGrow: 0
672
674
  }
673
675
  }, (t == null ? void 0 : t.open) && {
@@ -692,12 +694,12 @@ function Dn({
692
694
  "data-testid": i
693
695
  }) {
694
696
  return /* @__PURE__ */ p(kn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
695
- /* @__PURE__ */ o("div", { className: T.topStripe }),
696
- /* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ p(y, { className: T.titleSlider, children: [
697
+ /* @__PURE__ */ o("div", { className: O.topStripe }),
698
+ /* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ p($, { className: O.titleSlider, children: [
697
699
  t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
698
700
  Q,
699
701
  {
700
- className: T.leftPanelButton,
702
+ className: O.leftPanelButton,
701
703
  color: "inherit",
702
704
  "aria-label": "Open left side panel",
703
705
  onClick: t == null ? void 0 : t.onOpen,
@@ -709,11 +711,11 @@ function Dn({
709
711
  ]
710
712
  }
711
713
  ),
712
- /* @__PURE__ */ o(B, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
714
+ /* @__PURE__ */ o(F, { className: O.titleText, variant: "h6", noWrap: !0, children: e }),
713
715
  n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
714
716
  Q,
715
717
  {
716
- className: T.rightPanelButton,
718
+ className: O.rightPanelButton,
717
719
  color: "inherit",
718
720
  "aria-label": "Open right side panel",
719
721
  onClick: n == null ? void 0 : n.onOpen,
@@ -758,7 +760,7 @@ const ft = 400, yn = be(xe, {
758
760
  marginLeft: `${r}px`
759
761
  }))
760
762
  })
761
- ), $n = be(y, {
763
+ ), $n = be($, {
762
764
  shouldForwardProp: (e) => !["anchor"].includes(e)
763
765
  })(({ theme: e, anchor: t }) => S(s({
764
766
  display: "flex",
@@ -790,48 +792,48 @@ function Me({
790
792
  debugOpacity: d = !1,
791
793
  headerBoxProps: l = {},
792
794
  onOpened: u,
793
- onClosed: C,
794
- "data-testid": v,
795
+ onClosed: m,
796
+ "data-testid": x,
795
797
  navBarOpen: w = !1,
796
798
  navBarWidthOpen: g = 0,
797
- navBarWidthClosed: b = 0
799
+ navBarWidthClosed: k = 0
798
800
  }) {
799
801
  return /* @__PURE__ */ p(
800
802
  yn,
801
803
  {
802
804
  SlideProps: {
803
805
  onEntered: () => u == null ? void 0 : u(),
804
- onExited: () => C == null ? void 0 : C()
806
+ onExited: () => m == null ? void 0 : m()
805
807
  },
806
808
  variant: "persistent",
807
809
  anchor: t,
808
810
  open: n,
809
811
  width: a,
810
812
  debugOpacity: d,
811
- "data-testid": v,
813
+ "data-testid": x,
812
814
  navBarOpen: w,
813
815
  navBarWidthOpen: g,
814
- navBarWidthClosed: b,
816
+ navBarWidthClosed: k,
815
817
  children: [
816
- /* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(L, { children: [
817
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: r }),
818
+ /* @__PURE__ */ o($n, S(s({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(_, { children: [
819
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
818
820
  c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
819
821
  /* @__PURE__ */ o(it, { "data-testid": "arrowbackicon" }),
820
822
  " "
821
823
  ] })
822
- ] }) : /* @__PURE__ */ p(L, { children: [
824
+ ] }) : /* @__PURE__ */ p(_, { children: [
823
825
  c && /* @__PURE__ */ p(Q, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
824
826
  /* @__PURE__ */ o(ot, {}),
825
827
  " "
826
828
  ] }),
827
- /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: r })
829
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
828
830
  ] }) })),
829
831
  e
830
832
  ]
831
833
  }
832
834
  );
833
835
  }
834
- const In = H(y, {
836
+ const In = W($, {
835
837
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
836
838
  name: "PanelAwareMargins"
837
839
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -854,7 +856,7 @@ const In = H(y, {
854
856
  }),
855
857
  marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
856
858
  });
857
- }), Tn = H(et, {
859
+ }), Tn = W(et, {
858
860
  name: "PageContainer"
859
861
  })(({ theme: e }) => ({
860
862
  // Horizontal padding comes from the Container's gutter
@@ -869,7 +871,7 @@ const In = H(y, {
869
871
  startOpen: !1,
870
872
  open: void 0,
871
873
  onChangeOpen: void 0,
872
- content: /* @__PURE__ */ o(L, {}),
874
+ content: /* @__PURE__ */ o(_, {}),
873
875
  onOpened: void 0,
874
876
  onClosed: void 0,
875
877
  dataTestId: void 0
@@ -885,18 +887,18 @@ function Po({
885
887
  pageContentDataTestId: d,
886
888
  topBarDataTestId: l,
887
889
  navBarOpen: u,
888
- navBarWidthOpen: C,
889
- navBarWidthClosed: v
890
+ navBarWidthOpen: m,
891
+ navBarWidthClosed: x
890
892
  }) {
891
- const [w, g] = O(ge), [b, k] = O(fe), [$, f] = O(ge), [D, W] = O(fe), P = n !== void 0, M = i !== void 0, {
892
- titleText: I,
893
+ const [w, g] = E(ge), [k, b] = E(fe), [I, D] = E(ge), [A, y] = E(fe), N = n !== void 0, R = i !== void 0, {
894
+ titleText: T,
893
895
  content: h,
894
- flavour: m,
895
- open: E,
896
- onChangeOpen: N,
897
- width: A,
898
- arrowButtons: x,
899
- startOpen: R,
896
+ flavour: f,
897
+ open: B,
898
+ onChangeOpen: L,
899
+ width: v,
900
+ arrowButtons: C,
901
+ startOpen: H,
900
902
  onOpened: Dt,
901
903
  onClosed: yt,
902
904
  dataTestId: $t
@@ -914,36 +916,36 @@ function Po({
914
916
  dataTestId: Bt
915
917
  } = i ? s(s({}, ee), i) : s({}, ee);
916
918
  oe(() => {
917
- R !== ge && (g(R), f(R));
918
- }, [R]), oe(() => {
919
- Z !== fe && (k(Z), W(Z));
919
+ H !== ge && (g(H), D(H));
920
+ }, [H]), oe(() => {
921
+ Z !== fe && (b(Z), y(Z));
920
922
  }, [Z]);
921
- const ce = E === void 0 ? w : E, de = se === void 0 ? b : se, ye = (z) => {
922
- E === void 0 && (g(z), r && M && (z ? (k(!1), W(b)) : k(D))), N && N(z);
923
+ const ce = B === void 0 ? w : B, de = se === void 0 ? k : se, ye = (z) => {
924
+ B === void 0 && (g(z), r && R && (z ? (b(!1), y(k)) : b(A))), L && L(z);
923
925
  }, $e = (z) => {
924
- se === void 0 && (k(z), r && P && (z ? (g(!1), f(w)) : g($))), De && De(z);
926
+ se === void 0 && (b(z), r && N && (z ? (g(!1), D(w)) : g(I))), De && De(z);
925
927
  };
926
- return /* @__PURE__ */ p(y, { children: [
927
- P && /* @__PURE__ */ o(
928
+ return /* @__PURE__ */ p($, { children: [
929
+ N && /* @__PURE__ */ o(
928
930
  Me,
929
931
  {
930
932
  "data-testid": $t,
931
933
  anchor: "left",
932
934
  open: ce,
933
935
  onClose: () => ye(!1),
934
- width: A,
935
- titleText: I,
936
+ width: v,
937
+ titleText: T,
936
938
  debugOpacity: a,
937
- showCloseArrow: x === "both" || x === "close",
939
+ showCloseArrow: C === "both" || C === "close",
938
940
  onOpened: Dt,
939
941
  onClosed: yt,
940
942
  navBarOpen: u,
941
- navBarWidthOpen: C,
942
- navBarWidthClosed: v,
943
+ navBarWidthOpen: m,
944
+ navBarWidthClosed: x,
943
945
  children: h
944
946
  }
945
947
  ),
946
- M && /* @__PURE__ */ o(
948
+ R && /* @__PURE__ */ o(
947
949
  Me,
948
950
  {
949
951
  "data-testid": Bt,
@@ -957,8 +959,8 @@ function Po({
957
959
  onOpened: Ot,
958
960
  onClosed: Et,
959
961
  navBarOpen: u,
960
- navBarWidthOpen: C,
961
- navBarWidthClosed: v,
962
+ navBarWidthOpen: m,
963
+ navBarWidthClosed: x,
962
964
  children: Tt
963
965
  }
964
966
  ),
@@ -967,14 +969,14 @@ function Po({
967
969
  s(s({
968
970
  titleText: t,
969
971
  "data-testid": l
970
- }, P && m === "push" ? {
972
+ }, N && f === "push" ? {
971
973
  leftPanel: {
972
974
  open: ce,
973
- width: A,
975
+ width: v,
974
976
  onOpen: () => ye(!0),
975
- showOpenArrow: x === "both" || x === "open"
977
+ showOpenArrow: C === "both" || C === "open"
976
978
  }
977
- } : {}), M && ke === "push" ? {
979
+ } : {}), R && ke === "push" ? {
978
980
  rightPanel: {
979
981
  open: de,
980
982
  width: le,
@@ -985,10 +987,10 @@ function Po({
985
987
  ),
986
988
  /* @__PURE__ */ o(
987
989
  In,
988
- S(s(s({}, m === "push" ? {
990
+ S(s(s({}, f === "push" ? {
989
991
  leftPanel: {
990
992
  open: ce,
991
- width: A
993
+ width: v
992
994
  }
993
995
  } : {}), ke === "push" ? {
994
996
  rightPanel: {
@@ -1004,7 +1006,7 @@ function Po({
1004
1006
  const mt = () => {
1005
1007
  const e = ae();
1006
1008
  return Rt(e.breakpoints.down("sm"));
1007
- }, On = 64, En = 72, Bn = 256, Y = _(!0), Ct = _(Bn), xt = _(En), Ce = _(""), Fn = _(void 0), vt = _(On), wt = _(void 0);
1009
+ }, On = 64, En = 72, Bn = 256, Y = M(!0), Ct = M(Bn), xt = M(En), Ce = M(""), Fn = M(void 0), vt = M(On), wt = M(void 0);
1008
1010
  function Pn({ links: e }) {
1009
1011
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
1010
1012
  }
@@ -1016,7 +1018,7 @@ const te = "Navbar", X = {
1016
1018
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
1017
1019
  // settings: `${PREFIX}-settings`,
1018
1020
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
1019
- }, Nn = H(y, { name: "NavBar" })(({ theme: e }) => ({
1021
+ }, Nn = W($, { name: "NavBar" })(({ theme: e }) => ({
1020
1022
  [`&.${X.root}`]: {
1021
1023
  display: "flex"
1022
1024
  },
@@ -1064,7 +1066,7 @@ const te = "Navbar", X = {
1064
1066
  }, At(e)), He = (e, t) => s({
1065
1067
  width: t,
1066
1068
  transition: re(e, "width", "leaving")
1067
- }, At(e)), _n = H(xe, {
1069
+ }, At(e)), _n = W(xe, {
1068
1070
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
1069
1071
  })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => s(s({
1070
1072
  flexShrink: 0,
@@ -1091,7 +1093,7 @@ const We = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], R
1091
1093
  function Hn({ user: e, domainCode: t, open: n }) {
1092
1094
  const i = ae();
1093
1095
  return /* @__PURE__ */ p(
1094
- y,
1096
+ $,
1095
1097
  {
1096
1098
  sx: {
1097
1099
  paddingTop: 3,
@@ -1102,7 +1104,7 @@ function Hn({ user: e, domainCode: t, open: n }) {
1102
1104
  },
1103
1105
  children: [
1104
1106
  /* @__PURE__ */ o(
1105
- y,
1107
+ $,
1106
1108
  {
1107
1109
  sx: {
1108
1110
  width: n ? "5rem" : "2rem",
@@ -1123,9 +1125,9 @@ function Hn({ user: e, domainCode: t, open: n }) {
1123
1125
  ) : /* @__PURE__ */ o(Be, { sx: { width: "100%", height: "100%" } })
1124
1126
  }
1125
1127
  ),
1126
- /* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ p(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1127
- e != null && e.name ? /* @__PURE__ */ o(B, { children: e.name }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "50%" }),
1128
- t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "25%" })
1128
+ /* @__PURE__ */ o(Ln, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ p($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
1129
+ e != null && e.name ? /* @__PURE__ */ o(F, { children: e.name }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "50%" }),
1130
+ t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Fe, { animation: !1, width: "25%" })
1129
1131
  ] }) }) })
1130
1132
  ]
1131
1133
  }
@@ -1142,7 +1144,7 @@ function Wn({
1142
1144
  user: d,
1143
1145
  domainCode: l
1144
1146
  }) {
1145
- const u = mt(), C = at(Y);
1147
+ const u = mt(), m = at(Y);
1146
1148
  return /* @__PURE__ */ o(Nn, { className: X.root, "data-testid": i, children: /* @__PURE__ */ p(
1147
1149
  _n,
1148
1150
  {
@@ -1155,20 +1157,20 @@ function Wn({
1155
1157
  component: "nav"
1156
1158
  },
1157
1159
  onClose: () => {
1158
- C(!1);
1160
+ m(!1);
1159
1161
  },
1160
1162
  isSmallScreen: u,
1161
1163
  children: [
1162
1164
  !u && /* @__PURE__ */ o(zt, {}),
1163
- r && /* @__PURE__ */ p(y, { flexGrow: "0", children: [
1165
+ r && /* @__PURE__ */ p($, { flexGrow: "0", children: [
1164
1166
  r,
1165
1167
  /* @__PURE__ */ o(Pe, { variant: "middle", sx: { marginY: "0.5rem" } })
1166
1168
  ] }),
1167
- /* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ o(Pn, { links: a }) : a }),
1168
- /* @__PURE__ */ p(y, { flexGrow: "0", children: [
1169
+ /* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ o(Pn, { links: a }) : a }),
1170
+ /* @__PURE__ */ p($, { flexGrow: "0", children: [
1169
1171
  /* @__PURE__ */ o(Pe, { variant: "middle", sx: { marginY: "0.5rem" } }),
1170
1172
  /* @__PURE__ */ o(Hn, { user: d, domainCode: l, open: e }),
1171
- c && /* @__PURE__ */ o(L, { children: c })
1173
+ c && /* @__PURE__ */ o(_, { children: c })
1172
1174
  ] })
1173
1175
  ]
1174
1176
  }
@@ -1180,7 +1182,7 @@ function zn({
1180
1182
  maxWidth: n = !1
1181
1183
  }) {
1182
1184
  return /* @__PURE__ */ o(
1183
- y,
1185
+ $,
1184
1186
  {
1185
1187
  sx: {
1186
1188
  overflow: "auto",
@@ -1240,7 +1242,7 @@ function Vn({
1240
1242
  children: /* @__PURE__ */ o(Zt, { fontSize: "medium" })
1241
1243
  }
1242
1244
  ),
1243
- /* @__PURE__ */ o(B, { className: Gn.titleText, variant: "h6", children: e }),
1245
+ /* @__PURE__ */ o(F, { className: Gn.titleText, variant: "h6", children: e }),
1244
1246
  i
1245
1247
  ]
1246
1248
  }
@@ -1257,37 +1259,37 @@ function No({
1257
1259
  navBarMiddle: d,
1258
1260
  navBarBottom: l,
1259
1261
  user: u,
1260
- domainCode: C
1262
+ domainCode: m
1261
1263
  }) {
1262
1264
  lt([
1263
1265
  [Y, n != null ? n : !0],
1264
1266
  [Ce, t != null ? t : ""]
1265
1267
  ]);
1266
- const v = Ne(Y), [w] = V(Ct), [g] = V(xt), b = Ne(Ce), [k] = V(vt), [$] = V(Fn), [f] = V(wt);
1267
- return /* @__PURE__ */ p(y, { children: [
1268
+ const x = Ne(Y), [w] = V(Ct), [g] = V(xt), k = Ne(Ce), [b] = V(vt), [I] = V(Fn), [D] = V(wt);
1269
+ return /* @__PURE__ */ p($, { children: [
1268
1270
  /* @__PURE__ */ o(Ut, {}),
1269
1271
  /* @__PURE__ */ o(
1270
1272
  Vn,
1271
1273
  {
1272
- titleText: b,
1274
+ titleText: k,
1273
1275
  "data-testid": a,
1274
- height: k,
1275
- middle: $
1276
+ height: b,
1277
+ middle: I
1276
1278
  }
1277
1279
  ),
1278
- /* @__PURE__ */ p(y, { sx: { display: "flex" }, children: [
1280
+ /* @__PURE__ */ p($, { sx: { display: "flex" }, children: [
1279
1281
  /* @__PURE__ */ o(
1280
1282
  Wn,
1281
1283
  {
1282
- open: v,
1283
- top: f,
1284
+ open: x,
1285
+ top: D,
1284
1286
  middle: d,
1285
1287
  bottom: l,
1286
1288
  user: u,
1287
- domainCode: C,
1289
+ domainCode: m,
1288
1290
  widthOpen: w,
1289
1291
  widthClosed: g,
1290
- offsetTop: k,
1292
+ offsetTop: b,
1291
1293
  "data-testid": c
1292
1294
  }
1293
1295
  ),
@@ -1295,7 +1297,7 @@ function No({
1295
1297
  zn,
1296
1298
  S(s({
1297
1299
  "data-testid": r,
1298
- topBarHeight: k
1300
+ topBarHeight: b
1299
1301
  }, i), {
1300
1302
  children: e
1301
1303
  })
@@ -1336,63 +1338,63 @@ function jn(a) {
1336
1338
  "shouldClose",
1337
1339
  "children"
1338
1340
  ]);
1339
- var N;
1340
- const [{ open: d }, l] = O({ open: !1 }), u = pe([]), C = pe(Date.now()), v = pe(0), w = ne((A) => {
1341
- l({ open: A });
1342
- }, []), g = ne((A = {}) => {
1343
- v.current += 1, u.current.length >= Ue && Date.now() - C.current >= Ge && (C.current = Date.now(), console.error(
1344
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${v.current} times in last ${Ge}ms)`
1345
- ), v.current = 0);
1346
- const x = s(S(s({}, ze), {
1341
+ var L;
1342
+ const [{ open: d }, l] = E({ open: !1 }), u = pe([]), m = pe(Date.now()), x = pe(0), w = ne((v) => {
1343
+ l({ open: v });
1344
+ }, []), g = ne((v = {}) => {
1345
+ x.current += 1, u.current.length >= Ue && Date.now() - m.current >= Ge && (m.current = Date.now(), console.error(
1346
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Ue}) hit ${x.current} times in last ${Ge}ms)`
1347
+ ), x.current = 0);
1348
+ const C = s(S(s({}, ze), {
1347
1349
  key: Yn()
1348
- }), A);
1349
- return u.current.push(x), u.current.length === 1 && l({ open: !0 }), x.key;
1350
- }, []), b = (A = "", x = {}) => g(s({ message: A, severity: "success" }, x)), k = (A = "", x = {}) => g(s({ message: A, severity: "info" }, x)), $ = (A = "", x = {}) => g(s({ message: A, severity: "warning" }, x)), f = (A = "", x = {}) => g(s({ message: A, severity: "error" }, x)), D = (A) => {
1351
- const x = u.current.findIndex((R) => R.key === A);
1352
- if (x !== -1)
1353
- return x === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(x, 1);
1354
- }, W = (A, x) => {
1355
- n(A, x) && l({ open: !1 });
1356
- }, P = () => {
1357
- }, M = () => {
1350
+ }), v);
1351
+ return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
1352
+ }, []), k = (v = "", C = {}) => g(s({ message: v, severity: "success" }, C)), b = (v = "", C = {}) => g(s({ message: v, severity: "info" }, C)), I = (v = "", C = {}) => g(s({ message: v, severity: "warning" }, C)), D = (v = "", C = {}) => g(s({ message: v, severity: "error" }, C)), A = (v) => {
1353
+ const C = u.current.findIndex((H) => H.key === v);
1354
+ if (C !== -1)
1355
+ return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
1356
+ }, y = (v, C) => {
1357
+ n(v, C) && l({ open: !1 });
1358
+ }, N = () => {
1359
+ }, R = () => {
1358
1360
  u.current.shift(), u.current.length > 0 && l({ open: !0 });
1359
- }, I = (N = u.current[0]) != null ? N : s({}, ze), h = {};
1360
- "autoHideDuration" in I && (h.autoHideDuration = I.autoHideDuration);
1361
- const m = s(s({}, qn), r), E = s(s({
1361
+ }, T = (L = u.current[0]) != null ? L : s({}, ze), h = {};
1362
+ "autoHideDuration" in T && (h.autoHideDuration = T.autoHideDuration);
1363
+ const f = s(s({}, qn), r), B = s(s({
1362
1364
  open: d,
1363
1365
  setOpen: w,
1364
1366
  enqueueNotification: g,
1365
- enqueueSuccessNotification: b,
1366
- enqueueInfoNotification: k,
1367
- enqueueWarningNotification: $,
1368
- enqueueErrorNotification: f,
1369
- removeNotification: D
1367
+ enqueueSuccessNotification: k,
1368
+ enqueueInfoNotification: b,
1369
+ enqueueWarningNotification: I,
1370
+ enqueueErrorNotification: D,
1371
+ removeNotification: A
1370
1372
  }, e), t);
1371
- return /* @__PURE__ */ p(bt.Provider, { value: E, children: [
1373
+ return /* @__PURE__ */ p(bt.Provider, { value: B, children: [
1372
1374
  i,
1373
1375
  /* @__PURE__ */ o(
1374
1376
  Gt,
1375
- S(s(s({}, m), h), {
1377
+ S(s(s({}, f), h), {
1376
1378
  open: d,
1377
- onClose: W,
1379
+ onClose: y,
1378
1380
  TransitionProps: {
1379
- onExited: M,
1380
- onExit: P
1381
+ onExited: R,
1382
+ onExit: N
1381
1383
  },
1382
1384
  sx: { zIndex: Qn },
1383
1385
  children: /* @__PURE__ */ p("div", { children: [
1384
1386
  /* @__PURE__ */ o(
1385
1387
  Vt,
1386
1388
  {
1387
- onClose: (A) => W(A, "closeAlert"),
1388
- severity: I.severity,
1389
+ onClose: (v) => y(v, "closeAlert"),
1390
+ severity: T.severity,
1389
1391
  variant: "filled",
1390
- icon: I.progressIndicator === "circular" ? /* @__PURE__ */ o(Ae, { size: "1em" }) : void 0,
1391
- style: I.progressIndicator === "linear" ? Kn : void 0,
1392
- children: I.message
1392
+ icon: T.progressIndicator === "circular" ? /* @__PURE__ */ o(Ae, { size: "1em" }) : void 0,
1393
+ style: T.progressIndicator === "linear" ? Kn : void 0,
1394
+ children: T.message
1393
1395
  }
1394
1396
  ),
1395
- I.progressIndicator === "linear" && /* @__PURE__ */ o(qt, { color: "primary" })
1397
+ T.progressIndicator === "linear" && /* @__PURE__ */ o(qt, { color: "primary" })
1396
1398
  ] })
1397
1399
  })
1398
1400
  )
@@ -1411,9 +1413,9 @@ const Lo = K(
1411
1413
  store: t
1412
1414
  }) => /* @__PURE__ */ o(st, { store: t != null ? t : to, children: e }), St = "domainCode";
1413
1415
  var qe;
1414
- const Ve = _(
1416
+ const Ve = M(
1415
1417
  JSON.parse((qe = localStorage.getItem(St)) != null ? qe : '{"domainCode": ""}').domainCode
1416
- ), kt = _(
1418
+ ), kt = M(
1417
1419
  (e) => e(Ve),
1418
1420
  (e, t, n) => {
1419
1421
  t(Ve, n), localStorage.setItem(St, JSON.stringify({ domainCode: n }));
@@ -1441,31 +1443,31 @@ const Ve = _(
1441
1443
  applicationName: r,
1442
1444
  handleLogout: a
1443
1445
  }) => {
1444
- const [c, d] = V(kt), [l, u] = O(c), { enqueueSuccessNotification: C } = eo(), v = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || v || w, b = () => F(void 0, null, function* () {
1445
- l ? (d(l), C(`Set domain to ${l}`), n()) : d("");
1446
- }), k = () => F(void 0, null, function* () {
1447
- c && !v && !w ? (u(c), n()) : g && a();
1446
+ const [c, d] = V(kt), [l, u] = E(c), { enqueueSuccessNotification: m } = eo(), x = i.length === 0, w = !!c && !i.includes(c) && !i.includes(l), g = !c || x || w, k = () => P(void 0, null, function* () {
1447
+ l ? (d(l), m(`Set domain to ${l}`), n()) : d("");
1448
+ }), b = () => P(void 0, null, function* () {
1449
+ c && !x && !w ? (u(c), n()) : g && a();
1448
1450
  });
1449
- let $;
1450
- return v ? $ = "Unable to retrieve your active organisations. Try logging in again." : w && ($ = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1451
+ let I;
1452
+ return x ? I = "Unable to retrieve your active organisations. Try logging in again." : w && (I = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1451
1453
  ht,
1452
1454
  {
1453
1455
  isOpen: t,
1454
1456
  dialogTitle: "Select an organisation",
1455
1457
  primaryButton: {
1456
1458
  text: "Confirm",
1457
- onClick: b,
1458
- disabled: !l || v || w,
1459
+ onClick: k,
1460
+ disabled: !l || x || w,
1459
1461
  buttonColor: "primary"
1460
1462
  },
1461
1463
  secondaryButton: {
1462
1464
  text: g ? "Logout" : "Cancel",
1463
- onClick: k
1465
+ onClick: b
1464
1466
  },
1465
1467
  onClose: g ? () => {
1466
1468
  } : n,
1467
1469
  children: [
1468
- /* @__PURE__ */ p(B, { marginBottom: 2, children: [
1470
+ /* @__PURE__ */ p(F, { marginBottom: 2, children: [
1469
1471
  "Select the default organisation that you want to use with the ",
1470
1472
  r,
1471
1473
  "."
@@ -1477,25 +1479,25 @@ const Ve = _(
1477
1479
  multiple: !1,
1478
1480
  disableClearable: !1,
1479
1481
  value: l !== "" ? l : null,
1480
- onChange: (f, D) => u(D != null ? D : ""),
1482
+ onChange: (D, A) => u(A != null ? A : ""),
1481
1483
  getOptionLabel: oo,
1482
1484
  options: [...i],
1483
- renderInput: (f) => /* @__PURE__ */ o(
1485
+ renderInput: (D) => /* @__PURE__ */ o(
1484
1486
  we,
1485
- S(s({}, f), {
1487
+ S(s({}, D), {
1486
1488
  variant: "filled",
1487
1489
  label: "Select organisation",
1488
- InputProps: S(s({}, f.InputProps), {
1489
- endAdornment: /* @__PURE__ */ p(L, { children: [
1490
+ InputProps: S(s({}, D.InputProps), {
1491
+ endAdornment: /* @__PURE__ */ p(_, { children: [
1490
1492
  e ? /* @__PURE__ */ o(Ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1491
- f.InputProps.endAdornment
1493
+ D.InputProps.endAdornment
1492
1494
  ] })
1493
1495
  })
1494
1496
  })
1495
1497
  )
1496
1498
  }
1497
1499
  ),
1498
- $ && /* @__PURE__ */ o(Xt, { error: !0, children: $ })
1500
+ I && /* @__PURE__ */ o(Xt, { error: !0, children: I })
1499
1501
  ]
1500
1502
  }
1501
1503
  );
@@ -1652,7 +1654,7 @@ const Ve = _(
1652
1654
  }, Wo = K(() => ({ children: e }) => /* @__PURE__ */ o(st, { children: e })), ro = ({
1653
1655
  initialValues: e,
1654
1656
  children: t
1655
- }) => (lt(e), /* @__PURE__ */ o(L, { children: t })), zo = K(
1657
+ }) => (lt(e), /* @__PURE__ */ o(_, { children: t })), zo = K(
1656
1658
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1657
1659
  ro,
1658
1660
  {